From 62ba66d61821fec6a5ad3bdccdf738e15e082461 Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Fri, 10 May 2019 18:55:02 -0500 Subject: [PATCH 001/341] Cleanup/rgb matrix (#5811) * clean up rgb matrix extern usage Moved rgb matrix boiler plate into macros Rebased onto typing heatmap pr * Fixing the reversed frame buffer access in digital rain * Fixing digital rain & typing heatmap if keyreactive effects are not enabled * Apply suggestions from code review Co-Authored-By: Drashna Jaelre * Adding parenthesizes to DRIVER_LED_TOTAL where necessary * Updated docs * added notes about parentheses --- docs/feature_rgb_matrix.md | 4 +- .../dztech/dz40rgb/keymaps/default/keymap.c | 2 - .../dz40rgb/keymaps/split_space/keymap.c | 2 - .../dztech/dz60rgb/keymaps/ansi/keymap.c | 2 - .../dztech/dz60rgb/keymaps/default/keymap.c | 1 - .../dztech/dz60rgb/keymaps/hhkb/keymap.c | 2 - .../dztech/dz60rgb/keymaps/hhkb_iso/keymap.c | 2 - keyboards/dztech/dz60rgb/keymaps/iso/keymap.c | 2 - .../dz60rgb/keymaps/matthewrobo/keymap.c | 2 - .../dztech/dz60rgb/keymaps/mekanist/keymap.c | 4 +- keyboards/dztech/dz65rgb/config.h | 2 +- .../dztech/dz65rgb/keymaps/default/keymap.c | 1 - keyboards/ergodox_ez/config.h | 2 +- keyboards/hs60/v1/config.h | 2 +- .../ctrl/keymaps/matthewrobo/keymap.c | 2 - keyboards/planck/keymaps/tom/keymap.c | 4 - keyboards/planck/light/config.h | 2 +- keyboards/sol/keymaps/xulkal/keymap.c | 1 - layouts/community/ergodox/drashna/keymap.c | 5 - layouts/community/ortho_4x12/drashna/keymap.c | 5 - quantum/quantum.c | 2 +- quantum/rgb_matrix.c | 196 +++--------------- quantum/rgb_matrix.h | 103 ++------- .../rgb_matrix_animations/alpha_mods_anim.h | 9 +- .../rgb_matrix_animations/breathing_anim.h | 9 +- .../rgb_matrix_animations/cycle_all_anim.h | 10 +- .../cycle_left_right_anim.h | 10 +- .../cycle_up_down_anim.h | 10 +- .../rgb_matrix_animations/digital_rain_anim.h | 32 +-- .../rgb_matrix_animations/dual_beacon_anim.h | 10 +- .../gradient_up_down_anim.h | 10 +- .../jellybean_raindrops_anim.h | 10 +- .../rainbow_beacon_anim.h | 10 +- .../rainbow_moving_chevron_anim.h | 10 +- .../rainbow_pinwheels_anim.h | 10 +- .../rgb_matrix_animations/raindrops_anim.h | 11 +- .../rgb_matrix_effects.inc | 23 ++ .../rgb_matrix_animations/solid_color_anim.h | 10 +- .../solid_reactive_anim.h | 16 +- .../solid_reactive_cross.h | 18 +- .../solid_reactive_nexus.h | 18 +- .../solid_reactive_simple_anim.h | 9 +- .../solid_reactive_wide.h | 18 +- .../rgb_matrix_animations/solid_splash_anim.h | 18 +- quantum/rgb_matrix_animations/splash_anim.h | 19 +- .../typing_heatmap_anim.h | 9 +- tmk_core/protocol/arm_atsam/led_matrix.c | 3 - users/drashna/rgb_stuff.c | 2 - 48 files changed, 222 insertions(+), 442 deletions(-) create mode 100644 quantum/rgb_matrix_animations/rgb_matrix_effects.inc diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 1e4341467..e29433a4b 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -30,9 +30,11 @@ Configure the hardware via your `config.h`: #define DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 25 #define DRIVER_2_LED_TOTAL 24 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) ``` +!> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`. + Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations. Define these arrays listing all the LEDs in your `.c`: diff --git a/keyboards/dztech/dz40rgb/keymaps/default/keymap.c b/keyboards/dztech/dz40rgb/keymaps/default/keymap.c index 650c178a7..e4f56f5a8 100644 --- a/keyboards/dztech/dz40rgb/keymaps/default/keymap.c +++ b/keyboards/dztech/dz40rgb/keymaps/default/keymap.c @@ -1,5 +1,4 @@ #include QMK_KEYBOARD_H -extern bool g_suspend_state; #define _LAYER0 0 #define _LAYER1 1 #define _LAYER2 2 @@ -32,7 +31,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -extern led_config_t g_led_config; void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) { if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { diff --git a/keyboards/dztech/dz40rgb/keymaps/split_space/keymap.c b/keyboards/dztech/dz40rgb/keymaps/split_space/keymap.c index 80741b19c..04c31bab1 100644 --- a/keyboards/dztech/dz40rgb/keymaps/split_space/keymap.c +++ b/keyboards/dztech/dz40rgb/keymaps/split_space/keymap.c @@ -1,5 +1,4 @@ #include QMK_KEYBOARD_H -extern bool g_suspend_state; #define _LAYER0 0 #define _LAYER1 1 #define _LAYER2 2 @@ -53,7 +52,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -extern led_config_t g_led_config; void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) { if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { diff --git a/keyboards/dztech/dz60rgb/keymaps/ansi/keymap.c b/keyboards/dztech/dz60rgb/keymaps/ansi/keymap.c index 584f035ef..8633b1836 100644 --- a/keyboards/dztech/dz60rgb/keymaps/ansi/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/ansi/keymap.c @@ -1,5 +1,4 @@ #include QMK_KEYBOARD_H -extern bool g_suspend_state; #define _LAYER0 0 #define _LAYER1 1 #define _LAYER2 2 @@ -38,7 +37,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; -extern led_config_t g_led_config; void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) { if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { diff --git a/keyboards/dztech/dz60rgb/keymaps/default/keymap.c b/keyboards/dztech/dz60rgb/keymaps/default/keymap.c index c0bc1b89b..464d92e02 100644 --- a/keyboards/dztech/dz60rgb/keymaps/default/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/default/keymap.c @@ -1,5 +1,4 @@ #include QMK_KEYBOARD_H -extern bool g_suspend_state; #define _LAYER0 0 #define _LAYER1 1 #define _LAYER2 2 diff --git a/keyboards/dztech/dz60rgb/keymaps/hhkb/keymap.c b/keyboards/dztech/dz60rgb/keymaps/hhkb/keymap.c index 5a7a56801..091343ac3 100644 --- a/keyboards/dztech/dz60rgb/keymaps/hhkb/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/hhkb/keymap.c @@ -1,5 +1,4 @@ #include QMK_KEYBOARD_H -extern bool g_suspend_state; #define _LAYER0 0 #define _LAYER1 1 #define _LAYER2 2 @@ -39,7 +38,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -extern led_config_t g_led_config; void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) { if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { diff --git a/keyboards/dztech/dz60rgb/keymaps/hhkb_iso/keymap.c b/keyboards/dztech/dz60rgb/keymaps/hhkb_iso/keymap.c index 34c1752ff..bc8a6fa36 100644 --- a/keyboards/dztech/dz60rgb/keymaps/hhkb_iso/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/hhkb_iso/keymap.c @@ -1,5 +1,4 @@ #include QMK_KEYBOARD_H -extern bool g_suspend_state; #define _LAYER0 0 #define _LAYER1 1 #define _LAYER2 2 @@ -39,7 +38,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS), }; -extern led_config_t g_led_config; void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) { if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { diff --git a/keyboards/dztech/dz60rgb/keymaps/iso/keymap.c b/keyboards/dztech/dz60rgb/keymaps/iso/keymap.c index 3a90d2f33..61a3a2286 100644 --- a/keyboards/dztech/dz60rgb/keymaps/iso/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/iso/keymap.c @@ -1,5 +1,4 @@ #include QMK_KEYBOARD_H -extern bool g_suspend_state; #define _LAYER0 0 #define _LAYER1 1 #define _LAYER2 2 @@ -38,7 +37,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; -extern led_config_t g_led_config; void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) { if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { diff --git a/keyboards/dztech/dz60rgb/keymaps/matthewrobo/keymap.c b/keyboards/dztech/dz60rgb/keymaps/matthewrobo/keymap.c index 5c725f5dc..600ac8619 100644 --- a/keyboards/dztech/dz60rgb/keymaps/matthewrobo/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/matthewrobo/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -extern bool g_suspend_state; enum dz60rgb_layers { _QWERTY, @@ -26,7 +25,6 @@ enum dz60rgb_keycodes { #define _V_V_V_ KC_TRNS #define LT_CAPS LT(_NAV, KC_CAPS) #define LT_DEL LT(_RGB, KC_DEL) -extern rgb_config_t rgb_matrix_config; extern bool autoshift_enabled; #define MT_SLSH RSFT_T(KC_SLSH) #define MT_APP RALT_T(KC_APP) diff --git a/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c b/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c index a6d1e226b..a7f1dd73e 100644 --- a/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c @@ -1,5 +1,4 @@ #include QMK_KEYBOARD_H -extern bool g_suspend_state; #define _LAYER0 0 #define _LAYER1 1 #define _LAYER2 2 @@ -50,8 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -extern led_config_t g_led_config; -void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { +void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) { if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { rgb_matrix_set_color( i, red, green, blue ); diff --git a/keyboards/dztech/dz65rgb/config.h b/keyboards/dztech/dz65rgb/config.h index 8ef9c2390..f4c1f1114 100644 --- a/keyboards/dztech/dz65rgb/config.h +++ b/keyboards/dztech/dz65rgb/config.h @@ -26,4 +26,4 @@ #define DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 35 #define DRIVER_2_LED_TOTAL 33 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/dztech/dz65rgb/keymaps/default/keymap.c b/keyboards/dztech/dz65rgb/keymaps/default/keymap.c index bce9118f8..dae08a48c 100644 --- a/keyboards/dztech/dz65rgb/keymaps/default/keymap.c +++ b/keyboards/dztech/dz65rgb/keymaps/default/keymap.c @@ -1,5 +1,4 @@ #include QMK_KEYBOARD_H -extern bool g_suspend_state; #define _LAYER0 0 #define _LAYER1 1 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h index cbf7f8aaa..d22836bd8 100644 --- a/keyboards/ergodox_ez/config.h +++ b/keyboards/ergodox_ez/config.h @@ -107,7 +107,7 @@ along with this program. If not, see . #define DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 24 #define DRIVER_2_LED_TOTAL 24 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) // #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF /* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */ diff --git a/keyboards/hs60/v1/config.h b/keyboards/hs60/v1/config.h index 528f08bb9..ee546f3f1 100644 --- a/keyboards/hs60/v1/config.h +++ b/keyboards/hs60/v1/config.h @@ -134,4 +134,4 @@ along with this program. If not, see . #define DRIVER_2_LED_TOTAL 32 #endif -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c b/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c index b4339a4d4..2823292e6 100644 --- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c @@ -1,5 +1,4 @@ #include QMK_KEYBOARD_H -extern bool g_suspend_state; enum ctrl_layers { _QWERTY, @@ -31,7 +30,6 @@ enum ctrl_keycodes { #define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode #define LT_CAPS LT(_NAV, KC_CAPS) #define _V_V_V_ KC_TRNS -extern rgb_config_t rgb_matrix_config; extern bool autoshift_enabled; diff --git a/keyboards/planck/keymaps/tom/keymap.c b/keyboards/planck/keymaps/tom/keymap.c index 0ffff4e69..e6a1411ee 100644 --- a/keyboards/planck/keymaps/tom/keymap.c +++ b/keyboards/planck/keymaps/tom/keymap.c @@ -224,10 +224,6 @@ bool music_mask_user(uint16_t keycode) { } } -#ifdef RGB_MATRIX_ENABLE -extern led_config_t g_led_config; -#endif - void rgb_matrix_indicators_user(void) { #ifdef RGB_MATRIX_ENABLE switch (biton32(layer_state)) { diff --git a/keyboards/planck/light/config.h b/keyboards/planck/light/config.h index 17c015ed0..c7bc9cb1a 100644 --- a/keyboards/planck/light/config.h +++ b/keyboards/planck/light/config.h @@ -39,7 +39,7 @@ #define DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 25 #define DRIVER_2_LED_TOTAL 24 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) #endif diff --git a/keyboards/sol/keymaps/xulkal/keymap.c b/keyboards/sol/keymaps/xulkal/keymap.c index 111e8aa32..3bbd57f70 100644 --- a/keyboards/sol/keymaps/xulkal/keymap.c +++ b/keyboards/sol/keymaps/xulkal/keymap.c @@ -92,7 +92,6 @@ static void render_logo(void) { oled_write_P(sol_logo, false); } -extern rgb_config_t rgb_matrix_config; static void render_status(void) { // Render to mode icon diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index 3cfce966b..08689cf3d 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c @@ -24,10 +24,6 @@ along with this program. If not, see . # define UC(x) KC_NO #endif -#ifdef RGB_MATRIX_ENABLE -extern bool g_suspend_state; -extern rgb_config_t rgb_matrix_config; -#endif extern userspace_config_t userspace_config; enum more_custom_keycodes { @@ -403,7 +399,6 @@ void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); } -extern led_config_t g_led_config; void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) { if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index e8dc185a1..9b0c2d794 100644 --- a/layouts/community/ortho_4x12/drashna/keymap.c +++ b/layouts/community/ortho_4x12/drashna/keymap.c @@ -17,10 +17,6 @@ #include QMK_KEYBOARD_H #include "drashna.h" -#ifdef RGB_MATRIX_ENABLE -extern bool g_suspend_state; -extern rgb_config_t rgb_matrix_config; -#endif #ifdef RGBLIGHT_ENABLE extern rgblight_config_t rgblight_config; #endif @@ -184,7 +180,6 @@ void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); } -extern led_config_t g_led_config; void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) { if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { diff --git a/quantum/quantum.c b/quantum/quantum.c index d4fa7f2ef..473ead65f 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -258,7 +258,7 @@ bool process_record_quantum(keyrecord_t *record) { #ifdef HAPTIC_ENABLE process_haptic(keycode, record) && #endif //HAPTIC_ENABLE - #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_KEYREACTIVE_ENABLED) + #if defined(RGB_MATRIX_ENABLE) process_rgb_matrix(keycode, record) && #endif process_record_kb(keycode, record) && diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index 92a94df80..9b9932df5 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c @@ -26,41 +26,23 @@ #include "lib/lib8tion/lib8tion.h" -#include "rgb_matrix_animations/solid_color_anim.h" -#include "rgb_matrix_animations/alpha_mods_anim.h" -#include "rgb_matrix_animations/dual_beacon_anim.h" -#include "rgb_matrix_animations/gradient_up_down_anim.h" -#include "rgb_matrix_animations/raindrops_anim.h" -#include "rgb_matrix_animations/cycle_all_anim.h" -#include "rgb_matrix_animations/cycle_left_right_anim.h" -#include "rgb_matrix_animations/cycle_up_down_anim.h" -#include "rgb_matrix_animations/rainbow_beacon_anim.h" -#include "rgb_matrix_animations/rainbow_pinwheels_anim.h" -#include "rgb_matrix_animations/rainbow_moving_chevron_anim.h" -#include "rgb_matrix_animations/jellybean_raindrops_anim.h" -#include "rgb_matrix_animations/typing_heatmap_anim.h" -#include "rgb_matrix_animations/digital_rain_anim.h" -#include "rgb_matrix_animations/solid_reactive_simple_anim.h" -#include "rgb_matrix_animations/solid_reactive_anim.h" -#include "rgb_matrix_animations/solid_reactive_wide.h" -#include "rgb_matrix_animations/solid_reactive_cross.h" -#include "rgb_matrix_animations/solid_reactive_nexus.h" -#include "rgb_matrix_animations/splash_anim.h" -#include "rgb_matrix_animations/solid_splash_anim.h" -#include "rgb_matrix_animations/breathing_anim.h" +// ------------------------------------------ +// -----Begin rgb effect includes macros----- +#define RGB_MATRIX_EFFECT(name) +#define RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#if defined(RGB_MATRIX_CUSTOM_KB) || defined(RGB_MATRIX_CUSTOM_USER) - #define RGB_MATRIX_CUSTOM_EFFECT_IMPLS - #define RGB_MATRIX_EFFECT(name, ...) - #ifdef RGB_MATRIX_CUSTOM_KB - #include "rgb_matrix_kb.inc" - #endif - #ifdef RGB_MATRIX_CUSTOM_USER - #include "rgb_matrix_user.inc" - #endif - #undef RGB_MATRIX_EFFECT - #undef RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#include "rgb_matrix_animations/rgb_matrix_effects.inc" +#ifdef RGB_MATRIX_CUSTOM_KB + #include "rgb_matrix_kb.inc" #endif +#ifdef RGB_MATRIX_CUSTOM_USER + #include "rgb_matrix_user.inc" +#endif + +#undef RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#undef RGB_MATRIX_EFFECT +// -----End rgb effect includes macros------- +// ------------------------------------------ #ifndef RGB_DISABLE_AFTER_TIMEOUT #define RGB_DISABLE_AFTER_TIMEOUT 0 @@ -106,7 +88,6 @@ bool g_suspend_state = false; -extern led_config_t g_led_config; rgb_config_t rgb_matrix_config; rgb_counters_t g_rgb_counters; @@ -319,145 +300,14 @@ static void rgb_task_render(uint8_t effect) { rendering = rgb_matrix_none(&rgb_effect_params); break; - case RGB_MATRIX_SOLID_COLOR: - rendering = rgb_matrix_solid_color(&rgb_effect_params); // Max 1ms Avg 0ms +// --------------------------------------------- +// -----Begin rgb effect switch case macros----- +#define RGB_MATRIX_EFFECT(name, ...) \ + case RGB_MATRIX_##name: \ + rendering = name(&rgb_effect_params); \ break; -#ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS - case RGB_MATRIX_ALPHAS_MODS: - rendering = rgb_matrix_alphas_mods(&rgb_effect_params); // Max 2ms Avg 1ms - break; -#endif // DISABLE_RGB_MATRIX_ALPHAS_MODS -#ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN - case RGB_MATRIX_GRADIENT_UP_DOWN: - rendering = rgb_matrix_gradient_up_down(&rgb_effect_params); // Max 4ms Avg 3ms - break; -#endif // DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#ifndef DISABLE_RGB_MATRIX_BREATHING - case RGB_MATRIX_BREATHING: - rendering = rgb_matrix_breathing(&rgb_effect_params); // Max 1ms Avg 0ms - break; -#endif // DISABLE_RGB_MATRIX_BREATHING -#ifndef DISABLE_RGB_MATRIX_CYCLE_ALL - case RGB_MATRIX_CYCLE_ALL: - rendering = rgb_matrix_cycle_all(&rgb_effect_params); // Max 4ms Avg 3ms - break; -#endif // DISABLE_RGB_MATRIX_CYCLE_ALL -#ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT - case RGB_MATRIX_CYCLE_LEFT_RIGHT: - rendering = rgb_matrix_cycle_left_right(&rgb_effect_params); // Max 4ms Avg 3ms - break; -#endif // DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -#ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN - case RGB_MATRIX_CYCLE_UP_DOWN: - rendering = rgb_matrix_cycle_up_down(&rgb_effect_params); // Max 4ms Avg 3ms - break; -#endif // DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -#ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON - case RGB_MATRIX_RAINBOW_MOVING_CHEVRON: - rendering = rgb_matrix_rainbow_moving_chevron(&rgb_effect_params); // Max 4ms Avg 3ms - break; -#endif // DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -#ifndef DISABLE_RGB_MATRIX_DUAL_BEACON - case RGB_MATRIX_DUAL_BEACON: - rendering = rgb_matrix_dual_beacon(&rgb_effect_params); // Max 4ms Avg 3ms - break; -#endif // DISABLE_RGB_MATRIX_DUAL_BEACON -#ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON - case RGB_MATRIX_RAINBOW_BEACON: - rendering = rgb_matrix_rainbow_beacon(&rgb_effect_params); // Max 4ms Avg 3ms - break; -#endif // DISABLE_RGB_MATRIX_RAINBOW_BEACON -#ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS - case RGB_MATRIX_RAINBOW_PINWHEELS: - rendering = rgb_matrix_rainbow_pinwheels(&rgb_effect_params); // Max 4ms Avg 3ms - break; -#endif // DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -#ifndef DISABLE_RGB_MATRIX_RAINDROPS - case RGB_MATRIX_RAINDROPS: - rendering = rgb_matrix_raindrops(&rgb_effect_params); // Max 1ms Avg 0ms - break; -#endif // DISABLE_RGB_MATRIX_RAINDROPS -#ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS - case RGB_MATRIX_JELLYBEAN_RAINDROPS: - rendering = rgb_matrix_jellybean_raindrops(&rgb_effect_params); // Max 1ms Avg 0ms - break; -#endif // DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS - -#ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS -#ifndef DISABLE_RGB_MATRIX_TYPING_HEATMAP - case RGB_MATRIX_TYPING_HEATMAP: - rendering = rgb_matrix_typing_heatmap(&rgb_effect_params); // Max 4ms Avg 3ms - break; -#endif // DISABLE_RGB_MATRIX_TYPING_HEATMAP -#ifndef DISABLE_RGB_MATRIX_DIGITAL_RAIN - case RGB_MATRIX_DIGITAL_RAIN: - rendering = rgb_matrix_digital_rain(&rgb_effect_params); // Max 9ms Avg 8ms | this is expensive, fix it - break; -#endif // DISABLE_RGB_MATRIX_DIGITAL_RAIN -#endif // RGB_MATRIX_FRAMEBUFFER_EFFECTS - -#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED -#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE - case RGB_MATRIX_SOLID_REACTIVE_SIMPLE: - rendering = rgb_matrix_solid_reactive_simple(&rgb_effect_params);// Max 4ms Avg 3ms - break; -#endif -#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE - case RGB_MATRIX_SOLID_REACTIVE: - rendering = rgb_matrix_solid_reactive(&rgb_effect_params); // Max 4ms Avg 3ms - break; -#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE -#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE - case RGB_MATRIX_SOLID_REACTIVE_WIDE: - rendering = rgb_matrix_solid_reactive_wide(&rgb_effect_params); // Max ?? ms Avg ?? ms - break; -#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE - case RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE: - rendering = rgb_matrix_solid_reactive_multiwide(&rgb_effect_params); // Max ?? ms Avg ?? ms - break; -#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS - case RGB_MATRIX_SOLID_REACTIVE_CROSS: - rendering = rgb_matrix_solid_reactive_cross(&rgb_effect_params); // Max ?? ms Avg ?? ms - break; -#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS - case RGB_MATRIX_SOLID_REACTIVE_MULTICROSS: - rendering = rgb_matrix_solid_reactive_multicross(&rgb_effect_params); // Max ?? ms Avg ?? ms - break; -#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS - case RGB_MATRIX_SOLID_REACTIVE_NEXUS: - rendering = rgb_matrix_solid_reactive_nexus(&rgb_effect_params); // Max ?? ms Avg ?? ms - break; -#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS - case RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS: - rendering = rgb_matrix_solid_reactive_multinexus(&rgb_effect_params); // Max ?? ms Avg ?? ms - break; -#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#ifndef DISABLE_RGB_MATRIX_SPLASH - case RGB_MATRIX_SPLASH: - rendering = rgb_matrix_splash(&rgb_effect_params); // Max 5ms Avg 3ms - break; -#endif // DISABLE_RGB_MATRIX_SPLASH -#ifndef DISABLE_RGB_MATRIX_MULTISPLASH - case RGB_MATRIX_MULTISPLASH: - rendering = rgb_matrix_multisplash(&rgb_effect_params); // Max 10ms Avg 5ms - break; -#endif // DISABLE_RGB_MATRIX_MULTISPLASH -#ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH - case RGB_MATRIX_SOLID_SPLASH: - rendering = rgb_matrix_solid_splash(&rgb_effect_params); // Max 5ms Avg 3ms - break; -#endif // DISABLE_RGB_MATRIX_SOLID_SPLASH -#ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH - case RGB_MATRIX_SOLID_MULTISPLASH: - rendering = rgb_matrix_solid_multisplash(&rgb_effect_params); // Max 10ms Avg 5ms - break; -#endif // DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -#endif // RGB_MATRIX_KEYREACTIVE_ENABLED +#include "rgb_matrix_animations/rgb_matrix_effects.inc" +#undef RGB_MATRIX_EFFECT #if defined(RGB_MATRIX_CUSTOM_KB) || defined(RGB_MATRIX_CUSTOM_USER) #define RGB_MATRIX_EFFECT(name, ...) \ @@ -472,6 +322,8 @@ static void rgb_task_render(uint8_t effect) { #endif #undef RGB_MATRIX_EFFECT #endif +// -----End rgb effect switch case macros------- +// --------------------------------------------- // Factory default magic value case UINT8_MAX: { diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix.h index add0715d9..96a8b7662 100644 --- a/quantum/rgb_matrix.h +++ b/quantum/rgb_matrix.h @@ -64,89 +64,12 @@ typedef struct enum rgb_matrix_effects { RGB_MATRIX_NONE = 0, - RGB_MATRIX_SOLID_COLOR = 1, -#ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS - RGB_MATRIX_ALPHAS_MODS, -#endif // DISABLE_RGB_MATRIX_ALPHAS_MODS -#ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN - RGB_MATRIX_GRADIENT_UP_DOWN, -#endif // DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#ifndef DISABLE_RGB_MATRIX_BREATHING - RGB_MATRIX_BREATHING, -#endif // DISABLE_RGB_MATRIX_BREATHING -#ifndef DISABLE_RGB_MATRIX_CYCLE_ALL - RGB_MATRIX_CYCLE_ALL, -#endif // DISABLE_RGB_MATRIX_CYCLE_ALL -#ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT - RGB_MATRIX_CYCLE_LEFT_RIGHT, -#endif // DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -#ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN - RGB_MATRIX_CYCLE_UP_DOWN, -#endif // DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -#ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON - RGB_MATRIX_RAINBOW_MOVING_CHEVRON, -#endif // DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -#ifndef DISABLE_RGB_MATRIX_DUAL_BEACON - RGB_MATRIX_DUAL_BEACON, -#endif // DISABLE_RGB_MATRIX_DUAL_BEACON -#ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON - RGB_MATRIX_RAINBOW_BEACON, -#endif // DISABLE_RGB_MATRIX_RAINBOW_BEACON -#ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS - RGB_MATRIX_RAINBOW_PINWHEELS, -#endif // DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -#ifndef DISABLE_RGB_MATRIX_RAINDROPS - RGB_MATRIX_RAINDROPS, -#endif // DISABLE_RGB_MATRIX_RAINDROPS -#ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS - RGB_MATRIX_JELLYBEAN_RAINDROPS, -#endif // DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -#ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS -#ifndef DISABLE_RGB_MATRIX_TYPING_HEATMAP - RGB_MATRIX_TYPING_HEATMAP, -#endif // DISABLE_RGB_MATRIX_TYPING_HEATMAP -#ifndef DISABLE_RGB_MATRIX_DIGITAL_RAIN - RGB_MATRIX_DIGITAL_RAIN, -#endif // DISABLE_RGB_MATRIX_DIGITAL_RAIN -#endif // RGB_MATRIX_FRAMEBUFFER_EFFECTS -#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED -#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE - RGB_MATRIX_SOLID_REACTIVE_SIMPLE, -#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE - RGB_MATRIX_SOLID_REACTIVE, -#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE -#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE - RGB_MATRIX_SOLID_REACTIVE_WIDE, -#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE - RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE, -#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS - RGB_MATRIX_SOLID_REACTIVE_CROSS, -#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS - RGB_MATRIX_SOLID_REACTIVE_MULTICROSS, -#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS - RGB_MATRIX_SOLID_REACTIVE_NEXUS, -#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS - RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS, -#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#ifndef DISABLE_RGB_MATRIX_SPLASH - RGB_MATRIX_SPLASH, -#endif // DISABLE_RGB_MATRIX_SPLASH -#ifndef DISABLE_RGB_MATRIX_MULTISPLASH - RGB_MATRIX_MULTISPLASH, -#endif // DISABLE_RGB_MATRIX_MULTISPLASH -#ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH - RGB_MATRIX_SOLID_SPLASH, -#endif // DISABLE_RGB_MATRIX_SOLID_SPLASH -#ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH - RGB_MATRIX_SOLID_MULTISPLASH, -#endif // DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -#endif // RGB_MATRIX_KEYREACTIVE_ENABLED + +// -------------------------------------- +// -----Begin rgb effect enum macros----- +#define RGB_MATRIX_EFFECT(name, ...) RGB_MATRIX_##name, +#include "rgb_matrix_animations/rgb_matrix_effects.inc" +#undef RGB_MATRIX_EFFECT #if defined(RGB_MATRIX_CUSTOM_KB) || defined(RGB_MATRIX_CUSTOM_USER) #define RGB_MATRIX_EFFECT(name, ...) RGB_MATRIX_CUSTOM_##name, @@ -158,6 +81,8 @@ enum rgb_matrix_effects { #endif #undef RGB_MATRIX_EFFECT #endif +// -------------------------------------- +// -----End rgb effect enum macros------- RGB_MATRIX_EFFECT_MAX }; @@ -257,4 +182,16 @@ typedef struct { extern const rgb_matrix_driver_t rgb_matrix_driver; +extern rgb_config_t rgb_matrix_config; + +extern bool g_suspend_state; +extern rgb_counters_t g_rgb_counters; +extern led_config_t g_led_config; +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED +extern last_hit_t g_last_hit_tracker; +#endif +#ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS +extern uint8_t rgb_frame_buffer[MATRIX_ROWS][MATRIX_COLS]; +#endif + #endif diff --git a/quantum/rgb_matrix_animations/alpha_mods_anim.h b/quantum/rgb_matrix_animations/alpha_mods_anim.h index d7f6f4655..0fee19aef 100644 --- a/quantum/rgb_matrix_animations/alpha_mods_anim.h +++ b/quantum/rgb_matrix_animations/alpha_mods_anim.h @@ -1,11 +1,9 @@ -#pragma once #ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS - -extern led_config_t g_led_config; -extern rgb_config_t rgb_matrix_config; +RGB_MATRIX_EFFECT(ALPHAS_MODS) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS // alphas = color1, mods = color2 -bool rgb_matrix_alphas_mods(effect_params_t* params) { +bool ALPHAS_MODS(effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; @@ -24,4 +22,5 @@ bool rgb_matrix_alphas_mods(effect_params_t* params) { return led_max < DRIVER_LED_TOTAL; } +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS #endif // DISABLE_RGB_MATRIX_ALPHAS_MODS diff --git a/quantum/rgb_matrix_animations/breathing_anim.h b/quantum/rgb_matrix_animations/breathing_anim.h index 54d60f927..c357b5303 100644 --- a/quantum/rgb_matrix_animations/breathing_anim.h +++ b/quantum/rgb_matrix_animations/breathing_anim.h @@ -1,10 +1,8 @@ -#pragma once #ifndef DISABLE_RGB_MATRIX_BREATHING +RGB_MATRIX_EFFECT(BREATHING) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -extern rgb_counters_t g_rgb_counters; -extern rgb_config_t rgb_matrix_config; - -bool rgb_matrix_breathing(effect_params_t* params) { +bool BREATHING(effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); uint16_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 8); @@ -18,4 +16,5 @@ bool rgb_matrix_breathing(effect_params_t* params) { return led_max < DRIVER_LED_TOTAL; } +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS #endif // DISABLE_RGB_MATRIX_BREATHING diff --git a/quantum/rgb_matrix_animations/cycle_all_anim.h b/quantum/rgb_matrix_animations/cycle_all_anim.h index e93798f90..e6319cad7 100644 --- a/quantum/rgb_matrix_animations/cycle_all_anim.h +++ b/quantum/rgb_matrix_animations/cycle_all_anim.h @@ -1,11 +1,8 @@ -#pragma once #ifndef DISABLE_RGB_MATRIX_CYCLE_ALL +RGB_MATRIX_EFFECT(CYCLE_ALL) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -extern rgb_counters_t g_rgb_counters; -extern led_config_t g_led_config; -extern rgb_config_t rgb_matrix_config; - -bool rgb_matrix_cycle_all(effect_params_t* params) { +bool CYCLE_ALL(effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; @@ -18,4 +15,5 @@ bool rgb_matrix_cycle_all(effect_params_t* params) { return led_max < DRIVER_LED_TOTAL; } +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS #endif // DISABLE_RGB_MATRIX_CYCLE_ALL diff --git a/quantum/rgb_matrix_animations/cycle_left_right_anim.h b/quantum/rgb_matrix_animations/cycle_left_right_anim.h index 4b09d5826..d9a00530a 100644 --- a/quantum/rgb_matrix_animations/cycle_left_right_anim.h +++ b/quantum/rgb_matrix_animations/cycle_left_right_anim.h @@ -1,11 +1,8 @@ -#pragma once #ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +RGB_MATRIX_EFFECT(CYCLE_LEFT_RIGHT) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -extern rgb_counters_t g_rgb_counters; -extern led_config_t g_led_config; -extern rgb_config_t rgb_matrix_config; - -bool rgb_matrix_cycle_left_right(effect_params_t* params) { +bool CYCLE_LEFT_RIGHT(effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; @@ -19,4 +16,5 @@ bool rgb_matrix_cycle_left_right(effect_params_t* params) { return led_max < DRIVER_LED_TOTAL; } +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS #endif // DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT diff --git a/quantum/rgb_matrix_animations/cycle_up_down_anim.h b/quantum/rgb_matrix_animations/cycle_up_down_anim.h index 403214bb7..f2b31d9da 100644 --- a/quantum/rgb_matrix_animations/cycle_up_down_anim.h +++ b/quantum/rgb_matrix_animations/cycle_up_down_anim.h @@ -1,11 +1,8 @@ -#pragma once #ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN +RGB_MATRIX_EFFECT(CYCLE_UP_DOWN) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -extern rgb_counters_t g_rgb_counters; -extern led_config_t g_led_config; -extern rgb_config_t rgb_matrix_config; - -bool rgb_matrix_cycle_up_down(effect_params_t* params) { +bool CYCLE_UP_DOWN(effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; @@ -19,4 +16,5 @@ bool rgb_matrix_cycle_up_down(effect_params_t* params) { return led_max < DRIVER_LED_TOTAL; } +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS #endif // DISABLE_RGB_MATRIX_CYCLE_UP_DOWN diff --git a/quantum/rgb_matrix_animations/digital_rain_anim.h b/quantum/rgb_matrix_animations/digital_rain_anim.h index 6ccba392a..982399cbd 100644 --- a/quantum/rgb_matrix_animations/digital_rain_anim.h +++ b/quantum/rgb_matrix_animations/digital_rain_anim.h @@ -1,14 +1,13 @@ -#pragma once #if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_DIGITAL_RAIN) +RGB_MATRIX_EFFECT(DIGITAL_RAIN) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS #ifndef RGB_DIGITAL_RAIN_DROPS // lower the number for denser effect/wider keyboard #define RGB_DIGITAL_RAIN_DROPS 24 #endif -extern uint8_t rgb_frame_buffer[MATRIX_ROWS][MATRIX_COLS]; - -bool rgb_matrix_digital_rain(effect_params_t* params) { +bool DIGITAL_RAIN(effect_params_t* params) { // algorithm ported from https://github.com/tremby/Kaleidoscope-LEDEffect-DigitalRain const uint8_t drop_ticks = 28; const uint8_t pure_green_intensity = 0xd0; @@ -19,7 +18,7 @@ bool rgb_matrix_digital_rain(effect_params_t* params) { if (params->init) { rgb_matrix_set_color_all(0, 0, 0); - memset(rgb_frame_buffer, 0, sizeof rgb_frame_buffer); + memset(rgb_frame_buffer, 0, sizeof(rgb_frame_buffer)); drop = 0; } @@ -28,11 +27,11 @@ bool rgb_matrix_digital_rain(effect_params_t* params) { if (row == 0 && drop == 0 && rand() < RAND_MAX / RGB_DIGITAL_RAIN_DROPS) { // top row, pixels have just fallen and we're // making a new rain drop in this column - rgb_frame_buffer[col][row] = max_intensity; + rgb_frame_buffer[row][col] = max_intensity; } - else if (rgb_frame_buffer[col][row] > 0 && rgb_frame_buffer[col][row] < max_intensity) { + else if (rgb_frame_buffer[row][col] > 0 && rgb_frame_buffer[row][col] < max_intensity) { // neither fully bright nor dark, decay it - rgb_frame_buffer[col][row]--; + rgb_frame_buffer[row][col]--; } // set the pixel colour uint8_t led[LED_HITS_TO_REMEMBER]; @@ -40,12 +39,12 @@ bool rgb_matrix_digital_rain(effect_params_t* params) { // TODO: multiple leds are supported mapped to the same row/column if (led_count > 0) { - if (rgb_frame_buffer[col][row] > pure_green_intensity) { - const uint8_t boost = (uint8_t) ((uint16_t) max_brightness_boost * (rgb_frame_buffer[col][row] - pure_green_intensity) / (max_intensity - pure_green_intensity)); + if (rgb_frame_buffer[row][col] > pure_green_intensity) { + const uint8_t boost = (uint8_t) ((uint16_t) max_brightness_boost * (rgb_frame_buffer[row][col] - pure_green_intensity) / (max_intensity - pure_green_intensity)); rgb_matrix_set_color(led[0], boost, max_intensity, boost); } else { - const uint8_t green = (uint8_t) ((uint16_t) max_intensity * rgb_frame_buffer[col][row] / pure_green_intensity); + const uint8_t green = (uint8_t) ((uint16_t) max_intensity * rgb_frame_buffer[row][col] / pure_green_intensity); rgb_matrix_set_color(led[0], 0, green, 0); } } @@ -58,15 +57,15 @@ bool rgb_matrix_digital_rain(effect_params_t* params) { for (uint8_t row = MATRIX_ROWS - 1; row > 0; row--) { for (uint8_t col = 0; col < MATRIX_COLS; col++) { // if ths is on the bottom row and bright allow decay - if (row == MATRIX_ROWS - 1 && rgb_frame_buffer[col][row] == max_intensity) { - rgb_frame_buffer[col][row]--; + if (row == MATRIX_ROWS - 1 && rgb_frame_buffer[row][col] == max_intensity) { + rgb_frame_buffer[row][col]--; } // check if the pixel above is bright - if (rgb_frame_buffer[col][row - 1] == max_intensity) { + if (rgb_frame_buffer[row - 1][col] == max_intensity) { // allow old bright pixel to decay - rgb_frame_buffer[col][row - 1]--; + rgb_frame_buffer[row - 1][col]--; // make this pixel bright - rgb_frame_buffer[col][row] = max_intensity; + rgb_frame_buffer[row][col] = max_intensity; } } } @@ -74,4 +73,5 @@ bool rgb_matrix_digital_rain(effect_params_t* params) { return false; } +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS #endif // defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_DIGITAL_RAIN) diff --git a/quantum/rgb_matrix_animations/dual_beacon_anim.h b/quantum/rgb_matrix_animations/dual_beacon_anim.h index dcb594029..f853f71ec 100644 --- a/quantum/rgb_matrix_animations/dual_beacon_anim.h +++ b/quantum/rgb_matrix_animations/dual_beacon_anim.h @@ -1,11 +1,8 @@ -#pragma once #ifndef DISABLE_RGB_MATRIX_DUAL_BEACON +RGB_MATRIX_EFFECT(DUAL_BEACON) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -extern rgb_counters_t g_rgb_counters; -extern led_config_t g_led_config; -extern rgb_config_t rgb_matrix_config; - -bool rgb_matrix_dual_beacon(effect_params_t* params) { +bool DUAL_BEACON(effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; @@ -21,4 +18,5 @@ bool rgb_matrix_dual_beacon(effect_params_t* params) { return led_max < DRIVER_LED_TOTAL; } +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS #endif // DISABLE_RGB_MATRIX_DUAL_BEACON diff --git a/quantum/rgb_matrix_animations/gradient_up_down_anim.h b/quantum/rgb_matrix_animations/gradient_up_down_anim.h index 7a6ed1421..d9fcd4d98 100644 --- a/quantum/rgb_matrix_animations/gradient_up_down_anim.h +++ b/quantum/rgb_matrix_animations/gradient_up_down_anim.h @@ -1,10 +1,8 @@ -#pragma once #ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +RGB_MATRIX_EFFECT(GRADIENT_UP_DOWN) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -extern led_config_t g_led_config; -extern rgb_config_t rgb_matrix_config; - -bool rgb_matrix_gradient_up_down(effect_params_t* params) { +bool GRADIENT_UP_DOWN(effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; @@ -19,4 +17,6 @@ bool rgb_matrix_gradient_up_down(effect_params_t* params) { } return led_max < DRIVER_LED_TOTAL; } + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS #endif // DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN diff --git a/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h b/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h index 5ea971435..8f0b1bd91 100644 --- a/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h +++ b/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h @@ -1,9 +1,6 @@ -#pragma once #ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS - -extern rgb_counters_t g_rgb_counters; -extern led_config_t g_led_config; -extern rgb_config_t rgb_matrix_config; +RGB_MATRIX_EFFECT(JELLYBEAN_RAINDROPS) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS static void jellybean_raindrops_set_color(int i, effect_params_t* params) { if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return; @@ -12,7 +9,7 @@ static void jellybean_raindrops_set_color(int i, effect_params_t* params) { rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } -bool rgb_matrix_jellybean_raindrops(effect_params_t* params) { +bool JELLYBEAN_RAINDROPS(effect_params_t* params) { if (!params->init) { // Change one LED every tick, make sure speed is not 0 if (scale16by8(g_rgb_counters.tick, qadd8(rgb_matrix_config.speed, 16)) % 5 == 0) { @@ -28,4 +25,5 @@ bool rgb_matrix_jellybean_raindrops(effect_params_t* params) { return led_max < DRIVER_LED_TOTAL; } +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS #endif // DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS diff --git a/quantum/rgb_matrix_animations/rainbow_beacon_anim.h b/quantum/rgb_matrix_animations/rainbow_beacon_anim.h index d46288073..a0e0f814c 100644 --- a/quantum/rgb_matrix_animations/rainbow_beacon_anim.h +++ b/quantum/rgb_matrix_animations/rainbow_beacon_anim.h @@ -1,11 +1,8 @@ -#pragma once #ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON +RGB_MATRIX_EFFECT(RAINBOW_BEACON) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -extern rgb_counters_t g_rgb_counters; -extern led_config_t g_led_config; -extern rgb_config_t rgb_matrix_config; - -bool rgb_matrix_rainbow_beacon(effect_params_t* params) { +bool RAINBOW_BEACON(effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; @@ -21,4 +18,5 @@ bool rgb_matrix_rainbow_beacon(effect_params_t* params) { return led_max < DRIVER_LED_TOTAL; } +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS #endif // DISABLE_RGB_MATRIX_RAINBOW_BEACON diff --git a/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h b/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h index 3b7d9689f..39352b0c1 100644 --- a/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h +++ b/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h @@ -1,11 +1,8 @@ -#pragma once #ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +RGB_MATRIX_EFFECT(RAINBOW_MOVING_CHEVRON) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -extern rgb_counters_t g_rgb_counters; -extern led_config_t g_led_config; -extern rgb_config_t rgb_matrix_config; - -bool rgb_matrix_rainbow_moving_chevron(effect_params_t* params) { +bool RAINBOW_MOVING_CHEVRON(effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; @@ -19,4 +16,5 @@ bool rgb_matrix_rainbow_moving_chevron(effect_params_t* params) { return led_max < DRIVER_LED_TOTAL; } +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS #endif // DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON diff --git a/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h b/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h index e92f35176..275aaa48d 100644 --- a/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h +++ b/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h @@ -1,11 +1,8 @@ -#pragma once #ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS +RGB_MATRIX_EFFECT(PINWHEELS) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -extern rgb_counters_t g_rgb_counters; -extern led_config_t g_led_config; -extern rgb_config_t rgb_matrix_config; - -bool rgb_matrix_rainbow_pinwheels(effect_params_t* params) { +bool PINWHEELS(effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; @@ -21,4 +18,5 @@ bool rgb_matrix_rainbow_pinwheels(effect_params_t* params) { return led_max < DRIVER_LED_TOTAL; } +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS #endif // DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS diff --git a/quantum/rgb_matrix_animations/raindrops_anim.h b/quantum/rgb_matrix_animations/raindrops_anim.h index 4ce1d65e5..09d0d1df8 100644 --- a/quantum/rgb_matrix_animations/raindrops_anim.h +++ b/quantum/rgb_matrix_animations/raindrops_anim.h @@ -1,10 +1,6 @@ -#pragma once #ifndef DISABLE_RGB_MATRIX_RAINDROPS -#include "rgb_matrix_types.h" - -extern rgb_counters_t g_rgb_counters; -extern led_config_t g_led_config; -extern rgb_config_t rgb_matrix_config; +RGB_MATRIX_EFFECT(RAINDROPS) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS static void raindrops_set_color(int i, effect_params_t* params) { if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return; @@ -23,7 +19,7 @@ static void raindrops_set_color(int i, effect_params_t* params) { rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } -bool rgb_matrix_raindrops(effect_params_t* params) { +bool RAINDROPS(effect_params_t* params) { if (!params->init) { // Change one LED every tick, make sure speed is not 0 if (scale16by8(g_rgb_counters.tick, qadd8(rgb_matrix_config.speed, 16)) % 10 == 0) { @@ -39,4 +35,5 @@ bool rgb_matrix_raindrops(effect_params_t* params) { return led_max < DRIVER_LED_TOTAL; } +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS #endif // DISABLE_RGB_MATRIX_RAINDROPS diff --git a/quantum/rgb_matrix_animations/rgb_matrix_effects.inc b/quantum/rgb_matrix_animations/rgb_matrix_effects.inc new file mode 100644 index 000000000..9bc645461 --- /dev/null +++ b/quantum/rgb_matrix_animations/rgb_matrix_effects.inc @@ -0,0 +1,23 @@ +// Add your new core rgb matrix effect here, order determins enum order, requires "rgb_matrix_animations/ directory +#include "rgb_matrix_animations/solid_color_anim.h" +#include "rgb_matrix_animations/alpha_mods_anim.h" +#include "rgb_matrix_animations/gradient_up_down_anim.h" +#include "rgb_matrix_animations/breathing_anim.h" +#include "rgb_matrix_animations/cycle_all_anim.h" +#include "rgb_matrix_animations/cycle_left_right_anim.h" +#include "rgb_matrix_animations/cycle_up_down_anim.h" +#include "rgb_matrix_animations/rainbow_moving_chevron_anim.h" +#include "rgb_matrix_animations/dual_beacon_anim.h" +#include "rgb_matrix_animations/rainbow_beacon_anim.h" +#include "rgb_matrix_animations/rainbow_pinwheels_anim.h" +#include "rgb_matrix_animations/raindrops_anim.h" +#include "rgb_matrix_animations/jellybean_raindrops_anim.h" +#include "rgb_matrix_animations/typing_heatmap_anim.h" +#include "rgb_matrix_animations/digital_rain_anim.h" +#include "rgb_matrix_animations/solid_reactive_simple_anim.h" +#include "rgb_matrix_animations/solid_reactive_anim.h" +#include "rgb_matrix_animations/solid_reactive_wide.h" +#include "rgb_matrix_animations/solid_reactive_cross.h" +#include "rgb_matrix_animations/solid_reactive_nexus.h" +#include "rgb_matrix_animations/splash_anim.h" +#include "rgb_matrix_animations/solid_splash_anim.h" diff --git a/quantum/rgb_matrix_animations/solid_color_anim.h b/quantum/rgb_matrix_animations/solid_color_anim.h index ba2cea15e..937642559 100644 --- a/quantum/rgb_matrix_animations/solid_color_anim.h +++ b/quantum/rgb_matrix_animations/solid_color_anim.h @@ -1,9 +1,7 @@ -#pragma once +RGB_MATRIX_EFFECT(SOLID_COLOR) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -extern led_config_t g_led_config; -extern rgb_config_t rgb_matrix_config; - -bool rgb_matrix_solid_color(effect_params_t* params) { +bool SOLID_COLOR(effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; @@ -14,3 +12,5 @@ bool rgb_matrix_solid_color(effect_params_t* params) { } return led_max < DRIVER_LED_TOTAL; } + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/solid_reactive_anim.h b/quantum/rgb_matrix_animations/solid_reactive_anim.h index c3dba8a5a..37e339907 100644 --- a/quantum/rgb_matrix_animations/solid_reactive_anim.h +++ b/quantum/rgb_matrix_animations/solid_reactive_anim.h @@ -1,12 +1,9 @@ -#pragma once -#if defined(RGB_MATRIX_KEYREACTIVE_ENABLED) +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED #ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE +RGB_MATRIX_EFFECT(SOLID_REACTIVE) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -extern led_config_t g_led_config; -extern rgb_config_t rgb_matrix_config; -extern last_hit_t g_last_hit_tracker; - -bool rgb_matrix_solid_reactive(effect_params_t* params) { +bool SOLID_REACTIVE(effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); HSV hsv = { rgb_matrix_config.hue, 255, rgb_matrix_config.val }; @@ -32,5 +29,6 @@ bool rgb_matrix_solid_reactive(effect_params_t* params) { return led_max < DRIVER_LED_TOTAL; } -#endif // DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -#endif // defined(RGB_MATRIX_KEYREACTIVE_ENABLED) +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix_animations/solid_reactive_cross.h b/quantum/rgb_matrix_animations/solid_reactive_cross.h index 8858f71e6..62210f82d 100644 --- a/quantum/rgb_matrix_animations/solid_reactive_cross.h +++ b/quantum/rgb_matrix_animations/solid_reactive_cross.h @@ -1,10 +1,15 @@ -#pragma once #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED #if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS) -extern led_config_t g_led_config; -extern rgb_config_t rgb_matrix_config; -extern last_hit_t g_last_hit_tracker; +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +RGB_MATRIX_EFFECT(SOLID_REACTIVE_CROSS) +#endif + +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTICROSS) +#endif + +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS static bool rgb_matrix_solid_reactive_multicross_range(uint8_t start, effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); @@ -38,13 +43,14 @@ static bool rgb_matrix_solid_reactive_multicross_range(uint8_t start, effect_par return led_max < DRIVER_LED_TOTAL; } -bool rgb_matrix_solid_reactive_multicross(effect_params_t* params) { +bool SOLID_REACTIVE_MULTICROSS(effect_params_t* params) { return rgb_matrix_solid_reactive_multicross_range(0, params); } -bool rgb_matrix_solid_reactive_cross(effect_params_t* params) { +bool SOLID_REACTIVE_CROSS(effect_params_t* params) { return rgb_matrix_solid_reactive_multicross_range(qsub8(g_last_hit_tracker.count, 1), params); } +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS #endif // !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS) #endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix_animations/solid_reactive_nexus.h b/quantum/rgb_matrix_animations/solid_reactive_nexus.h index c0e3c2450..33f478ac7 100644 --- a/quantum/rgb_matrix_animations/solid_reactive_nexus.h +++ b/quantum/rgb_matrix_animations/solid_reactive_nexus.h @@ -1,10 +1,15 @@ -#pragma once #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED #if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS) -extern led_config_t g_led_config; -extern rgb_config_t rgb_matrix_config; -extern last_hit_t g_last_hit_tracker; +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +RGB_MATRIX_EFFECT(SOLID_REACTIVE_NEXUS) +#endif + +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTINEXUS) +#endif + +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS static bool rgb_matrix_solid_reactive_multinexus_range(uint8_t start, effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); @@ -36,13 +41,14 @@ static bool rgb_matrix_solid_reactive_multinexus_range(uint8_t start, effect_par return led_max < DRIVER_LED_TOTAL; } -bool rgb_matrix_solid_reactive_multinexus(effect_params_t* params) { +bool SOLID_REACTIVE_MULTINEXUS(effect_params_t* params) { return rgb_matrix_solid_reactive_multinexus_range(0, params); } -bool rgb_matrix_solid_reactive_nexus(effect_params_t* params) { +bool SOLID_REACTIVE_NEXUS(effect_params_t* params) { return rgb_matrix_solid_reactive_multinexus_range(qsub8(g_last_hit_tracker.count, 1), params); } +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS #endif // !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS) #endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h b/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h index abc7e36a8..a568a5438 100644 --- a/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h +++ b/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h @@ -1,12 +1,10 @@ #pragma once #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED #ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +RGB_MATRIX_EFFECT(SOLID_REACTIVE_SIMPLE) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -extern led_config_t g_led_config; -extern rgb_config_t rgb_matrix_config; -extern last_hit_t g_last_hit_tracker; - -bool rgb_matrix_solid_reactive_simple(effect_params_t* params) { +bool SOLID_REACTIVE_SIMPLE(effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, 0 }; @@ -31,5 +29,6 @@ bool rgb_matrix_solid_reactive_simple(effect_params_t* params) { return led_max < DRIVER_LED_TOTAL; } +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS #endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE #endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix_animations/solid_reactive_wide.h b/quantum/rgb_matrix_animations/solid_reactive_wide.h index 3d1d38e80..ff0f6f5ec 100644 --- a/quantum/rgb_matrix_animations/solid_reactive_wide.h +++ b/quantum/rgb_matrix_animations/solid_reactive_wide.h @@ -1,10 +1,15 @@ -#pragma once #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED #if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE) -extern led_config_t g_led_config; -extern rgb_config_t rgb_matrix_config; -extern last_hit_t g_last_hit_tracker; +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +RGB_MATRIX_EFFECT(SOLID_REACTIVE_WIDE) +#endif + +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTIWIDE) +#endif + +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS static bool rgb_matrix_solid_reactive_multiwide_range(uint8_t start, effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); @@ -30,13 +35,14 @@ static bool rgb_matrix_solid_reactive_multiwide_range(uint8_t start, effect_para return led_max < DRIVER_LED_TOTAL; } -bool rgb_matrix_solid_reactive_multiwide(effect_params_t* params) { +bool SOLID_REACTIVE_MULTIWIDE(effect_params_t* params) { return rgb_matrix_solid_reactive_multiwide_range(0, params); } -bool rgb_matrix_solid_reactive_wide(effect_params_t* params) { +bool SOLID_REACTIVE_WIDE(effect_params_t* params) { return rgb_matrix_solid_reactive_multiwide_range(qsub8(g_last_hit_tracker.count, 1), params); } +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS #endif // !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE) #endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix_animations/solid_splash_anim.h b/quantum/rgb_matrix_animations/solid_splash_anim.h index 4e5565d0d..d439bd888 100644 --- a/quantum/rgb_matrix_animations/solid_splash_anim.h +++ b/quantum/rgb_matrix_animations/solid_splash_anim.h @@ -1,10 +1,15 @@ -#pragma once #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED #if !defined(DISABLE_RGB_MATRIX_SOLID_SPLASH) || !defined(DISABLE_RGB_MATRIX_SOLID_MULTISPLASH) -extern led_config_t g_led_config; -extern rgb_config_t rgb_matrix_config; -extern last_hit_t g_last_hit_tracker; +#ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH +RGB_MATRIX_EFFECT(SOLID_SPLASH) +#endif + +#ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +RGB_MATRIX_EFFECT(SOLID_MULTISPLASH) +#endif + +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS static bool rgb_matrix_solid_multisplash_range(uint8_t start, effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); @@ -30,13 +35,14 @@ static bool rgb_matrix_solid_multisplash_range(uint8_t start, effect_params_t* p return led_max < DRIVER_LED_TOTAL; } -bool rgb_matrix_solid_multisplash(effect_params_t* params) { +bool SOLID_MULTISPLASH(effect_params_t* params) { return rgb_matrix_solid_multisplash_range(0, params); } -bool rgb_matrix_solid_splash(effect_params_t* params) { +bool SOLID_SPLASH(effect_params_t* params) { return rgb_matrix_solid_multisplash_range(qsub8(g_last_hit_tracker.count, 1), params); } +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS #endif // !defined(DISABLE_RGB_MATRIX_SPLASH) && !defined(DISABLE_RGB_MATRIX_MULTISPLASH) #endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix_animations/splash_anim.h b/quantum/rgb_matrix_animations/splash_anim.h index fbe776111..214dab68d 100644 --- a/quantum/rgb_matrix_animations/splash_anim.h +++ b/quantum/rgb_matrix_animations/splash_anim.h @@ -1,10 +1,16 @@ -#pragma once #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED #if !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH) -extern led_config_t g_led_config; -extern rgb_config_t rgb_matrix_config; -extern last_hit_t g_last_hit_tracker; +#ifndef DISABLE_RGB_MATRIX_SPLASH +RGB_MATRIX_EFFECT(SPLASH) +#endif + +#ifndef DISABLE_RGB_MATRIX_MULTISPLASH +RGB_MATRIX_EFFECT(MULTISPLASH) +#endif + +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + static bool rgb_matrix_multisplash_range(uint8_t start, effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); @@ -32,13 +38,14 @@ static bool rgb_matrix_multisplash_range(uint8_t start, effect_params_t* params) return led_max < DRIVER_LED_TOTAL; } -bool rgb_matrix_multisplash(effect_params_t* params) { +bool MULTISPLASH(effect_params_t* params) { return rgb_matrix_multisplash_range(0, params); } -bool rgb_matrix_splash(effect_params_t* params) { +bool SPLASH(effect_params_t* params) { return rgb_matrix_multisplash_range(qsub8(g_last_hit_tracker.count, 1), params); } +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS #endif // !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH) #endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix_animations/typing_heatmap_anim.h b/quantum/rgb_matrix_animations/typing_heatmap_anim.h index aade53fcc..e6b34717b 100644 --- a/quantum/rgb_matrix_animations/typing_heatmap_anim.h +++ b/quantum/rgb_matrix_animations/typing_heatmap_anim.h @@ -1,8 +1,6 @@ -#pragma once #if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP) - -extern rgb_config_t rgb_matrix_config; -extern uint8_t rgb_frame_buffer[MATRIX_ROWS][MATRIX_COLS]; +RGB_MATRIX_EFFECT(TYPING_HEATMAP) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS void process_rgb_matrix_typing_heatmap(keyrecord_t *record) { uint8_t row = record->event.key.row; @@ -35,7 +33,7 @@ void process_rgb_matrix_typing_heatmap(keyrecord_t *record) { } } -bool rgb_matrix_typing_heatmap(effect_params_t* params) { +bool TYPING_HEATMAP(effect_params_t* params) { // Modified version of RGB_MATRIX_USE_LIMITS to work off of matrix row / col size uint8_t led_min = RGB_MATRIX_LED_PROCESS_LIMIT * params->iter; uint8_t led_max = led_min + RGB_MATRIX_LED_PROCESS_LIMIT; @@ -72,4 +70,5 @@ bool rgb_matrix_typing_heatmap(effect_params_t* params) { return led_max < sizeof(rgb_frame_buffer); } +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS #endif // defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP) diff --git a/tmk_core/protocol/arm_atsam/led_matrix.c b/tmk_core/protocol/arm_atsam/led_matrix.c index ea067a743..42dfccbc5 100644 --- a/tmk_core/protocol/arm_atsam/led_matrix.c +++ b/tmk_core/protocol/arm_atsam/led_matrix.c @@ -27,8 +27,6 @@ led_instruction_t led_instructions[] = { { .end = 1 } }; static void led_matrix_massdrop_config_override(int i); #endif // USE_MASSDROP_CONFIGURATOR -extern rgb_config_t rgb_matrix_config; -extern rgb_counters_t g_rgb_counters; void SERCOM1_0_Handler( void ) { @@ -431,7 +429,6 @@ static void led_run_pattern(led_setup_t *f, float* ro, float* go, float* bo, flo } } -extern led_config_t g_led_config; static void led_matrix_massdrop_config_override(int i) { float ro = 0; diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index 38e86ae0e..9e19747fa 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c @@ -5,8 +5,6 @@ #if defined(RGBLIGHT_ENABLE) extern rgblight_config_t rgblight_config; bool has_initialized; -#elif defined(RGB_MATRIX_ENABLE) -extern rgb_config_t rgb_matrix_config; #endif #ifdef RGBLIGHT_ENABLE From fd23a0e909c8478f3d9103bce410548af2496f92 Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Fri, 10 May 2019 21:56:16 -0500 Subject: [PATCH 002/341] RGB Matrix Effects: Cycle Out to In & Cycle Out to In Dual (#5812) --- docs/feature_rgb_matrix.md | 4 ++++ .../rgb_matrix_animations/cycle_out_in_anim.h | 23 +++++++++++++++++++ .../cycle_out_in_dual_anim.h | 23 +++++++++++++++++++ .../rgb_matrix_effects.inc | 2 ++ 4 files changed, 52 insertions(+) create mode 100644 quantum/rgb_matrix_animations/cycle_out_in_anim.h create mode 100644 quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index e29433a4b..8347660df 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -197,6 +197,8 @@ enum rgb_matrix_effects { RGB_MATRIX_CYCLE_ALL, // Full keyboard solid hue cycling through full gradient RGB_MATRIX_CYCLE_LEFT_RIGHT, // Full gradient scrolling left to right RGB_MATRIX_CYCLE_UP_DOWN, // Full gradient scrolling top to bottom + RGB_MATRIX_CYCLE_OUT_IN, // Full gradient scrolling out to in + RGB_MATRIX_CYCLE_OUT_IN_DUAL, // Full dual gradients scrolling out to in RGB_MATRIX_RAINBOW_MOVING_CHEVRON, // Full gradent Chevron shapped scrolling left to right RGB_MATRIX_DUAL_BEACON, // Full gradient spinning around center of keyboard RGB_MATRIX_RAINBOW_BEACON, // Full tighter gradient spinning around center of keyboard @@ -236,6 +238,8 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con |`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` | |`#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Disables `RGB_MATRIX_CYCLE_LEFT_RIGHT` | |`#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Disables `RGB_MATRIX_CYCLE_UP_DOWN` | +|`#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN` |Disables `RGB_MATRIX_CYCLE_OUT_IN` | +|`#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL` |Disables `RGB_MATRIX_CYCLE_OUT_IN_DUAL` | |`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON` | |`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` | |`#define DISABLE_RGB_MATRIX_RAINBOW_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` | diff --git a/quantum/rgb_matrix_animations/cycle_out_in_anim.h b/quantum/rgb_matrix_animations/cycle_out_in_anim.h new file mode 100644 index 000000000..dc9d09fd3 --- /dev/null +++ b/quantum/rgb_matrix_animations/cycle_out_in_anim.h @@ -0,0 +1,23 @@ +#ifndef DISABLE_RGB_MATRIX_CYCLE_OUT_IN +RGB_MATRIX_EFFECT(CYCLE_OUT_IN) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +bool CYCLE_OUT_IN(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + int16_t dx = g_led_config.point[i].x - 112; + int16_t dy = g_led_config.point[i].y - 32; + uint8_t dist = sqrt16(dx * dx + dy * dy); + hsv.h = 3 * dist / 2 + time; + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_CYCLE_OUT_IN diff --git a/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h b/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h new file mode 100644 index 000000000..941e6b9a8 --- /dev/null +++ b/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h @@ -0,0 +1,23 @@ +#ifndef DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +RGB_MATRIX_EFFECT(CYCLE_OUT_IN_DUAL) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +bool CYCLE_OUT_IN_DUAL(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + int16_t dx = 56 - abs8(g_led_config.point[i].x - 112); + int16_t dy = g_led_config.point[i].y - 32; + uint8_t dist = sqrt16(dx * dx + dy * dy); + hsv.h = 3 * dist + time; + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL diff --git a/quantum/rgb_matrix_animations/rgb_matrix_effects.inc b/quantum/rgb_matrix_animations/rgb_matrix_effects.inc index 9bc645461..f05a415a5 100644 --- a/quantum/rgb_matrix_animations/rgb_matrix_effects.inc +++ b/quantum/rgb_matrix_animations/rgb_matrix_effects.inc @@ -7,6 +7,8 @@ #include "rgb_matrix_animations/cycle_left_right_anim.h" #include "rgb_matrix_animations/cycle_up_down_anim.h" #include "rgb_matrix_animations/rainbow_moving_chevron_anim.h" +#include "rgb_matrix_animations/cycle_out_in_anim.h" +#include "rgb_matrix_animations/cycle_out_in_dual_anim.h" #include "rgb_matrix_animations/dual_beacon_anim.h" #include "rgb_matrix_animations/rainbow_beacon_anim.h" #include "rgb_matrix_animations/rainbow_pinwheels_anim.h" From 7871a465d36d11c4f9216a9e862104e0e770c6f4 Mon Sep 17 00:00:00 2001 From: ymzcdg <49898694+ymzcdg@users.noreply.github.com> Date: Sun, 12 May 2019 00:22:16 +0800 Subject: [PATCH 003/341] translate docs into Mandarin Chinese (#5807) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * translate newbs.md into Madarin Chinese translate newbs.md into Madarin Chinese * translate docs into Mandarin Chinese translate getting_started_github.md into Mandarin Chinese * translate getting_started_getting_help.md into Mandarin Chinese translate getting_started_getting_help.md into Mandarin Chinese * contributing.md to Chinese Personify QMK as a girl named Q酱 . It can make more developer read this document and contribute QMK. * getting_started_introduction.md to Chinese getting_started_introduction.md to Chinese * faq.md to Chinese faq.md to Chinese * crlf2lf getting_started_introduction.md ending line fix getting_started_introduction.md * crlf2lf contributing.md crlf2lf contributing.md --- docs/zh-cn/contributing.md | 205 +++++++++++++++++++++ docs/zh-cn/faq.md | 6 + docs/zh-cn/getting_started_getting_help.md | 15 ++ docs/zh-cn/getting_started_github.md | 59 ++++++ docs/zh-cn/newbs.md | 23 +++ 5 files changed, 308 insertions(+) create mode 100644 docs/zh-cn/contributing.md create mode 100644 docs/zh-cn/faq.md create mode 100644 docs/zh-cn/getting_started_getting_help.md create mode 100644 docs/zh-cn/getting_started_github.md create mode 100644 docs/zh-cn/newbs.md diff --git a/docs/zh-cn/contributing.md b/docs/zh-cn/contributing.md new file mode 100644 index 000000000..62b956b61 --- /dev/null +++ b/docs/zh-cn/contributing.md @@ -0,0 +1,205 @@ +# 如何做贡献 + +👍🎉 首先感谢各位百忙之中抽空阅读本文档,并为我们无私奉献。给您点赞啦! 🎉👍 + +第三方的帮助让Q酱成长了许多呢,Q酱也从你们那学到了不少新东西。Q酱希望每一个想帮助我的人都能很方便的做出有用的贡献。在这里我给摩拳擦掌的你们写了一点引导,让你们的代码在不对我做重大改动的情况下都能成功的被采纳哦。 + +* [项目概况](#项目概况) +* [代码规范](#代码规范) +* [一般教程](#一般教程) +* [行为守则对于我来说有何意义?](#行为守则对于我来说有何意义?) + +## 这文章巨长无比不想读啊! 我就想问个问题而已! + +您要是想问关于Q酱的问题的话可以在[OLKB Subreddit](https://reddit.com/r/olkb)或者是[Discord](https://discord.gg/Uq7gcHh)随意问。 + +请记住: + +* 维护Q酱的小可爱有的时候可能会有点忙,不能及时回答您的问题,耐心等等,他们都是很nice的人呀。 +* 维护Q酱的人都是很无私的善良的人。无论是贡献代码还是回答问题,都是义务的。有时见到他们努力回答各种问题,解决各种BUG,Q酱也是很心疼的。 +* 您可以看看下面的教程,可以让您的问题浅显易懂,更容易回答: + * https://opensource.com/life/16/10/how-ask-technical-questions + * http://www.catb.org/esr/faqs/smart-questions.html + +# 项目概况 + +Q酱很大一部分是用C语言组成的,不过有一小部分特性是C++的。怎么说呢,都是我的一部分,两个我都爱。Q酱一般是在键盘上的嵌入式处理器那里工作的,尤其与AVR([LUFA](http://www.fourwalledcubicle.com/LUFA.php))和ARM ([ChibiOS](http://www.chibios.com))两小哥哥搭配,干活不累,嘻嘻。如果您精通Arduino的话您会发现很多熟悉的概念,但也有点不爽,因为您以前的经验可能没法用来帮助Q酱。 + + + +# Q酱,我在哪能帮助你嘞? + +您要是有问题的话可以 [提出一个issue](https://github.com/qmk/qmk_firmware/issues) 或 [在Discord上交流一下](https://discord.gg/Uq7gcHh). + +# Q酱,我如何帮助你? + +您以前是否没为开源贡献过代码,而又想知道帮助Q酱是怎么一回事? 稍安勿躁,咱给您总结一下! + +0. 先注册一个 [GitHub](https://github.com) 账户。 +1. 做好一个你要贡献的布局,那就要 [找一个你想解决的问题](https://github.com/qmk/qmk_firmware/issues),或者 [找一个你想添加的特性](https://github.com/qmk/qmk_firmware/issues?q=is%3Aopen+is%3Aissue+label%3Afeature)。 +2. 把关联着问题的仓库分叉(fork)到你的仓库。这样你在`你的GitHub用户名/qmk_firmware`就有一个仓库备份啦。 +3. 使用 `git clone https://github.com/此处添GitHub用户名/此处添仓库名.git`这个命令把仓库同步到你的电脑中。 +4. 您要是想开发一个新特性的话可以先创建一个issue和Q酱的维护者讨论一下您要做什么。 +5. 使用`git checkout -b 此处写分支名字(别用汉字)`命令来创建一个分支(branch)用于开发。 +6. 对要解决的问题或要添加的特性进行适当的更改。 +7. 使用 `git add 把改变的文件的目录写这里` 可以添加改变的文件内容到git用于管理工程状态的索引(快照)里。 +8. 使用 `git commit -m "这里写修改的相关信息"` 来描述你做出了什么修改。 +9. 使用 `git push origin 此处写分支名字`来把你的更改同步到GitHub库里(反正不是打篮球那个库里)。 +10. 提交一个[QMK 固件的pull request](https://github.com/qmk/qmk_firmware/pull/new/master)。 +11. 给你的pull request拟一个标题,包括简短的描述和问题或错误代码。比如, 你可以起一个这样的"Added more log outputting to resolve #4352"(最好用英语,毕竟Q酱的中文也不是那么的溜,有可能会看不懂中文)。 +12. 在描述(description)里面写你做了哪些更改,你的代码里还存在什么问题, 或者你想问维护的小可爱们的问题。你的your pull request有点小问题无伤大雅(本来也没有完美的代码嘛), 维护的小可爱们会竭尽全力帮您改进的! +13. 维护人员审查代码可能需要一些时间。 +14. 维护人员会通知您要更改什么地方,然后您就按照建议改一改。 +15. 预祝您合并成功! + +# 代码规范 + +其实也没有什么特别严格的规范啦,但是俗话说的好:没有规矩,不成方圆。您可以看一下您的要改动的代码周围的画风,然后保持队形。如果你感觉周围都不知道是什么牛鬼蛇神的话就看看下面的建议: + +* 我们用肆(4)个空格来缩进(软件中也可以设置到Tab键) +* 我们使用改良的1TBS(允许单行样式) + * 左大括号: 在开放性语句块那行的末尾 + * 右大括号: 和开放性语句块第一个字母对齐 + * Else If: 将右大括号放在行的开头,下一个左大括号放在同一行的结尾 + * 可选大括号: 可选大括号是必选的 + * 应该这样: if (condition) { return false; } + * 不应该这样: if (condition) return false; +* 建议使用C语言风格的注释: `/* */` + * 把注释想象成一个描述特征的故事 + * 充分使用注释来描述你为何这样修改 + * 有些公认的东西就不要写到注释里面了 + * 如果你不知道注释是否多余,看下面 +* 一般不要主动换行,主动换行的话每行不要超过76列 +* 要把 `#pragma once` 放到头文件的开始哦,抛弃老土的(`#ifndef THIS_FILE_H`, `#define THIS_FILE_H`, ..., `#endif`)吧 +* 下面两种预处理命令都可以用: `#ifdef DEFINED` 还有 `#if defined(DEFINED)` + * 以上那句对处女座不是很友好哈,处女座的朋友们就别纠结了,直接 `#if defined(DEFINED)` 。 + * 还有就是选好一种风格就一直用,一直用一直爽,不要朝三暮四, 除非你要变化到多重条件的 `#if`。 + * `#` 和 `if`要挨在一起哦,再让本空格在中间冒充电灯泡本空格会生气的。 + * 以下是缩进规则: + * 首先考虑可读性,强迫症的朋友们总想要保持代码的高一致性,这样可不好。 + * 保证文件已有风格不变。如果代码本来就是杂糅风格,那就见机行事,让你的修改更有意义些。 + * 其实你也可以在缩进的时候看看周围其他代码,然后范水模山,预处理命令可以有自己的缩进风格。 + +可以参照下面: + +```c +/* foo 的 Enums*/ +enum foo_state { + FOO_BAR, + FOO_BAZ, +}; + +/* 有返回值的情况 */ +int foo(void) { + if (some_condition) { + return FOO_BAR; + } else { + return -1; + } +} +``` + +# Clang-format的自动格式化 +[Clang-format](https://clang.llvm.org/docs/ClangFormat.html) 是LLVM的一部分,可以帮你自动格式化代码。我们给你准备好了一个适用于以上规范的配置文件,会帮你调整缩进和换行,你只需要写好括号就好。有了它,你再也不用担心调整代码格式太耗时,没有时间陪伴自己(虚构)的另一半了。 + +使用[LLVM 完整安装](http://llvm.org/builds/)可以在Windows上安装clang-format, Ubuntu用户要用`sudo apt install clang-format`。 + +命令行的朋友们, 加上 `-style=file`选项就会自动在QMK的根目录寻找.clang-format配置文件了。 + +VSCode用户, 标准的 C/C++ 插件就支持clang-format, 或者可以用[独立扩展](https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.ClangFormat)也行。 + +有些东西(比如LAYOUT宏) 会被clang-format打乱,所以那些文件就别用clang-format了,这里就教您一个小窍门,在`// clang-format off` 和 `//clang-format on`之间装上会被搞乱的代码就好了。 + +# 一般教程 + +你可以给Q酱的不同部分添砖加瓦,但也要用不同的方法严谨检查。不论你修改哪里最好还是看看下边。 + +* 将PR(pull request)分成一个个的逻辑单元。 比如,不要一次将两个新特性PR出去。要添加的特性排好队,一个一个来。 +* 提交之前看一眼,`git diff --check`的空格一定要写对了 +* 确定你的代码能通过编译 + * 布局: 确定`make keyboard:your_new_keymap` 不返回错误 + * 键盘: 确定 `make keyboard:all` 不返回错误 + * 核心代码: 确定 `make all` 不返回错误 +* 提交的信息尽量明确。第一行写点简短介绍(每行不多于70个英文字母), 第二行空着,第三行和后面就要写些必要的细节了。最好用英文写,比如: + +``` +Adjust the fronzlebop for the kerpleplork + +The kerpleplork was intermittently failing with error code 23. The root cause was the fronzlebop setting, which causes the kerpleplork to activate every N iterations. + +Limited experimentation on the devices I have available shows that 7 is high enough to avoid confusing the kerpleplork, but I'd like to get some feedback from people with ARM devices to be sure. +``` + +## 文档 + +想帮助Q酱当然是先看文档最简单了。找到这个文档哪里错了然后改正它对于你来说超级简单! 我们也对有写文档能力的人求贤若渴,如果你是对的人[点这个](#Q酱,我在哪能帮助你嘞?)! + +文档呢,都静静的放在`qmk_firmware/docs` 目录里, 也或者您想为网页做贡献的话也是可以的哦。 + +在文档中附代码案例时, 先观察文档其他地方的命名规范。比如, 把enums的名字都改成像`my_layers`或者`my_keycodes`来防止名字不一致的enums被当作特务枪毙: + +```c +enum my_layers { + _FIRST_LAYER, + _SECOND_LAYER +}; + +enum my_keycodes { + FIRST_LAYER = SAFE_RANGE, + SECOND_LAYER +}; +``` + +## 布局 + +大多数QMK新手都从创建一个自己的布局开始。我们尽力保证布局规范宽松 (毕竟布局是个性的体现) 不过建议遵守以下准则,这样可以让别人更好理解你的代码 + +* 用 [模板](documentation_templates.md)写个`readme.md`。 +* 所有的布局PR都会被squash, 如果你想知道你的提交是怎么被squash的那你就自己来吧 +* 不要把新特性和布局一起PR。可以分别PR他们 +* 布局文件夹就不要放`Makefile`了,这个操作都过时啦 +* 更新文件头部的copyrights(看`%YOUR_NAME%`那) + +## 键盘 + +QMK的最终归宿是键盘。有些键盘是社区维护的,有一些是制作这些键盘的人维护的。`readme.md`会告诉你是谁维护了这个键盘,如果你对某个键盘有疑问,可以 [创建一个Issue](https://github.com/qmk/qmk_firmware/issues) 来问一问维护者。 + +我们建议你按下面的来操作: + +* 用[模板](documentation_templates.md)写`readme.md`。 +* 提交数量尽量合理,不然我们可就要把你的PR给squash了。 +* 不要把新特性和新键盘一起PR。可以分别PR他们 +* 用父文件夹的名字命名 `.c`/`.h`文件, 比如`/keyboards///.[ch]` +* 键盘文件夹就不要放`Makefile`了,这个操作都过时啦 +* 更新文件头部的copyrights(看`%YOUR_NAME%`那) + +## Quantum/TMK 核心 + +在您废寝忘食地开发Q酱新特性或者帮Q酱驱虫之前,一定要确保你的工作是有意义的。看看[了解QMK](understanding_qmk.md)你会对Q酱有更深的了解,这个文档将带你领略QMK的程序流程。现在你应该和维护团对谈谈来了解实现你想法的最佳方法了。一下渠道都可以: + +* [在Discord交流](https://discord.gg/Uq7gcHh) +* [建立一个Issue](https://github.com/qmk/qmk_firmware/issues/new) + +新特性和BUG的修复影响所有键盘。开发组也在翻修QMK。所以,在实施重大返修之前一定要讨论一下。如果你在没有事先与维护团队沟通的情况下提交了一个PR,而且你的选择与维护团队的计划方向不符,那你可能要面临大改了。 + +修复BUG或者开发新特性之前看看这个: + +* **默认不启用** - QMK运行的芯片多数内存有限,所以首要考虑的还应该是布局不要被破坏,于是特性默认是不启用的。你喜欢什么特性的话就打开它,如果你觉得有些特性应该默认开启或者你能帮助缩减代码,那就联系维护组吧。 +* **提交之前在本地编译** - 这个简直就是家喻户晓了,但是也确实需要编译啊! 我们的Travis系统会发现一切问题,但是自己编译一下可要比在线等快多了。 +* **注意版本和芯片平台** - 有那么几个键盘有支持不同配置甚至是不同芯片的版本。试着写一个能AVR和ARM两个平台运行的特性,或者在不支持的平台自动禁用。 +* **解释你的新特性** - 在`docs/`写个文档, 你可以创建新文档或者写到现有文档中。如果你不把它记录下来,其他人就无法从你的努力中获益。 + +也可以看看以下建议: + +* 提交数量尽量合理,不然我们可就要把你的PR给squash了。 +* 不要把新特性、布局和键盘一起PR。可以分别PR他们。 +* 给你的特性写[单元测试](unit_testing.md)。 +* 你编辑的文件风格要一致,如果风格不明确或者是混搭风的,你就要先看看[代码规范](#代码规范)确认情况。 + +## 重构 + +为了保持QMK脉络清晰,Q酱打算深入规划重构一下自己,然后让合作者进行修改。如果你有重构的思路或建议[创建一个issue](https://github.com/qmk/qmk_firmware/issues), Q酱很乐意讨论一下怎么改进一下。 + +# 行为守则对于我来说有何意义? + +我们的[行为守则](https://github.com/qmk/qmk_firmware/blob/master/CODE_OF_CONDUCT.md) 是说明您有责任尊重和礼貌地对待项目中的每个人,无论他们的身份如何。 如果你是我们行为准则所描述的不当行为的受害者,我们将站在你这边,并按照行为准则对施暴者进行适当谴责。 diff --git a/docs/zh-cn/faq.md b/docs/zh-cn/faq.md new file mode 100644 index 000000000..3d0b65c6f --- /dev/null +++ b/docs/zh-cn/faq.md @@ -0,0 +1,6 @@ +# 常见问题 + +* [一般问题](faq_general.md) +* [构建和编译QMK](faq_build.md) +* [QMK调试和故障排除](faq_debug.md) +* [布局问题](faq_keymap.md) diff --git a/docs/zh-cn/getting_started_getting_help.md b/docs/zh-cn/getting_started_getting_help.md new file mode 100644 index 000000000..cf770a770 --- /dev/null +++ b/docs/zh-cn/getting_started_getting_help.md @@ -0,0 +1,15 @@ +# 获得帮助 + +有很多方法来获得关于QMK的帮助. + +## 实时聊天 + +你可以在我们的主要[Discord服务器](https://discord.gg/Uq7gcHh)找到QMK的开发者和用户。有很多讨论固件的不同频道, 工具箱(Toolbox), 硬件,配置工具(configurator). + +## OLKB Subreddit + +QMK的官方论坛是[/r/olkb](https://reddit.com/r/olkb) 在[reddit.com](https://reddit.com)上. + +## Github的Issue + +你可以在GitHub上 [提出issue](https://github.com/qmk/qmk_firmware/issues).当您的问题需要长期讨论或调试时,这尤其方便。 diff --git a/docs/zh-cn/getting_started_github.md b/docs/zh-cn/getting_started_github.md new file mode 100644 index 000000000..0400eea64 --- /dev/null +++ b/docs/zh-cn/getting_started_github.md @@ -0,0 +1,59 @@ +# 如何在QMK中使用Github + +Github can be a little tricky to those that aren't familiar with it - this guide will walk through each step of forking, cloning, and submitting a pull request with QMK. + +?> 本教程假设您已安装GitHub,并且您喜欢使用命令行工作。 + +首先 [Github上的QMK页面](https://github.com/qmk/qmk_firmware), 您能看到右上方有个按钮写着"Fork": + +![从Github上分叉](http://i.imgur.com/8Toomz4.jpg) + +如果你是某组织成员,你将需要选择分叉到哪个账户。一般情况下, 你是想要分叉到你的私人账户下。当你完成分叉 (有时需要等一会), 点击"Clone or Download" 按钮: + +!从Github下载](http://i.imgur.com/N1NYcSz.jpg) + +你要选择 "HTTPS", 然后选择链接复制: + +![HTTPS链接](http://i.imgur.com/eGO0ohO.jpg) + +然后,在命令行输入`git clone `,然后粘贴你的链接: + +``` +user@computer:~$ git clone https://github.com/whoeveryouare/qmk_firmware.git +Cloning into 'qmk_firmware'... +remote: Counting objects: 46625, done. +remote: Compressing objects: 100% (2/2), done. +remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623 +Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done. +Resolving deltas: 100% (29362/29362), done. +Checking out files: 100% (2799/2799), done. +``` + +现在你本地计算机有QMK的分叉了,你可以添加你的布局了, 为你的键盘编译并刷新固件吧。如果你觉得你的修改很不错, 你可以添加,提交,然后想你的分叉推出(pull)你的改变,像这样: + +``` +user@computer:~$ git add . +user@computer:~$ git commit -m "adding my keymap" +[master cccb1608] adding my keymap + 1 file changed, 1 insertion(+) + create mode 100644 keyboards/planck/keymaps/mine/keymap.c +user@computer:~$ git push +Counting objects: 1, done. +Delta compression using up to 4 threads. +Compressing objects: 100% (1/1), done. +Writing objects: 100% (1/1), 1.64 KiB | 0 bytes/s, done. +Total 1 (delta 1), reused 0 (delta 0) +remote: Resolving deltas: 100% (1/1), completed with 1 local objects. +To https://github.com/whoeveryouare/qmk_firmware.git + + 20043e64...7da94ac5 master -> master +``` + +现在你的改动已经在你Github上的分支中了 - 如果你回到这 (`https://github.com/你的GitHub账户名/qmk_firmware`) ,你可以点击下方所示按钮创建 "New Pull Request": + +![新的 Pull Request](http://i.imgur.com/DxMHpJ8.jpg) + +现在你可以看到你所做的一切 - 如果看起来不错, 就可以点击 "Create Pull Request"定稿了: + +![创建Pull Request](http://i.imgur.com/Ojydlaj.jpg) + +提交后,我们会开跟你说你的改动,要求您进行更改, 并最终接受您的更改!感谢您为QMK做的贡献 :) diff --git a/docs/zh-cn/newbs.md b/docs/zh-cn/newbs.md new file mode 100644 index 000000000..8c36b0d24 --- /dev/null +++ b/docs/zh-cn/newbs.md @@ -0,0 +1,23 @@ +# QMK菜鸟教程 + +QMK是为你机械硬盘设计的的一个强大的开源固件。使用QMK可以很简单的让你的定制键盘变得强大。看完这篇文章,无论你是菜鸟还是大佬,都可以顺利的使用QMK来定制键盘。 + +你是否为不知道你的键盘能不能运行QMK而苦恼? 如果你的机械键盘是你自己做的,那么这把键盘一般可以运行QMK。我们提供了[一大堆自制键盘](http://qmk.fm/keyboards/), 所以即便你的键盘不能运行QMK你也很容易能找到满足你需求的键盘。 + +## 概览 + +这个教程有7个主要部分: + +* [新手上路](newbs_getting_started.md) +* [用命令行构建你的第一个固件](newbs_building_firmware.md) +* [用在线界面构建你的第一个固件](newbs_building_firmware_configurator.md) +* [刷新固件](newbs_flashing.md) +* [测试和调试](newbs_testing_debugging.md) +* [Git最佳实践](newbs_best_practices.md) +* [其他学习资源](newbs_learn_more_resources.md) + +这份教程旨在帮助没有固件构建经验的人,也是根据该目的做出选择和建议。这些程序有很多替代方法,大部分替代我们都支持。如果你对完成一个任务有疑问,可以[向我们寻求帮助](getting_started_getting_help.md). + +## 其他资源 + +* [Thomas Baart的 QMK基础博客](https://thomasbaart.nl/category/mechanical-keyboards/firmware/qmk/qmk-basics/) – 这是一个用户创建的博客,涵盖了为新手准备的使用QMK的基础知识。 From d591ab6263a4c5581d1614b006b5ef52b012c9a8 Mon Sep 17 00:00:00 2001 From: "Paul J. Miller" Date: Sat, 11 May 2019 12:24:49 -0400 Subject: [PATCH 004/341] feat: add kbd67v2 support (#5777) * feat: add kbd67v2 support * update cr * Update keyboards/kbdfans/kbd67/rev2/config.h Co-Authored-By: Vorror * Update keyboards/kbdfans/kbd67/rev2/config.h Co-Authored-By: Vorror * Update keyboards/kbdfans/kbd67/rev2/rev2.c Co-Authored-By: Vorror * Update keyboards/kbdfans/kbd67/rev2/rules.mk Co-Authored-By: MechMerlin <30334081+mechmerlin@users.noreply.github.com> * Update keyboards/kbdfans/kbd67/rev2/readme.md Co-Authored-By: MechMerlin <30334081+mechmerlin@users.noreply.github.com> --- keyboards/kbdfans/kbd67/rev2/config.h | 64 ++++++++++++ keyboards/kbdfans/kbd67/rev2/info.json | 16 +++ .../kbd67/rev2/keymaps/default/config.h | 19 ++++ .../kbd67/rev2/keymaps/default/keymap.c | 99 +++++++++++++++++++ .../kbd67/rev2/keymaps/default/readme.md | 1 + .../kbdfans/kbd67/rev2/keymaps/koba/config.h | 17 ++++ .../kbdfans/kbd67/rev2/keymaps/koba/keymap.c | 61 ++++++++++++ .../kbdfans/kbd67/rev2/keymaps/koba/readme.md | 7 ++ keyboards/kbdfans/kbd67/rev2/readme.md | 13 +++ keyboards/kbdfans/kbd67/rev2/rev2.c | 42 ++++++++ keyboards/kbdfans/kbd67/rev2/rev2.h | 57 +++++++++++ keyboards/kbdfans/kbd67/rev2/rules.mk | 82 +++++++++++++++ 12 files changed, 478 insertions(+) create mode 100644 keyboards/kbdfans/kbd67/rev2/config.h create mode 100644 keyboards/kbdfans/kbd67/rev2/info.json create mode 100644 keyboards/kbdfans/kbd67/rev2/keymaps/default/config.h create mode 100644 keyboards/kbdfans/kbd67/rev2/keymaps/default/keymap.c create mode 100644 keyboards/kbdfans/kbd67/rev2/keymaps/default/readme.md create mode 100644 keyboards/kbdfans/kbd67/rev2/keymaps/koba/config.h create mode 100644 keyboards/kbdfans/kbd67/rev2/keymaps/koba/keymap.c create mode 100644 keyboards/kbdfans/kbd67/rev2/keymaps/koba/readme.md create mode 100644 keyboards/kbdfans/kbd67/rev2/readme.md create mode 100644 keyboards/kbdfans/kbd67/rev2/rev2.c create mode 100644 keyboards/kbdfans/kbd67/rev2/rev2.h create mode 100644 keyboards/kbdfans/kbd67/rev2/rules.mk diff --git a/keyboards/kbdfans/kbd67/rev2/config.h b/keyboards/kbdfans/kbd67/rev2/config.h new file mode 100644 index 000000000..1c8385f7d --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/config.h @@ -0,0 +1,64 @@ +/* +Copyright 2019 Vorror + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KBDFans +#define PRODUCT KBD67v2 +#define DESCRIPTION 65% Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +#define MATRIX_ROW_PINS { B7, D0, F0, F1, F4 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, D1, D2, D3, D6, D7, B4, B6, C6, C7, F7, F6, F5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B5 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 18 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_LIMIT_VAL 240 +#endif diff --git a/keyboards/kbdfans/kbd67/rev2/info.json b/keyboards/kbdfans/kbd67/rev2/info.json new file mode 100644 index 000000000..4b7b5e8b3 --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "kbd67v2", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + }, + + "LAYOUT_65_ansi": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + } + } +} diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/default/config.h b/keyboards/kbdfans/kbd67/rev2/keymaps/default/config.h new file mode 100644 index 000000000..a3ed4f762 --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 MechMerlin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/default/keymap.c b/keyboards/kbdfans/kbd67/rev2/keymaps/default/keymap.c new file mode 100644 index 000000000..13a8a420d --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/default/keymap.c @@ -0,0 +1,99 @@ +/* Copyright 2018 'mechmerlin' + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Home| + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |PgUp| + * |----------------------------------------------------------------| + * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return |PgDn| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|End | + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ +[0] = LAYOUT_65_ansi( + KC_ESC, 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_HOME, \ + 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_PGUP, \ + 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, KC_PGDN, \ + 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_UP, KC_END, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap Fn Layer + * ,----------------------------------------------------------------. + * |~ `|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Ins | + * |----------------------------------------------------------------| + * |Caps | |Up | | | | | |PSc|SLk|Pau|Up | | | | + * |----------------------------------------------------------------| + * | |Lef|Dow|Rig| | | | |Hom|PUp|Lef|Rig| | | + * |----------------------------------------------------------------| + * | | | | | | | | |End|PDn|Dow| |PUp| | + * |----------------------------------------------------------------| + * | | | | | | | |Hom|PDn|End | + * `----------------------------------------------------------------' + */ +[1] = LAYOUT_65_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,KC_INS, \ + KC_CAPS,_______, KC_UP,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK,KC_PAUS, KC_UP,_______, _______,_______, \ + _______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______,_______,_______,KC_HOME,KC_PGUP,KC_LEFT,KC_RGHT, _______,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______, KC_END,KC_PGDN,KC_DOWN, _______,KC_PGUP,_______, \ + _______, _______, _______, _______, _______,_______,_______,KC_HOME,KC_PGDN, KC_END), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/default/readme.md b/keyboards/kbdfans/kbd67/rev2/keymaps/default/readme.md new file mode 100644 index 000000000..2cb43c5e1 --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for kbd67 diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/koba/config.h b/keyboards/kbdfans/kbd67/rev2/keymaps/koba/config.h new file mode 100644 index 000000000..f4d7de06e --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/koba/config.h @@ -0,0 +1,17 @@ +/* Copyright 2019 Daisuke Kobayashi + * + * 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 . + */ + +#pragma once diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/koba/keymap.c b/keyboards/kbdfans/kbd67/rev2/keymaps/koba/keymap.c new file mode 100644 index 000000000..b00805e9e --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/koba/keymap.c @@ -0,0 +1,61 @@ +/* Copyright 2019 Daisuke Kobayashi + * + * 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 . + */ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +#define RGB_RMO RGB_RMOD + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| ^| \|BS |Del | + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| @| [| Ent |PgUp| + * |------------------------------------------------------. |----| + * |H/Z | A| S| D| F| G| H| J| K| L| ;| :| ]| |PgDn| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PScr| + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Fn | Space |Alt |Ctrl| |Lef|Dow|Rig | + * `------------------------------------------------' `------------' + */ +[0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, JP_CIRC, KC_JYEN, KC_BSPC, KC_DELT, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, JP_LBRC, JP_RBRC, KC_PGUP, \ + KC_ZKHK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, KC_ENT, KC_PGDN, \ + KC_LSFT, XXXXXXX, 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_PSCR, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap Fn Layer + * ,----------------------------------------------------------------. + * |Rst| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | |Ins | + * |----------------------------------------------------------------| + * | |M- |M+ |RGB|H- |H+ | | |Prt|SLk|Pau| | | | | + * |------------------------------------------------------. |----| + * |Caps |Vo-|Vo+|Mut|S- |S+ | *| /|Hom|PUp| | | | | | + * |----------------------------------------------------------------| + * | |BL-|BL+|BL |V- |V+ | +| -|End|PDn| _| |PUp| | + * |----------------------------------------------------------------| + * | | | | Muhenkan | | Henkan |Kana|Menu| |Hom|PDn|End | + * `------------------------------------------------' `------------' + */ +[1] = LAYOUT_all( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX,_______,KC_INS, \ + _______, RGB_RMO,RGB_MOD,RGB_TOG,RGB_HUD,RGB_HUI,XXXXXXX,XXXXXXX,KC_PSCR,KC_SLCK,KC_PAUS,XXXXXXX,XXXXXXX,XXXXXXX, _______, \ + KC_CAPS, KC_VOLD,KC_VOLU,KC_MUTE,RGB_SAD,RGB_SAI,KC_PAST,KC_PSLS,KC_HOME,KC_PGUP,XXXXXXX,XXXXXXX, KC_PENT, _______, \ + _______,_______,BL_DEC, BL_INC, BL_TOGG,RGB_VAD,RGB_VAI,KC_PPLS,KC_PMNS,KC_END, KC_PGDN,JP_UNDS,_______, KC_PGUP,_______, \ + _______,_______,_______, KC_MHEN, _______, KC_HENK, KC_KANA,KC_APP, _______,KC_HOME,KC_PGDN,KC_END), +}; diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/koba/readme.md b/keyboards/kbdfans/kbd67/rev2/keymaps/koba/readme.md new file mode 100644 index 000000000..b432436d4 --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/koba/readme.md @@ -0,0 +1,7 @@ +# Koba's keymap for KBD67 + +![keyboard-layout](https://user-images.githubusercontent.com/1042121/54736578-244ffe80-4bef-11e9-9882-37611b4efdf4.png) + +- JIS layout. +- Fn layer is arranged like HHKB. +- 3 splitted space bar. (Space-Fn-Space) diff --git a/keyboards/kbdfans/kbd67/rev2/readme.md b/keyboards/kbdfans/kbd67/rev2/readme.md new file mode 100644 index 000000000..0909f781d --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/readme.md @@ -0,0 +1,13 @@ +# KBD67 rev2 + +65% pcb with blocker. Revision 2 (Manufactured after 05/01/19). + +Keyboard Maintainer: [Vorror](https://github.com/vorror) +Hardware Supported: KBD67v2 PCB (Sometimes sold under the name "KBD65") +Hardware Availability: KBDFans [Keyboard Kit](https://kbdfans.cn/products/coming-soon-kbd67-mechanical-keyboard-diy-kit), [PCB](https://kbdfans.cn/collections/65/products/kbd65-65-custom-mechanical-keyboard-pcb) + +Make example for this keyboard (after setting up your build environment): + + make kbdfans/kbd67/rev2:default + +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). diff --git a/keyboards/kbdfans/kbd67/rev2/rev2.c b/keyboards/kbdfans/kbd67/rev2/rev2.c new file mode 100644 index 000000000..8aa83f586 --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/rev2.c @@ -0,0 +1,42 @@ +/* Copyright 2019 Vorror + * + * 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 . + */ +#include "rev2.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + led_set_user(usb_led); +} diff --git a/keyboards/kbdfans/kbd67/rev2/rev2.h b/keyboards/kbdfans/kbd67/rev2/rev2.h new file mode 100644 index 000000000..f27a00191 --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/rev2.h @@ -0,0 +1,57 @@ +/* Copyright 2018 MechMerlin + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \ + K40, K41, K43, K44, K46, K48, K4A, K4B, K4C, K4D, K4E, K4F \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F }, \ + { K40, K41, KC_NO, K43, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D, K4E, K4F }, \ +} + +#define LAYOUT_65_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, \ + K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \ + K40, K41, K43, K46, K4A, K4B, K4C, K4D, K4E, K4F \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F }, \ + { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F }, \ + { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E, K4F }, \ +} + diff --git a/keyboards/kbdfans/kbd67/rev2/rules.mk b/keyboards/kbdfans/kbd67/rev2/rules.mk new file mode 100644 index 000000000..5e874a041 --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/rules.mk @@ -0,0 +1,82 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = 65_ansi From b9c38cfec844d5ff0cb952be0c27bbdca6279595 Mon Sep 17 00:00:00 2001 From: William Chang Date: Sat, 11 May 2019 10:14:42 -0700 Subject: [PATCH 005/341] Add vim arrow keybindings to layer 1, update readme. (#5842) --- keyboards/dz60/keymaps/billiams/keymap.c | 8 ++++---- keyboards/dz60/keymaps/billiams/readme.md | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/keyboards/dz60/keymaps/billiams/keymap.c b/keyboards/dz60/keymaps/billiams/keymap.c index 9de51fbfb..b1c75d903 100644 --- a/keyboards/dz60/keymaps/billiams/keymap.c +++ b/keyboards/dz60/keymaps/billiams/keymap.c @@ -28,9 +28,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------------. * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | * |-----------------------------------------------------------------------------------------+ - * | |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | Mute | Prev | Next | + * | |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| Mute | Vol-| Vol+| Prev | Next | * |-----------------------------------------------------------------------------------------+ - * | | | | | | | | | | | Vol- | Vol+ | Play/Pause | + * | | | | | | | Left| Down| Up |Right| | | Play/Pause | * |-----------------------------------------------------------------------------------------+ * | | | | | | | | |Scr- |Scr+ | |PG_UP|RESET| * |-----------------------------------------------------------------------------------------+ @@ -40,8 +40,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_directional( _______, 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, - _______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, _______, KC_MRWD, KC_MFFD, - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC__VOLDOWN, KC__VOLUP, + _______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, KC_MUTE, KC__VOLDOWN, KC__VOLUP, KC_MRWD, KC_MFFD, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, KC_MPLY, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, _______, _______, KC_PGUP, RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_END ), diff --git a/keyboards/dz60/keymaps/billiams/readme.md b/keyboards/dz60/keymaps/billiams/readme.md index 60096473a..5c0431e23 100644 --- a/keyboards/dz60/keymaps/billiams/readme.md +++ b/keyboards/dz60/keymaps/billiams/readme.md @@ -11,6 +11,7 @@ Settings: * `/ ?` are available when you tap the right shift. Otherwise RShift is shift when held down * RESET is available as `Fn`+ ` ESC` * Underglow toggle is available as `Fn` + `Q`. Yes your keyboard has lights even if you didn't get the LEDs. Bonus! +* vim-style arrow key bindings H J K L in layer 1 ### Initial Installation @@ -59,9 +60,9 @@ FN Layer ,-----------------------------------------------------------------------------------------. | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | |-----------------------------------------------------------------------------------------+ -| |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | MUTE | Prev | Next | +| |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| Mute | Vol-| Vol+| Prev | Next | |-----------------------------------------------------------------------------------------+ -| | | | | | | | | | | Vol- | Vol+ | Play/Pause | +| | | | | | | Left| Down| Up |Right| | | Play/Pause | |-----------------------------------------------------------------------------------------+ | | | | | | | | |Scr- |Scr+ | | PG_UP |RESET| |-----------------------------------------------------------------------------------------+ From 819364ea23c000d3015ca6d15b093ebf96c45732 Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Sat, 11 May 2019 14:31:31 -0500 Subject: [PATCH 006/341] Fix for Solid Reactive mode bug (#5846) derp, forgot to remove the pragma once --- quantum/rgb_matrix_animations/solid_reactive_simple_anim.h | 1 - 1 file changed, 1 deletion(-) diff --git a/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h b/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h index a568a5438..f235824e2 100644 --- a/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h +++ b/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h @@ -1,4 +1,3 @@ -#pragma once #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED #ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE RGB_MATRIX_EFFECT(SOLID_REACTIVE_SIMPLE) From 5c4707eafc5165904918fad7daff4e566f8f60df Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Sat, 11 May 2019 20:51:37 -0400 Subject: [PATCH 007/341] [Keymap] Minor keymap updates (#5850) * Move layer toggle key for one handed operation * Add print screen keycode * Cleaning up some tab/space formatting --- keyboards/hs60/v2/keymaps/stanrc85/keymap.c | 48 +++++++++---------- keyboards/hs60/v2/keymaps/stanrc85/rules.mk | 8 ++-- .../community/60_ansi/stanrc85-ansi/keymap.c | 48 +++++++++---------- users/stanrc85/layer_rgb.c | 2 +- users/stanrc85/stanrc85.c | 4 +- users/stanrc85/stanrc85.h | 2 +- 6 files changed, 56 insertions(+), 56 deletions(-) diff --git a/keyboards/hs60/v2/keymaps/stanrc85/keymap.c b/keyboards/hs60/v2/keymaps/stanrc85/keymap.c index 2fa3f4453..8e4c8b42b 100644 --- a/keyboards/hs60/v2/keymaps/stanrc85/keymap.c +++ b/keyboards/hs60/v2/keymaps/stanrc85/keymap.c @@ -17,33 +17,33 @@ #include "stanrc85.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_60_ansi( - TD_TESC, 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_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_CTLE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - 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_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(3), TD_TCTL), + [0] = LAYOUT_60_ansi( + TD_TESC, 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_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_CTLE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + 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_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(3), TD_TCTL), - [1] = LAYOUT_60_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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - 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_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(2), MO(3), KC_RCTL), + [1] = LAYOUT_60_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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + 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_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(2), MO(3), KC_RCTL), - [2] = LAYOUT_60_ansi( - KC_TILD, 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, - _______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, KC_INS, - KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, - _______, KC_RDP, _______, _______, _______, _______, _______, _______, KC_WBAK, KC_WFWD, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______), + [2] = LAYOUT_60_ansi( + KC_TILD, 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, + _______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, KC_PSCR, _______, _______, KC_INS, + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, + _______, KC_RDP, _______, _______, _______, _______, _______, _______, KC_WBAK, KC_WFWD, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______), - [3] = LAYOUT_60_ansi( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, - _______, EF_INC, ES_INC, S1_INC, H1_INC, S2_INC, H2_INC, BR_INC, _______, _______, _______, _______, _______, RESET, - TG(1), EF_DEC, ES_DEC, S1_DEC, H1_DEC, S2_DEC, H2_DEC, BR_DEC, _______, _______, _______, _______, KC_MAKE, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______) + [3] = LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, + _______, EF_INC, ES_INC, S1_INC, H1_INC, S2_INC, H2_INC, BR_INC, _______, _______, _______, _______, _______, RESET, + _______, EF_DEC, ES_DEC, S1_DEC, H1_DEC, S2_DEC, H2_DEC, BR_DEC, _______, _______, _______, _______, KC_MAKE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, TG(1)) }; // Backlight specific keys: diff --git a/keyboards/hs60/v2/keymaps/stanrc85/rules.mk b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk index 817785d7a..8d9939169 100644 --- a/keyboards/hs60/v2/keymaps/stanrc85/rules.mk +++ b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk @@ -1,9 +1,9 @@ # project specific files SRC = keyboards/zeal60/zeal60.c \ - keyboards/zeal60/rgb_backlight.c \ - drivers/issi/is31fl3733.c \ - quantum/color.c \ - drivers/arm/i2c_master.c + keyboards/zeal60/rgb_backlight.c \ + drivers/issi/is31fl3733.c \ + quantum/color.c \ + drivers/arm/i2c_master.c ## chip/board settings # the next two should match the directories in diff --git a/layouts/community/60_ansi/stanrc85-ansi/keymap.c b/layouts/community/60_ansi/stanrc85-ansi/keymap.c index b6e851b15..d820171d4 100644 --- a/layouts/community/60_ansi/stanrc85-ansi/keymap.c +++ b/layouts/community/60_ansi/stanrc85-ansi/keymap.c @@ -17,33 +17,33 @@ #include "stanrc85.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_60_ansi( - TD_TESC, 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_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_CTLE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - 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_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(3), TD_TCTL), + [0] = LAYOUT_60_ansi( + TD_TESC, 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_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_CTLE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + 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_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(3), TD_TCTL), - [1] = LAYOUT_60_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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - 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_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(2), MO(3), KC_RCTL), + [1] = LAYOUT_60_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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + 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_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(2), MO(3), KC_RCTL), - [2] = LAYOUT_60_ansi( - KC_TILD, 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, - _______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, KC_INS, - KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, - _______, KC_RDP, _______, _______, _______, _______, _______, _______, KC_WBAK, KC_WFWD, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______), + [2] = LAYOUT_60_ansi( + KC_TILD, 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, + _______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, KC_PSCR, _______, _______, KC_INS, + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, + _______, KC_RDP, _______, _______, _______, _______, _______, _______, KC_WBAK, KC_WFWD, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______), - [3] = LAYOUT_60_ansi( - _______, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, RGB_SAI, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, - TG(1), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MAKE, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______) + [3] = LAYOUT_60_ansi( + _______, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, RGB_SAI, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MAKE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, TG(1)) }; bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { diff --git a/users/stanrc85/layer_rgb.c b/users/stanrc85/layer_rgb.c index ac5d18122..23eeb3b08 100644 --- a/users/stanrc85/layer_rgb.c +++ b/users/stanrc85/layer_rgb.c @@ -5,7 +5,7 @@ void matrix_init_user(void) { }; uint32_t layer_state_set_user(uint32_t state) { - switch (biton32(state)) { + switch (biton32(state)) { case 0: rgblight_setrgb (0xFF, 0x00, 0x00); break; diff --git a/users/stanrc85/stanrc85.c b/users/stanrc85/stanrc85.c index 78b0c4a14..e3da6d646 100644 --- a/users/stanrc85/stanrc85.c +++ b/users/stanrc85/stanrc85.c @@ -45,8 +45,8 @@ void ctl_copy_reset (qk_tap_dance_state_t *state, void *user_data) { } qk_tap_dance_action_t tap_dance_actions[] = { - [TD_WIN] = ACTION_TAP_DANCE_DOUBLE(KC_CAD, KC_LOCK), - [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_GRV), + [TD_WIN] = ACTION_TAP_DANCE_DOUBLE(KC_CAD, KC_LOCK), + [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_GRV), [TD_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctl_copy_finished, ctl_copy_reset) }; diff --git a/users/stanrc85/stanrc85.h b/users/stanrc85/stanrc85.h index da52df09b..b3d413fa1 100644 --- a/users/stanrc85/stanrc85.h +++ b/users/stanrc85/stanrc85.h @@ -20,7 +20,7 @@ #define TD_TCTL TD(TD_RCTL) enum cust_keys { - KC_MAKE = SAFE_RANGE, + KC_MAKE = SAFE_RANGE, KC_RDP }; From d53cbd2dc6ec6877f2815c546c03b39fac7a8afa Mon Sep 17 00:00:00 2001 From: zvecr Date: Sun, 12 May 2019 01:55:12 +0100 Subject: [PATCH 008/341] Update run command now that the install script is unattended, fix mount point for Debian (#5847) --- Vagrantfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index 2235d9c2e..552711d63 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -7,6 +7,8 @@ Vagrant.configure(2) do |config| # VMware/Virtualbox ( and also Hyperv/Parallels) 64 bit config.vm.box = "generic/debian9" + + config.vm.synced_folder '.', '/vagrant' # This section allows you to customize the Virtualbox VM # settings, ie showing the GUI or upping the memory @@ -64,7 +66,7 @@ Vagrant.configure(2) do |config| # If this causes issues you can run a 'vagrant destroy' and then # add a # before ,run: (or change "always" to "once") and run 'vagrant up' to get a working # non-updated box and then attempt to troubleshoot or open a Github issue - config.vm.provision "shell", inline: "/bin/sh -c 'yes | /vagrant/util/qmk_install.sh'", run: "always" + config.vm.provision "shell", inline: "/vagrant/util/qmk_install.sh", run: "always" config.vm.post_up_message = <<-EOT From f542c0589bec06501a3990070c08638a9124f055 Mon Sep 17 00:00:00 2001 From: Mike Roberts Date: Sat, 11 May 2019 21:12:06 -0400 Subject: [PATCH 009/341] NEK Type A (#5175) * project creation and config.h import * fix name * cleanup * layout for left * working left with feather pins * full keymap * ? * let's do this * non working twimaster version * it fucking works! * bluetooth! * cleanup * use auto output for ADAFRUIT_BLE * remove auto from custom matrix * better ble auto * fix f1 * revert * fix ble * update readme * Update readme.md * Update readme.md --- keyboards/nek_type_a/config.h | 55 +++ keyboards/nek_type_a/info.json | 0 keyboards/nek_type_a/keymaps/default/config.h | 19 + keyboards/nek_type_a/keymaps/default/keymap.c | 39 ++ .../nek_type_a/keymaps/default/readme.md | 3 + keyboards/nek_type_a/matrix.c | 412 ++++++++++++++++++ keyboards/nek_type_a/mcp23017.c | 107 +++++ keyboards/nek_type_a/mcp23017.h | 71 +++ keyboards/nek_type_a/nek_type_a.c | 43 ++ keyboards/nek_type_a/nek_type_a.h | 58 +++ keyboards/nek_type_a/readme.md | 30 ++ keyboards/nek_type_a/rules.mk | 33 ++ 12 files changed, 870 insertions(+) create mode 100644 keyboards/nek_type_a/config.h create mode 100644 keyboards/nek_type_a/info.json create mode 100644 keyboards/nek_type_a/keymaps/default/config.h create mode 100644 keyboards/nek_type_a/keymaps/default/keymap.c create mode 100644 keyboards/nek_type_a/keymaps/default/readme.md create mode 100644 keyboards/nek_type_a/matrix.c create mode 100644 keyboards/nek_type_a/mcp23017.c create mode 100644 keyboards/nek_type_a/mcp23017.h create mode 100644 keyboards/nek_type_a/nek_type_a.c create mode 100644 keyboards/nek_type_a/nek_type_a.h create mode 100644 keyboards/nek_type_a/readme.md create mode 100644 keyboards/nek_type_a/rules.mk diff --git a/keyboards/nek_type_a/config.h b/keyboards/nek_type_a/config.h new file mode 100644 index 000000000..782b91d0e --- /dev/null +++ b/keyboards/nek_type_a/config.h @@ -0,0 +1,55 @@ +/* +Copyright 2018 Mike Roberts + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER miker +#define PRODUCT nek_type_a +#define DESCRIPTION NEK Type A + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 18 + +/* left columns are all onboard, right columns all on expander */ +#define COL_EXPANDED { false, false, false, false, false, false, false, true, true, true, true, true, true, true, true, true, true, true} +#define MATRIX_COL_PINS { C6, D7, B5, B6, B7, D6, D3, GPA0, GPA1, GPA2, GPA3, GPA4, GPA5, GPA6, GPA7, GPB0, GPB1, GPB2 } +#define MATRIX_ROW_PINS { F7, F6, F5, F4, F1, F0 } + +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + + diff --git a/keyboards/nek_type_a/info.json b/keyboards/nek_type_a/info.json new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/nek_type_a/keymaps/default/config.h b/keyboards/nek_type_a/keymaps/default/config.h new file mode 100644 index 000000000..5c2aaa2f3 --- /dev/null +++ b/keyboards/nek_type_a/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 Mike Roberts + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/nek_type_a/keymaps/default/keymap.c b/keyboards/nek_type_a/keymaps/default/keymap.c new file mode 100644 index 000000000..627aa4590 --- /dev/null +++ b/keyboards/nek_type_a/keymaps/default/keymap.c @@ -0,0 +1,39 @@ +/* Copyright 2018 Mike Roberts + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, 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__MUTE, KC__VOLDOWN, KC__VOLUP, \ + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPACE, KC_INSERT, KC_HOME, 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_LBRACKET, KC_RBRACKET, KC_BSLASH, KC_DELETE, KC_END, KC_PGDOWN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, KC_ENTER, \ + KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSHIFT, KC_UP, \ + KC_LCTRL, KC_LALT, KC_LCMD, KC_SPC, KC_SPC, KC_RCMD, KC_RALT, KC_RCTRL, KC_APP, KC_LEFT, KC_DOWN, KC_RIGHT \ + ), +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/nek_type_a/keymaps/default/readme.md b/keyboards/nek_type_a/keymaps/default/readme.md new file mode 100644 index 000000000..763125cea --- /dev/null +++ b/keyboards/nek_type_a/keymaps/default/readme.md @@ -0,0 +1,3 @@ +![NEK Type A Layout](https://i.imgur.com/ElEVvze.png) + +# Default NEK Type A Keymap diff --git a/keyboards/nek_type_a/matrix.c b/keyboards/nek_type_a/matrix.c new file mode 100644 index 000000000..525296b1f --- /dev/null +++ b/keyboards/nek_type_a/matrix.c @@ -0,0 +1,412 @@ +/* +Copyright 2012-2018 Jun Wako, Jack Humbert, Mike Roberts + +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 . +*/ + +/* + * This matrix.c has been hacked up to support some columns being on an ex pander in ROW2COL mode. + * The columns are only ever selected and unselected, never read. Unselecting a single column via the expander is not + * implemented because updating one column costs the same as updating all the columns in a bank. Currently both banks + * are unselected but two i2c transactions could be removed if we only unselect the the proper half. + */ + +#include +#include +#if defined(__AVR__) +#include +#endif +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "timer.h" +#include "mcp23017.h" +#include "outputselect.h" + +/* Set 0 if debouncing isn't needed */ + +#ifndef DEBOUNCING_DELAY +# define DEBOUNCING_DELAY 5 +#endif + +#if (DEBOUNCING_DELAY > 0) + static uint16_t debouncing_time; + static bool debouncing = false; +#endif + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +#ifdef MATRIX_MASKED + extern const matrix_row_t matrix_mask[]; +#endif + +#if (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) +static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; +static const bool col_expanded[MATRIX_COLS] = COL_EXPANDED; +#endif + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; + +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + + +#if (DIODE_DIRECTION == COL2ROW) + static void init_cols(void); + static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row); + static void unselect_rows(void); + static void select_row(uint8_t row); + static void unselect_row(uint8_t row); +#elif (DIODE_DIRECTION == ROW2COL) + static void init_rows(void); + static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); + static void unselect_cols(void); + static void unselect_col(uint8_t col); + static void select_col(uint8_t col); +#endif + +__attribute__ ((weak)) +void matrix_init_quantum(void) { + expander_init(); + matrix_init_kb(); +} + +__attribute__ ((weak)) +void matrix_scan_quantum(void) { + matrix_scan_kb(); +} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +void matrix_init(void) { + // initialize row and col +#if (DIODE_DIRECTION == COL2ROW) + unselect_rows(); + init_cols(); +#elif (DIODE_DIRECTION == ROW2COL) + unselect_cols(); + init_rows(); +#endif + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + + matrix_init_quantum(); + set_output(OUTPUT_AUTO); +} + +uint8_t matrix_scan(void) +{ + +#if (DIODE_DIRECTION == COL2ROW) + + // Set row, read cols + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { +# if (DEBOUNCING_DELAY > 0) + bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row); + + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + } + +# else + read_cols_on_row(matrix, current_row); +# endif + + } + +#elif (DIODE_DIRECTION == ROW2COL) + + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { +# if (DEBOUNCING_DELAY > 0) + bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col); + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + } +# else + read_rows_on_col(matrix, current_col); +# endif + + } + +#endif + +# if (DEBOUNCING_DELAY > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = matrix_debouncing[i]; + } + debouncing = false; + } +# endif + + matrix_scan_quantum(); + return 1; +} + +bool matrix_is_modified(void) +{ +#if (DEBOUNCING_DELAY > 0) + if (debouncing) return false; +#endif + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) +{ + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + wait_us(30); + + // For each col... + for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + + // Select the col pin to read (active low) + uint8_t pin = col_pins[col_index]; + uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)); + + // Populate the matrix row with the state of the col pin + current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); + } + + // Unselect row + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + +static void select_row(uint8_t row) +{ + uint8_t pin = row_pins[row]; + _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW +} + +static void unselect_row(uint8_t row) +{ + uint8_t pin = row_pins[row]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI +} + +static void unselect_rows(void) +{ + for(uint8_t x = 0; x < MATRIX_ROWS; x++) { + uint8_t pin = row_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +#elif (DIODE_DIRECTION == ROW2COL) + +static void init_rows(void) +{ + for(uint8_t x = 0; x < MATRIX_ROWS; x++) { + uint8_t pin = row_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) +{ + bool matrix_changed = false; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + wait_us(30); + + // For each row... + for(uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) + { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[row_index]; + + // Check row pin state + if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0) + { + // Pin LO, set col bit + current_matrix[row_index] |= (ROW_SHIFTER << current_col); + } + else + { + // Pin HI, clear col bit + current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) + { + matrix_changed = true; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +static void select_col(uint8_t col) +{ + uint8_t pin = col_pins[col]; + if (col_expanded[col]) + { + expander_select(pin); + } + else + { + _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW + } +} + + +static void unselect_col(uint8_t col) +{ + uint8_t pin = col_pins[col]; + if (col_expanded[col]) + { + expander_unselect_all(); + } + else + { + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +static void unselect_cols(void) +{ + expander_unselect_all(); + + for(uint8_t col = 0; col < MATRIX_COLS; col++) { + uint8_t pin = col_pins[col]; + if (!col_expanded[col]) + { + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } + } +} + +#endif diff --git a/keyboards/nek_type_a/mcp23017.c b/keyboards/nek_type_a/mcp23017.c new file mode 100644 index 000000000..e24231680 --- /dev/null +++ b/keyboards/nek_type_a/mcp23017.c @@ -0,0 +1,107 @@ +/* Copyright 2018 Mike Roberts + * + * 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 . + */ +#include +#include "action.h" +#include "lib/lufa/LUFA/Drivers/Peripheral/TWI.h" +#include "lib/lufa/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c" +#include "mcp23017.h" +#include "debug.h" +#include "wait.h" + +uint8_t bit_for_pin(uint8_t pin); + +uint8_t expander_write(uint8_t reg, uint8_t data); + +uint8_t expander_read(uint8_t reg, uint8_t *data); + +void expander_config(void); + +static const char *twi_err_str(uint8_t res) { + switch (res) { + case TWI_ERROR_NoError: + return "OK"; + case TWI_ERROR_BusFault: + return "BUSFAULT"; + case TWI_ERROR_BusCaptureTimeout: + return "BUSTIMEOUT"; + case TWI_ERROR_SlaveResponseTimeout: + return "SLAVETIMEOUT"; + case TWI_ERROR_SlaveNotReady: + return "SLAVENOTREADY"; + case TWI_ERROR_SlaveNAK: + return "SLAVENAK"; + default: + return "UNKNOWN"; + } +} + +void expander_init(void) { + TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 400000)); +} + +// set IN and HI +void expander_unselect_all() { + expander_write(EXPANDER_REG_IODIRA, 0xff); + expander_write(EXPANDER_REG_IODIRB, 0xff); + expander_write(EXPANDER_REG_OLATA, 0xff); + expander_write(EXPANDER_REG_OLATB, 0xff); + wait_us(EXPANDER_PAUSE); +} + +// set OUT and LOW +void expander_select(uint8_t pin) { + const uint8_t mask = 0xff & ~(1 << bit_for_pin(pin)); + if (pin < 8) { + expander_write(EXPANDER_REG_IODIRA, mask); + expander_write(EXPANDER_REG_OLATA, mask); + } else { + expander_write(EXPANDER_REG_IODIRB, mask); + expander_write(EXPANDER_REG_OLATB, mask); + } + wait_us(EXPANDER_PAUSE); +} + +void expander_config() { + // set everything to input + expander_write(EXPANDER_REG_IODIRA, 0xff); + expander_write(EXPANDER_REG_IODIRB, 0xff); + + // turn on pull-ups + expander_write(EXPANDER_REG_GPPUA, 0xff); + expander_write(EXPANDER_REG_GPPUB, 0xff); + + // disable interrupts + expander_write(EXPANDER_REG_GPINTENA, 0x0); + expander_write(EXPANDER_REG_GPINTENB, 0x0); + + // polarity + expander_write(EXPANDER_REG_IPOLA, 0x0); + expander_write(EXPANDER_REG_IPOLB, 0x0); +} + +uint8_t bit_for_pin(uint8_t pin) { + return pin % 8; +} + +uint8_t expander_write(uint8_t reg, unsigned char val) { + uint8_t addr = reg; + uint8_t result = TWI_WritePacket(EXPANDER_ADDR << 1, I2C_TIMEOUT, &addr, sizeof(addr), &val, sizeof(val)); + if (result) { + xprintf("mcp: set_register %d = %d failed: %s\n", reg, val, twi_err_str(result)); + } + return result == 0; +} + diff --git a/keyboards/nek_type_a/mcp23017.h b/keyboards/nek_type_a/mcp23017.h new file mode 100644 index 000000000..41c747bea --- /dev/null +++ b/keyboards/nek_type_a/mcp23017.h @@ -0,0 +1,71 @@ +/* Copyright 2018 Mike Roberts + * + * 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 . + */ +#ifndef MAP23017_H +#define MAP23017_H + +#define EXPANDER_ADDR 0x27 +#define I2C_TIMEOUT 200 // milliseconds +#define EXPANDER_PAUSE 0 // microseconds + +enum EXPANDER_REGISTERS { + EXPANDER_REG_IODIRA = 0x00, + EXPANDER_REG_IODIRB = 0x01, + EXPANDER_REG_IPOLA = 0x02, + EXPANDER_REG_IPOLB = 0x03, + EXPANDER_REG_GPINTENA = 0x04, + EXPANDER_REG_GPINTENB = 0x05, + EXPANDER_REG_DEFVALA = 0x06, + EXPANDER_REG_DEFVALB = 0x07, + EXPANDER_REG_INTCONA = 0x08, + EXPANDER_REG_INTCONB = 0x09, + EXPANDER_REG_IOCONA = 0x0A, + EXPANDER_REG_IOCONB = 0x0B, + EXPANDER_REG_GPPUA = 0x0C, + EXPANDER_REG_GPPUB = 0x0D, + EXPANDER_REG_INTFA = 0x0E, + EXPANDER_REG_INTFB = 0x0F, + EXPANDER_REG_INTCAPA = 0x10, + EXPANDER_REG_INTCAPB = 0x11, + EXPANDER_REG_GPIOA = 0x12, + EXPANDER_REG_GPIOB = 0x13, + EXPANDER_REG_OLATA = 0x14, + EXPANDER_REG_OLATB = 0x15 +}; + +#define GPA0 0x0 +#define GPA1 0x1 +#define GPA2 0x2 +#define GPA3 0x3 +#define GPA4 0x4 +#define GPA5 0x5 +#define GPA6 0x6 +#define GPA7 0x7 +#define GPB0 0x8 +#define GPB1 0x9 +#define GPB2 0xA +#define GPB3 0xB +#define GPB4 0xC +#define GPB5 0xD +#define GPB6 0xE +#define GPB7 0xF + + +void expander_init(void); +void expander_select(uint8_t pin); +void expander_unselect(uint8_t pin); +void expander_unselect_all(void); + +#endif \ No newline at end of file diff --git a/keyboards/nek_type_a/nek_type_a.c b/keyboards/nek_type_a/nek_type_a.c new file mode 100644 index 000000000..ec76a209b --- /dev/null +++ b/keyboards/nek_type_a/nek_type_a.c @@ -0,0 +1,43 @@ +/* Copyright 2018 Mike Roberts + * + * 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 . + */ +#include "nek_type_a.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/nek_type_a/nek_type_a.h b/keyboards/nek_type_a/nek_type_a.h new file mode 100644 index 000000000..9bf6028cb --- /dev/null +++ b/keyboards/nek_type_a/nek_type_a.h @@ -0,0 +1,58 @@ +/* Copyright 2018 REPLACE_WITH_YOUR_NAME + * + * 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 . + */ +#ifndef NEK_TYPE_A_H +#define NEK_TYPE_A_H + +#include "quantum.h" +#include +#include +#include + +#define I2C_ADDR 0b0100000 +#define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE ) +#define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ ) +#define IODIRA 0x00 // i/o direction register +#define IODIRB 0x01 +#define GPPUA 0x0C // GPIO pull-up resistor register +#define GPPUB 0x0D +#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT) +#define GPIOB 0x13 +#define OLATA 0x14 // output latch register +#define OLATB 0x15 + +extern uint8_t expander_status; +extern uint8_t expander_input_pin_mask; +extern bool i2c_initialized; + +void init_expander(void); + +#define LAYOUT( \ + L12, L14, L15, L16, L17, R11, R12, R13, R14, R15, R16, R17, R18, R19, R1A, R1B, \ + L21, L22, L23, L24, L25, L26, L27, R21, R22, R23, R24, R25, R26, R28, R29, R2A, R2B, \ + L31, L32, L33, L34, L35, L36, R31, R32, R33, R34, R35, R36, R37, R38, R39, R3A, R3B, \ + L41, L42, L43, L44, L45, L46, R41, R42, R43, R44, R45, R46, R48, \ + L51, L52, L53, L54, L55, L56, R51, R52, R53, R54, R55, R58, R5A, \ + L61, L62, L63, L65, R61, R63, R65, R66, R68, R69, R6A, R6B \ +) \ +{ \ + { KC_NO, L12, KC_NO, L14, L15, L16, L17, R11, R12, R13, R14, R15, R16, R17, R18, R19, R1A, R1B }, \ + { L21, L22, L23, L24, L25, L26, L27, R21, R22, R23, R24, R25, R26, KC_NO, R28, R29, R2A, R2B }, \ + { L31, L32, L33, L34, L35, L36, KC_NO, R31, R32, R33, R34, R35, R36, R37, R38, R39, R3A, R3B }, \ + { L41, L42, L43, L44, L45, L46, KC_NO, R41, R42, R43, R44, R45, R46, KC_NO, R48, KC_NO, KC_NO, KC_NO }, \ + { L51, L52, L53, L54, L55, L56, KC_NO, R51, R52, R53, R54, R55, KC_NO, KC_NO, R58, KC_NO, R5A, KC_NO }, \ + { L61, L62, L63, KC_NO, L65, KC_NO, KC_NO, R61, KC_NO, R63, KC_NO, R65, R66, KC_NO, R68, R69, R6A, R6B }, \ +} +#endif diff --git a/keyboards/nek_type_a/readme.md b/keyboards/nek_type_a/readme.md new file mode 100644 index 000000000..49f4a4659 --- /dev/null +++ b/keyboards/nek_type_a/readme.md @@ -0,0 +1,30 @@ +# nek_type_a + +![NEK Type A Keyboard](https://i.imgur.com/XFnjlQ9.jpg) + +Natural Ergonomic Keyboard, Type A + +Keyboard Maintainer: [Mike Roberts](https://github.com/ecopoesis) +Hardware Supported: Custom PCBs from https://github.com/ecopoesis/nek-type-a +Hardware Availability: https://github.com/ecopoesis/nek-type-a + +## Design + +This is a column-driven split keyboard using three custom PCBs connected with ribbon cables. The left and right PCBs are +passive: they only have the diodes and switches needed to make the matrix. The center PCB has an Adafruit Feather 32u4 and +MCP23017 expander. + +The left matrix has its rows and columns directly connected to the Feather. The right matrix has its rows connect to the +Feather (using the same pins as the left matrix) and its columns connected to the expander. The expander uses the LUFA +hardware TWI driver. + +Bluetooth is enabled. + +## Building + +Make and install this keyboard (after setting up your build environment): +``` +make nek_type_a:default:avrdude +``` + +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). diff --git a/keyboards/nek_type_a/rules.mk b/keyboards/nek_type_a/rules.mk new file mode 100644 index 000000000..6f172a9ce --- /dev/null +++ b/keyboards/nek_type_a/rules.mk @@ -0,0 +1,33 @@ +SRC = matrix.c mcp23017.c + +MCU = atmega32u4 +F_CPU = 8000000 + +ARCH = AVR8 +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +BOOTLOADER = caterina + +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 +# 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +CUSTOM_MATRIX = yes +DEBUG_ENABLE = yes +BLUETOOTH = AdafruitBLE \ No newline at end of file From ec302295b695e43c5967a6f806c4b4505c651e13 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sat, 11 May 2019 22:16:07 -0700 Subject: [PATCH 010/341] [Keyboard] Z-150 Blackheart refactor (#5823) * Fix white space on z150_blackheart.h * Update z150_blackheart.h to use #pragma once include guard * Update z150_blackheart.h to use QMK-preferred K notation * Add QMK Configurator support * Refactor the keymaps - refactor the keymaps into separate files for each layout macro - give credit where credit is due - white space update (four-space indent) * Make Hardware Availability link in readme a rich text link * Convert LED indicators to GPIO commands * Elevate Indicator LED set-up and toggling to keyboard level --- keyboards/z150_blackheart/info.json | 191 ++++++++++++++++++ .../z150_blackheart/keymaps/default/keymap.c | 81 +++----- .../keymaps/default_tkl/keymap.c | 48 +++++ keyboards/z150_blackheart/readme.md | 2 +- keyboards/z150_blackheart/z150_blackheart.c | 31 +++ keyboards/z150_blackheart/z150_blackheart.h | 45 ++--- 6 files changed, 322 insertions(+), 76 deletions(-) create mode 100644 keyboards/z150_blackheart/info.json create mode 100644 keyboards/z150_blackheart/keymaps/default_tkl/keymap.c diff --git a/keyboards/z150_blackheart/info.json b/keyboards/z150_blackheart/info.json new file mode 100644 index 000000000..016641254 --- /dev/null +++ b/keyboards/z150_blackheart/info.json @@ -0,0 +1,191 @@ +{ + "keyboard_name": "Z-150 Blackheart", + "url": "", + "maintainer": "qmk, blindassassin111", + "width": 21.25, + "height": 5, + "layouts": { + "LAYOUT": { + "key_count": 84, + "layout": [ + {"label":"F1", "x":0, "y":0}, + {"label":"F2", "x":1, "y":0}, + {"label":"Esc", "x":2.5, "y":0}, + {"label":"!", "x":3.5, "y":0}, + {"label":"@", "x":4.5, "y":0}, + {"label":"#", "x":5.5, "y":0}, + {"label":"$", "x":6.5, "y":0}, + {"label":"%", "x":7.5, "y":0}, + {"label":"^", "x":8.5, "y":0}, + {"label":"&", "x":9.5, "y":0}, + {"label":"*", "x":10.5, "y":0}, + {"label":"(", "x":11.5, "y":0}, + {"label":")", "x":12.5, "y":0}, + {"label":"_", "x":13.5, "y":0}, + {"label":"+", "x":14.5, "y":0}, + {"label":"Backspace", "x":15.5, "y":0, "w":1.75}, + {"label":"Num Lock", "x":17.25, "y":0}, + {"label":"Scroll Lock", "x":18.25, "y":0, "w":1.5}, + {"label":"Sys Req", "x":19.75, "y":0, "w":1.5}, + {"label":"F3", "x":0, "y":1}, + {"label":"F4", "x":1, "y":1}, + {"label":"Tab", "x":2.5, "y":1, "w":1.5}, + {"label":"Q", "x":4, "y":1}, + {"label":"W", "x":5, "y":1}, + {"label":"E", "x":6, "y":1}, + {"label":"R", "x":7, "y":1}, + {"label":"T", "x":8, "y":1}, + {"label":"Y", "x":9, "y":1}, + {"label":"U", "x":10, "y":1}, + {"label":"I", "x":11, "y":1}, + {"label":"O", "x":12, "y":1}, + {"label":"P", "x":13, "y":1}, + {"label":"{", "x":14, "y":1}, + {"label":"}", "x":15, "y":1, "w":1.25}, + {"label":"Enter", "x":15.25, "y":2, "w":2}, + {"label":"7", "x":17.25, "y":1}, + {"label":"8", "x":18.25, "y":1}, + {"label":"9", "x":19.25, "y":1}, + {"label":"PrtSc", "x":20.25, "y":1}, + {"label":"F5", "x":0, "y":2}, + {"label":"F6", "x":1, "y":2}, + {"label":"Ctrl", "x":2.5, "y":2, "w":1.75}, + {"label":"A", "x":4.25, "y":2}, + {"label":"S", "x":5.25, "y":2}, + {"label":"D", "x":6.25, "y":2}, + {"label":"F", "x":7.25, "y":2}, + {"label":"G", "x":8.25, "y":2}, + {"label":"H", "x":9.25, "y":2}, + {"label":"J", "x":10.25, "y":2}, + {"label":"K", "x":11.25, "y":2}, + {"label":"L", "x":12.25, "y":2}, + {"label":":", "x":13.25, "y":2}, + {"label":"\"", "x":14.25, "y":2}, + {"label":"4", "x":17.25, "y":2}, + {"label":"5", "x":18.25, "y":2}, + {"label":"6", "x":19.25, "y":2}, + {"label":"-", "x":20.25, "y":2}, + {"label":"F7", "x":0, "y":3}, + {"label":"F8", "x":1, "y":3}, + {"label":"Shift", "x":2.5, "y":3, "w":2.25}, + {"label":"Z", "x":4.75, "y":3}, + {"label":"X", "x":5.75, "y":3}, + {"label":"C", "x":6.75, "y":3}, + {"label":"V", "x":7.75, "y":3}, + {"label":"B", "x":8.75, "y":3}, + {"label":"N", "x":9.75, "y":3}, + {"label":"M", "x":10.75, "y":3}, + {"label":"<", "x":11.75, "y":3}, + {"label":">", "x":12.75, "y":3}, + {"label":"?", "x":13.75, "y":3}, + {"label":"Shift", "x":14.75, "y":3, "w":1.5}, + {"label":"|", "x":16.25, "y":3}, + {"label":"1", "x":17.25, "y":3}, + {"label":"2", "x":18.25, "y":3}, + {"label":"3", "x":19.25, "y":3}, + {"label":"+", "x":20.25, "y":3, "h":2}, + {"label":"F9", "x":0, "y":4}, + {"label":"F10", "x":1, "y":4}, + {"label":"Alt", "x":2.5, "y":4, "w":1.75}, + {"label":"~", "x":4.25, "y":4}, + {"label":"Space", "x":5.25, "y":4, "w":9}, + {"label":"Caps Lock", "x":14.25, "y":4, "w":2}, + {"label":"0", "x":16.25, "y":4, "w":2}, + {"label":".", "x":18.25, "y":4, "w":2} + ] + }, + "LAYOUT_z150_tkl": { + "key_count": 88, + "layout": [ + {"label":"F1", "x":0, "y":0}, + {"label":"F2", "x":1, "y":0}, + {"label":"Esc", "x":2.5, "y":0}, + {"label":"1", "x":3.5, "y":0}, + {"label":"2", "x":4.5, "y":0}, + {"label":"3", "x":5.5, "y":0}, + {"label":"4", "x":6.5, "y":0}, + {"label":"5", "x":7.5, "y":0}, + {"label":"6", "x":8.5, "y":0}, + {"label":"7", "x":9.5, "y":0}, + {"label":"8", "x":10.5, "y":0}, + {"label":"9", "x":11.5, "y":0}, + {"label":"0", "x":12.5, "y":0}, + {"label":"-", "x":13.5, "y":0}, + {"label":"=", "x":14.5, "y":0}, + {"label":"Backspace", "x":15.5, "y":0, "w":2}, + {"label":"Insert", "x":18.25, "y":0}, + {"label":"Home", "x":19.25, "y":0}, + {"label":"PgUp", "x":20.25, "y":0}, + {"label":"F3", "x":0, "y":1}, + {"label":"F4", "x":1, "y":1}, + {"label":"Tab", "x":2.5, "y":1, "w":1.5}, + {"label":"Q", "x":4, "y":1}, + {"label":"W", "x":5, "y":1}, + {"label":"E", "x":6, "y":1}, + {"label":"R", "x":7, "y":1}, + {"label":"T", "x":8, "y":1}, + {"label":"Y", "x":9, "y":1}, + {"label":"U", "x":10, "y":1}, + {"label":"I", "x":11, "y":1}, + {"label":"O", "x":12, "y":1}, + {"label":"P", "x":13, "y":1}, + {"label":"[", "x":14, "y":1}, + {"label":"]", "x":15, "y":1}, + {"label":"\\", "x":16, "y":1, "w":1.5}, + {"label":"Delete", "x":18.25, "y":1}, + {"label":"End", "x":19.25, "y":1}, + {"label":"PgDn", "x":20.25, "y":1}, + {"label":"F5", "x":0, "y":2}, + {"label":"F6", "x":1, "y":2}, + {"label":"Caps Lock", "x":2.5, "y":2, "w":1.75}, + {"label":"A", "x":4.25, "y":2}, + {"label":"S", "x":5.25, "y":2}, + {"label":"D", "x":6.25, "y":2}, + {"label":"F", "x":7.25, "y":2}, + {"label":"G", "x":8.25, "y":2}, + {"label":"H", "x":9.25, "y":2}, + {"label":"J", "x":10.25, "y":2}, + {"label":"K", "x":11.25, "y":2}, + {"label":"L", "x":12.25, "y":2}, + {"label":";", "x":13.25, "y":2}, + {"label":"'", "x":14.25, "y":2}, + {"label":"Enter", "x":15.25, "y":2, "w":2.25}, + {"x":18.25, "y":2}, + {"x":19.25, "y":2}, + {"x":20.25, "y":2}, + {"label":"F7", "x":0, "y":3}, + {"label":"F8", "x":1, "y":3}, + {"label":"Shift", "x":2.5, "y":3, "w":1.25}, + {"label":"ISO \\", "x":3.75, "y":3}, + {"label":"Z", "x":4.75, "y":3}, + {"label":"X", "x":5.75, "y":3}, + {"label":"C", "x":6.75, "y":3}, + {"label":"V", "x":7.75, "y":3}, + {"label":"B", "x":8.75, "y":3}, + {"label":"N", "x":9.75, "y":3}, + {"label":"M", "x":10.75, "y":3}, + {"label":",", "x":11.75, "y":3}, + {"label":".", "x":12.75, "y":3}, + {"label":"/", "x":13.75, "y":3}, + {"label":"Shift", "x":14.75, "y":3, "w":1.75}, + {"label":"Fn", "x":16.5, "y":3}, + {"x":18.25, "y":3}, + {"label":"Up", "x":19.25, "y":3}, + {"x":20.25, "y":3}, + {"label":"F9", "x":0, "y":4}, + {"label":"F10", "x":1, "y":4}, + {"label":"Ctrl", "x":2.5, "y":4, "w":1.25}, + {"label":"Win", "x":3.75, "y":4, "w":1.25}, + {"label":"Alt", "x":5, "y":4, "w":1.25}, + {"label":"Space", "x":6.25, "y":4, "w":6.25}, + {"label":"Alt", "x":12.5, "y":4, "w":1.25}, + {"label":"Win", "x":13.75, "y":4, "w":1.25}, + {"label":"Menu", "x":15, "y":4, "w":1.25}, + {"label":"Ctrl", "x":16.25, "y":4, "w":1.25}, + {"label":"Left", "x":18.25, "y":4}, + {"label":"Down", "x":19.25, "y":4}, + {"label":"Right", "x":20.25, "y":4} + ] + } + } +} diff --git a/keyboards/z150_blackheart/keymaps/default/keymap.c b/keyboards/z150_blackheart/keymaps/default/keymap.c index e93802052..ff4f6f7f9 100644 --- a/keyboards/z150_blackheart/keymaps/default/keymap.c +++ b/keyboards/z150_blackheart/keymaps/default/keymap.c @@ -1,38 +1,37 @@ +/* Copyright 2018 blindassassin111 + * + * 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 . + */ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - LAYOUT( - KC_F1, KC_F2, KC_ESC, 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_NLCK, KC_SLCK, MO(1), - KC_F3, KC_F4, 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_ENT, KC_P7, KC_P8, KC_P9, KC_PAST, - KC_F5, KC_F6, KC_LCTRL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_P4, KC_P5, KC_P6, KC_PMNS, - KC_F7, KC_F8, 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_BSLS, KC_P1, KC_P2, KC_P3, KC_PPLS, - KC_F9, KC_F10, KC_LALT, KC_GRV, KC_SPC, KC_CAPS, KC_P0, KC_PDOT - ), + [0] = LAYOUT( + KC_F1, KC_F2, KC_ESC, 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_NLCK, KC_SLCK, MO(1), + KC_F3, KC_F4, 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_ENT, KC_P7, KC_P8, KC_P9, KC_PAST, + KC_F5, KC_F6, 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_P4, KC_P5, KC_P6, KC_PMNS, + KC_F7, KC_F8, 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_BSLS, KC_P1, KC_P2, KC_P3, KC_PPLS, + KC_F9, KC_F10, KC_LALT, KC_GRV, KC_SPC, KC_CAPS, KC_P0, KC_PDOT + ), - LAYOUT( - _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______ - ), - - LAYOUT_z150_tkl( - KC_F1, KC_F2, KC_ESC, 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_INS, KC_HOME, KC_PGUP, - KC_F3, KC_F4, 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_DEL, KC_END, KC_PGDN, - KC_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, - KC_F7, KC_F8, KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, MO(1), XXXXXXX, KC_UP, XXXXXXX, - KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT - ), - - LAYOUT_z150_tkl( - _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), + [1] = LAYOUT( + _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), }; void matrix_init_user(void) { @@ -42,28 +41,8 @@ void matrix_scan_user(void) { } bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; + return true; } void led_set_user(uint8_t usb_led) { - DDRB |= (1 << 0); - DDRE |= (1 << 6) | (1 << 7); - - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - PORTE |= (1 << 7); - } else { - PORTE &= ~(1 << 7); - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - PORTB |= (1 << 0); - } else { - PORTB &= ~(1 << 0); - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - PORTE |= (1 << 6); - } else { - PORTE &= ~(1 << 6); - } } \ No newline at end of file diff --git a/keyboards/z150_blackheart/keymaps/default_tkl/keymap.c b/keyboards/z150_blackheart/keymaps/default_tkl/keymap.c new file mode 100644 index 000000000..f1a24b8dd --- /dev/null +++ b/keyboards/z150_blackheart/keymaps/default_tkl/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2018 blindassassin111 + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_z150_tkl( + KC_F1, KC_F2, KC_ESC, 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_INS, KC_HOME, KC_PGUP, + KC_F3, KC_F4, 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_DEL, KC_END, KC_PGDN, + KC_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, + KC_F7, KC_F8, KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), XXXXXXX, KC_UP, XXXXXXX, + KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_z150_tkl( + _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { +} \ No newline at end of file diff --git a/keyboards/z150_blackheart/readme.md b/keyboards/z150_blackheart/readme.md index 5e87b6c8f..331f85694 100644 --- a/keyboards/z150_blackheart/readme.md +++ b/keyboards/z150_blackheart/readme.md @@ -5,7 +5,7 @@ A replacement PCB for Zenith Z-150 keyboards. Keyboard Maintainer: QMK Community and blindassassin111 Hardware Supported: Z-150 blackheart PCB -Hardware Availability: https://deskthority.net/group-buys-f50/programmable-vintage-board-pcbs-omnikey-at101-and-z-150-t19325.html +Hardware Availability: [Deskthority Group Buy](https://deskthority.net/group-buys-f50/programmable-vintage-board-pcbs-omnikey-at101-and-z-150-t19325.html) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/z150_blackheart/z150_blackheart.c b/keyboards/z150_blackheart/z150_blackheart.c index 10f388cf6..b754c64a1 100644 --- a/keyboards/z150_blackheart/z150_blackheart.c +++ b/keyboards/z150_blackheart/z150_blackheart.c @@ -1 +1,32 @@ #include "z150_blackheart.h" + +void matrix_init_kb(void) { + setPinOutput(B0); + setPinOutput(E6); + setPinOutput(E7); + + matrix_init_user(); +}; + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinHigh(E7); + } else { + writePinLow(E7); + } + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinHigh(B0); + } else { + writePinLow(B0); + } + + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinHigh(E6); + } else { + writePinLow(E6); + } + + led_set_user(usb_led); +} diff --git a/keyboards/z150_blackheart/z150_blackheart.h b/keyboards/z150_blackheart/z150_blackheart.h index baf187fd2..f97ac1c03 100644 --- a/keyboards/z150_blackheart/z150_blackheart.h +++ b/keyboards/z150_blackheart/z150_blackheart.h @@ -1,34 +1,31 @@ -#ifndef z150_blackheart_H -#define z150_blackheart_H +#pragma once #include "quantum.h" #define LAYOUT( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K019, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, K216, K217, K218, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, \ - K400, K401, K402, K403, K407, K414, K415, K417 \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0J, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, K2G, K2H, K2I, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, \ + K40, K41, K42, K43, K47, K4E, K4F, K4H \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, KC_NO, K019 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215, K216, K217, K218, KC_NO }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, KC_NO }, \ - { K400, K401, K402, K403, KC_NO, KC_NO, KC_NO, K407, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K414, K415, KC_NO, K417, KC_NO, KC_NO } \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, KC_NO, K0J }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F, K2G, K2H, K2I, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, KC_NO }, \ + { K40, K41, K42, K43, KC_NO, KC_NO, KC_NO, K47, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K4E, K4F, KC_NO, K4H, KC_NO, KC_NO } \ } #define LAYOUT_z150_tkl( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K017, K018, K019, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K117, K118, K119, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, K217, K218, \ - K300, K301, K302, K405, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K316, K317, K318, \ - K400, K401, K402, K403, K404, K407, K412, K413, K414, K415, K416, K417, K418 \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0H, K0I, K0J, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1H, K1I, K1J, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2G, K2H, K2I, \ + K30, K31, K32, K45, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3G, K3H, K3I, \ + K40, K41, K42, K43, K44, K47, K4C, K4D, K4E, K4F, K4G, K4H, K4I \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, KC_NO, K017, K018, K019 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, KC_NO, K117, K118, K119 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, KC_NO, K216, K217, K218, KC_NO }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, KC_NO, K316, K317, K318, KC_NO }, \ - { K400, K401, K402, K403, K404, K405, KC_NO, K407, KC_NO, KC_NO, KC_NO, KC_NO, K412, K413, K414, K415, K416, K417, K418, KC_NO } \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, KC_NO, K0H, K0I, K0J }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, KC_NO, K1H, K1I, K1J }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, KC_NO, K2G, K2H, K2I, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, KC_NO, K3G, K3H, K3I, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, KC_NO, K47, KC_NO, KC_NO, KC_NO, KC_NO, K4C, K4D, K4E, K4F, K4G, K4H, K4I, KC_NO } \ } - -#endif \ No newline at end of file From c6184d2e7ed9695c22635431394e501b1d5e6271 Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Sun, 12 May 2019 00:20:14 -0500 Subject: [PATCH 011/341] Added check for event pressed to clear space cadet (#5839) * Added check for pressed to clear space cadet * Found some docs to update * Update docs/quantum_keycodes.md Co-Authored-By: fauxpark * Changes from PR --- docs/feature_space_cadet.md | 10 +++++----- docs/keycodes.md | 5 +++++ docs/quantum_keycodes.md | 7 ++++++- quantum/process_keycode/process_space_cadet.c | 12 +++++++----- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/docs/feature_space_cadet.md b/docs/feature_space_cadet.md index 5c375c518..075578522 100644 --- a/docs/feature_space_cadet.md +++ b/docs/feature_space_cadet.md @@ -20,7 +20,7 @@ Firstly, in your keymap, do one of the following: |`KC_RCPC` |Right Control when held, `)` when tapped | |`KC_LAPO` |Left Alt when held, `(` when tapped | |`KC_RAPC` |Right Alt when held, `)` when tapped | -|`KC_SFTENT`|Right Shift when held, `Enter` when tapped | +|`KC_SFTENT`|Right Shift when held, Enter when tapped | ## Caveats @@ -38,10 +38,10 @@ By default Space Cadet assumes a US ANSI layout, but if your layout uses differe |----------------|-------------------------------|---------------------------------------------------------------------------------| |`LSPO_KEYS` |`KC_LSFT, LSPO_MOD, LSPO_KEY` |Send `KC_LSFT` when held, the mod and key defined by `LSPO_MOD` and `LSPO_KEY`. | |`RSPC_KEYS` |`KC_RSFT, RSPC_MOD, RSPC_KEY` |Send `KC_RSFT` when held, the mod and key defined by `RSPC_MOD` and `RSPC_KEY`. | -|`LCPO_KEYS` |`KC_LCTL, KC_LCTL, KC_9` |Send `KC_LCTL` when held, the mod `KC_LCTL` with the key `KC_9` when tapped. | -|`RCPC_KEYS` |`KC_RCTL, KC_RCTL, KC_0` |Send `KC_RCTL` when held, the mod `KC_RCTL` with the key `KC_0` when tapped. | -|`LAPO_KEYS` |`KC_LALT, KC_LALT, KC_9` |Send `KC_LALT` when held, the mod `KC_LALT` with the key `KC_9` when tapped. | -|`RAPC_KEYS` |`KC_RALT, KC_RALT, KC_0` |Send `KC_RALT` when held, the mod `KC_RALT` with the key `KC_0` when tapped. | +|`LCPO_KEYS` |`KC_LCTL, KC_LSFT, KC_9` |Send `KC_LCTL` when held, the mod `KC_LSFT` with the key `KC_9` when tapped. | +|`RCPC_KEYS` |`KC_RCTL, KC_RSFT, KC_0` |Send `KC_RCTL` when held, the mod `KC_RSFT` with the key `KC_0` when tapped. | +|`LAPO_KEYS` |`KC_LALT, KC_LSFT, KC_9` |Send `KC_LALT` when held, the mod `KC_LSFT` with the key `KC_9` when tapped. | +|`RAPC_KEYS` |`KC_RALT, KC_RSFT, KC_0` |Send `KC_RALT` when held, the mod `KC_RSFT` with the key `KC_0` when tapped. | |`SFTENT_KEYS` |`KC_RSFT, KC_TRNS, SFTENT_KEY` |Send `KC_RSFT` when held, no mod with the key `SFTENT_KEY` when tapped. | diff --git a/docs/keycodes.md b/docs/keycodes.md index c0e6aa5c6..e9cfd3425 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -216,6 +216,11 @@ This is a reference only. Each group of keys links to the page documenting their |`KC_GESC` |`GRAVE_ESC`|Escape when tapped, ` when pressed with Shift or GUI| |`KC_LSPO` | |Left Shift when held, `(` when tapped | |`KC_RSPC` | |Right Shift when held, `)` when tapped | +|`KC_LCPO` | |Left Control when held, `(` when tapped | +|`KC_RCPC` | |Right Control when held, `)` when tapped | +|`KC_LAPO` | |Left Alt when held, `(` when tapped | +|`KC_RAPC` | |Right Alt when held, `)` when tapped | +|`KC_SFTENT` | |Right Shift when held, Enter when tapped | |`KC_LEAD` | |The [Leader key](feature_leader_key.md) | |`KC_LOCK` | |The [Lock key](feature_key_lock.md) | |`FUNC(n)` |`F(n)` |Call `fn_action(n)` (deprecated) | diff --git a/docs/quantum_keycodes.md b/docs/quantum_keycodes.md index 90192e632..a2ba34c32 100644 --- a/docs/quantum_keycodes.md +++ b/docs/quantum_keycodes.md @@ -1,6 +1,6 @@ # Quantum Keycodes -Quantum keycodes allow for easier customisation of your keymap than the basic ones provide, without having to define custom actions. +Quantum keycodes allow for easier customization of your keymap than the basic ones provide, without having to define custom actions. All keycodes within quantum are numbers between `0x0000` and `0xFFFF`. Within your `keymap.c` it may look like you have functions and other special cases, but ultimately the C preprocessor will translate those into a single 4 byte integer. QMK has reserved `0x0000` through `0x00FF` for standard keycodes. These are keycodes such as `KC_A`, `KC_1`, and `KC_LCTL`, which are basic keys defined in the USB HID specification. @@ -16,6 +16,11 @@ On this page we have documented keycodes between `0x00FF` and `0xFFFF` which are |`KC_GESC` |`GRAVE_ESC`|Escape when tapped, ` when pressed with Shift or GUI| |`KC_LSPO` | |Left Shift when held, `(` when tapped | |`KC_RSPC` | |Right Shift when held, `)` when tapped | +|`KC_LCPO` | |Left Control when held, `(` when tapped | +|`KC_RCPC` | |Right Control when held, `)` when tapped | +|`KC_LAPO` | |Left Alt when held, `(` when tapped | +|`KC_RAPC` | |Right Alt when held, `)` when tapped | +|`KC_SFTENT` | |Right Shift when held, Enter when tapped | |`KC_LEAD` | |The [Leader key](feature_leader_key.md) | |`KC_LOCK` | |The [Lock key](feature_key_lock.md) | |`FUNC(n)` |`F(n)` |Call `fn_action(n)` (deprecated) | diff --git a/quantum/process_keycode/process_space_cadet.c b/quantum/process_keycode/process_space_cadet.c index ac39df808..089199eee 100644 --- a/quantum/process_keycode/process_space_cadet.c +++ b/quantum/process_keycode/process_space_cadet.c @@ -60,18 +60,18 @@ // Control / paren setup #ifndef LCPO_KEYS - #define LCPO_KEYS KC_LCTL, KC_LCTL, KC_9 + #define LCPO_KEYS KC_LCTL, KC_LSFT, KC_9 #endif #ifndef RCPC_KEYS - #define RCPC_KEYS KC_RCTL, KC_RCTL, KC_0 + #define RCPC_KEYS KC_RCTL, KC_RSFT, KC_0 #endif // Alt / paren setup #ifndef LAPO_KEYS - #define LAPO_KEYS KC_LALT, KC_LALT, KC_9 + #define LAPO_KEYS KC_LALT, KC_LSFT, KC_9 #endif #ifndef RAPC_KEYS - #define RAPC_KEYS KC_RALT, KC_RALT, KC_0 + #define RAPC_KEYS KC_RALT, KC_RSFT, KC_0 #endif // Shift / Enter setup @@ -143,7 +143,9 @@ bool process_space_cadet(uint16_t keycode, keyrecord_t *record) { return false; } default: { - sc_last = 0; + if (record->event.pressed) { + sc_last = 0; + } break; } } From 8d46bb9cabb9c8e81c7ca1266d97a0126cc80767 Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Sun, 12 May 2019 00:42:57 -0500 Subject: [PATCH 012/341] [Keyboard] Adding RGBKB Zygomorph Keyboard (#5841) * Initial Zygomorph 5x6 code Split is not working yet * layout changes implement 4 row config option (not done yet), remove layout comments in layout.c * Zygomorph layouts for 5x12, 5x6, 4x12, and 4x6 Also, info.json *should* be nearly usable for the configurator * temporary fix for pin D5 being broken * show D5 issue comment * add build notes * Pin B7 broken in split why? * remove fix * Fix some pin assignments * begin to fix keymap * Create new 5x6 layout * update key positions * Initial Zygomorph 5x6 code Split is not working yet * layout changes implement 4 row config option (not done yet), remove layout comments in layout.c * Zygomorph layouts for 5x12, 5x6, 4x12, and 4x6 Also, info.json *should* be nearly usable for the configurator * temporary fix for pin D5 being broken * show D5 issue comment * add build notes * Pin B7 broken in split why? * remove fix * Fix some pin assignments * begin to fix keymap * Create new 5x6 layout * Rough first pass at split common conversion. Keymap cleanup to cover just the basics. Broke OLED code out into separate example. * Fix readme * Removal of old encoder / oled driver, fix for layout macros * small update * xulkal zygomorph keymaps * Removed the LED_MIRRORED option as leds are always mirrored on Zygomorph * Xulkal keymaps update * split rgb light support * fix line endings * Apply suggestions from code review Co-Authored-By: zvecr * More layout and compile fixes from pr review * Cleaning up rules.mk files * Apply suggestions from code review Co-Authored-By: zvecr * Updating defaults * Apply suggestions from code review Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- keyboards/sol/keymaps/xulkal/keymap.c | 2 +- keyboards/zygomorph/common/glcdfont.c | 244 +++++++++++++++ keyboards/zygomorph/config.h | 22 ++ keyboards/zygomorph/keymaps/5x6pad/keymap.c | 282 ++++++++++++++++++ keyboards/zygomorph/keymaps/5x6pad/rules.mk | 42 +++ keyboards/zygomorph/keymaps/default/config.h | 25 ++ keyboards/zygomorph/keymaps/default/keymap.c | 191 ++++++++++++ keyboards/zygomorph/keymaps/default/readme.md | 121 ++++++++ keyboards/zygomorph/keymaps/default/rules.mk | 42 +++ .../zygomorph/keymaps/default_oled/config.h | 25 ++ .../zygomorph/keymaps/default_oled/keymap.c | 257 ++++++++++++++++ .../zygomorph/keymaps/default_oled/rules.mk | 42 +++ .../zygomorph/keymaps/kageurufu/config.h | 24 ++ .../zygomorph/keymaps/kageurufu/keymap.c | 84 ++++++ .../zygomorph/keymaps/kageurufu/readme.md | 132 ++++++++ .../zygomorph/keymaps/kageurufu/rules.mk | 44 +++ keyboards/zygomorph/keymaps/xulkal/config.h | 25 ++ keyboards/zygomorph/keymaps/xulkal/keymap.c | 87 ++++++ keyboards/zygomorph/keymaps/xulkal/rules.mk | 42 +++ keyboards/zygomorph/readme.md | 15 + keyboards/zygomorph/rev1/config.h | 101 +++++++ keyboards/zygomorph/rev1/info.json | 21 ++ keyboards/zygomorph/rev1/rev1.c | 73 +++++ keyboards/zygomorph/rev1/rev1.h | 87 ++++++ keyboards/zygomorph/rev1/rules.mk | 0 keyboards/zygomorph/rules.mk | 69 +++++ keyboards/zygomorph/zygomorph.c | 1 + keyboards/zygomorph/zygomorph.h | 4 + users/xulkal/layouts.h | 4 +- users/xulkal/process_records.h | 4 + 30 files changed, 2109 insertions(+), 3 deletions(-) create mode 100644 keyboards/zygomorph/common/glcdfont.c create mode 100644 keyboards/zygomorph/config.h create mode 100644 keyboards/zygomorph/keymaps/5x6pad/keymap.c create mode 100644 keyboards/zygomorph/keymaps/5x6pad/rules.mk create mode 100644 keyboards/zygomorph/keymaps/default/config.h create mode 100644 keyboards/zygomorph/keymaps/default/keymap.c create mode 100644 keyboards/zygomorph/keymaps/default/readme.md create mode 100644 keyboards/zygomorph/keymaps/default/rules.mk create mode 100644 keyboards/zygomorph/keymaps/default_oled/config.h create mode 100644 keyboards/zygomorph/keymaps/default_oled/keymap.c create mode 100644 keyboards/zygomorph/keymaps/default_oled/rules.mk create mode 100644 keyboards/zygomorph/keymaps/kageurufu/config.h create mode 100644 keyboards/zygomorph/keymaps/kageurufu/keymap.c create mode 100644 keyboards/zygomorph/keymaps/kageurufu/readme.md create mode 100644 keyboards/zygomorph/keymaps/kageurufu/rules.mk create mode 100644 keyboards/zygomorph/keymaps/xulkal/config.h create mode 100644 keyboards/zygomorph/keymaps/xulkal/keymap.c create mode 100644 keyboards/zygomorph/keymaps/xulkal/rules.mk create mode 100644 keyboards/zygomorph/readme.md create mode 100644 keyboards/zygomorph/rev1/config.h create mode 100644 keyboards/zygomorph/rev1/info.json create mode 100644 keyboards/zygomorph/rev1/rev1.c create mode 100644 keyboards/zygomorph/rev1/rev1.h create mode 100644 keyboards/zygomorph/rev1/rules.mk create mode 100644 keyboards/zygomorph/rules.mk create mode 100644 keyboards/zygomorph/zygomorph.c create mode 100644 keyboards/zygomorph/zygomorph.h diff --git a/keyboards/sol/keymaps/xulkal/keymap.c b/keyboards/sol/keymaps/xulkal/keymap.c index 3bbd57f70..5c560abad 100644 --- a/keyboards/sol/keymaps/xulkal/keymap.c +++ b/keyboards/sol/keymaps/xulkal/keymap.c @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | Sft[ | Z | X | C | V | B | RGB | |RGBRST| N | M | , | . | / | Sft] | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Ctrl | Win | LOWER| RAISE| Alt | Space|RGBRMOD| |RGBMOD| Space| Left | Up | Down | Right| Ctrl | + * | Ctl- | Win | LOWER| RAISE| Alt | Space|RGBRMOD| |RGBMOD| Space| Left | Up | Down | Right| Ctl= | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------' * | Space| DEL | | Enter| Space| * `-------------' `-------------' diff --git a/keyboards/zygomorph/common/glcdfont.c b/keyboards/zygomorph/common/glcdfont.c new file mode 100644 index 000000000..89665ba07 --- /dev/null +++ b/keyboards/zygomorph/common/glcdfont.c @@ -0,0 +1,244 @@ +// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. +// See gfxfont.h for newer custom bitmap font info. + +#ifndef FONT5X7_H +#define FONT5X7_H + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif + +// Standard ASCII 5x7 font + +static const unsigned char font[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, + 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, + 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, + 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, + 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, + 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, + 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, + 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, + 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, + 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, + 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, + 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, + 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, + 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, + 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, + 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, + 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, + 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, + 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, + 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, + 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, + 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, + 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, + 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, + 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, + 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, + 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, + 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, + 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, + 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, + 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, + 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, + 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, + 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, + 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, + 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, + 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, + 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, + 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, + 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, + 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, + 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, + 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, + 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, + 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, + 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, + 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, + 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, + 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, + 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, + 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, + 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, + 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, + 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, + 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, + 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, + 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, + 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, + 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, + 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, + 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, + 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, + 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, + 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, + 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, + 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, + 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, + 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, + 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, + 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, + 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, + 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, + 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, + 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, + 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, + 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, + 0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00, + 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, + 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, + 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, + 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, + 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, + 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0xFC, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, + 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, + 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, + 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, + 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, + 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, + 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, + 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, + 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, + 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, + 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, + 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, + 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, + 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, + 0x03, 0x07, 0x1F, 0x7F, 0xFF, 0xFF, + 0xFE, 0xF8, 0xF0, 0xC0, 0x20, 0xF8, + 0xFE, 0xFF, 0xFE, 0x79, 0x27, 0x1F, + 0x7F, 0xFF, 0xFF, 0xFE, 0xF8, 0xF0, + 0xC0, 0x20, 0xF8, 0xFE, 0xFF, 0xFF, + 0x7F, 0x3F, 0x3F, 0x7F, 0xFF, 0xFE, + 0xF8, 0xF0, 0xC0, 0x00, 0x00, 0x00, + 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xFF, 0x7F, 0x7F, 0x7F, + 0xBF, 0xBF, 0xC0, 0xC0, 0xC0, 0xE0, + 0xE0, 0xE0, 0xE0, 0xF0, 0xF0, 0xF0, + 0xF8, 0x78, 0x78, 0x7C, 0x3C, 0x3C, + 0xFE, 0xFE, 0xFE, 0xFF, 0xFF, 0xFF, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, + 0xBF, 0xBF, 0xDF, 0xDF, 0xEF, 0xEF, + 0x00, 0x03, 0x07, 0x1F, 0x7F, 0xFF, + 0xFF, 0xFF, 0xFE, 0xF8, 0xE0, 0xC0, + 0xE0, 0xF8, 0xFE, 0xFF, 0xFF, 0xFF, + 0x7F, 0x1F, 0x07, 0x03, 0x00, 0x00, + 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, + 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, + 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, + 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, + 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, + 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, + 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, + 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xC1, 0xF3, + 0xCF, 0xBF, 0x7F, 0xFF, 0xFF, 0xFC, + 0xFB, 0xE7, 0x81, 0x00, 0x00, 0x00, + 0x00, 0x80, 0xE3, 0xCF, 0x3F, 0xFF, + 0xFF, 0xFF, 0xFC, 0xFB, 0xE7, 0x81, + 0x00, 0x00, 0x00, 0x00, 0x81, 0xE7, + 0xFF, 0xFF, 0xFF, 0xFF, 0x3C, 0x00, + 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xF8, 0xF8, 0xFC, 0x7C, 0x7E, + 0x7E, 0x3E, 0xFE, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xF7, 0xF7, 0xF7, 0xFB, + 0xFB, 0x7D, 0x7D, 0x7D, 0xBE, 0xBE, + 0xBE, 0xDF, 0xDF, 0xE0, 0xE0, 0x00, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0x00, 0xFC, 0xFC, 0x7C, 0x7E, 0x7E, + 0x3E, 0x3E, 0x1F, 0x1F, 0x1F, 0x0F, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, + 0xE7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x81, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, + 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, + 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, + 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, + 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, + 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, + 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, + 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x60, 0x70, 0x7C, 0x7F, 0x7F, 0x7F, + 0x7F, 0x1F, 0x06, 0x01, 0x03, 0x0F, + 0x3F, 0x7F, 0x7F, 0x7E, 0x7C, 0x7C, + 0x7E, 0x7F, 0x7F, 0x7F, 0x1F, 0x06, + 0x01, 0x07, 0x0F, 0x3F, 0x7F, 0x7F, + 0x7E, 0x7C, 0x7C, 0x7E, 0x7F, 0x7F, + 0x3F, 0x0F, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, + 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x7F, 0x7F, 0x7F, 0x7F, + 0x7F, 0x7F, 0x7D, 0x7D, 0x3D, 0x3E, + 0x1E, 0x1F, 0x1F, 0x1F, 0x0F, 0x0F, + 0x07, 0x07, 0x07, 0x03, 0x03, 0x00, + 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, + 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, + 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x00, + 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, + 0x00, 0x40, 0x70, 0x78, 0x7E, 0x7F, + 0x7F, 0x7F, 0x3F, 0x0F, 0x03, 0x01, + 0x03, 0x0F, 0x3F, 0x7F, 0x7F, 0x7F, + 0x7E, 0x78, 0x70, 0x40, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; +#endif // FONT5X7_H diff --git a/keyboards/zygomorph/config.h b/keyboards/zygomorph/config.h new file mode 100644 index 000000000..93fd2261b --- /dev/null +++ b/keyboards/zygomorph/config.h @@ -0,0 +1,22 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +#include "config_common.h" + diff --git a/keyboards/zygomorph/keymaps/5x6pad/keymap.c b/keyboards/zygomorph/keymaps/5x6pad/keymap.c new file mode 100644 index 000000000..c6138b43a --- /dev/null +++ b/keyboards/zygomorph/keymaps/5x6pad/keymap.c @@ -0,0 +1,282 @@ +#include QMK_KEYBOARD_H +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif +#ifdef SSD1306OLED + #include "common/ssd1306.h" +#endif + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// 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. +enum layer_number { + _QWERTY = 0, + _MACROPAD, + _FN, + _ADJ +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + MACROPAD, + FN, + ADJ, + BACKLIT, + RGBRST +}; + +enum macro_keycodes { + KC_SAMPLEMACRO, +}; + + + +#define FN_ESC LT(_FN, KC_ESC) +#define FN_CAPS LT(_FN, KC_CAPS) +// Define your non-alpha grouping in this define's LAYOUT, and all your BASE_LAYERS will share the same mod/macro columns + +#define BASE_LAYOUT( \ + _00, _01, _02, _03, _04, \ + _10, _11, _12, _13, _14, \ + _20, _21, _22, _23, _24, \ + _30, _31, _32, _33, _34 \ +) \ +LAYOUT_ortho_5x6( \ + KC_GESC, _00, _01, _02, _03, _04, \ + KC_TAB, _10, _11, _12, _13, _14, \ + FN_CAPS, _20, _21, _22, _23, _24, \ + KC_LSFT, _30, _31, _32, _33, _34, \ + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC \ +) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = BASE_LAYOUT( \ + KC_1, KC_2, KC_3, KC_4, KC_5, \ + KC_Q, KC_W, KC_E, KC_R, KC_T, \ + KC_A, KC_S, KC_D, KC_F, KC_G, \ + KC_Z, KC_X, KC_C, KC_V, KC_B \ + ), + + [_MACROPAD] = BASE_LAYOUT( \ + KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, \ + KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, \ + KC_A, KC_S, KC_D, KC_F, KC_G, \ + KC_Z, KC_X, KC_C, KC_V, KC_B \ + ), + + [_FN] = LAYOUT_ortho_5x6( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, \ + _______, KC_PGDN, KC_UP, KC_PGUP, _______, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, \ + _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, RGB_MOD, _______, _______ \ + ), + + [_ADJ] = LAYOUT_ortho_5x6( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, \ + _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET, _______, \ + _______, RGB_HUD, RGB_VAD, RGB_HUI, RGBRST, _______, \ + _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, RGB_MOD, _______, _______ \ + ) +}; + +// define variables for reactive RGB +bool TOG_STATUS = false; +int RGB_current_mode; + +// Setting ADJ layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(RGB_current_mode); + #endif + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + //uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)); + + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case MACROPAD: + if(record->event.pressed) { + set_single_persistent_default_layer(_MACROPAD); + } + return false; + break; + case FN: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(15); + #endif + } + layer_on(_FN); + } else { + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change + #endif + layer_off(_FN); + TOG_STATUS = false; + } + return false; + break; + case ADJ: + if (record->event.pressed) { + layer_on(_ADJ); + } else { + layer_off(_ADJ); + } + return false; + break; + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + #endif + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + #ifdef SSD1306OLED + iota_gfx_init(!has_usb()); // turns on the display + #endif +} + + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED + +// hook point for 'led_test' keymap +// 'default' keymap's led_test_init() is empty function, do nothing +// 'led_test' keymap's led_test_init() force rgblight_mode_noeeprom(35); +__attribute__ ((weak)) +void led_test_init(void) {} + +void matrix_scan_user(void) { + led_test_init(); + iota_gfx_task(); // this is what updates the display continuously +} + +void matrix_update(struct CharacterMatrix *dest, + const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} + +//assign the right code to your layers for OLED display +#define L_BASE 0 +#define L_FN (1<<_FN) +#define L_ADJ (1<<_ADJ) + +static void render_logo(struct CharacterMatrix *matrix) { + + static char logo[]={ + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4, + 0}; + matrix_write(matrix, logo); + //matrix_write_P(&matrix, PSTR(" Split keyboard kit")); +} + + + +void render_status(struct CharacterMatrix *matrix) { + + // Render to mode icon + static char logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}}; + if(keymap_config.swap_lalt_lgui==false){ + matrix_write(matrix, logo[0][0]); + matrix_write_P(matrix, PSTR("\n")); + matrix_write(matrix, logo[0][1]); + }else{ + matrix_write(matrix, logo[1][0]); + matrix_write_P(matrix, PSTR("\n")); + matrix_write(matrix, logo[1][1]); + } + + // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below + char buf[40]; + snprintf(buf,sizeof(buf), "Undef-%ld", layer_state); + matrix_write_P(matrix, PSTR("\nLayer: ")); + switch (layer_state) { + case L_BASE: + matrix_write_P(matrix, PSTR("Default")); + break; + case L_FN: + matrix_write_P(matrix, PSTR("FN")); + break; + case L_ADJ: + case L_ADJ_TRI: + matrix_write_P(matrix, PSTR("ADJ")); + break; + default: + matrix_write(matrix, buf); + } + + // Host Keyboard LED Status + char led[40]; + snprintf(led, sizeof(led), "\n%s %s %s", + (host_keyboard_leds() & (1< +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + + +// place overrides here + diff --git a/keyboards/zygomorph/keymaps/default/keymap.c b/keyboards/zygomorph/keymaps/default/keymap.c new file mode 100644 index 000000000..98bc1b9a6 --- /dev/null +++ b/keyboards/zygomorph/keymaps/default/keymap.c @@ -0,0 +1,191 @@ +#include QMK_KEYBOARD_H + +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif + +// 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. +enum layer_number { + _QWERTY = 0, + _COLEMAK, + _FN, + _ADJ +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + FN, + ADJ, + RGBRST +}; + +#define FN_CAPS LT(_FN, KC_CAPS) + +// Define your non-alpha grouping in this define's LAYOUT, and all your BASE_LAYERS will share the same mod/macro columns + /* / Base Layout \ + * /-----------------------------------------\ /-----------------------------------------\ + * | GESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BkSp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | | | | | | | | | | | | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |FNCAPS| | | | | | | | | | | | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | | | | | | | | | | | |Shift | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | Win | Alt | RGB | ADJ | Space| | Space| FN | Left | Down | Up |Right | + * \------+------+------+------+------+------/ \------+------+------+------+------+------/ + */ +#define BASE_LAYOUT( \ + _00, _01, _02, _03, _04, _05, _06, _07, _08, _09, \ + _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, \ + _20, _21, _22, _23, _24, _25, _26, _27, _28, _29 \ +) \ +LAYOUT_ortho_5x12( \ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, _00, _01, _02, _03, _04, _05, _06, _07, _08, _09, KC_BSLS, \ + FN_CAPS, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, KC_QUOT, \ + KC_LSFT, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, KC_ENT, \ + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ +) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* / QWERTY \ + * /-----------------------------------------\ /-----------------------------------------\ + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Q | W | E | R | T | | Y | U | O | P | \ | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | A | S | D | F | G | | H | J | K | L | ; | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Z | X | C | V | B | | N | M | , | . | / | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * \------+------+------+------+------+------/ \------+------+------+------+------+------/ + */ + [_QWERTY] = BASE_LAYOUT( \ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH \ + ), + + /* / Colemak \ + * /-----------------------------------------\ /-----------------------------------------\ + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Q | W | F | P | G | | J | L | U | Y | ; | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | A | R | S | T | D | | H | N | E | I | O | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Z | X | C | V | B | | K | M | , | . | / | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * \------+------+------+------+------+------/ \------+------+------+------+------+------/ + */ + [_COLEMAK] = BASE_LAYOUT( \ + KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, \ + KC_A, KC_R, KC_S, KC_T, KC_G, KC_K, KC_N, KC_E, KC_I, KC_O, \ + KC_Z, KC_X, KC_C, KC_D, KC_V, KC_M, KC_H, KC_COMM, KC_DOT, KC_SLSH \ + ), + + /* / FN \ + * /-----------------------------------------\ /-----------------------------------------\ + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | PGDN | UP | PGUP | | | | | PGDN | UP | PGUP | PRINT| HOME | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | LEFT | DOWN | RIGHT| | | | | LEFT | DOWN | RIGHT|INSERT| END | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |RGBMOD| | | | | PLAY | NEXT | MUTE | VOL- | VOL+ | + * \------+------+------+------+------+------/ \------+------+------+------+------+------/ + */ + [_FN] = LAYOUT_ortho_5x12( \ + 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_PGDN, KC_UP, KC_PGUP, _______, _______, _______, KC_PGDN, KC_UP, KC_PGUP, KC_PSCR, KC_HOME, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, RGB_MOD, _______, _______, _______, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU \ + ), + + /* / ADJ \ + * /-----------------------------------------\ /-----------------------------------------\ + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | SAD | VAI | SAI | RESET| | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | HUD | VAD | HUI |RGBRST| | | |QWERTY|COLEMK| | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | |RGBTOG| HUI | SAI | VAI | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |RGBNXT| | | | | |RGBPRV| HUD | SAD | VAD | + * \------+------+------+------+------+------/ \------+------+------+------+------+------/ + */ + [_ADJ] = LAYOUT_ortho_5x12( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET, _______, _______, _______, _______, _______, _______, _______, \ + _______, RGB_HUD, RGB_VAD, RGB_HUI, RGBRST, _______, _______, QWERTY, COLEMAK, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + _______, _______, _______, RGB_MOD, _______, _______, _______, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD \ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == 1) { /* Second encoder from slave */ + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + case COLEMAK: + if(record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + case FN: + if (record->event.pressed) { + layer_on(_FN); + } else { + layer_off(_FN); + } + return false; + case ADJ: + if (record->event.pressed) { + layer_on(_ADJ); + } else { + layer_off(_ADJ); + } + return false; + case RGBRST: +#ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } +#endif + break; + } + return true; +} diff --git a/keyboards/zygomorph/keymaps/default/readme.md b/keyboards/zygomorph/keymaps/default/readme.md new file mode 100644 index 000000000..4cbe61d12 --- /dev/null +++ b/keyboards/zygomorph/keymaps/default/readme.md @@ -0,0 +1,121 @@ +# The Default Zygomorph Layout +## Layout + +### Base modifier layout +``` + * ,-----------------------------------------. ,-----------------------------------------. + * | GESC | | | | | | | | | | | | BkSp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | | | | | | | | | | | | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |FN(CAPS)| | | | | | | | | | | | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | | | | | | | | | | | |Shift | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | Win | Alt | RGB | ADJ | Space| | Space| FN | Left | Down | Up |Right | + * `-----------------------------------------' `-----------------------------------------' +``` + +### Qwerty alphas +``` + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Q | W | E | R | T | | Y | U | I | O | P | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | A | S | D | F | G | | H | J | K | L | ; | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Z | X | C | V | B | | N | M | , | . | / | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * `-----------------------------------------' `-----------------------------------------' +``` + +### Colemak alphas +``` + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Q | W | F | P | G | | J | L | U | Y | ; | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | A | R | S | T | D | | H | N | E | I | O | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Z | X | C | V | B | | K | M | , | . | / | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * `-----------------------------------------' `-----------------------------------------' +``` + +### Function (FN) +``` + * ,-----------------------------------------. ,-----------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | PGDN | UP | PGUP | | | | | PGDN | UP | PGUP | PRINT| HOME | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | LEFT | DOWN | RIGHT| | | | | LEFT | DOWN | RIGHT|INSERT| END | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |RGBMOD| | | | | PLAY | NEXT | MUTE | VOL- | VOL+ | + * `-----------------------------------------' `-----------------------------------------' +``` + +### Adjust (ADJ) +``` + * ,-----------------------------------------. ,-----------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | SAD | VAI | SAI | RESET| | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | HUD | VAD | HUI |RGBRST| | | |QWERTY|COLEMK| | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | |RGBTOG| HUI | SAI | VAI | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |RGBMOD| | | | | |RGBRMOD| HUD | SAD | VAD | + * `-----------------------------------------' `-----------------------------------------' +``` + +## Customize + +see `qmk_firmware/keyboards/zygomorph/rev1/keymaps/default/rules.mk` + +``` + +# Variables you can set for Zygomorph + +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 = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix +RGBLIGHT_ANIMATIONS = yes # LED animations +RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight (+8500) +RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy (+1500) +RGBLIGHT_FULL_POWER = yes # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port +UNICODE_ENABLE = no # Unicode +SWAP_HANDS_ENABLE = no # Enable one-hand typing +ENCODER_ENABLE = yes # Enable rotary encoder (+90) +OLED_DRIVER_ENABLE = yes # Enable the OLED Driver (+5000) +IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) + + +``` +## Compile + +go to qmk top directory. +``` +$ cd qmk_firmware +``` + +build +``` +$ make zygomorph:default +``` + +After the initial flash with AVRdudess, you should be able to flash using this: +``` +$ make zygomorph:default:dfu +``` diff --git a/keyboards/zygomorph/keymaps/default/rules.mk b/keyboards/zygomorph/keymaps/default/rules.mk new file mode 100644 index 000000000..55d52d58e --- /dev/null +++ b/keyboards/zygomorph/keymaps/default/rules.mk @@ -0,0 +1,42 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# + +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix +RGBLIGHT_ANIMATIONS = yes # LED animations +RGBLIGHT_SPLIT_ENABLE = no # Split RGBLight Support +RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight +RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. +RGBLIGHT_FULL_POWER = yes # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port +UNICODE_ENABLE = no # Unicode +SWAP_HANDS_ENABLE = no # Enable one-hand typing +ENCODER_ENABLE = yes # Enable rotary encoder +OLED_DRIVER_ENABLE = no # Enable the OLED Driver +IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) +LINK_TIME_OPTIMIZATION_ENABLE = no # Enable optimizations to reduce firmware size. Also disables action macros and functions. + +# Do not edit past here + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) + OPT_DEFS += -DRGBLIGHT_FULL_POWER +endif + +ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) + OPT_DEFS += -DRGB_MATRIX_KEYPRESSES +endif + +ifeq ($(strip $(RGBLIGHT_ANIMATIONS)), yes) + OPT_DEFS += -DRGBLIGHT_ANIMATIONS +endif + +ifeq ($(strip $(RGBLIGHT_SPLIT_ENABLE)), yes) + OPT_DEFS += -DRGBLIGHT_SPLIT_ENABLE +endif diff --git a/keyboards/zygomorph/keymaps/default_oled/config.h b/keyboards/zygomorph/keymaps/default_oled/config.h new file mode 100644 index 000000000..452cdda82 --- /dev/null +++ b/keyboards/zygomorph/keymaps/default_oled/config.h @@ -0,0 +1,25 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + + +// place overrides here + diff --git a/keyboards/zygomorph/keymaps/default_oled/keymap.c b/keyboards/zygomorph/keymaps/default_oled/keymap.c new file mode 100644 index 000000000..89ed92ecd --- /dev/null +++ b/keyboards/zygomorph/keymaps/default_oled/keymap.c @@ -0,0 +1,257 @@ +#include QMK_KEYBOARD_H + +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif + +// 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. +enum layer_number { + _QWERTY = 0, + _COLEMAK, + _FN, + _ADJ +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + FN, + ADJ, + RGBRST +}; + +#define FN_CAPS LT(_FN, KC_CAPS) + +// Define your non-alpha grouping in this define's LAYOUT, and all your BASE_LAYERS will share the same mod/macro columns + /* / Base Layout \ + * /-----------------------------------------\ /-----------------------------------------\ + * | GESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BkSp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | | | | | | | | | | | | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |FNCAPS| | | | | | | | | | | | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | | | | | | | | | | | |Shift | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | Win | Alt | RGB | ADJ | Space| | Space| FN | Left | Down | Up |Right | + * \------+------+------+------+------+------/ \------+------+------+------+------+------/ + */ +#define BASE_LAYOUT( \ + _00, _01, _02, _03, _04, _05, _06, _07, _08, _09, \ + _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, \ + _20, _21, _22, _23, _24, _25, _26, _27, _28, _29 \ +) \ +LAYOUT_ortho_5x12( \ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, _00, _01, _02, _03, _04, _05, _06, _07, _08, _09, KC_BSLS, \ + FN_CAPS, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, KC_QUOT, \ + KC_LSFT, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, KC_ENT, \ + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ +) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* / QWERTY \ + * /-----------------------------------------\ /-----------------------------------------\ + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Q | W | E | R | T | | Y | U | O | P | \ | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | A | S | D | F | G | | H | J | K | L | ; | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Z | X | C | V | B | | N | M | , | . | / | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * \------+------+------+------+------+------/ \------+------+------+------+------+------/ + */ + [_QWERTY] = BASE_LAYOUT( \ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH \ + ), + + /* / Colemak \ + * /-----------------------------------------\ /-----------------------------------------\ + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Q | W | F | P | G | | J | L | U | Y | ; | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | A | R | S | T | D | | H | N | E | I | O | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Z | X | C | V | B | | K | M | , | . | / | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * \------+------+------+------+------+------/ \------+------+------+------+------+------/ + */ + [_COLEMAK] = BASE_LAYOUT( \ + KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, \ + KC_A, KC_R, KC_S, KC_T, KC_G, KC_K, KC_N, KC_E, KC_I, KC_O, \ + KC_Z, KC_X, KC_C, KC_D, KC_V, KC_M, KC_H, KC_COMM, KC_DOT, KC_SLSH \ + ), + + /* / FN \ + * /-----------------------------------------\ /-----------------------------------------\ + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | PGDN | UP | PGUP | | | | | PGDN | UP | PGUP | PRINT| HOME | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | LEFT | DOWN | RIGHT| | | | | LEFT | DOWN | RIGHT|INSERT| END | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |RGBMOD| | | | | PLAY | NEXT | MUTE | VOL- | VOL+ | + * \------+------+------+------+------+------/ \------+------+------+------+------+------/ + */ + [_FN] = LAYOUT_ortho_5x12( \ + 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_PGDN, KC_UP, KC_PGUP, _______, _______, _______, KC_PGDN, KC_UP, KC_PGUP, KC_PSCR, KC_HOME, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, RGB_MOD, _______, _______, _______, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU \ + ), + + /* / ADJ \ + * /-----------------------------------------\ /-----------------------------------------\ + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | SAD | VAI | SAI | RESET| | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | HUD | VAD | HUI |RGBRST| | | |QWERTY|COLEMK| | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | |RGBTOG| HUI | SAI | VAI | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |RGBNXT| | | | | |RGBPRV| HUD | SAD | VAD | + * \------+------+------+------+------+------/ \------+------+------+------+------+------/ + */ + [_ADJ] = LAYOUT_ortho_5x12( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET, _______, _______, _______, _______, _______, _______, _______, \ + _______, RGB_HUD, RGB_VAD, RGB_HUI, RGBRST, _______, _______, QWERTY, COLEMAK, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + _______, _______, _______, RGB_MOD, _______, _______, _______, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD \ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == 1) { /* Second encoder from slave */ + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + case COLEMAK: + if(record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + case FN: + if (record->event.pressed) { + layer_on(_FN); + } else { + layer_off(_FN); + } + return false; + case ADJ: + if (record->event.pressed) { + layer_on(_ADJ); + } else { + layer_off(_ADJ); + } + return false; + case RGBRST: +#ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } +#endif + break; + } + return true; +} + + +// SSD1306 OLED driver logic +#ifdef OLED_DRIVER_ENABLE + +static void render_logo(void) { + static const char PROGMEM rgbkb_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + + oled_write_P(rgbkb_logo, false); +} + +static void render_status(void) { + // Render to mode icon + static const char PROGMEM mode_logo[4][4] = { + {0x95,0x96,0}, + {0xb5,0xb6,0}, + {0x97,0x98,0}, + {0xb7,0xb8,0} }; + + if (keymap_config.swap_lalt_lgui != false) { + oled_write_ln_P(mode_logo[0], false); + oled_write_ln_P(mode_logo[1], false); + } else { + oled_write_ln_P(mode_logo[2], false); + oled_write_ln_P(mode_logo[3], false); + } + + // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below + oled_write_P(PSTR("Layer: "), false); + switch (biton32(layer_state)) { + case _QWERTY: + oled_write_ln_P(PSTR("QWERTY"), false); + break; + case _COLEMAK: + oled_write_ln_P(PSTR("Colemak"), false); + break; + case _FN: + oled_write_ln_P(PSTR("Function"), false); + break; + case _ADJ: + oled_write_ln_P(PSTR("Adjust"), false); + break; + default: + oled_write_ln_P(PSTR("Undefined"), false); + } + + // Host Keyboard LED Status + uint8_t led_usb_state = host_keyboard_leds(); + oled_write_P(led_usb_state & (1< +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +// place overrides here + diff --git a/keyboards/zygomorph/keymaps/kageurufu/keymap.c b/keyboards/zygomorph/keymaps/kageurufu/keymap.c new file mode 100644 index 000000000..29702b614 --- /dev/null +++ b/keyboards/zygomorph/keymaps/kageurufu/keymap.c @@ -0,0 +1,84 @@ +#include QMK_KEYBOARD_H +#include "kageurufu.h" + +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif + +#define FN_CAPS LT(_FN, KC_CAPS) + +// Define your non-alpha grouping in this define's LAYOUT, and all your BASE_LAYERS will share the same mod/macro columns + /* / Base Layout \ + * /-----------------------------------------\ /-----------------------------------------\ + * | GESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BkSp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | | | | | | | | | | | | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |FNCAPS| | | | | | | | | | | | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | | | | | | | | | | | |Shift | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | Win | Alt | RGB | ADJ | Space| | Space| FN | Left | Down | Up |Right | + * \------+------+------+------+------+------/ \------+------+------+------+------+------/ + */ +#define EXPAND_LAYOUT(...) LAYOUT_ortho_5x12(__VA_ARGS__) +#define _BASE_LAYOUT( \ + _00, _01, _02, _03, _04, _05, _06, _07, _08, _09, \ + _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, \ + _20, _21, _22, _23, _24, _25, _26, _27, _28, _29 \ +) \ +EXPAND_LAYOUT( \ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, _00, _01, _02, _03, _04, _05, _06, _07, _08, _09, KC_BSLS, \ + FN_CAPS, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, KC_QUOT, \ + KC_LSFT, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, KC_ENT, \ + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ +) +#define BASE_LAYOUT(...) _BASE_LAYOUT(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = BASE_LAYOUT( \ + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, \ + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, \ + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ \ + ), + + [_COLEMAK] = BASE_LAYOUT( \ + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, \ + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, \ + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ \ + ), + + [_FN] = EXPAND_LAYOUT( \ + ________________FUNCTION_L1________________, ________________FUNCTION_R1________________, \ + ________________FUNCTION_L2________________, ________________FUNCTION_R2________________, \ + ________________FUNCTION_L3________________, ________________FUNCTION_R3________________, \ + ________________FUNCTION_L4________________, ________________FUNCTION_R4________________, \ + ________________FUNCTION_L5________________, ________________FUNCTION_R5________________ \ + ), + + [_ADJ] = EXPAND_LAYOUT( \ + _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, \ + _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, \ + _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, \ + _________________ADJUST_L4_________________, _________________ADJUST_R4_________________, \ + _________________ADJUST_L5_________________, _________________ADJUST_R5_________________ \ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == 1) { /* Second encoder from slave */ + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + } +} diff --git a/keyboards/zygomorph/keymaps/kageurufu/readme.md b/keyboards/zygomorph/keymaps/kageurufu/readme.md new file mode 100644 index 000000000..f79c70d22 --- /dev/null +++ b/keyboards/zygomorph/keymaps/kageurufu/readme.md @@ -0,0 +1,132 @@ +# The Default Zygomorph Layout +## Layout + +### Base modifier layout +``` + * ,------------------------------------------------. ,------------------------------------------------. + * | GESC | | | | | | - | | = | | | | | | BkSp | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | Tab | | | | | | [ | | ] | | | | | | \ | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * |FN(CAPS)| | | | | | ( | | ) | | | | | | ' | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * |Shift | | | | | | { | | } | | | | | |Shift | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | Win | Alt | RGB | ADJ | Space| DEL | | Enter| Space| FN | Left | Down | Up |Right | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | Space| DEL | | Enter| Space| + * `-------------' `-------------' +``` + +### Qwerty alphas +``` + * ,------------------------------------------------. ,------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | Q | W | E | R | T | | | | Y | U | I | O | P | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | A | S | D | F | G | | | | H | J | K | L | ; | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | Z | X | C | V | B | | | | N | M | , | . | / | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | | | | | | + * `-------------' `-------------' +``` + +### Colemak alphas +``` + * ,------------------------------------------------. ,------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | Q | W | F | P | B | | | | J | L | U | Y | ; | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | A | R | S | T | G | | | | K | N | E | I | O | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | Z | X | C | D | V | | | | M | H | , | . | / | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | | | | | | + * `-------------' `-------------' +``` + +### Function (FN) +``` + * ,------------------------------------------------. ,------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | PGDN | UP | PGUP | | | | | | | PGDN | UP | PGUP | PRINT| HOME | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | LEFT | DOWN | RIGHT| | | | | | | LEFT | DOWN | RIGHT|INSERT| END | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | |RGBMOD| | | | | | | PLAY | NEXT | MUTE | VOL- | VOL+ | + * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | | | | | | + * `-------------' `-------------' +``` + +### Adjust (ADJ) +``` + * ,------------------------------------------------. ,------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | SAD | VAI | SAI | RESET| | | | | | | | | | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | HUD | VAD | HUI |RGBRST| | | | | |QWERTY|COLEMK| | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | | | | | | | | |RGBTOG| HUI | SAI | VAI | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | |RGBMOD| | | | | | | |RGBSMOD| HUD | SAD | VAD | + * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | | | | | | + * `-------------' `-------------' +``` + +## Customize + +see `qmk_firmware/keyboards/sol/rev1/keymaps/default/rules.mk` + +``` + +# Variables you can set for SOL + +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 = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix +LED_ANIMATIONS = yes # LED animations +RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight (+8500) +RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy (+1500) +RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port +UNICODE_ENABLE = no # Unicode +SWAP_HANDS_ENABLE = no # Enable one-hand typing +ENCODER_ENABLE_CUSTOM = yes # Enable rotary encoder (+90) + +OLED_ENABLE = no # OLED_ENABLE (+5000) +IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) + + +``` +## Compile + +go to qmk top directory. +``` +$ cd qmk_firmware +``` + +build +``` +$ make sol:default +``` + +After the initial flash with AVRdudess, you should be able to flash using this: +``` +$ make sol:default:dfu +``` diff --git a/keyboards/zygomorph/keymaps/kageurufu/rules.mk b/keyboards/zygomorph/keymaps/kageurufu/rules.mk new file mode 100644 index 000000000..61c7a07d6 --- /dev/null +++ b/keyboards/zygomorph/keymaps/kageurufu/rules.mk @@ -0,0 +1,44 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# + +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix +RGBLIGHT_ANIMATIONS = yes # LED animations +RGBLIGHT_SPLIT_ENABLE = no # Split RGBLight Support +RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight +RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. +RGBLIGHT_FULL_POWER = yes # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port +UNICODE_ENABLE = no # Unicode +SWAP_HANDS_ENABLE = no # Enable one-hand typing +ENCODER_ENABLE = yes # Enable rotary encoder +OLED_DRIVER_ENABLE = no # Enable the OLED Driver +IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) + +# Do not edit past here + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) + OPT_DEFS += -DRGBLIGHT_FULL_POWER +endif + +ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) + OPT_DEFS += -DRGB_MATRIX_KEYPRESSES +endif + +ifeq ($(strip $(RGBLIGHT_ANIMATIONS)), yes) + OPT_DEFS += -DRGBLIGHT_ANIMATIONS +endif + +ifeq ($(strip $(RGBLIGHT_SPLIT_ENABLE)), yes) + OPT_DEFS += -DRGBLIGHT_SPLIT_ENABLE +endif + +# Link time optimization, should save on firmware size +EXTRAFLAGS += -flto diff --git a/keyboards/zygomorph/keymaps/xulkal/config.h b/keyboards/zygomorph/keymaps/xulkal/config.h new file mode 100644 index 000000000..452cdda82 --- /dev/null +++ b/keyboards/zygomorph/keymaps/xulkal/config.h @@ -0,0 +1,25 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + + +// place overrides here + diff --git a/keyboards/zygomorph/keymaps/xulkal/keymap.c b/keyboards/zygomorph/keymaps/xulkal/keymap.c new file mode 100644 index 000000000..f886cb454 --- /dev/null +++ b/keyboards/zygomorph/keymaps/xulkal/keymap.c @@ -0,0 +1,87 @@ +#include QMK_KEYBOARD_H +#include "xulkal.h" + +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif + +#define EXPAND_LAYOUT(...) LAYOUT_ortho_5x12(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* / QWERTY \ + * /-----------------------------------------\ /-----------------------------------------\ + * | GESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BkSp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |FN(CAPS)| A | S | D | F | G | | H | J | K | L | ; | Enter| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Sft[ | Z | X | C | V | B | | N | M | , | . | / | Sft] | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctl- | Win | LOWER| RAISE| Alt | Space| | Space| Left | Up | Down | Right| Ctl= | + * \------+------+------+------+------+------/ \------+------+------+------+------+------/ + */ + [_QWERTY] = EXPAND_LAYOUT( \ + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, \ + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, \ + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, \ + _________________QWERTY_L4_________________, _________________QWERTY_R4_________________, \ + _________________QWERTY_L5_________________, _________________QWERTY_R5_________________ \ + ), + +#ifndef GAMELAYER_DISABLE + [_GAME] = EXPAND_LAYOUT( \ + ___________________GAME_L1_________________, ___________________GAME_R1_________________, \ + ___________________GAME_L2_________________, ___________________GAME_R2_________________, \ + ___________________GAME_L3_________________, ___________________GAME_R3_________________, \ + ___________________GAME_L4_________________, ___________________GAME_R4_________________, \ + ___________________GAME_L5_________________, ___________________GAME_R5_________________ \ + ), +#endif + + [_LOWER] = EXPAND_LAYOUT( \ + __________________LOWER_L1_________________, __________________LOWER_R1_________________, \ + __________________LOWER_L2_________________, __________________LOWER_R2_________________, \ + __________________LOWER_L3_________________, __________________LOWER_R3_________________, \ + __________________LOWER_L4_________________, __________________LOWER_R4_________________, \ + __________________LOWER_L5_________________, __________________LOWER_R5_________________ \ + ), + + [_RAISE] = EXPAND_LAYOUT( \ + __________________RAISE_L1_________________, __________________RAISE_R1_________________, \ + __________________RAISE_L2_________________, __________________RAISE_R2_________________, \ + __________________RAISE_L3_________________, __________________RAISE_R3_________________, \ + __________________RAISE_L4_________________, __________________RAISE_R4_________________, \ + __________________RAISE_L5_________________, __________________RAISE_R5_________________ \ + ), + +#ifdef TRILAYER_ENABLED + [_ADJUST] = EXPAND_LAYOUT( \ + _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, \ + _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, \ + _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, \ + _________________ADJUST_L4_________________, _________________ADJUST_R4_________________, \ + _________________ADJUST_L5_________________, _________________ADJUST_R5_________________ \ + ), +#endif +}; + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == 1) { /* Second encoder from slave */ + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + } +} +#endif diff --git a/keyboards/zygomorph/keymaps/xulkal/rules.mk b/keyboards/zygomorph/keymaps/xulkal/rules.mk new file mode 100644 index 000000000..dc687cbbd --- /dev/null +++ b/keyboards/zygomorph/keymaps/xulkal/rules.mk @@ -0,0 +1,42 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# + +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix +RGBLIGHT_ANIMATIONS = yes # LED animations +RGBLIGHT_SPLIT_ENABLE = yes # Split RGBLight Support +RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight +RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. +RGBLIGHT_FULL_POWER = yes # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port +UNICODE_ENABLE = no # Unicode +SWAP_HANDS_ENABLE = no # Enable one-hand typing +ENCODER_ENABLE = no # Enable rotary encoder +OLED_DRIVER_ENABLE = no # Enable the OLED Driver +IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) +LINK_TIME_OPTIMIZATION_ENABLE = no # Enable optimizations to reduce firmware size. Also disables action macros and functions. + +# Do not edit past here + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) + OPT_DEFS += -DRGBLIGHT_FULL_POWER +endif + +ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) + OPT_DEFS += -DRGB_MATRIX_KEYPRESSES +endif + +ifeq ($(strip $(RGBLIGHT_ANIMATIONS)), yes) + OPT_DEFS += -DRGBLIGHT_ANIMATIONS +endif + +ifeq ($(strip $(RGBLIGHT_SPLIT_ENABLE)), yes) + OPT_DEFS += -DRGBLIGHT_SPLIT_ENABLE +endif diff --git a/keyboards/zygomorph/readme.md b/keyboards/zygomorph/readme.md new file mode 100644 index 000000000..c669fba65 --- /dev/null +++ b/keyboards/zygomorph/readme.md @@ -0,0 +1,15 @@ +# Zygomorph + +![Zygomorph](https://cdn.shopify.com/s/files/1/0008/8827/5005/products/20190107_004053_2048x2048.jpg?v=1549333933) + +Zygomorph is the thinnest keyboard with a fully enclosed case. It's only 3.2mm thick below the switches, including screws. It can be used in 5x6 and 4x6 split, or 5x12 and 4x12 combined. It has per-key RGB, supports Kailh Choc and MX switches, and has 10 rotary encoder positions per half (only one can be used per half). The board has pre-soldered components, including type C ports and ATmega32U4. The build guide can be found [here](https://rgbkb.gitbook.io/rgbkb-build-guides/zygomorph-build-guide/). + +Keyboard Maintainer: [Legonut](https://github.com/Legonut) +Hardware Supported: Zygomorph R1.0 +Hardware Availability: [RGBKB](https://www.rgbkb.net) + +Make example for this keyboard (after setting up your build environment): + + make zygomorph:default + +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). diff --git a/keyboards/zygomorph/rev1/config.h b/keyboards/zygomorph/rev1/config.h new file mode 100644 index 000000000..107e58c12 --- /dev/null +++ b/keyboards/zygomorph/rev1/config.h @@ -0,0 +1,101 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER RGBKB +#define PRODUCT Zygomorph +#define DESCRIPTION "RGB, thin, ortholinear" + +/* Select hand configuration */ +#define EE_HANDS + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_ROW_PINS { F1, F5, F7, B5, B4 } + +// wiring of each half +#define MATRIX_COLS 6 +#define MATRIX_COL_PINS { F4, F6, C7, C6, B6, D4 } + +#define SOFT_SERIAL_PIN D3 + +#define NUMBER_OF_ENCODERS 1 +#define ENCODERS_PAD_A { D2 } +#define ENCODERS_PAD_B { D7 } + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN B7 +#ifndef RGBLIGHT_SPLIT_ENABLE + #define RGBLED_NUM 30 +#else + #define RGBLED_NUM 60 + #define RGBLED_SPLIT { 30, 30 } +#endif +#define DRIVER_LED_TOTAL 30 + +#ifdef IOS_DEVICE_ENABLE + #define RGBLIGHT_LIMIT_VAL 40 + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 40 +#elif RGBLIGHT_FULL_POWER + #define RGBLIGHT_LIMIT_VAL 255 + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 +#else + #define RGBLIGHT_LIMIT_VAL 120 + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 +#endif + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) +// USB_MAX_POWER_CONSUMPTION value for Helix keyboard +// 120 RGBoff, OLEDoff +// 120 OLED +// 330 RGB 6 +// 300 RGB 32 +// 310 OLED & RGB 32 + #define USB_MAX_POWER_CONSUMPTION 500 +#else + // fix iPhone and iPad power adapter issue + // iOS device need lessthan 100 + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + +/* + * Feature disable options + * 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_FUNCTION diff --git a/keyboards/zygomorph/rev1/info.json b/keyboards/zygomorph/rev1/info.json new file mode 100644 index 000000000..b79c028ec --- /dev/null +++ b/keyboards/zygomorph/rev1/info.json @@ -0,0 +1,21 @@ +{ + "keyboard_name": "Zygomorph", + "url": "https://www.rgbkb.net/pages/introducing-the-zygomorph-keyboard", + "maintainer": "Legonut", + "width": 17, + "height": 6.5, + "layouts": { + "LAYOUT_ortho_5x12": { + "layout": [{"label":"`", "x":0, "y":0}, {"label":"1", "x":1, "y":0}, {"label":"2", "x":2, "y":0}, {"label":"3", "x":3, "y":0}, {"label":"4", "x":4, "y":0}, {"label":"5", "x":5, "y":0}, {"label":"6", "x":7, "y":0}, {"label":"7", "x":8, "y":0}, {"label":"8", "x":9, "y":0}, {"label":"9", "x":10, "y":0}, {"label":"0", "x":11, "y":0}, {"label":"BKSP", "x":12, "y":0}, {"label":"Tab", "x":0, "y":1}, {"label":"Q", "x":1, "y":1}, {"label":"W", "x":2, "y":1}, {"label":"E", "x":3, "y":1}, {"label":"R", "x":4, "y":1}, {"label":"T", "x":5, "y":1}, {"label":"Y", "x":7, "y":1}, {"label":"U", "x":8, "y":1}, {"label":"I", "x":9, "y":1}, {"label":"O", "x":10, "y":1}, {"label":"P", "x":11, "y":1}, {"label":"\\|", "x":12, "y":1}, {"label":"Esc", "x":0, "y":2}, {"label":"A", "x":1, "y":2}, {"label":"S", "x":2, "y":2}, {"label":"D", "x":3, "y":2}, {"label":"F", "x":4, "y":2}, {"label":"G", "x":5, "y":2}, {"label":"H", "x":7, "y":2}, {"label":"J", "x":8, "y":2}, {"label":"K", "x":9, "y":2}, {"label":"L", "x":10, "y":2}, {"label":";:", "x":11, "y":2}, {"label":"'\"", "x":12, "y":2}, {"label":"Shift", "x":0, "y":3}, {"label":"Z", "x":1, "y":3}, {"label":"X", "x":2, "y":3}, {"label":"C", "x":3, "y":3}, {"label":"V", "x":4, "y":3}, {"label":"B", "x":5, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":",<", "x":9, "y":3}, {"label":".>", "x":10, "y":3}, {"label":"/?", "x":11, "y":3}, {"label":"Enter", "x":12, "y":3}, {"label":"Ctrl", "x":0, "y":4}, {"label":"Alt", "x":1, "y":4}, {"label":"Super", "x":2, "y":4}, {"label":"RGB", "x":3, "y":4}, {"label":"⇓", "x":4, "y":4}, {"x":5, "y":4}, {"x":7, "y":4}, {"label":"FN", "x":8, "y":4}, {"label":"Left", "x":9, "y":4}, {"label":"Down", "x":10, "y":4}, {"label":"Up", "x":11, "y":4}, {"label":"Right", "x":12, "y":4}] + }, + "LAYOUT_ortho_4x12": { + "layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":7, "y":0}, {"label":"U", "x":8, "y":0}, {"label":"I", "x":9, "y":0}, {"label":"O", "x":10, "y":0}, {"label":"P", "x":11, "y":0}, {"label":"\\|", "x":12, "y":0}, {"label":"Esc", "x":0, "y":1}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"H", "x":7, "y":1}, {"label":"J", "x":8, "y":1}, {"label":"K", "x":9, "y":1}, {"label":"L", "x":10, "y":1}, {"label":";:", "x":11, "y":1}, {"label":"'\"", "x":12, "y":1}, {"label":"Shift", "x":0, "y":2}, {"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"N", "x":7, "y":2}, {"label":"M", "x":8, "y":2}, {"label":",<", "x":9, "y":2}, {"label":".>", "x":10, "y":2}, {"label":"/?", "x":11, "y":2}, {"label":"Enter", "x":12, "y":2}, {"label":"Ctrl", "x":0, "y":3}, {"label":"Alt", "x":1, "y":3}, {"label":"Super", "x":2, "y":3}, {"label":"RGB", "x":3, "y":3}, {"label":"⇓", "x":4, "y":3}, {"x":5, "y":3}, {"x":7, "y":3}, {"label":"FN", "x":8, "y":3}, {"label":"Left", "x":9, "y":3}, {"label":"Down", "x":10, "y":3}, {"label":"Up", "x":11, "y":3}, {"label":"Right", "x":12, "y":3}] + }, + "LAYOUT_ortho_5x6": { + "layout": [{"label":"`", "x":0, "y":0}, {"label":"1", "x":1, "y":0}, {"label":"2", "x":2, "y":0}, {"label":"3", "x":3, "y":0}, {"label":"4", "x":4, "y":0}, {"label":"5", "x":5, "y":0}, {"label":"Tab", "x":0, "y":1}, {"label":"Q", "x":1, "y":1}, {"label":"W", "x":2, "y":1}, {"label":"E", "x":3, "y":1}, {"label":"R", "x":4, "y":1}, {"label":"T", "x":5, "y":1}, {"label":"Esc", "x":0, "y":2}, {"label":"A", "x":1, "y":2}, {"label":"S", "x":2, "y":2}, {"label":"D", "x":3, "y":2}, {"label":"F", "x":4, "y":2}, {"label":"G", "x":5, "y":2}, {"label":"Shift", "x":0, "y":3}, {"label":"Z", "x":1, "y":3}, {"label":"X", "x":2, "y":3}, {"label":"C", "x":3, "y":3}, {"label":"V", "x":4, "y":3}, {"label":"B", "x":5, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1, "y":4}, {"label":"Alt", "x":2, "y":4}, {"label":"Super", "x":3, "y":4}, {"label":"⇓", "x":4, "y":4}, {"x":5, "y":4}] + }, + "LAYOUT_ortho_4x6": { + "layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Esc", "x":0, "y":1}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"Shift", "x":0, "y":2}, {"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"x":0, "y":3}, {"label":"Ctrl", "x":1, "y":3}, {"label":"Alt", "x":2, "y":3}, {"label":"Super", "x":3, "y":3}, {"label":"⇓", "x":4, "y":3}, {"x":5, "y":3}] + } + } +} diff --git a/keyboards/zygomorph/rev1/rev1.c b/keyboards/zygomorph/rev1/rev1.c new file mode 100644 index 000000000..3edf48c5d --- /dev/null +++ b/keyboards/zygomorph/rev1/rev1.c @@ -0,0 +1,73 @@ +#include "zygomorph.h" + + +#ifdef RGB_MATRIX_ENABLE +#define RGB_LEFT_HAND { { 0 | ( 5 << 4) }, { 102, 0 }, 4}, \ + { { 0 | ( 4 << 4) }, { 81, 0 }, 4}, \ + { { 0 | ( 3 << 4) }, { 61, 0 }, 4}, \ + { { 0 | ( 2 << 4) }, { 41, 0 }, 4}, \ + { { 0 | ( 1 << 4) }, { 20, 0 }, 4}, \ + { { 0 | ( 0 << 4) }, { 0, 0 }, 1}, \ + { { 1 | ( 5 << 4) }, { 102, 16 }, 4}, \ + { { 1 | ( 4 << 4) }, { 81, 16 }, 4}, \ + { { 1 | ( 3 << 4) }, { 61, 16 }, 4}, \ + { { 1 | ( 2 << 4) }, { 41, 16 }, 4}, \ + { { 1 | ( 1 << 4) }, { 20, 16 }, 4}, \ + { { 1 | ( 0 << 4) }, { 0, 16 }, 1}, \ + { { 2 | ( 5 << 4) }, { 102, 32 }, 4}, \ + { { 2 | ( 4 << 4) }, { 81, 32 }, 4}, \ + { { 2 | ( 3 << 4) }, { 61, 32 }, 4}, \ + { { 2 | ( 2 << 4) }, { 41, 32 }, 4}, \ + { { 2 | ( 1 << 4) }, { 20, 32 }, 4}, \ + { { 2 | ( 0 << 4) }, { 0, 32 }, 1}, \ + { { 3 | ( 5 << 4) }, { 102, 48 }, 4}, \ + { { 3 | ( 4 << 4) }, { 81, 48 }, 4}, \ + { { 3 | ( 3 << 4) }, { 61, 48 }, 4}, \ + { { 3 | ( 2 << 4) }, { 41, 48 }, 4}, \ + { { 3 | ( 1 << 4) }, { 20, 48 }, 4}, \ + { { 3 | ( 0 << 4) }, { 0, 48 }, 1}, \ + { { 4 | ( 5 << 4) }, { 102, 64 }, 1}, \ + { { 4 | ( 4 << 4) }, { 81, 64 }, 1}, \ + { { 4 | ( 3 << 4) }, { 61, 64 }, 1}, \ + { { 4 | ( 2 << 4) }, { 41, 64 }, 1}, \ + { { 4 | ( 1 << 4) }, { 20, 64 }, 1}, \ + { { 4 | ( 0 << 4) }, { 0, 64 }, 1} + +#define RGB_RIGHT_HAND { { 0 | (11 << 4) }, { 224, 0 }, 1}, \ + { { 0 | (10 << 4) }, { 204, 0 }, 4}, \ + { { 0 | ( 9 << 4) }, { 183, 0 }, 4}, \ + { { 0 | ( 8 << 4) }, { 163, 0 }, 4}, \ + { { 0 | ( 7 << 4) }, { 143, 0 }, 4}, \ + { { 0 | ( 6 << 4) }, { 122, 0 }, 4}, \ + { { 1 | (11 << 4) }, { 224, 16 }, 1}, \ + { { 1 | (10 << 4) }, { 204, 16 }, 4}, \ + { { 1 | ( 9 << 4) }, { 183, 16 }, 4}, \ + { { 1 | ( 8 << 4) }, { 163, 16 }, 4}, \ + { { 1 | ( 7 << 4) }, { 143, 16 }, 4}, \ + { { 1 | ( 6 << 4) }, { 122, 16 }, 4}, \ + { { 2 | (11 << 4) }, { 224, 32 }, 1}, \ + { { 2 | (10 << 4) }, { 204, 32 }, 4}, \ + { { 2 | ( 9 << 4) }, { 183, 32 }, 4}, \ + { { 2 | ( 8 << 4) }, { 163, 32 }, 4}, \ + { { 2 | ( 7 << 4) }, { 143, 32 }, 4}, \ + { { 2 | ( 6 << 4) }, { 122, 32 }, 4}, \ + { { 3 | (11 << 4) }, { 224, 48 }, 1}, \ + { { 3 | (10 << 4) }, { 204, 48 }, 4}, \ + { { 3 | ( 9 << 4) }, { 183, 48 }, 4}, \ + { { 3 | ( 8 << 4) }, { 163, 48 }, 4}, \ + { { 3 | ( 7 << 4) }, { 143, 48 }, 4}, \ + { { 3 | ( 6 << 4) }, { 122, 48 }, 4}, \ + { { 4 | (11 << 4) }, { 224, 64 }, 1}, \ + { { 4 | (10 << 4) }, { 204, 64 }, 1}, \ + { { 4 | ( 9 << 4) }, { 183, 64 }, 1}, \ + { { 4 | ( 8 << 4) }, { 163, 64 }, 1}, \ + { { 4 | ( 7 << 4) }, { 143, 64 }, 1}, \ + { { 4 | ( 6 << 4) }, { 122, 64 }, 1} + +rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { +// Left Hand +RGB_LEFT_HAND +// Right Hand +//RGB_RIGHT_HAND +}; +#endif diff --git a/keyboards/zygomorph/rev1/rev1.h b/keyboards/zygomorph/rev1/rev1.h new file mode 100644 index 000000000..c667088d0 --- /dev/null +++ b/keyboards/zygomorph/rev1/rev1.h @@ -0,0 +1,87 @@ +#pragma once + +#include "zygomorph.h" +#include "quantum.h" + +#ifdef RGBLIGHT_ENABLE +//rgb led driver +#include "ws2812.h" +#endif + +#define LAYOUT_ortho_5x6( \ + L00, L01, L02, L03, L04, L05, \ + L10, L11, L12, L13, L14, L15, \ + L20, L21, L22, L23, L24, L25, \ + L30, L31, L32, L33, L34, L35, \ + L40, L41, L42, L43, L44, L45 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { L40, L41, L42, L43, L44, L45 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ + } + +#define LAYOUT_ortho_5x12( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ + L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { L40, L41, L42, L43, L44, L45 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { R40, R41, R42, R43, R44, R45 } \ + } + +#define LAYOUT_ortho_4x6( \ + L00, L01, L02, L03, L04, L05, \ + L10, L11, L12, L13, L14, L15, \ + L20, L21, L22, L23, L24, L25, \ + L30, L31, L32, L33, L34, L35 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ + } + +#define LAYOUT_ortho_4x12( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ + } diff --git a/keyboards/zygomorph/rev1/rules.mk b/keyboards/zygomorph/rev1/rules.mk new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/zygomorph/rules.mk b/keyboards/zygomorph/rules.mk new file mode 100644 index 000000000..0d6b01bbe --- /dev/null +++ b/keyboards/zygomorph/rules.mk @@ -0,0 +1,69 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = qmk-dfu + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Build Options +# change yes to no to disable +# +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 = no # Console for debug(+400) +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +SPLIT_KEYBOARD = yes +LAYOUTS = ortho_4x12 ortho_5x12 + +DEFAULT_FOLDER = zygomorph/rev1 diff --git a/keyboards/zygomorph/zygomorph.c b/keyboards/zygomorph/zygomorph.c new file mode 100644 index 000000000..9f029813b --- /dev/null +++ b/keyboards/zygomorph/zygomorph.c @@ -0,0 +1 @@ +#include "zygomorph.h" diff --git a/keyboards/zygomorph/zygomorph.h b/keyboards/zygomorph/zygomorph.h new file mode 100644 index 000000000..24198ed4c --- /dev/null +++ b/keyboards/zygomorph/zygomorph.h @@ -0,0 +1,4 @@ +#pragma once + +#include "rev1.h" +#include "quantum.h" diff --git a/users/xulkal/layouts.h b/users/xulkal/layouts.h index 2cd309f76..61637bfe3 100644 --- a/users/xulkal/layouts.h +++ b/users/xulkal/layouts.h @@ -68,7 +68,7 @@ /* LOWER Layout * ,-----------------------------------------. ,-----------------------------------------. - * | | | | | | | | | | | | | | + * | |RGBMD |RGBRMD|RGBTOG| | | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | SPDI | SAI | VAI | HUI | RESET| | | | | 7 | 8 | 9 | | * |------+------+------+------+------+------| |------+------+------+------+------+------| @@ -80,7 +80,7 @@ * `-----------------------------------------' `-----------------------------------------' */ -#define __________________LOWER_L1_________________ _______, RGB_RMOD, RGB_MOD, _______, _______, _______ +#define __________________LOWER_L1_________________ _______, RGB_RMOD, RGB_MOD, RGB_TOG, _______, _______ #define __________________LOWER_L2_________________ RGB_SPI, RGB_SAI, RGB_VAI, RGB_HUI, RESET, _______ #define __________________LOWER_L3_________________ RGB_SPD, RGB_SAD, RGB_VAD, RGB_HUD, RGBRST, _______ #define __________________LOWER_L4_________________ _______, _______, _______, _______, _______, _______ diff --git a/users/xulkal/process_records.h b/users/xulkal/process_records.h index 9e4295380..d79ab7e32 100644 --- a/users/xulkal/process_records.h +++ b/users/xulkal/process_records.h @@ -31,10 +31,14 @@ enum { enum layer_number { _QWERTY = 0, +#ifndef GAMELAYER_DISABLE _GAME, +#endif _LOWER, _RAISE, +#ifdef TRILAYER_ENABLED _ADJUST +#endif }; enum custom_keycodes { From 831d765b52a7d97ac7294e7c89afc34465a2ec32 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sat, 11 May 2019 22:56:00 -0700 Subject: [PATCH 013/341] [Keyboard] clarify readme for the growing number of kbd67 revisions (#5844) * clarify readme for the growing number of kbd67 revisions * some pr comment nits --- keyboards/kbdfans/kbd67/hotswap/readme.md | 4 ++-- keyboards/kbdfans/kbd67/readme.md | 17 +++++++++++------ keyboards/kbdfans/kbd67/rev1/readme.md | 4 ++-- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/keyboards/kbdfans/kbd67/hotswap/readme.md b/keyboards/kbdfans/kbd67/hotswap/readme.md index 6b4070593..bb64c03e3 100644 --- a/keyboards/kbdfans/kbd67/hotswap/readme.md +++ b/keyboards/kbdfans/kbd67/hotswap/readme.md @@ -1,4 +1,4 @@ -# hotswap +# KBD67 hotswap A 65% hot swap board with blocker and USB Type C port. @@ -8,6 +8,6 @@ Hardware Availability: [KBDFans](https://kbdfans.cn/products/coming-soon-kbd67-m Make example for this keyboard (after setting up your build environment): - make kbd67/hotswap:default + make kbdfans/kbd67/hotswap:default 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). diff --git a/keyboards/kbdfans/kbd67/readme.md b/keyboards/kbdfans/kbd67/readme.md index 6d5f774e6..1fa245881 100644 --- a/keyboards/kbdfans/kbd67/readme.md +++ b/keyboards/kbdfans/kbd67/readme.md @@ -1,17 +1,22 @@ # KBD67 -A 65% keyboard sold in two variants. Rev1 was a typical keyboard that had to be soldered together, supporting multiple layouts. -Months later, a new version with hotswap was sold. **Firmware files from one, will not work on the other.** Please use the `.hex` appropriate for your board. +A 65% keyboard sold in three variants. +1. Rev1: Typical keyboard that had to be soldered together, supporting multiple layouts. +2. HotSwap: Released in late 2018, Hotswap single layout keyboard. +3. Rev2: Released in April/May 2019, the Rev2 also needs to be soldered together and supports multiple layouts. -The rev1 PCB for the KBD67 is sold under the name "KBD65." + **Firmware files are SPECIFIC to each board. Firmware files from one, will not work on the other.** Please use the `.hex` appropriate for your board. + +The rev1 PCB is sold under the name "KBD65". Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) -Hardware Supported: KBD67 -Hardware Availability: KBDFans +Hardware Supported: KBD67 rev1, rev2, hotswap +Hardware Availability: KBDFans -Make example for this keyboard (after setting up your build environment): +Make examples for this keyboard (after setting up your build environment): make kbdfans/kbd67/rev1:default + make kbdfans/kbd67/rev2:default make kbdfans/kbd67/hotswap:default 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). diff --git a/keyboards/kbdfans/kbd67/rev1/readme.md b/keyboards/kbdfans/kbd67/rev1/readme.md index 9074557cb..1d92a41f7 100644 --- a/keyboards/kbdfans/kbd67/rev1/readme.md +++ b/keyboards/kbdfans/kbd67/rev1/readme.md @@ -1,4 +1,4 @@ -# kbd67 +# KBD67 rev1 65% keyboard with blocker. @@ -8,6 +8,6 @@ Hardware Availability: KBDFans [Keyboard Kit](https://kbdfans.cn/products/coming Make example for this keyboard (after setting up your build environment): - make kbd67/rev1:default + make kbdfans/kbd67/rev1:default 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). From b32ad8b90cc3b6e8bdcdfa646c658b9848bde105 Mon Sep 17 00:00:00 2001 From: zvecr Date: Sun, 12 May 2019 06:57:51 +0100 Subject: [PATCH 014/341] [Keyboard] Convert Staryu to use DIRECT_PINS and BACKLIGHT_PINS (#5848) * Convert to use DIRECT_PINS and BACKLIGHT_PINS * Convert to use DIRECT_PINS and BACKLIGHT_PINS - remove old comment --- keyboards/staryu/backlight_staryu.h | 11 ++++++++++- keyboards/staryu/config.h | 25 ++++++++++++++++--------- keyboards/staryu/staryu.c | 27 --------------------------- keyboards/staryu/staryu.h | 14 +++++--------- 4 files changed, 31 insertions(+), 46 deletions(-) diff --git a/keyboards/staryu/backlight_staryu.h b/keyboards/staryu/backlight_staryu.h index 3272283e9..b90350e28 100644 --- a/keyboards/staryu/backlight_staryu.h +++ b/keyboards/staryu/backlight_staryu.h @@ -17,5 +17,14 @@ along with this program. If not, see . #pragma once // Add backwards compatibility for existing keymaps +static inline void backlight_set_value(uint8_t index, uint8_t level) { + static const uint8_t backlight_pins[BACKLIGHT_LED_COUNT] = BACKLIGHT_PINS; + if (level) { + setPinOutput(backlight_pins[index]); + } else { + setPinInput(backlight_pins[index]); + } +} + #define backlight_led_off(i) backlight_set_value(i, 0) -#define backlight_led_on(i) backlight_set_value(i, 1) \ No newline at end of file +#define backlight_led_on(i) backlight_set_value(i, 1) diff --git a/keyboards/staryu/config.h b/keyboards/staryu/config.h index 7f8b39ba7..05131b68b 100755 --- a/keyboards/staryu/config.h +++ b/keyboards/staryu/config.h @@ -27,20 +27,20 @@ along with this program. If not, see . #define DESCRIPTION 5-key macropad /* key matrix size */ -#define MATRIX_ROWS 1 -#define MATRIX_COLS 5 +#define MATRIX_ROWS 2 +#define MATRIX_COLS 3 /* key matrix pins */ -#define MATRIX_ROW_PINS { NO_PIN } -#define MATRIX_COL_PINS { D0, D1, D2, D3, D4 } +#define DIRECT_PINS { \ + { NO_PIN, D0, D1 }, \ + { D4, D3, D2 }, \ +} #define UNUSED_PINS -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - #define RGB_DI_PIN C6 #define RGBLED_NUM 1 // Number of LEDs #define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_LIMIT_VAL 200 // #ifdef RGB_DI_PIN // #define RGBLIGHT_HUE_STEP 8 // #define RGBLIGHT_SAT_STEP 8 @@ -61,8 +61,15 @@ along with this program. If not, see . // #define RGBLIGHT_EFFECT_ALTERNATING // #endif -#define BACKLIGHT_LEVELS 1 // either on/off -#define RGBLIGHT_LIMIT_VAL 200 +#undef BACKLIGHT_PIN +#define BACKLIGHT_PINS { C2, C7, D5, D6, B0 } +#define BACKLIGHT_LED_COUNT 5 +#define BACKLIGHT_LEVELS 10 +#define BACKLIGHT_ON_STATE 1 /* Set 0 if debouncing isn't needed */ #define DEBOUNCING_DELAY 5 + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 1 diff --git a/keyboards/staryu/staryu.c b/keyboards/staryu/staryu.c index 20334c0b7..4adadf201 100755 --- a/keyboards/staryu/staryu.c +++ b/keyboards/staryu/staryu.c @@ -15,30 +15,3 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "staryu.h" - -#ifdef BACKLIGHT_ENABLE - -#ifdef BACKLIGHT_PIN - #pragma error "BACKLIGHT_PIN must stay undefined otherwise software pwm is incorrectly used" -#endif - -#define BACKLIGHT_PIN_COUNT 5 -static const pin_t backlight_pins[BACKLIGHT_PIN_COUNT] = { C2, C7, D5, D6, B0 }; - -void backlight_init_ports(void) { - for (uint8_t index = 0; index < BACKLIGHT_PIN_COUNT; index++) { - setPinOutput(backlight_pins[index]); - } -} - -void backlight_set_value(uint8_t index, uint8_t level) { - writePin(backlight_pins[index], !!level); -} - -void backlight_set(uint8_t level) { - for (uint8_t index = 0; index < BACKLIGHT_PIN_COUNT; index++) { - backlight_set_value(index, level); - } -} - -#endif //BACKLIGHT_ENABLE diff --git a/keyboards/staryu/staryu.h b/keyboards/staryu/staryu.h index f404dff28..bdce5806f 100755 --- a/keyboards/staryu/staryu.h +++ b/keyboards/staryu/staryu.h @@ -15,18 +15,14 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ #pragma once + #include "quantum.h" +#define ___ KC_NO #define LAYOUT( \ - K00, K01, \ + K01, K02, \ K10, K11, K12 \ ) { \ - { K00, K01, K12, K11, K10 }, \ + { ___, K01, K02 }, \ + { K10, K11, K12 } \ } - - -#ifdef BACKLIGHT_ENABLE - -void backlight_set_value(uint8_t index, uint8_t level); - -#endif From 2b78840ef7e6227949bf6e2f9643449e11df0ac5 Mon Sep 17 00:00:00 2001 From: zvecr Date: Sun, 12 May 2019 07:15:18 +0100 Subject: [PATCH 015/341] [Keyboard] Fix dz60 LAYOUT_60_iso_split_space_bs_rshift api errors (#5852) * Fix LAYOUT_60_iso_split_space_bs_rshift to match comments and Configurator * Fix LAYOUT_60_iso_split_space_bs_rshift to match comments and Configurator --- keyboards/dz60/dz60.h | 4 ++-- keyboards/dz60/keymaps/olligranlund_iso/keymap.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/dz60/dz60.h b/keyboards/dz60/dz60.h index e6045be43..fb4a14c7d 100644 --- a/keyboards/dz60/dz60.h +++ b/keyboards/dz60/dz60.h @@ -404,13 +404,13 @@ k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k1e, k2d, \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, \ - k40, k41, k43, k44, k46, k48, k4a, k4b, k4c, k4d, k4e \ + k40, k41, k43, k44, k46, k48, k4a, k4b, k4d, k4e \ ) { \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ { k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ { k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO,k3d, k3e }, \ - { k40, k41, KC_NO, k43, k44, KC_NO, k46, KC_NO, k48, KC_NO, k4a, k4b, k4c, k4d, k4e } \ + { k40, k41, KC_NO, k43, k44, KC_NO, k46, KC_NO, k48, KC_NO, k4a, k4b, KC_NO,k4d, k4e } \ } #endif diff --git a/keyboards/dz60/keymaps/olligranlund_iso/keymap.c b/keyboards/dz60/keymaps/olligranlund_iso/keymap.c index 5b8047013..74953764f 100644 --- a/keyboards/dz60/keymaps/olligranlund_iso/keymap.c +++ b/keyboards/dz60/keymaps/olligranlund_iso/keymap.c @@ -26,13 +26,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_PSCR, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_NO, KC_APP, KC_RCTL), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL), LAYOUT_60_iso_split_space_bs_rshift( 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, KC_DEL, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_PGDOWN,KC_UP, KC_PGUP, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD, KC_MUTE, KC_VOLU, KC_NO, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_RSFT, KC_CAPS, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_NO, KC_APP, KC_RCTL), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL), }; From 0db65190c2f4f72fd99d676d7e8aed6e0cc834f6 Mon Sep 17 00:00:00 2001 From: takashiski Date: Sun, 12 May 2019 15:20:45 +0900 Subject: [PATCH 016/341] [Keyboard] Enable RGBLED_SPLIT on hecomi/alpha (#5836) * remove not need file * set RGBLIGHT_SPLIT * set RGBLIGHT by layer * exchange LED color on layer * Update keyboards/hecomi/alpha/rules.mk I misunderstand RGBLIGHT_SPLIT Co-Authored-By: Drashna Jaelre --- keyboards/hecomi/alpha/config.h | 23 +- keyboards/hecomi/alpha/rules.mk | 6 +- keyboards/hecomi/config.h | 246 ---------------------- keyboards/hecomi/keymaps/default/keymap.c | 23 +- 4 files changed, 35 insertions(+), 263 deletions(-) delete mode 100644 keyboards/hecomi/config.h diff --git a/keyboards/hecomi/alpha/config.h b/keyboards/hecomi/alpha/config.h index 40bb8c2f0..8a65f146b 100644 --- a/keyboards/hecomi/alpha/config.h +++ b/keyboards/hecomi/alpha/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { C6,D7,E6,B4,B5 } #define MATRIX_COL_PINS { F4,F5,F6,F7,B1,B3,B2,B6 } #define UNUSED_PINS -#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +#define SOFT_SERIAL_PIN D1 // or D1, D2, D3, E6 //#define USE_I2C /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ @@ -62,20 +62,20 @@ along with this program. If not, see . #define RGB_DI_PIN D4 #ifdef RGB_DI_PIN - #define RGBLED_NUM 8 + #define RGBLED_NUM 16 #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 /*== or choose animations ==*/ - #define RGBLIGHT_EFFECT_BREATHING - #define RGBLIGHT_EFFECT_RAINBOW_MOOD - #define RGBLIGHT_EFFECT_RAINBOW_SWIRL - #define RGBLIGHT_EFFECT_SNAKE - #define RGBLIGHT_EFFECT_KNIGHT - #define RGBLIGHT_EFFECT_CHRISTMAS - #define RGBLIGHT_EFFECT_STATIC_GRADIENT - #define RGBLIGHT_EFFECT_RGB_TEST - #define RGBLIGHT_EFFECT_ALTERNATING +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ @@ -244,3 +244,4 @@ along with this program. If not, see . #define MASTER_LEFT #define EEHANDS */ +#define RGBLED_SPLIT {8,8} diff --git a/keyboards/hecomi/alpha/rules.mk b/keyboards/hecomi/alpha/rules.mk index ae9192be3..3e726f1d6 100644 --- a/keyboards/hecomi/alpha/rules.mk +++ b/keyboards/hecomi/alpha/rules.mk @@ -62,8 +62,8 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +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 @@ -72,7 +72,7 @@ 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 = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/hecomi/config.h b/keyboards/hecomi/config.h deleted file mode 100644 index 40bb8c2f0..000000000 --- a/keyboards/hecomi/config.h +++ /dev/null @@ -1,246 +0,0 @@ -/* -Copyright 2018 takashiski - -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 . -*/ - -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 -#define DEVICE_VER 0x0001 -#define MANUFACTURER takashiski -#define PRODUCT hecomi_alpha -#define DESCRIPTION asymmetric split keyboard - -/* key matrix size */ -//#define MATRIX_ROWS 5 -#define MATRIX_ROWS 10 -#define MATRIX_COLS 8 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * -*/ -#define MATRIX_ROW_PINS { C6,D7,E6,B4,B5 } -#define MATRIX_COL_PINS { F4,F5,F6,F7,B1,B3,B2,B6 } -#define UNUSED_PINS -#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 -//#define USE_I2C - -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ -#define DIODE_DIRECTION COL2ROW - -/* - * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, an3 define SOFT_SERIAL_PIN. - */ -//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 - -// #define BACKLIGHT_PIN B7 -// #define BACKLIGHT_BREATHING -// #define BACKLIGHT_LEVELS 3 - - #define RGB_DI_PIN D4 - #ifdef RGB_DI_PIN - #define RGBLED_NUM 8 - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 8 - #define RGBLIGHT_VAL_STEP 8 - /*== or choose animations ==*/ - #define RGBLIGHT_EFFECT_BREATHING - #define RGBLIGHT_EFFECT_RAINBOW_MOOD - #define RGBLIGHT_EFFECT_RAINBOW_SWIRL - #define RGBLIGHT_EFFECT_SNAKE - #define RGBLIGHT_EFFECT_KNIGHT - #define RGBLIGHT_EFFECT_CHRISTMAS - #define RGBLIGHT_EFFECT_STATIC_GRADIENT - #define RGBLIGHT_EFFECT_RGB_TEST - #define RGBLIGHT_EFFECT_ALTERNATING - #endif - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. - * This is userful for the Windows task manager shortcut (ctrl+shift+esc). - */ -// #define GRAVE_ESC_CTRL_OVERRIDE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - - -/* control how magic key switches layers */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false - -/* override magic key keymap */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP1 H -//#define MAGIC_KEY_HELP2 SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - -/* - * Feature disable options - * 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_FUNCTION - -/* - * MIDI options - */ - -/* Prevent use of disabled MIDI features in the keymap */ -//#define MIDI_ENABLE_STRICT 1 - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ - -/* Bootmagic Lite key configuration */ -// #define BOOTMAGIC_LITE_ROW 0 -// #define BOOTMAGIC_LITE_COLUMN 0 -// -/* -#define USE_I2C -#define MASTER_LEFT -#define EEHANDS -*/ diff --git a/keyboards/hecomi/keymaps/default/keymap.c b/keyboards/hecomi/keymaps/default/keymap.c index 25bddb7df..505966fbe 100644 --- a/keyboards/hecomi/keymaps/default/keymap.c +++ b/keyboards/hecomi/keymaps/default/keymap.c @@ -39,15 +39,15 @@ enum layers{ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [DF]=LAYOUT(\ KC_ESC,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_NUHS,KC_GRV,\ - KC_TAB ,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y, KC_Y,KC_U,KC_I,KC_O,KC_P,KC_LBRC,KC_RBRC,KC_DEL,\ + KC_TAB ,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y, KC_Y,KC_U,KC_I,KC_O,KC_P,KC_LBRC,KC_RBRC,KC_BSPC,\ KC_LCTRL ,KC_A,KC_S,KC_D,KC_F,KC_G, KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_QUOT,KC_ENT,\ KC_LSFT ,KC_Z,KC_X,KC_C,KC_V,KC_B, KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_RSFT,KC_FN,\ KC_LCTRL,KC_LGUI,KC_LALT,KC_MHEN,KC_BSPC,KC_SPC, KC_ENT,KC_ESC,KC_HENK,KC_RALT,KC_RGUI,KC_RCTRL\ ), [FN]=LAYOUT(\ KC_ESC,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_INS,KC_DEL,\ - KC_TAB ,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y, KC_Y,KC_U,KC_PSCR,KC_SLCK,KC_PAUSE,KC_UP,KC_RBRC,KC_BSPC,\ - KC_CAPS ,KC_A,KC_S,KC_D,KC_F,KC_G, KC_SFT(KC_8),KC_SLSH,KC_HOME,KC_PGUP,KC_LEFT,KC_RIGHT,KC_ENT,\ + KC_TAB ,KC_9,KC_7,KC_5,KC_3,KC_1,KC_Y, KC_Y,KC_U,KC_PSCR,KC_SLCK,KC_PAUSE,KC_UP,KC_RBRC,KC_BSPC,\ + KC_CAPS ,KC_8,KC_6,KC_4,KC_2,KC_0, KC_SFT(KC_8),KC_SLSH,KC_HOME,KC_PGUP,KC_LEFT,KC_RIGHT,KC_ENT,\ KC_LSFT ,KC_Z,KC_X,KC_C,KC_V,KC_B, KC_B,KC_SFT(KC_EQL),KC_MINS,KC_END,KC_PGDN,KC_DOWN,KC_RSFT,KC_TRNS,\ KC_LCTRL,KC_LGUI,KC_LALT,KC_MHEN,KC_BSPC,KC_SPC, KC_ENT,KC_ESC,KC_HENK,KC_RALT,KC_RGUI,KC_RCTRL\ ), @@ -75,6 +75,23 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } +uint32_t layer_state_set_user(uint32_t state) +{ + uint8_t layer=biton32(state); + switch(layer) + { + case DF: + rgblight_sethsv_noeeprom(180,255,255); + break; + case FN: + rgblight_sethsv_noeeprom(0,255,255); + break; + default: + break; + } + return state; +} + void matrix_init_user(void) { } From 94f104cb6cd8751b49df7fa7e5b0b266e5354f92 Mon Sep 17 00:00:00 2001 From: Croktopus <39040552+Croktopus@users.noreply.github.com> Date: Sat, 11 May 2019 23:59:52 -0700 Subject: [PATCH 017/341] [Keyboard] Added hand wired keyboard "Daishi" (#5712) * added daishi * edits made based on feedback * Update keyboards/handwired/daishi/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/handwired/daishi/keymaps/default/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/handwired/daishi/keymaps/default/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * made more changes based on feedback * Update keyboards/handwired/daishi/keymaps/default/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * updated usb device info * fixed layouts * fixed LEDs and keymaps --- keyboards/handwired/daishi/config.h | 61 +++++++++ keyboards/handwired/daishi/daishi.c | 22 ++++ keyboards/handwired/daishi/daishi.h | 25 ++++ .../handwired/daishi/keymaps/default/keymap.c | 124 ++++++++++++++++++ .../daishi/keymaps/default/readme.md | 5 + keyboards/handwired/daishi/readme.md | 15 +++ keyboards/handwired/daishi/rules.mk | 66 ++++++++++ 7 files changed, 318 insertions(+) create mode 100644 keyboards/handwired/daishi/config.h create mode 100644 keyboards/handwired/daishi/daishi.c create mode 100644 keyboards/handwired/daishi/daishi.h create mode 100644 keyboards/handwired/daishi/keymaps/default/keymap.c create mode 100644 keyboards/handwired/daishi/keymaps/default/readme.md create mode 100644 keyboards/handwired/daishi/readme.md create mode 100644 keyboards/handwired/daishi/rules.mk diff --git a/keyboards/handwired/daishi/config.h b/keyboards/handwired/daishi/config.h new file mode 100644 index 000000000..020b486a9 --- /dev/null +++ b/keyboards/handwired/daishi/config.h @@ -0,0 +1,61 @@ +/* +Copyright 2019 Crokto + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6D6D +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER MetaMechs +#define PRODUCT Daishi +#define DESCRIPTION Compact Battlecruiser + +/* key matrix size */ +#define MATRIX_ROWS 7 +#define MATRIX_COLS 18 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D6, D7, E0, E1, C0, C1, C2 } +#define MATRIX_COL_PINS { E6, E7, E3, B0, B1, B2, A6, A5, A4, A3, A2, A1, A0, F7, F6, F5, F4, F3 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* Set up rotary encoder */ +#define NUMBER_OF_ENCODERS 1 +#define ENCODERS_PAD_A { F1 } +#define ENCODERS_PAD_B { F0 } +#define ENCODER_RESOLUTION 2 + +/* Set delay for tap_code on rotary encoder */ +#define TAP_CODE_DELAY 10 \ No newline at end of file diff --git a/keyboards/handwired/daishi/daishi.c b/keyboards/handwired/daishi/daishi.c new file mode 100644 index 000000000..dcd2cd0d1 --- /dev/null +++ b/keyboards/handwired/daishi/daishi.c @@ -0,0 +1,22 @@ +#include "daishi.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} \ No newline at end of file diff --git a/keyboards/handwired/daishi/daishi.h b/keyboards/handwired/daishi/daishi.h new file mode 100644 index 000000000..49e377589 --- /dev/null +++ b/keyboards/handwired/daishi/daishi.h @@ -0,0 +1,25 @@ +#pragma once + +#include "quantum.h" + +#define encoder_update(clockwise) encoder_update_user(uint8_t index, clockwise) + +// 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, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4E, K4F, K4G, K4H, \ + K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5D, K5E, K5F, K5G, K5H, \ + K60, K61, K62, K65, K69, K6A, K6C, K6D, K6E, K6F, K6G \ +){ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, KC_NO, K4E, K4F, K4G, K4H }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, KC_NO, K5D, K5E, K5F, K5G, K5H }, \ + { K60, K61, K62, KC_NO, KC_NO, K65, KC_NO, KC_NO, KC_NO, K69, K6A, KC_NO, K6C, K6D, K6E, K6F, K6G, KC_NO } \ +} diff --git a/keyboards/handwired/daishi/keymaps/default/keymap.c b/keyboards/handwired/daishi/keymaps/default/keymap.c new file mode 100644 index 000000000..c0baf7006 --- /dev/null +++ b/keyboards/handwired/daishi/keymaps/default/keymap.c @@ -0,0 +1,124 @@ +#include QMK_KEYBOARD_H + +// Layer shorthand +#define _QW 0 +#define _FN 1 + +enum custom_keycodes { + M_EXAMPLE1 = SAFE_RANGE, + M_EXAMPLE2, + DYNAMIC_MACRO_RANGE, +}; + +#include "dynamic_macro.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * .-----------------------------------------------------------------------------------------------------------------------------------------------------------------. + * | ESC | | | | | | | | | | DM1 | DM2 | DMSTOP | PRINT | SCROLL | PAUSE | FN | VOL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------| + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | HOME | PGUP | END | INS | NUM | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACK | PGDN | / | * | - | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | 7 | 8 | 9 | + | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------| + * | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | | 4 | 5 | 6 | = | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------| + * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | | UP | 1 | 2 | 3 | ENTER | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------| + * | LCTRL | LGUI | LALT | | | SPACE | | | | RALT | RCTRL | | LEFT | DOWN | RIGHT | 0 | . | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------' + */ + + [_QW] = LAYOUT( /* QWERTY */ + KC_ESC , _______, _______, _______, _______, _______, _______, _______, _______, _______,DYN_MACRO_PLAY1,DYN_MACRO_PLAY2,DYN_REC_STOP, KC_PSCR, KC_SLCK, KC_PAUS, MO(_FN), KC_MUTE, + 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 , KC_HOME, KC_PGUP, KC_END , KC_INS , KC_NLCK, + KC_GRV , 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_PGDN, KC_PSLS, KC_PAST, KC_PMNS, + 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_P7 , KC_P8 , KC_P9 , KC_PPLS, + KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_P4 , KC_P5 , KC_P6 , KC_EQL , + 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_UP , KC_P1 , KC_P2 , KC_P3 , KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_PDOT + ), + +/* FN + * .-----------------------------------------------------------------------------------------------------------------------------------------------------------------. + * | RESET | F13 | F14 | F15 | f16 | f17 | f18 | F19 | F20 | F21 | DM1 R | DM2 R | DMSTOP | | | | FN | DEBUG | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------' + */ + + [_FN] = LAYOUT( /* Function */ + RESET , KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_F21 ,DYN_REC_START1,DYN_REC_START2,DYN_REC_STOP, _______, _______, _______, MO(_FN), DEBUG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (!process_record_dynamic_macro(keycode, record)) { + return false; + } + if (record->event.pressed) { + switch(keycode) { + case M_EXAMPLE1: + SEND_STRING("This is an example macro!"SS_TAP(X_ENTER)); //prints "This is an example macro!" and hits Enter + return false; + case M_EXAMPLE2: + SEND_STRING("This is a another example!"SS_TAP(X_ENTER)); //prints "This is a another example!" and hits Enter + return false; + } + } + return true; +}; + +void encoder_update(bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} + +void matrix_init_user(void) { + // Call the keymap level matrix init. + + // Set our LED pins as output + setPinOutput(C4); + setPinOutput(C5); + setPinOutput(C6); +} + +void led_set_kb(uint8_t usb_led) { + if (IS_LED_OFF(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(C4); + } else { + writePinHigh(C4); + } + if (IS_LED_OFF(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(C5); + } else { + writePinHigh(C5); + } + if (IS_LED_OFF(usb_led, USB_LED_SCROLL_LOCK)) { + writePinLow(C6); + } else { + writePinHigh(C6); + } +} \ No newline at end of file diff --git a/keyboards/handwired/daishi/keymaps/default/readme.md b/keyboards/handwired/daishi/keymaps/default/readme.md new file mode 100644 index 000000000..bed7fcb23 --- /dev/null +++ b/keyboards/handwired/daishi/keymaps/default/readme.md @@ -0,0 +1,5 @@ +# Default Daishi Layout + +![Daishi Layout Image](https://i.imgur.com/fuJZGmw.png) + +This is the default layout that comes on the Daishi. For more information on the design of this layout, check out [kb.metamechs.com](http://kb.metamechs.com/daishi/). diff --git a/keyboards/handwired/daishi/readme.md b/keyboards/handwired/daishi/readme.md new file mode 100644 index 000000000..88ac8ea79 --- /dev/null +++ b/keyboards/handwired/daishi/readme.md @@ -0,0 +1,15 @@ +# Daishi + +![Daishi](http://kb.metamechs.com/wp-content/uploads/2019/03/IMG_20190325_113405-e1553610532162-1024x709.jpg) + +A compact battlecruiser using the CBC1 PCB. [More info on kb.metamechs.com](http://kb.metamechs.com/daishi/) + +Keyboard Maintainer: [Crokto](https://github.com/Croktopus/) +Hardware Supported: CBC1 PCB +Hardware Availability: [kb.metamechs.com](http://kb.metamechs.com/daishi/get-your-own-daishi/) + +Make example for this keyboard (after setting up your build environment): + + make handwired/daishi:default + +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). diff --git a/keyboards/handwired/daishi/rules.mk b/keyboards/handwired/daishi/rules.mk new file mode 100644 index 000000000..ece1eaaac --- /dev/null +++ b/keyboards/handwired/daishi/rules.mk @@ -0,0 +1,66 @@ +# MCU name +MCU = at90usb1286 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +BOOTLOADER = atmel-dfu + +# QMK Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +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 = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +ENCODER_ENABLE = yes # Add rotary encoder support \ No newline at end of file From 7e1d28673ff4c984be889ca1b67a45ca6d3a5065 Mon Sep 17 00:00:00 2001 From: zvecr Date: Sun, 12 May 2019 08:01:00 +0100 Subject: [PATCH 018/341] [Keyboard] Fix file encoding and add readme (#5853) --- keyboards/yosino58/readme.md | 16 ++++++++++++++++ keyboards/yosino58/rev1/config.h | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 keyboards/yosino58/readme.md diff --git a/keyboards/yosino58/readme.md b/keyboards/yosino58/readme.md new file mode 100644 index 000000000..50c95bb99 --- /dev/null +++ b/keyboards/yosino58/readme.md @@ -0,0 +1,16 @@ +# yosino58 + +![yosino58](https://booth.pximg.net/4b06a4ec-3a3f-49c5-a9b2-46aa086c82b0/i/1278362/5596aecd-418d-4f28-be64-d8344db22e72_base_resized.jpg) + +yosino58 is a 58-key, Column-Staggered split keyboard. +Compatible with Cherry MX and Kailh low profile switches. Optional support for OLED and Backlight LED. + +Keyboard Maintainer: [sakurachari](https://github.com/sakurachari) +Hardware Supported: yosino58 +Hardware Availability: https://booth.pm/ja/items/1278362 + +Make example for this keyboard (after setting up your build environment): + + make yosino58:default + +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). diff --git a/keyboards/yosino58/rev1/config.h b/keyboards/yosino58/rev1/config.h index a9f4f666e..8a0cf151b 100644 --- a/keyboards/yosino58/rev1/config.h +++ b/keyboards/yosino58/rev1/config.h @@ -24,7 +24,7 @@ along with this program. If not, see . #define DEVICE_VER 0x0001 #define MANUFACTURER sakuranbo0046 #define PRODUCT yosino58 -#define DESCRIPTION yosino58 is 6~4+5keys column-staggered split keyboard. +#define DESCRIPTION yosino58 is 6x4+5keys column-staggered split keyboard. /* key matrix size */ // Rows are doubled-up From 8e3cbe030c10090301ae94427cf0e6cf31ef31d9 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 13 May 2019 04:22:16 +1000 Subject: [PATCH 019/341] Add Wasdat controller (#5855) * Add Wasdat controller * Add reset instructions * Clarify ANSI & ISO support --- keyboards/wasdat/config.h | 256 +++++++++ keyboards/wasdat/info.json | 459 +++++++++++++++++ keyboards/wasdat/keymaps/default/keymap.c | 44 ++ keyboards/wasdat/keymaps/default/readme.md | 1 + keyboards/wasdat/keymaps/default_iso/keymap.c | 44 ++ .../wasdat/keymaps/default_iso/readme.md | 1 + keyboards/wasdat/matrix.c | 484 ++++++++++++++++++ keyboards/wasdat/readme.md | 21 + keyboards/wasdat/rules.mk | 84 +++ keyboards/wasdat/wasdat.c | 58 +++ keyboards/wasdat/wasdat.h | 104 ++++ 11 files changed, 1556 insertions(+) create mode 100644 keyboards/wasdat/config.h create mode 100644 keyboards/wasdat/info.json create mode 100644 keyboards/wasdat/keymaps/default/keymap.c create mode 100644 keyboards/wasdat/keymaps/default/readme.md create mode 100644 keyboards/wasdat/keymaps/default_iso/keymap.c create mode 100644 keyboards/wasdat/keymaps/default_iso/readme.md create mode 100644 keyboards/wasdat/matrix.c create mode 100644 keyboards/wasdat/readme.md create mode 100644 keyboards/wasdat/rules.mk create mode 100644 keyboards/wasdat/wasdat.c create mode 100644 keyboards/wasdat/wasdat.h diff --git a/keyboards/wasdat/config.h b/keyboards/wasdat/config.h new file mode 100644 index 000000000..73dcdc536 --- /dev/null +++ b/keyboards/wasdat/config.h @@ -0,0 +1,256 @@ +/* +Copyright 2019 Maarten Dekkers + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maartenwut +#define PRODUCT Wasdat +#define DESCRIPTION Custom controller for the WASD v2 TKL and 104 + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D6, D4, F6, F7, F4, F5, F0, F1 } +#define MATRIX_COL_PINS { } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +// For QMK DFU +#define QMK_ESC_OUTPUT D6 +#define QMK_ESC_INPUT D7 +#define QMK_LED B0 + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/wasdat/info.json b/keyboards/wasdat/info.json new file mode 100644 index 000000000..8f931f46c --- /dev/null +++ b/keyboards/wasdat/info.json @@ -0,0 +1,459 @@ +{ + "keyboard_name": "Wasdat", + "url": "https://maartenwut.com/product/wasdat/", + "maintainer": "Maartenwut", + "width": 22.5, + "height": 6.5, + "layouts": { + "LAYOUT_fullsize_ansi": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + + {"label":"~", "x":0, "y":1.5}, + {"label":"1", "x":1, "y":1.5}, + {"label":"2", "x":2, "y":1.5}, + {"label":"3", "x":3, "y":1.5}, + {"label":"4", "x":4, "y":1.5}, + {"label":"5", "x":5, "y":1.5}, + {"label":"6", "x":6, "y":1.5}, + {"label":"7", "x":7, "y":1.5}, + {"label":"8", "x":8, "y":1.5}, + {"label":"9", "x":9, "y":1.5}, + {"label":"0", "x":10, "y":1.5}, + {"label":"_", "x":11, "y":1.5}, + {"label":"+", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"PgUp", "x":17.25, "y":1.5}, + + {"label":"Num Lock", "x":18.5, "y":1.5}, + {"label":"/", "x":19.5, "y":1.5}, + {"label":"*", "x":20.5, "y":1.5}, + {"label":"-", "x":21.5, "y":1.5}, + + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"{", "x":11.5, "y":2.5}, + {"label":"}", "x":12.5, "y":2.5}, + {"label":"|", "x":13.5, "y":2.5, "w":1.5}, + + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"PgDn", "x":17.25, "y":2.5}, + + {"label":"7", "x":18.5, "y":2.5}, + {"label":"8", "x":19.5, "y":2.5}, + {"label":"9", "x":20.5, "y":2.5}, + {"label":"+", "x":21.5, "y":2.5, "h":2}, + + {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, + {"label":"A", "x":1.75, "y":3.5}, + {"label":"S", "x":2.75, "y":3.5}, + {"label":"D", "x":3.75, "y":3.5}, + {"label":"F", "x":4.75, "y":3.5}, + {"label":"G", "x":5.75, "y":3.5}, + {"label":"H", "x":6.75, "y":3.5}, + {"label":"J", "x":7.75, "y":3.5}, + {"label":"K", "x":8.75, "y":3.5}, + {"label":"L", "x":9.75, "y":3.5}, + {"label":":", "x":10.75, "y":3.5}, + {"label":"\"", "x":11.75, "y":3.5}, + {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, + + {"label":"4", "x":18.5, "y":3.5}, + {"label":"5", "x":19.5, "y":3.5}, + {"label":"6", "x":20.5, "y":3.5}, + + {"label":"Shift", "x":0, "y":4.5, "w":2.25}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":"<", "x":9.25, "y":4.5}, + {"label":">", "x":10.25, "y":4.5}, + {"label":"?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, + + {"label":"\u2191", "x":16.25, "y":4.5}, + + {"label":"1", "x":18.5, "y":4.5}, + {"label":"2", "x":19.5, "y":4.5}, + {"label":"3", "x":20.5, "y":4.5}, + {"label":"Enter", "x":21.5, "y":4.5, "h":2}, + + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, + {"x":3.75, "y":5.5, "w":6.25}, + {"label":"Alt", "x":10, "y":5.5, "w":1.25}, + {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + + {"label":"\u2190", "x":15.25, "y":5.5}, + {"label":"\u2193", "x":16.25, "y":5.5}, + {"label":"\u2192", "x":17.25, "y":5.5}, + + {"label":"0", "x":18.5, "y":5.5, "w":2}, + {"label":".", "x":20.5, "y":5.5} + ] + }, + "LAYOUT_fullsize_iso": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + + {"label":"\u00ac", "x":0, "y":1.5}, + {"label":"!", "x":1, "y":1.5}, + {"label":"\"", "x":2, "y":1.5}, + {"label":"\u00a3", "x":3, "y":1.5}, + {"label":"$", "x":4, "y":1.5}, + {"label":"%", "x":5, "y":1.5}, + {"label":"^", "x":6, "y":1.5}, + {"label":"&", "x":7, "y":1.5}, + {"label":"*", "x":8, "y":1.5}, + {"label":"(", "x":9, "y":1.5}, + {"label":")", "x":10, "y":1.5}, + {"label":"_", "x":11, "y":1.5}, + {"label":"+", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"PgUp", "x":17.25, "y":1.5}, + + {"label":"Num Lock", "x":18.5, "y":1.5}, + {"label":"/", "x":19.5, "y":1.5}, + {"label":"*", "x":20.5, "y":1.5}, + {"label":"-", "x":21.5, "y":1.5}, + + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"{", "x":11.5, "y":2.5}, + {"label":"}", "x":12.5, "y":2.5}, + {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, + + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"PgDn", "x":17.25, "y":2.5}, + + {"label":"7", "x":18.5, "y":2.5}, + {"label":"8", "x":19.5, "y":2.5}, + {"label":"9", "x":20.5, "y":2.5}, + {"label":"+", "x":21.5, "y":2.5, "h":2}, + + {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, + {"label":"A", "x":1.75, "y":3.5}, + {"label":"S", "x":2.75, "y":3.5}, + {"label":"D", "x":3.75, "y":3.5}, + {"label":"F", "x":4.75, "y":3.5}, + {"label":"G", "x":5.75, "y":3.5}, + {"label":"H", "x":6.75, "y":3.5}, + {"label":"J", "x":7.75, "y":3.5}, + {"label":"K", "x":8.75, "y":3.5}, + {"label":"L", "x":9.75, "y":3.5}, + {"label":":", "x":10.75, "y":3.5}, + {"label":"@", "x":11.75, "y":3.5}, + {"label":"~", "x":12.75, "y":3.5}, + + {"label":"4", "x":18.5, "y":3.5}, + {"label":"5", "x":19.5, "y":3.5}, + {"label":"6", "x":20.5, "y":3.5}, + + {"label":"Shift", "x":0, "y":4.5, "w":1.25}, + {"label":"|", "x":1.25, "y":4.5}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":"<", "x":9.25, "y":4.5}, + {"label":">", "x":10.25, "y":4.5}, + {"label":"?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, + + {"label":"\u2191", "x":16.25, "y":4.5}, + + {"label":"1", "x":18.5, "y":4.5}, + {"label":"2", "x":19.5, "y":4.5}, + {"label":"3", "x":20.5, "y":4.5}, + {"label":"Enter", "x":21.5, "y":4.5, "h":2}, + + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, + {"x":3.75, "y":5.5, "w":6.25}, + {"label":"AltGr", "x":10, "y":5.5, "w":1.25}, + {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + + {"label":"\u2190", "x":15.25, "y":5.5}, + {"label":"\u2193", "x":16.25, "y":5.5}, + {"label":"\u2192", "x":17.25, "y":5.5}, + + {"label":"0", "x":18.5, "y":5.5, "w":2}, + {"label":".", "x":20.5, "y":5.5} + ] + }, + "LAYOUT_tkl_ansi": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + + {"label":"~", "x":0, "y":1.5}, + {"label":"1", "x":1, "y":1.5}, + {"label":"2", "x":2, "y":1.5}, + {"label":"3", "x":3, "y":1.5}, + {"label":"4", "x":4, "y":1.5}, + {"label":"5", "x":5, "y":1.5}, + {"label":"6", "x":6, "y":1.5}, + {"label":"7", "x":7, "y":1.5}, + {"label":"8", "x":8, "y":1.5}, + {"label":"9", "x":9, "y":1.5}, + {"label":"0", "x":10, "y":1.5}, + {"label":"_", "x":11, "y":1.5}, + {"label":"+", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"Page Up", "x":17.25, "y":1.5}, + + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"{", "x":11.5, "y":2.5}, + {"label":"}", "x":12.5, "y":2.5}, + {"label":"|", "x":13.5, "y":2.5, "w":1.5}, + + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"PgDn", "x":17.25, "y":2.5}, + + {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, + {"label":"A", "x":1.75, "y":3.5}, + {"label":"S", "x":2.75, "y":3.5}, + {"label":"D", "x":3.75, "y":3.5}, + {"label":"F", "x":4.75, "y":3.5}, + {"label":"G", "x":5.75, "y":3.5}, + {"label":"H", "x":6.75, "y":3.5}, + {"label":"J", "x":7.75, "y":3.5}, + {"label":"K", "x":8.75, "y":3.5}, + {"label":"L", "x":9.75, "y":3.5}, + {"label":":", "x":10.75, "y":3.5}, + {"label":"\"", "x":11.75, "y":3.5}, + {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, + + {"label":"Shift", "x":0, "y":4.5, "w":2.25}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":"<", "x":9.25, "y":4.5}, + {"label":">", "x":10.25, "y":4.5}, + {"label":"?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, + + {"label":"\u2191", "x":16.25, "y":4.5}, + + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, + {"x":3.75, "y":5.5, "w":6.25}, + {"label":"Alt", "x":10, "y":5.5, "w":1.25}, + {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + + {"label":"\u2190", "x":15.25, "y":5.5}, + {"label":"\u2193", "x":16.25, "y":5.5}, + {"label":"\u2192", "x":17.25, "y":5.5} + ] + }, + "LAYOUT_tkl_iso": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + + {"label":"\u00ac", "x":0, "y":1.5}, + {"label":"!", "x":1, "y":1.5}, + {"label":"\"", "x":2, "y":1.5}, + {"label":"\u00a3", "x":3, "y":1.5}, + {"label":"$", "x":4, "y":1.5}, + {"label":"%", "x":5, "y":1.5}, + {"label":"^", "x":6, "y":1.5}, + {"label":"&", "x":7, "y":1.5}, + {"label":"*", "x":8, "y":1.5}, + {"label":"(", "x":9, "y":1.5}, + {"label":")", "x":10, "y":1.5}, + {"label":"_", "x":11, "y":1.5}, + {"label":"+", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"PgUp", "x":17.25, "y":1.5}, + + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"{", "x":11.5, "y":2.5}, + {"label":"}", "x":12.5, "y":2.5}, + {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, + + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"PgDn", "x":17.25, "y":2.5}, + + {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, + {"label":"A", "x":1.75, "y":3.5}, + {"label":"S", "x":2.75, "y":3.5}, + {"label":"D", "x":3.75, "y":3.5}, + {"label":"F", "x":4.75, "y":3.5}, + {"label":"G", "x":5.75, "y":3.5}, + {"label":"H", "x":6.75, "y":3.5}, + {"label":"J", "x":7.75, "y":3.5}, + {"label":"K", "x":8.75, "y":3.5}, + {"label":"L", "x":9.75, "y":3.5}, + {"label":":", "x":10.75, "y":3.5}, + {"label":"@", "x":11.75, "y":3.5}, + {"label":"~", "x":12.75, "y":3.5}, + + {"label":"Shift", "x":0, "y":4.5, "w":1.25}, + {"label":"|", "x":1.25, "y":4.5}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":"<", "x":9.25, "y":4.5}, + {"label":">", "x":10.25, "y":4.5}, + {"label":"?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, + + {"label":"\u2191", "x":16.25, "y":4.5}, + + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, + {"x":3.75, "y":5.5, "w":6.25}, + {"label":"AltGr", "x":10, "y":5.5, "w":1.25}, + {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + + {"label":"\u2190", "x":15.25, "y":5.5}, + {"label":"\u2193", "x":16.25, "y":5.5}, + {"label":"\u2192", "x":17.25, "y":5.5} + ] + } + } +} diff --git a/keyboards/wasdat/keymaps/default/keymap.c b/keyboards/wasdat/keymaps/default/keymap.c new file mode 100644 index 000000000..967947ada --- /dev/null +++ b/keyboards/wasdat/keymaps/default/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2019 Maarten Dekkers + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │Esc│   │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Slk│Pse│ + * └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp| |Ins|Hom|PgU| |Num| / | * | - | + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │  \  │ |Del|End|PgD| │ 7 │ 8 │ 9 │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤ + │ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │  Enter │               │ 4 │ 5 │ 6 │   │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐     ├───┼───┼───┼───┤ + * │ Shift  │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │    Shift │     │ ↑ │     │ 1 │ 2 │ 3 │   │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│ + * │Ctrl│GUI │Alt │                        │ Alt│ GUI│Menu│Ctrl│ │ ← │ ↓ │ → │ │   0   │ . │   │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ + */ + LAYOUT_fullsize_ansi( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, + + KC_GRV, 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, + 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_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ) +}; diff --git a/keyboards/wasdat/keymaps/default/readme.md b/keyboards/wasdat/keymaps/default/readme.md new file mode 100644 index 000000000..66cf59389 --- /dev/null +++ b/keyboards/wasdat/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default ANSI keymap for the Wasdat diff --git a/keyboards/wasdat/keymaps/default_iso/keymap.c b/keyboards/wasdat/keymaps/default_iso/keymap.c new file mode 100644 index 000000000..00a45d746 --- /dev/null +++ b/keyboards/wasdat/keymaps/default_iso/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2019 Maarten Dekkers + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │Esc│   │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Slk│Pse│ + * └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp| |Ins|Hom|PgU| |Num| / | * | - | + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │     │ |Del|End|PgD| │ 7 │ 8 │ 9 │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ Ent│ └───┴───┴───┘ ├───┼───┼───┤ + │ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │    │               │ 4 │ 5 │ 6 │   │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤     ┌───┐     ├───┼───┼───┼───┤ + * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │    Shift │     │ ↑ │     │ 1 │ 2 │ 3 │   │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│ + * │Ctrl│GUI │Alt │                        │AlGr│ GUI│Menu│Ctrl│ │ ← │ ↓ │ → │ │   0   │ . │   │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ + */ + LAYOUT_fullsize_iso( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, + + KC_GRV, 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, + KC_LSFT, KC_NUBS, 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_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ) +}; diff --git a/keyboards/wasdat/keymaps/default_iso/readme.md b/keyboards/wasdat/keymaps/default_iso/readme.md new file mode 100644 index 000000000..e36d76420 --- /dev/null +++ b/keyboards/wasdat/keymaps/default_iso/readme.md @@ -0,0 +1 @@ +# The default ISO keymap for the Wasdat diff --git a/keyboards/wasdat/matrix.c b/keyboards/wasdat/matrix.c new file mode 100644 index 000000000..b481e5394 --- /dev/null +++ b/keyboards/wasdat/matrix.c @@ -0,0 +1,484 @@ +/* +Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar + +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 . +*/ +#include +#include +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +#ifdef MATRIX_MASKED + extern const matrix_row_t matrix_mask[]; +#endif + +#ifdef DIRECT_PINS +static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS; +#elif (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) +static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +//static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; +#endif + +/* matrix state(1:on, 0:off) */ +static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values +static matrix_row_t matrix[MATRIX_ROWS]; //debounced values + +__attribute__ ((weak)) +void matrix_init_quantum(void) { + matrix_init_kb(); +} + +__attribute__ ((weak)) +void matrix_scan_quantum(void) { + matrix_scan_kb(); +} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +//Deprecated. +bool matrix_is_modified(void) +{ + if (debounce_active()) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1< + * + * 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 . + */ +#include "wasdat.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); + led_init_ports(); +} + +void led_init_ports(void) { + setPinOutput(B0); + setPinOutput(B1); + setPinOutput(B2); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B0); + } else { + writePinHigh(B0); + } + + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinLow(B1); + } else { + writePinHigh(B1); + } + + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(B2); + } else { + writePinHigh(B2); + } + + led_set_user(usb_led); +} diff --git a/keyboards/wasdat/wasdat.h b/keyboards/wasdat/wasdat.h new file mode 100644 index 000000000..508ada485 --- /dev/null +++ b/keyboards/wasdat/wasdat.h @@ -0,0 +1,104 @@ +/* Copyright 2019 Maarten Dekkers + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_fullsize_ansi( \ + K05, K44, K42, K32, K02, K21, K0A, K3E, K4E, K4D, K2D, K0D, K7D, K23, K53, K51, \ + K45, K25, K24, K22, K20, K40, K48, K28, K2A, K2E, K2F, K4F, K4A, K3D, K47, K4C, K46, K69, K67, K66, K76, \ + K35, K55, K54, K52, K50, K30, K38, K58, K5A, K5E, K5F, K3F, K3A, K1D, K49, K2C, K26, K59, K57, K56, K5C, \ + K34, K15, K14, K12, K10, K00, K08, K18, K1A, K1E, K1F, K0F, K6D, K39, K37, K36, \ + K3B, K65, K64, K62, K60, K70, K78, K68, K6A, K6E, K7F, K1B, K0C, K19, K17, K16, K1C, \ + K41, K31, K03, K09, K73, K11, K33, K61, K7C, K79, K77, K07, K06 \ +) \ +{ \ + { K00, XXX, K02, K03, XXX, K05, K06, K07, K08, K09, K0A, XXX, K0C, K0D, XXX, K0F }, \ + { K10, K11, K12, XXX, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, XXX, K28, XXX, K2A, XXX, K2C, K2D, K2E, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E, K3F }, \ + { K40, K41, K42, XXX, K44, K45, K46, K47, K48, K49, K4A, XXX, K4C, K4D, K4E, K4F }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, XXX, K5C, XXX, K5E, K5F }, \ + { K60, K61, K62, XXX, K64, K65, K66, K67, K68, K69, K6A, XXX, XXX, K6D, K6E, XXX }, \ + { K70, XXX, XXX, K73, XXX, XXX, K76, K77, K78, K79, XXX, XXX, K7C, K7D, XXX, K7F } \ +} + +#define LAYOUT_fullsize_iso( \ + K05, K44, K42, K32, K02, K21, K0A, K3E, K4E, K4D, K2D, K0D, K7D, K23, K53, K51, \ + K45, K25, K24, K22, K20, K40, K48, K28, K2A, K2E, K2F, K4F, K4A, K3D, K47, K4C, K46, K69, K67, K66, K76, \ + K35, K55, K54, K52, K50, K30, K38, K58, K5A, K5E, K5F, K3F, K3A, K49, K2C, K26, K59, K57, K56, K5C, \ + K34, K15, K14, K12, K10, K00, K08, K18, K1A, K1E, K1F, K0F, K1D, K6D, K39, K37, K36, \ + K3B, K04, K65, K64, K62, K60, K70, K78, K68, K6A, K6E, K7F, K1B, K0C, K19, K17, K16, K1C, \ + K41, K31, K03, K09, K73, K11, K33, K61, K7C, K79, K77, K07, K06 \ +) \ +{ \ + { K00, XXX, K02, K03, K04, K05, K06, K07, K08, K09, K0A, XXX, K0C, K0D, XXX, K0F }, \ + { K10, K11, K12, XXX, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, XXX, K28, XXX, K2A, XXX, K2C, K2D, K2E, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E, K3F }, \ + { K40, K41, K42, XXX, K44, K45, K46, K47, K48, K49, K4A, XXX, K4C, K4D, K4E, K4F }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, XXX, K5C, XXX, K5E, K5F }, \ + { K60, K61, K62, XXX, K64, K65, K66, K67, K68, K69, K6A, XXX, XXX, K6D, K6E, XXX }, \ + { K70, XXX, XXX, K73, XXX, XXX, K76, K77, K78, K79, XXX, XXX, K7C, K7D, XXX, K7F } \ +} + +#define LAYOUT_tkl_ansi( \ + K05, K44, K42, K32, K02, K21, K0A, K3E, K4E, K4D, K2D, K0D, K7D, K23, K53, K51, \ + K45, K25, K24, K22, K20, K40, K48, K28, K2A, K2E, K2F, K4F, K4A, K3D, K47, K4C, K46, \ + K35, K55, K54, K52, K50, K30, K38, K58, K5A, K5E, K5F, K3F, K3A, K1D, K49, K2C, K26, \ + K34, K15, K14, K12, K10, K00, K08, K18, K1A, K1E, K1F, K0F, K6D, \ + K3B, K65, K64, K62, K60, K70, K78, K68, K6A, K6E, K7F, K1B, K0C, \ + K41, K31, K03, K09, K73, K11, K33, K61, K7C, K79, K77 \ +) \ +{ \ + { K00, XXX, K02, K03, XXX, K05, XXX, XXX, K08, K09, K0A, XXX, K0C, K0D, XXX, K0F }, \ + { K10, K11, K12, XXX, K14, K15, XXX, XXX, K18, XXX, K1A, K1B, XXX, K1D, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, XXX, K28, XXX, K2A, XXX, K2C, K2D, K2E, K2F }, \ + { K30, K31, K32, K33, K34, K35, XXX, XXX, K38, XXX, K3A, K3B, XXX, K3D, K3E, K3F }, \ + { K40, K41, K42, XXX, K44, K45, K46, K47, K48, K49, K4A, XXX, K4C, K4D, K4E, K4F }, \ + { K50, K51, K52, K53, K54, K55, XXX, XXX, K58, XXX, K5A, XXX, XXX, XXX, K5E, K5F }, \ + { K60, K61, K62, XXX, K64, K65, XXX, XXX, K68, XXX, K6A, XXX, XXX, K6D, K6E, XXX }, \ + { K70, XXX, XXX, K73, XXX, XXX, XXX, K77, K78, K79, XXX, XXX, K7C, K7D, XXX, K7F } \ +} + +#define LAYOUT_tkl_iso( \ + K05, K44, K42, K32, K02, K21, K0A, K3E, K4E, K4D, K2D, K0D, K7D, K23, K53, K51, \ + K45, K25, K24, K22, K20, K40, K48, K28, K2A, K2E, K2F, K4F, K4A, K3D, K47, K4C, K46, \ + K35, K55, K54, K52, K50, K30, K38, K58, K5A, K5E, K5F, K3F, K3A, K49, K2C, K26, \ + K34, K15, K14, K12, K10, K00, K08, K18, K1A, K1E, K1F, K0F, K1D, K6D, \ + K3B, K04, K65, K64, K62, K60, K70, K78, K68, K6A, K6E, K7F, K1B, K0C, \ + K41, K31, K03, K09, K73, K11, K33, K61, K7C, K79, K77 \ +) \ +{ \ + { K00, XXX, K02, K03, K04, K05, XXX, XXX, K08, K09, K0A, XXX, K0C, K0D, XXX, K0F }, \ + { K10, K11, K12, XXX, K14, K15, XXX, XXX, K18, XXX, K1A, K1B, XXX, K1D, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, XXX, K28, XXX, K2A, XXX, K2C, K2D, K2E, K2F }, \ + { K30, K31, K32, K33, K34, K35, XXX, XXX, K38, XXX, K3A, K3B, XXX, K3D, K3E, K3F }, \ + { K40, K41, K42, XXX, K44, K45, K46, K47, K48, K49, K4A, XXX, K4C, K4D, K4E, K4F }, \ + { K50, K51, K52, K53, K54, K55, XXX, XXX, K58, XXX, K5A, XXX, XXX, XXX, K5E, K5F }, \ + { K60, K61, K62, XXX, K64, K65, XXX, XXX, K68, XXX, K6A, XXX, XXX, K6D, K6E, XXX }, \ + { K70, XXX, XXX, K73, XXX, XXX, XXX, K77, K78, K79, XXX, XXX, K7C, K7D, XXX, K7F } \ +} From 9b46fabe084cd3e15104f88ef5d1f87f215de3c6 Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Mon, 13 May 2019 09:58:15 -0500 Subject: [PATCH 020/341] Xulkal Keymap Changes (#5861) --- keyboards/sol/keymaps/xulkal/rules.mk | 2 +- users/xulkal/config.h | 17 ++++++++++++++--- users/xulkal/layouts.h | 4 ++-- users/xulkal/process_records.c | 15 ++++++++++----- 4 files changed, 27 insertions(+), 11 deletions(-) diff --git a/keyboards/sol/keymaps/xulkal/rules.mk b/keyboards/sol/keymaps/xulkal/rules.mk index c3ed98edb..ad0c48034 100644 --- a/keyboards/sol/keymaps/xulkal/rules.mk +++ b/keyboards/sol/keymaps/xulkal/rules.mk @@ -12,7 +12,7 @@ RGBLIGHT_ENABLE = no # Enable global lighting effects. Do not enable RGBLIGHT_ANIMATIONS = no # LED animations LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) RGB_MATRIX_ENABLE = WS2812 # Enable per-key coordinate based RGB effects. Do not enable with RGBlight (+8500) -RGB_MATRIX_KEYPRESSES = yes # Enable reactive per-key effects. Can be very laggy (+1500) +RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy (+1500) RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port UNICODE_ENABLE = no # Unicode SWAP_HANDS_ENABLE = no # Enable one-hand typing diff --git a/users/xulkal/config.h b/users/xulkal/config.h index 2899017b0..ecd01f794 100644 --- a/users/xulkal/config.h +++ b/users/xulkal/config.h @@ -1,8 +1,6 @@ #pragma once -#ifndef TAPPING_FORCE_HOLD -#define TAPPING_FORCE_HOLD -#endif // TAPPING_FORCE_HOLD +#undef TAPPING_FORCE_HOLD #undef TAPPING_TERM #define TAPPING_TERM 175 @@ -12,6 +10,17 @@ #define LCPO_KEYS KC_LCTL, KC_TRNS, KC_MINS #define RCPC_KEYS KC_RCTL, KC_TRNS, KC_EQL +// Running out of firmware space +#if defined(__AVR__) +#undef RGB_MATRIX_KEYPRESSES +#undef RGB_MATRIX_KEYRELEASES +#undef RGB_MATRIX_FRAMEBUFFER_EFFECTS +#else +#define RGB_MATRIX_KEYPRESSES +#undef RGB_MATRIX_KEYRELEASES +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#endif + // No need for the single versions when multi performance isn't a problem =D #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS @@ -20,8 +29,10 @@ #define DISABLE_RGB_MATRIX_SOLID_SPLASH // Don't like or feel to identical to other effects +#if defined(__AVR__) #define DISABLE_RGB_MATRIX_RAINBOW_BEACON #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS #define DISABLE_RGB_MATRIX_DIGITAL_RAIN #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#endif diff --git a/users/xulkal/layouts.h b/users/xulkal/layouts.h index 61637bfe3..5180992a8 100644 --- a/users/xulkal/layouts.h +++ b/users/xulkal/layouts.h @@ -50,7 +50,7 @@ * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | | | | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | PREV | VOL- | VOL+ | NEXT | PLAY | + * | | | | | | | | | PREV | VOL+ | VOL- | NEXT | PLAY | * `-----------------------------------------' `-----------------------------------------' */ @@ -64,7 +64,7 @@ #define __________________RAISE_R2_________________ _______, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, _______ #define __________________RAISE_R3_________________ _______, KC_DEL, KC_END, KC_PGDN, KC_SLCK, _______ #define __________________RAISE_R4_________________ _______, _______, _______, _______, _______, _______ -#define __________________RAISE_R5_________________ _______, KC_MPRV, KC_MPRV, KC_VOLD, KC_MNXT, KC_MPLY +#define __________________RAISE_R5_________________ _______, KC_MPRV, KC_VOLU, KC_VOLD, KC_MNXT, KC_MPLY /* LOWER Layout * ,-----------------------------------------. ,-----------------------------------------. diff --git a/users/xulkal/process_records.c b/users/xulkal/process_records.c index 531f99eb0..7c2b5e133 100644 --- a/users/xulkal/process_records.c +++ b/users/xulkal/process_records.c @@ -16,13 +16,13 @@ extern void eeconfig_update_rgb_matrix_default(void); #endif bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint16_t reset_timer; switch (keycode) { case QWERTY: if (record->event.pressed) { set_single_persistent_default_layer(_QWERTY); } return false; - break; case GAME: #ifndef GAMELAYER_DISABLE if (record->event.pressed) { @@ -30,7 +30,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } #endif return false; - break; case LOWER: if (record->event.pressed) { layer_on(_LOWER); @@ -44,7 +43,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif } return false; - break; case RAISE: if (record->event.pressed) { layer_on(_RAISE); @@ -58,7 +56,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif } return false; - break; case RGBRST: #if defined(RGBLIGHT_ENABLE) if (record->event.pressed) { @@ -71,7 +68,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } #endif return false; - break; + case RESET: + if (record->event.pressed) { + reset_timer = timer_read(); + } else { + if (timer_elapsed(reset_timer) >= 500) { + reset_keyboard(); + } + } + return false; } return process_record_keymap(keycode, record) && From e8b27a965d4f6abcc2773022f451bdc7eabebf69 Mon Sep 17 00:00:00 2001 From: roguepullrequest Date: Mon, 13 May 2019 16:00:20 +0100 Subject: [PATCH 021/341] Roguepullrequest mousepad (#5860) * First publish of roguepullreqest programmer dvorak planck layout * Removed junk line * Update keyboards/planck/keymaps/roguepullrequest/keymap.c Co-Authored-By: roguepullrequest * Update keyboards/planck/keymaps/roguepullrequest/keymap.c Co-Authored-By: roguepullrequest * Update keyboards/planck/keymaps/roguepullrequest/keymap.c Co-Authored-By: roguepullrequest * Update keyboards/planck/keymaps/roguepullrequest/keymap.c Co-Authored-By: roguepullrequest * Removed layer songs Removed layer songs for cleanliness. Will use them later. * Update keyboards/planck/keymaps/roguepullrequest/readme.md Co-Authored-By: roguepullrequest * Made basic LSHIFT framework but is not working. Listed other tapdances. * Got LSHIFT to work * Added working RSHIFT * Added working TD_S * Cleaned up LEFT and RIGHT [ { ] } on the UPPER layer. * Cleaned up layout. * Reenabled audio space is not needed right now. * Added tap dances and layout image * Started dactylmanuform layout * Revert "Started dactylmanuform layout" This reverts commit 5ef48e4a23de14db9b843d85d3250e1bf4426817. * Started mousepad version of BDN9...wont compile for some reason. * Fixed BDN9 mousepad layout * Added readme.md to mousepad bdn9 layout. * Updated readme.md for mousepad bdn9 layout. Fixed the tables to finally work. * Unslashed the mousepad keymap for the BDN9 --- .../keebio/bdn9/keymaps/mousepad/config.h | 3 + .../keebio/bdn9/keymaps/mousepad/keymap.c | 81 +++++++++++++++++++ .../keebio/bdn9/keymaps/mousepad/readme.md | 16 ++++ .../keebio/bdn9/keymaps/mousepad/rule.mk | 2 + 4 files changed, 102 insertions(+) create mode 100644 keyboards/keebio/bdn9/keymaps/mousepad/config.h create mode 100644 keyboards/keebio/bdn9/keymaps/mousepad/keymap.c create mode 100644 keyboards/keebio/bdn9/keymaps/mousepad/readme.md create mode 100644 keyboards/keebio/bdn9/keymaps/mousepad/rule.mk diff --git a/keyboards/keebio/bdn9/keymaps/mousepad/config.h b/keyboards/keebio/bdn9/keymaps/mousepad/config.h new file mode 100644 index 000000000..a2eb1a95f --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/mousepad/config.h @@ -0,0 +1,3 @@ +#define MK_3_SPEED +#define TERMINAL_HELP + diff --git a/keyboards/keebio/bdn9/keymaps/mousepad/keymap.c b/keyboards/keebio/bdn9/keymaps/mousepad/keymap.c new file mode 100644 index 000000000..79ae56fd2 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/mousepad/keymap.c @@ -0,0 +1,81 @@ +/* Copyright 2019 Danny Nguyen + * + * 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 . + */ +#include QMK_KEYBOARD_H + + +bool is_alt_tab_active = false; // ADD this near the begining of keymap.c +uint16_t alt_tab_timer = 0; // we will be using them soon. + +enum custom_keycodes { // Make sure have the awesome keycode ready + ALT_TAB = SAFE_RANGE, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, + KC_WH_U, ALT_TAB, KC_WH_L, + KC_WH_D, TT(1), KC_WH_R + ), + [1] = LAYOUT( + RESET, KC_ACL0, KC_ACL1, + KC_VOLU, KC_ACL2, KC_BRIU, + KC_VOLD, TO(1), KC_BRID + ), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_MS_LEFT); + } else { + tap_code(KC_MS_RIGHT); + } + } + else if (index == 1) { + if (clockwise) { + tap_code(KC_MS_U); + } else { + tap_code(KC_MS_D); + } + } +} +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { // This will do most of the grunt work with the keycodes. + case ALT_TAB: + if (record->event.pressed) { + if (!is_alt_tab_active) { + is_alt_tab_active = true; + register_code(KC_LALT); + } + alt_tab_timer = timer_read(); + register_code(KC_TAB); + } else { + unregister_code(KC_TAB); + } + break; + } + return true; +} + +void matrix_scan_user(void) { // The very important timer. + if (is_alt_tab_active) { + if (timer_elapsed(alt_tab_timer) > 1000) { + unregister_code(KC_LALT); + is_alt_tab_active = false; + } + } +} diff --git a/keyboards/keebio/bdn9/keymaps/mousepad/readme.md b/keyboards/keebio/bdn9/keymaps/mousepad/readme.md new file mode 100644 index 000000000..fc843929d --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/mousepad/readme.md @@ -0,0 +1,16 @@ +# Mousepad layout for BDN9 +##### 2 encoders required +Why use a movable mouse when you can "Etech-a-sketch" style mousepad. +The left encoder will move the X axis; leaving the right to handle the Y axis + +| | | | +|:-:|:-:|:-:| +| Left Click | Middle Click | Right Click | +| Scroll Up | Super ALT↯TAB | Scroll Left | +| Scroll Down | ADJUSTMENT Layer | Scroll Right| + +| | | | +|:-:|:-:|:-:| +| RESET | Mouse ACL0 | Mouse ACL1 | +| VOL UP | Mouse ACL2 | Brightness UP | +| VOL Down | Adjustment Layer OFF | Brightness Down | diff --git a/keyboards/keebio/bdn9/keymaps/mousepad/rule.mk b/keyboards/keebio/bdn9/keymaps/mousepad/rule.mk new file mode 100644 index 000000000..ff752ab42 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/mousepad/rule.mk @@ -0,0 +1,2 @@ +MOUSEKEY_ENABLE = yes +TAPDANCE_ENABLE = yes From 4cdb86c730528c8ca5ff90f5b9b01c395d31fc0e Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Tue, 14 May 2019 13:58:56 -0500 Subject: [PATCH 022/341] [Keyboard] Create RGBKB Folder (#5858) * Move Sol, Zen, & Zygomorph keyboards to RGBKB folder * Updated default keymaps * Fixing more areas due too folder moves * Fixing Zen layer numbers * Fixing zygomorph layer comments * Fixing Colmak comments * Fixing Sol Colmak readme * Macro alignment * Zen rev2 configuration json * Fixing sol ifdef * Fixing Sol info.json --- keyboards/{ => rgbkb}/sol/common/glcdfont.c | 0 keyboards/{ => rgbkb}/sol/config.h | 0 .../sol/keymaps/brianweyer/config.h | 0 .../sol/keymaps/brianweyer/keymap.c | 0 .../sol/keymaps/brianweyer/rules.mk | 0 .../sol/keymaps/danielhklein/config.h | 0 .../sol/keymaps/danielhklein/keymap.c | 0 .../sol/keymaps/danielhklein/rules.mk | 0 .../{ => rgbkb}/sol/keymaps/default/config.h | 0 .../{ => rgbkb}/sol/keymaps/default/keymap.c | 111 +++--- .../{ => rgbkb}/sol/keymaps/default/readme.md | 54 +-- .../{ => rgbkb}/sol/keymaps/default/rules.mk | 0 .../sol/keymaps/kageurufu/keymap.c | 0 .../sol/keymaps/kageurufu/rules.mk | 0 .../{ => rgbkb}/sol/keymaps/xulkal/keymap.c | 0 .../{ => rgbkb}/sol/keymaps/xulkal/rules.mk | 0 keyboards/{ => rgbkb}/sol/readme.md | 2 +- keyboards/{ => rgbkb}/sol/rev1/config.h | 0 keyboards/{ => rgbkb}/sol/rev1/info.json | 6 +- keyboards/{ => rgbkb}/sol/rev1/rev1.c | 0 keyboards/{ => rgbkb}/sol/rev1/rev1.h | 0 keyboards/{ => rgbkb}/sol/rev1/rules.mk | 0 keyboards/{ => rgbkb}/sol/rules.mk | 2 +- keyboards/{ => rgbkb}/sol/sol.c | 0 keyboards/{ => rgbkb}/sol/sol.h | 4 +- keyboards/{ => rgbkb}/zen/common/glcdfont.c | 0 keyboards/{ => rgbkb}/zen/config.h | 0 keyboards/{ => rgbkb}/zen/readme.md | 4 +- keyboards/{ => rgbkb}/zen/rev1/config.h | 0 keyboards/{zen => rgbkb/zen/rev1}/info.json | 0 .../zen/rev1/keymaps/333fred/config.h | 0 .../zen/rev1/keymaps/333fred/keymap.c | 0 .../zen/rev1/keymaps/333fred/rules.mk | 0 .../zen/rev1/keymaps/default/config.h | 0 .../zen/rev1/keymaps/default/keymap.c | 6 +- .../zen/rev1/keymaps/default/rules.mk | 0 .../zen/rev1/keymaps/jwlawrence/config.h | 0 .../zen/rev1/keymaps/jwlawrence/keymap.c | 0 .../zen/rev1/keymaps/jwlawrence/rules.mk | 0 .../zen/rev1/keymaps/kageurufu/keymap.c | 0 .../zen/rev1/keymaps/xyverz/config.h | 0 .../zen/rev1/keymaps/xyverz/keymap.c | 0 .../zen/rev1/keymaps/xyverz/rules.mk | 0 keyboards/{ => rgbkb}/zen/rev1/rev1.c | 0 keyboards/{ => rgbkb}/zen/rev1/rev1.h | 0 keyboards/{ => rgbkb}/zen/rev1/rules.mk | 0 keyboards/{ => rgbkb}/zen/rev2/config.h | 0 keyboards/rgbkb/zen/rev2/info.json | 345 ++++++++++++++++++ .../zen/rev2/keymaps/debug/keymap.c | 0 .../zen/rev2/keymaps/default/keymap.c | 10 +- keyboards/{ => rgbkb}/zen/rev2/rev2.c | 0 keyboards/{ => rgbkb}/zen/rev2/rev2.h | 0 keyboards/{ => rgbkb}/zen/rev2/rules.mk | 0 keyboards/{ => rgbkb}/zen/rules.mk | 2 +- keyboards/{ => rgbkb}/zen/zen.c | 0 keyboards/{ => rgbkb}/zen/zen.h | 4 +- .../{ => rgbkb}/zygomorph/common/glcdfont.c | 0 keyboards/{ => rgbkb}/zygomorph/config.h | 0 .../zygomorph/keymaps/5x6pad/keymap.c | 0 .../zygomorph/keymaps/5x6pad/rules.mk | 0 .../zygomorph/keymaps/default/config.h | 0 .../zygomorph/keymaps/default/keymap.c | 74 ++-- .../zygomorph/keymaps/default/readme.md | 4 +- .../zygomorph/keymaps/default/rules.mk | 0 .../zygomorph/keymaps/default_oled/config.h | 0 .../zygomorph/keymaps/default_oled/keymap.c | 68 ++-- .../zygomorph/keymaps/default_oled/rules.mk | 0 .../zygomorph/keymaps/kageurufu/config.h | 0 .../zygomorph/keymaps/kageurufu/keymap.c | 0 .../zygomorph/keymaps/kageurufu/readme.md | 4 +- .../zygomorph/keymaps/kageurufu/rules.mk | 0 .../zygomorph/keymaps/xulkal/config.h | 0 .../zygomorph/keymaps/xulkal/keymap.c | 0 .../zygomorph/keymaps/xulkal/rules.mk | 0 keyboards/{ => rgbkb}/zygomorph/readme.md | 2 +- keyboards/{ => rgbkb}/zygomorph/rev1/config.h | 0 .../{ => rgbkb}/zygomorph/rev1/info.json | 0 keyboards/{ => rgbkb}/zygomorph/rev1/rev1.c | 0 keyboards/{ => rgbkb}/zygomorph/rev1/rev1.h | 0 keyboards/{ => rgbkb}/zygomorph/rev1/rules.mk | 0 keyboards/{ => rgbkb}/zygomorph/rules.mk | 2 +- keyboards/{ => rgbkb}/zygomorph/zygomorph.c | 0 keyboards/{ => rgbkb}/zygomorph/zygomorph.h | 0 83 files changed, 477 insertions(+), 227 deletions(-) rename keyboards/{ => rgbkb}/sol/common/glcdfont.c (100%) rename keyboards/{ => rgbkb}/sol/config.h (100%) rename keyboards/{ => rgbkb}/sol/keymaps/brianweyer/config.h (100%) mode change 100755 => 100644 rename keyboards/{ => rgbkb}/sol/keymaps/brianweyer/keymap.c (100%) mode change 100755 => 100644 rename keyboards/{ => rgbkb}/sol/keymaps/brianweyer/rules.mk (100%) mode change 100755 => 100644 rename keyboards/{ => rgbkb}/sol/keymaps/danielhklein/config.h (100%) rename keyboards/{ => rgbkb}/sol/keymaps/danielhklein/keymap.c (100%) rename keyboards/{ => rgbkb}/sol/keymaps/danielhklein/rules.mk (100%) rename keyboards/{ => rgbkb}/sol/keymaps/default/config.h (100%) rename keyboards/{ => rgbkb}/sol/keymaps/default/keymap.c (64%) rename keyboards/{ => rgbkb}/sol/keymaps/default/readme.md (68%) rename keyboards/{ => rgbkb}/sol/keymaps/default/rules.mk (100%) rename keyboards/{ => rgbkb}/sol/keymaps/kageurufu/keymap.c (100%) rename keyboards/{ => rgbkb}/sol/keymaps/kageurufu/rules.mk (100%) rename keyboards/{ => rgbkb}/sol/keymaps/xulkal/keymap.c (100%) rename keyboards/{ => rgbkb}/sol/keymaps/xulkal/rules.mk (100%) rename keyboards/{ => rgbkb}/sol/readme.md (97%) rename keyboards/{ => rgbkb}/sol/rev1/config.h (100%) rename keyboards/{ => rgbkb}/sol/rev1/info.json (91%) rename keyboards/{ => rgbkb}/sol/rev1/rev1.c (100%) rename keyboards/{ => rgbkb}/sol/rev1/rev1.h (100%) rename keyboards/{ => rgbkb}/sol/rev1/rules.mk (100%) rename keyboards/{ => rgbkb}/sol/rules.mk (98%) rename keyboards/{ => rgbkb}/sol/sol.c (100%) rename keyboards/{ => rgbkb}/sol/sol.h (97%) rename keyboards/{ => rgbkb}/zen/common/glcdfont.c (100%) rename keyboards/{ => rgbkb}/zen/config.h (100%) rename keyboards/{ => rgbkb}/zen/readme.md (96%) rename keyboards/{ => rgbkb}/zen/rev1/config.h (100%) rename keyboards/{zen => rgbkb/zen/rev1}/info.json (100%) rename keyboards/{ => rgbkb}/zen/rev1/keymaps/333fred/config.h (100%) rename keyboards/{ => rgbkb}/zen/rev1/keymaps/333fred/keymap.c (100%) rename keyboards/{ => rgbkb}/zen/rev1/keymaps/333fred/rules.mk (100%) rename keyboards/{ => rgbkb}/zen/rev1/keymaps/default/config.h (100%) rename keyboards/{ => rgbkb}/zen/rev1/keymaps/default/keymap.c (99%) rename keyboards/{ => rgbkb}/zen/rev1/keymaps/default/rules.mk (100%) rename keyboards/{ => rgbkb}/zen/rev1/keymaps/jwlawrence/config.h (100%) rename keyboards/{ => rgbkb}/zen/rev1/keymaps/jwlawrence/keymap.c (100%) rename keyboards/{ => rgbkb}/zen/rev1/keymaps/jwlawrence/rules.mk (100%) rename keyboards/{ => rgbkb}/zen/rev1/keymaps/kageurufu/keymap.c (100%) rename keyboards/{ => rgbkb}/zen/rev1/keymaps/xyverz/config.h (100%) rename keyboards/{ => rgbkb}/zen/rev1/keymaps/xyverz/keymap.c (100%) rename keyboards/{ => rgbkb}/zen/rev1/keymaps/xyverz/rules.mk (100%) rename keyboards/{ => rgbkb}/zen/rev1/rev1.c (100%) rename keyboards/{ => rgbkb}/zen/rev1/rev1.h (100%) rename keyboards/{ => rgbkb}/zen/rev1/rules.mk (100%) rename keyboards/{ => rgbkb}/zen/rev2/config.h (100%) create mode 100644 keyboards/rgbkb/zen/rev2/info.json rename keyboards/{ => rgbkb}/zen/rev2/keymaps/debug/keymap.c (100%) rename keyboards/{ => rgbkb}/zen/rev2/keymaps/default/keymap.c (99%) rename keyboards/{ => rgbkb}/zen/rev2/rev2.c (100%) rename keyboards/{ => rgbkb}/zen/rev2/rev2.h (100%) rename keyboards/{ => rgbkb}/zen/rev2/rules.mk (100%) rename keyboards/{ => rgbkb}/zen/rules.mk (97%) rename keyboards/{ => rgbkb}/zen/zen.c (100%) rename keyboards/{ => rgbkb}/zen/zen.h (59%) rename keyboards/{ => rgbkb}/zygomorph/common/glcdfont.c (100%) rename keyboards/{ => rgbkb}/zygomorph/config.h (100%) rename keyboards/{ => rgbkb}/zygomorph/keymaps/5x6pad/keymap.c (100%) rename keyboards/{ => rgbkb}/zygomorph/keymaps/5x6pad/rules.mk (100%) rename keyboards/{ => rgbkb}/zygomorph/keymaps/default/config.h (100%) rename keyboards/{ => rgbkb}/zygomorph/keymaps/default/keymap.c (64%) rename keyboards/{ => rgbkb}/zygomorph/keymaps/default/readme.md (99%) rename keyboards/{ => rgbkb}/zygomorph/keymaps/default/rules.mk (100%) rename keyboards/{ => rgbkb}/zygomorph/keymaps/default_oled/config.h (100%) rename keyboards/{ => rgbkb}/zygomorph/keymaps/default_oled/keymap.c (71%) rename keyboards/{ => rgbkb}/zygomorph/keymaps/default_oled/rules.mk (100%) rename keyboards/{ => rgbkb}/zygomorph/keymaps/kageurufu/config.h (100%) rename keyboards/{ => rgbkb}/zygomorph/keymaps/kageurufu/keymap.c (100%) rename keyboards/{ => rgbkb}/zygomorph/keymaps/kageurufu/readme.md (99%) rename keyboards/{ => rgbkb}/zygomorph/keymaps/kageurufu/rules.mk (100%) rename keyboards/{ => rgbkb}/zygomorph/keymaps/xulkal/config.h (100%) rename keyboards/{ => rgbkb}/zygomorph/keymaps/xulkal/keymap.c (100%) rename keyboards/{ => rgbkb}/zygomorph/keymaps/xulkal/rules.mk (100%) rename keyboards/{ => rgbkb}/zygomorph/readme.md (97%) rename keyboards/{ => rgbkb}/zygomorph/rev1/config.h (100%) rename keyboards/{ => rgbkb}/zygomorph/rev1/info.json (100%) rename keyboards/{ => rgbkb}/zygomorph/rev1/rev1.c (100%) rename keyboards/{ => rgbkb}/zygomorph/rev1/rev1.h (100%) rename keyboards/{ => rgbkb}/zygomorph/rev1/rules.mk (100%) rename keyboards/{ => rgbkb}/zygomorph/rules.mk (98%) rename keyboards/{ => rgbkb}/zygomorph/zygomorph.c (100%) rename keyboards/{ => rgbkb}/zygomorph/zygomorph.h (100%) diff --git a/keyboards/sol/common/glcdfont.c b/keyboards/rgbkb/sol/common/glcdfont.c similarity index 100% rename from keyboards/sol/common/glcdfont.c rename to keyboards/rgbkb/sol/common/glcdfont.c diff --git a/keyboards/sol/config.h b/keyboards/rgbkb/sol/config.h similarity index 100% rename from keyboards/sol/config.h rename to keyboards/rgbkb/sol/config.h diff --git a/keyboards/sol/keymaps/brianweyer/config.h b/keyboards/rgbkb/sol/keymaps/brianweyer/config.h old mode 100755 new mode 100644 similarity index 100% rename from keyboards/sol/keymaps/brianweyer/config.h rename to keyboards/rgbkb/sol/keymaps/brianweyer/config.h diff --git a/keyboards/sol/keymaps/brianweyer/keymap.c b/keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c old mode 100755 new mode 100644 similarity index 100% rename from keyboards/sol/keymaps/brianweyer/keymap.c rename to keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c diff --git a/keyboards/sol/keymaps/brianweyer/rules.mk b/keyboards/rgbkb/sol/keymaps/brianweyer/rules.mk old mode 100755 new mode 100644 similarity index 100% rename from keyboards/sol/keymaps/brianweyer/rules.mk rename to keyboards/rgbkb/sol/keymaps/brianweyer/rules.mk diff --git a/keyboards/sol/keymaps/danielhklein/config.h b/keyboards/rgbkb/sol/keymaps/danielhklein/config.h similarity index 100% rename from keyboards/sol/keymaps/danielhklein/config.h rename to keyboards/rgbkb/sol/keymaps/danielhklein/config.h diff --git a/keyboards/sol/keymaps/danielhklein/keymap.c b/keyboards/rgbkb/sol/keymaps/danielhklein/keymap.c similarity index 100% rename from keyboards/sol/keymaps/danielhklein/keymap.c rename to keyboards/rgbkb/sol/keymaps/danielhklein/keymap.c diff --git a/keyboards/sol/keymaps/danielhklein/rules.mk b/keyboards/rgbkb/sol/keymaps/danielhklein/rules.mk similarity index 100% rename from keyboards/sol/keymaps/danielhklein/rules.mk rename to keyboards/rgbkb/sol/keymaps/danielhklein/rules.mk diff --git a/keyboards/sol/keymaps/default/config.h b/keyboards/rgbkb/sol/keymaps/default/config.h similarity index 100% rename from keyboards/sol/keymaps/default/config.h rename to keyboards/rgbkb/sol/keymaps/default/config.h diff --git a/keyboards/sol/keymaps/default/keymap.c b/keyboards/rgbkb/sol/keymaps/default/keymap.c similarity index 64% rename from keyboards/sol/keymaps/default/keymap.c rename to keyboards/rgbkb/sol/keymaps/default/keymap.c index c101a9bd8..ca7352482 100644 --- a/keyboards/sol/keymaps/default/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/default/keymap.c @@ -1,5 +1,5 @@ #include QMK_KEYBOARD_H -#include "bootloader.h" + #ifdef PROTOCOL_LUFA #include "lufa.h" #include "split_util.h" @@ -41,80 +41,55 @@ enum macro_keycodes { #define FN_ESC LT(_FN, KC_ESC) #define FN_CAPS LT(_FN, KC_CAPS) -// Define your non-alpha grouping in this define's LAYOUT, and all your BASE_LAYERS will share the same mod/macro columns - /* Base Layout +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Qwerty * ,------------------------------------------------. ,------------------------------------------------. - * | GESC | | | | | | - | | = | | | | | | BkSp | + * | GESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | BkSp | * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | Tab | | | | | | [ | | ] | | | | | | \ | + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ | * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * |FN(CAPS)| | | | | | ( | | ) | | | | | | ' | + * |FN(CAPS)| A | S | D | F | G | ( | | ) | H | J | K | L | ; | ' | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * |Shift | | | | | | { | | } | | | | | |Shift | + * |Shift | Z | X | C | V | B | { | | } | N | M | , | . | / |Shift | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | Ctrl | Win | Alt | RGB | ADJ | Space| DEL | | Enter| Space| FN | Left | Down | Up |Right | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------' * | Space| DEL | | Enter| Space| * `-------------' `-------------' */ -#define BASE_LAYOUT( \ - _00, _01, _02, _03, _04, _05, _06, _07, _08, _09, \ - _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, \ - _20, _21, _22, _23, _24, _25, _26, _27, _28, _29 \ -) \ -LAYOUT( \ - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ - KC_TAB, _00, _01, _02, _03, _04, KC_LBRC, KC_RBRC, _05, _06, _07, _08, _09, KC_BSLS, \ - FN_CAPS, _10, _11, _12, _13, _14, KC_LPRN, KC_RPRN, _15, _16, _17, _18, _19, KC_QUOT, \ - KC_LSFT, _20, _21, _22, _23, _24, KC_LCBR, KC_RCBR, _25, _26, _27, _28, _29, KC_ENT, \ - KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_DEL, KC_ENT, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, \ - KC_SPC, KC_DEL, KC_ENT, KC_SPC \ -) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Qwerty - * ,------------------------------------------------. ,------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | Q | W | E | R | T | | | | Y | U | I | O | P | | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | A | S | D | F | G | | | | H | J | K | L | ; | | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | Z | X | C | V | B | | | | N | M | , | . | / | | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | | - * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' - * | | | | | | - * `-------------' `--------=----' - */ - [_QWERTY] = BASE_LAYOUT( \ - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ - KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH \ + [_QWERTY] = LAYOUT( \ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \ + FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LPRN, KC_RPRN, 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_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_DEL, KC_ENT, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, \ + KC_SPC, KC_DEL, KC_ENT, KC_SPC \ ), /* Colemak * ,------------------------------------------------. ,------------------------------------------------. - * | | | | | | | | | | | | | | | | + * | GESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | BkSp | * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | Q | W | F | P | G | | | | J | L | U | Y | ; | | + * | Tab | Q | W | F | P | B | [ | | ] | J | L | U | Y | ; | \ | * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | A | R | S | T | D | | | | H | N | E | I | O | | + * |FN(CAPS)| A | R | S | T | G | ( | | ) | K | N | E | I | O | ' | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | Z | X | C | V | B | | | | K | M | , | . | / | | + * |Shift | Z | X | C | D | V | { | | } | M | H | , | . | / |Shift | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | | - * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' - * | | | | | | - * `-------------' `--------=----' + * | Ctrl | Win | Alt | RGB | ADJ | Space| DEL | | Enter| Space| FN | Left | Down | Up |Right | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | Space| DEL | | Enter| Space| + * `-------------' `-------------' */ - [_COLEMAK] = BASE_LAYOUT( \ - KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, \ - KC_A, KC_R, KC_S, KC_T, KC_G, KC_K, KC_N, KC_E, KC_I, KC_O, \ - KC_Z, KC_X, KC_C, KC_D, KC_V, KC_M, KC_H, KC_COMM, KC_DOT, KC_SLSH \ + [_COLEMAK] = LAYOUT( \ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, \ + FN_CAPS, KC_A, KC_R, KC_S, KC_T, KC_G, KC_LPRN, KC_RPRN, KC_K, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_LCBR, KC_RCBR, KC_M, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_DEL, KC_ENT, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, \ + KC_SPC, KC_DEL, KC_ENT, KC_SPC \ ), - /* FN * ,------------------------------------------------. ,------------------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | | | | F7 | F8 | F9 | F10 | F11 | F12 | @@ -131,13 +106,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------------' `-------------' */ [_FN] = LAYOUT( \ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_PSCR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______, KC_PGDN, KC_UP, KC_PGUP, _______, _______, _______, _______, _______, KC_PGDN, KC_UP, KC_PGUP, KC_PSCR, KC_HOME, \ - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, \ - _______, _______, _______, _______ \ - ), + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_PSCR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, KC_PGDN, KC_UP, KC_PGUP, _______, _______, _______, _______, _______, KC_PGDN, KC_UP, KC_PGUP, KC_PSCR, KC_HOME, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, \ + _______, _______, _______, _______ \ + ), /* ADJ * ,------------------------------------------------. ,------------------------------------------------. @@ -156,13 +131,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJ] = LAYOUT( \ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, RGB_HUD, RGB_VAD, RGB_HUI, RGBRST, _______, _______, _______, _______, QWERTY, COLEMAK, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ - _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, \ - _______, _______, _______, _______ \ - ) + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, RGB_HUD, RGB_VAD, RGB_HUI, RGBRST, _______, _______, _______, _______, QWERTY, COLEMAK, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, \ + _______, _______, _______, _______ \ + ) }; diff --git a/keyboards/sol/keymaps/default/readme.md b/keyboards/rgbkb/sol/keymaps/default/readme.md similarity index 68% rename from keyboards/sol/keymaps/default/readme.md rename to keyboards/rgbkb/sol/keymaps/default/readme.md index f5f384555..75182c06f 100644 --- a/keyboards/sol/keymaps/default/readme.md +++ b/keyboards/rgbkb/sol/keymaps/default/readme.md @@ -1,16 +1,16 @@ # The Default Sol Layout ## Layout -### Base modifier layout +### Qwerty layout ``` * ,------------------------------------------------. ,------------------------------------------------. - * | GESC | | | | | | - | | = | | | | | | BkSp | + * | GESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | BkSp | * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | Tab | | | | | | [ | | ] | | | | | | \ | + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ | * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * |FN(CAPS)| | | | | | ( | | ) | | | | | | ' | + * |FN(CAPS)| A | S | D | F | G | ( | | ) | H | J | K | L | ; | ' | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * |Shift | | | | | | { | | } | | | | | |Shift | + * |Shift | Z | X | C | V | B | { | | } | N | M | , | . | / |Shift | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | Ctrl | Win | Alt | RGB | ADJ | Space| DEL | | Enter| Space| FN | Left | Down | Up |Right | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------' @@ -18,37 +18,20 @@ * `-------------' `-------------' ``` -### Qwerty alphas +### Colemak layout ``` * ,------------------------------------------------. ,------------------------------------------------. - * | | | | | | | | | | | | | | | | + * | GESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | BkSp | * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | Q | W | E | R | T | | | | Y | U | I | O | P | | + * | Tab | Q | W | F | P | B | [ | | ] | J | L | U | Y | ; | \ | * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | A | S | D | F | G | | | | H | J | K | L | ; | | + * |FN(CAPS)| A | R | S | T | G | ( | | ) | K | N | E | I | O | ' | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | Z | X | C | V | B | | | | N | M | , | . | / | | + * |Shift | Z | X | C | D | V | { | | } | M | H | , | . | / |Shift | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | | - * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' - * | | | | | | - * `-------------' `-------------' -``` - -### Colemak alphas -``` - * ,------------------------------------------------. ,------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | Q | W | F | P | B | | | | J | L | U | Y | ; | | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | A | R | S | T | G | | | | K | N | E | I | O | | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | Z | X | C | D | V | | | | M | H | , | . | / | | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | | - * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' - * | | | | | | + * | Ctrl | Win | Alt | RGB | ADJ | Space| DEL | | Enter| Space| FN | Left | Down | Up |Right | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | Space| DEL | | Enter| Space| * `-------------' `-------------' ``` @@ -101,16 +84,15 @@ CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix -LED_ANIMATIONS = yes # LED animations -LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) +RGBLIGHT_ANIMATIONS = yes # LED animations +LED_MIRRORED = yes # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight (+8500) RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy (+1500) RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port UNICODE_ENABLE = no # Unicode SWAP_HANDS_ENABLE = no # Enable one-hand typing -ENCODER_ENABLE_CUSTOM = yes # Enable rotary encoder (+90) -OLED_ENABLE = no # OLED_ENABLE (+5000) +OLED_DRIVER_ENABLE = no # Enable the OLED Driver (+5000) IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) @@ -124,10 +106,10 @@ $ cd qmk_firmware build ``` -$ make sol:default +$ make rgbkb/sol:default ``` After the initial flash with AVRdudess, you should be able to flash using this: ``` -$ make sol:default:dfu +$ make rgbkb/sol:default:dfu ``` diff --git a/keyboards/sol/keymaps/default/rules.mk b/keyboards/rgbkb/sol/keymaps/default/rules.mk similarity index 100% rename from keyboards/sol/keymaps/default/rules.mk rename to keyboards/rgbkb/sol/keymaps/default/rules.mk diff --git a/keyboards/sol/keymaps/kageurufu/keymap.c b/keyboards/rgbkb/sol/keymaps/kageurufu/keymap.c similarity index 100% rename from keyboards/sol/keymaps/kageurufu/keymap.c rename to keyboards/rgbkb/sol/keymaps/kageurufu/keymap.c diff --git a/keyboards/sol/keymaps/kageurufu/rules.mk b/keyboards/rgbkb/sol/keymaps/kageurufu/rules.mk similarity index 100% rename from keyboards/sol/keymaps/kageurufu/rules.mk rename to keyboards/rgbkb/sol/keymaps/kageurufu/rules.mk diff --git a/keyboards/sol/keymaps/xulkal/keymap.c b/keyboards/rgbkb/sol/keymaps/xulkal/keymap.c similarity index 100% rename from keyboards/sol/keymaps/xulkal/keymap.c rename to keyboards/rgbkb/sol/keymaps/xulkal/keymap.c diff --git a/keyboards/sol/keymaps/xulkal/rules.mk b/keyboards/rgbkb/sol/keymaps/xulkal/rules.mk similarity index 100% rename from keyboards/sol/keymaps/xulkal/rules.mk rename to keyboards/rgbkb/sol/keymaps/xulkal/rules.mk diff --git a/keyboards/sol/readme.md b/keyboards/rgbkb/sol/readme.md similarity index 97% rename from keyboards/sol/readme.md rename to keyboards/rgbkb/sol/readme.md index 65e89ff63..391189095 100644 --- a/keyboards/sol/readme.md +++ b/keyboards/rgbkb/sol/readme.md @@ -10,6 +10,6 @@ Hardware Availability: [RGBKB](https://www.rgbkb.net) Make example for this keyboard (after setting up your build environment): - make sol:default + make rgbkb/sol:default 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). diff --git a/keyboards/sol/rev1/config.h b/keyboards/rgbkb/sol/rev1/config.h similarity index 100% rename from keyboards/sol/rev1/config.h rename to keyboards/rgbkb/sol/rev1/config.h diff --git a/keyboards/sol/rev1/info.json b/keyboards/rgbkb/sol/rev1/info.json similarity index 91% rename from keyboards/sol/rev1/info.json rename to keyboards/rgbkb/sol/rev1/info.json index 40bc01f7f..e252ea2e2 100644 --- a/keyboards/sol/rev1/info.json +++ b/keyboards/rgbkb/sol/rev1/info.json @@ -77,14 +77,10 @@ {"label":"R43", "x":13.5, "y":4}, {"label":"R44", "x":14.5, "y":4}, {"label":"R45", "x":15.5, "y":4, "w":1.5}, - {"label":"Left Encoder, Counter-Clockwise", "x":2.5, "y":5.5}, - {"label":"Left Encoder, Clockwise", "x":3.5, "y":5.5}, {"label":"L55", "x":6, "y":5.5}, {"label":"L56", "x":7, "y":5.5}, {"label":"R56", "x":9, "y":5.5}, - {"label":"R50", "x":10, "y":5.5}, - {"label":"Right Encoder, Counter-Clockwise", "x":12.5, "y":5.5}, - {"label":"Right Encoder, Clockwise", "x":13.5, "y":5.5} + {"label":"R50", "x":10, "y":5.5} ] } } diff --git a/keyboards/sol/rev1/rev1.c b/keyboards/rgbkb/sol/rev1/rev1.c similarity index 100% rename from keyboards/sol/rev1/rev1.c rename to keyboards/rgbkb/sol/rev1/rev1.c diff --git a/keyboards/sol/rev1/rev1.h b/keyboards/rgbkb/sol/rev1/rev1.h similarity index 100% rename from keyboards/sol/rev1/rev1.h rename to keyboards/rgbkb/sol/rev1/rev1.h diff --git a/keyboards/sol/rev1/rules.mk b/keyboards/rgbkb/sol/rev1/rules.mk similarity index 100% rename from keyboards/sol/rev1/rules.mk rename to keyboards/rgbkb/sol/rev1/rules.mk diff --git a/keyboards/sol/rules.mk b/keyboards/rgbkb/sol/rules.mk similarity index 98% rename from keyboards/sol/rules.mk rename to keyboards/rgbkb/sol/rules.mk index b7d689c03..62dd969aa 100644 --- a/keyboards/sol/rules.mk +++ b/keyboards/rgbkb/sol/rules.mk @@ -63,4 +63,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -DEFAULT_FOLDER = sol/rev1 +DEFAULT_FOLDER = rgbkb/sol/rev1 diff --git a/keyboards/sol/sol.c b/keyboards/rgbkb/sol/sol.c similarity index 100% rename from keyboards/sol/sol.c rename to keyboards/rgbkb/sol/sol.c diff --git a/keyboards/sol/sol.h b/keyboards/rgbkb/sol/sol.h similarity index 97% rename from keyboards/sol/sol.h rename to keyboards/rgbkb/sol/sol.h index 8a41702df..d26546006 100644 --- a/keyboards/sol/sol.h +++ b/keyboards/rgbkb/sol/sol.h @@ -1,10 +1,8 @@ #pragma once #include "quantum.h" -#ifdef KEYBOARD_sol_rev1 +#ifdef KEYBOARD_rgbkb_sol_rev1 #include "rev1.h" -#elif KEYBOARD_sol_rev2 -#include "rev2.h" #endif diff --git a/keyboards/zen/common/glcdfont.c b/keyboards/rgbkb/zen/common/glcdfont.c similarity index 100% rename from keyboards/zen/common/glcdfont.c rename to keyboards/rgbkb/zen/common/glcdfont.c diff --git a/keyboards/zen/config.h b/keyboards/rgbkb/zen/config.h similarity index 100% rename from keyboards/zen/config.h rename to keyboards/rgbkb/zen/config.h diff --git a/keyboards/zen/readme.md b/keyboards/rgbkb/zen/readme.md similarity index 96% rename from keyboards/zen/readme.md rename to keyboards/rgbkb/zen/readme.md index 7ca7c69fe..0a2f9e3ed 100644 --- a/keyboards/zen/readme.md +++ b/keyboards/rgbkb/zen/readme.md @@ -16,11 +16,11 @@ A build guide and more info for this keyboard can be found here: [Zen Build Guid Make example for this keyboard (after setting up your build environment): - make zen/rev2:default + make rgbkb/zen/rev2:default To build for a Proton-C: - make zen/rev2:default CTPC=yes + make rgbkb/zen/rev2:default CTPC=yes **Note:** The Proton-C does not have split keyboard, or encoder support. Also OLED driver support is untested. Will update as status changes. diff --git a/keyboards/zen/rev1/config.h b/keyboards/rgbkb/zen/rev1/config.h similarity index 100% rename from keyboards/zen/rev1/config.h rename to keyboards/rgbkb/zen/rev1/config.h diff --git a/keyboards/zen/info.json b/keyboards/rgbkb/zen/rev1/info.json similarity index 100% rename from keyboards/zen/info.json rename to keyboards/rgbkb/zen/rev1/info.json diff --git a/keyboards/zen/rev1/keymaps/333fred/config.h b/keyboards/rgbkb/zen/rev1/keymaps/333fred/config.h similarity index 100% rename from keyboards/zen/rev1/keymaps/333fred/config.h rename to keyboards/rgbkb/zen/rev1/keymaps/333fred/config.h diff --git a/keyboards/zen/rev1/keymaps/333fred/keymap.c b/keyboards/rgbkb/zen/rev1/keymaps/333fred/keymap.c similarity index 100% rename from keyboards/zen/rev1/keymaps/333fred/keymap.c rename to keyboards/rgbkb/zen/rev1/keymaps/333fred/keymap.c diff --git a/keyboards/zen/rev1/keymaps/333fred/rules.mk b/keyboards/rgbkb/zen/rev1/keymaps/333fred/rules.mk similarity index 100% rename from keyboards/zen/rev1/keymaps/333fred/rules.mk rename to keyboards/rgbkb/zen/rev1/keymaps/333fred/rules.mk diff --git a/keyboards/zen/rev1/keymaps/default/config.h b/keyboards/rgbkb/zen/rev1/keymaps/default/config.h similarity index 100% rename from keyboards/zen/rev1/keymaps/default/config.h rename to keyboards/rgbkb/zen/rev1/keymaps/default/config.h diff --git a/keyboards/zen/rev1/keymaps/default/keymap.c b/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c similarity index 99% rename from keyboards/zen/rev1/keymaps/default/keymap.c rename to keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c index b2adffd1e..54462ec0f 100644 --- a/keyboards/zen/rev1/keymaps/default/keymap.c +++ b/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c @@ -6,8 +6,10 @@ extern keymap_config_t keymap_config; // 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 _QWERTY 0 -#define _NAV 2 +enum layer_number { + _QWERTY = 0, + _NAV +}; enum custom_keycodes { diff --git a/keyboards/zen/rev1/keymaps/default/rules.mk b/keyboards/rgbkb/zen/rev1/keymaps/default/rules.mk similarity index 100% rename from keyboards/zen/rev1/keymaps/default/rules.mk rename to keyboards/rgbkb/zen/rev1/keymaps/default/rules.mk diff --git a/keyboards/zen/rev1/keymaps/jwlawrence/config.h b/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/config.h similarity index 100% rename from keyboards/zen/rev1/keymaps/jwlawrence/config.h rename to keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/config.h diff --git a/keyboards/zen/rev1/keymaps/jwlawrence/keymap.c b/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/keymap.c similarity index 100% rename from keyboards/zen/rev1/keymaps/jwlawrence/keymap.c rename to keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/keymap.c diff --git a/keyboards/zen/rev1/keymaps/jwlawrence/rules.mk b/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/rules.mk similarity index 100% rename from keyboards/zen/rev1/keymaps/jwlawrence/rules.mk rename to keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/rules.mk diff --git a/keyboards/zen/rev1/keymaps/kageurufu/keymap.c b/keyboards/rgbkb/zen/rev1/keymaps/kageurufu/keymap.c similarity index 100% rename from keyboards/zen/rev1/keymaps/kageurufu/keymap.c rename to keyboards/rgbkb/zen/rev1/keymaps/kageurufu/keymap.c diff --git a/keyboards/zen/rev1/keymaps/xyverz/config.h b/keyboards/rgbkb/zen/rev1/keymaps/xyverz/config.h similarity index 100% rename from keyboards/zen/rev1/keymaps/xyverz/config.h rename to keyboards/rgbkb/zen/rev1/keymaps/xyverz/config.h diff --git a/keyboards/zen/rev1/keymaps/xyverz/keymap.c b/keyboards/rgbkb/zen/rev1/keymaps/xyverz/keymap.c similarity index 100% rename from keyboards/zen/rev1/keymaps/xyverz/keymap.c rename to keyboards/rgbkb/zen/rev1/keymaps/xyverz/keymap.c diff --git a/keyboards/zen/rev1/keymaps/xyverz/rules.mk b/keyboards/rgbkb/zen/rev1/keymaps/xyverz/rules.mk similarity index 100% rename from keyboards/zen/rev1/keymaps/xyverz/rules.mk rename to keyboards/rgbkb/zen/rev1/keymaps/xyverz/rules.mk diff --git a/keyboards/zen/rev1/rev1.c b/keyboards/rgbkb/zen/rev1/rev1.c similarity index 100% rename from keyboards/zen/rev1/rev1.c rename to keyboards/rgbkb/zen/rev1/rev1.c diff --git a/keyboards/zen/rev1/rev1.h b/keyboards/rgbkb/zen/rev1/rev1.h similarity index 100% rename from keyboards/zen/rev1/rev1.h rename to keyboards/rgbkb/zen/rev1/rev1.h diff --git a/keyboards/zen/rev1/rules.mk b/keyboards/rgbkb/zen/rev1/rules.mk similarity index 100% rename from keyboards/zen/rev1/rules.mk rename to keyboards/rgbkb/zen/rev1/rules.mk diff --git a/keyboards/zen/rev2/config.h b/keyboards/rgbkb/zen/rev2/config.h similarity index 100% rename from keyboards/zen/rev2/config.h rename to keyboards/rgbkb/zen/rev2/config.h diff --git a/keyboards/rgbkb/zen/rev2/info.json b/keyboards/rgbkb/zen/rev2/info.json new file mode 100644 index 000000000..b3015388c --- /dev/null +++ b/keyboards/rgbkb/zen/rev2/info.json @@ -0,0 +1,345 @@ +{ + "keyboard_name": "Zen", + "url": "", + "maintainer": "qmk", + "width": 17, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [ + { + "label": "k00", + "x": 0.5, + "y": 0 + }, + { + "label": "k01", + "x": 1.5, + "y": 0 + }, + { + "label": "k02", + "x": 2.5, + "y": 0 + }, + { + "label": "k03", + "x": 3.5, + "y": 0 + }, + { + "label": "k04", + "x": 4.5, + "y": 0 + }, + { + "label": "k05", + "x": 5.5, + "y": 0 + }, + { + "label": "k55", + "x": 10.5, + "y": 0 + }, + { + "label": "k54", + "x": 11.5, + "y": 0 + }, + { + "label": "k53", + "x": 12.5, + "y": 0 + }, + { + "label": "k52", + "x": 13.5, + "y": 0 + }, + { + "label": "k51", + "x": 14.5, + "y": 0 + }, + { + "label": "k50", + "x": 15.5, + "y": 0 + }, + { + "label": "k10", + "x": 0, + "y": 1, + "w": 1.5 + }, + { + "label": "k11", + "x": 1.5, + "y": 1 + }, + { + "label": "k12", + "x": 2.5, + "y": 1 + }, + { + "label": "k13", + "x": 3.5, + "y": 1 + }, + { + "label": "k14", + "x": 4.5, + "y": 1 + }, + { + "label": "k15", + "x": 5.5, + "y": 1 + }, + { + "label": "k65", + "x": 10.5, + "y": 1 + }, + { + "label": "k64", + "x": 11.5, + "y": 1 + }, + { + "label": "k63", + "x": 12.5, + "y": 1 + }, + { + "label": "k62", + "x": 13.5, + "y": 1 + }, + { + "label": "k61", + "x": 14.5, + "y": 1 + }, + { + "label": "k60", + "x": 15.5, + "y": 1, + "w": 1.5 + }, + { + "label": "k20", + "x": 0, + "y": 2, + "w": 1.5 + }, + { + "label": "k21", + "x": 1.5, + "y": 2 + }, + { + "label": "k22", + "x": 2.5, + "y": 2 + }, + { + "label": "k23", + "x": 3.5, + "y": 2 + }, + { + "label": "k24", + "x": 4.5, + "y": 2 + }, + { + "label": "k25", + "x": 5.5, + "y": 2 + }, + { + "label": "k75", + "x": 10.5, + "y": 2 + }, + { + "label": "k74", + "x": 11.5, + "y": 2 + }, + { + "label": "k73", + "x": 12.5, + "y": 2 + }, + { + "label": "k72", + "x": 13.5, + "y": 2 + }, + { + "label": "k71", + "x": 14.5, + "y": 2 + }, + { + "label": "k70", + "x": 15.5, + "y": 2, + "w": 1.5 + }, + { + "label": "k30", + "x": 0, + "y": 3, + "w": 1.5 + }, + { + "label": "k31", + "x": 1.5, + "y": 3 + }, + { + "label": "k32", + "x": 2.5, + "y": 3 + }, + { + "label": "k33", + "x": 3.5, + "y": 3 + }, + { + "label": "k34", + "x": 4.5, + "y": 3 + }, + { + "label": "k35", + "x": 5.5, + "y": 3 + }, + { + "label": "k16", + "x": 6.5, + "y": 3 + }, + { + "label": "k66", + "x": 9.5, + "y": 3 + }, + { + "label": "k85", + "x": 10.5, + "y": 3 + }, + { + "label": "k84", + "x": 11.5, + "y": 3 + }, + { + "label": "k83", + "x": 12.5, + "y": 3 + }, + { + "label": "k82", + "x": 13.5, + "y": 3 + }, + { + "label": "k81", + "x": 14.5, + "y": 3 + }, + { + "label": "k80", + "x": 15.5, + "y": 3, + "w": 1.5 + }, + { + "label": "k40", + "x": 0, + "y": 4, + "w": 1.5 + }, + { + "label": "k41", + "x": 1.5, + "y": 4 + }, + { + "label": "k42", + "x": 2.5, + "y": 4 + }, + { + "label": "k43", + "x": 3.5, + "y": 4 + }, + { + "label": "k44", + "x": 4.5, + "y": 4 + }, + { + "label": "k36", + "x": 6, + "y": 4.5, + "h": 2 + }, + { + "label": "k26", + "x": 7, + "y": 4.5, + "h": 2 + }, + { + "label": "k76", + "x": 9, + "y": 4.5, + "h": 2 + }, + { + "label": "k86", + "x": 10, + "y": 4.5, + "h": 2 + }, + { + "label": "k94", + "x": 11.5, + "y": 4 + }, + { + "label": "k93", + "x": 12.5, + "y": 4 + }, + { + "label": "k92", + "x": 13.5, + "y": 4 + }, + { + "label": "k91", + "x": 14.5, + "y": 4 + }, + { + "label": "k90", + "x": 15.5, + "y": 4, + "w": 1.5 + } + ] + } + } + } diff --git a/keyboards/zen/rev2/keymaps/debug/keymap.c b/keyboards/rgbkb/zen/rev2/keymaps/debug/keymap.c similarity index 100% rename from keyboards/zen/rev2/keymaps/debug/keymap.c rename to keyboards/rgbkb/zen/rev2/keymaps/debug/keymap.c diff --git a/keyboards/zen/rev2/keymaps/default/keymap.c b/keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c similarity index 99% rename from keyboards/zen/rev2/keymaps/default/keymap.c rename to keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c index 41003e4a5..dba4a2ddd 100644 --- a/keyboards/zen/rev2/keymaps/default/keymap.c +++ b/keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c @@ -6,14 +6,14 @@ extern keymap_config_t keymap_config; // 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 _QWERTY 0 -#define _NAV 2 - +enum layer_number { + _QWERTY = 0, + _NAV +}; enum custom_keycodes { QWERTY = SAFE_RANGE, - NAV, - + NAV }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/zen/rev2/rev2.c b/keyboards/rgbkb/zen/rev2/rev2.c similarity index 100% rename from keyboards/zen/rev2/rev2.c rename to keyboards/rgbkb/zen/rev2/rev2.c diff --git a/keyboards/zen/rev2/rev2.h b/keyboards/rgbkb/zen/rev2/rev2.h similarity index 100% rename from keyboards/zen/rev2/rev2.h rename to keyboards/rgbkb/zen/rev2/rev2.h diff --git a/keyboards/zen/rev2/rules.mk b/keyboards/rgbkb/zen/rev2/rules.mk similarity index 100% rename from keyboards/zen/rev2/rules.mk rename to keyboards/rgbkb/zen/rev2/rules.mk diff --git a/keyboards/zen/rules.mk b/keyboards/rgbkb/zen/rules.mk similarity index 97% rename from keyboards/zen/rules.mk rename to keyboards/rgbkb/zen/rules.mk index f5d64a7f0..7473b61cf 100644 --- a/keyboards/zen/rules.mk +++ b/keyboards/rgbkb/zen/rules.mk @@ -39,4 +39,4 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -DEFAULT_FOLDER = zen/rev2 +DEFAULT_FOLDER = rgbkb/zen/rev2 diff --git a/keyboards/zen/zen.c b/keyboards/rgbkb/zen/zen.c similarity index 100% rename from keyboards/zen/zen.c rename to keyboards/rgbkb/zen/zen.c diff --git a/keyboards/zen/zen.h b/keyboards/rgbkb/zen/zen.h similarity index 59% rename from keyboards/zen/zen.h rename to keyboards/rgbkb/zen/zen.h index cee7652d6..e51c3c831 100644 --- a/keyboards/zen/zen.h +++ b/keyboards/rgbkb/zen/zen.h @@ -1,8 +1,8 @@ #pragma once -#if KEYBOARD_zen_rev1 +#if KEYBOARD_rgbkb_zen_rev1 #include "rev1.h" -#elif KEYBOARD_zen_rev2 +#elif KEYBOARD_rgbkb_zen_rev2 #include "rev2.h" #endif #include "quantum.h" diff --git a/keyboards/zygomorph/common/glcdfont.c b/keyboards/rgbkb/zygomorph/common/glcdfont.c similarity index 100% rename from keyboards/zygomorph/common/glcdfont.c rename to keyboards/rgbkb/zygomorph/common/glcdfont.c diff --git a/keyboards/zygomorph/config.h b/keyboards/rgbkb/zygomorph/config.h similarity index 100% rename from keyboards/zygomorph/config.h rename to keyboards/rgbkb/zygomorph/config.h diff --git a/keyboards/zygomorph/keymaps/5x6pad/keymap.c b/keyboards/rgbkb/zygomorph/keymaps/5x6pad/keymap.c similarity index 100% rename from keyboards/zygomorph/keymaps/5x6pad/keymap.c rename to keyboards/rgbkb/zygomorph/keymaps/5x6pad/keymap.c diff --git a/keyboards/zygomorph/keymaps/5x6pad/rules.mk b/keyboards/rgbkb/zygomorph/keymaps/5x6pad/rules.mk similarity index 100% rename from keyboards/zygomorph/keymaps/5x6pad/rules.mk rename to keyboards/rgbkb/zygomorph/keymaps/5x6pad/rules.mk diff --git a/keyboards/zygomorph/keymaps/default/config.h b/keyboards/rgbkb/zygomorph/keymaps/default/config.h similarity index 100% rename from keyboards/zygomorph/keymaps/default/config.h rename to keyboards/rgbkb/zygomorph/keymaps/default/config.h diff --git a/keyboards/zygomorph/keymaps/default/keymap.c b/keyboards/rgbkb/zygomorph/keymaps/default/keymap.c similarity index 64% rename from keyboards/zygomorph/keymaps/default/keymap.c rename to keyboards/rgbkb/zygomorph/keymaps/default/keymap.c index 98bc1b9a6..f236e20a4 100644 --- a/keyboards/zygomorph/keymaps/default/keymap.c +++ b/keyboards/rgbkb/zygomorph/keymaps/default/keymap.c @@ -26,71 +26,47 @@ enum custom_keycodes { #define FN_CAPS LT(_FN, KC_CAPS) -// Define your non-alpha grouping in this define's LAYOUT, and all your BASE_LAYERS will share the same mod/macro columns - /* / Base Layout \ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* / QWERTY \ * /-----------------------------------------\ /-----------------------------------------\ * | GESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BkSp | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Tab | | | | | | | | | | | | \ | + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |FNCAPS| | | | | | | | | | | | ' | + * |FNCAPS| A | S | D | F | G | | H | J | K | L | ; | ' | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |Shift | | | | | | | | | | | |Shift | + * |Shift | Z | X | C | V | B | | N | M | , | . | / |Enter | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | Ctrl | Win | Alt | RGB | ADJ | Space| | Space| FN | Left | Down | Up |Right | * \------+------+------+------+------+------/ \------+------+------+------+------+------/ */ -#define BASE_LAYOUT( \ - _00, _01, _02, _03, _04, _05, _06, _07, _08, _09, \ - _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, \ - _20, _21, _22, _23, _24, _25, _26, _27, _28, _29 \ -) \ -LAYOUT_ortho_5x12( \ - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ - KC_TAB, _00, _01, _02, _03, _04, _05, _06, _07, _08, _09, KC_BSLS, \ - FN_CAPS, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, KC_QUOT, \ - KC_LSFT, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, KC_ENT, \ - KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ -) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* / QWERTY \ - * /-----------------------------------------\ /-----------------------------------------\ - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | Q | W | E | R | T | | Y | U | O | P | \ | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | A | S | D | F | G | | H | J | K | L | ; | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | Z | X | C | V | B | | N | M | , | . | / | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | | | | | - * \------+------+------+------+------+------/ \------+------+------+------+------+------/ - */ - [_QWERTY] = BASE_LAYOUT( \ - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ - KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH \ + [_QWERTY] = LAYOUT_ortho_5x12( \ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \ + FN_CAPS, 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_ENT, \ + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT \ ), /* / Colemak \ * /-----------------------------------------\ /-----------------------------------------\ - * | | | | | | | | | | | | | | + * | GESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BkSp | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | Q | W | F | P | G | | J | L | U | Y | ; | | + * | Tab | Q | W | F | P | B | | J | L | U | Y | ; | \ | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | A | R | S | T | D | | H | N | E | I | O | | + * |FNCAPS| A | R | S | T | G | | K | N | E | I | O | ' | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | Z | X | C | V | B | | K | M | , | . | / | | + * |Shift | Z | X | C | D | V | | M | H | , | . | / |Enter | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | | | | | + * | Ctrl | Win | Alt | RGB | ADJ | Space| | Space| FN | Left | Down | Up |Right | * \------+------+------+------+------+------/ \------+------+------+------+------+------/ */ - [_COLEMAK] = BASE_LAYOUT( \ - KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, \ - KC_A, KC_R, KC_S, KC_T, KC_G, KC_K, KC_N, KC_E, KC_I, KC_O, \ - KC_Z, KC_X, KC_C, KC_D, KC_V, KC_M, KC_H, KC_COMM, KC_DOT, KC_SLSH \ + [_COLEMAK] = LAYOUT_ortho_5x12( \ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, \ + FN_CAPS, KC_A, KC_R, KC_S, KC_T, KC_G, KC_K, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_M, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT \ ), /* / FN \ @@ -107,9 +83,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * \------+------+------+------+------+------/ \------+------+------+------+------+------/ */ [_FN] = LAYOUT_ortho_5x12( \ - 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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ _______, KC_PGDN, KC_UP, KC_PGUP, _______, _______, _______, KC_PGDN, KC_UP, KC_PGUP, KC_PSCR, KC_HOME, \ - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, RGB_MOD, _______, _______, _______, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU \ ), @@ -128,7 +104,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * \------+------+------+------+------+------/ \------+------+------+------+------+------/ */ [_ADJ] = LAYOUT_ortho_5x12( \ - 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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET, _______, _______, _______, _______, _______, _______, _______, \ _______, RGB_HUD, RGB_VAD, RGB_HUI, RGBRST, _______, _______, QWERTY, COLEMAK, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ diff --git a/keyboards/zygomorph/keymaps/default/readme.md b/keyboards/rgbkb/zygomorph/keymaps/default/readme.md similarity index 99% rename from keyboards/zygomorph/keymaps/default/readme.md rename to keyboards/rgbkb/zygomorph/keymaps/default/readme.md index 4cbe61d12..e1d30b36b 100644 --- a/keyboards/zygomorph/keymaps/default/readme.md +++ b/keyboards/rgbkb/zygomorph/keymaps/default/readme.md @@ -112,10 +112,10 @@ $ cd qmk_firmware build ``` -$ make zygomorph:default +$ make rgbkb/zygomorph:default ``` After the initial flash with AVRdudess, you should be able to flash using this: ``` -$ make zygomorph:default:dfu +$ make rgbkb/zygomorph:default:dfu ``` diff --git a/keyboards/zygomorph/keymaps/default/rules.mk b/keyboards/rgbkb/zygomorph/keymaps/default/rules.mk similarity index 100% rename from keyboards/zygomorph/keymaps/default/rules.mk rename to keyboards/rgbkb/zygomorph/keymaps/default/rules.mk diff --git a/keyboards/zygomorph/keymaps/default_oled/config.h b/keyboards/rgbkb/zygomorph/keymaps/default_oled/config.h similarity index 100% rename from keyboards/zygomorph/keymaps/default_oled/config.h rename to keyboards/rgbkb/zygomorph/keymaps/default_oled/config.h diff --git a/keyboards/zygomorph/keymaps/default_oled/keymap.c b/keyboards/rgbkb/zygomorph/keymaps/default_oled/keymap.c similarity index 71% rename from keyboards/zygomorph/keymaps/default_oled/keymap.c rename to keyboards/rgbkb/zygomorph/keymaps/default_oled/keymap.c index 89ed92ecd..d313bec8b 100644 --- a/keyboards/zygomorph/keymaps/default_oled/keymap.c +++ b/keyboards/rgbkb/zygomorph/keymaps/default_oled/keymap.c @@ -26,71 +26,47 @@ enum custom_keycodes { #define FN_CAPS LT(_FN, KC_CAPS) -// Define your non-alpha grouping in this define's LAYOUT, and all your BASE_LAYERS will share the same mod/macro columns - /* / Base Layout \ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* / QWERTY \ * /-----------------------------------------\ /-----------------------------------------\ * | GESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BkSp | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Tab | | | | | | | | | | | | \ | + * | Tab | Q | W | E | R | T | | Y | U | O | P | \ | \ | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |FNCAPS| | | | | | | | | | | | ' | + * |FNCAPS| A | S | D | F | G | | H | J | K | L | ; | ' | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |Shift | | | | | | | | | | | |Shift | + * |Shift | Z | X | C | V | B | | N | M | , | . | / |Shift | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | Ctrl | Win | Alt | RGB | ADJ | Space| | Space| FN | Left | Down | Up |Right | * \------+------+------+------+------+------/ \------+------+------+------+------+------/ */ -#define BASE_LAYOUT( \ - _00, _01, _02, _03, _04, _05, _06, _07, _08, _09, \ - _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, \ - _20, _21, _22, _23, _24, _25, _26, _27, _28, _29 \ -) \ -LAYOUT_ortho_5x12( \ - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ - KC_TAB, _00, _01, _02, _03, _04, _05, _06, _07, _08, _09, KC_BSLS, \ - FN_CAPS, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, KC_QUOT, \ - KC_LSFT, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, KC_ENT, \ - KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ -) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* / QWERTY \ - * /-----------------------------------------\ /-----------------------------------------\ - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | Q | W | E | R | T | | Y | U | O | P | \ | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | A | S | D | F | G | | H | J | K | L | ; | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | Z | X | C | V | B | | N | M | , | . | / | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | | | | | - * \------+------+------+------+------+------/ \------+------+------+------+------+------/ - */ - [_QWERTY] = BASE_LAYOUT( \ - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ - KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH \ + [_QWERTY] = LAYOUT_ortho_5x12( \ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \ + FN_CAPS, 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_ENT, \ + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT \ ), /* / Colemak \ * /-----------------------------------------\ /-----------------------------------------\ - * | | | | | | | | | | | | | | + * | GESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BkSp | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | Q | W | F | P | G | | J | L | U | Y | ; | | + * | Tab | Q | W | F | P | B | | J | L | U | Y | ; | \ | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | A | R | S | T | D | | H | N | E | I | O | | + * |FNCAPS| A | R | S | T | G | | K | N | E | I | O | ' | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | Z | X | C | V | B | | K | M | , | . | / | | + * |Shift | Z | X | C | D | V | | M | H | , | . | / |Enter | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | | | | | + * | Ctrl | Win | Alt | RGB | ADJ | Space| | Space| FN | Left | Down | Up |Right | * \------+------+------+------+------+------/ \------+------+------+------+------+------/ */ - [_COLEMAK] = BASE_LAYOUT( \ - KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, \ - KC_A, KC_R, KC_S, KC_T, KC_G, KC_K, KC_N, KC_E, KC_I, KC_O, \ - KC_Z, KC_X, KC_C, KC_D, KC_V, KC_M, KC_H, KC_COMM, KC_DOT, KC_SLSH \ + [_COLEMAK] = LAYOUT_ortho_5x12( \ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, \ + FN_CAPS, KC_A, KC_R, KC_S, KC_T, KC_G, KC_K, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_M, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT \ ), /* / FN \ diff --git a/keyboards/zygomorph/keymaps/default_oled/rules.mk b/keyboards/rgbkb/zygomorph/keymaps/default_oled/rules.mk similarity index 100% rename from keyboards/zygomorph/keymaps/default_oled/rules.mk rename to keyboards/rgbkb/zygomorph/keymaps/default_oled/rules.mk diff --git a/keyboards/zygomorph/keymaps/kageurufu/config.h b/keyboards/rgbkb/zygomorph/keymaps/kageurufu/config.h similarity index 100% rename from keyboards/zygomorph/keymaps/kageurufu/config.h rename to keyboards/rgbkb/zygomorph/keymaps/kageurufu/config.h diff --git a/keyboards/zygomorph/keymaps/kageurufu/keymap.c b/keyboards/rgbkb/zygomorph/keymaps/kageurufu/keymap.c similarity index 100% rename from keyboards/zygomorph/keymaps/kageurufu/keymap.c rename to keyboards/rgbkb/zygomorph/keymaps/kageurufu/keymap.c diff --git a/keyboards/zygomorph/keymaps/kageurufu/readme.md b/keyboards/rgbkb/zygomorph/keymaps/kageurufu/readme.md similarity index 99% rename from keyboards/zygomorph/keymaps/kageurufu/readme.md rename to keyboards/rgbkb/zygomorph/keymaps/kageurufu/readme.md index f79c70d22..77e88a078 100644 --- a/keyboards/zygomorph/keymaps/kageurufu/readme.md +++ b/keyboards/rgbkb/zygomorph/keymaps/kageurufu/readme.md @@ -123,10 +123,10 @@ $ cd qmk_firmware build ``` -$ make sol:default +$ make rgbkb/sol:default ``` After the initial flash with AVRdudess, you should be able to flash using this: ``` -$ make sol:default:dfu +$ make rgbkb/sol:default:dfu ``` diff --git a/keyboards/zygomorph/keymaps/kageurufu/rules.mk b/keyboards/rgbkb/zygomorph/keymaps/kageurufu/rules.mk similarity index 100% rename from keyboards/zygomorph/keymaps/kageurufu/rules.mk rename to keyboards/rgbkb/zygomorph/keymaps/kageurufu/rules.mk diff --git a/keyboards/zygomorph/keymaps/xulkal/config.h b/keyboards/rgbkb/zygomorph/keymaps/xulkal/config.h similarity index 100% rename from keyboards/zygomorph/keymaps/xulkal/config.h rename to keyboards/rgbkb/zygomorph/keymaps/xulkal/config.h diff --git a/keyboards/zygomorph/keymaps/xulkal/keymap.c b/keyboards/rgbkb/zygomorph/keymaps/xulkal/keymap.c similarity index 100% rename from keyboards/zygomorph/keymaps/xulkal/keymap.c rename to keyboards/rgbkb/zygomorph/keymaps/xulkal/keymap.c diff --git a/keyboards/zygomorph/keymaps/xulkal/rules.mk b/keyboards/rgbkb/zygomorph/keymaps/xulkal/rules.mk similarity index 100% rename from keyboards/zygomorph/keymaps/xulkal/rules.mk rename to keyboards/rgbkb/zygomorph/keymaps/xulkal/rules.mk diff --git a/keyboards/zygomorph/readme.md b/keyboards/rgbkb/zygomorph/readme.md similarity index 97% rename from keyboards/zygomorph/readme.md rename to keyboards/rgbkb/zygomorph/readme.md index c669fba65..72ca737d3 100644 --- a/keyboards/zygomorph/readme.md +++ b/keyboards/rgbkb/zygomorph/readme.md @@ -10,6 +10,6 @@ Hardware Availability: [RGBKB](https://www.rgbkb.net) Make example for this keyboard (after setting up your build environment): - make zygomorph:default + make rgbkb/zygomorph:default 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). diff --git a/keyboards/zygomorph/rev1/config.h b/keyboards/rgbkb/zygomorph/rev1/config.h similarity index 100% rename from keyboards/zygomorph/rev1/config.h rename to keyboards/rgbkb/zygomorph/rev1/config.h diff --git a/keyboards/zygomorph/rev1/info.json b/keyboards/rgbkb/zygomorph/rev1/info.json similarity index 100% rename from keyboards/zygomorph/rev1/info.json rename to keyboards/rgbkb/zygomorph/rev1/info.json diff --git a/keyboards/zygomorph/rev1/rev1.c b/keyboards/rgbkb/zygomorph/rev1/rev1.c similarity index 100% rename from keyboards/zygomorph/rev1/rev1.c rename to keyboards/rgbkb/zygomorph/rev1/rev1.c diff --git a/keyboards/zygomorph/rev1/rev1.h b/keyboards/rgbkb/zygomorph/rev1/rev1.h similarity index 100% rename from keyboards/zygomorph/rev1/rev1.h rename to keyboards/rgbkb/zygomorph/rev1/rev1.h diff --git a/keyboards/zygomorph/rev1/rules.mk b/keyboards/rgbkb/zygomorph/rev1/rules.mk similarity index 100% rename from keyboards/zygomorph/rev1/rules.mk rename to keyboards/rgbkb/zygomorph/rev1/rules.mk diff --git a/keyboards/zygomorph/rules.mk b/keyboards/rgbkb/zygomorph/rules.mk similarity index 98% rename from keyboards/zygomorph/rules.mk rename to keyboards/rgbkb/zygomorph/rules.mk index 0d6b01bbe..9bafc7b1d 100644 --- a/keyboards/zygomorph/rules.mk +++ b/keyboards/rgbkb/zygomorph/rules.mk @@ -66,4 +66,4 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) SPLIT_KEYBOARD = yes LAYOUTS = ortho_4x12 ortho_5x12 -DEFAULT_FOLDER = zygomorph/rev1 +DEFAULT_FOLDER = rgbkb/zygomorph/rev1 diff --git a/keyboards/zygomorph/zygomorph.c b/keyboards/rgbkb/zygomorph/zygomorph.c similarity index 100% rename from keyboards/zygomorph/zygomorph.c rename to keyboards/rgbkb/zygomorph/zygomorph.c diff --git a/keyboards/zygomorph/zygomorph.h b/keyboards/rgbkb/zygomorph/zygomorph.h similarity index 100% rename from keyboards/zygomorph/zygomorph.h rename to keyboards/rgbkb/zygomorph/zygomorph.h From b68d8fe82eac0be9ca8862fdf94ae4bfbbb0735e Mon Sep 17 00:00:00 2001 From: Pavlos Vinieratos Date: Tue, 14 May 2019 21:02:22 +0200 Subject: [PATCH 023/341] [Keymap] Pvinis master (#5843) * trying to make my global keymap * refactoring the old keymap using userspace * getting there * move readme and remove community layout * use pragma once instead of ifndefs * just make iris work * iris decent * better naming * add some modifiers on the home row * use symbol and sysctl layers * fix up * a bit faster * add < and > on symbol layer * apparently im not using z all that much.. * okok * fix up stuff * led init is back * bring back led indicators * Update keyboards/ergotravel/keymaps/pvinis/config.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * not needed * not needed * delete these for now, until I use the userspace code * remove katamari from here. made a new pr for it * lower case * drashna suggestion :) * move files to correct place * fix missing command --- keyboards/ergodox_ez/keymaps/pvinis/keymap.c | 330 ++++++++++++ .../ergodox_ez/keymaps/pvinis/readme.md | 0 keyboards/ergodox_ez/keymaps/pvinis/rules.mk | 1 + keyboards/keebio/iris/keymaps/pvinis/config.h | 24 + keyboards/keebio/iris/keymaps/pvinis/keymap.c | 122 +++++ keyboards/keebio/iris/keymaps/pvinis/rules.mk | 2 + layouts/community/ergodox/pvinis/Changelog.md | 7 - layouts/community/ergodox/pvinis/keymap.c | 475 ------------------ layouts/community/ergodox/pvinis/rules.mk | 7 - quantum/audio/song_list.h | 33 +- users/pvinis/config.h | 9 + users/pvinis/pvinis.c | 79 +++ users/pvinis/pvinis.h | 152 ++++++ users/pvinis/rules.mk | 15 + 14 files changed, 750 insertions(+), 506 deletions(-) create mode 100644 keyboards/ergodox_ez/keymaps/pvinis/keymap.c rename layouts/community/ergodox/pvinis/Readme.md => keyboards/ergodox_ez/keymaps/pvinis/readme.md (100%) create mode 100644 keyboards/ergodox_ez/keymaps/pvinis/rules.mk create mode 100644 keyboards/keebio/iris/keymaps/pvinis/config.h create mode 100644 keyboards/keebio/iris/keymaps/pvinis/keymap.c create mode 100644 keyboards/keebio/iris/keymaps/pvinis/rules.mk delete mode 100644 layouts/community/ergodox/pvinis/Changelog.md delete mode 100644 layouts/community/ergodox/pvinis/keymap.c delete mode 100644 layouts/community/ergodox/pvinis/rules.mk create mode 100644 users/pvinis/config.h create mode 100644 users/pvinis/pvinis.c create mode 100644 users/pvinis/pvinis.h create mode 100644 users/pvinis/rules.mk diff --git a/keyboards/ergodox_ez/keymaps/pvinis/keymap.c b/keyboards/ergodox_ez/keymaps/pvinis/keymap.c new file mode 100644 index 000000000..9943886e2 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/pvinis/keymap.c @@ -0,0 +1,330 @@ +// pvinis ergodox ez +// ,------------------------------------. ,------------------------------------. +// | | | | | | | | | | | | | | | | +// |------+----+----+----+----+---------| |----+----+----+----+----+----+------| +// | | | | | | | | | | | | | | | | +// |------+----+----+----x----x----| | | |----x----x----+----+----+------| +// | | | | | | |----| |----| | | | | | | +// |------+----+----+----x----x----| | | |----x----x----+----+----+------| +// | | | | | | | | | | | | | | | | +// `------+----+----+----+----+---------' `---------+----+----+----+----+------' +// | | | | | | | | | | | | +// `------------------------' `------------------------' +// ,---------. ,---------. +// | | | | | | +// ,----+----+----| |----+----+----. +// | | | | | | | | +// | | |----| |----| | | +// | | | | | | | | +// `--------------' `--------------' + + +#include QMK_KEYBOARD_H +#include "pvinis.h" +#include "mousekey.h" + + +// layers +enum { + MOUSE = 8, +}; + +// extra keys +enum { + NONE = 30, + TD_LAYR, // SYSCTL and MOUSE layer switch +}; + +// application selection +// this is sending ctrl-alt-gui-, and this is picked up by hammerspoon +#define AP_SLCK ALLM(KC_S) +#define AP_XCOD ALLM(KC_X) +#define AP_MSGR ALLM(KC_M) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // ,------------------------------------. ,------------------------------------. + // |4xFLSH| | | | | |Opt | | | | | | | | | + // |------+----+----+----+----+---------| |----+----+----+----+----+----+------| + // | Tab | | | | | | | | | | | | | | | + // |------+----+----+----x----x----| | | |----x----x----+----+----+------| + // |EscCtl| | | | | |----| |----| | | | | | Ent | + // |------+----+----+----x----x----| | | |----x----x----+----+----+------| + // |LShift| | | | | | | | | | | | | |RShift| + // `------+----+----+----+----+---------' `---------+----+----+----+----+------' + // | | | | |Cmd | | | | | | | + // `------------------------' `------------------------' + // ,---------. ,---------. + // |QWER| | | | | + // ,----+----+----| |----+----+----. + // | Ba | L | | | | | | + // | ck |Shi |----| |----| |Spc | + // | spc| ft | | | | | | + // `--------------' `--------------' + [LR_BASE] = LAYOUT_ergodox_pretty_wrapper( + TD_3FLS, _______, _______, _______, _______, _______, KC_LALT, _______, _______, _______, _______, _______, _______, _______, + KC_TAB , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + PV_ESCC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT , + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, + _______, _______, _______, KC_LGUI, SYMBOL , SYSCTL , KC_RALT, _______, _______, _______, + QWERTY , CARPALX, _______, _______, + _______, _______, + KC_BSPC, _______, _______, _______, _______, KC_SPC + ), + + // ,------------------------------------. ,------------------------------------. + // | | NUMBERS_L | | | - | NUMBERS_R | = | + // |------+----+----+----+----+---------| |----+----+----+----+----+----+------| + // | | | [ | | ] | | | + // |------+ | | | | +------| + // | | QWERTY_L |----| |----| QWERTY_R | | + // |------+ | ( | | ) | +------| + // | | | | | | | | + // `------+----+----+----+----+---------' `---------+----+----+----+----+------' + // | | ` | | | | | | | | ' | | + // `------------------------' `------------------------' + // ,---------. ,---------. + // | | | | | | + // ,----+----+----| |----+----+----. + // | | | | | | | | + // | | |----| |----| | | + // | | | | | | | | + // `--------------' `--------------' + // See `users/pvinis/pvinis.h` + [LR_QWERTY] = LAYOUT_ergodox_pretty_wrapper( + _______, ________________NUMBERS_L__________________, _______, KC_MINS, ________________NUMBERS_R__________________, KC_EQL , + _______, _________________QWERTY_L1_________________, KC_LBRC, KC_RBRC, _________________QWERTY_R1_________________, _______, + _______, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, _______, + _______, _________________QWERTY_L3_________________, KC_LPRN, KC_RPRN, _________________QWERTY_R3_________________, _______, + _______, KC_GRV, _______, _______, _______, _______, _______, _______, KC_QUOT , _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + // ,------------------------------------. ,------------------------------------. + // | | NUMBERS_L | | | | NUMBERS_R | | + // |------+----+----+----+----+---------| |----+----+----+----+----+----+------| + // | | | | | | | | + // |------+ | | | | +------| + // | | CARPALX_L |----| |----| CARPALX_R | | + // |------+ | | | | +------| + // | | | | | | | | + // `------+----+----+----+----+---------' `---------+----+----+----+----+------' + // | | | | | | | | | | | | + // `------------------------' `------------------------' + // ,---------. ,---------. + // | | | | | | + // ,----+----+----| |----+----+----. + // | | | | | | | | + // | | |----| |----| | | + // | | | | | | | | + // `--------------' `--------------' + // See `users/pvinis/pvinis.h` + [LR_CARPALX] = LAYOUT_ergodox_pretty_wrapper( + _______, ________________NUMBERS_L__________________, _______, _______, ________________NUMBERS_R__________________, _______, + _______, ________________CARPALX_L1_________________, _______, _______, ________________CARPALX_R1_________________, _______, + _______, ________________CARPALX_L2_________________, ________________CARPALX_R2_________________, _______, + _______, ________________CARPALX_L3_________________, _______, _______, ________________CARPALX_R3_________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + // See `users/pvinis/pvinis.h` + [LR_SYMBOL] = LAYOUT_ergodox_pretty_wrapper( + _______, ______________________F_L__________________, KC_F11 , KC_F12 , ______________________F_R__________________, _______, + _______, _________________SYMBOL_L1_________________, _______, _______, _________________SYMBOL_R1_________________, _______, + _______, _________________SYMBOL_L2_________________, _________________SYMBOL_R2_________________, _______, + _______, _________________SYMBOL_L3_________________, _______, _______, _________________SYMBOL_R3_________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + // See `users/pvinis/pvinis.h` + [LR_SYSCTL] = LAYOUT_ergodox_pretty_wrapper( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _________________SYSCTL_R1_________________, _______, + _______, _______, _______, _______, _______, _______, _________________SYSCTL_R2_________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _________________SYSCTL_R3_________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + // See `users/pvinis/pvinis.h` + [LR_KBCTL] = LAYOUT_ergodox_pretty_wrapper( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R1_________________, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R2_________________, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R3_________________, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + +/* MOUSE + * a keymap to control my system. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ^ | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | MsUp | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| |MsLeft| MsDn |MsRght| | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | |MidClk| + * ,------|------|------| |------+------+------. + * | | | | | |Left |Right | + * | | |------| |------| Click| Click| + * | | | ^ | | | | | + * `--------------------' `--------------------' + */ + [MOUSE] = LAYOUT_ergodox_pretty( + KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + + ,KC_NO ,KC_NO + ,KC_NO + ,KC_NO ,KC_NO ,KC_TRNS + + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_MS_U ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + + ,KC_NO ,KC_NO + ,KC_NO + ,KC_NO ,KC_NO ,KC_NO + ), +}; + + +// keyboard initialization +void keyboard_post_init_user_local(void) { + ergodox_led_all_on(); + for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) { + ergodox_led_all_set(i); + wait_ms(5); + } + wait_ms(1000); + for (int i = LED_BRIGHTNESS_LO; i > 0; i--) { + ergodox_led_all_set(i); + wait_ms(10); + } + ergodox_led_all_off(); + + // restore default brightness for future use + ergodox_led_all_set(LED_BRIGHTNESS_HI); +} + +// light up leds based on the layer +uint32_t layer_state_set_user_local(uint32_t state) { + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (biton32(state)) { + case LR_SYSCTL: + ergodox_right_led_3_on(); // blue + break; + case LR_KBCTL: + ergodox_right_led_1_on(); // red + break; + case LR_SYMBOL: + ergodox_right_led_2_on(); // green + break; + default: break; + } + return state; +} + +// extra keys +// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + // switch (id) { + // } + // return MACRO_NONE; +// } + +// tap dances + +// flash keyboard on 4x tap, with leds +// void flash_each_tap(qk_tap_dance_state_t *state, void *user_data) { +// switch (state->count) { +// case 1: +// ergodox_right_led_3_on(); +// break; +// case 2: +// ergodox_right_led_2_on(); +// break; +// case 3: +// ergodox_right_led_1_on(); +// break; +// case 4: +// ergodox_right_led_3_off(); +// wait_ms(50); +// ergodox_right_led_2_off(); +// wait_ms(50); +// ergodox_right_led_1_off(); +// break; +// } +// } + +// void flash_dance_finished(qk_tap_dance_state_t *state, void *user_data) { +// if (state->count >= 4) { +// reset_keyboard(); +// reset_tap_dance(state); +// } +// } + +// void flash_dance_reset(qk_tap_dance_state_t *state, void *user_data) { +// ergodox_right_led_1_off(); +// wait_ms(50); +// ergodox_right_led_2_off(); +// wait_ms(50); +// ergodox_right_led_3_off(); +// } + +// SYSCTL on first tap, MOUSE ON second tap +// void layers_dance_finished(qk_tap_dance_state_t *state, void *user_data) { +// uint8_t layer = biton32(layer_state); + +// switch(state->count) { +// case 1: +// switch(layer) { +// case LR_SYSCTL: +// layer_off(LR_SYSCTL); +// break; +// case MOUSE: +// layer_off(MOUSE); +// break; +// default: +// layer_on(LR_SYSCTL); +// break; +// } +// break; +// case 2: +// layer_on(MOUSE); +// break; +// } +// } + +// qk_tap_dance_action_t tap_dance_actions[] = { + // [TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED( flash_each_tap, flash_dance_finished, flash_dance_reset ), + // [TD_LAYR] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, layers_dance_finished, NULL ), +// }; diff --git a/layouts/community/ergodox/pvinis/Readme.md b/keyboards/ergodox_ez/keymaps/pvinis/readme.md similarity index 100% rename from layouts/community/ergodox/pvinis/Readme.md rename to keyboards/ergodox_ez/keymaps/pvinis/readme.md diff --git a/keyboards/ergodox_ez/keymaps/pvinis/rules.mk b/keyboards/ergodox_ez/keymaps/pvinis/rules.mk new file mode 100644 index 000000000..e5ddcae8d --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/pvinis/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/keebio/iris/keymaps/pvinis/config.h b/keyboards/keebio/iris/keymaps/pvinis/config.h new file mode 100644 index 000000000..7a7beb0b8 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/pvinis/config.h @@ -0,0 +1,24 @@ +#pragma once + + +#ifdef PRODUCT +#undef PRODUCT +#define PRODUCT Iris Keyboard - pvinis +#endif // PRODUCT + + +// Use I2C or Serial, not both +#define USE_SERIAL +// #define USE_I2C + + +// Select hand configuration +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + + +// choose pin to use for audio. c6 is the one iris uses. +#ifdef AUDIO_ENABLE +#define C6_AUDIO +#endif // AUDIO_ENABLE diff --git a/keyboards/keebio/iris/keymaps/pvinis/keymap.c b/keyboards/keebio/iris/keymaps/pvinis/keymap.c new file mode 100644 index 000000000..fb9e4adcf --- /dev/null +++ b/keyboards/keebio/iris/keymaps/pvinis/keymap.c @@ -0,0 +1,122 @@ +// pvinis iris +// ,-----------------------------. ,-----------------------------. +// | | | | | | | | | | | | | | +// |----+----+----+----+----+----| |----+----+----+----+----+----| +// | | | | | | | | | | | | | | +// |----+----+----+----x----x----| |----x----x----+----+----+----| +// | | | | | | | | | | | | | | +// |----+----+----+----x----x----+----. ,----|----x----x----+----+----+----| +// | | | | | | | | | | | | | | | | +// `-------------------+----+----+----/ \----+----+----+-------------------' +// | | | | | | | | +// `----+---------' `--------------' + + +#include QMK_KEYBOARD_H +#include "pvinis.h" +//#include "iris.h" +//#include "action_layer.h" +//#include "eeconfig.h" + +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif + +#ifdef AUDIO_ENABLE + //#define STARTUP_SONG SONG(SONIC_RING) +#endif + +#ifdef AUDIO_ENABLE +float tone_sonic[][2] = SONG(IN_LIKE_FLINT); +float tone_1[][2] = SONG(QWERTY_SOUND); +float tone_2[][2] = SONG(OLD_SPICE); +float tone_3[][2] = SONG(OVERWATCH_THEME); +float tone_4[][2] = SONG(QWERTY_SOUND); +#endif + + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // ,-----------------------------. ,-----------------------------. + // | | | | | |QWER| | | | | | | | + // |----+----+----+----+----+----| |----+----+----+----+----+----| + // |Tab | | | | |CARP| | | | | | |Del | + // |----+----+----+----x----x----| |----x----x----+----+----+----| + // |EscC| | | | | | | | | | | |Ent | + // |----+----+----+----x----x----+----. ,----|----x----x----+----+----+----| + // |LSft| | | | | |Home| |End | | | | | |Rsft| + // `-------------------+----+----+----/ \----+----+----+-------------------' + // |Cmd |LOWR|Bspc| |Spc |RASE|RAlt| + // `----+---------' `--------------' + [LR_BASE] = LAYOUT_wrapper( + _______, _______, _______, _______, _______, QWERTY , _______, _______, _______, _______, _______, _______, + KC_TAB , _______, _______, _______, _______, CARPALX, _______, _______, _______, _______, _______, KC_DEL , + PV_ESCC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT , + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, + KC_LGUI, SYMBOL , KC_BSPC, KC_SPC , SYSCTL , KC_RALT + ), + + // ,-----------------------------. ,-----------------------------. + // | | NUMBERS_L | | NUMBERS_R | | + // |----+----+----+----+----+----| |----+----+----+----+----+----| + // | | | | | | + // |----+ | | +----| + // | | QWERTY_L | | QWERTY_R | | + // |----+ +----. ,----| +----| + // | | | | | | | | + // `-------------------+----+----+----/ \----+----+----+-------------------' + // | | | | | | | | + // `----+---------' `--------------' + [LR_QWERTY] = LAYOUT_wrapper( + _______, ________________NUMBERS_L__________________, ________________NUMBERS_R__________________, _______, + _______, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, _______, + _______, _____________MOD_QWERTY_L2_________________, _____________MOD_QWERTY_R2_________________, _______, + _______, _________________QWERTY_L3_________________, _______, _______, _________________QWERTY_R3_________________, _______, + _______, _______, _______, _______, _______, _______ + ), + + // ,-----------------------------. ,-----------------------------. + // | | NUMBERS_L | | NUMBERS_R | | + // |----+----+----+----+----+----| |----+----+----+----+----+----| + // | | | | | | + // |----+ | | +----| + // | | CARPALX_L | | CARPALX_R | | + // |----+ +----. ,----| +----| + // | | | | | | | | + // `-------------------+----+----+----/ \----+----+----+-------------------' + // | | | | | | | | + // `----+---------' `--------------' + [LR_CARPALX] = LAYOUT_wrapper( + _______, ________________NUMBERS_L__________________, ________________NUMBERS_R__________________, _______, + _______, ________________CARPALX_L1_________________, ________________CARPALX_R1_________________, _______, + _______, ________________CARPALX_L2_________________, ________________CARPALX_R2_________________, _______, + _______, ________________CARPALX_L3_________________, _______, _______, ________________CARPALX_R3_________________, _______, + _______, _______, _______, _______, _______, _______ + ), + + [LR_SYMBOL] = LAYOUT_wrapper( + KC_F12 , ______________________F_L__________________, ______________________F_R__________________, KC_F11 , + _______, _________________SYMBOL_L1_________________, _________________SYMBOL_R1_________________, _______, + _______, _________________SYMBOL_L2_________________, _________________SYMBOL_R2_________________, _______, + _______, _________________SYMBOL_L3_________________, _______, _______, _________________SYMBOL_R3_________________, _______, + _______, _______, _______, _______, _______, _______ + ), + + [LR_SYSCTL] = LAYOUT_wrapper( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _________________SYSCTL_R1_________________, _______, + _______, _______, _______, _______, _______, _______, _________________SYSCTL_R2_________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _________________SYSCTL_R3_________________, _______, + _______, _______, _______, _______, _______, _______ + ), + + [LR_KBCTL] = LAYOUT_wrapper( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, __________________KBCTL_L1_________________, __________________KBCTL_R1_________________, XXXXXXX, + XXXXXXX, __________________KBCTL_L2_________________, __________________KBCTL_R2_________________, XXXXXXX, + BASE , __________________KBCTL_L3_________________, XXXXXXX, XXXXXXX, __________________KBCTL_R3_________________, XXXXXXX, + XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX + ) +}; diff --git a/keyboards/keebio/iris/keymaps/pvinis/rules.mk b/keyboards/keebio/iris/keymaps/pvinis/rules.mk new file mode 100644 index 000000000..899312894 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/pvinis/rules.mk @@ -0,0 +1,2 @@ +AUDIO_ENABLE = no # off for now +RGBLIGHT_ENABLE = no # off for now diff --git a/layouts/community/ergodox/pvinis/Changelog.md b/layouts/community/ergodox/pvinis/Changelog.md deleted file mode 100644 index e5816200b..000000000 --- a/layouts/community/ergodox/pvinis/Changelog.md +++ /dev/null @@ -1,7 +0,0 @@ -## v0.3 - -*2016-10-11* - -### Starting point - -* The starting point of this keymap. A beginner layout, and a couple placeholders. diff --git a/layouts/community/ergodox/pvinis/keymap.c b/layouts/community/ergodox/pvinis/keymap.c deleted file mode 100644 index 1bca0398d..000000000 --- a/layouts/community/ergodox/pvinis/keymap.c +++ /dev/null @@ -1,475 +0,0 @@ -// pvinis' ergodox keymap - -#include QMK_KEYBOARD_H -#include "mousekey.h" - -// easier name for left ctrl-alt-gui -#define ALLM(kc) LCAG(kc) - -// layers -enum { - BASE = 0, - BEGIN, - QWERTY, - CARPALX, - SYSCTL, - MOUSE, -}; - -// extra keys -enum { - NONE = 0, - - // tap dance - TD_FLSH, // flash keyboard - TD_LAYR, // SYSCTL and MOUSE layer switch -}; - -// application selection -// this is sending ctrl-alt-gui-, and this is picked up by hammerspoon -#define AP_SLCK ALLM(KC_S) -#define AP_XCOD ALLM(KC_X) -#define AP_MSGR ALLM(KC_M) - -// keymaps -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* BASE - * the base of the keyboard. - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * |4x FLASH| | | | | | | | | | | | | | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | |------| |------| | | | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | |SYSCTL| | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * |BEGIN |QWERTY| | | | - * ,------|------|------| |------+--------+------. - * | | |CARPAL| |Slack | | | - * |Backsp|LShift|------| |------| Enter |Space | - * | | |SYSCTL| |Msngr | | | - * `--------------------' `----------------------' - */ -[BASE] = LAYOUT_ergodox( - TD(TD_FLSH) ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - - ,TG(BEGIN) ,TD(TD_LAYR) - ,TG(MOUSE) - ,KC_BSPC ,KC_LSFT ,TD(TD_LAYR) - - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,MO(SYSCTL) ,KC_NO ,KC_NO ,KC_NO ,KC_NO - - ,TG(SYSCTL) ,KC_NO - ,AP_SLCK - ,AP_MSGR ,KC_ENT ,KC_SPC -), - -/* BEGIN - * a beginner's keymap i currently use. - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | 1 | 2 | 3 | 4 | 5 | opt | | 6 | 7 | 8 | 9 | 0 | - | = | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * |Esc/Ctrl| A | S | D | F | G |------| |------| H | J | K | L | ; | Enter | - * |--------+------+------+------+------+------| ( | | ) |------+------+------+------+------+--------| - * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | ` | Cmd | | Cmd | | | | | ' | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+--------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `----------------------' - */ -[BEGIN] = LAYOUT_ergodox( - KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_LALT -,KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC -,CTL_T(KC_ESC) ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G -,KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_LPRN -,KC_TRNS ,KC_GRV ,KC_LGUI ,KC_LEFT ,KC_RIGHT - - ,KC_TRNS ,KC_TRNS - ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS - - ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS ,KC_EQL - ,KC_RBRC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS - ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_ENT - ,KC_RPRN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT - ,KC_TRNS ,KC_DOWN ,KC_TRNS ,KC_QUOT ,KC_TRNS - - ,KC_TRNS ,KC_TRNS - ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS -), - -/* QWERTY - * the default qwerty keymap. not really used, but i'll keep it here for now. - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | Q | W | E | R | T | | | | Y | U | I | O | P | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | A | S | D | F | G |------| |------| H | J | K | L | ; | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | Z | X | C | V | B | | | | N | M | , | . | / | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+--------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `----------------------' - */ -[QWERTY] = LAYOUT_ergodox( - KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_TRNS -,KC_TRNS ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_TRNS -,KC_TRNS ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G -,KC_TRNS ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_TRNS -,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS - - ,KC_TRNS ,KC_TRNS - ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS - - ,KC_TRNS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_TRNS - ,KC_TRNS ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_TRNS - ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_TRNS - ,KC_TRNS ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS - - ,KC_TRNS ,KC_TRNS - ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS -), - -/* CARPALX - * the keymap i would like to transition to. - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | 1 | 2 | 3 | 4 | 5 | | | RIGHT| 6 | 7 | 8 | 9 | 0 | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | Q | G | M | L | W | | | L1 | Y | F | U | B | ; | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | D | S | T | N | R |------| |------| I | A | E | O | H | | - * |--------+------+------+------+------+------| | | Meh |------+------+------+------+------+--------| - * | | Z | X | C | V | J | | | | K | P | , | . | / | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | Up | | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -[CARPALX] = LAYOUT_ergodox( - KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_TRNS -,KC_TRNS ,KC_Q ,KC_G ,KC_M ,KC_L ,KC_W ,KC_TRNS -,KC_TRNS ,KC_D ,KC_S ,KC_T ,KC_N ,KC_R -,KC_TRNS ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_J ,KC_TRNS -,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS - - ,KC_TRNS ,KC_TRNS - ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS - - ,KC_TRNS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_TRNS - ,KC_TRNS ,KC_Y ,KC_F ,KC_U ,KC_B ,KC_SCLN ,KC_TRNS - ,KC_I ,KC_A ,KC_E ,KC_O ,KC_H ,KC_TRNS - ,KC_TRNS ,KC_K ,KC_P ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS - - ,KC_TRNS ,KC_TRNS - ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS -), - -/* SYSCTL - * a keymap to control my system. - * - * ,--------------------------------------------------. ,------------------------------------------------------. - * | ^ | | | | | | | | | | | | | | | - * |--------+------+------+------+------+-------------| |------+------+------+----------+------+------+--------| - * | | | | | | | | | | Mute | Home | Up | End | | | - * |--------+------+------+------+------+------| | | |------+------+----------+------+------+--------| - * | | | | | | |------| |------|VolUp | Left | Down |Right | | Lock | - * |--------+------+------+------+------+------| | | |------+------+----------+------+------+--------| - * | | | | | | | | | |VolDn | Prev |Play/Pause| Next | | Sleep | - * `--------+------+------+------+------+-------------' `-------------+------+----------+------+------+--------' - * | | | | | | | | | | | Power| - * `----------------------------------' `--------------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | ^ | | | | | - * `--------------------' `--------------------' - */ -[SYSCTL] = LAYOUT_ergodox( - KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - - ,KC_NO ,KC_NO - ,KC_NO - ,KC_NO ,KC_NO ,KC_TRNS - - /*,KC_POP /// */,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - /* /// ,KC_PTRN*/,KC_NO ,KC_MUTE ,KC_HOME ,KC_UP ,KC_END ,KC_NO ,KC_NO - ,KC_VOLU ,KC_LEFT ,KC_DOWN ,KC_RGHT ,KC_NO ,LCTL(LSFT(KC_PWR)) - ,KC_NO ,KC_VOLD ,KC_MPRV ,KC_MPLY ,KC_MNXT ,KC_NO ,KC_SLEP - ,KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_PWR - - ,KC_NO ,KC_NO - ,KC_NO - ,KC_NO ,KC_NO ,KC_NO -), - -/* MOUSE - * a keymap to control my system. - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | ^ | | | | | | | | | | | | | | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | | | | | | | | | MsUp | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | |------| |------| |MsLeft| MsDn |MsRght| | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | |MidClk| - * ,------|------|------| |------+------+------. - * | | | | | |Left |Right | - * | | |------| |------| Click| Click| - * | | | ^ | | | | | - * `--------------------' `--------------------' - */ -[MOUSE] = LAYOUT_ergodox( - KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - - ,KC_NO ,KC_NO - ,KC_NO - ,KC_NO ,KC_NO ,KC_TRNS - - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_MS_U ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - - ,KC_NO ,KC_NO - ,KC_NO - ,KC_NO ,KC_NO ,KC_NO -), - -/* TEMPLATE - * keymap template with transparent and non-transparent keys - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | |------| |------| | | | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+--------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `----------------------' - */ -/* -[TEMPLATE] = LAYOUT_ergodox( - KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS -,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS -,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS -,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS -,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS - - ,KC_TRNS ,KC_TRNS - ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS - - ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS - - ,KC_TRNS ,KC_TRNS - ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS -), -[TEMPLATE] = LAYOUT_ergodox( - KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - - ,KC_NO ,KC_NO - ,KC_NO - ,KC_NO ,KC_NO ,KC_NO - - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - - ,KC_NO ,KC_NO - ,KC_NO - ,KC_NO ,KC_NO ,KC_NO -), -*/ -}; - -// keyboard initialization -void matrix_init_user() { - ergodox_led_all_on(); - for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) { - ergodox_led_all_set(i); - wait_ms(5); - } - wait_ms(1000); - for (int i = LED_BRIGHTNESS_LO; i > 0; i--) { - ergodox_led_all_set(i); - wait_ms(10); - } - ergodox_led_all_off(); -} - -// light up leds based on the layer -void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); - - switch(layer) { - case SYSCTL: - ergodox_right_led_3_on(); - break; - case MOUSE: - ergodox_right_led_2_on(); - break; - default: - ergodox_right_led_1_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); - break; - } -} - -// extra keys -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - } - return MACRO_NONE; -} - -// tap dances - -// flash keyboard on 4x tap, with leds -void flash_each_tap(qk_tap_dance_state_t *state, void *user_data) { - switch (state->count) { - case 1: - ergodox_right_led_3_on(); - break; - case 2: - ergodox_right_led_2_on(); - break; - case 3: - ergodox_right_led_1_on(); - break; - case 4: - ergodox_right_led_3_off(); - wait_ms(50); - ergodox_right_led_2_off(); - wait_ms(50); - ergodox_right_led_1_off(); - break; - } -} - -void flash_dance_finished(qk_tap_dance_state_t *state, void *user_data) { - if (state->count >= 4) { - reset_keyboard(); - reset_tap_dance(state); - } -} - -void flash_dance_reset(qk_tap_dance_state_t *state, void *user_data) { - ergodox_right_led_1_off(); - wait_ms(50); - ergodox_right_led_2_off(); - wait_ms(50); - ergodox_right_led_3_off(); -} - -// SYSCTL on first tap, MOUSE ON second tap -void layers_dance_finished(qk_tap_dance_state_t *state, void *user_data) { - uint8_t layer = biton32(layer_state); - - switch(state->count) { - case 1: - switch(layer) { - case SYSCTL: - layer_off(SYSCTL); - break; - case MOUSE: - layer_off(MOUSE); - break; - default: - layer_on(SYSCTL); - break; - } - break; - case 2: - layer_on(MOUSE); - break; - } -} - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED( flash_each_tap, flash_dance_finished, flash_dance_reset ), - [TD_LAYR] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, layers_dance_finished, NULL ), -}; diff --git a/layouts/community/ergodox/pvinis/rules.mk b/layouts/community/ergodox/pvinis/rules.mk deleted file mode 100644 index 87cbd93c2..000000000 --- a/layouts/community/ergodox/pvinis/rules.mk +++ /dev/null @@ -1,7 +0,0 @@ -CONSOLE_ENABLE = no # for debugging - -SLEEP_LED_ENABLE = no # no led blinking while sleeping -NKRO_ENABLE = yes # disable for windows -TAP_DANCE_ENABLE = yes # tap-tap-tap - - diff --git a/quantum/audio/song_list.h b/quantum/audio/song_list.h index 1d4eec711..9ca8231e4 100644 --- a/quantum/audio/song_list.h +++ b/quantum/audio/song_list.h @@ -51,7 +51,6 @@ Q__NOTE(_E4), Q__NOTE(_C4), \ Q__NOTE(_E4), -/* Requires: PLAY_NOTE_ARRAY(..., ..., STACCATO); */ #define IN_LIKE_FLINT \ E__NOTE(_AS4), E__NOTE(_AS4), QD_NOTE(_B4), \ E__NOTE(_AS4), E__NOTE(_B4), QD_NOTE(_CS4), \ @@ -548,8 +547,8 @@ H__NOTE(_D5), Q__NOTE(_C5), Q__NOTE(_C5), Q__NOTE(_A4), H__NOTE(_C5), Q__NOTE(_C5), \ W__NOTE(_C5), Q__NOTE(_F4), Q__NOTE(_C5), Q__NOTE(_D5), Q__NOTE(_E5), H__NOTE(_D5), \ H__NOTE(_C5), Q__NOTE(_C5), H__NOTE(_G5), Q__NOTE(_C5), HD_NOTE(_D5), \ - HD_NOTE(_G4), Q__NOTE(_C5), Q__NOTE(_D5), BD_NOTE(_C5), - + HD_NOTE(_G4), Q__NOTE(_C5), Q__NOTE(_D5), BD_NOTE(_C5), + #define CAMPANELLA \ Q__NOTE(_DS4), E__NOTE(_DS4), E__NOTE(_DS5), Q__NOTE(_DS5), E__NOTE(_DS5), E__NOTE(_DS6), Q__NOTE(_DS5), E__NOTE(_DS5), \ E__NOTE(_DS6), Q__NOTE(_CS5), E__NOTE(_CS5), E__NOTE(_DS6), Q__NOTE(_B4), E__NOTE(_B4), E__NOTE(_DS6), \ @@ -566,7 +565,7 @@ E__NOTE(_B5), E__NOTE(_DS7), Q__NOTE(_B5), E__NOTE(_B5), E__NOTE(_DS7), Q__NOTE(_AS5), E__NOTE(_AS5), \ E__NOTE(_DS7), Q__NOTE(_GS5), E__NOTE(_GS5), E__NOTE(_DS7), Q__NOTE(_G5), E__NOTE(_G5), E__NOTE(_DS7), \ Q__NOTE(_GS5), E__NOTE(_GS5), E__NOTE(_DS7), Q__NOTE(_AS5), E__NOTE(_AS5), E__NOTE(_DS7), Q__NOTE(_DS5), \ - E__NOTE(_DS5), E__NOTE(_DS7), W__NOTE(_DS6), W__NOTE(_GS5), + E__NOTE(_DS5), E__NOTE(_DS7), W__NOTE(_DS6), W__NOTE(_GS5), #define MEGALOVANIA \ Q__NOTE(_D4), Q__NOTE(_D4), H__NOTE(_D5), HD_NOTE(_A4), H__NOTE(_AF4), H__NOTE(_G4), H__NOTE(_F4), \ @@ -595,7 +594,7 @@ H__NOTE(_A5), H__NOTE(_A5), W__NOTE(_B5), H__NOTE(_A5), H__NOTE(_B5), W__NOTE(_A5), W__NOTE(_A6), \ W__NOTE(_GS6), H__NOTE(_CS6), Q__NOTE(_E6), Q__NOTE(_CS6), W__NOTE(_B5), H__NOTE(_B5), H__NOTE(_CS6), \ W__NOTE(_B5), H__NOTE(_A5), Q__NOTE(_B5), BD_NOTE(_A5), - + #define LIEBESLEID \ Q__NOTE(_E4), Q__NOTE(_DS4), Q__NOTE(_E4), Q__NOTE(_F4), Q__NOTE(_E4), Q__NOTE(_FS4), Q__NOTE(_EF4), Q__NOTE(_G4), Q__NOTE(_D4), \ Q__NOTE(_GS4), Q__NOTE(_CS4), W__NOTE(_A4), H__NOTE(_E5), H__NOTE(_E5), HD_NOTE(_G4), Q__NOTE(_E5), E__NOTE(_E5), \ @@ -605,8 +604,8 @@ Q__NOTE(_C5), E__NOTE(_C5), E__NOTE(_D5), E__NOTE(_C5), HD_NOTE(_BF4), Q__NOTE(_C5), H__NOTE(_D5), H__NOTE(_FS4), \ H__NOTE(_F4), HD_NOTE(_E4), Q__NOTE(_A4), HD_NOTE(_FS4), Q__NOTE(_A4), HD_NOTE(_GS4), Q__NOTE(_B4), Q__NOTE(_A4), \ Q__NOTE(_E4), Q__NOTE(_DS4), Q__NOTE(_E4), Q__NOTE(_F4), Q__NOTE(_D4), Q__NOTE(_FS4), Q__NOTE(_CS4), Q__NOTE(_G4), \ - Q__NOTE(_C4), Q__NOTE(_GS4), Q__NOTE(_D4), WD_NOTE(_A4), - + Q__NOTE(_C4), Q__NOTE(_GS4), Q__NOTE(_D4), WD_NOTE(_A4), + #define MELODIES_OF_LIFE \ H__NOTE(_B5), W__NOTE(_GS6), H__NOTE(_GS6), H__NOTE(_FS6), W__NOTE(_E6), H__NOTE(_E6), H__NOTE(_DS6), H__NOTE(_CS6), H__NOTE(_DS6), \ H__NOTE(_E6), H__NOTE(_FS6), WD_NOTE(_B5), H__NOTE(_B5), H__NOTE(_CS6), H__NOTE(_DS6), H__NOTE(_E6), H__NOTE(_CS6), \ @@ -614,7 +613,7 @@ WD_NOTE(_FS6), H__NOTE(_GS6), WD_NOTE(_B6), H__NOTE(_CS7), H__NOTE(_B6), H__NOTE(_A6), H__NOTE(_A6), H__NOTE(_GS6), \ H__NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_FS6), H__NOTE(_GS6), WD_NOTE(_A6), Q__NOTE(_GS6), Q__NOTE(_FS6), Q__NOTE(_FS6), \ Q__NOTE(_E6), W__NOTE(_E6), Q__NOTE(_B5), Q__NOTE(_CS6), WD_NOTE(_E6), Q__NOTE(_E6), Q__NOTE(_FS6), W__NOTE(_GS6), \ - H__NOTE(_A6), B__NOTE(_FS6), + H__NOTE(_A6), B__NOTE(_FS6), #define EYES_ON_ME \ Q__NOTE(_A6), Q__NOTE(_G6), Q__NOTE(_FS6), Q__NOTE(_D6), Q__NOTE(_A5), Q__NOTE(_G5), Q__NOTE(_FS5), Q__NOTE(_D5), \ @@ -640,7 +639,7 @@ W__NOTE(_G6), H__NOTE(_AF6), W__NOTE(_G6), H__NOTE(_AF6), H__NOTE(_G6), H__NOTE(_F6), H__NOTE(_D6), H__NOTE(_D6), \ H__NOTE(_EF6), B__NOTE(_EF6), WD_NOTE(_E6), H__NOTE(_E6), H__NOTE(_F6), H__NOTE(_G6), H__NOTE(_BF6), H__NOTE(_AF6), \ W__NOTE(_AF6), H__NOTE(_C6), H__NOTE(_AF6), H__NOTE(_G6), W__NOTE(_G6), H__NOTE(_F6), H__NOTE(_D6), BD_NOTE(_EF6), \ - WD_NOTE(_F6), WD_NOTE(_G6), BD_NOTE(_C7), + WD_NOTE(_F6), WD_NOTE(_G6), BD_NOTE(_C7), #define NIER_AMUSEMENT_PARK \ H__NOTE(_D5), E__NOTE(_G6), E__NOTE(_GF6), Q__NOTE(_F6), Q__NOTE(_E6), Q__NOTE(_EF6), Q__NOTE(_DF6), Q__NOTE(_EF6), WD_NOTE(_D6), \ @@ -656,7 +655,7 @@ H__NOTE(_EF5), H__NOTE(_F5), W__NOTE(_D5), W__NOTE(_BF5), W__NOTE(_G5), W__NOTE(_D5), W__NOTE(_EF5), QD_NOTE(_C5), \ QD_NOTE(_D5), Q__NOTE(_EF5), H__NOTE(_G5), H__NOTE(_F5), H__NOTE(_EF5), H__NOTE(_F5), B__NOTE(_D5), B__NOTE(_BF4), \ B__NOTE(_C5), H__NOTE(_C5), H__NOTE(_D5), H__NOTE(_EF5), H__NOTE(_F5), WD_NOTE(_G5), H__NOTE(_C5), W__NOTE(_AF5), \ - WD_NOTE(_G5), + WD_NOTE(_G5), #define COPIED_CITY \ Q__NOTE(_F6), Q__NOTE(_BF5), Q__NOTE(_EF6), Q__NOTE(_G5), Q__NOTE(_AF5), Q__NOTE(_G6), Q__NOTE(_AF6), Q__NOTE(_EF6), Q__NOTE(_BF5), \ @@ -670,7 +669,7 @@ Q__NOTE(_F4), Q__NOTE(_G4), H__NOTE(_AF4), Q__NOTE(_C5), Q__NOTE(_EF5), Q__NOTE(_F5), Q__NOTE(_C5), Q__NOTE(_EF5), \ Q__NOTE(_F5), Q__NOTE(_G5), Q__NOTE(_BF5), Q__NOTE(_AF5), Q__NOTE(_G5), Q__NOTE(_EF5), Q__NOTE(_F5), Q__NOTE(_C5), \ Q__NOTE(_AF4), Q__NOTE(_F5), Q__NOTE(_G5), Q__NOTE(_AF5), Q__NOTE(_G5), Q__NOTE(_F5), Q__NOTE(_EF5), Q__NOTE(_F5), \ - Q__NOTE(_G5), Q__NOTE(_BF5), Q__NOTE(_C6), Q__NOTE(_G6), Q__NOTE(_EF6), WD_NOTE(_F7), + Q__NOTE(_G5), Q__NOTE(_BF5), Q__NOTE(_C6), Q__NOTE(_G6), Q__NOTE(_EF6), WD_NOTE(_F7), #define VAGUE_HOPE_COLD_RAIN \ HD_NOTE(_D6), HD_NOTE(_E6), HD_NOTE(_CS6), HD_NOTE(_D6), HD_NOTE(_B5), Q__NOTE(_B5), Q__NOTE(_CS6), Q__NOTE(_D6), WD_NOTE(_A6), \ @@ -685,7 +684,7 @@ W__NOTE(_FS5), HD_NOTE(_FS6), HD_NOTE(_B5), H__NOTE(_D6), H__NOTE(_CS6), H__NOTE(_E6), HD_NOTE(_A6), HD_NOTE(_E6), \ W__NOTE(_D6), Q__NOTE(_CS6), Q__NOTE(_D6), HD_NOTE(_E6), HD_NOTE(_FS6), WD_NOTE(_B6), HD_NOTE(_E6), HD_NOTE(_FS6), \ HD_NOTE(_B5), Q__NOTE(_B5), Q__NOTE(_B5), Q__NOTE(_CS6), H__NOTE(_D6), H__NOTE(_E6), H__NOTE(_FS6), HD_NOTE(_E6), \ - HD_NOTE(_CS6), H__NOTE(_FS6), H__NOTE(_A6), H__NOTE(_B6), W__NOTE(_A6), H__NOTE(_FS6), BD_NOTE(_B6), + HD_NOTE(_CS6), H__NOTE(_FS6), H__NOTE(_A6), H__NOTE(_B6), W__NOTE(_A6), H__NOTE(_FS6), BD_NOTE(_B6), #define KAINE_SALVATION \ BD_NOTE(_D5), W__NOTE(_BF4), W__NOTE(_C5), W__NOTE(_F5), BD_NOTE(_D5), BD_NOTE(_BF4), BD_NOTE(_C5), W__NOTE(_BF4), W__NOTE(_C5), \ @@ -711,7 +710,7 @@ Q__NOTE(_F6), H__NOTE(_E6), H__NOTE(_F6), HD_NOTE(_E6), H__NOTE(_D6), H__NOTE(_C6), H__NOTE(_D6), BD_NOTE(_D6), \ Q__NOTE(_E6), Q__NOTE(_D6), Q__NOTE(_C6), Q__NOTE(_B5), H__NOTE(_C6), Q__NOTE(_C6), H__NOTE(_C6), HD_NOTE(_C6), \ H__NOTE(_B5), H__NOTE(_C6), H__NOTE(_E6), H__NOTE(_G6), WD_NOTE(_G6), Q__NOTE(_C6), B__NOTE(_C6), H__NOTE(_B6), \ - Q__NOTE(_C7), BD_NOTE(_C7), + Q__NOTE(_C7), BD_NOTE(_C7), #define ISABELLAS_LULLABY \ W__NOTE(_BF4), B__NOTE(_D5), W__NOTE(_EF5), B__NOTE(_F5), W__NOTE(_BF5), B__NOTE(_AF5), W__NOTE(_GF5), BD_NOTE(_F5), B__NOTE(_CS5), \ @@ -739,7 +738,7 @@ E__NOTE(_GS4), E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_DS5), E__NOTE(_CS5), E__NOTE(_DS5), E__NOTE(_CS5), E__NOTE(_C5), \ E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_GS5), E__NOTE(_DS5), E__NOTE(_E5), E__NOTE(_DS5), E__NOTE(_REST), E__NOTE(_DS5), \ E__NOTE(_B5), E__NOTE(_AS5), E__NOTE(_GS5), E__NOTE(_REST), E__NOTE(_E6), E__NOTE(_DS6), E__NOTE(_CS6), E__NOTE(_B5), \ - E__NOTE(_AS5), E__NOTE(_GS5), E__NOTE(_REST), E__NOTE(_AS5), WD_NOTE(_GS5), + E__NOTE(_AS5), E__NOTE(_GS5), E__NOTE(_REST), E__NOTE(_AS5), WD_NOTE(_GS5), #define TERRAS_THEME \ Q__NOTE(_GS5), Q__NOTE(_AS5), Q__NOTE(_B5), Q__NOTE(_EF6), BD_NOTE(_B5), Q__NOTE(_AS5), Q__NOTE(_GS5), W__NOTE(_AS5), \ @@ -762,7 +761,7 @@ Q__NOTE(_E6), H__NOTE(_E6), H__NOTE(_E6), Q__NOTE(_E6), H__NOTE(_FS6), WD_NOTE(_E6), W__NOTE(_B6), W__NOTE(_GS6), \ W__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_E6), H__NOTE(_FS6), B__NOTE(_GS6), H__NOTE(_GS6), \ W__NOTE(_CS7), W__NOTE(_GS6), W__NOTE(_E6), H__NOTE(_GS6), H__NOTE(_GS6), HD_NOTE(_E6), H__NOTE(_E6), Q__NOTE(_E6), \ - H__NOTE(_FS6), WD_NOTE(_E6), + H__NOTE(_FS6), WD_NOTE(_E6), #define PLATINUM_DISCO \ H__NOTE(_DS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_AS6), H__NOTE(_DS6), H__NOTE(_FS6), W__NOTE(_GS6), H__NOTE(_DS6), H__NOTE(_FS6), \ @@ -778,7 +777,7 @@ WD_NOTE(_FS6), H__NOTE(_CS6), WD_NOTE(_DS6), H__NOTE(_CS6), WD_NOTE(_DS6), H__NOTE(_CS6), H__NOTE(_DS6), H__NOTE(_FS6), \ H__NOTE(_GS6), H__NOTE(_AS6), H__NOTE(_CS7), H__NOTE(_AS6), H__NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_DS6), W__NOTE(_FS6), \ H__NOTE(_CS6), H__NOTE(_DS6), W__NOTE(_FS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_FS6), \ - B__NOTE(_FS6), + B__NOTE(_FS6), #define NOCTURNE_OP_9_NO_1 \ H__NOTE(_BF5), H__NOTE(_C6), H__NOTE(_DF6), H__NOTE(_A5), H__NOTE(_BF5), H__NOTE(_GF5), W__NOTE(_F5), W__NOTE(_F5), W__NOTE(_F5), \ @@ -790,6 +789,6 @@ B__NOTE(_DF5), W__NOTE(_BF4), W__NOTE(_BF5), W__NOTE(_BF5), W__NOTE(_BF5), BD_NOTE(_AF5), W__NOTE(_DF5), H__NOTE(_BF4), \ H__NOTE(_C5), H__NOTE(_DF5), H__NOTE(_GF5), H__NOTE(_GF5), BD_NOTE(_F5), W__NOTE(_EF5), H__NOTE(_F5), H__NOTE(_EF5), \ H__NOTE(_DF5), H__NOTE(_A4), B__NOTE(_AF4), W__NOTE(_DF5), W__NOTE(_EF5), H__NOTE(_F5), H__NOTE(_EF5), H__NOTE(_DF5), \ - H__NOTE(_EF5), BD_NOTE(_F5), + H__NOTE(_EF5), BD_NOTE(_F5), #endif diff --git a/users/pvinis/config.h b/users/pvinis/config.h new file mode 100644 index 000000000..7f17f2d02 --- /dev/null +++ b/users/pvinis/config.h @@ -0,0 +1,9 @@ +#pragma once + +#ifdef AUDIO_ENABLE +// #define STARTUP_SONG SONG(SONIC_RING) +#endif + +// allow rolling when keys have hold functionality +#define IGNORE_MOD_TAP_INTERRUPT +// #define TAPPING_TERM 150 diff --git a/users/pvinis/pvinis.c b/users/pvinis/pvinis.c new file mode 100644 index 000000000..754403579 --- /dev/null +++ b/users/pvinis/pvinis.c @@ -0,0 +1,79 @@ +#include "pvinis.h" +#include "version.h" + +#ifdef AUDIO_ENABLE +#include "audio.h" +#endif // AUDIO_ENABLE + + +#ifdef AUDIO_ENABLE +// float tone_katamari_rolling_star[][2] = SONG(KATAMARI_ROLLING_STAR); +#endif // AUDIO_ENABLE + + +// SYMBOL + SYSCTL = KBCTL +uint32_t layer_state_set_user(uint32_t state) { + uint32_t intermediate_state = update_tri_layer_state(state, LR_SYMBOL, LR_SYSCTL, LR_KBCTL); + intermediate_state = layer_state_set_user_local(intermediate_state); + return intermediate_state; +} + + +// functions for the individual keymaps to implement if they need something extra +__attribute__ ((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + + +// handle my own keycodes +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + + case PV_VRSN: + if (record->event.pressed) { + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + + case PV_MAKE: + if (!record->event.pressed) { + SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP +#if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) + ":dfu" +#elif defined(BOOTLOADER_HALFKAY) + ":teensy" +#elif defined(BOOTLOADER_CATERINA) + ":avrdude" +#endif + SS_TAP(X_ENTER) + ); + } + return false; + + case PV_FLSH: + reset_keyboard(); + return false; + + case PV_KTMR: + if (record->event.pressed) { +#ifdef AUDIO_ENABLE + // PLAY_SONG(tone_katamari_rolling_star); +#endif + } + return false; + } + return process_record_keymap(keycode, record); +} + + +#ifdef TAP_DANCE_ENABLE +qk_tap_dance_action_t tap_dance_actions[] = { +}; +#endif // TAP_DANCE_ENABLE + + +// init stuff +void keyboard_post_init_user(void) { + keyboard_post_init_user_local(); +} diff --git a/users/pvinis/pvinis.h b/users/pvinis/pvinis.h new file mode 100644 index 000000000..0c5e2841a --- /dev/null +++ b/users/pvinis/pvinis.h @@ -0,0 +1,152 @@ +#pragma once + +#include "quantum.h" + + +// my own keycodes +enum userspace_custom_keycodes { + PV_ = SAFE_RANGE, + + PV_VRSN, // prints firmware version + PV_MAKE, // prints the make command of the keyboard + PV_FLSH, // resets keyboard + PV_KTMR, // play katamari music + + PV_SAFE_RANGE, // used for extra keycodes in the individual keymaps +}; + +enum tap_dance_indexes { + // tap dance + TD_FLSH, // flash keyboard (as if the physical flash key was pressed) +}; + +#define ALLM(kc) LCAG(kc) // easier name for left ctrl-alt-gui +#define PV_ESCC CTL_T(KC_ESC) // esc on tap, ctrl on hold +#define PV_LOCK LCTL(LSFT(KC_PWR)) // lock computer +#define TD_3FLS TD(TD_FLSH) // tap dance 3 times for flash + + +// layers +enum { + LR_BASE = 0, // used for basic keys like the surrounding ctrl, cmd, etc + + LR_QWERTY, + LR_CARPALX, + + LR_SYMBOL, // symbol input (!, @, #, etc) + LR_SYSCTL, // system control (music, volume, keyboard flash, etc) + LR_KBCTL, // keyboard control (version, make, flash, etc) +}; + + +// layer switchers +#define BASE TO(LR_BASE) +#define QWERTY TO(LR_QWERTY) +#define CARPALX TO(LR_CARPALX) + +#define SYMBOL MO(LR_SYMBOL) +#define SYSCTL MO(LR_SYSCTL) +#define KBCTL MO(LR_KBCTL) + + +// layout parts for easy reuse between keyboard keymaps + +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +// | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +#define ________________NUMBERS_L__________________ KC_1, KC_2, KC_3, KC_4, KC_5 +#define ________________NUMBERS_R__________________ KC_6, KC_7, KC_8, KC_9, KC_0 + +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +// | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +#define ______________________F_L__________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 +#define ______________________F_R__________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 + +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +// | Q | W | E | R | T | | Y | U | I | O | P | +// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, +// | A | S | D | F | G | | H | J | K | L | ; | +// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, +// | Z | X | C | V | B | | N | M | , | . | / | +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +#define _________________QWERTY_L1_________________ KC_Q , KC_W , KC_E , KC_R , KC_T +#define _________________QWERTY_L2_________________ KC_A , KC_S , KC_D , KC_F , KC_G +#define _________________QWERTY_L3_________________ KC_Z , KC_X , KC_C , KC_V , KC_B + +#define _________________QWERTY_R1_________________ KC_Y , KC_U , KC_I , KC_O , KC_P +#define _________________QWERTY_R2_________________ KC_H , KC_J , KC_K , KC_L , KC_SCLN +#define _________________QWERTY_R3_________________ KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH + +#define _____________MOD_QWERTY_L2_________________ KC_A , SFT_T(KC_S), GUI_T(KC_D), KC_F , KC_G +#define _____________MOD_QWERTY_R2_________________ KC_H , KC_J , GUI_T(KC_K), SFT_T(KC_L), KC_SCLN + +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +// | Q | G | M | L | W | | Y | F | I | O | P | +// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, +// | D | S | T | N | R | | I | A | K | L | ; | +// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, +// | Z | X | C | V | J | | K | P | , | . | / | +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +#define ________________CARPALX_L1_________________ KC_Q , KC_G , KC_M , KC_L , KC_W +#define ________________CARPALX_L2_________________ KC_D , KC_S , KC_T , KC_N , KC_R +#define ________________CARPALX_L3_________________ KC_Z , KC_X , KC_C , KC_V , KC_J + +#define ________________CARPALX_R1_________________ KC_Y , KC_F , KC_U , KC_B , KC_SCLN +#define ________________CARPALX_R2_________________ KC_I , KC_A , KC_E , KC_O , KC_H +#define ________________CARPALX_R3_________________ KC_K , KC_P , KC_COMM, KC_DOT , KC_SLSH + +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +// | ! | @ | { | } | _ | | \ | | ` | | | +// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, +// | # | $ | ( | ) | - | | = | & | ' | " | | | +// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, +// | % | ^ | [ | ] | + | | * | ~ | < | > | / | +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +#define _________________SYMBOL_L1_________________ KC_EXLM, KC_AT , KC_LCBR, KC_RCBR, KC_UNDS +#define _________________SYMBOL_L2_________________ KC_HASH, KC_DLR , KC_LPRN, KC_RPRN, KC_MINS +#define _________________SYMBOL_L3_________________ KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_PLUS + +#define _________________SYMBOL_R1_________________ KC_BSLS, _______, KC_GRV , _______, _______ +#define _________________SYMBOL_R2_________________ KC_EQL , KC_AMPR, KC_QUOT, KC_DQUO, KC_PIPE +#define _________________SYMBOL_R3_________________ KC_ASTR, KC_TILD, KC_LABK, KC_RABK, KC_SLSH + +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +// | | | | | | |MUTE |HOME | ^ | END | | +// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, +// | | | | | | |VOLUP| < | v | > | | +// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, +// | | | | | | |VOLDN|MPREV|MPLAY|MNEXT| | +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +#define _________________SYSCTL_L1_________________ +#define _________________SYSCTL_L2_________________ +#define _________________SYSCTL_L3_________________ + +// vol v ctl v +#define _________________SYSCTL_R1_________________ KC_MUTE , KC_HOME , KC_UP , KC_END , PV_LOCK +#define _________________SYSCTL_R2_________________ KC_VOLU , KC_LEFT , KC_DOWN , KC_RGHT /* < arrows */ , KC_SLEP +#define _________________SYSCTL_R3_________________ KC_VOLD , KC_MPRV , KC_MPLY , KC_MNXT /* < music */ , KC_PWR + +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +// |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| +// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, +// |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| |XXXXX|VERSN|MAKE |FLASH|XXXXX| +// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, +// |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +#define __________________KBCTL_L1_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +#define __________________KBCTL_L2_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +#define __________________KBCTL_L3_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + +#define __________________KBCTL_R1_________________ XXXXXXX, XXXXXXX, XXXXXXX, PV_KTMR, XXXXXXX +#define __________________KBCTL_R2_________________ XXXXXXX, PV_VRSN, PV_MAKE, PV_FLSH, XXXXXXX +#define __________________KBCTL_R3_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + +// we need wrappers in order for these definitions, because they need to be expanded before being used as arguments to the LAYOUT_xxx macro +#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__) +#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) + + +// extra stuff that might be needed +void keyboard_post_init_user_local(void); +uint32_t layer_state_set_user_local(uint32_t state); diff --git a/users/pvinis/rules.mk b/users/pvinis/rules.mk new file mode 100644 index 000000000..da10cc743 --- /dev/null +++ b/users/pvinis/rules.mk @@ -0,0 +1,15 @@ +# add userspace file +SRC += pvinis.c + +AUDIO_ENABLE = no # piezo speaker sounds +RGBLIGHT_ENABLE = no # rgb leds underlight +TAP_DANCE_ENABLE = yes +BACKLIGHT_ENABLE = no # leds under keycaps +#MOUSEKEY_ENABLE = no +#SLEEP_LED_ENABLE = no # no led blinking while sleeping +#NKRO_ENABLE = yes + +# make firmware smaller +LINK_TIME_OPTIMIZATION_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = no From 93a97ec6e5a8f193bb96bba1636b7f67cd47d3fc Mon Sep 17 00:00:00 2001 From: zvecr Date: Tue, 14 May 2019 20:05:09 +0100 Subject: [PATCH 024/341] Fix arch installs as 8.1 is unavailable and #5456 has been merged (#5857) --- util/linux_install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/util/linux_install.sh b/util/linux_install.sh index 5e2afe999..df7039e09 100755 --- a/util/linux_install.sh +++ b/util/linux_install.sh @@ -54,8 +54,7 @@ elif grep ID /etc/os-release | grep -qE 'debian|ubuntu'; then zip elif grep ID /etc/os-release | grep -q 'arch\|manjaro'; then - # install avr-gcc 8.1 until 8.3 is available. See #3657 for details of the bug. - sudo pacman -U https://archive.archlinux.org/packages/a/avr-gcc/avr-gcc-8.1.0-1-x86_64.pkg.tar.xz + sudo pacman -U https://archive.archlinux.org/packages/a/avr-gcc/avr-gcc-8.3.0-1-x86_64.pkg.tar.xz sudo pacman -S \ arm-none-eabi-binutils \ arm-none-eabi-gcc \ From 7c0f2ae6d1c1d3f168a5919287b6608b092b3dba Mon Sep 17 00:00:00 2001 From: Morton Jonuschat Date: Tue, 14 May 2019 12:12:29 -0700 Subject: [PATCH 025/341] [Keymap] Neo2 for ErgoDox on MacOS US QWERTY / ABC Extended keymap (#5862) This is a Neo2 inspired layout that is meant to be fully usable on MacOS when used with the default US QWERTY/ABC Extended keymap. Neo2 layers 1-4 have been almost fully implemented in hardware. Layers 5 and 6 (greek and mathematical symbols) have been left out for now as most of them aren't available on the default keymaps. Layer toggling for layer 3 on the right hand side utilizes a tap-toggle approach that is a combination of MO & LT macros. This is required to allow sending Y when tapped, @ when tapped while the SHIFT modifier is active and support momentarily toggling the layer while the key is held. --- layouts/community/ergodox/osx_neo2/keymap.c | 694 ++++++++++++++++++ layouts/community/ergodox/osx_neo2/layers.h | 9 + layouts/community/ergodox/osx_neo2/readme.md | 219 ++++++ .../community/ergodox/osx_neo2/visualizer.c | 47 ++ 4 files changed, 969 insertions(+) create mode 100644 layouts/community/ergodox/osx_neo2/keymap.c create mode 100644 layouts/community/ergodox/osx_neo2/layers.h create mode 100644 layouts/community/ergodox/osx_neo2/readme.md create mode 100644 layouts/community/ergodox/osx_neo2/visualizer.c diff --git a/layouts/community/ergodox/osx_neo2/keymap.c b/layouts/community/ergodox/osx_neo2/keymap.c new file mode 100644 index 000000000..9e379c73f --- /dev/null +++ b/layouts/community/ergodox/osx_neo2/keymap.c @@ -0,0 +1,694 @@ +#include QMK_KEYBOARD_H +#include "layers.h" +#include "version.h" + +// Timer to detect tap/hold on NEO_RMOD3 key +static uint16_t neo3_timer; +// State bitmap to track which key(s) enabled NEO_3 layer +static uint8_t neo3_state = 0; +// State bitmap to track key combo for CAPSLOCK +static uint8_t capslock_state = 0; + +// bitmasks for modifier keys +#define MOD_MASK_NONE 0 + +// Used to trigger macros / sequences of keypresses +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + US_OSX_SMALL_UE, + US_OSX_SMALL_AE, + US_OSX_SMALL_OE, + US_OSX_CAPITAL_UE, + US_OSX_CAPITAL_AE, + US_OSX_CAPITAL_OE, + NEO2_LMOD3, + NEO2_RMOD3, + NEO2_1, + NEO2_2, + NEO2_3, + NEO2_4, + NEO2_5, + NEO2_6, + NEO2_7, + NEO2_8, + NEO2_9, + NEO2_0, + NEO2_MINUS, + NEO2_UE, + NEO2_AE, + NEO2_OE, + NEO2_COMMA, + NEO2_DOT, + NEO2_SHARP_S +}; + +#define NEO2_LMOD4 TT(NEO_4) +#define NEO2_RMOD4 NEO2_LMOD4 + +// NEO_3 special characters +#define US_OSX_SUPERSCRIPT_1 KC_NO // ¹ +#define US_OSX_SUPERSCRIPT_2 KC_NO // ² +#define US_OSX_SUPERSCRIPT_3 KC_NO // ³ +#define US_OSX_RSAQUO LALT(LSFT(KC_4)) // › +#define US_OSX_LSAQUO LALT(LSFT(KC_3)) // ‹ +#define US_OSX_CENT LALT(KC_4) // ¢ +#define US_OSX_YEN LALT(KC_Y) // ¥ +#define US_OSX_SBQUO LALT(LSFT(KC_0)) // ‚ +#define US_OSX_LEFT_SINGLE_QUOTE LALT(KC_RBRACKET) // ‘ +#define US_OSX_RIGHT_SINGLE_QUOTE LALT(LSFT(KC_RBRACKET)) // ’ +#define US_OSX_ELLIPSIS LALT(KC_SCOLON) // … +#define US_OSX_UNDERSCORE LSFT(KC_MINUS) // _ +#define US_OSX_LBRACKET KC_LBRACKET // [ +#define US_OSX_RBRACKET KC_RBRACKET // ] +#define US_OSX_CIRCUMFLEX LSFT(KC_6) // ^ +#define US_OSX_EXCLAMATION LSFT(KC_1) // ! +#define US_OSX_LESSTHAN LSFT(KC_COMMA) // < +#define US_OSX_GREATERTHAN LSFT(KC_DOT) // > +#define US_OSX_EQUAL KC_EQUAL // = +#define US_OSX_AMPERSAND LSFT(KC_7) // & +#define US_OSX_SMALL_LONG_S KC_NO // ſ +#define US_OSX_BSLASH KC_BSLASH +#define US_OSX_SLASH KC_SLASH // / +#define US_OSX_CLBRACKET LSFT(KC_LBRACKET) // { +#define US_OSX_CRBRACKET LSFT(KC_RBRACKET) // } +#define US_OSX_ASTERISK LSFT(KC_8) // * +#define US_OSX_QUESTIONMARK LSFT(KC_SLASH) // ? +#define US_OSX_LPARENTHESES LSFT(KC_9) // ( +#define US_OSX_RPARENTHESES LSFT(KC_0) // ) +#define US_OSX_HYPHEN_MINUS KC_MINUS // - +#define US_OSX_COLON LSFT(KC_SCOLON) // : +#define US_OSX_AT LSFT(KC_2) // @ +#define US_OSX_HASH LSFT(KC_3) // # +#define US_OSX_PIPE LSFT(KC_BSLASH) // | +#define US_OSX_TILDE LSFT(KC_GRAVE) // ~ +#define US_OSX_BACKTICK KC_GRAVE // ` +#define US_OSX_PLUS LSFT(KC_EQUAL) // + +#define US_OSX_PERCENT LSFT(KC_5) // % +#define US_OSX_DOUBLE_QUOTE LSFT(KC_QUOTE) // " +#define US_OSX_SINGLE_QUOTE KC_QUOTE // ' +#define US_OSX_SEMICOLON KC_SCOLON // ; + +// NEO_4 special characters +#define US_OSX_FEMININE_ORDINAL LALT(KC_9) // ª +#define US_OSX_MASCULINE_ORDINAL LALT(KC_0) // º +#define US_OSX_NUMERO_SIGN KC_NO // № +#define US_OSX_MIDDLE_DOT LALT(LSFT(KC_9)) // · +#define US_OSX_BRITISH_POUND LALT(KC_3) // £ +#define US_OSX_CURRENCY_SIGN KC_NO // ¤ +#define US_OSX_INV_EXCLAMATION LALT(KC_1) // ¡ +#define US_OSX_INV_QUESTIONMARK LALT(LSFT(KC_SLASH)) // ¿ +#define US_OSX_DOLLAR KC_DOLLAR // $ +#define US_OSX_EM_DASH LALT(LSFT(KC_MINUS)) // — + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* NEO_1: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ---- | 1/° | 2/§ | 3/ | 4/» | 5/« | ESC | | US_1 | 6/$ | 7/€ | 8/„ | 9/“ | 0/” | -/— | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | X | V | L | C | W | LCTL | | RCTL | K | H | G | F | Q | ß | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | NEO_3 | U | I | A | E | O |------| |------| S | N | R | T | D | Y | + * |--------+------+------+------+------+------| LALT | | RALT |------+------+------+------+------+--------| + * | LSHIFT | Ü | Ö | Ä | P | Z | | | | B | M | ,/– | ./• | J | RSHIFT | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | ---- | ---- | LCTL | LALT | LGUI | | RGUI | Left | Down | Up | Right| + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | FKEYS| Home | | PgUp | FKEYS| + * ,------|------|------| |------+------+------. + * | Back-| | End | | PgDn | | | + * | space|Delete|------| |------| Enter|Space | + * | | | NEO_4| | NEO_4| | | + * `--------------------' `--------------------' + */ + [NEO_1] = LAYOUT_ergodox( + // left hand side - main + KC_NO /* NOOP */, NEO2_1, NEO2_2, NEO2_3, NEO2_4, NEO2_5, KC_ESCAPE, + KC_TAB, KC_X, KC_V, KC_L, KC_C, KC_W, KC_LCTRL, + NEO2_LMOD3, KC_U, KC_I, KC_A, KC_E, KC_O, /* --- */ + KC_LSHIFT, NEO2_UE, NEO2_OE, NEO2_AE, KC_P, KC_Z, KC_LALT, + KC_NO /* NOOP */, KC_NO /* NOOP */, KC_LCTRL, KC_LALT, KC_LGUI, /* --- */ /* --- */ + + // left hand side - thumb cluster + /* --- */ MO(FKEYS), KC_HOME, + /* KC_BSPACE */ /* KC_DELETE */ KC_END, + KC_BSPACE, KC_DELETE, NEO2_LMOD4, + + // right hand side - main + TO(US_1), NEO2_6, NEO2_7, NEO2_8, NEO2_9, NEO2_0, NEO2_MINUS, + KC_RCTRL, KC_K, KC_H, KC_G, KC_F, KC_Q, NEO2_SHARP_S, + /* --- */ KC_S, KC_N, KC_R, KC_T, KC_D, NEO2_RMOD3, + KC_RALT, KC_B, KC_M, NEO2_COMMA, NEO2_DOT, KC_J, KC_RSHIFT, + /* --- */ /* --- */ KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, + + // right hand side - thumb cluster + KC_PGUP, MO(FKEYS), /* --- */ + KC_PGDOWN, /* --- */ /* --- */ + NEO2_RMOD4, KC_ENTER, KC_SPACE + ), + + /* NEO_3: Symbol layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ---- | ---- | ---- | ---- | › | ‹ | | | | ¢ | ¥ | ‚ | ‘ | ’ | ---- | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | ---- | … | _ | [ | ] | ^ | | | | ! | < | > | = | & | ---- | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | \ | / | { | } | * |------| |------| ? | ( | ) | - | : | @ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | | | ~ | ` | | | | + | % | " | ' | ; | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ + [NEO_3] = LAYOUT_ergodox( + // left hand side - main + KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, US_OSX_RSAQUO, US_OSX_LSAQUO, _______, + KC_NO /* NOOP */, US_OSX_ELLIPSIS, US_OSX_UNDERSCORE, US_OSX_LBRACKET, US_OSX_RBRACKET, US_OSX_CIRCUMFLEX, _______, + _______, US_OSX_BSLASH, US_OSX_SLASH, US_OSX_CLBRACKET, US_OSX_CRBRACKET, US_OSX_ASTERISK, /* --- */ + _______, US_OSX_HASH, US_OSX_DOLLAR, US_OSX_PIPE, US_OSX_TILDE, US_OSX_BACKTICK, _______, + _______, _______, _______, _______, _______, /* --- */ /* --- */ + + // left hand side - thumb cluster + /* --- */ _______, _______, + /* --- */ /* --- */ _______, + _______, _______, _______, + + // right hand side - main + _______, US_OSX_CENT, US_OSX_YEN, US_OSX_SBQUO, US_OSX_LEFT_SINGLE_QUOTE, US_OSX_RIGHT_SINGLE_QUOTE, KC_NO, + _______, US_OSX_EXCLAMATION, US_OSX_LESSTHAN, US_OSX_GREATERTHAN, US_OSX_EQUAL, US_OSX_AMPERSAND, US_OSX_SMALL_LONG_S, + /* --- */ US_OSX_QUESTIONMARK, US_OSX_LPARENTHESES, US_OSX_RPARENTHESES, US_OSX_HYPHEN_MINUS, US_OSX_COLON, NEO2_RMOD3, + _______, US_OSX_PLUS, US_OSX_PERCENT, US_OSX_DOUBLE_QUOTE, US_OSX_SINGLE_QUOTE, US_OSX_SEMICOLON, _______, + /* --- */ /* --- */ _______, _______, _______, _______, _______, + + // right hand side - thumb cluster + _______, _______, /* --- */ + _______, /* --- */ /* --- */ + _______, _______, _______ + ), + + /* NEO_4: Cursor & Numpad + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ---- | ª | º | ---- | · | £ | | | | ---- | Tab | / | * | - | ---- | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | ---- | PgUp | ⌫ | Up | ⌦ | PgDn | | | | ¡ | 7 | 8 | 9 | + | – | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | Home | Left | Down | Right| End |------| |------| ¿ | 4 | 5 | 6 | , | . | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | Esc | Tab | Ins |Return| ---- | | | | : | 1 | 2 | 3 | ; | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | 0 | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ + [NEO_4] = LAYOUT_ergodox( + // left hand side - main + KC_NO /* NOOP */, US_OSX_FEMININE_ORDINAL, US_OSX_MASCULINE_ORDINAL, KC_NO /* NOOP */, US_OSX_MIDDLE_DOT, US_OSX_BRITISH_POUND, _______, + _______, KC_PGUP, KC_BSPACE, KC_UP, KC_DELETE, KC_PGDOWN, _______, + _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_END, /* --- */ + _______, KC_ESCAPE, KC_TAB, KC_INSERT, KC_ENTER, KC_NO /* NOOP */, _______, + _______, _______, _______, _______, _______, /* --- */ /* --- */ + + // left hand side - thumb cluster + /* --- */ _______, _______, + /* --- */ /* --- */ _______, + _______, _______, _______, + + // right hand side - main + _______, US_OSX_CURRENCY_SIGN, KC_TAB, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_NO /* NOOP */, + _______, US_OSX_INV_EXCLAMATION, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, US_OSX_EM_DASH, + /* --- */ US_OSX_INV_QUESTIONMARK, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_COMMA, KC_KP_DOT, + _______, US_OSX_COLON, KC_KP_1, KC_KP_2, KC_KP_3, US_OSX_SEMICOLON, _______, + /* --- */ /* --- */ _______, KC_KP_0, _______, _______, _______, + + // right hand side - thumb cluster + _______, _______, /* --- */ + _______, /* --- */ /* --- */ + _______, _______, _______ + ), + + /* NEO_5: Greek + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | ---- | ----| ---- | ---- | ---- |------| |------| ---- | ---- | ---- | ---- | ---- | ---- | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | ---- | ----| ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ + [NEO_5] = LAYOUT_ergodox( + // left hand side - main + KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, _______, + KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, _______, + _______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, /* --- */ + _______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, _______, + _______, _______, _______, _______, _______, /* --- */ /* --- */ + + // left hand side - thumb cluster + /* --- */ _______, _______, + /* --- */ /* --- */ _______, + _______, _______, _______, + + // right hand side - main + _______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, + _______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, + /* --- */ KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, + _______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, _______, + /* --- */ /* --- */ _______, _______, _______, _______, _______, + + // right hand side - thumb cluster + _______, _______, /* --- */ + _______, /* --- */ /* --- */ + _______, _______, _______ + ), + + /* NEO_6: Math symbols + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | ---- | ----| ---- | ---- | ---- |------| |------| ---- | ---- | ---- | ---- | ---- | ---- | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | ---- | ----| ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ + [NEO_6] = LAYOUT_ergodox( + // left hand side - main + KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, _______, + KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, _______, + _______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, /* --- */ + _______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, _______, + _______, _______, _______, _______, _______, /* --- */ /* --- */ + + // left hand side - thumb cluster + /* --- */ _______, _______, + /* --- */ /* --- */ _______, + _______, _______, _______, + + // right hand side - main + _______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, + _______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, + /* --- */ KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, + _______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, _______, + /* --- */ /* --- */ _______, _______, _______, _______, _______, + + // right hand side - thumb cluster + _______, _______, /* --- */ + _______, /* --- */ /* --- */ + _______, _______, _______ + ), + + /* US_1: US QWERTY + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | ESC | | NEO_1| 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | \ | Q | W | E | R | T | ---- | | [ | Y | U | I | O | P | ] | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | TAB | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| ---- | | ---- |------+------+------+------+------+--------| + * | LSHIFT | Z | X | C | V | B | | | | N | M | , | . | / | RSHIFT | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LGUI | ` | ---- | ---- | FKEYS| | Left | Down | Up | Right| RGUI | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | LCTRL| LALT | | RALT | RCTRL| + * ,------|------|------| |------+------+------. + * | | | HOME | | PGUP | | | + * | BKSP | DEL |------| |------| ENTR | SPCE | + * | | | END | | PGDN | | | + * `--------------------' `--------------------' + */ + [US_1] = LAYOUT_ergodox( + // left hand side - main + KC_EQUAL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESCAPE, + KC_BSLASH, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO /* NOOP */, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, /* --- */ + KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_NO /* NOOP */, + KC_LGUI, KC_GRAVE, KC_NO, KC_NO, MO(FKEYS), /* --- */ /* --- */ + + // left hand side - thumb cluster + /* --- */ KC_LCTRL, KC_LALT, + /* --- */ /* --- */ KC_HOME, + KC_BSPACE, KC_DELETE, KC_END, + + // right hand side - main + TO(NEO_1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + KC_LBRACKET, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRACKET, + /* --- */ KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, + KC_NO /* NOOP */, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSHIFT, + /* --- */ /* --- */ KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_RGUI, + + // right hand side - thumb cluster + KC_RALT, KC_RCTRL, /* --- */ + KC_PGUP, /* --- */ /* --- */ + KC_PGDOWN, KC_ENTER, KC_SPACE + ), + + /* FKEYS: Function keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Prev | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | VolUp | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Play | | | | | | | | | | | | | | VolDn | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Next | | | | | |------| |------| | | | | | Mute | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ + [FKEYS] = LAYOUT_ergodox( + // left hand side - main + KC_MEDIA_REWIND, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, + KC_MEDIA_PLAY_PAUSE, _______, _______, _______, _______, _______, _______, + KC_MEDIA_FAST_FORWARD, _______, _______, _______, _______, _______, /* --- */ + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, /* --- */ /* --- */ + + // left hand side - thumb cluster + /* --- */ _______, _______, + /* --- */ /* --- */ _______, + _______, _______, _______, + + // right hand side - main + KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_AUDIO_VOL_UP, + _______, _______, _______, _______, _______, _______, KC_AUDIO_VOL_DOWN, + /* --- */ _______, _______, _______, _______, _______, KC_AUDIO_MUTE, + _______, _______, _______, _______, _______, _______, _______, + /* --- */ /* --- */ _______, _______, _______, _______, _______, + + // right hand side - thumb cluster + _______, _______, /* --- */ + _______, /* --- */ /* --- */ + _______, _______, _______ + ), +}; + +// Send a key tap with a optional set of modifiers. +void tap_with_modifiers(uint16_t keycode, uint8_t force_modifiers) { + uint8_t active_modifiers = get_mods(); + + if ((force_modifiers & MOD_MASK_SHIFT) && !(active_modifiers & MOD_MASK_SHIFT)) register_code(KC_LSFT); + if ((force_modifiers & MOD_MASK_CTRL) && !(active_modifiers & MOD_MASK_CTRL)) register_code(KC_LCTRL); + if ((force_modifiers & MOD_MASK_ALT) && !(active_modifiers & MOD_MASK_ALT)) register_code(KC_LALT); + if ((force_modifiers & MOD_MASK_GUI) && !(active_modifiers & MOD_MASK_GUI)) register_code(KC_LGUI); + + register_code(keycode); + unregister_code(keycode); + + if ((force_modifiers & MOD_MASK_SHIFT) && !(active_modifiers & MOD_MASK_SHIFT)) unregister_code(KC_LSFT); + if ((force_modifiers & MOD_MASK_CTRL) && !(active_modifiers & MOD_MASK_CTRL)) unregister_code(KC_LCTRL); + if ((force_modifiers & MOD_MASK_ALT) && !(active_modifiers & MOD_MASK_ALT)) unregister_code(KC_LALT); + if ((force_modifiers & MOD_MASK_GUI) && !(active_modifiers & MOD_MASK_GUI)) unregister_code(KC_LGUI); +} + +// Special remapping for keys with different keycodes/macros when used with shift modifiers. +bool process_record_user_shifted(uint16_t keycode, keyrecord_t *record) { + uint8_t active_modifiers = get_mods(); + uint8_t shifted = active_modifiers & MOD_MASK_SHIFT; + + // Early return on key release + if (!record->event.pressed) { + return true; + } + + if (shifted) { + clear_mods(); + + switch (keycode) { + case NEO2_1: + // degree symbol + SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_8) SS_UP(X_LSHIFT) SS_UP(X_LALT)); + break; + case NEO2_2: + // section symbol + SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_6) SS_UP(X_LALT)); + break; + case NEO2_3: + // There is no OSX key combination for the script small l character + break; + case NEO2_4: + // right angled quote + SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_BSLASH) SS_UP(X_LSHIFT) SS_UP(X_LALT)); + break; + case NEO2_5: + // left angled quote + SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_BSLASH) SS_UP(X_LALT)); + break; + case NEO2_6: + // dollar sign + SEND_STRING(SS_DOWN(X_LSHIFT) SS_TAP(X_4) SS_UP(X_LSHIFT)); + break; + case NEO2_7: + // euro sign + SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_2) SS_UP(X_LSHIFT) SS_UP(X_LALT)); + break; + case NEO2_8: + // low9 double quote + SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_W) SS_UP(X_LSHIFT) SS_UP(X_LALT)); + break; + case NEO2_9: + // left double quote + SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_LBRACKET) SS_UP(X_LALT)); + break; + case NEO2_0: + // right double quote + SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_LBRACKET) SS_UP(X_LSHIFT) SS_UP(X_LALT)); + break; + case NEO2_MINUS: + // em dash + SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_MINUS) SS_UP(X_LSHIFT) SS_UP(X_LALT)); + break; + case NEO2_COMMA: + // en dash + SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_MINUS) SS_UP(X_LALT)); + break; + case NEO2_DOT: + // bullet + SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_8) SS_UP(X_LALT)); + break; + case NEO2_SHARP_S: + // german sharp s + SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_S) SS_UP(X_LALT)); + break; + case NEO2_UE: + SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_U) SS_UP(X_LSHIFT)); + break; + case NEO2_OE: + SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_O) SS_UP(X_LSHIFT)); + break; + case NEO2_AE: + SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_A) SS_UP(X_LSHIFT)); + break; + default: + set_mods(active_modifiers); + return true; + } + + set_mods(active_modifiers); + return false; + } else { + switch (keycode) { + case NEO2_1: + SEND_STRING(SS_TAP(X_1)); + break; + case NEO2_2: + SEND_STRING(SS_TAP(X_2)); + break; + case NEO2_3: + SEND_STRING(SS_TAP(X_3)); + break; + case NEO2_4: + SEND_STRING(SS_TAP(X_4)); + break; + case NEO2_5: + SEND_STRING(SS_TAP(X_5)); + break; + case NEO2_6: + SEND_STRING(SS_TAP(X_6)); + break; + case NEO2_7: + SEND_STRING(SS_TAP(X_7)); + break; + case NEO2_8: + SEND_STRING(SS_TAP(X_8)); + break; + case NEO2_9: + SEND_STRING(SS_TAP(X_9)); + break; + case NEO2_0: + SEND_STRING(SS_TAP(X_0)); + break; + case NEO2_MINUS: + SEND_STRING(SS_TAP(X_MINUS)); + break; + case NEO2_COMMA: + SEND_STRING(SS_TAP(X_COMMA)); + break; + case NEO2_DOT: + SEND_STRING(SS_TAP(X_DOT)); + break; + case NEO2_SHARP_S: + // german sharp s + SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_S) SS_UP(X_LALT)); + break; + case NEO2_UE: + SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_TAP(X_U)); + break; + case NEO2_OE: + SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_TAP(X_O)); + break; + case NEO2_AE: + SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_TAP(X_A)); + break; + default: + return true; + } + + return false; + } +} + +// Runs for each key down or up event. +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_LSHIFT: + if (record->event.pressed) { + capslock_state |= (MOD_BIT(KC_LSHIFT)); + } else { + capslock_state &= ~(MOD_BIT(KC_LSHIFT)); + } + break; + case KC_RSHIFT: + if (record->event.pressed) { + capslock_state |= MOD_BIT(KC_RSHIFT); + } else { + capslock_state &= ~(MOD_BIT(KC_RSHIFT)); + } + break; + case NEO2_LMOD3: + if (record->event.pressed) { + layer_on(NEO_3); + neo3_state |= (1 << 1); + } else { + // Turn off NEO_3 layer unless it's enabled through NEO2_RMOD3 as well. + if ((neo3_state & ~(1 << 1)) == 0) { + layer_off(NEO_3); + } + neo3_state &= ~(1 << 1); + } + break; + case NEO2_RMOD3: + if (record->event.pressed) { + neo3_timer = timer_read(); + neo3_state |= (1 << 2); + layer_on(NEO_3); + } else { + // Turn off NEO_3 layer unless it's enabled through NEO2_LMOD3 as well. + if ((neo3_state & ~(1 << 2)) == 0) { + layer_off(NEO_3); + } + neo3_state &= ~(1 << 2); + + // Was the NEO2_RMOD3 key TAPPED? + if (timer_elapsed(neo3_timer) <= 150) { + if (neo3_state > 0) { + // We are still in NEO_3 layer, send keycode and modifiers for @ + tap_with_modifiers(KC_2, MOD_MASK_SHIFT); + return false; + } else { + // Do the normal key processing, send y + tap_with_modifiers(KC_Y, MOD_MASK_NONE); + return false; + } + } + } + break; + } + + if ((capslock_state & MOD_MASK_SHIFT) == MOD_MASK_SHIFT) { + // CAPSLOCK is currently active, disable it + if (host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK)) { + unregister_code(KC_LOCKING_CAPS); + } else { + register_code(KC_LOCKING_CAPS); + } + return false; + } + + return process_record_user_shifted(keycode, record); +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void){ + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } +}; diff --git a/layouts/community/ergodox/osx_neo2/layers.h b/layouts/community/ergodox/osx_neo2/layers.h new file mode 100644 index 000000000..a5e0cba00 --- /dev/null +++ b/layouts/community/ergodox/osx_neo2/layers.h @@ -0,0 +1,9 @@ +enum layers { + NEO_1, // layer_0 + NEO_3, // layer_1 + NEO_4, // layer_2 + NEO_5, // layer_3 + NEO_6, // layer_4 + US_1, // layer_5 + FKEYS // layer_6 +}; \ No newline at end of file diff --git a/layouts/community/ergodox/osx_neo2/readme.md b/layouts/community/ergodox/osx_neo2/readme.md new file mode 100644 index 000000000..cab4dfe70 --- /dev/null +++ b/layouts/community/ergodox/osx_neo2/readme.md @@ -0,0 +1,219 @@ +# Neo 2 for ErgoDox on QWERTY + +# Description + +The Neo layout is an optimized German keyboard layout developed by the +Neo Users Group, supporting many Latin-based alphabets. The positions +of the letters are not only optimized for German letter frequency, +but also for typical groups of two or three letters. English is +considered a primary target as well. + +The design tries to enforce the alternating usage of both hands to +increase typing speed and incorporates ideas from de-ergo and other +ergonomic layouts. High frequency keys are placed in the home row. +The current layout Neo 2.0 has unique features making it suited for +many target groups such as programmers, mathematicians, scientists or +LaTeX authors. + +Neo is grouped into six layers, each dedicated to a special purpose. + +# Layers + +At the core this is a Neo 2.0 layout adjusted for the Ergodox Infinity. +The keymap is laid out expecting a macOs using the US QWERTY or ABC +Extended layout. + +[Layer 1](#layer-1) Lowercase, upppercase and typographical characters + +[Layer 2](#layer-2) Special characters for programming + +[Layer 3](#layer-3) WASD-like movement keys and number block + +[Layer 4](#layer-4) Greek characters + +[Layer 5](#layer-5) Mathematical symbols and Greek uppercase characters + +[Layer 6](#layer-6) Ergodox Infinity US QWERTY layout + +[Layer 7](#layer-7) Function keys + +## Legend + + * Keys marked with `----` are dead keys. + * Blank keys are transparent and fall through to lower levels. + +## Layer 1 + +This layer implements NEO layers 1 and 2. + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| ---- | 1/° | 2/§ | 3/ | 4/» | 5/« | ESC | | US_1 | 6/$ | 7/€ | 8/„ | 9/“ | 0/” | -/— | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| TAB | X | V | L | C | W | LCTL | | RCTL | K | H | G | F | Q | ß | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| NEO_3 | U | I | A | E | O |------| |------| S | N | R | T | D | Y | +|--------+------+------+------+------+------| LALT | | RALT |------+------+------+------+------+--------| +| LSHIFT | Ü | Ö | Ä | P | Z | | | | B | M | ,/– | ./• | J | RSHIFT | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | ---- | ---- | LCTL | LALT | LGUI | | RGUI | Left | Down | Up | Right| + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | FKEYS| Home | | PgUp | FKEYS| + ,------|------|------| |------+------+------. + | Back-| | End | | PgDn | | | + | space|Delete|------| |------| Enter|Space | + | | | NEO_4| | NEO_4| | | + `--------------------' `--------------------' +``` + +## Layer 2 + +This layer implements NEO layer 3. + + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| ---- | ---- | ---- | ---- | › | ‹ | | | | ¢ | ¥ | ‚ | ‘ | ’ | ---- | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| ---- | … | _ | [ | ] | ^ | | | | ! | < | > | = | & | ---- | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | \ | / | { | } | * |------| |------| ? | ( | ) | - | : | @ | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | # | $ | | | ~ | ` | | | | + | % | " | ' | ; | | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------|------|------| |------+------+------. + | | | | | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `--------------------' +``` + +## Layer 3 + +This layer implements NEO layer 4. + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| ---- | ª | º | ---- | · | £ | | | | ---- | Tab | / | * | - | ---- | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| ---- | PgUp | ⌫ | Up | ⌦ | PgDn | | | | ¡ | 7 | 8 | 9 | + | – | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | Home | Left | Down | Right| End |------| |------| ¿ | 4 | 5 | 6 | , | . | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | Esc | Tab | Ins |Return| ---- | | | | : | 1 | 2 | 3 | ; | | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | | | | | 0 | | | | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------|------|------| |------+------+------. + | | | | | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `--------------------' +``` + +## Layer 4 + +This layer is currently empty/reserved for NEO layer 5. + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | ---- | ----| ---- | ---- | ---- |------| |------| ---- | ---- | ---- | ---- | ---- | ---- | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | ---- | ----| ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------|------|------| |------+------+------. + | | | | | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `--------------------' +``` + +## Layer 5 + +This layer is currently empty/reserved for NEO layer 6. + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | ---- | ----| ---- | ---- | ---- |------| |------| ---- | ---- | ---- | ---- | ---- | ---- | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | ---- | ----| ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------|------|------| |------+------+------. + | | | | | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `--------------------' +``` + +## Layer 6 + +A bare bones implementation of the default Ergodox Infinity layout. + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| = | 1 | 2 | 3 | 4 | 5 | ESC | | NEO_1| 6 | 7 | 8 | 9 | 0 | - | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| \ | Q | W | E | R | T | ---- | | [ | Y | U | I | O | P | ] | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| TAB | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | +|--------+------+------+------+------+------| ---- | | ---- |------+------+------+------+------+--------| +| LSHIFT | Z | X | V | B | M | | | | N | M | , | . | / | RSHIFT | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | LGUI | ` | ---- | ---- | FKEYS| | Left | Down | Up | Right| RGUI | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | LCTRL| LALT | | RALT | RCTRL| + ,------|------|------| |------+------+------. + | | | HOME | | PGUP | | | + | BKSP | DEL |------| |------| ENTR | SPCE | + | | | END | | PGDN | | | + `--------------------' `--------------------' +``` + +## Layer 7 + +This layer implements function and multimedia keys. + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| Prev | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | VolUp | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| Play | | | | | | | | | | | | | | VolDn | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| Next | | | | | |------| |------| | | | | | Mute | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | | | | | | | | | | | | | | | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------|------|------| |------+------+------. + | | | | | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `--------------------' +``` diff --git a/layouts/community/ergodox/osx_neo2/visualizer.c b/layouts/community/ergodox/osx_neo2/visualizer.c new file mode 100644 index 000000000..653201bb8 --- /dev/null +++ b/layouts/community/ergodox/osx_neo2/visualizer.c @@ -0,0 +1,47 @@ +#include "layers.h" +#include "simple_visualizer.h" +#include "util.h" + +static void get_visualizer_layer_and_color(visualizer_state_t *state) { + uint8_t layer = biton32(state->status.layer); + + // Go from highest to lowest layer to get the right text/color combination. + switch (layer) { + // #AEB2F4 / hsv(65.71%, 28.69%, 95.69%) + case FKEYS: + // #F4AEDC / hsv(89.05%, 28.69%, 95.69%) + state->layer_text = "FUNCTION KEYS"; + state->target_lcd_color = LCD_COLOR(228, 73, 245); + break; + case US_1: + // #F4B993 / hsv(6.53%, 39.75%, 95.69%) + state->layer_text = "QWERTY"; + state->target_lcd_color = LCD_COLOR(17, 102, 245); + break; + case NEO_6: + // #F4E393 / hsv(13.75%, 39.75%, 95.69%) + state->layer_text = "NEO: 6"; + state->target_lcd_color = LCD_COLOR(35, 102, 245); + break; + case NEO_5: + // #C6F493 / hsv(24.57%, 39.75%, 95.69%) + state->layer_text = "NEO: 5"; + state->target_lcd_color = LCD_COLOR(63, 102, 245); + break; + case NEO_4: + // #8EEBC9 / hsv(43.91%, 39.57%, 92.16%) + state->layer_text = "NEO: 4"; + state->target_lcd_color = LCD_COLOR(112, 101, 189); + break; + case NEO_3: + // #93D2F4 / hsv(55.84%, 39.75%, 95.69%) + state->layer_text = "NEO: 3"; + state->target_lcd_color = LCD_COLOR(143, 102, 245); + break; + default: + // #EEEEEE / hsv(0%, 0%, 93%) + state->layer_text = "NEO: 1"; + state->target_lcd_color = LCD_COLOR(0, 0, 255); + break; + } +} From fd0ba01d68b03945b87dcf0e95cf85afb99f034d Mon Sep 17 00:00:00 2001 From: Markus Dieckmann Date: Tue, 14 May 2019 21:27:49 +0200 Subject: [PATCH 026/341] [Keymap] Correction for DE_Simple keymap readme (#5870) Replaced erroneous second QWERTZ keymap with diagramm for 'Lower' layer. --- keyboards/lets_split/keymaps/DE_simple/readme.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/lets_split/keymaps/DE_simple/readme.md b/keyboards/lets_split/keymaps/DE_simple/readme.md index 972cd6c39..c5576d623 100644 --- a/keyboards/lets_split/keymaps/DE_simple/readme.md +++ b/keyboards/lets_split/keymaps/DE_simple/readme.md @@ -21,15 +21,15 @@ Layout `-----------------------------------------------------------------------------------' - Qwerty + Lower ,-----------------------------------------------------------------------------------. - | Esc | Q | W | E | R | T | Z | U | I | O | P | Bksp | + | ° | ! | " | § | $ | % | & | / | ( | ) | = | Bksp | |------+------+------+------+------+-------------+------+------+------+------+------| - | Tab | A | S | D | F | G | H | J | K | L | + | # | + | Del | F1 | F2 | F3 | F4 | F5 | F6 | @ | € | ü | ? | ´ | |------+------+------+------+------+------|------+------+------+------+------+------| - | Shift| Y | X | C | V | B | N | M | , | . | - |Enter | + | Shift| F7 | F8 | F9 | F10 | F11 | F12 | | | ö | ä | |Enter | |------+------+------+------+------+------+------+------+------+------+------+------| - | Ctrl | Alt | AltGr| GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + | | | | | | | | Next | Vol- | Vol+ | Play | `-----------------------------------------------------------------------------------' From 3220b2481967b024ca8c06714578ad35204a0de8 Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Tue, 14 May 2019 17:25:26 -0500 Subject: [PATCH 027/341] Update Zen rev2 info.json file with option positions (#5872) --- keyboards/rgbkb/zen/rev2/info.json | 32 ++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/keyboards/rgbkb/zen/rev2/info.json b/keyboards/rgbkb/zen/rev2/info.json index b3015388c..8ed12de2b 100644 --- a/keyboards/rgbkb/zen/rev2/info.json +++ b/keyboards/rgbkb/zen/rev2/info.json @@ -292,26 +292,22 @@ { "label": "k36", "x": 6, - "y": 4.5, - "h": 2 + "y": 4.5 }, { "label": "k26", "x": 7, - "y": 4.5, - "h": 2 + "y": 4.5 }, { "label": "k76", "x": 9, - "y": 4.5, - "h": 2 + "y": 4.5 }, { "label": "k86", "x": 10, - "y": 4.5, - "h": 2 + "y": 4.5 }, { "label": "k94", @@ -338,6 +334,26 @@ "x": 15.5, "y": 4, "w": 1.5 + }, + { + "label": "k45", + "x": 6, + "y": 5.5 + }, + { + "label": "k46", + "x": 7, + "y": 5.5 + }, + { + "label": "k96", + "x": 9, + "y": 5.5 + }, + { + "label": "k95", + "x": 10, + "y": 5.5 } ] } From 4ed474b66a5bcb3ea401c4bc76bd736c7db55e58 Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 15 May 2019 02:00:31 +0200 Subject: [PATCH 028/341] [Keyboard] Add Keycapsss O4L 5x12 keyboard (#5859) * [Keyboard] Add Keycapsss O4L 5x12 keyboard * Fix layout error in rules.mk * Update keyboards/keycapsss/o4l_5x12/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/keycapsss/o4l_5x12/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/keycapsss/o4l_5x12/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/keycapsss/o4l_5x12/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/keycapsss/o4l_5x12/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/keycapsss/o4l_5x12/config.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Remove trailing backslashes * Add additional infos to the readme * Remove remaining backslashes * Change 2x2y layout to my needs * Update keyboards/keycapsss/o4l_5x12/o4l_5x12.h Co-Authored-By: Drashna Jaelre * Update keyboards/keycapsss/o4l_5x12/o4l_5x12.h Co-Authored-By: Drashna Jaelre * Update keyboards/keycapsss/o4l_5x12/o4l_5x12.h Co-Authored-By: Drashna Jaelre * Update keymaps to use new layout names * Update keyboards/keycapsss/o4l_5x12/rules.mk Co-Authored-By: Drashna Jaelre --- keyboards/keycapsss/o4l_5x12/config.h | 43 ++++++ .../keycapsss/o4l_5x12/keymaps/2x2u/config.h | 3 + .../keycapsss/o4l_5x12/keymaps/2x2u/keymap.c | 83 +++++++++++ .../o4l_5x12/keymaps/default/config.h | 3 + .../o4l_5x12/keymaps/default/keymap.c | 140 ++++++++++++++++++ keyboards/keycapsss/o4l_5x12/o4l_5x12.c | 1 + keyboards/keycapsss/o4l_5x12/o4l_5x12.h | 50 +++++++ keyboards/keycapsss/o4l_5x12/readme.md | 31 ++++ keyboards/keycapsss/o4l_5x12/rules.mk | 73 +++++++++ 9 files changed, 427 insertions(+) create mode 100644 keyboards/keycapsss/o4l_5x12/config.h create mode 100644 keyboards/keycapsss/o4l_5x12/keymaps/2x2u/config.h create mode 100644 keyboards/keycapsss/o4l_5x12/keymaps/2x2u/keymap.c create mode 100644 keyboards/keycapsss/o4l_5x12/keymaps/default/config.h create mode 100644 keyboards/keycapsss/o4l_5x12/keymaps/default/keymap.c create mode 100644 keyboards/keycapsss/o4l_5x12/o4l_5x12.c create mode 100644 keyboards/keycapsss/o4l_5x12/o4l_5x12.h create mode 100644 keyboards/keycapsss/o4l_5x12/readme.md create mode 100644 keyboards/keycapsss/o4l_5x12/rules.mk diff --git a/keyboards/keycapsss/o4l_5x12/config.h b/keyboards/keycapsss/o4l_5x12/config.h new file mode 100644 index 000000000..b53e372d0 --- /dev/null +++ b/keyboards/keycapsss/o4l_5x12/config.h @@ -0,0 +1,43 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x7983 +#define PRODUCT_ID 0x0512 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Keycapsss +#define PRODUCT O4L:5x12 +#define DESCRIPTION A 60 key ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 12 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F7, B1, B3, B2, B6 } +#define MATRIX_COL_PINS { B5, B4, E6, D7, C6, D4, D0, D1, D2, F6, F5, F4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* WS2812 RGB LED */ +#define RGB_DI_PIN D3 + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 // Number of LEDs +#define RGBLIGHT_HUE_STEP 4 +#define RGBLIGHT_SAT_STEP 4 +#define RGBLIGHT_VAL_STEP 4 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/keycapsss/o4l_5x12/keymaps/2x2u/config.h b/keyboards/keycapsss/o4l_5x12/keymaps/2x2u/config.h new file mode 100644 index 000000000..271f48d00 --- /dev/null +++ b/keyboards/keycapsss/o4l_5x12/keymaps/2x2u/config.h @@ -0,0 +1,3 @@ +#pragma once + +// place overrides here diff --git a/keyboards/keycapsss/o4l_5x12/keymaps/2x2u/keymap.c b/keyboards/keycapsss/o4l_5x12/keymaps/2x2u/keymap.c new file mode 100644 index 000000000..00aec245e --- /dev/null +++ b/keyboards/keycapsss/o4l_5x12/keymaps/2x2u/keymap.c @@ -0,0 +1,83 @@ +#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. +enum o4l5x12_layers { + _QWERTY, + _LOWER +}; + +// Layers get their own keys. These are defined to make them not mess up +// the grid. +enum o4l5x12_keycodes { + QWERTY = SAFE_RANGE, + LOWER +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ESC | Q | W | E | R | T | Y | U | I | O | P | BSPC | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI |Lower | Enter | Space | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_5x12_2x2u( + 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_GESC, 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_ENT, + KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |RGBPLA| { | [ | ( | | | ) | ] | } | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |RGBMOD| | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |UGlow | Reset| | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_5x12_2x2u( + 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, KC_DEL, + RGB_M_P, KC_LCBR, KC_LBRC, KC_LPRN, KC_SLSH, KC_BSLS, KC_RPRN, KC_RBRC, KC_RCBR, _______, _______, KC_PIPE, + RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RESET, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + } else { + layer_off(_LOWER); + } + return false; + break; + } + return true; +}; diff --git a/keyboards/keycapsss/o4l_5x12/keymaps/default/config.h b/keyboards/keycapsss/o4l_5x12/keymaps/default/config.h new file mode 100644 index 000000000..271f48d00 --- /dev/null +++ b/keyboards/keycapsss/o4l_5x12/keymaps/default/config.h @@ -0,0 +1,3 @@ +#pragma once + +// place overrides here diff --git a/keyboards/keycapsss/o4l_5x12/keymaps/default/keymap.c b/keyboards/keycapsss/o4l_5x12/keymaps/default/keymap.c new file mode 100644 index 000000000..3e9dc335d --- /dev/null +++ b/keyboards/keycapsss/o4l_5x12/keymaps/default/keymap.c @@ -0,0 +1,140 @@ +#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. +enum preonic_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +// Layers get their own keys. These are defined to make them not mess up +// the grid. +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty (Preonic Layer Style) + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_5x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + KC_ESC, 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_ENT, + RGB_TOG, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower (Preonic Layer Style) + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_5x12( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise (Preonic Layer Style) + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_5x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) (Preonic Layer Style) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty| | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_5x12( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + } + return true; +}; diff --git a/keyboards/keycapsss/o4l_5x12/o4l_5x12.c b/keyboards/keycapsss/o4l_5x12/o4l_5x12.c new file mode 100644 index 000000000..78267062c --- /dev/null +++ b/keyboards/keycapsss/o4l_5x12/o4l_5x12.c @@ -0,0 +1 @@ +#include "o4l_5x12.h" diff --git a/keyboards/keycapsss/o4l_5x12/o4l_5x12.h b/keyboards/keycapsss/o4l_5x12/o4l_5x12.h new file mode 100644 index 000000000..2061d477b --- /dev/null +++ b/keyboards/keycapsss/o4l_5x12/o4l_5x12.h @@ -0,0 +1,50 @@ +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + + #define LAYOUT_ortho_5x12( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b \ + ) \ + { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b } \ + } + + #define LAYOUT_ortho_5x12_1x2uC( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \ + k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b \ + ) \ + { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, }, \ + { k40, k41, k42, k43, k44, k45, XXX, k47, k48, k49, k4a, k4b } \ + } + + #define LAYOUT_ortho_5x12_2x2u( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \ + k40, k41, k42, k43, k44, k46, k48, k49, k4a, k4b \ + ) \ + { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, }, \ + { k40, k41, k42, k43, k44, XXX, k46, XXX, k48, k49, k4a, k4b } \ + } diff --git a/keyboards/keycapsss/o4l_5x12/readme.md b/keyboards/keycapsss/o4l_5x12/readme.md new file mode 100644 index 000000000..4b1ebb6c7 --- /dev/null +++ b/keyboards/keycapsss/o4l_5x12/readme.md @@ -0,0 +1,31 @@ +# O4L 5x12 + +A ortholinear 5x12 keyboard made and sold by Keycapsss. [More info at Keycapsss.com](https://keycapsss.com). + + + +## Features: + +- MX and Choc switch support +- RGB Underglow (12x SK6812MINI) +- USB-C +- PCB shape, reset button and mounting holes position same as Preonic Rev3 +- Pro Micro as controller + +--- + +- Keyboard Maintainer: BenRoe [Github](https://github.com/BenRoe) / [Twitter](https://twitter.com/ben_roe) +- Hardware Supported: Pro Micro +- Hardware Availability: [Keycapsss.com](https://keycapsss.com) + + + +Make firmware .hex for this keyboard (after setting up your build environment): + + make keycapsss/o4l_5x12:default + +Example of flashing this keyboard (or use [QMK Toolbox](https://github.com/qmk/qmk_toolbox)): + + make keycapsss/o4l_5x12:default:avrdude + +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). diff --git a/keyboards/keycapsss/o4l_5x12/rules.mk b/keyboards/keycapsss/o4l_5x12/rules.mk new file mode 100644 index 000000000..36c30f309 --- /dev/null +++ b/keyboards/keycapsss/o4l_5x12/rules.mk @@ -0,0 +1,73 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +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 = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. + +LAYOUTS = ortho_5x12 From 7209266ea1bd8b6bce4d468ea016689602499239 Mon Sep 17 00:00:00 2001 From: Nicholas Shaff Date: Tue, 14 May 2019 21:31:36 -0500 Subject: [PATCH 029/341] [Keyboard] Added capslock LED support to the Doro67 Multi PCB. (#5875) --- keyboards/doro67/multi/multi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/keyboards/doro67/multi/multi.c b/keyboards/doro67/multi/multi.c index 477ab245c..14e3359c1 100644 --- a/keyboards/doro67/multi/multi.c +++ b/keyboards/doro67/multi/multi.c @@ -19,6 +19,7 @@ void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up + setPinOutput(E6); matrix_init_user(); } @@ -39,5 +40,11 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { void led_set_kb(uint8_t usb_led) { // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(E6); + } else { + writePinHigh(E6); + } + led_set_user(usb_led); } From 547eb55553b386e0dfa5bb78badfa001608b7a34 Mon Sep 17 00:00:00 2001 From: ENDO Katsuhiro Date: Thu, 16 May 2019 00:52:30 +0900 Subject: [PATCH 030/341] Add a new keybord Scythe (#5873) * Add a new keyboard Scythe. * Update info.json. * Use pragma once. * Comment out IS_COMMAND macro. * Remove DISABLE_JTAG definition. * Remove unnecessary backslashes. * Change layer defines to enum. * Remove dead code. * Fix typo(RGBLIGHT_SPLIT). * Change BOOTMAGIC_ENABLE to "lite". * Remove unnecessary keys. Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Fix width. Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Fix hight. Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- keyboards/scythe/config.h | 240 +++++++++++++++++++++ keyboards/scythe/info.json | 13 ++ keyboards/scythe/keymaps/default/config.h | 19 ++ keyboards/scythe/keymaps/default/keymap.c | 75 +++++++ keyboards/scythe/keymaps/default/readme.md | 2 + keyboards/scythe/keymaps/forties/config.h | 19 ++ keyboards/scythe/keymaps/forties/keymap.c | 205 ++++++++++++++++++ keyboards/scythe/keymaps/forties/readme.md | 2 + keyboards/scythe/readme.md | 15 ++ keyboards/scythe/rules.mk | 85 ++++++++ keyboards/scythe/scythe.c | 43 ++++ keyboards/scythe/scythe.h | 51 +++++ 12 files changed, 769 insertions(+) create mode 100644 keyboards/scythe/config.h create mode 100644 keyboards/scythe/info.json create mode 100644 keyboards/scythe/keymaps/default/config.h create mode 100644 keyboards/scythe/keymaps/default/keymap.c create mode 100644 keyboards/scythe/keymaps/default/readme.md create mode 100644 keyboards/scythe/keymaps/forties/config.h create mode 100644 keyboards/scythe/keymaps/forties/keymap.c create mode 100644 keyboards/scythe/keymaps/forties/readme.md create mode 100644 keyboards/scythe/readme.md create mode 100644 keyboards/scythe/rules.mk create mode 100644 keyboards/scythe/scythe.c create mode 100644 keyboards/scythe/scythe.h diff --git a/keyboards/scythe/config.h b/keyboards/scythe/config.h new file mode 100644 index 000000000..76d332364 --- /dev/null +++ b/keyboards/scythe/config.h @@ -0,0 +1,240 @@ +/* Copyright 2019 ENDO Katsuhiro + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3941 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Kagizaraya +#define PRODUCT Scythe +#define DESCRIPTION Yet another 60% split keyboard + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F7, F6, F5, F4, D5 } +#define MATRIX_COL_PINS { D6, D7, B4, B5, B6, C6, C7 } +#define UNUSED_PINS + +#define SOFT_SERIAL_PIN D0 + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +#define RGBLIGHT_SPLIT 1 +#define RGB_DI_PIN F0 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 9 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) +*/ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 + +/* Serial settings */ +#define USE_SERIAL +//#define EE_HANDS +#define I2C_MASTER_LEFT +//#define I2C_MASTER_RIGHT + +#define TAPPING_TERM 120 + diff --git a/keyboards/scythe/info.json b/keyboards/scythe/info.json new file mode 100644 index 000000000..864d5ee29 --- /dev/null +++ b/keyboards/scythe/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Scythe", + "url": "", + "maintainer": "ka2hiro", + "width": 19, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":2, "y":0}, {"label":"1", "x":3, "y":0}, {"label":"2", "x":4, "y":0}, {"label":"3", "x":5, "y":0}, {"label":"4", "x":6, "y":0}, {"label":"5", "x":7, "y":0}, {"label":"_", "x":8, "y":0}, {"label":"+", "x":9.5, "y":0}, {"label":"6", "x":10.5, "y":0}, {"label":"7", "x":11.5, "y":0}, {"label":"8", "x":12.5, "y":0}, {"label":"9", "x":13.5, "y":0}, {"label":"0", "x":14.5, "y":0}, {"label":"\\", "x":15.5, "y":0}, {"label":"Tab", "x":1.25, "y":1, "w":1.5}, {"label":"Q", "x":2.75, "y":1}, {"label":"W", "x":3.75, "y":1}, {"label":"E", "x":4.75, "y":1}, {"label":"R", "x":5.75, "y":1}, {"label":"T", "x":6.75, "y":1}, {"label":"{", "x":7.75, "y":1}, {"label":"}", "x":9.75, "y":1}, {"label":"Y", "x":10.75, "y":1}, {"label":"U", "x":11.75, "y":1}, {"label":"I", "x":12.75, "y":1}, {"label":"O", "x":13.75, "y":1}, {"label":"P", "x":14.75, "y":1}, {"label":"Backace", "x":15.75, "y":1, "w":1.5}, {"label":"Control", "x":0.75, "y":2, "w":1.75}, {"label":"A", "x":2.5, "y":2}, {"label":"S", "x":3.5, "y":2}, {"label":"D", "x":4.5, "y":2}, {"label":"F", "x":5.5, "y":2}, {"label":"G", "x":6.5, "y":2}, {"label":"~", "x":7.5, "y":2}, {"label":"\"", "x":10, "y":2}, {"label":"H", "x":11, "y":2}, {"label":"J", "x":12, "y":2}, {"label":"K", "x":13, "y":2}, {"label":"L", "x":14, "y":2}, {"label":":", "x":15, "y":2}, {"label":"Return", "x":16, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"Caps", "x":7.25, "y":3}, {"label":"Del", "x":10.25, "y":3}, {"label":"N", "x":11.25, "y":3}, {"label":"M", "x":12.25, "y":3}, {"label":"<", "x":13.25, "y":3}, {"label":">", "x":14.25, "y":3}, {"label":"?", "x":15.25, "y":3}, {"label":"Shift", "x":16.25, "y":3, "w":1.75}, {"label":"Fn", "x":18, "y":3}, {"label":"", "x":2.75, "y":4, "w":1.25}, {"label":"", "x":4, "y":4, "w":1.25}, {"label":"Fn", "x":5.25, "y":4, "w":1.25}, {"x":6.5, "y":4, "w":2}, {"x":10, "y":4, "w":2}, {"label":"Fn", "x":12, "y":4, "w":1.25}, {"label":"", "x":13.25, "y":4, "w":1.25}, {"label":"", "x":14.5, "y":4, "w":1.25}] + } + } +} + diff --git a/keyboards/scythe/keymaps/default/config.h b/keyboards/scythe/keymaps/default/config.h new file mode 100644 index 000000000..cea12f905 --- /dev/null +++ b/keyboards/scythe/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/scythe/keymaps/default/keymap.c b/keyboards/scythe/keymaps/default/keymap.c new file mode 100644 index 000000000..56b6b32c8 --- /dev/null +++ b/keyboards/scythe/keymaps/default/keymap.c @@ -0,0 +1,75 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum layer_names { + _QWERTY, + _HAPPY, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + HAPPY, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * + * ,------------------------------------------------. ,------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | \ | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | BkSp | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | ` | | ' | H | J | K | L | ; |Enter | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------. + * |Shift | Z | X | C | V | B | Caps | | Del | N | M | , | . | / |Shift | Fn | + * `--------------------+------+------+------+------| |------+------+------+------+------+------+------+------' + * | LAlt | LGUI | Fn | Space| |Space | Fn | LGUI | LAlt | + * `---------------------------' `---------------------------' + */ +[_QWERTY] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_GRV, KC_QUOT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_CAPS, KC_DEL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_HAPPY), + KC_LALT, KC_LGUI, MO(_HAPPY), KC_SPC, KC_SPC, MO(_HAPPY), KC_RGUI, KC_RALT +), + +/* Happy + * + * ,------------------------------------------------. ,------------------------------------------------. + * | Pwr | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F0 | Del | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Caps | F11 | F12 |BLTOGG| |BL INC|BL DEC| | | | Psc | Slk | Pus | Up | Ins | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | Vol- | Vol+ | Mute |RGBHUI|RGBSAI|RGBVAI| | * | / | Home | PgUp | Left | Right| | + * |------+------+------+------+------+------+------| +------+------+------+------+------+------+------+------. + * | |RGBTOG|RGBMOD|RGBRMD|RGBHUD|RGBSAD|RGBVAD| | + | - | End | PgDn | Down | | | | + * `--------------------+------+------+------+------| |------+------+------+------+------+------+------+------' + * | | | | | | | | | | + * `---------------------------' `---------------------------' + */ +[_HAPPY] = LAYOUT( + KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + KC_CAPS, KC_F10, KC_F12, BL_TOGG, _______, BL_INC , BL_DEC , _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_INS, + _______, KC_VOLD, KC_VOLU, KC_MUTE, RGB_HUI, RGB_SAI, RGB_VAI, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, + _______, RGB_TOG, RGB_MOD, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + diff --git a/keyboards/scythe/keymaps/default/readme.md b/keyboards/scythe/keymaps/default/readme.md new file mode 100644 index 000000000..c4d73c4e3 --- /dev/null +++ b/keyboards/scythe/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# The default keymap for scythe + diff --git a/keyboards/scythe/keymaps/forties/config.h b/keyboards/scythe/keymaps/forties/config.h new file mode 100644 index 000000000..cea12f905 --- /dev/null +++ b/keyboards/scythe/keymaps/forties/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/scythe/keymaps/forties/keymap.c b/keyboards/scythe/keymaps/forties/keymap.c new file mode 100644 index 000000000..4d2fc8824 --- /dev/null +++ b/keyboards/scythe/keymaps/forties/keymap.c @@ -0,0 +1,205 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum layer_names { + _QWERTY, + _HAPPY, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + HAPPY, + LOWER, + RAISE, + ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * + * ,------------------------------------------------. ,------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | \ | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | BkSp | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | ` | | ' | H | J | K | L | ; |Enter | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------. + * |Shift | Z | X | C | V | B | Caps | | Del | N | M | , | . | / |Shift | Fn | + * `--------------------+------+------+------+------| |------+------+------+------+------+------+------+------' + * | LAlt | LGUI | LOWER|Ctr/Esc| |Spc/Sft | RAISE| LGUI | LAlt | + * `---------------------------' `---------------------------' + */ +[_QWERTY] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_GRV, KC_QUOT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_CAPS, KC_DEL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, HAPPY, + KC_LALT, KC_LGUI, LOWER, MT(MOD_LCTL, KC_ESC), MT(MOD_LSFT, KC_SPC), RAISE, KC_RGUI, KC_RALT +), + +/* Happy + * + * ,------------------------------------------------. ,------------------------------------------------. + * | Pwr | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F0 | Del | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Caps | F11 | F12 |BLTOGG| |BL INC|BL DEC| | | | Psc | Slk | Pus | Up | Ins | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | Vol- | Vol+ | Mute |RGBHUI|RGBSAI|RGBVAI| | * | / | Home | PgUp | Left | Right| | + * |------+------+------+------+------+------+------| +------+------+------+------+------+------+------+------. + * | |RGBTOG|RGBMOD|RGBRMD|RGBHUD|RGBSAD|RGBVAD| | + | - | End | PgDn | Down | | | | + * `--------------------+------+------+------+------| |------+------+------+------+------+------+------+------' + * | | | | | | | | | | + * `---------------------------' `---------------------------' + */ +[_HAPPY] = LAYOUT( + KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + KC_CAPS, KC_F10, KC_F12, BL_TOGG, _______, BL_INC , BL_DEC , _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_INS, + _______, KC_VOLD, KC_VOLU, KC_MUTE, RGB_HUI, RGB_SAI, RGB_VAI, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, + _______, RGB_TOG, RGB_MOD, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +), + + +/* Raise + * + * ,------------------------------------------------. ,------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | _ | + | | | ~ | | | | : | " | > | { | } | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------. + * | | | - | = | \ | ` | | | | ; | ' | < | [ | ] | | | + * `--------------------+------+------+------+------| |------+------+------+------+------+------+------+------' + * | | | | | | | | | | + * `---------------------------' `---------------------------' + */ +[_RAISE] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, _______, KC_UNDS, KC_PLUS, KC_PIPE, KC_TILD, _______, _______, KC_COLN, KC_DQUO, KC_GT, KC_LCBR, KC_RCBR, _______, + _______, _______, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, _______, _______, KC_SCLN, KC_QUOT, KC_LT, KC_LBRC, KC_RBRC, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +), + + +/* Lower + * + * ,------------------------------------------------. ,------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | | | | Enter| | | Left | Down | Up | Right| | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------. + * | | | | | | | Del | | BkSp | | PgUp | PgDn | | | | | + * `--------------------+------+------+------+------| |------+------+------+------+------+------+------+------' + * | | | | | | | | | | + * `---------------------------' `---------------------------' + */ +[_LOWER] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, _______, _______, _______, _______, _______, KC_ENT, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, KC_DEL, KC_BSPC, _______, KC_PGUP, KC_PGDN, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +), + + +/* Adjust + * + * ,------------------------------------------------. ,------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F0 | Del | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | F11 | F12 |BLTOGG| |BL INC|BL DEC| | | | | | | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | |RGBMOD|RGBHUI|RGBSAI|RGBVAI| | | | | | | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------. + * | | Reset| |RGBTOG|RGBHUD|RGBSAD|RGBVAD| | | Prev | Next | Vol- | Vol+ | Play | | | + * `--------------------+------+------+------+------| |------+------+------+------+------+------+------+------' + * | | | | | | | | | | + * `---------------------------' `---------------------------' + */ +[_ADJUST] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, KC_F10, KC_F12, BL_TOGG, _______, BL_INC , BL_DEC , _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, + _______, RESET, _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + // persistant_default_layer_set(1UL<<_QWERTY); + set_single_persistent_default_layer(_QWERTY); + } + return false; + case HAPPY: + if (record->event.pressed) { + layer_on(_HAPPY); + } else { + layer_off(_HAPPY); + } + return false; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/scythe/keymaps/forties/readme.md b/keyboards/scythe/keymaps/forties/readme.md new file mode 100644 index 000000000..162792dc3 --- /dev/null +++ b/keyboards/scythe/keymaps/forties/readme.md @@ -0,0 +1,2 @@ +# The forty percent compatible keymap for scythe + diff --git a/keyboards/scythe/readme.md b/keyboards/scythe/readme.md new file mode 100644 index 000000000..fed4a77e2 --- /dev/null +++ b/keyboards/scythe/readme.md @@ -0,0 +1,15 @@ +# Scythe + +![Scythe](https://i.imgur.com/jBqQAAt.jpg) + +Yet another 60% symmetrical split keyboard. + +Keyboard Maintainer: [ka2hiro](https://github.com/ka2hiro) [@ka2hiro](https://twitter.com/ka2hiro) +Hardware Supported: Scythe PCB, ATMEGA32U4 +Hardware Availability: [@kagizaraya](https://twitter.com/kagizaraya) + +Make example for this keyboard (after setting up your build environment): + + make scythe:default:dfu + +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). diff --git a/keyboards/scythe/rules.mk b/keyboards/scythe/rules.mk new file mode 100644 index 000000000..1ad80dc89 --- /dev/null +++ b/keyboards/scythe/rules.mk @@ -0,0 +1,85 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +SPLIT_KEYBOARD = yes # Use shared split_common +RGBLIGHT_SPLIT = yes + diff --git a/keyboards/scythe/scythe.c b/keyboards/scythe/scythe.c new file mode 100644 index 000000000..e8060ac27 --- /dev/null +++ b/keyboards/scythe/scythe.c @@ -0,0 +1,43 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * 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 . + */ +#include "scythe.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/scythe/scythe.h b/keyboards/scythe/scythe.h new file mode 100644 index 000000000..c13c63fdd --- /dev/null +++ b/keyboards/scythe/scythe.h @@ -0,0 +1,51 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +// readability +#define ___ KC_NO + +#define LAYOUT( \ + L01, L02, L03, L04, L05, L06, L07, R01, R02, R03, R04, R05, R06, R07, \ + L08, L09, L10, L11, L12, L13, L14, R08, R09, R10, R11, R12, R13, R14, \ + L15, L16, L17, L18, L19, L20, L21, R15, R16, R17, R18, R19, R20, R21, \ + L22, L23, L24, L25, L26, L27, L28, R22, R23, R24, R25, R26, R27, R28, R33, \ + L29, L30, L31, L32, R29, R30, R31, R32 \ + ) \ + { \ + { L01, L02, L03, L04, L05, L06, L07 }, \ + { L08, L09, L10, L11, L12, L13, L14 }, \ + { L15, L16, L17, L18, L19, L20, L21 }, \ + { L22, L23, L24, L25, L26, L27, L28 }, \ + { L29, L30, L31, L32, ___, ___, ___ }, \ + { R01, R02, R03, R04, R05, R06, R07 }, \ + { R08, R09, R10, R11, R12, R13, R14 }, \ + { R15, R16, R17, R18, R19, R20, R21 }, \ + { R22, R23, R24, R25, R26, R27, R28 }, \ + { R29, R30, R31, R32, ___, ___, R33 } \ + } + From 8bcefc92d0b1494b890dae3f41516acf831f539c Mon Sep 17 00:00:00 2001 From: zvecr Date: Wed, 15 May 2019 20:57:35 +0100 Subject: [PATCH 031/341] Port 40percentclub nein (#5876) --- keyboards/40percentclub/nein/config.h | 239 ++++++++++++++++++ keyboards/40percentclub/nein/info.json | 22 ++ .../nein/keymaps/default/keymap.c | 29 +++ keyboards/40percentclub/nein/nein.c | 16 ++ keyboards/40percentclub/nein/nein.h | 37 +++ keyboards/40percentclub/nein/readme.md | 18 ++ keyboards/40percentclub/nein/rules.mk | 80 ++++++ 7 files changed, 441 insertions(+) create mode 100644 keyboards/40percentclub/nein/config.h create mode 100644 keyboards/40percentclub/nein/info.json create mode 100644 keyboards/40percentclub/nein/keymaps/default/keymap.c create mode 100644 keyboards/40percentclub/nein/nein.c create mode 100644 keyboards/40percentclub/nein/nein.h create mode 100644 keyboards/40percentclub/nein/readme.md create mode 100644 keyboards/40percentclub/nein/rules.mk diff --git a/keyboards/40percentclub/nein/config.h b/keyboards/40percentclub/nein/config.h new file mode 100644 index 000000000..05fd93d24 --- /dev/null +++ b/keyboards/40percentclub/nein/config.h @@ -0,0 +1,239 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0A0C +#define DEVICE_VER 0x9999 +#define MANUFACTURER di0ib +#define PRODUCT The nein Keyboard +#define DESCRIPTION 9 key macropad + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 3 + +/* Keyboard Matrix Assignments */ +#define DIRECT_PINS { \ + { F4, F5, F6 }, \ + { F7, B1, B3 }, \ + { B2, B6, B5 } \ +} +#define UNUSED_PINS + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/40percentclub/nein/info.json b/keyboards/40percentclub/nein/info.json new file mode 100644 index 000000000..aaadc7186 --- /dev/null +++ b/keyboards/40percentclub/nein/info.json @@ -0,0 +1,22 @@ +{ + "keyboard_name": "nein", + "url": "", + "maintainer": "qmk", + "width": 3, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2} + ] + } + } +} diff --git a/keyboards/40percentclub/nein/keymaps/default/keymap.c b/keyboards/40percentclub/nein/keymaps/default/keymap.c new file mode 100644 index 000000000..674a8bb7f --- /dev/null +++ b/keyboards/40percentclub/nein/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +/* Copyright 2019 + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_3x3( + KC_MUTE, KC_HOME, KC_MPLY, \ + MO(1), KC_UP, KC_END, \ + KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [1] = LAYOUT_ortho_3x3( + RESET, _______, KC_STOP, \ + _______, _______, RGB_MOD, \ + KC_MPRV, _______, KC_MNXT \ + ), +}; diff --git a/keyboards/40percentclub/nein/nein.c b/keyboards/40percentclub/nein/nein.c new file mode 100644 index 000000000..0b4d05d94 --- /dev/null +++ b/keyboards/40percentclub/nein/nein.c @@ -0,0 +1,16 @@ +/* Copyright 2019 + * + * 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 . + */ +#include "nein.h" diff --git a/keyboards/40percentclub/nein/nein.h b/keyboards/40percentclub/nein/nein.h new file mode 100644 index 000000000..fd0118f75 --- /dev/null +++ b/keyboards/40percentclub/nein/nein.h @@ -0,0 +1,37 @@ +/* Copyright 2019 + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_ortho_3x3( \ + k00, k01, k02, \ + k10, k11, k12, \ + k20, k21, k22 \ +) \ +{ \ + { k00, k01, k02 }, \ + { k10, k11, k12 }, \ + { k20, k21, k22 } \ +} diff --git a/keyboards/40percentclub/nein/readme.md b/keyboards/40percentclub/nein/readme.md new file mode 100644 index 000000000..49ce04f13 --- /dev/null +++ b/keyboards/40percentclub/nein/readme.md @@ -0,0 +1,18 @@ +# nein + +![nein](https://2.bp.blogspot.com/-avYV4grcAPQ/XL9a67SxgKI/AAAAAAACVCE/GSGVYRThaEEDd14M3LG34gQTv5ZabRI0QCEwYBhgL/s640/a.jpg) +=== + +A 9 key macropad. + +Powered by a Pro Micro and can fit any of the various different sized variations of Pro Micro. + +Keyboard Maintainer: QMK Community +Hardware Supported: nein PCB +Hardware Availability: [nein project on 40% Keyboards](https://www.40percent.club/2019/04/nein.html) + +Make example for this keyboard (after setting up your build environment): + + make 40percentclub/nein:default + +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). diff --git a/keyboards/40percentclub/nein/rules.mk b/keyboards/40percentclub/nein/rules.mk new file mode 100644 index 000000000..1e3748287 --- /dev/null +++ b/keyboards/40percentclub/nein/rules.mk @@ -0,0 +1,80 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +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 on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) From 8680c50d07604836b0fc7c3f97bd77c7830ea083 Mon Sep 17 00:00:00 2001 From: Erez Zukerman Date: Wed, 15 May 2019 19:53:45 -0400 Subject: [PATCH 032/341] Removes Erez personally from QMK (#5883) --- keyboards/ergodox_ez/info.json | 2 +- keyboards/ergodox_ez/matrix.c | 12 +- keyboards/ergotaco/matrix.c | 12 +- keyboards/georgi/matrix.c | 10 +- keyboards/gergo/matrix.c | 4 - keyboards/handwired/frenchdev/matrix.c | 5 - keyboards/readme.md | 15 +- keyboards/sixkeyboard/matrix.c | 5 - .../ergodox/erez_experimental/config.h | 13 -- .../ergodox/erez_experimental/keymap.c | 217 ------------------ .../ergodox/erez_experimental/readme.md | 55 ----- .../ergodox/erez_experimental/rules.mk | 6 - readme.md | 2 +- 13 files changed, 20 insertions(+), 338 deletions(-) delete mode 100644 layouts/community/ergodox/erez_experimental/config.h delete mode 100644 layouts/community/ergodox/erez_experimental/keymap.c delete mode 100644 layouts/community/ergodox/erez_experimental/readme.md delete mode 100644 layouts/community/ergodox/erez_experimental/rules.mk diff --git a/keyboards/ergodox_ez/info.json b/keyboards/ergodox_ez/info.json index 6f7a94157..e543206fe 100644 --- a/keyboards/ergodox_ez/info.json +++ b/keyboards/ergodox_ez/info.json @@ -1,7 +1,7 @@ { "keyboard_name": "ErgoDox EZ", "url": "ergodox-ez.com", - "maintainer": "erez", + "maintainer": "ZSA", "width": 17, "height": 8, diff --git a/keyboards/ergodox_ez/matrix.c b/keyboards/ergodox_ez/matrix.c index 6f604ae2b..2bfe27b9a 100644 --- a/keyboards/ergodox_ez/matrix.c +++ b/keyboards/ergodox_ez/matrix.c @@ -1,9 +1,5 @@ /* -Note for ErgoDox EZ customizers: Here be dragons! -This is not a file you want to be messing with. -All of the interesting stuff for you is under keymaps/ :) -Love, Erez Copyright 2013 Oleg Kostyuk @@ -95,7 +91,7 @@ void matrix_init(void) { // initialize matrix state: all keys off for (uint8_t i = 0; i < MATRIX_ROWS; i++) { matrix[i] = 0; - raw_matrix[i] = 0; + raw_matrix[i] = 0; } #ifdef DEBUG_MATRIX_SCAN_RATE @@ -168,7 +164,7 @@ uint8_t matrix_scan(void) { #ifdef LEFT_LEDS mcp23018_status = ergodox_left_leds_update(); #endif // LEFT_LEDS - bool changed = false; + bool changed = false; for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { // select rows from left and right hands uint8_t left_index = i; @@ -178,13 +174,13 @@ uint8_t matrix_scan(void) { // we don't need a 30us delay anymore, because selecting a // left-hand row requires more than 30us for i2c. - + changed |= store_raw_matrix_row(left_index); changed |= store_raw_matrix_row(right_index); unselect_rows(); } - + debounce(raw_matrix, matrix, MATRIX_ROWS, changed); matrix_scan_quantum(); diff --git a/keyboards/ergotaco/matrix.c b/keyboards/ergotaco/matrix.c index e4fd6902f..f7ceb194a 100644 --- a/keyboards/ergotaco/matrix.c +++ b/keyboards/ergotaco/matrix.c @@ -1,8 +1,4 @@ /* -Note for ErgoDox EZ customizers: Here be dragons! -This is not a file you want to be messing with. -All of the interesting stuff for you is under keymaps/ :) -Love, Erez Copyright 2013 Oleg Kostyuk @@ -226,8 +222,8 @@ uint8_t matrix_scan(void) matrix_scan_quantum(); #ifdef DEBUG_MATRIX - for (uint8_t c = 0; c < MATRIX_COLS; c++) - for (uint8_t r = 0; r < MATRIX_ROWS; r++) + for (uint8_t c = 0; c < MATRIX_COLS; c++) + for (uint8_t r = 0; r < MATRIX_ROWS; r++) if (matrix_is_on(r, c)) xprintf("r:%d c:%d \n", r, c); #endif @@ -324,10 +320,10 @@ static void unselect_rows(void) static void select_row(uint8_t row) { if (row < 6) { - // select on mcp23018 + // select on mcp23018 if (mcp23018_status) { // do nothing on error // Read using bitmask - } else { // set active row low : 0 // set other rows hi-Z : 1 + } else { // set active row low : 0 // set other rows hi-Z : 1 mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_write(~(1< @@ -248,8 +244,8 @@ uint8_t matrix_scan(void) matrix_scan_quantum(); #ifdef DEBUG_MATRIX - for (uint8_t c = 0; c < MATRIX_COLS; c++) - for (uint8_t r = 0; r < MATRIX_ROWS; r++) + for (uint8_t c = 0; c < MATRIX_COLS; c++) + for (uint8_t r = 0; r < MATRIX_ROWS; r++) if (matrix_is_on(r, c)) xprintf("r:%d c:%d \n", r, c); #endif @@ -359,7 +355,7 @@ static void select_row(uint8_t row) if (row < 7) { // select on mcp23018 if (mcp23018_status) { // do nothing on error - } else { // set active row low : 0 // set other rows hi-Z : 1 + } else { // set active row low : 0 // set other rows hi-Z : 1 mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_write(0xFF & ~(1< diff --git a/keyboards/handwired/frenchdev/matrix.c b/keyboards/handwired/frenchdev/matrix.c index 4263555e9..26c2b3126 100644 --- a/keyboards/handwired/frenchdev/matrix.c +++ b/keyboards/handwired/frenchdev/matrix.c @@ -5,11 +5,6 @@ The "column" and "row" in here actually refers to the opposite on the keyboard see definition of KEYMAP in v1.h, the grid is transposed so that a "row" in here is actually a "column" on the physical keyboard Nicolas -Note for ErgoDox EZ customizers: Here be dragons! -This is not a file you want to be messing with. -All of the interesting stuff for you is under keymaps/ :) -Love, Erez - Copyright 2013 Oleg Kostyuk Copyright 2013 Nicolas Poirey diff --git a/keyboards/readme.md b/keyboards/readme.md index 81284755f..8b6e40721 100644 --- a/keyboards/readme.md +++ b/keyboards/readme.md @@ -3,8 +3,6 @@ QMK runs on a diverse range of keyboards. Some of these keyboards are officially ## Official QMK Keyboards -These keyboards are manufactured by the maintainers of QMK. - ### Ortholinear Keyboards - Jack Humbert What makes OLKB keyboards shine is a combo of lean aesthetics, compact size, and killer tactile feel. These are available through [olkb.com](http://olkb.com) as well as through [Massdrop](http://massdrop.com) from time to time, as easy to assemble kits. @@ -13,12 +11,6 @@ What makes OLKB keyboards shine is a combo of lean aesthetics, compact size, and * [Preonic](/keyboards/preonic/) — Like the Planck, but bigger. 50%. * [Atomic](/keyboards/atomic/) — Imagine the size of the Planck. Now imagine the size of the Preonic. Now imagine _bigger_. That is the Atomic. A 60% keyboard. -### ErgoDox EZ - Erez Zukerman - -Made in Taiwan using advanced robotic manufacturing, the ErgoDox EZ is a fully-assembled, premium ergonomic keyboard. Its split design allows you to place both halves shoulder width, and its custom-made wrist rests and tilt/tent kit make for incredibly comfortable typing. Available on [ergodox-ez.com](https://ergodox-ez.com). - -* [ErgoDox EZ](/keyboards/ergodox_ez/) — Our one and only product. Yes, it's that awesome. Comes with either printed or blank keycaps, and 7 different keyswitch types. - ### Clueboard - Zach White Designed and built in Felton, CA, Clueboards keyboard emphasize quality and locally sourced components, available on [clueboard.co](http://clueboard.co) @@ -27,6 +19,13 @@ Designed and built in Felton, CA, Clueboards keyboard emphasize quality and loca * [Cluecard](/keyboards/clueboard/card/) — A small board to help you hack on QMK. * [Cluepad](/keyboards/clueboard/17/) — A mechanical numpad with QMK superpowers. +### ErgoDox EZ and Planck EZ - ZSA Technology Labs + +[ZSA Technology Labs](https://ergodox-ez.com) maintains its own [fork of QMK](https://github.com/zsa/qmk_firmware) which feeds its [configurator](https://configure.ergodox-ez.com), for stability and legal purposes. The ZSA boards are: + +* [ErgoDox EZ](/keyboards/ergodox_ez/) — A powerful split mechanical keyboard. +* [Planck EZ](/keyboards/planck/ez) — A 40% DIY powerhouse of customizability and modification capability. It's a lean, mean, typing machine, which ships fully assembled with a two-year warranty. + ## Community-supported QMK Keyboards diff --git a/keyboards/sixkeyboard/matrix.c b/keyboards/sixkeyboard/matrix.c index 860452ebd..64b46e9b0 100644 --- a/keyboards/sixkeyboard/matrix.c +++ b/keyboards/sixkeyboard/matrix.c @@ -1,10 +1,5 @@ /* -Note for ErgoDox EZ customizers: Here be dragons! -This is not a file you want to be messing with. -All of the interesting stuff for you is under keymaps/ :) -Love, Erez - Copyright 2013 Oleg Kostyuk This program is free software: you can redistribute it and/or modify diff --git a/layouts/community/ergodox/erez_experimental/config.h b/layouts/community/ergodox/erez_experimental/config.h deleted file mode 100644 index 4b9c29c94..000000000 --- a/layouts/community/ergodox/erez_experimental/config.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include QMK_KEYBOARD_CONFIG_H - -#define ONESHOT_TAP_TOGGLE 2 -#define ONESHOT_TIMEOUT 300 - -#undef LEADER_TIMEOUT -#define LEADER_TIMEOUT 300 - - -#endif diff --git a/layouts/community/ergodox/erez_experimental/keymap.c b/layouts/community/ergodox/erez_experimental/keymap.c deleted file mode 100644 index 1270188f9..000000000 --- a/layouts/community/ergodox/erez_experimental/keymap.c +++ /dev/null @@ -1,217 +0,0 @@ -#include -#include QMK_KEYBOARD_H -#include "debug.h" -#include "action_layer.h" - -#define BASE 0 // default layer -#define SYMB 1 // symbols -#define MDIA 2 // media keys - -enum custom_keycodes { - PLACEHOLDER = SAFE_RANGE, // can always be here - RGB_FF00BB // always start with RGB_ -}; - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Keymap 0: Basic layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | = | 1 | 2 | 3 | 4 | 5 |Ctrl- | | Ctrl+| 6 | 7 | 8 | 9 | 0 | - | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | BkSp | A | S | D | F | G |------| |------| H | Alt/J| K | L |; / L2| LGui/' | - * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * |LShift/(|Z/Ctrl| X | C | V | B | [ | | ] | N | M | , | . |//Ctrl|RShift/)| - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | -/L1 | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | App | LGui | | Alt |Ctrl/Esc| - * ,------|------|------| |------+--------+------. - * | | | Home | | PgUp | | | - * | Space|Leader|------| |------| Tab/L1 |Enter | - * | | | End | | PgDn | | | - * `--------------------' `----------------------' - */ -// If it accepts an argument (i.e, is a function), it doesn't need KC_. -// Otherwise, it needs KC_* -[BASE] = LAYOUT_ergodox( // layer 0 : default - // left hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, LCTL(KC_MINS), - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), - KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSPO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_LBRC), - LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, - ALT_T(KC_APP), KC_LGUI, - KC_HOME, - KC_SPC,KC_LEAD,KC_END, - // right hand - LCTL(KC_EQL), KC_6,KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(SYMB), KC_Y,KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H,ALT_T(KC_J),KC_K, KC_L, LT(MDIA,KC_SCLN),GUI_T(KC_QUOT), - MEH_T(KC_RBRC),KC_N,KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSPC, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, LT(SYMB,KC_MINS), - KC_LALT, CTL_T(KC_ESC), - KC_PGUP, - KC_PGDN,LT(SYMB, KC_TAB), KC_ENT - ), -/* Keymap 1: Symbol Layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | F12 | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | 1 | 2 | 3 | 4 | 5 |------| |------| & | _ | - | ; | + | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | 6 | 7 | 8 | 9 | 0 | | | | | | @ | = | % | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | |NxtTab|PrvTab| | | | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | |TOG | - * ,------|------|------| |------+------+------. - * |VAI |VAD |HUI | |SAI | |MOD | - * | | |------| |------| | | - * | | |HUD | |SAD | | | - * `--------------------' `--------------------' - */ -// SYMBOLS -[SYMB] = LAYOUT_ergodox( - // left hand - RGB_FF00BB, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, - KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, - KC_TRNS, KC_TRNS,KC_TRNS,LCTL(KC_PGUP), LCTL(KC_PGDN), - KC_TRNS,KC_TRNS, - RGB_HUI, - RGB_VAI,RGB_VAD,RGB_HUD, - // right hand - KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F12, - KC_AMPR, KC_UNDS, KC_MINS, CM_SCLN, KC_PLUS, KC_TRNS, - KC_TRNS, KC_PIPE, KC_AT, KC_EQL, KC_PERC, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - RGB_TOG, KC_TRNS, - RGB_SAI, - RGB_SAD, KC_TRNS, RGB_MOD -), -/* Keymap 2: Media and mouse keys - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | PgUp | Home | End | PgDn | |------| |------| | | | | | Play | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | Prev | Next | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | |VolUp |VolDn | Mute | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | |Brwser| - * | | |------| |------| |Back | - * | | | | | | | | - * `--------------------' `--------------------' - */ -// MEDIA AND MOUSE -[MDIA] = LAYOUT_ergodox( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_PGUP, KC_HOME, KC_END, KC_PGDN, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - // right hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, - KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_WBAK -), -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - return MACRO_NONE; -}; - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - -}; - - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - // dynamically generate these. - case RGB_FF00BB: - if (record->event.pressed) { - #ifdef RGBLIGHT_ENABLE - rgblight_enable(); - rgblight_mode(1); - rgblight_setrgb(0xff,0x00,0xbb); - #endif - } - return false; - break; - } - return true; -} - -LEADER_EXTERNS(); - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { - - uint8_t layer = biton32(layer_state); - - ergodox_board_led_off(); - ergodox_right_led_1_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); - switch (layer) { - // TODO: Make this relevant to the ErgoDox EZ. - case 1: - ergodox_right_led_1_on(); - break; - case 2: - ergodox_right_led_2_on(); - break; - default: - // none - break; - } - - LEADER_DICTIONARY() { - leading = false; - leader_end(); - - SEQ_ONE_KEY(KC_W) { - register_code(KC_LALT); - register_code(KC_F4); - unregister_code(KC_F4); - unregister_code(KC_LALT); - } - SEQ_ONE_KEY(KC_O) { - register_code(KC_LCTL); - register_code(KC_LSFT); - register_code(KC_O); - unregister_code(KC_O); - unregister_code(KC_LSFT); - unregister_code(KC_LCTL); - } - } -} - diff --git a/layouts/community/ergodox/erez_experimental/readme.md b/layouts/community/ergodox/erez_experimental/readme.md deleted file mode 100644 index f0738d9a7..000000000 --- a/layouts/community/ergodox/erez_experimental/readme.md +++ /dev/null @@ -1,55 +0,0 @@ -# Erez's experimental layout - -This is my personal layout which I use to test out ideas which may or may not make it onto the default layout we ship with. It's based off the default layout, with various tweaks. - -Changelog: - -## Nov 1, 2016: - -* Adds dedicated text zooming keys in inner corners - -## May 24, 2016: - -* Implements Leader key example - * Leader, W sends Alt-F4 - * Leader, O sends Ctrl-shift-o (a shortcut I use in FrontApp) - -## May 8, 2016: - -* Makes bottom-right key send minus/underscore when tapped, L1 temporary toggle when held -* Tweaked the positions of the numbers on the symbol layer. Basically, 12345 are now directly under their number-row counterparts in layer 0. You can imagine pulling the number row down to the home row. And 67890 are directly under 12345 - so it's a matter of just adding 5 and going to the next row (1+5 = 6, 2+5 = 7 and so on). -* Tweaks media/nav layer - * Removes mouse control, as I don't use it - * Makes left home row keys PgUp, Home, End, PgDn - -## Apr 29, 2016: - -* Tweaks the Hyper and Meh key to send brackets when tapped -* Turns bottom-right key into a minus/underscore (easy to reach with the right pinky) - -## Apr 25, 2016: - -* Made it so that the right and left Shift keys send opening and closing parens ( ) when tapped - -## Feb 11, 2016: - -* Updated ASCII legend for thumb clusters -* Made it so outer left-hand thumb key is L1 momentary toggle -* Added % and @ to L1 -* Swapped positions for _ and - on L1 - -## Feb 5, 2016: - -* A whole new design for the symbol layer. Specifically: - * Put the minus, underscore, and semicolon right in the homerow for the right hand - * Parens are in better places for me - * The arrow keys now send Ctrl-PgUp and Ctrl-PgDn, for switching browser tabs with the arrows when in symbol layer - * Tab (right-hand outer thumb key) now does double duty to toggle symbol layer when held down - * Backspace (left-hand outer thumb key) now just toggles symbol layer (I wasn't using it as a backspace) - - -## Jan 19, 2016: - -* Made J into dual-action key (Alt when held down), to make Alt-tab more ergonomic. -* Made ' into dual-action key (Win/Cmd when held down). - diff --git a/layouts/community/ergodox/erez_experimental/rules.mk b/layouts/community/ergodox/erez_experimental/rules.mk deleted file mode 100644 index f68b56f87..000000000 --- a/layouts/community/ergodox/erez_experimental/rules.mk +++ /dev/null @@ -1,6 +0,0 @@ -# Having a file like this allows you to override Makefile definitions -# for your own particular keymap - -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -COMMAND_ENABLE = no # Commands for debug and configuration -LEADER_ENABLE = yes diff --git a/readme.md b/readme.md index 86cce5a99..b08c675e4 100644 --- a/readme.md +++ b/readme.md @@ -28,7 +28,7 @@ The project also includes community support for [lots of other keyboards](/keybo ## Maintainers -QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, [Hasu](https://github.com/tmk). The OLKB product firmwares are maintained by [Jack Humbert](https://github.com/jackhumbert), the Ergodox EZ by [Erez Zukerman](https://github.com/ezuk), the Clueboard by [Zach White](https://github.com/skullydazed), and the Atreus by [Phil Hagelberg](https://github.com/technomancy). +QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, [Hasu](https://github.com/tmk). The OLKB product firmwares are maintained by [Jack Humbert](https://github.com/jackhumbert), the Ergodox EZ by [ZSA Technology Labs](https://github.com/zsa), the Clueboard by [Zach White](https://github.com/skullydazed), and the Atreus by [Phil Hagelberg](https://github.com/technomancy). ## Official Website From acd3e79add2d47ab664b831936e5b6e71d3b8e15 Mon Sep 17 00:00:00 2001 From: yiancar Date: Thu, 16 May 2019 05:09:36 +0100 Subject: [PATCH 033/341] NK65 Addition (#5865) * Nk65 initial commit * Minor fix for compatibility * Make everything pretty * Update keyboards/nk65/config.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/nk65/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Chmod Dummy * Update getting_started_introduction.md * Revert "Update getting_started_introduction.md" This reverts commit daf446acf7ae4ae00488b389ce04f2cfca708d44. --- drivers/issi/is31fl3733.c | 38 +- drivers/issi/is31fl3733.h | 6 +- .../nk65/boards/GENERIC_STM32_F303XC/board.c | 126 + .../nk65/boards/GENERIC_STM32_F303XC/board.h | 1187 +++++++ .../nk65/boards/GENERIC_STM32_F303XC/board.mk | 5 + keyboards/nk65/bootloader_defs.h | 7 + keyboards/nk65/chconf.h | 520 +++ keyboards/nk65/config.h | 154 + keyboards/nk65/halconf.h | 388 +++ keyboards/nk65/info.json | 12 + keyboards/nk65/keymaps/default/keymap.c | 58 + keyboards/nk65/keymaps/default/readme.md | 6 + keyboards/nk65/keymaps/default_via/keymap.c | 58 + keyboards/nk65/keymaps/default_via/readme.md | 6 + keyboards/nk65/keymaps/default_via/rules.mk | 67 + keyboards/nk65/mcuconf.h | 257 ++ keyboards/nk65/nk65.c | 18 + keyboards/nk65/nk65.h | 38 + keyboards/nk65/readme.md | 37 + keyboards/nk65/rules.mk | 69 + keyboards/zeal60/rgb_backlight.c | 2890 +++++++++-------- quantum/led_matrix_drivers.c | 8 +- quantum/rgb_matrix_drivers.c | 8 +- 23 files changed, 4605 insertions(+), 1358 deletions(-) create mode 100755 keyboards/nk65/boards/GENERIC_STM32_F303XC/board.c create mode 100755 keyboards/nk65/boards/GENERIC_STM32_F303XC/board.h create mode 100755 keyboards/nk65/boards/GENERIC_STM32_F303XC/board.mk create mode 100755 keyboards/nk65/bootloader_defs.h create mode 100755 keyboards/nk65/chconf.h create mode 100755 keyboards/nk65/config.h create mode 100755 keyboards/nk65/halconf.h create mode 100755 keyboards/nk65/info.json create mode 100755 keyboards/nk65/keymaps/default/keymap.c create mode 100755 keyboards/nk65/keymaps/default/readme.md create mode 100755 keyboards/nk65/keymaps/default_via/keymap.c create mode 100755 keyboards/nk65/keymaps/default_via/readme.md create mode 100755 keyboards/nk65/keymaps/default_via/rules.mk create mode 100755 keyboards/nk65/mcuconf.h create mode 100755 keyboards/nk65/nk65.c create mode 100755 keyboards/nk65/nk65.h create mode 100755 keyboards/nk65/readme.md create mode 100755 keyboards/nk65/rules.mk diff --git a/drivers/issi/is31fl3733.c b/drivers/issi/is31fl3733.c index c18ed7ca3..aa247f4e8 100644 --- a/drivers/issi/is31fl3733.c +++ b/drivers/issi/is31fl3733.c @@ -75,10 +75,10 @@ uint8_t g_twi_transfer_buffer[20]; // buffers and the transfers in IS31FL3733_write_pwm_buffer() but it's // probably not worth the extra complexity. uint8_t g_pwm_buffer[DRIVER_COUNT][192]; -bool g_pwm_buffer_update_required = false; +bool g_pwm_buffer_update_required[DRIVER_COUNT] = { false }; uint8_t g_led_control_registers[DRIVER_COUNT][24] = { { 0 }, { 0 } }; -bool g_led_control_registers_update_required = false; +bool g_led_control_registers_update_required[DRIVER_COUNT] = { false }; void IS31FL3733_write_register( uint8_t addr, uint8_t reg, uint8_t data ) { @@ -123,12 +123,13 @@ void IS31FL3733_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer ) } } -void IS31FL3733_init( uint8_t addr ) +void IS31FL3733_init( uint8_t addr, uint8_t sync) { // In order to avoid the LEDs being driven with garbage data // in the LED driver's PWM registers, shutdown is enabled last. // Set up the mode and other settings, clear the PWM registers, // then disable software shutdown. + // Sync is passed so set it according to the datasheet. // Unlock the command register. IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); @@ -161,7 +162,7 @@ void IS31FL3733_init( uint8_t addr ) // Set global current to maximum. IS31FL3733_write_register( addr, ISSI_REG_GLOBALCURRENT, 0xFF ); // Disable software shutdown. - IS31FL3733_write_register( addr, ISSI_REG_CONFIGURATION, 0x01 ); + IS31FL3733_write_register( addr, ISSI_REG_CONFIGURATION, (sync << 6) | 0x01 ); // Wait 10ms to ensure the device has woken up. #ifdef __AVR__ @@ -179,7 +180,7 @@ void IS31FL3733_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) g_pwm_buffer[led.driver][led.r] = red; g_pwm_buffer[led.driver][led.g] = green; g_pwm_buffer[led.driver][led.b] = blue; - g_pwm_buffer_update_required = true; + g_pwm_buffer_update_required[led.driver] = true; } } @@ -218,35 +219,34 @@ void IS31FL3733_set_led_control_register( uint8_t index, bool red, bool green, b g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b); } - g_led_control_registers_update_required = true; + g_led_control_registers_update_required[led.driver] = true; } -void IS31FL3733_update_pwm_buffers( uint8_t addr1, uint8_t addr2 ) +void IS31FL3733_update_pwm_buffers( uint8_t addr, uint8_t index ) { - if ( g_pwm_buffer_update_required ) + if ( g_pwm_buffer_update_required[index] ) { // Firstly we need to unlock the command register and select PG1 - IS31FL3733_write_register( addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); - IS31FL3733_write_register( addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM ); + IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); + IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM ); - IS31FL3733_write_pwm_buffer( addr1, g_pwm_buffer[0] ); - //IS31FL3733_write_pwm_buffer( addr2, g_pwm_buffer[1] ); + IS31FL3733_write_pwm_buffer( addr, g_pwm_buffer[index] ); } - g_pwm_buffer_update_required = false; + g_pwm_buffer_update_required[index] = false; } -void IS31FL3733_update_led_control_registers( uint8_t addr1, uint8_t addr2 ) +void IS31FL3733_update_led_control_registers( uint8_t addr, uint8_t index ) { - if ( g_led_control_registers_update_required ) + if ( g_led_control_registers_update_required[index] ) { // Firstly we need to unlock the command register and select PG0 - IS31FL3733_write_register( addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); - IS31FL3733_write_register( addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL ); + IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); + IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL ); for ( int i=0; i<24; i++ ) { - IS31FL3733_write_register(addr1, i, g_led_control_registers[0][i] ); - //IS31FL3733_write_register(addr2, i, g_led_control_registers[1][i] ); + IS31FL3733_write_register(addr, i, g_led_control_registers[index][i] ); } } + g_led_control_registers_update_required[index] = false; } diff --git a/drivers/issi/is31fl3733.h b/drivers/issi/is31fl3733.h index 3d23b188a..e117b2546 100644 --- a/drivers/issi/is31fl3733.h +++ b/drivers/issi/is31fl3733.h @@ -32,7 +32,7 @@ typedef struct is31_led { extern const is31_led g_is31_leds[DRIVER_LED_TOTAL]; -void IS31FL3733_init( uint8_t addr ); +void IS31FL3733_init( uint8_t addr, uint8_t sync ); void IS31FL3733_write_register( uint8_t addr, uint8_t reg, uint8_t data ); void IS31FL3733_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer ); @@ -45,8 +45,8 @@ void IS31FL3733_set_led_control_register( uint8_t index, bool red, bool green, b // (eg. from a timer interrupt). // Call this while idle (in between matrix scans). // If the buffer is dirty, it will update the driver with the buffer. -void IS31FL3733_update_pwm_buffers( uint8_t addr1, uint8_t addr2 ); -void IS31FL3733_update_led_control_registers( uint8_t addr1, uint8_t addr2 ); +void IS31FL3733_update_pwm_buffers( uint8_t addr, uint8_t index ); +void IS31FL3733_update_led_control_registers( uint8_t addr, uint8_t index ); #define A_1 0x00 #define A_2 0x01 diff --git a/keyboards/nk65/boards/GENERIC_STM32_F303XC/board.c b/keyboards/nk65/boards/GENERIC_STM32_F303XC/board.c new file mode 100755 index 000000000..4331155df --- /dev/null +++ b/keyboards/nk65/boards/GENERIC_STM32_F303XC/board.c @@ -0,0 +1,126 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include "hal.h" + +#if HAL_USE_PAL || defined(__DOXYGEN__) +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +const PALConfig pal_default_config = { +#if STM32_HAS_GPIOA + {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, + VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, +#endif +#if STM32_HAS_GPIOB + {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, + VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, +#endif +#if STM32_HAS_GPIOC + {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, + VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, +#endif +#if STM32_HAS_GPIOD + {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, + VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, +#endif +#if STM32_HAS_GPIOE + {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, + VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, +#endif +#if STM32_HAS_GPIOF + {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, + VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, +#endif +#if STM32_HAS_GPIOG + {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, + VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, +#endif +#if STM32_HAS_GPIOH + {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, + VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, +#endif +#if STM32_HAS_GPIOI + {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} +#endif +}; +#endif + +void enter_bootloader_mode_if_requested(void); + +/** + * @brief Early initialization code. + * @details This initialization must be performed just after stack setup + * and before any other initialization. + */ +void __early_init(void) { + enter_bootloader_mode_if_requested(); + stm32_clock_init(); +} + +#if HAL_USE_SDC || defined(__DOXYGEN__) +/** + * @brief SDC card detection. + */ +bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief SDC card write protection detection. + */ +bool sdc_lld_is_write_protected(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif /* HAL_USE_SDC */ + +#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) +/** + * @brief MMC_SPI card detection. + */ +bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief MMC_SPI card write protection detection. + */ +bool mmc_lld_is_write_protected(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif + +/** + * @brief Board-specific initialization code. + * @todo Add your board-specific code, if any. + */ +void boardInit(void) { +} diff --git a/keyboards/nk65/boards/GENERIC_STM32_F303XC/board.h b/keyboards/nk65/boards/GENERIC_STM32_F303XC/board.h new file mode 100755 index 000000000..54df72ea6 --- /dev/null +++ b/keyboards/nk65/boards/GENERIC_STM32_F303XC/board.h @@ -0,0 +1,1187 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _BOARD_H_ +#define _BOARD_H_ + +/* + * Setup for NK65 Keyboard + */ + +/* + * Board identifier. + */ +#define BOARD_GENERIC_STM32_F303XC +#define BOARD_NAME "NK65 PCB" + +/* + * Board oscillators-related settings. + * NOTE: LSE not fitted. + */ +#if !defined(STM32_LSECLK) +#define STM32_LSECLK 0U +#endif + +#define STM32_LSEDRV (3U << 3U) + +#if !defined(STM32_HSECLK) +#define STM32_HSECLK 8000000U +#endif + +// #define STM32_HSE_BYPASS + +/* + * MCU type as defined in the ST header. + */ +#define STM32F303xC + +/* + * IO pins assignments. + */ +#define GPIOA_PIN0 0U +#define GPIOA_PIN1 1U +#define GPIOA_PIN2 2U +#define GPIOA_PIN3 3U +#define GPIOA_PIN4 4U +#define GPIOA_PIN5 5U +#define GPIOA_PIN6 6U +#define GPIOA_PIN7 7U +#define GPIOA_PIN8 8U +#define GPIOA_PIN9 9U +#define GPIOA_PIN10 10U +#define GPIOA_USB_DM 11U +#define GPIOA_USB_DP 12U +#define GPIOA_SWDIO 13U +#define GPIOA_SWCLK 14U +#define GPIOA_PIN15 15U + +#define GPIOB_PIN0 0U +#define GPIOB_PIN1 1U +#define GPIOB_PIN2 2U +#define GPIOB_PIN3 3U +#define GPIOB_PIN4 4U +#define GPIOB_PIN5 5U +#define GPIOB_PIN6 6U +#define GPIOB_PIN7 7U +#define GPIOB_PIN8 8U +#define GPIOB_PIN9 9U +#define GPIOB_PIN10 10U +#define GPIOB_PIN11 11U +#define GPIOB_PIN12 12U +#define GPIOB_PIN13 13U +#define GPIOB_PIN14 14U +#define GPIOB_PIN15 15U + +#define GPIOC_PIN0 0U +#define GPIOC_PIN1 1U +#define GPIOC_PIN2 2U +#define GPIOC_PIN3 3U +#define GPIOC_PIN4 4U +#define GPIOC_PIN5 5U +#define GPIOC_PIN6 6U +#define GPIOC_PIN7 7U +#define GPIOC_PIN8 8U +#define GPIOC_PIN9 9U +#define GPIOC_PIN10 10U +#define GPIOC_PIN11 11U +#define GPIOC_PIN12 12U +#define GPIOC_PIN13 13U +#define GPIOC_PIN14 14U +#define GPIOC_PIN15 15U + +#define GPIOD_PIN0 0U +#define GPIOD_PIN1 1U +#define GPIOD_PIN2 2U +#define GPIOD_PIN3 3U +#define GPIOD_PIN4 4U +#define GPIOD_PIN5 5U +#define GPIOD_PIN6 6U +#define GPIOD_PIN7 7U +#define GPIOD_PIN8 8U +#define GPIOD_PIN9 9U +#define GPIOD_PIN10 10U +#define GPIOD_PIN11 11U +#define GPIOD_PIN12 12U +#define GPIOD_PIN13 13U +#define GPIOD_PIN14 14U +#define GPIOD_PIN15 15U + +#define GPIOE_PIN0 0U +#define GPIOE_PIN1 1U +#define GPIOE_PIN2 2U +#define GPIOE_PIN3 3U +#define GPIOE_PIN4 4U +#define GPIOE_PIN5 5U +#define GPIOE_PIN6 6U +#define GPIOE_PIN7 7U +#define GPIOE_PIN8 8U +#define GPIOE_PIN9 9U +#define GPIOE_PIN10 10U +#define GPIOE_PIN11 11U +#define GPIOE_PIN12 12U +#define GPIOE_PIN13 13U +#define GPIOE_PIN14 14U +#define GPIOE_PIN15 15U + +#define GPIOF_I2C2_SDA 0U +#define GPIOF_I2C2_SCL 1U +#define GPIOF_PIN2 2U +#define GPIOF_PIN3 3U +#define GPIOF_PIN4 4U +#define GPIOF_PIN5 5U +#define GPIOF_PIN6 6U +#define GPIOF_PIN7 7U +#define GPIOF_PIN8 8U +#define GPIOF_PIN9 9U +#define GPIOF_PIN10 10U +#define GPIOF_PIN11 11U +#define GPIOF_PIN12 12U +#define GPIOF_PIN13 13U +#define GPIOF_PIN14 14U +#define GPIOF_PIN15 15U + +#define GPIOG_PIN0 0U +#define GPIOG_PIN1 1U +#define GPIOG_PIN2 2U +#define GPIOG_PIN3 3U +#define GPIOG_PIN4 4U +#define GPIOG_PIN5 5U +#define GPIOG_PIN6 6U +#define GPIOG_PIN7 7U +#define GPIOG_PIN8 8U +#define GPIOG_PIN9 9U +#define GPIOG_PIN10 10U +#define GPIOG_PIN11 11U +#define GPIOG_PIN12 12U +#define GPIOG_PIN13 13U +#define GPIOG_PIN14 14U +#define GPIOG_PIN15 15U + +#define GPIOH_PIN0 0U +#define GPIOH_PIN1 1U +#define GPIOH_PIN2 2U +#define GPIOH_PIN3 3U +#define GPIOH_PIN4 4U +#define GPIOH_PIN5 5U +#define GPIOH_PIN6 6U +#define GPIOH_PIN7 7U +#define GPIOH_PIN8 8U +#define GPIOH_PIN9 9U +#define GPIOH_PIN10 10U +#define GPIOH_PIN11 11U +#define GPIOH_PIN12 12U +#define GPIOH_PIN13 13U +#define GPIOH_PIN14 14U +#define GPIOH_PIN15 15U + +/* + * IO lines assignments. + */ +#define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U) +#define LINE_USB_DM PAL_LINE(GPIOA, 11U) +#define LINE_USB_DP PAL_LINE(GPIOA, 12U) +#define LINE_SWDIO PAL_LINE(GPIOA, 13U) +#define LINE_SWCLK PAL_LINE(GPIOA, 14U) + +#define LINE_PIN6 PAL_LINE(GPIOF, 0U) +#define LINE_PIN7 PAL_LINE(GPIOF, 1U) + +#define LINE_CAPS_LOCK PAL_LINE(GPIOB, 7U) + + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * Please refer to the STM32 Reference Manual for details. + */ +#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) +#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) +#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) +#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) +#define PIN_ODR_LOW(n) (0U << (n)) +#define PIN_ODR_HIGH(n) (1U << (n)) +#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) +#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) +#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) +#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) +#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) +#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) +#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) +#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) +#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) +#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) + +/* + * GPIOA setup: + * + * PA0 - NC + * PA1 - NC + * PA2 - COL1 + * PA3 - COL2 + * PA4 - SPEAKER1 + * PA5 - SPEAKER2 + * PA6 - COL3 + * PA7 - COL8 + * PA8 - COL6 + * PA9 - COL7 + * PA10 - ROW5 + * PA11 - USB_DM (alternate 14). + * PA12 - USB_DP (alternate 14). + * PA13 - SWDIO (alternate 0). + * PA14 - SWCLK (alternate 0). + * PA15 - ROW4 + */ +#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_PIN0) | \ + PIN_MODE_ALTERNATE(GPIOA_PIN1) | \ + PIN_MODE_INPUT(GPIOA_PIN2) | \ + PIN_MODE_INPUT(GPIOA_PIN3) | \ + PIN_MODE_INPUT(GPIOA_PIN4) | \ + PIN_MODE_INPUT(GPIOA_PIN5) | \ + PIN_MODE_INPUT(GPIOA_PIN6) | \ + PIN_MODE_INPUT(GPIOA_PIN7) | \ + PIN_MODE_INPUT(GPIOA_PIN8) | \ + PIN_MODE_INPUT(GPIOA_PIN9) | \ + PIN_MODE_INPUT(GPIOA_PIN10) | \ + PIN_MODE_ALTERNATE(GPIOA_USB_DM) | \ + PIN_MODE_ALTERNATE(GPIOA_USB_DP) | \ + PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ + PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ + PIN_MODE_INPUT(GPIOA_PIN15)) +#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) +#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_PIN0) | \ + PIN_OSPEED_HIGH(GPIOA_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ + PIN_OSPEED_HIGH(GPIOA_USB_DM) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ + PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ + PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN15)) +#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_PIN0) | \ + PIN_PUPDR_FLOATING(GPIOA_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ + PIN_PUPDR_FLOATING(GPIOA_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ + PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ + PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN15)) +#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_PIN0) | \ + PIN_ODR_HIGH(GPIOA_PIN1) | \ + PIN_ODR_HIGH(GPIOA_PIN2) | \ + PIN_ODR_HIGH(GPIOA_PIN3) | \ + PIN_ODR_HIGH(GPIOA_PIN4) | \ + PIN_ODR_HIGH(GPIOA_PIN5) | \ + PIN_ODR_HIGH(GPIOA_PIN6) | \ + PIN_ODR_HIGH(GPIOA_PIN7) | \ + PIN_ODR_HIGH(GPIOA_PIN8) | \ + PIN_ODR_HIGH(GPIOA_PIN9) | \ + PIN_ODR_HIGH(GPIOA_PIN10) | \ + PIN_ODR_HIGH(GPIOA_USB_DM) | \ + PIN_ODR_HIGH(GPIOA_USB_DP) | \ + PIN_ODR_HIGH(GPIOA_SWDIO) | \ + PIN_ODR_HIGH(GPIOA_SWCLK) | \ + PIN_ODR_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_PIN0, 0) | \ + PIN_AFIO_AF(GPIOA_PIN1, 1) | \ + PIN_AFIO_AF(GPIOA_PIN2, 0) | \ + PIN_AFIO_AF(GPIOA_PIN3, 0) | \ + PIN_AFIO_AF(GPIOA_PIN4, 0) | \ + PIN_AFIO_AF(GPIOA_PIN5, 5) | \ + PIN_AFIO_AF(GPIOA_PIN6, 5) | \ + PIN_AFIO_AF(GPIOA_PIN7, 5)) +#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0) | \ + PIN_AFIO_AF(GPIOA_PIN9, 0) | \ + PIN_AFIO_AF(GPIOA_PIN10, 0) | \ + PIN_AFIO_AF(GPIOA_USB_DM, 14) | \ + PIN_AFIO_AF(GPIOA_USB_DP, 14) | \ + PIN_AFIO_AF(GPIOA_SWDIO, 0) | \ + PIN_AFIO_AF(GPIOA_SWCLK, 0) | \ + PIN_AFIO_AF(GPIOA_PIN15, 0)) + +/* + * GPIOB setup: + * + * PB0 - PIN0 (input pullup). + * PB1 - PIN1 (input pullup). + * PB2 - PIN2 (input pullup). + * PB3 - PIN3 (alternate 0). + * PB4 - PIN4 (input pullup). + * PB5 - PIN5 (input pullup). + * PB6 - PIN6 LSM303DLHC_SCL (alternate 4). + * PB7 - PIN7 LSM303DLHC_SDA (alternate 4). + * PB8 - PIN8 (input pullup). + * PB9 - PIN9 (input pullup). + * PB10 - PIN10 (input pullup). + * PB11 - PIN11 (input pullup). + * PB12 - PIN12 (input pullup). + * PB13 - PIN13 (input pullup). + * PB14 - PIN14 (input pullup). + * PB15 - PIN15 (input pullup). + */ +#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ + PIN_MODE_INPUT(GPIOB_PIN1) | \ + PIN_MODE_INPUT(GPIOB_PIN2) | \ + PIN_MODE_ALTERNATE(GPIOB_PIN3) | \ + PIN_MODE_INPUT(GPIOB_PIN4) | \ + PIN_MODE_INPUT(GPIOB_PIN5) | \ + PIN_MODE_ALTERNATE(GPIOB_PIN6) | \ + PIN_MODE_OUTPUT(GPIOB_PIN7) | \ + PIN_MODE_INPUT(GPIOB_PIN8) | \ + PIN_MODE_INPUT(GPIOB_PIN9) | \ + PIN_MODE_INPUT(GPIOB_PIN10) | \ + PIN_MODE_INPUT(GPIOB_PIN11) | \ + PIN_MODE_INPUT(GPIOB_PIN12) | \ + PIN_MODE_INPUT(GPIOB_PIN13) | \ + PIN_MODE_INPUT(GPIOB_PIN14) | \ + PIN_MODE_INPUT(GPIOB_PIN15)) +#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ + PIN_OTYPE_OPENDRAIN(GPIOB_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) +#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN2) | \ + PIN_OSPEED_HIGH(GPIOB_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ + PIN_OSPEED_HIGH(GPIOB_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN15)) +#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ + PIN_PUPDR_FLOATING(GPIOB_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ + PIN_PUPDR_FLOATING(GPIOB_PIN6) | \ + PIN_PUPDR_PULLDOWN(GPIOB_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN15)) +#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ + PIN_ODR_HIGH(GPIOB_PIN1) | \ + PIN_ODR_HIGH(GPIOB_PIN2) | \ + PIN_ODR_HIGH(GPIOB_PIN3) | \ + PIN_ODR_HIGH(GPIOB_PIN4) | \ + PIN_ODR_HIGH(GPIOB_PIN5) | \ + PIN_ODR_HIGH(GPIOB_PIN6) | \ + PIN_ODR_LOW(GPIOB_PIN7) | \ + PIN_ODR_HIGH(GPIOB_PIN8) | \ + PIN_ODR_HIGH(GPIOB_PIN9) | \ + PIN_ODR_HIGH(GPIOB_PIN10) | \ + PIN_ODR_HIGH(GPIOB_PIN11) | \ + PIN_ODR_HIGH(GPIOB_PIN12) | \ + PIN_ODR_HIGH(GPIOB_PIN13) | \ + PIN_ODR_HIGH(GPIOB_PIN14) | \ + PIN_ODR_HIGH(GPIOB_PIN15)) +#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0) | \ + PIN_AFIO_AF(GPIOB_PIN1, 0) | \ + PIN_AFIO_AF(GPIOB_PIN2, 0) | \ + PIN_AFIO_AF(GPIOB_PIN3, 0) | \ + PIN_AFIO_AF(GPIOB_PIN4, 0) | \ + PIN_AFIO_AF(GPIOB_PIN5, 0) | \ + PIN_AFIO_AF(GPIOB_PIN6, 4) | \ + PIN_AFIO_AF(GPIOB_PIN7, 0)) +#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0) | \ + PIN_AFIO_AF(GPIOB_PIN9, 0) | \ + PIN_AFIO_AF(GPIOB_PIN10, 0) | \ + PIN_AFIO_AF(GPIOB_PIN11, 0) | \ + PIN_AFIO_AF(GPIOB_PIN12, 0) | \ + PIN_AFIO_AF(GPIOB_PIN13, 0) | \ + PIN_AFIO_AF(GPIOB_PIN14, 0) | \ + PIN_AFIO_AF(GPIOB_PIN15, 0)) + +/* + * GPIOC setup: + * + * PC0 - PIN0 (input pullup). + * PC1 - PIN1 (input pullup). + * PC2 - PIN2 (input pullup). + * PC3 - PIN3 (input pullup). + * PC4 - PIN4 (input pullup). + * PC5 - PIN5 (input pullup). + * PC6 - PIN6 (input pullup). + * PC7 - PIN7 (input pullup). + * PC8 - PIN8 (input pullup). + * PC9 - PIN9 (input pullup). + * PC10 - PIN10 (input pullup). + * PC11 - PIN11 (input pullup). + * PC12 - PIN12 (input pullup). + * PC13 - PIN13 (input pullup). + * PC14 - PIN14 (input floating). + * PC15 - PIN15 (input floating). + */ +#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_PIN0) | \ + PIN_MODE_INPUT(GPIOC_PIN1) | \ + PIN_MODE_INPUT(GPIOC_PIN2) | \ + PIN_MODE_INPUT(GPIOC_PIN3) | \ + PIN_MODE_INPUT(GPIOC_PIN4) | \ + PIN_MODE_INPUT(GPIOC_PIN5) | \ + PIN_MODE_INPUT(GPIOC_PIN6) | \ + PIN_MODE_INPUT(GPIOC_PIN7) | \ + PIN_MODE_INPUT(GPIOC_PIN8) | \ + PIN_MODE_INPUT(GPIOC_PIN9) | \ + PIN_MODE_INPUT(GPIOC_PIN10) | \ + PIN_MODE_INPUT(GPIOC_PIN11) | \ + PIN_MODE_INPUT(GPIOC_PIN12) | \ + PIN_MODE_INPUT(GPIOC_PIN13) | \ + PIN_MODE_INPUT(GPIOC_PIN14) | \ + PIN_MODE_INPUT(GPIOC_PIN15)) +#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN15)) +#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOC_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ + PIN_OSPEED_HIGH(GPIOC_PIN14) | \ + PIN_OSPEED_HIGH(GPIOC_PIN15)) +#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ + PIN_PUPDR_FLOATING(GPIOC_PIN14) | \ + PIN_PUPDR_FLOATING(GPIOC_PIN15)) +#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_PIN0) | \ + PIN_ODR_HIGH(GPIOC_PIN1) | \ + PIN_ODR_HIGH(GPIOC_PIN2) | \ + PIN_ODR_HIGH(GPIOC_PIN3) | \ + PIN_ODR_HIGH(GPIOC_PIN4) | \ + PIN_ODR_HIGH(GPIOC_PIN5) | \ + PIN_ODR_HIGH(GPIOC_PIN6) | \ + PIN_ODR_HIGH(GPIOC_PIN7) | \ + PIN_ODR_HIGH(GPIOC_PIN8) | \ + PIN_ODR_HIGH(GPIOC_PIN9) | \ + PIN_ODR_HIGH(GPIOC_PIN10) | \ + PIN_ODR_HIGH(GPIOC_PIN11) | \ + PIN_ODR_HIGH(GPIOC_PIN12) | \ + PIN_ODR_HIGH(GPIOC_PIN13) | \ + PIN_ODR_HIGH(GPIOC_PIN14) | \ + PIN_ODR_HIGH(GPIOC_PIN15)) +#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_PIN0, 0) | \ + PIN_AFIO_AF(GPIOC_PIN1, 0) | \ + PIN_AFIO_AF(GPIOC_PIN2, 0) | \ + PIN_AFIO_AF(GPIOC_PIN3, 0) | \ + PIN_AFIO_AF(GPIOC_PIN4, 0) | \ + PIN_AFIO_AF(GPIOC_PIN5, 0) | \ + PIN_AFIO_AF(GPIOC_PIN6, 0) | \ + PIN_AFIO_AF(GPIOC_PIN7, 0)) +#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0) | \ + PIN_AFIO_AF(GPIOC_PIN9, 0) | \ + PIN_AFIO_AF(GPIOC_PIN10, 0) | \ + PIN_AFIO_AF(GPIOC_PIN11, 0) | \ + PIN_AFIO_AF(GPIOC_PIN12, 0) | \ + PIN_AFIO_AF(GPIOC_PIN13, 0) | \ + PIN_AFIO_AF(GPIOC_PIN14, 0) | \ + PIN_AFIO_AF(GPIOC_PIN15, 0)) + +/* + * GPIOD setup: + * + * PD0 - PIN0 (input pullup). + * PD1 - PIN1 (input pullup). + * PD2 - PIN2 (input pullup). + * PD3 - PIN3 (input pullup). + * PD4 - PIN4 (input pullup). + * PD5 - PIN5 (input pullup). + * PD6 - PIN6 (input pullup). + * PD7 - PIN7 (input pullup). + * PD8 - PIN8 (input pullup). + * PD9 - PIN9 (input pullup). + * PD11 - PIN10 (input pullup). + * PD11 - PIN11 (input pullup). + * PD12 - PIN12 (input pullup). + * PD13 - PIN13 (input pullup). + * PD14 - PIN14 (input pullup). + * PD15 - PIN15 (input pullup). + */ +#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ + PIN_MODE_INPUT(GPIOD_PIN1) | \ + PIN_MODE_INPUT(GPIOD_PIN2) | \ + PIN_MODE_INPUT(GPIOD_PIN3) | \ + PIN_MODE_INPUT(GPIOD_PIN4) | \ + PIN_MODE_INPUT(GPIOD_PIN5) | \ + PIN_MODE_INPUT(GPIOD_PIN6) | \ + PIN_MODE_INPUT(GPIOD_PIN7) | \ + PIN_MODE_INPUT(GPIOD_PIN8) | \ + PIN_MODE_INPUT(GPIOD_PIN9) | \ + PIN_MODE_INPUT(GPIOD_PIN10) | \ + PIN_MODE_INPUT(GPIOD_PIN11) | \ + PIN_MODE_INPUT(GPIOD_PIN12) | \ + PIN_MODE_INPUT(GPIOD_PIN13) | \ + PIN_MODE_INPUT(GPIOD_PIN14) | \ + PIN_MODE_INPUT(GPIOD_PIN15)) +#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) +#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN15)) +#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN15)) +#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ + PIN_ODR_HIGH(GPIOD_PIN1) | \ + PIN_ODR_HIGH(GPIOD_PIN2) | \ + PIN_ODR_HIGH(GPIOD_PIN3) | \ + PIN_ODR_HIGH(GPIOD_PIN4) | \ + PIN_ODR_HIGH(GPIOD_PIN5) | \ + PIN_ODR_HIGH(GPIOD_PIN6) | \ + PIN_ODR_HIGH(GPIOD_PIN7) | \ + PIN_ODR_HIGH(GPIOD_PIN8) | \ + PIN_ODR_HIGH(GPIOD_PIN9) | \ + PIN_ODR_HIGH(GPIOD_PIN10) | \ + PIN_ODR_HIGH(GPIOD_PIN11) | \ + PIN_ODR_HIGH(GPIOD_PIN12) | \ + PIN_ODR_HIGH(GPIOD_PIN13) | \ + PIN_ODR_HIGH(GPIOD_PIN14) | \ + PIN_ODR_HIGH(GPIOD_PIN15)) +#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0) | \ + PIN_AFIO_AF(GPIOD_PIN1, 0) | \ + PIN_AFIO_AF(GPIOD_PIN2, 0) | \ + PIN_AFIO_AF(GPIOD_PIN3, 0) | \ + PIN_AFIO_AF(GPIOD_PIN4, 0) | \ + PIN_AFIO_AF(GPIOD_PIN5, 0) | \ + PIN_AFIO_AF(GPIOD_PIN6, 0) | \ + PIN_AFIO_AF(GPIOD_PIN7, 0)) +#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0) | \ + PIN_AFIO_AF(GPIOD_PIN9, 0) | \ + PIN_AFIO_AF(GPIOD_PIN10, 0) | \ + PIN_AFIO_AF(GPIOD_PIN11, 0) | \ + PIN_AFIO_AF(GPIOD_PIN12, 0) | \ + PIN_AFIO_AF(GPIOD_PIN13, 0) | \ + PIN_AFIO_AF(GPIOD_PIN14, 0) | \ + PIN_AFIO_AF(GPIOD_PIN15, 0)) + +/* + * GPIOE setup: + * + * PE0 - PIN0 (input pullup). + * PE1 - PIN1 (input pullup). + * PE2 - PIN2 (input pullup). + * PE3 - PIN3 L3GD20_CS (output pushpull maximum). + * PE4 - PIN4 (input pullup). + * PE5 - PIN5 (input pullup). + * PE6 - PIN6 (input pullup). + * PE7 - PIN7 (input pullup). + * PE8 - PIN8 (output pushpull maximum). + * PE9 - PIN9 (output pushpull maximum). + * PE10 - PIN10 (output pushpull maximum). + * PE11 - PIN11 (output pushpull maximum). + * PE12 - PIN12 (output pushpull maximum). + * PE13 - PIN13 (output pushpull maximum). + * PE14 - PIN14 (output pushpull maximum). + * PE15 - PIN15 (output pushpull maximum). + */ +#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ + PIN_MODE_INPUT(GPIOE_PIN1) | \ + PIN_MODE_INPUT(GPIOE_PIN2) |\ + PIN_MODE_OUTPUT(GPIOE_PIN3) | \ + PIN_MODE_INPUT(GPIOE_PIN4) |\ + PIN_MODE_INPUT(GPIOE_PIN5) |\ + PIN_MODE_INPUT(GPIOE_PIN6) | \ + PIN_MODE_INPUT(GPIOE_PIN7) | \ + PIN_MODE_OUTPUT(GPIOE_PIN8) | \ + PIN_MODE_OUTPUT(GPIOE_PIN9) | \ + PIN_MODE_OUTPUT(GPIOE_PIN10) | \ + PIN_MODE_OUTPUT(GPIOE_PIN11) | \ + PIN_MODE_OUTPUT(GPIOE_PIN12) | \ + PIN_MODE_OUTPUT(GPIOE_PIN13) | \ + PIN_MODE_OUTPUT(GPIOE_PIN14) | \ + PIN_MODE_OUTPUT(GPIOE_PIN15)) +#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) |\ + PIN_OTYPE_PUSHPULL(GPIOE_PIN1) |\ + PIN_OTYPE_PUSHPULL(GPIOE_PIN2) |\ + PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN4) |\ + PIN_OTYPE_PUSHPULL(GPIOE_PIN5) |\ + PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN10) |\ + PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN14) |\ + PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) +#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) |\ + PIN_OSPEED_VERYLOW(GPIOE_PIN1) |\ + PIN_OSPEED_VERYLOW(GPIOE_PIN2) |\ + PIN_OSPEED_HIGH(GPIOE_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN4) |\ + PIN_OSPEED_VERYLOW(GPIOE_PIN5) |\ + PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ + PIN_OSPEED_HIGH(GPIOE_PIN8) | \ + PIN_OSPEED_HIGH(GPIOE_PIN9) | \ + PIN_OSPEED_HIGH(GPIOE_PIN10) | \ + PIN_OSPEED_HIGH(GPIOE_PIN11) | \ + PIN_OSPEED_HIGH(GPIOE_PIN12) | \ + PIN_OSPEED_HIGH(GPIOE_PIN13) | \ + PIN_OSPEED_HIGH(GPIOE_PIN14) | \ + PIN_OSPEED_HIGH(GPIOE_PIN15)) +#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN2) |\ + PIN_PUPDR_FLOATING(GPIOE_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN4) |\ + PIN_PUPDR_PULLUP(GPIOE_PIN5) |\ + PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ + PIN_PUPDR_FLOATING(GPIOE_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ + PIN_PUPDR_FLOATING(GPIOE_PIN13) | \ + PIN_PUPDR_FLOATING(GPIOE_PIN14) |\ + PIN_PUPDR_FLOATING(GPIOE_PIN15)) +#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ + PIN_ODR_HIGH(GPIOE_PIN1) | \ + PIN_ODR_HIGH(GPIOE_PIN2) | \ + PIN_ODR_HIGH(GPIOE_PIN3) | \ + PIN_ODR_HIGH(GPIOE_PIN4) | \ + PIN_ODR_HIGH(GPIOE_PIN5) | \ + PIN_ODR_HIGH(GPIOE_PIN6) | \ + PIN_ODR_HIGH(GPIOE_PIN7) | \ + PIN_ODR_LOW(GPIOE_PIN8) | \ + PIN_ODR_LOW(GPIOE_PIN9) | \ + PIN_ODR_LOW(GPIOE_PIN10) | \ + PIN_ODR_LOW(GPIOE_PIN11) | \ + PIN_ODR_LOW(GPIOE_PIN12) | \ + PIN_ODR_LOW(GPIOE_PIN13) | \ + PIN_ODR_LOW(GPIOE_PIN14) | \ + PIN_ODR_LOW(GPIOE_PIN15)) +#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0) | \ + PIN_AFIO_AF(GPIOE_PIN1, 0) | \ + PIN_AFIO_AF(GPIOE_PIN2, 0) |\ + PIN_AFIO_AF(GPIOE_PIN3, 0) | \ + PIN_AFIO_AF(GPIOE_PIN4, 0) |\ + PIN_AFIO_AF(GPIOE_PIN5, 0) |\ + PIN_AFIO_AF(GPIOE_PIN6, 0) | \ + PIN_AFIO_AF(GPIOE_PIN7, 0)) +#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0) | \ + PIN_AFIO_AF(GPIOE_PIN9, 0) | \ + PIN_AFIO_AF(GPIOE_PIN10, 0) | \ + PIN_AFIO_AF(GPIOE_PIN11, 0) | \ + PIN_AFIO_AF(GPIOE_PIN12, 0) | \ + PIN_AFIO_AF(GPIOE_PIN13, 0) | \ + PIN_AFIO_AF(GPIOE_PIN14, 0) | \ + PIN_AFIO_AF(GPIOE_PIN15, 0)) + +/* + * GPIOF setup: + * + * PF0 - I2C2_SDA (input floating). + * PF1 - I2C2_SCL (input floating). + * PF2 - PIN2 (input pullup). + * PF3 - PIN3 (input pullup). + * PF4 - PIN4 (input pullup). + * PF5 - PIN5 (input pullup). + * PF6 - PIN6 (input pullup). + * PF7 - PIN7 (input pullup). + * PF8 - PIN8 (input pullup). + * PF9 - PIN9 (input pullup). + * PF10 - PIN10 (input pullup). + * PF11 - PIN11 (input pullup). + * PF12 - PIN12 (input pullup). + * PF13 - PIN13 (input pullup). + * PF14 - PIN14 (input pullup). + * PF15 - PIN15 (input pullup). + */ +#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_I2C2_SDA) | \ + PIN_MODE_INPUT(GPIOF_I2C2_SCL) | \ + PIN_MODE_INPUT(GPIOF_PIN2) | \ + PIN_MODE_INPUT(GPIOF_PIN3) | \ + PIN_MODE_INPUT(GPIOF_PIN4) | \ + PIN_MODE_INPUT(GPIOF_PIN5) | \ + PIN_MODE_INPUT(GPIOF_PIN6) | \ + PIN_MODE_INPUT(GPIOF_PIN7) | \ + PIN_MODE_INPUT(GPIOF_PIN8) | \ + PIN_MODE_INPUT(GPIOF_PIN9) | \ + PIN_MODE_INPUT(GPIOF_PIN10) | \ + PIN_MODE_INPUT(GPIOF_PIN11) | \ + PIN_MODE_INPUT(GPIOF_PIN12) | \ + PIN_MODE_INPUT(GPIOF_PIN13) | \ + PIN_MODE_INPUT(GPIOF_PIN14) | \ + PIN_MODE_INPUT(GPIOF_PIN15)) +#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SDA) | \ + PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SCL) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) +#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_HIGH(GPIOF_I2C2_SDA) | \ + PIN_OSPEED_HIGH(GPIOF_I2C2_SCL) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN15)) +#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_I2C2_SDA) | \ + PIN_PUPDR_FLOATING(GPIOF_I2C2_SCL) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN15)) +#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_I2C2_SDA) | \ + PIN_ODR_HIGH(GPIOF_I2C2_SCL) | \ + PIN_ODR_HIGH(GPIOF_PIN2) | \ + PIN_ODR_HIGH(GPIOF_PIN3) | \ + PIN_ODR_HIGH(GPIOF_PIN4) | \ + PIN_ODR_HIGH(GPIOF_PIN5) | \ + PIN_ODR_HIGH(GPIOF_PIN6) | \ + PIN_ODR_HIGH(GPIOF_PIN7) | \ + PIN_ODR_HIGH(GPIOF_PIN8) | \ + PIN_ODR_HIGH(GPIOF_PIN9) | \ + PIN_ODR_HIGH(GPIOF_PIN10) | \ + PIN_ODR_HIGH(GPIOF_PIN11) | \ + PIN_ODR_HIGH(GPIOF_PIN12) | \ + PIN_ODR_HIGH(GPIOF_PIN13) | \ + PIN_ODR_HIGH(GPIOF_PIN14) | \ + PIN_ODR_HIGH(GPIOF_PIN15)) +#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_I2C2_SDA, 0) | \ + PIN_AFIO_AF(GPIOF_I2C2_SCL, 0) | \ + PIN_AFIO_AF(GPIOF_PIN2, 0) | \ + PIN_AFIO_AF(GPIOF_PIN3, 0) | \ + PIN_AFIO_AF(GPIOF_PIN4, 0) | \ + PIN_AFIO_AF(GPIOF_PIN5, 0) | \ + PIN_AFIO_AF(GPIOF_PIN6, 0) | \ + PIN_AFIO_AF(GPIOF_PIN7, 0)) +#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0) | \ + PIN_AFIO_AF(GPIOF_PIN9, 0) | \ + PIN_AFIO_AF(GPIOF_PIN10, 0) | \ + PIN_AFIO_AF(GPIOF_PIN11, 0) | \ + PIN_AFIO_AF(GPIOF_PIN12, 0) | \ + PIN_AFIO_AF(GPIOF_PIN13, 0) | \ + PIN_AFIO_AF(GPIOF_PIN14, 0) | \ + PIN_AFIO_AF(GPIOF_PIN15, 0)) + +/* + * GPIOG setup: + * + * PG0 - PIN0 (input pullup). + * PG1 - PIN1 (input pullup). + * PG2 - PIN2 (input pullup). + * PG3 - PIN3 (input pullup). + * PG4 - PIN4 (input pullup). + * PG5 - PIN5 (input pullup). + * PG6 - PIN6 (input pullup). + * PG7 - PIN7 (input pullup). + * PG8 - PIN8 (input pullup). + * PG9 - PIN9 (input pullup). + * PG10 - PIN10 (input pullup). + * PG11 - PIN11 (input pullup). + * PG12 - PIN12 (input pullup). + * PG13 - PIN13 (input pullup). + * PG14 - PIN14 (input pullup). + * PG15 - PIN15 (input pullup). + */ +#define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_PIN0) | \ + PIN_MODE_INPUT(GPIOG_PIN1) | \ + PIN_MODE_INPUT(GPIOG_PIN2) | \ + PIN_MODE_INPUT(GPIOG_PIN3) | \ + PIN_MODE_INPUT(GPIOG_PIN4) | \ + PIN_MODE_INPUT(GPIOG_PIN5) | \ + PIN_MODE_INPUT(GPIOG_PIN6) | \ + PIN_MODE_INPUT(GPIOG_PIN7) | \ + PIN_MODE_INPUT(GPIOG_PIN8) | \ + PIN_MODE_INPUT(GPIOG_PIN9) | \ + PIN_MODE_INPUT(GPIOG_PIN10) | \ + PIN_MODE_INPUT(GPIOG_PIN11) | \ + PIN_MODE_INPUT(GPIOG_PIN12) | \ + PIN_MODE_INPUT(GPIOG_PIN13) | \ + PIN_MODE_INPUT(GPIOG_PIN14) | \ + PIN_MODE_INPUT(GPIOG_PIN15)) +#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN15)) +#define VAL_GPIOG_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOG_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN15)) +#define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN15)) +#define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | \ + PIN_ODR_HIGH(GPIOG_PIN1) | \ + PIN_ODR_HIGH(GPIOG_PIN2) | \ + PIN_ODR_HIGH(GPIOG_PIN3) | \ + PIN_ODR_HIGH(GPIOG_PIN4) | \ + PIN_ODR_HIGH(GPIOG_PIN5) | \ + PIN_ODR_HIGH(GPIOG_PIN6) | \ + PIN_ODR_HIGH(GPIOG_PIN7) | \ + PIN_ODR_HIGH(GPIOG_PIN8) | \ + PIN_ODR_HIGH(GPIOG_PIN9) | \ + PIN_ODR_HIGH(GPIOG_PIN10) | \ + PIN_ODR_HIGH(GPIOG_PIN11) | \ + PIN_ODR_HIGH(GPIOG_PIN12) | \ + PIN_ODR_HIGH(GPIOG_PIN13) | \ + PIN_ODR_HIGH(GPIOG_PIN14) | \ + PIN_ODR_HIGH(GPIOG_PIN15)) +#define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0) | \ + PIN_AFIO_AF(GPIOG_PIN1, 0) | \ + PIN_AFIO_AF(GPIOG_PIN2, 0) | \ + PIN_AFIO_AF(GPIOG_PIN3, 0) | \ + PIN_AFIO_AF(GPIOG_PIN4, 0) | \ + PIN_AFIO_AF(GPIOG_PIN5, 0) | \ + PIN_AFIO_AF(GPIOG_PIN6, 0) | \ + PIN_AFIO_AF(GPIOG_PIN7, 0)) +#define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0) | \ + PIN_AFIO_AF(GPIOG_PIN9, 0) | \ + PIN_AFIO_AF(GPIOG_PIN10, 0) | \ + PIN_AFIO_AF(GPIOG_PIN11, 0) | \ + PIN_AFIO_AF(GPIOG_PIN12, 0) | \ + PIN_AFIO_AF(GPIOG_PIN13, 0) | \ + PIN_AFIO_AF(GPIOG_PIN14, 0) | \ + PIN_AFIO_AF(GPIOG_PIN15, 0)) + +/* + * GPIOH setup: + * + * PH0 - PIN0 (input pullup). + * PH1 - PIN1 (input pullup). + * PH2 - PIN2 (input pullup). + * PH3 - PIN3 (input pullup). + * PH4 - PIN4 (input pullup). + * PH5 - PIN5 (input pullup). + * PH6 - PIN6 (input pullup). + * PH7 - PIN7 (input pullup). + * PH8 - PIN8 (input pullup). + * PH9 - PIN9 (input pullup). + * PH10 - PIN10 (input pullup). + * PH11 - PIN11 (input pullup). + * PH12 - PIN12 (input pullup). + * PH13 - PIN13 (input pullup). + * PH14 - PIN14 (input pullup). + * PH15 - PIN15 (input pullup). + */ +#define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_PIN0) | \ + PIN_MODE_INPUT(GPIOH_PIN1) | \ + PIN_MODE_INPUT(GPIOH_PIN2) | \ + PIN_MODE_INPUT(GPIOH_PIN3) | \ + PIN_MODE_INPUT(GPIOH_PIN4) | \ + PIN_MODE_INPUT(GPIOH_PIN5) | \ + PIN_MODE_INPUT(GPIOH_PIN6) | \ + PIN_MODE_INPUT(GPIOH_PIN7) | \ + PIN_MODE_INPUT(GPIOH_PIN8) | \ + PIN_MODE_INPUT(GPIOH_PIN9) | \ + PIN_MODE_INPUT(GPIOH_PIN10) | \ + PIN_MODE_INPUT(GPIOH_PIN11) | \ + PIN_MODE_INPUT(GPIOH_PIN12) | \ + PIN_MODE_INPUT(GPIOH_PIN13) | \ + PIN_MODE_INPUT(GPIOH_PIN14) | \ + PIN_MODE_INPUT(GPIOH_PIN15)) +#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN15)) +#define VAL_GPIOH_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOH_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN15)) +#define VAL_GPIOH_PUPDR (PIN_PUPDR_PULLUP(GPIOH_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN15)) +#define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_PIN0) | \ + PIN_ODR_HIGH(GPIOH_PIN1) | \ + PIN_ODR_HIGH(GPIOH_PIN2) | \ + PIN_ODR_HIGH(GPIOH_PIN3) | \ + PIN_ODR_HIGH(GPIOH_PIN4) | \ + PIN_ODR_HIGH(GPIOH_PIN5) | \ + PIN_ODR_HIGH(GPIOH_PIN6) | \ + PIN_ODR_HIGH(GPIOH_PIN7) | \ + PIN_ODR_HIGH(GPIOH_PIN8) | \ + PIN_ODR_HIGH(GPIOH_PIN9) | \ + PIN_ODR_HIGH(GPIOH_PIN10) | \ + PIN_ODR_HIGH(GPIOH_PIN11) | \ + PIN_ODR_HIGH(GPIOH_PIN12) | \ + PIN_ODR_HIGH(GPIOH_PIN13) | \ + PIN_ODR_HIGH(GPIOH_PIN14) | \ + PIN_ODR_HIGH(GPIOH_PIN15)) +#define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_PIN0, 0) | \ + PIN_AFIO_AF(GPIOH_PIN1, 0) | \ + PIN_AFIO_AF(GPIOH_PIN2, 0) | \ + PIN_AFIO_AF(GPIOH_PIN3, 0) | \ + PIN_AFIO_AF(GPIOH_PIN4, 0) | \ + PIN_AFIO_AF(GPIOH_PIN5, 0) | \ + PIN_AFIO_AF(GPIOH_PIN6, 0) | \ + PIN_AFIO_AF(GPIOH_PIN7, 0)) +#define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0) | \ + PIN_AFIO_AF(GPIOH_PIN9, 0) | \ + PIN_AFIO_AF(GPIOH_PIN10, 0) | \ + PIN_AFIO_AF(GPIOH_PIN11, 0) | \ + PIN_AFIO_AF(GPIOH_PIN12, 0) | \ + PIN_AFIO_AF(GPIOH_PIN13, 0) | \ + PIN_AFIO_AF(GPIOH_PIN14, 0) | \ + PIN_AFIO_AF(GPIOH_PIN15, 0)) + + +/* + * USB bus activation macro, required by the USB driver. + */ +// #define usb_lld_connect_bus(usbp) +#define usb_lld_connect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_ALTERNATE(14))) +// #define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT) +/* + * USB bus de-activation macro, required by the USB driver. + */ +// #define usb_lld_disconnect_bus(usbp) +#define usb_lld_disconnect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL)); palClearPad(GPIOA, GPIOA_USB_DP) +// #define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12) + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* _BOARD_H_ */ diff --git a/keyboards/nk65/boards/GENERIC_STM32_F303XC/board.mk b/keyboards/nk65/boards/GENERIC_STM32_F303XC/board.mk new file mode 100755 index 000000000..43377629a --- /dev/null +++ b/keyboards/nk65/boards/GENERIC_STM32_F303XC/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC diff --git a/keyboards/nk65/bootloader_defs.h b/keyboards/nk65/bootloader_defs.h new file mode 100755 index 000000000..3b0e9d20a --- /dev/null +++ b/keyboards/nk65/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here: + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFD800 diff --git a/keyboards/nk65/chconf.h b/keyboards/nk65/chconf.h new file mode 100755 index 000000000..1d9f12ff1 --- /dev/null +++ b/keyboards/nk65/chconf.h @@ -0,0 +1,520 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 100000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM TRUE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY TRUE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE TRUE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP TRUE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS TRUE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK TRUE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/nk65/config.h b/keyboards/nk65/config.h new file mode 100755 index 000000000..0edb1bb62 --- /dev/null +++ b/keyboards/nk65/config.h @@ -0,0 +1,154 @@ +/* +Copyright 2019 Yiancar + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x8968 +#define PRODUCT_ID 0x4E4B +#define DEVICE_VER 0x0001 +#define MANUFACTURER Yiancar-Designs +#define PRODUCT NK65 +#define DESCRIPTION A 65-percent, tool-free RGB keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#define MATRIX_ROW_PINS { B3, B4, B5, A8, A4 } +#define MATRIX_COL_PINS { A13, A10, A9, A14, A15, B8, B9, C13, C14, C15, A0, A1, A2, A3, A5 } +// To enable debugger set A13 A14 -> A5 A7 + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* Backlight options */ + +#define RGB_BACKLIGHT_ENABLED 1 + +#define RGB_BACKLIGHT_NK65 + +// they aren't really used if RGB_BACKLIGHT_HS60 defined +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0 +#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0 +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 0 +#define RGB_BACKLIGHT_USE_ISO_ENTER 0 +#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0 + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define RGB_BACKLIGHT_BRIGHTNESS 255 + +// the default effect (RGB test) +#define RGB_BACKLIGHT_EFFECT 255 + +// the default effect speed (0-3) +#define RGB_BACKLIGHT_EFFECT_SPEED 0 + +// the default color1 and color2 +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } + +#define DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL 128 + +// These define which keys in the matrix are alphas/mods +// Used for backlight effects so colors are different for +// alphas vs. mods +// Each value is for a row, bit 0 is column 0 +// Alpha=0 Mod=1 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0110000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0100000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0110000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0111000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0111111000000111 + +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 32 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 34 + +// Backlight config starts after EEPROM version +#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 35 +// Dynamic keymap starts after backlight config (35+32) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 67 +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 +// Dynamic macro starts after dynamic keymaps (67+(4*5*15*2)) = (67+600) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 667 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 398 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/nk65/halconf.h b/keyboards/nk65/halconf.h new file mode 100755 index 000000000..c3e0cbb72 --- /dev/null +++ b/keyboards/nk65/halconf.h @@ -0,0 +1,388 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC TRUE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT TRUE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C TRUE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM FALSE +#endif + +/** + * @brief Enables the QSPI subsystem. + */ +#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__) +#define HAL_USE_QSPI FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB TRUE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 16 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/keyboards/nk65/info.json b/keyboards/nk65/info.json new file mode 100755 index 000000000..ea227f71d --- /dev/null +++ b/keyboards/nk65/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "NK65", + "url": "", + "maintainer": "yiancar", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Home", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Page Up", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Page Down", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Fn", "x":11, "y":4}, {"label":"Ctrl", "x":12, "y":4}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/nk65/keymaps/default/keymap.c b/keyboards/nk65/keymaps/default/keymap.c new file mode 100755 index 000000000..a793a8bf4 --- /dev/null +++ b/keyboards/nk65/keymaps/default/keymap.c @@ -0,0 +1,58 @@ +/* Copyright 2019 Yiancar + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_65_ansi( /* Base */ + 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_HOME,\ + 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_PGUP,\ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,\ + 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_UP, KC_END, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + +[1] = LAYOUT_65_ansi( /* FN */ + 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, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_65_ansi( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[3] = LAYOUT_65_ansi( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} \ No newline at end of file diff --git a/keyboards/nk65/keymaps/default/readme.md b/keyboards/nk65/keymaps/default/readme.md new file mode 100755 index 000000000..27bcd0501 --- /dev/null +++ b/keyboards/nk65/keymaps/default/readme.md @@ -0,0 +1,6 @@ +The default keymap for NK65. VIA support disabled. +========================================================= + +![Layout image](https://i.imgur.com/DL0CjJO.png) + +Default layer is normal ANSI 65% \ No newline at end of file diff --git a/keyboards/nk65/keymaps/default_via/keymap.c b/keyboards/nk65/keymaps/default_via/keymap.c new file mode 100755 index 000000000..a793a8bf4 --- /dev/null +++ b/keyboards/nk65/keymaps/default_via/keymap.c @@ -0,0 +1,58 @@ +/* Copyright 2019 Yiancar + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_65_ansi( /* Base */ + 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_HOME,\ + 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_PGUP,\ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,\ + 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_UP, KC_END, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + +[1] = LAYOUT_65_ansi( /* FN */ + 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, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_65_ansi( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[3] = LAYOUT_65_ansi( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} \ No newline at end of file diff --git a/keyboards/nk65/keymaps/default_via/readme.md b/keyboards/nk65/keymaps/default_via/readme.md new file mode 100755 index 000000000..6689191e4 --- /dev/null +++ b/keyboards/nk65/keymaps/default_via/readme.md @@ -0,0 +1,6 @@ +The default keymap for NK65. VIA support enabled. +========================================================= + +![Layout image](https://i.imgur.com/DL0CjJO.png) + +Default layer is normal ANSI 65% \ No newline at end of file diff --git a/keyboards/nk65/keymaps/default_via/rules.mk b/keyboards/nk65/keymaps/default_via/rules.mk new file mode 100755 index 000000000..deb4fc889 --- /dev/null +++ b/keyboards/nk65/keymaps/default_via/rules.mk @@ -0,0 +1,67 @@ +# project specific files +SRC = keyboards/zeal60/zeal60.c \ + keyboards/zeal60/rgb_backlight.c \ + drivers/issi/is31fl3733.c \ + quantum/color.c \ + drivers/arm/i2c_master.c + +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F3xx + +# Linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F303xC + +# Startup code to use +# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f3xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = GENERIC_STM32_F303XC + +# Cortex version +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 + +USE_FPU = yes + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 +OPT_DEFS = + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p DF11 -v 0483 + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +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 = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +AUDIO_ENABLE = no # Audio output on port C6 +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in +#SERIAL_LINK_ENABLE = yes + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +CIE1931_CURVE = yes diff --git a/keyboards/nk65/mcuconf.h b/keyboards/nk65/mcuconf.h new file mode 100755 index 000000000..ce608f904 --- /dev/null +++ b/keyboards/nk65/mcuconf.h @@ -0,0 +1,257 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +/* + * STM32F3xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F3xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADC12PRES STM32_ADC12PRES_DIV1 +#define STM32_ADC34PRES STM32_ADC34PRES_DIV1 +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_USART2SW STM32_USART2SW_PCLK +#define STM32_USART3SW STM32_USART3SW_PCLK +#define STM32_UART4SW STM32_UART4SW_PCLK +#define STM32_UART5SW STM32_UART5SW_PCLK +#define STM32_I2C1SW STM32_I2C1SW_SYSCLK +#define STM32_I2C2SW STM32_I2C2SW_SYSCLK +#define STM32_TIM1SW STM32_TIM1SW_PCLK2 +#define STM32_TIM8SW STM32_TIM8SW_PCLK2 +#define STM32_RTCSEL STM32_RTCSEL_LSI +#define STM32_USB_CLOCK_REQUIRED TRUE +#define STM32_USBPRE STM32_USBPRE_DIV1P5 + +#undef STM32_HSE_BYPASS +// #error "oh no" +// #endif + +/* + * ADC driver system settings. + */ +#define STM32_ADC_DUAL_MODE FALSE +#define STM32_ADC_COMPACT_SAMPLES FALSE +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_USE_ADC2 FALSE +#define STM32_ADC_USE_ADC3 FALSE +#define STM32_ADC_USE_ADC4 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) +#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 1) +#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) +#define STM32_ADC_ADC4_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC2_DMA_PRIORITY 2 +#define STM32_ADC_ADC3_DMA_PRIORITY 2 +#define STM32_ADC_ADC4_DMA_PRIORITY 2 +#define STM32_ADC_ADC12_IRQ_PRIORITY 5 +#define STM32_ADC_ADC3_IRQ_PRIORITY 5 +#define STM32_ADC_ADC4_IRQ_PRIORITY 5 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC4_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC12_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 +#define STM32_ADC_ADC34_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * DAC driver system settings. + */ +#define STM32_DAC_DUAL_MODE FALSE +#define STM32_DAC_USE_DAC1_CH1 TRUE +#define STM32_DAC_USE_DAC1_CH2 TRUE +#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 +#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI20_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI33_IRQ_PRIORITY 6 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM4 TRUE +#define STM32_GPT_USE_TIM6 TRUE +#define STM32_GPT_USE_TIM7 TRUE +#define STM32_GPT_USE_TIM8 TRUE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM6_IRQ_PRIORITY 7 +#define STM32_GPT_TIM7_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 10 +#define STM32_I2C_I2C2_IRQ_PRIORITY 10 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 7 +#define STM32_PWM_TIM2_IRQ_PRIORITY 7 +#define STM32_PWM_TIM3_IRQ_PRIORITY 7 +#define STM32_PWM_TIM4_IRQ_PRIORITY 7 +#define STM32_PWM_TIM8_IRQ_PRIORITY 7 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USE_USART3 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_HP_IRQ_PRIORITY 13 +#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +#endif /* MCUCONF_H */ diff --git a/keyboards/nk65/nk65.c b/keyboards/nk65/nk65.c new file mode 100755 index 000000000..495246218 --- /dev/null +++ b/keyboards/nk65/nk65.c @@ -0,0 +1,18 @@ +/* Copyright 2019 Yiancar + * + * 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 . + */ + #ifndef RGB_BACKLIGHT_NK65 + #error RGB_BACKLIGHT_NK65 not defined, recheck config.h + #endif diff --git a/keyboards/nk65/nk65.h b/keyboards/nk65/nk65.h new file mode 100755 index 000000000..e45360541 --- /dev/null +++ b/keyboards/nk65/nk65.h @@ -0,0 +1,38 @@ +/* Copyright 2019 Yiancar + * + * 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 . + */ +#pragma once + +#define XXX KC_NO + +#include "quantum.h" +#include "../zeal60/rgb_backlight_keycodes.h" +#include "../zeal60/zeal60_keycodes.h" + +// This a shortcut to help you visually see your layout. + +#define LAYOUT_65_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K49, K4A, K4B, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, K49, K4A, K4B, K4C, K4D, K4E } \ +} diff --git a/keyboards/nk65/readme.md b/keyboards/nk65/readme.md new file mode 100755 index 000000000..c893c9782 --- /dev/null +++ b/keyboards/nk65/readme.md @@ -0,0 +1,37 @@ +NK65 +========= + +[NK65]() + +This is a standard fixed layout 65% PCB. It supports VIA and full per-key RGB. + +Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar) +Hardware Supported: A 65% keyboard with STM32F303CC +Hardware Availability: https://novelkeys.xyz/ + +Due to the RGB implementation, the NK65 is currently not compatible with community layouts. + +## Instructions + +### Build + +Make example for this keyboard (after setting up your build environment): + + make nk65:default_via + +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). + +### Reset + +- Unplug +- Hold Escape +- Plug In +- Unplug +- Release Escape + +### Flash + +- Unplug +- Hold Escape +- Plug In +- Flash using QMK Toolbox or dfu-util (`make nk65::dfu-util`) diff --git a/keyboards/nk65/rules.mk b/keyboards/nk65/rules.mk new file mode 100755 index 000000000..946722780 --- /dev/null +++ b/keyboards/nk65/rules.mk @@ -0,0 +1,69 @@ +# project specific files +SRC = keyboards/zeal60/zeal60.c \ + keyboards/zeal60/rgb_backlight.c \ + drivers/issi/is31fl3733.c \ + quantum/color.c \ + drivers/arm/i2c_master.c + +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F3xx + +# Linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F303xC + +# Startup code to use +# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f3xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = GENERIC_STM32_F303XC + +# Cortex version +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 + +USE_FPU = yes + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 +OPT_DEFS = + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p DF11 -v 0483 + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +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 = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +AUDIO_ENABLE = no # Audio output on port C6 +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in +#SERIAL_LINK_ENABLE = yes + +RAW_ENABLE = no +DYNAMIC_KEYMAP_ENABLE = no +CIE1931_CURVE = yes + +LAYOUTS = 65_ansi diff --git a/keyboards/zeal60/rgb_backlight.c b/keyboards/zeal60/rgb_backlight.c index d5f206fdc..a3f7151bf 100644 --- a/keyboards/zeal60/rgb_backlight.c +++ b/keyboards/zeal60/rgb_backlight.c @@ -15,9 +15,9 @@ */ #if RGB_BACKLIGHT_ENABLED -#if defined (RGB_BACKLIGHT_ZEAL60) || defined (RGB_BACKLIGHT_ZEAL65) || defined (RGB_BACKLIGHT_M60_A) || defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_KOYU) || defined(RGB_BACKLIGHT_HS60) +#if defined(RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_ZEAL65) || defined(RGB_BACKLIGHT_M60_A) || defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_KOYU) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) #else -#error None of the following was defined: RGB_BACKLIGHT_ZEAL60, RGB_BACKLIGHT_ZEAL65, RGB_BACKLIGHT_M60_A, RGB_BACKLIGHT_M6_B, RGB_BACKLIGHT_KOYU +#error None of the following was defined: RGB_BACKLIGHT_ZEAL60, RGB_BACKLIGHT_ZEAL65, RGB_BACKLIGHT_M60_A, RGB_BACKLIGHT_M6_B, RGB_BACKLIGHT_KOYU, RGB_BACKLIGHT_HS60, RGB_BACKLIGHT_NK65 #endif #ifndef MAX @@ -33,7 +33,7 @@ #include "rgb_backlight_api.h" #include "rgb_backlight_keycodes.h" -#if !defined(RGB_BACKLIGHT_HS60) +#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) #include #include #include @@ -47,12 +47,15 @@ #include "progmem.h" #include "quantum/color.h" -#if defined (RGB_BACKLIGHT_M6_B) +#if defined(RGB_BACKLIGHT_M6_B) #include "drivers/issi/is31fl3218.h" #define BACKLIGHT_LED_COUNT 6 -#elif defined (RGB_BACKLIGHT_HS60) +#elif defined(RGB_BACKLIGHT_HS60) #include "drivers/issi/is31fl3733.h" #define BACKLIGHT_LED_COUNT 64 +#elif defined(RGB_BACKLIGHT_NK65) +#include "drivers/issi/is31fl3733.h" +#define BACKLIGHT_LED_COUNT 69 #else #include "drivers/issi/is31fl3731.h" #define BACKLIGHT_LED_COUNT 72 @@ -61,31 +64,31 @@ #define BACKLIGHT_EFFECT_MAX 10 backlight_config g_config = { - .use_split_backspace = RGB_BACKLIGHT_USE_SPLIT_BACKSPACE, - .use_split_left_shift = RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT, - .use_split_right_shift = RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT, - .use_7u_spacebar = RGB_BACKLIGHT_USE_7U_SPACEBAR, - .use_iso_enter = RGB_BACKLIGHT_USE_ISO_ENTER, - .disable_hhkb_blocker_leds = RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS, - .disable_when_usb_suspended = RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED, - .disable_after_timeout = RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT, - .brightness = RGB_BACKLIGHT_BRIGHTNESS, - .effect = RGB_BACKLIGHT_EFFECT, - .effect_speed = RGB_BACKLIGHT_EFFECT_SPEED, - .color_1 = RGB_BACKLIGHT_COLOR_1, - .color_2 = RGB_BACKLIGHT_COLOR_2, - .caps_lock_indicator = RGB_BACKLIGHT_CAPS_LOCK_INDICATOR, - .layer_1_indicator = RGB_BACKLIGHT_LAYER_1_INDICATOR, - .layer_2_indicator = RGB_BACKLIGHT_LAYER_2_INDICATOR, - .layer_3_indicator = RGB_BACKLIGHT_LAYER_3_INDICATOR, - .alphas_mods = { - RGB_BACKLIGHT_ALPHAS_MODS_ROW_0, - RGB_BACKLIGHT_ALPHAS_MODS_ROW_1, - RGB_BACKLIGHT_ALPHAS_MODS_ROW_2, - RGB_BACKLIGHT_ALPHAS_MODS_ROW_3, - RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 }, + .use_split_backspace = RGB_BACKLIGHT_USE_SPLIT_BACKSPACE, + .use_split_left_shift = RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT, + .use_split_right_shift = RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT, + .use_7u_spacebar = RGB_BACKLIGHT_USE_7U_SPACEBAR, + .use_iso_enter = RGB_BACKLIGHT_USE_ISO_ENTER, + .disable_hhkb_blocker_leds = RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS, + .disable_when_usb_suspended = RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED, + .disable_after_timeout = RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT, + .brightness = RGB_BACKLIGHT_BRIGHTNESS, + .effect = RGB_BACKLIGHT_EFFECT, + .effect_speed = RGB_BACKLIGHT_EFFECT_SPEED, + .color_1 = RGB_BACKLIGHT_COLOR_1, + .color_2 = RGB_BACKLIGHT_COLOR_2, + .caps_lock_indicator = RGB_BACKLIGHT_CAPS_LOCK_INDICATOR, + .layer_1_indicator = RGB_BACKLIGHT_LAYER_1_INDICATOR, + .layer_2_indicator = RGB_BACKLIGHT_LAYER_2_INDICATOR, + .layer_3_indicator = RGB_BACKLIGHT_LAYER_3_INDICATOR, + .alphas_mods = { + RGB_BACKLIGHT_ALPHAS_MODS_ROW_0, + RGB_BACKLIGHT_ALPHAS_MODS_ROW_1, + RGB_BACKLIGHT_ALPHAS_MODS_ROW_2, + RGB_BACKLIGHT_ALPHAS_MODS_ROW_3, + RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 }, #if defined(RGB_BACKLIGHT_M6_B) - .custom_color = { { 0, 255 }, { 43, 255 }, { 85, 255 }, { 128, 255 }, { 171, 255 }, { 213, 255 } } + .custom_color = { { 0, 255 }, { 43, 255 }, { 85, 255 }, { 128, 255 }, { 171, 255 }, { 213, 255 } } #endif }; @@ -107,7 +110,6 @@ uint32_t g_any_key_hit = 0; // set to 0 for write, 1 for read (as per I2C protocol) // ADDR_2 is not needed. it is here as a dummy #define ISSI_ADDR_1 0x50 -#define ISSI_ADDR_2 0x50 const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations @@ -182,6 +184,152 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, K_16, J_16, L_16}, //LA64 }; +#elif defined(RGB_BACKLIGHT_NK65) + +// This is a 7-bit address, that gets left-shifted and bit 0 +// set to 0 for write, 1 for read (as per I2C protocol) +// ADDR_2 is not needed. it is here as a dummy +#define ISSI_ADDR_1 0x50 +#define ISSI_ADDR_2 0x52 + +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, B_1, A_1, C_1}, //LA1 + {0, E_1, D_1, F_1}, //LA2 + {0, H_1, G_1, I_1}, //LA3 + {0, K_1, J_1, L_1}, //LA4 + {0, B_2, A_2, C_2}, //LA5 + {0, E_2, D_2, F_2}, //LA6 + {0, H_2, G_2, I_2}, //LA7 + {0, K_2, J_2, L_2}, //LA8 + {0, B_3, A_3, C_3}, //LA9 + {0, E_3, D_3, F_3}, //LA10 + {0, H_3, G_3, I_3}, //LA11 + {0, K_3, J_3, L_3}, //LA12 + {0, B_4, A_4, C_4}, //LA13 + {0, E_4, D_4, F_4}, //LA14 + {0, H_4, G_4, I_4}, //LA15 + {0, K_4, J_4, L_4}, //LA16 + {0, B_5, A_5, C_5}, //LA17 + {0, E_5, D_5, F_5}, //LA18 + {0, H_5, G_5, I_5}, //LA19 + {0, K_5, J_5, L_5}, //LA20 + {0, B_6, A_6, C_6}, //LA21 + {0, E_6, D_6, F_6}, //LA22 + {0, H_6, G_6, I_6}, //LA23 + {0, K_6, J_6, L_6}, //LA24 + {0, B_7, A_7, C_7}, //LA25 + {0, E_7, D_7, F_7}, //LA26 + {0, H_7, G_7, I_7}, //LA27 + {0, K_7, J_7, L_7}, //LA28 + {0, B_8, A_8, C_8}, //LA29 + {0, E_8, D_8, F_8}, //LA30 + {0, H_8, G_8, I_8}, //LA31 + {0, K_8, J_8, L_8}, //LA32 + {0, B_9, A_9, C_9}, //LA33 + {0, E_9, D_9, F_9}, //LA34 + {0, H_9, G_9, I_9}, //LA35 + {0, K_9, J_9, L_9}, //LA36 + {0, B_10, A_10, C_10}, //LA37 + {0, E_10, D_10, F_10}, //LA38 + {0, H_10, G_10, I_10}, //LA39 + {0, K_10, J_10, L_10}, //LA40 + {0, B_11, A_11, C_11}, //LA41 + {0, E_11, D_11, F_11}, //LA42 + {0, H_11, G_11, I_11}, //LA43 + {0, K_11, J_11, L_11}, //LA44 + {0, B_12, A_12, C_12}, //LA45 + {0, E_12, D_12, F_12}, //LA46 + {0, H_12, G_12, I_12}, //LA47 + {0, K_12, J_12, L_12}, //LA48 + {0, B_13, A_13, C_13}, //LA49 + {0, E_13, D_13, F_13}, //LA50 + {0, H_13, G_13, I_13}, //LA51 + {0, K_13, J_13, L_13}, //LA52 + {0, B_14, A_14, C_14}, //LA53 + {0, E_14, D_14, F_14}, //LA54 + {0, H_14, G_14, I_14}, //LA55 + {0, K_14, J_14, L_14}, //LA56 + {0, B_15, A_15, C_15}, //LA57 + {0, E_15, D_15, F_15}, //LA58 + {0, H_15, G_15, I_15}, //LA59 + {0, K_15, J_15, L_15}, //LA60 + {0, B_16, A_16, C_16}, //LA61 + {0, E_16, D_16, F_16}, //LA62 + {0, H_16, G_16, I_16}, //LA63 + {0, K_16, J_16, L_16}, //LA64 + + {1, B_1, A_1, C_1}, //LB1 + {1, E_1, D_1, F_1}, //LB2 + {1, H_1, G_1, I_1}, //LB3 + {1, K_1, J_1, L_1}, //LB4 + {1, B_2, A_2, C_2}, //LB5 + {1, E_2, D_2, F_2}, //LB6 + {1, H_2, G_2, I_2}, //LB7 + {1, K_2, J_2, L_2}, //LB8 + {1, B_3, A_3, C_3}, //LB9 + {1, E_3, D_3, F_3}, //LB10 + {1, H_3, G_3, I_3}, //LB11 + {1, K_3, J_3, L_3}, //LB12 + {1, B_4, A_4, C_4}, //LB13 + {1, E_4, D_4, F_4}, //LB14 + {1, H_4, G_4, I_4}, //LB15 + {1, K_4, J_4, L_4}, //LB16 + {1, B_5, A_5, C_5}, //LB17 + {1, E_5, D_5, F_5}, //LB18 + {1, H_5, G_5, I_5}, //LB19 + {1, K_5, J_5, L_5}, //LB20 + {1, B_6, A_6, C_6}, //LB21 + {1, E_6, D_6, F_6}, //LB22 + {1, H_6, G_6, I_6}, //LB23 + {1, K_6, J_6, L_6}, //LB24 + {1, B_7, A_7, C_7}, //LB25 + {1, E_7, D_7, F_7}, //LB26 + {1, H_7, G_7, I_7}, //LB27 + {1, K_7, J_7, L_7}, //LB28 + {1, B_8, A_8, C_8}, //LB29 + {1, E_8, D_8, F_8}, //LB30 + {1, H_8, G_8, I_8}, //LB31 + {1, K_8, J_8, L_8}, //LB32 + {1, B_9, A_9, C_9}, //LB33 + {1, E_9, D_9, F_9}, //LB34 + {1, H_9, G_9, I_9}, //LB35 + {1, K_9, J_9, L_9}, //LB36 + {1, B_10, A_10, C_10}, //LB37 + {1, E_10, D_10, F_10}, //LB38 + {1, H_10, G_10, I_10}, //LB39 + {1, K_10, J_10, L_10}, //LB40 + {1, B_11, A_11, C_11}, //LB41 + {1, E_11, D_11, F_11}, //LB42 + {1, H_11, G_11, I_11}, //LB43 + {1, K_11, J_11, L_11}, //LB44 + {1, B_12, A_12, C_12}, //LB45 + {1, E_12, D_12, F_12}, //LB46 + {1, H_12, G_12, I_12}, //LB47 + {1, K_12, J_12, L_12}, //LB48 + {1, B_13, A_13, C_13}, //LB49 + {1, E_13, D_13, F_13}, //LB50 + {1, H_13, G_13, I_13}, //LB51 + {1, K_13, J_13, L_13}, //LB52 + {1, B_14, A_14, C_14}, //LB53 + {1, E_14, D_14, F_14}, //LB54 + {1, H_14, G_14, I_14}, //LB55 + {1, K_14, J_14, L_14}, //LB56 + {1, B_15, A_15, C_15}, //LB57 + {1, E_15, D_15, F_15}, //LB58 + {1, H_15, G_15, I_15}, //LB59 + {1, K_15, J_15, L_15}, //LB60 + {1, B_16, A_16, C_16}, //LB61 + {1, E_16, D_16, F_16}, //LB62 + {1, H_16, G_16, I_16}, //LB63 + {1, K_16, J_16, L_16}, //LB64 +}; + #elif !defined(RGB_BACKLIGHT_M6_B) // This is a 7-bit address, that gets left-shifted and bit 0 // set to 0 for write, 1 for read (as per I2C protocol) @@ -195,269 +343,292 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { * | | G location * | | | B location * | | | | */ - {0, C2_1, C3_1, C4_1}, // LA0 - {0, C1_1, C3_2, C4_2}, // LA1 - {0, C1_2, C2_2, C4_3}, // LA2 - {0, C1_3, C2_3, C3_3}, // LA3 - {0, C1_4, C2_4, C3_4}, // LA4 - {0, C1_5, C2_5, C3_5}, // LA5 - {0, C1_6, C2_6, C3_6}, // LA6 - {0, C1_7, C2_7, C3_7}, // LA7 - {0, C1_8, C2_8, C3_8}, // LA8 - {0, C9_1, C8_1, C7_1}, // LA9 - {0, C9_2, C8_2, C7_2}, // LA10 - {0, C9_3, C8_3, C7_3}, // LA11 - {0, C9_4, C8_4, C7_4}, // LA12 - {0, C9_5, C8_5, C7_5}, // LA13 - {0, C9_6, C8_6, C7_6}, // LA14 - {0, C9_7, C8_7, C6_6}, // LA15 - {0, C9_8, C7_7, C6_7}, // LA16 - {0, C8_8, C7_8, C6_8}, // LA17 + {0, C2_1, C3_1, C4_1}, // LA0 + {0, C1_1, C3_2, C4_2}, // LA1 + {0, C1_2, C2_2, C4_3}, // LA2 + {0, C1_3, C2_3, C3_3}, // LA3 + {0, C1_4, C2_4, C3_4}, // LA4 + {0, C1_5, C2_5, C3_5}, // LA5 + {0, C1_6, C2_6, C3_6}, // LA6 + {0, C1_7, C2_7, C3_7}, // LA7 + {0, C1_8, C2_8, C3_8}, // LA8 + {0, C9_1, C8_1, C7_1}, // LA9 + {0, C9_2, C8_2, C7_2}, // LA10 + {0, C9_3, C8_3, C7_3}, // LA11 + {0, C9_4, C8_4, C7_4}, // LA12 + {0, C9_5, C8_5, C7_5}, // LA13 + {0, C9_6, C8_6, C7_6}, // LA14 + {0, C9_7, C8_7, C6_6}, // LA15 + {0, C9_8, C7_7, C6_7}, // LA16 + {0, C8_8, C7_8, C6_8}, // LA17 - {0, C2_9, C3_9, C4_9}, // LB0 - {0, C1_9, C3_10, C4_10}, // LB1 - {0, C1_10, C2_10, C4_11}, // LB2 - {0, C1_11, C2_11, C3_11}, // LB3 - {0, C1_12, C2_12, C3_12}, // LB4 - {0, C1_13, C2_13, C3_13}, // LB5 - {0, C1_14, C2_14, C3_14}, // LB6 - {0, C1_15, C2_15, C3_15}, // LB7 - {0, C1_16, C2_16, C3_16}, // LB8 - {0, C9_9, C8_9, C7_9}, // LB9 - {0, C9_10, C8_10, C7_10}, // LB10 - {0, C9_11, C8_11, C7_11}, // LB11 - {0, C9_12, C8_12, C7_12}, // LB12 - {0, C9_13, C8_13, C7_13}, // LB13 - {0, C9_14, C8_14, C7_14}, // LB14 - {0, C9_15, C8_15, C6_14}, // LB15 - {0, C9_16, C7_15, C6_15}, // LB16 - {0, C8_16, C7_16, C6_16}, // LB17 + {0, C2_9, C3_9, C4_9}, // LB0 + {0, C1_9, C3_10, C4_10}, // LB1 + {0, C1_10, C2_10, C4_11}, // LB2 + {0, C1_11, C2_11, C3_11}, // LB3 + {0, C1_12, C2_12, C3_12}, // LB4 + {0, C1_13, C2_13, C3_13}, // LB5 + {0, C1_14, C2_14, C3_14}, // LB6 + {0, C1_15, C2_15, C3_15}, // LB7 + {0, C1_16, C2_16, C3_16}, // LB8 + {0, C9_9, C8_9, C7_9}, // LB9 + {0, C9_10, C8_10, C7_10}, // LB10 + {0, C9_11, C8_11, C7_11}, // LB11 + {0, C9_12, C8_12, C7_12}, // LB12 + {0, C9_13, C8_13, C7_13}, // LB13 + {0, C9_14, C8_14, C7_14}, // LB14 + {0, C9_15, C8_15, C6_14}, // LB15 + {0, C9_16, C7_15, C6_15}, // LB16 + {0, C8_16, C7_16, C6_16}, // LB17 - {1, C2_1, C3_1, C4_1}, // LC0 - {1, C1_1, C3_2, C4_2}, // LC1 - {1, C1_2, C2_2, C4_3}, // LC2 - {1, C1_3, C2_3, C3_3}, // LC3 - {1, C1_4, C2_4, C3_4}, // LC4 - {1, C1_5, C2_5, C3_5}, // LC5 - {1, C1_6, C2_6, C3_6}, // LC6 - {1, C1_7, C2_7, C3_7}, // LC7 - {1, C1_8, C2_8, C3_8}, // LC8 - {1, C9_1, C8_1, C7_1}, // LC9 - {1, C9_2, C8_2, C7_2}, // LC10 - {1, C9_3, C8_3, C7_3}, // LC11 - {1, C9_4, C8_4, C7_4}, // LC12 - {1, C9_5, C8_5, C7_5}, // LC13 - {1, C9_6, C8_6, C7_6}, // LC14 - {1, C9_7, C8_7, C6_6}, // LC15 - {1, C9_8, C7_7, C6_7}, // LC16 - {1, C8_8, C7_8, C6_8}, // LC17 + {1, C2_1, C3_1, C4_1}, // LC0 + {1, C1_1, C3_2, C4_2}, // LC1 + {1, C1_2, C2_2, C4_3}, // LC2 + {1, C1_3, C2_3, C3_3}, // LC3 + {1, C1_4, C2_4, C3_4}, // LC4 + {1, C1_5, C2_5, C3_5}, // LC5 + {1, C1_6, C2_6, C3_6}, // LC6 + {1, C1_7, C2_7, C3_7}, // LC7 + {1, C1_8, C2_8, C3_8}, // LC8 + {1, C9_1, C8_1, C7_1}, // LC9 + {1, C9_2, C8_2, C7_2}, // LC10 + {1, C9_3, C8_3, C7_3}, // LC11 + {1, C9_4, C8_4, C7_4}, // LC12 + {1, C9_5, C8_5, C7_5}, // LC13 + {1, C9_6, C8_6, C7_6}, // LC14 + {1, C9_7, C8_7, C6_6}, // LC15 + {1, C9_8, C7_7, C6_7}, // LC16 + {1, C8_8, C7_8, C6_8}, // LC17 - {1, C2_9, C3_9, C4_9}, // LD0 - {1, C1_9, C3_10, C4_10}, // LD1 - {1, C1_10, C2_10, C4_11}, // LD2 - {1, C1_11, C2_11, C3_11}, // LD3 - {1, C1_12, C2_12, C3_12}, // LD4 - {1, C1_13, C2_13, C3_13}, // LD5 - {1, C1_14, C2_14, C3_14}, // LD6 - {1, C1_15, C2_15, C3_15}, // LD7 - {1, C1_16, C2_16, C3_16}, // LD8 - {1, C9_9, C8_9, C7_9}, // LD9 - {1, C9_10, C8_10, C7_10}, // LD10 - {1, C9_11, C8_11, C7_11}, // LD11 - {1, C9_12, C8_12, C7_12}, // LD12 - {1, C9_13, C8_13, C7_13}, // LD13 - {1, C9_14, C8_14, C7_14}, // LD14 - {1, C9_15, C8_15, C6_14}, // LD15 - {1, C9_16, C7_15, C6_15}, // LD16 - {1, C8_16, C7_16, C6_16}, // LD17 + {1, C2_9, C3_9, C4_9}, // LD0 + {1, C1_9, C3_10, C4_10}, // LD1 + {1, C1_10, C2_10, C4_11}, // LD2 + {1, C1_11, C2_11, C3_11}, // LD3 + {1, C1_12, C2_12, C3_12}, // LD4 + {1, C1_13, C2_13, C3_13}, // LD5 + {1, C1_14, C2_14, C3_14}, // LD6 + {1, C1_15, C2_15, C3_15}, // LD7 + {1, C1_16, C2_16, C3_16}, // LD8 + {1, C9_9, C8_9, C7_9}, // LD9 + {1, C9_10, C8_10, C7_10}, // LD10 + {1, C9_11, C8_11, C7_11}, // LD11 + {1, C9_12, C8_12, C7_12}, // LD12 + {1, C9_13, C8_13, C7_13}, // LD13 + {1, C9_14, C8_14, C7_14}, // LD14 + {1, C9_15, C8_15, C6_14}, // LD15 + {1, C9_16, C7_15, C6_15}, // LD16 + {1, C8_16, C7_16, C6_16}, // LD17 }; #endif // !defined(RGB_BACKLIGHT_M6_B) typedef struct Point { - uint8_t x; - uint8_t y; + uint8_t x; + uint8_t y; } Point; // index in range 0..71 (LA0..LA17, LB0..LB17, LC0..LC17, LD0..LD17) // point values in range x=0..224 y=0..64 // origin is center of top-left key (i.e Esc) -#if defined (RGB_BACKLIGHT_ZEAL65) +#if defined(RGB_BACKLIGHT_ZEAL65) const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA0..LA17 - {120,16}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {4,16}, {4,32}, - {128,0}, {112,0}, {96,0}, {80,0}, {64,0}, {48,0}, {32,0}, {16,0}, {0,0}, - // LB0..LB17 - {144,0}, {160,0}, {176,0}, {192,0}, {216,0}, {224,0}, {240,0}, {240,16}, {240,32}, - {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, {240,48}, {240,64}, {224,64}, - // LC0..LC17 - {96,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {255,255}, {48,60}, {28,64}, - {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {20,44}, {10,48}, {4,64}, - // LD0..LD17 - {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {202,48}, {224,48}, - {116,48}, {132,48}, {148,48}, {164,48}, {255,255}, {144,60}, {164,64}, {188,64}, {208,64} + // LA0..LA17 + {120,16}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {4,16}, {4,32}, + {128,0}, {112,0}, {96,0}, {80,0}, {64,0}, {48,0}, {32,0}, {16,0}, {0,0}, + // LB0..LB17 + {144,0}, {160,0}, {176,0}, {192,0}, {216,0}, {224,0}, {240,0}, {240,16}, {240,32}, + {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, {240,48}, {240,64}, {224,64}, + // LC0..LC17 + {96,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {255,255}, {48,60}, {28,64}, + {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {20,44}, {10,48}, {4,64}, + // LD0..LD17 + {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {202,48}, {224,48}, + {116,48}, {132,48}, {148,48}, {164,48}, {255,255}, {144,60}, {164,64}, {188,64}, {208,64} }; const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA0..LA17 - {64,128}, {75,132}, {84,145}, {91,164}, {97,187}, {102,213}, {105,242}, {109,255}, {128,243}, - {61,255}, {67,255}, {72,255}, {77,255}, {82,255}, {86,255}, {90,255}, {93,255}, {96,255}, - // LB0..LB17 - {56,255}, {51,255}, {46,255}, {42,255}, {37,255}, {35,255}, {32,255}, {19,255}, {0,255}, - {53,132}, {44,145}, {37,164}, {31,187}, {26,213}, {22,249}, {237,255}, {224,255}, {221,255}, - // LC0..LC17 - {184,255}, {179,135}, {170,149}, {163,169}, {157,193}, {153,220}, {255,255}, {167,255}, {165,255}, - {128,26}, {128,60}, {128,94}, {128,128}, {128,162}, {128,196}, {145,233}, {148,255}, {161,255}, - // LD0..LD17 - {0,9}, {0,43}, {0,77}, {0,111}, {0,145}, {0,201}, {224,181}, {230,217}, {235,255}, - {189,128}, {200,131}, {210,141}, {218,159}, {255,255}, {201,228}, {206,255}, {213,255}, {218,255} + // LA0..LA17 + {64,128}, {75,132}, {84,145}, {91,164}, {97,187}, {102,213}, {105,242}, {109,255}, {128,243}, + {61,255}, {67,255}, {72,255}, {77,255}, {82,255}, {86,255}, {90,255}, {93,255}, {96,255}, + // LB0..LB17 + {56,255}, {51,255}, {46,255}, {42,255}, {37,255}, {35,255}, {32,255}, {19,255}, {0,255}, + {53,132}, {44,145}, {37,164}, {31,187}, {26,213}, {22,249}, {237,255}, {224,255}, {221,255}, + // LC0..LC17 + {184,255}, {179,135}, {170,149}, {163,169}, {157,193}, {153,220}, {255,255}, {167,255}, {165,255}, + {128,26}, {128,60}, {128,94}, {128,128}, {128,162}, {128,196}, {145,233}, {148,255}, {161,255}, + // LD0..LD17 + {0,9}, {0,43}, {0,77}, {0,111}, {0,145}, {0,201}, {224,181}, {230,217}, {235,255}, + {189,128}, {200,131}, {210,141}, {218,159}, {255,255}, {201,228}, {206,255}, {213,255}, {218,255} }; -#elif defined (RGB_BACKLIGHT_KOYU) +#elif defined(RGB_BACKLIGHT_KOYU) const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA0..LA17 - {120,16}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {4,16}, {4,32}, - {128,0}, {112,0}, {96,0}, {80,0}, {64,0}, {48,0}, {32,0}, {16,0}, {0,0}, - // LB0..LB17 - {144,0}, {160,0}, {176,0}, {192,0}, {208,0}, {224,0}, {240,0}, {240,16}, {240,32}, - {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, {240,48}, {240,64}, {224,64}, - // LC0..LC17 - {112,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {64,60}, {44,60}, {24,64}, - {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {255,255}, {10,48}, {4,64}, - // LD0..LD17 - {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {202,48}, {224,48}, - {116,48}, {132,48}, {148,48}, {164,48}, {255,255}, {160,60}, {180,64}, {208,64}, {255,255} + // LA0..LA17 + {120,16}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {4,16}, {4,32}, + {128,0}, {112,0}, {96,0}, {80,0}, {64,0}, {48,0}, {32,0}, {16,0}, {0,0}, + // LB0..LB17 + {144,0}, {160,0}, {176,0}, {192,0}, {208,0}, {224,0}, {240,0}, {240,16}, {240,32}, + {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, {240,48}, {240,64}, {224,64}, + // LC0..LC17 + {112,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {64,60}, {44,60}, {24,64}, + {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {255,255}, {10,48}, {4,64}, + // LD0..LD17 + {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {202,48}, {224,48}, + {116,48}, {132,48}, {148,48}, {164,48}, {255,255}, {160,60}, {180,64}, {208,64}, {255,255} }; const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA0..LA17 - {64,128}, {75,132}, {84,145}, {91,164}, {97,187}, {102,213}, {105,242}, {109,255}, {128,243}, - {61,255}, {67,255}, {72,255}, {77,255}, {82,255}, {86,255}, {90,255}, {93,255}, {96,255}, - // LB0..LB17 - {56,255}, {51,255}, {46,255}, {42,255}, {38,255}, {35,255}, {32,255}, {19,255}, {0,255}, - {53,132}, {44,145}, {37,164}, {31,187}, {26,213}, {22,249}, {237,255}, {224,255}, {221,255}, - // LC0..LC17 - {189,255}, {179,135}, {170,149}, {163,169}, {157,193}, {153,220}, {172,252}, {169,255}, {165,255}, - {128,26}, {128,60}, {128,94}, {128,128}, {128,162}, {128,196}, {255,255}, {148,255}, {161,255}, - // LD0..LD17 - {0,9}, {0,43}, {0,77}, {0,111}, {0,145}, {0,201}, {224,181}, {230,217}, {235,255}, - {189,128}, {200,131}, {210,141}, {218,159}, {255,255}, {207,238}, {211,255}, {218,255}, {255,255} + // LA0..LA17 + {64,128}, {75,132}, {84,145}, {91,164}, {97,187}, {102,213}, {105,242}, {109,255}, {128,243}, + {61,255}, {67,255}, {72,255}, {77,255}, {82,255}, {86,255}, {90,255}, {93,255}, {96,255}, + // LB0..LB17 + {56,255}, {51,255}, {46,255}, {42,255}, {38,255}, {35,255}, {32,255}, {19,255}, {0,255}, + {53,132}, {44,145}, {37,164}, {31,187}, {26,213}, {22,249}, {237,255}, {224,255}, {221,255}, + // LC0..LC17 + {189,255}, {179,135}, {170,149}, {163,169}, {157,193}, {153,220}, {172,252}, {169,255}, {165,255}, + {128,26}, {128,60}, {128,94}, {128,128}, {128,162}, {128,196}, {255,255}, {148,255}, {161,255}, + // LD0..LD17 + {0,9}, {0,43}, {0,77}, {0,111}, {0,145}, {0,201}, {224,181}, {230,217}, {235,255}, + {189,128}, {200,131}, {210,141}, {218,159}, {255,255}, {207,238}, {211,255}, {218,255}, {255,255} }; -#elif defined (RGB_BACKLIGHT_ZEAL60) || defined (RGB_BACKLIGHT_M60_A) +#elif defined(RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_M60_A) const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA0..LA17 - {120,16}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {4,16}, {4,32}, - {128,0}, {112,0}, {96,0}, {80,0}, {64,0}, {48,0}, {32,0}, {16,0}, {0,0}, - // LB0..LB17 - {144,0}, {160,0}, {176,0}, {192,0}, {216,0}, {224,0}, {255,255}, {255,255}, {255,255}, - {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, {255,255}, {255,255}, {255,255}, - // LC0..LC17 - {102,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {60,64}, {43,64}, {23,64}, - {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {20,48}, {2,48}, {3,64}, - // LD0..LD17 - {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {210,48}, {224,48}, - {116,48}, {132,48}, {148,48}, {164,48}, {144,64}, {161,64}, {181,64}, {201,64}, {221,64} + // LA0..LA17 + {120,16}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {4,16}, {4,32}, + {128,0}, {112,0}, {96,0}, {80,0}, {64,0}, {48,0}, {32,0}, {16,0}, {0,0}, + // LB0..LB17 + {144,0}, {160,0}, {176,0}, {192,0}, {216,0}, {224,0}, {255,255}, {255,255}, {255,255}, + {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, {255,255}, {255,255}, {255,255}, + // LC0..LC17 + {102,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {60,64}, {43,64}, {23,64}, + {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {20,48}, {2,48}, {3,64}, + // LD0..LD17 + {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {210,48}, {224,48}, + {116,48}, {132,48}, {148,48}, {164,48}, {144,64}, {161,64}, {181,64}, {201,64}, {221,64} }; const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA0..LA17 - {58,129}, {70,129}, {80,139}, {89,157}, {96,181}, {101,208}, {105,238}, {109,255}, {128,247}, {58,255}, - {64,255}, {70,255}, {75,255}, {80,255}, {85,255}, {89,255}, {93,255}, {96,255}, - // LB0..LB17 - {53,255}, {48,255}, {43,255}, {39,255}, {34,255}, {32,255}, {255,255}, {255,255}, {255,255}, - {48,139}, {39,157}, {32,181}, {27,208}, {23,238}, {19,255}, {255,255}, {255,255}, {255,255}, - // LC0..LC17 - {188,255}, {183,131}, {173,143}, {165,163}, {159,188}, {154,216}, {172,252}, {170,255}, {165,255}, - {128,9}, {128,46}, {128,82}, {128,119}, {128,155}, {128,192}, {150,244}, {147,255}, {161,255}, - // LD0..LD17 - {0,27}, {0,64}, {0,101}, {0,137}, {0,174}, {255,233}, {228,201}, {235,255}, {237,255}, - {195,128}, {206,136}, {215,152}, {222,175}, {205,234}, {209,255}, {214,255}, {219,255}, {223,255} + // LA0..LA17 + {58,129}, {70,129}, {80,139}, {89,157}, {96,181}, {101,208}, {105,238}, {109,255}, {128,247}, {58,255}, + {64,255}, {70,255}, {75,255}, {80,255}, {85,255}, {89,255}, {93,255}, {96,255}, + // LB0..LB17 + {53,255}, {48,255}, {43,255}, {39,255}, {34,255}, {32,255}, {255,255}, {255,255}, {255,255}, + {48,139}, {39,157}, {32,181}, {27,208}, {23,238}, {19,255}, {255,255}, {255,255}, {255,255}, + // LC0..LC17 + {188,255}, {183,131}, {173,143}, {165,163}, {159,188}, {154,216}, {172,252}, {170,255}, {165,255}, + {128,9}, {128,46}, {128,82}, {128,119}, {128,155}, {128,192}, {150,244}, {147,255}, {161,255}, + // LD0..LD17 + {0,27}, {0,64}, {0,101}, {0,137}, {0,174}, {255,233}, {228,201}, {235,255}, {237,255}, + {195,128}, {206,136}, {215,152}, {222,175}, {205,234}, {209,255}, {214,255}, {219,255}, {223,255} }; -#elif defined (RGB_BACKLIGHT_HS60) && defined (HS60_ANSI) +#elif defined(RGB_BACKLIGHT_HS60) && defined(HS60_ANSI) const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA1..LA47 - {0,0}, {4,16}, {6,32}, {10,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, - {48,0}, {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, - {96,0}, {104,16}, {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, - {148,48}, {144,0}, {152,16}, {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, - {255,255},// LA48 does not exist, dummy - // LA49..LA50 - {192,0}, {200,16}, - {255,255},// LA51 does not exit, dummy - // LA52..LA60 - {210,48}, {216,0}, {220,16}, {214,32}, {222,64}, {2,64}, {22,64}, {42,64}, {102,64}, - {255,255},// LA61 does not exit, dummy - {162,64}, {182,64}, {202,64} + // LA1..LA47 + {0,0}, {4,16}, {6,32}, {10,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, + {48,0}, {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, + {96,0}, {104,16}, {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, + {148,48}, {144,0}, {152,16}, {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, + {255,255},// LA48 does not exist, dummy + // LA49..LA50 + {192,0}, {200,16}, + {255,255},// LA51 does not exit, dummy + // LA52..LA60 + {210,48}, {216,0}, {220,16}, {214,32}, {222,64}, {2,64}, {22,64}, {42,64}, {102,64}, + {255,255},// LA61 does not exit, dummy + {162,64}, {182,64}, {202,64} }; const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA1..LA47 - {96,255}, {109,255}, {128,242}, {148,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, - {85,255}, {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, - {70,255}, {70,129}, {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, - {53,255}, {39,157}, {255,101}, {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, - {255,255},// LA48 does not exist, dummy - // LA49..LA50 - {39,255}, {23,238}, - {255,255},// LA51 does not exit, dummy - // LA52..LA60 - {235,255}, {33,255}, {19,255}, {255,233}, {224,255}, {160,255}, {164,255}, {169,255}, {188,255}, - {255,255},// LA61 does not exit, dummy - {209,255}, {215,255}, {220,255} + // LA1..LA47 + {96,255}, {109,255}, {128,242}, {148,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, + {85,255}, {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, + {70,255}, {70,129}, {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, + {53,255}, {39,157}, {255,101}, {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, + {255,255},// LA48 does not exist, dummy + // LA49..LA50 + {39,255}, {23,238}, + {255,255},// LA51 does not exit, dummy + // LA52..LA60 + {235,255}, {33,255}, {19,255}, {255,233}, {224,255}, {160,255}, {164,255}, {169,255}, {188,255}, + {255,255},// LA61 does not exit, dummy + {209,255}, {215,255}, {220,255} }; -#elif defined (RGB_BACKLIGHT_HS60) && defined (HS60_HHKB) +#elif defined(RGB_BACKLIGHT_HS60) && defined(HS60_HHKB) const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA1..LA60 - {0,0}, {4,16}, {6,32}, {10,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, - {48,0}, {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, - {96,0}, {104,16}, {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, - {148,48}, {144,0}, {152,16}, {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, - {224,0}, {192,0}, {200,16}, {202,48}, {224,48}, {208,0}, {220,16}, {214,32}, {220,64}, {4,64}, {24,64}, {44,64}, {112,64}, - {255,255}, {255,255}, // LA61..LA62 does not exit, dummy - // LA63..LA64 - {180,64}, {200,64} + // LA1..LA60 + {0,0}, {4,16}, {6,32}, {10,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, + {48,0}, {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, + {96,0}, {104,16}, {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, + {148,48}, {144,0}, {152,16}, {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, + {224,0}, {192,0}, {200,16}, {202,48}, {224,48}, {208,0}, {220,16}, {214,32}, {220,64}, {4,64}, {24,64}, {44,64}, {112,64}, + {255,255}, {255,255}, // LA61..LA62 does not exit, dummy + // LA63..LA64 + {180,64}, {200,64} }; const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA1..LA60 - {96,255}, {109,255}, {128,242}, {148,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, - {85,255}, {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, - {70,255}, {70,129}, {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, - {53,255}, {39,157}, {255,101}, {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, {32,255}, - {39,255}, {23,238}, {233,242}, {237,255}, {35,255}, {19,255}, {255,233}, {223,255}, {161,255}, {165,255}, {170,255}, {192,255}, - {255,255}, {255,255}, // LA61..LA62 does not exit, dummy - // LA63..LA64 - {214,255}, {219,255} + // LA1..LA60 + {96,255}, {109,255}, {128,242}, {148,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, + {85,255}, {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, + {70,255}, {70,129}, {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, + {53,255}, {39,157}, {255,101}, {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, {32,255}, + {39,255}, {23,238}, {233,242}, {237,255}, {35,255}, {19,255}, {255,233}, {223,255}, {161,255}, {165,255}, {170,255}, {192,255}, + {255,255}, {255,255}, // LA61..LA62 does not exit, dummy + // LA63..LA64 + {214,255}, {219,255} }; -#elif defined (RGB_BACKLIGHT_HS60) //HS60_ISO +#elif defined(RGB_BACKLIGHT_HS60) //HS60_ISO const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA1..LA50 - {0,0}, {4,16}, {6,32}, {2,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, {48,0}, - {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, {96,0}, {104,16}, - {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, {148,48}, {144,0}, {152,16}, - {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, {20,48}, {192,0}, {200,16}, - {255,255},// LA51 does not exit, dummy - // LA52..LA60 - {210,48}, {216,0}, {220,16}, {222,24}, {222,64}, {2,64}, {22,64}, {42,64}, {102,64}, - {255,255},// LA61 does not exit, dummy - {162,64}, {182,64}, {202,64} + // LA1..LA50 + {0,0}, {4,16}, {6,32}, {2,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, {48,0}, + {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, {96,0}, {104,16}, + {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, {148,48}, {144,0}, {152,16}, + {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, {20,48}, {192,0}, {200,16}, + {255,255},// LA51 does not exit, dummy + // LA52..LA60 + {210,48}, {216,0}, {220,16}, {222,24}, {222,64}, {2,64}, {22,64}, {42,64}, {102,64}, + {255,255},// LA61 does not exit, dummy + {162,64}, {182,64}, {202,64} }; const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA1..LA50 - {96,255}, {109,255}, {128,242}, {147,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, {85,255}, - {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, {70,255}, {70,129}, - {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, {53,255}, {39,157}, {255,101}, - {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, {150,246}, {39,255}, {23,238}, - {255,255},// LA51 does not exit, dummy - // LA52..LA60 - {235,255}, {33,255}, {19,255}, {10,255}, {224,255}, {160,255}, {164,255}, {169,255}, {188,255}, - {255,255},// LA61 does not exit, dummy - {209,255}, {215,255}, {220,255} + // LA1..LA50 + {96,255}, {109,255}, {128,242}, {147,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, {85,255}, + {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, {70,255}, {70,129}, + {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, {53,255}, {39,157}, {255,101}, + {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, {150,246}, {39,255}, {23,238}, + {255,255},// LA51 does not exit, dummy + // LA52..LA60 + {235,255}, {33,255}, {19,255}, {10,255}, {224,255}, {160,255}, {164,255}, {169,255}, {188,255}, + {255,255},// LA61 does not exit, dummy + {209,255}, {215,255}, {220,255} }; -#elif defined (RGB_BACKLIGHT_M6_B) +#elif defined(RGB_BACKLIGHT_NK65) +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA60 + {0,0}, {4,16}, {6,32}, {10,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, + {48,0}, {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, + {96,0}, {104,16}, {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, + {148,48}, {144,0}, {152,16}, {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, + {160,64}, {192,0}, {200,16}, {210,48}, {224,48}, {216,0}, {220,16}, {214,32}, {224,64}, {2,64}, {22,64}, {42,64}, {102,64}, + {255,255},// LA61 does not exit, dummy + //LA62..LB5 + {176,64}, {192,64}, {208,64}, {240,0}, {240,16}, {240,48}, {240,64}, {240,32} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA60 + {96,255}, {109,255}, {128,242}, {148,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, + {85,255}, {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, + {70,255}, {70,129}, {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, + {53,255}, {39,157}, {255,101}, {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, + {208,255}, {39,255}, {23,238}, {235,255}, {235,255}, {33,255}, {19,255}, {255,233}, {224,255}, {160,255}, {164,255}, {169,255}, {188,255}, + {255,255},// LA61 does not exit, dummy + //LA62..LB5 + {221,255}, {225,255}, {229,255}, {22,255}, {12,255}, {244,255}, {234,255}, {255,255}, +}; +#elif defined(RGB_BACKLIGHT_M6_B) // M6-B is really simple: // 0 3 5 // 1 2 4 const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { - {0,0}, {0,16}, {16,16}, {16,0}, {32,16}, {32,0} + {0,0}, {0,16}, {16,16}, {16,0}, {32,16}, {32,0} }; const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { - {160,255}, {96,255}, {77,255}, {179,255}, {51,255}, {205,255} + {160,255}, {96,255}, {77,255}, {179,255}, {51,255}, {205,255} }; #endif @@ -467,58 +638,58 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { // or having a large "bitmap" and sampling them. void map_led_to_point( uint8_t index, Point *point ) { - // Slightly messy way to get Point structs out of progmem. - uint8_t *addr = (uint8_t*)&g_map_led_to_point[index]; - point->x = pgm_read_byte(addr); - point->y = pgm_read_byte(addr+1); + // Slightly messy way to get Point structs out of progmem. + uint8_t *addr = (uint8_t*)&g_map_led_to_point[index]; + point->x = pgm_read_byte(addr); + point->y = pgm_read_byte(addr+1); -#if defined (RGB_BACKLIGHT_M6_B) - return; +#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) + return; #endif - switch (index) - { - case 18+4: // LB4A - if ( g_config.use_split_backspace ) - point->x -= 8; - break; -#if defined (RGB_BACKLIGHT_ZEAL60) - case 18+14: // LB14A - if ( g_config.use_iso_enter ) - point->y += 8; // extremely pedantic - break; - case 54+5: // LD5A - if ( !g_config.use_iso_enter ) - point->x -= 10; - break; - case 36+16: // LC16A - if ( !g_config.use_split_left_shift ) - point->x += 8; - break; + switch (index) + { + case 18+4: // LB4A + if ( g_config.use_split_backspace ) + point->x -= 8; + break; +#if defined(RGB_BACKLIGHT_ZEAL60) + case 18+14: // LB14A + if ( g_config.use_iso_enter ) + point->y += 8; // extremely pedantic + break; + case 54+5: // LD5A + if ( !g_config.use_iso_enter ) + point->x -= 10; + break; + case 36+16: // LC16A + if ( !g_config.use_split_left_shift ) + point->x += 8; + break; #endif -#if defined (RGB_BACKLIGHT_ZEAL60) || defined (RGB_BACKLIGHT_M60_A) - case 36+0: // LC0A - if ( g_config.use_7u_spacebar ) - point->x += 10; - break; - case 36+6: // LC6A - if ( g_config.use_7u_spacebar ) - point->x += 4; - break; - case 54+7: // LD7A - if ( !g_config.use_split_right_shift ) - point->x -= 8; - break; +#if defined(RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_M60_A) + case 36+0: // LC0A + if ( g_config.use_7u_spacebar ) + point->x += 10; + break; + case 36+6: // LC6A + if ( g_config.use_7u_spacebar ) + point->x += 4; + break; + case 54+7: // LD7A + if ( !g_config.use_split_right_shift ) + point->x -= 8; + break; #endif - } + } } void map_led_to_point_polar( uint8_t index, Point *point ) { - // Slightly messy way to get Point structs out of progmem. - uint8_t *addr = (uint8_t*)&g_map_led_to_point_polar[index]; - point->x = pgm_read_byte(addr); - point->y = pgm_read_byte(addr+1); + // Slightly messy way to get Point structs out of progmem. + uint8_t *addr = (uint8_t*)&g_map_led_to_point_polar[index]; + point->x = pgm_read_byte(addr); + point->y = pgm_read_byte(addr+1); } // @@ -526,7 +697,7 @@ void map_led_to_point_polar( uint8_t index, Point *point ) // -#if defined (RGB_BACKLIGHT_ZEAL65) +#if defined(RGB_BACKLIGHT_ZEAL65) // Note: Left spacebar stab is at 4,2 (LC7) // Right spacebar stab is at 4,9 (D14) // @@ -536,11 +707,11 @@ void map_led_to_point_polar( uint8_t index, Point *point ) // C16, C15, C5, C4, C3, C2, C1, D9, D10, D11, D12, D6, D7, D8, B15 // C17, C8, C7, ---, ---, ---, ---, C0, ---, D14, D15, D16, D17, B17, B16 const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - { 0+17, 0+16, 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+0, 18+1, 18+2, 18+3, 18+4, 18+6 }, - { 0+7, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 0+0, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14, 18+7 }, - { 0+8, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+0, 54+1, 54+2, 54+3, 54+4, 54+5, 18+5, 18+8 }, - { 36+16, 36+15, 36+5, 36+4, 36+3, 36+2, 36+1, 54+9, 54+10, 54+11, 54+12, 54+6, 54+7, 54+8, 18+15 }, - { 36+17, 36+8, 36+7, 255, 255, 255, 255, 36+0, 255, 54+14, 54+15, 54+16, 54+17, 18+17, 18+16 } + { 0+17, 0+16, 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+0, 18+1, 18+2, 18+3, 18+4, 18+6 }, + { 0+7, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 0+0, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14, 18+7 }, + { 0+8, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+0, 54+1, 54+2, 54+3, 54+4, 54+5, 18+5, 18+8 }, + { 36+16, 36+15, 36+5, 36+4, 36+3, 36+2, 36+1, 54+9, 54+10, 54+11, 54+12, 54+6, 54+7, 54+8, 18+15 }, + { 36+17, 36+8, 36+7, 255, 255, 255, 255, 36+0, 255, 54+14, 54+15, 54+16, 54+17, 18+17, 18+16 } }; #elif defined(RGB_BACKLIGHT_KOYU) // Note: Left spacebar stab is at 4,4 (LC6) @@ -552,13 +723,13 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { // C16, C15, C5, C4, C3, C2, C1, D9, D10, D11, D12, D6, D7, D8, B15 // C17, C8, C7, C6, ---, ---, ---, C0, ---, ---, D14, D15, D16, B17, B16 const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - { 0+17, 0+16, 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+0, 18+1, 18+2, 18+3, 18+4, 18+6 }, - { 0+7, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 0+0, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14, 18+7 }, - { 0+8, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+0, 54+1, 54+2, 54+3, 54+4, 54+5, 18+5, 18+8 }, - { 36+16, 36+15, 36+5, 36+4, 36+3, 36+2, 36+1, 54+9, 54+10, 54+11, 54+12, 54+6, 54+7, 54+8, 18+15 }, - { 36+17, 36+8, 36+7, 36+6, 255, 255, 255, 36+0, 255, 255, 54+14, 54+15, 54+16, 18+17, 18+16 } + { 0+17, 0+16, 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+0, 18+1, 18+2, 18+3, 18+4, 18+6 }, + { 0+7, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 0+0, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14, 18+7 }, + { 0+8, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+0, 54+1, 54+2, 54+3, 54+4, 54+5, 18+5, 18+8 }, + { 36+16, 36+15, 36+5, 36+4, 36+3, 36+2, 36+1, 54+9, 54+10, 54+11, 54+12, 54+6, 54+7, 54+8, 18+15 }, + { 36+17, 36+8, 36+7, 36+6, 255, 255, 255, 36+0, 255, 255, 54+14, 54+15, 54+16, 18+17, 18+16 } }; -#elif defined (RGB_BACKLIGHT_ZEAL60) || defined (RGB_BACKLIGHT_M60_A) +#elif defined(RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_M60_A) // Note: Left spacebar stab is at 4,3 (LC6) // Right spacebar stab is at 4,9 (LD13) or 4,10 (LD14) // @@ -568,13 +739,13 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { // C16, C15, C5, C4, C3, C2, C1, D9, D10, D11, D12, D6, D7, D8, // C17, C8, C7, C6, ---, ---, ---, C0, ---, D13, D14, D15, D16, D17, const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - { 0+17, 0+16, 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+0, 18+1, 18+2, 18+3, 18+4 }, - { 0+7, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 0+0, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14 }, - { 0+8, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+0, 54+1, 54+2, 54+3, 54+4, 54+5, 18+5 }, - { 36+16, 36+15, 36+5, 36+4, 36+3, 36+2, 36+1, 54+9, 54+10, 54+11, 54+12, 54+6, 54+7, 54+8 }, - { 36+17, 36+8, 36+7, 36+6, 255, 255, 255, 36+0, 255, 54+13, 54+14, 54+15, 54+16, 54+17 } + { 0+17, 0+16, 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+0, 18+1, 18+2, 18+3, 18+4 }, + { 0+7, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 0+0, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14 }, + { 0+8, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+0, 54+1, 54+2, 54+3, 54+4, 54+5, 18+5 }, + { 36+16, 36+15, 36+5, 36+4, 36+3, 36+2, 36+1, 54+9, 54+10, 54+11, 54+12, 54+6, 54+7, 54+8 }, + { 36+17, 36+8, 36+7, 36+6, 255, 255, 255, 36+0, 255, 54+13, 54+14, 54+15, 54+16, 54+17 } }; -#elif defined (RGB_BACKLIGHT_HS60) && defined (HS60_ANSI) +#elif defined(RGB_BACKLIGHT_HS60) && defined(HS60_ANSI) // // LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, // LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, ---, @@ -582,13 +753,13 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { // LA4, ---, LA8, LA12, LA16, LA20, LA24, LA28, LA32, LA36, LA40, LA44, ---, LA52, // LA57, LA58, LA59, ---, ---, ---, LA60, ---, ---, ---, LA62, LA63, LA64, LA56 const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1 }, - { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 255 }, - { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1 }, - { 4-1, 255, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 255, 52-1 }, - { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 62-1, 63-1, 64-1, 56-1 } + { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1 }, + { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 255 }, + { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1 }, + { 4-1, 255, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 255, 52-1 }, + { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 62-1, 63-1, 64-1, 56-1 } }; -#elif defined (RGB_BACKLIGHT_HS60) && defined (HS60_HHKB) +#elif defined(RGB_BACKLIGHT_HS60) && defined(HS60_HHKB) // // LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, // LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, LA48, @@ -596,13 +767,13 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { // LA4, ---, LA8, LA12, LA16, LA20, LA24, LA28, LA32, LA36, LA40, LA44, LA51, LA52, // LA57, LA58, LA59, ---, ---, ---, LA60, ---, ---, ---, ---, LA63, LA64, LA56 const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1 }, - { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 48-1 }, - { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1 }, - { 4-1, 255, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 51-1, 52-1 }, - { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 255, 63-1, 64-1, 56-1 } + { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1 }, + { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 48-1 }, + { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1 }, + { 4-1, 255, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 51-1, 52-1 }, + { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 255, 63-1, 64-1, 56-1 } }; -#elif defined (RGB_BACKLIGHT_HS60) //HS60_ISO +#elif defined(RGB_BACKLIGHT_HS60) //HS60_ISO // // LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, // LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, ---, @@ -610,75 +781,94 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { // LA4, LA48, LA8, LA12, LA16, LA20, LA24, LA28, LA32, LA36, LA40, LA44, ---, LA52, // LA57, LA58, LA59, ---, ---, ---, LA60, ---, ---, ---, LA62, LA63, LA64, LA56 const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1 }, - { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 255 }, - { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1 }, - { 4-1, 48-1, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 255, 52-1 }, - { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 62-1, 63-1, 64-1, 56-1 } + { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1 }, + { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 255 }, + { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1 }, + { 4-1, 48-1, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 255, 52-1 }, + { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 62-1, 63-1, 64-1, 56-1 } }; -#elif defined (RGB_BACKLIGHT_M6_B) +#elif defined(RGB_BACKLIGHT_NK65) +// +// LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, LB1, +// LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, ---, LB2, +// LA3, LA7, LA11, LA15, LA19, LA23, LA27, LA31, LA35, LA39, LA43, LA47, LA54, LA55, LB5, +// LA4, ---, LA8, LA12, LA16, LA20, LA24, LA28, LA32, LA36, LA40, LA44, LA51, LA52, LB3, +// LA57, LA58, LA59, ---, ---, ---, LA60, ---, ---, LA48, LA62, LA63, LA64, LA56, LB4 +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1, 1+64-1 }, + { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 255, 2+64-1 }, + { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1, 5+64-1 }, + { 4-1, 255, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 51-1, 52-1, 3+64-1 }, + { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 48-1, 62-1, 63-1, 64-1, 56-1, 4+64-1 } +}; +#elif defined(RGB_BACKLIGHT_M6_B) // M6-B is really simple: // 0 3 5 // 1 2 4 const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - { 0, 3, 5, 1, 2, 4 } + { 0, 3, 5, 1, 2, 4 } }; #endif void map_row_column_to_led( uint8_t row, uint8_t column, uint8_t *led ) { - *led = 255; - if ( row < MATRIX_ROWS && column < MATRIX_COLS ) - { - *led = pgm_read_byte(&g_map_row_column_to_led[row][column]); - } + *led = 255; + if ( row < MATRIX_ROWS && column < MATRIX_COLS ) + { + *led = pgm_read_byte(&g_map_row_column_to_led[row][column]); + } } void backlight_update_pwm_buffers(void) { -#if defined (RGB_BACKLIGHT_M6_B) - IS31FL3218_update_pwm_buffers(); -#elif defined (RGB_BACKLIGHT_HS60) - IS31FL3733_update_pwm_buffers( ISSI_ADDR_1, ISSI_ADDR_2 ); - IS31FL3733_update_led_control_registers( ISSI_ADDR_1, ISSI_ADDR_2 ); +#if defined(RGB_BACKLIGHT_M6_B) + IS31FL3218_update_pwm_buffers(); +#elif defined(RGB_BACKLIGHT_HS60) + IS31FL3733_update_pwm_buffers( ISSI_ADDR_1, 0 ); + IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); +#elif defined(RGB_BACKLIGHT_NK65) + IS31FL3733_update_pwm_buffers( ISSI_ADDR_1, 0 ); + IS31FL3733_update_pwm_buffers( ISSI_ADDR_2, 1 ); + IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); + IS31FL3733_update_led_control_registers( ISSI_ADDR_2, 1 ); #else - IS31FL3731_update_pwm_buffers( ISSI_ADDR_1, ISSI_ADDR_2 ); - IS31FL3731_update_led_control_registers( ISSI_ADDR_1, ISSI_ADDR_2 ); + IS31FL3731_update_pwm_buffers( ISSI_ADDR_1, ISSI_ADDR_2 ); + IS31FL3731_update_led_control_registers( ISSI_ADDR_1, ISSI_ADDR_2 ); #endif } void backlight_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) { -#if defined (RGB_BACKLIGHT_M6_B) - IS31FL3218_set_color( index, red, green, blue ); -#elif defined (RGB_BACKLIGHT_HS60) - IS31FL3733_set_color( index, red, green, blue ); +#if defined(RGB_BACKLIGHT_M6_B) + IS31FL3218_set_color( index, red, green, blue ); +#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) + IS31FL3733_set_color( index, red, green, blue ); #else - IS31FL3731_set_color( index, red, green, blue ); + IS31FL3731_set_color( index, red, green, blue ); #endif } void backlight_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) { -#if defined (RGB_BACKLIGHT_M6_B) - IS31FL3218_set_color_all( red, green, blue ); -#elif defined (RGB_BACKLIGHT_HS60) - IS31FL3733_set_color_all( red, green, blue ); +#if defined(RGB_BACKLIGHT_M6_B) + IS31FL3218_set_color_all( red, green, blue ); +#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) + IS31FL3733_set_color_all( red, green, blue ); #else - IS31FL3731_set_color_all( red, green, blue ); + IS31FL3731_set_color_all( red, green, blue ); #endif } void backlight_set_key_hit(uint8_t row, uint8_t column) { - uint8_t led; - map_row_column_to_led(row,column,&led); - g_key_hit[led] = 0; + uint8_t led; + map_row_column_to_led(row,column,&led); + g_key_hit[led] = 0; - g_any_key_hit = 0; + g_any_key_hit = 0; } -#if !defined(RGB_BACKLIGHT_HS60) +#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) // This is (F_CPU/1024) / 20 Hz // = 15625 Hz / 20 Hz // = 781 @@ -686,95 +876,95 @@ void backlight_set_key_hit(uint8_t row, uint8_t column) void backlight_timer_init(void) { - static uint8_t backlight_timer_is_init = 0; - if ( backlight_timer_is_init ) - { - return; - } - backlight_timer_is_init = 1; + static uint8_t backlight_timer_is_init = 0; + if ( backlight_timer_is_init ) + { + return; + } + backlight_timer_is_init = 1; - // Timer 3 setup - TCCR3B = _BV(WGM32) | // CTC mode OCR3A as TOP - _BV(CS32) | _BV(CS30); // prescale by /1024 - // Set TOP value - uint8_t sreg = SREG; - cli(); + // Timer 3 setup + TCCR3B = _BV(WGM32) | // CTC mode OCR3A as TOP + _BV(CS32) | _BV(CS30); // prescale by /1024 + // Set TOP value + uint8_t sreg = SREG; + cli(); - OCR3AH = (TIMER3_TOP >> 8) & 0xff; - OCR3AL = TIMER3_TOP & 0xff; - SREG = sreg; + OCR3AH = (TIMER3_TOP >> 8) & 0xff; + OCR3AL = TIMER3_TOP & 0xff; + SREG = sreg; } void backlight_timer_enable(void) { - TIMSK3 |= _BV(OCIE3A); + TIMSK3 |= _BV(OCIE3A); } void backlight_timer_disable(void) { - TIMSK3 &= ~_BV(OCIE3A); + TIMSK3 &= ~_BV(OCIE3A); } #else //STM32, use GPT with TIM4. Enable in halconf.h static void gpt_backlight_timer_task(GPTDriver *gptp); // Timer setup at 200Khz, callback at 10k ticks = 20Hz static GPTConfig gpt4cfg1 = { - .frequency = 200000U, - .callback = gpt_backlight_timer_task + .frequency = 200000U, + .callback = gpt_backlight_timer_task }; void backlight_timer_init(void) { - gptStart(&GPTD4, &gpt4cfg1); + gptStart(&GPTD4, &gpt4cfg1); } void backlight_timer_enable(void) { - gptStartContinuous(&GPTD4, 10000); + gptStartContinuous(&GPTD4, 10000); } void backlight_timer_disable(void) { - gptStopTimer(&GPTD4); + gptStopTimer(&GPTD4); } -#endif //!defined(RGB_BACKLIGHT_HS60) +#endif //!defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) void backlight_set_suspend_state(bool state) { - g_suspend_state = state; + g_suspend_state = state; } void backlight_set_indicator_state(uint8_t state) { - g_indicator_state = state; + g_indicator_state = state; } void backlight_effect_rgb_test(void) { - // Mask out bits 4 and 5 - // This 2-bit value will stay the same for 16 ticks. - switch ( (g_tick & 0x30) >> 4 ) - { - case 0: - { - backlight_set_color_all( 255, 0, 0 ); - break; - } - case 1: - { - backlight_set_color_all( 0, 255, 0 ); - break; - } - case 2: - { - backlight_set_color_all( 0, 0, 255 ); - break; - } - case 3: - { - backlight_set_color_all( 255, 255, 255 ); - break; - } - } + // Mask out bits 4 and 5 + // This 2-bit value will stay the same for 16 ticks. + switch ( (g_tick & 0x30) >> 4 ) + { + case 0: + { + backlight_set_color_all( 255, 0, 0 ); + break; + } + case 1: + { + backlight_set_color_all( 0, 255, 0 ); + break; + } + case 2: + { + backlight_set_color_all( 0, 0, 255 ); + break; + } + case 3: + { + backlight_set_color_all( 255, 255, 255 ); + break; + } + } } #if defined(RGB_DEBUGGING_ONLY) @@ -785,1179 +975,1221 @@ void backlight_effect_rgb_test(void) // ONLY USE THIS FOR TESTING LEDS! void backlight_effect_single_LED_test(void) { - static uint8_t color = 0; // 0,1,2 for R,G,B - static uint8_t row = 0; - static uint8_t column = 0; + static uint8_t color = 0; // 0,1,2 for R,G,B + static uint8_t row = 0; + static uint8_t column = 0; - static uint8_t tick = 0; - tick++; + static uint8_t tick = 0; + tick++; - if ( tick > 2 ) - { - tick = 0; - column++; - } - if ( column > 14 ) - { - column = 0; - row++; - } - if ( row > 4 ) - { - row = 0; - color++; - } - if ( color > 2 ) - { - color = 0; - } + if ( tick > 2 ) + { + tick = 0; + column++; + } + if ( column > 14 ) + { + column = 0; + row++; + } + if ( row > 4 ) + { + row = 0; + color++; + } + if ( color > 2 ) + { + color = 0; + } - uint8_t led; - map_row_column_to_led( row, column, &led ); - backlight_set_color_all( 255, 255, 255 ); - backlight_test_led( led, color==0, color==1, color==2 ); + uint8_t led; + map_row_column_to_led( row, column, &led ); + backlight_set_color_all( 255, 255, 255 ); + backlight_test_led( led, color==0, color==1, color==2 ); } #endif // defined(RGB_DEBUGGING_ONLY) // All LEDs off void backlight_effect_all_off(void) { - backlight_set_color_all( 0, 0, 0 ); + backlight_set_color_all( 0, 0, 0 ); } // Solid color void backlight_effect_solid_color(void) { - HSV hsv = { .h = g_config.color_1.h, .s = g_config.color_1.s, .v = g_config.brightness }; - RGB rgb = hsv_to_rgb( hsv ); - backlight_set_color_all( rgb.r, rgb.g, rgb.b ); + HSV hsv = { .h = g_config.color_1.h, .s = g_config.color_1.s, .v = g_config.brightness }; + RGB rgb = hsv_to_rgb( hsv ); + backlight_set_color_all( rgb.r, rgb.g, rgb.b ); } // alphas = color1, mods = color2 void backlight_effect_alphas_mods(void) { - RGB rgb1 = hsv_to_rgb( (HSV){ .h = g_config.color_1.h, .s = g_config.color_1.s, .v = g_config.brightness } ); - RGB rgb2 = hsv_to_rgb( (HSV){ .h = g_config.color_2.h, .s = g_config.color_2.s, .v = g_config.brightness } ); + RGB rgb1 = hsv_to_rgb( (HSV){ .h = g_config.color_1.h, .s = g_config.color_1.s, .v = g_config.brightness } ); + RGB rgb2 = hsv_to_rgb( (HSV){ .h = g_config.color_2.h, .s = g_config.color_2.s, .v = g_config.brightness } ); - for ( int row = 0; row < MATRIX_ROWS; row++ ) - { - for ( int column = 0; column < MATRIX_COLS; column++ ) - { - uint8_t index; - map_row_column_to_led( row, column, &index ); - if ( index < BACKLIGHT_LED_COUNT ) - { - if ( ( g_config.alphas_mods[row] & (1< 127 ) - { - deltaH -= 256; - } - else if ( deltaH < -127 ) - { - deltaH += 256; - } - // Divide delta by 4, this gives the delta per row - deltaH /= 4; + // Take the shortest path between hues + if ( deltaH > 127 ) + { + deltaH -= 256; + } + else if ( deltaH < -127 ) + { + deltaH += 256; + } + // Divide delta by 4, this gives the delta per row + deltaH /= 4; - int16_t s1 = g_config.color_1.s; - int16_t s2 = g_config.color_2.s; - int16_t deltaS = ( s2 - s1 ) / 4; + int16_t s1 = g_config.color_1.s; + int16_t s2 = g_config.color_2.s; + int16_t deltaS = ( s2 - s1 ) / 4; - HSV hsv = { .h = 0, .s = 255, .v = g_config.brightness }; - RGB rgb; - Point point; - for ( int i=0; i>4); - // Relies on hue being 8-bit and wrapping - hsv.h = g_config.color_1.h + ( deltaH * y ); - hsv.s = g_config.color_1.s + ( deltaS * y ); - rgb = hsv_to_rgb( hsv ); - backlight_set_color( i, rgb.r, rgb.g, rgb.b ); - } + HSV hsv = { .h = 0, .s = 255, .v = g_config.brightness }; + RGB rgb; + Point point; + for ( int i=0; i>4); + // Relies on hue being 8-bit and wrapping + hsv.h = g_config.color_1.h + ( deltaH * y ); + hsv.s = g_config.color_1.s + ( deltaS * y ); + rgb = hsv_to_rgb( hsv ); + backlight_set_color( i, rgb.r, rgb.g, rgb.b ); + } } void backlight_effect_raindrops(bool initialize) { - int16_t h1 = g_config.color_1.h; - int16_t h2 = g_config.color_2.h; - int16_t deltaH = h2 - h1; - deltaH /= 4; + int16_t h1 = g_config.color_1.h; + int16_t h2 = g_config.color_2.h; + int16_t deltaH = h2 - h1; + deltaH /= 4; - // Take the shortest path between hues - if ( deltaH > 127 ) - { - deltaH -= 256; - } - else if ( deltaH < -127 ) - { - deltaH += 256; - } + // Take the shortest path between hues + if ( deltaH > 127 ) + { + deltaH -= 256; + } + else if ( deltaH < -127 ) + { + deltaH += 256; + } - int16_t s1 = g_config.color_1.s; - int16_t s2 = g_config.color_2.s; - int16_t deltaS = ( s2 - s1 ) / 4; + int16_t s1 = g_config.color_1.s; + int16_t s2 = g_config.color_2.s; + int16_t deltaS = ( s2 - s1 ) / 4; - HSV hsv; - RGB rgb; + HSV hsv; + RGB rgb; - // Change one LED every tick - uint8_t led_to_change = ( g_tick & 0x000 ) == 0 ? rand() % BACKLIGHT_LED_COUNT : 255; + // Change one LED every tick + uint8_t led_to_change = ( g_tick & 0x000 ) == 0 ? rand() % BACKLIGHT_LED_COUNT : 255; - for ( int i=0; i> 2; - hsv.h = g_config.color_1.h + offset2; - hsv.s = 127 + ( point.y >> 1 ); - rgb = hsv_to_rgb( hsv ); - backlight_set_color( i, rgb.r, rgb.g, rgb.b ); - } + HSV hsv = { .h = 0, .s = g_config.color_1.s, .v = g_config.brightness }; + RGB rgb; + Point point; + for ( int i=0; i> 2; + hsv.h = g_config.color_1.h + offset2; + hsv.s = 127 + ( point.y >> 1 ); + rgb = hsv_to_rgb( hsv ); + backlight_set_color( i, rgb.r, rgb.g, rgb.b ); + } } #if defined(RGB_BACKLIGHT_M6_B) void backlight_effect_custom_colors(void) { - RGB rgb; - for ( uint8_t i = 0; i < 6; i++ ) - { - HSV hsv = { .h = g_config.custom_color[i].h, .s = g_config.custom_color[i].s, .v = g_config.brightness }; - rgb = hsv_to_rgb( hsv ); - uint8_t led; - map_row_column_to_led( 0, i, &led ); - backlight_set_color( led, rgb.r, rgb.g, rgb.b ); - } + RGB rgb; + for ( uint8_t i = 0; i < 6; i++ ) + { + HSV hsv = { .h = g_config.custom_color[i].h, .s = g_config.custom_color[i].s, .v = g_config.brightness }; + rgb = hsv_to_rgb( hsv ); + uint8_t led; + map_row_column_to_led( 0, i, &led ); + backlight_set_color( led, rgb.r, rgb.g, rgb.b ); + } } #endif void backlight_effect_indicators_set_colors( uint8_t index, HS color ) { - HSV hsv = { .h = color.h, .s = color.s, .v = g_config.brightness }; - RGB rgb = hsv_to_rgb( hsv ); - if ( index == 254 ) - { - backlight_set_color_all( rgb.r, rgb.g, rgb.b ); - } - else - { - backlight_set_color( index, rgb.r, rgb.g, rgb.b ); + HSV hsv = { .h = color.h, .s = color.s, .v = g_config.brightness }; + RGB rgb = hsv_to_rgb( hsv ); + if ( index == 254 ) + { + backlight_set_color_all( rgb.r, rgb.g, rgb.b ); + } + else + { + backlight_set_color( index, rgb.r, rgb.g, rgb.b ); - // If the spacebar LED is the indicator, - // do the same for the spacebar stabilizers - if ( index == 36+0 ) // LC0 - { -#if defined (RGB_BACKLIGHT_ZEAL65) - backlight_set_color( 36+7, rgb.r, rgb.g, rgb.b ); // LC7 - backlight_set_color( 54+14, rgb.r, rgb.g, rgb.b ); // LD14 -#elif defined (RGB_BACKLIGHT_KOYU) - backlight_set_color( 36+6, rgb.r, rgb.g, rgb.b ); // LC6 - backlight_set_color( 54+14, rgb.r, rgb.g, rgb.b ); // LD14 -#elif defined (RGB_BACKLIGHT_ZEAL60) || defined (RGB_BACKLIGHT_M60_A) - backlight_set_color( 36+6, rgb.r, rgb.g, rgb.b ); // LC6 - backlight_set_color( 54+13, rgb.r, rgb.g, rgb.b ); // LD13 - if ( g_config.use_7u_spacebar ) - { - backlight_set_color( 54+14, rgb.r, rgb.g, rgb.b ); // LD14 - } + // If the spacebar LED is the indicator, + // do the same for the spacebar stabilizers + if ( index == 36+0 ) // LC0 + { +#if defined(RGB_BACKLIGHT_ZEAL65) + backlight_set_color( 36+7, rgb.r, rgb.g, rgb.b ); // LC7 + backlight_set_color( 54+14, rgb.r, rgb.g, rgb.b ); // LD14 +#elif defined(RGB_BACKLIGHT_KOYU) + backlight_set_color( 36+6, rgb.r, rgb.g, rgb.b ); // LC6 + backlight_set_color( 54+14, rgb.r, rgb.g, rgb.b ); // LD14 +#elif defined(RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_M60_A) + backlight_set_color( 36+6, rgb.r, rgb.g, rgb.b ); // LC6 + backlight_set_color( 54+13, rgb.r, rgb.g, rgb.b ); // LD13 + if ( g_config.use_7u_spacebar ) + { + backlight_set_color( 54+14, rgb.r, rgb.g, rgb.b ); // LD14 + } #endif - } - } + } + } } // This runs after another backlight effect and replaces // colors already set void backlight_effect_indicators(void) { - if ( g_config.caps_lock_indicator.index != 255 && - ( g_indicator_state & (1< 0 && g_any_key_hit > g_config.disable_after_timeout * 60 * 20)); - uint8_t effect = suspend_backlight ? 0 : g_config.effect; + // Ideally we would also stop sending zeros to the LED driver PWM buffers + // while suspended and just do a software shutdown. This is a cheap hack for now. + bool suspend_backlight = ((g_suspend_state && g_config.disable_when_usb_suspended) || + (g_config.disable_after_timeout > 0 && g_any_key_hit > g_config.disable_after_timeout * 60 * 20)); + uint8_t effect = suspend_backlight ? 0 : g_config.effect; - // Keep track of the effect used last time, - // detect change in effect, so each effect can - // have an optional initialization. - static uint8_t effect_last = 255; - bool initialize = effect != effect_last; - effect_last = effect; + // Keep track of the effect used last time, + // detect change in effect, so each effect can + // have an optional initialization. + static uint8_t effect_last = 255; + bool initialize = effect != effect_last; + effect_last = effect; - // this gets ticked at 20 Hz. - // each effect can opt to do calculations - // and/or request PWM buffer updates. - switch ( effect ) - { - case 0: - backlight_effect_all_off(); - break; - case 1: - backlight_effect_solid_color(); - break; - case 2: + // this gets ticked at 20 Hz. + // each effect can opt to do calculations + // and/or request PWM buffer updates. + switch ( effect ) + { + case 0: + backlight_effect_all_off(); + break; + case 1: + backlight_effect_solid_color(); + break; + case 2: #if defined(RGB_BACKLIGHT_M6_B) - backlight_effect_custom_colors(); + backlight_effect_custom_colors(); #else - backlight_effect_alphas_mods(); + backlight_effect_alphas_mods(); #endif - break; - case 3: - backlight_effect_gradient_up_down(); - break; - case 4: - backlight_effect_raindrops( initialize ); - break; - case 5: - backlight_effect_cycle_all(); - break; - case 6: - backlight_effect_cycle_left_right(); - break; - case 7: - backlight_effect_cycle_up_down(); - break; - case 8: - backlight_effect_jellybean_raindrops( initialize ); - break; - case 9: - backlight_effect_cycle_radial1(); - break; - case 10: - backlight_effect_cycle_radial2(); - break; - default: - backlight_effect_all_off(); - break; - } + break; + case 3: + backlight_effect_gradient_up_down(); + break; + case 4: + backlight_effect_raindrops( initialize ); + break; + case 5: + backlight_effect_cycle_all(); + break; + case 6: + backlight_effect_cycle_left_right(); + break; + case 7: + backlight_effect_cycle_up_down(); + break; + case 8: + backlight_effect_jellybean_raindrops( initialize ); + break; + case 9: + backlight_effect_cycle_radial1(); + break; + case 10: + backlight_effect_cycle_radial2(); + break; + default: + backlight_effect_all_off(); + break; + } - if ( ! suspend_backlight ) - { + if ( ! suspend_backlight ) + { #if !defined(RGB_BACKLIGHT_M6_B) - backlight_effect_indicators(); + backlight_effect_indicators(); #endif - } + } } void backlight_set_indicator_index( uint8_t *index, uint8_t row, uint8_t column ) { - if ( row >= MATRIX_ROWS ) - { - // Special value, 255=none, 254=all - *index = row; - } - else - { - map_row_column_to_led( row, column, index ); - } + if ( row >= MATRIX_ROWS ) + { + // Special value, 255=none, 254=all + *index = row; + } + else + { + map_row_column_to_led( row, column, index ); + } } void backlight_get_indicator_row_col( uint8_t index, uint8_t *row, uint8_t *column ) { - if ( index == 255 || index == 254 ) - { - // Special value, 255=none, 254=all - *row = index; - *column = 0; - return; - } - for ( uint8_t r = 0; r < MATRIX_ROWS; r++ ) - { - for ( uint8_t c = 0; c < MATRIX_COLS; c++ ) - { - uint8_t i = 255; - map_row_column_to_led( r, c, &i ); - if ( i == index ) - { - *row = r; - *column = c; - return; - } - } - } + if ( index == 255 || index == 254 ) + { + // Special value, 255=none, 254=all + *row = index; + *column = 0; + return; + } + for ( uint8_t r = 0; r < MATRIX_ROWS; r++ ) + { + for ( uint8_t c = 0; c < MATRIX_COLS; c++ ) + { + uint8_t i = 255; + map_row_column_to_led( r, c, &i ); + if ( i == index ) + { + *row = r; + *column = c; + return; + } + } + } } // Some helpers for setting/getting HSV void _set_color( HS *color, uint8_t *data ) { - color->h = data[0]; - color->s = data[1]; + color->h = data[0]; + color->s = data[1]; } void _get_color( HS *color, uint8_t *data ) { - data[0] = color->h; - data[1] = color->s; + data[0] = color->h; + data[1] = color->s; } void backlight_config_set_value( uint8_t *data ) { - bool reinitialize = false; - uint8_t *value_id = &(data[0]); - uint8_t *value_data = &(data[1]); - switch ( *value_id ) - { + bool reinitialize = false; + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + switch ( *value_id ) + { #if defined (RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_ZEAL65) - case id_use_split_backspace: - { - g_config.use_split_backspace = (bool)*value_data; - reinitialize = true; - break; - } + case id_use_split_backspace: + { + g_config.use_split_backspace = (bool)*value_data; + reinitialize = true; + break; + } #endif #if defined (RGB_BACKLIGHT_ZEAL60) - case id_use_split_left_shift: - { - g_config.use_split_left_shift = (bool)*value_data; - reinitialize = true; - break; - } - case id_use_split_right_shift: - { - g_config.use_split_right_shift = (bool)*value_data; - reinitialize = true; - break; - } - case id_use_7u_spacebar: - { - g_config.use_7u_spacebar = (bool)*value_data; - reinitialize = true; - break; - } - case id_use_iso_enter: - { - g_config.use_iso_enter = (bool)*value_data; - reinitialize = true; - break; - } - case id_disable_hhkb_blocker_leds: - { - g_config.disable_hhkb_blocker_leds = (bool)*value_data; - reinitialize = true; - break; - } + case id_use_split_left_shift: + { + g_config.use_split_left_shift = (bool)*value_data; + reinitialize = true; + break; + } + case id_use_split_right_shift: + { + g_config.use_split_right_shift = (bool)*value_data; + reinitialize = true; + break; + } + case id_use_7u_spacebar: + { + g_config.use_7u_spacebar = (bool)*value_data; + reinitialize = true; + break; + } + case id_use_iso_enter: + { + g_config.use_iso_enter = (bool)*value_data; + reinitialize = true; + break; + } + case id_disable_hhkb_blocker_leds: + { + g_config.disable_hhkb_blocker_leds = (bool)*value_data; + reinitialize = true; + break; + } #endif - case id_disable_when_usb_suspended: - { - g_config.disable_when_usb_suspended = (bool)*value_data; - break; - } - case id_disable_after_timeout: - { - g_config.disable_after_timeout = *value_data; - break; - } - case id_brightness: - { - g_config.brightness = *value_data; - break; - } - case id_effect: - { - g_config.effect = *value_data; - break; - } - case id_effect_speed: - { - g_config.effect_speed = *value_data; - break; - } - case id_color_1: - { - _set_color( &(g_config.color_1), value_data ); - break; - } - case id_color_2: - { - _set_color( &(g_config.color_2), value_data ); - break; - } - case id_caps_lock_indicator_color: - { - _set_color( &(g_config.caps_lock_indicator.color), value_data ); - break; - } - case id_caps_lock_indicator_row_col: - { - backlight_set_indicator_index( &(g_config.caps_lock_indicator.index), value_data[0], value_data[1] ); - break; - } - case id_layer_1_indicator_color: - { - _set_color( &(g_config.layer_1_indicator.color), value_data ); - break; - } - case id_layer_1_indicator_row_col: - { - backlight_set_indicator_index( &(g_config.layer_1_indicator.index), value_data[0], value_data[1] ); - break; - } - case id_layer_2_indicator_color: - { - _set_color( &(g_config.layer_2_indicator.color), value_data ); - break; - } - case id_layer_2_indicator_row_col: - { - backlight_set_indicator_index( &(g_config.layer_2_indicator.index), value_data[0], value_data[1] ); - break; - } - case id_layer_3_indicator_color: - { - _set_color( &(g_config.layer_3_indicator.color), value_data ); - break; - } - case id_layer_3_indicator_row_col: - { - backlight_set_indicator_index( &(g_config.layer_3_indicator.index), value_data[0], value_data[1] ); - break; - } - case id_alphas_mods: - { - for ( int i=0; i<5; i++ ) - { - g_config.alphas_mods[i] = ( *(value_data+i*2) << 8 ) | ( *(value_data+i*2+1) ); - } - } + case id_disable_when_usb_suspended: + { + g_config.disable_when_usb_suspended = (bool)*value_data; + break; + } + case id_disable_after_timeout: + { + g_config.disable_after_timeout = *value_data; + break; + } + case id_brightness: + { + g_config.brightness = *value_data; + break; + } + case id_effect: + { + g_config.effect = *value_data; + break; + } + case id_effect_speed: + { + g_config.effect_speed = *value_data; + break; + } + case id_color_1: + { + _set_color( &(g_config.color_1), value_data ); + break; + } + case id_color_2: + { + _set_color( &(g_config.color_2), value_data ); + break; + } + case id_caps_lock_indicator_color: + { + _set_color( &(g_config.caps_lock_indicator.color), value_data ); + break; + } + case id_caps_lock_indicator_row_col: + { + backlight_set_indicator_index( &(g_config.caps_lock_indicator.index), value_data[0], value_data[1] ); + break; + } + case id_layer_1_indicator_color: + { + _set_color( &(g_config.layer_1_indicator.color), value_data ); + break; + } + case id_layer_1_indicator_row_col: + { + backlight_set_indicator_index( &(g_config.layer_1_indicator.index), value_data[0], value_data[1] ); + break; + } + case id_layer_2_indicator_color: + { + _set_color( &(g_config.layer_2_indicator.color), value_data ); + break; + } + case id_layer_2_indicator_row_col: + { + backlight_set_indicator_index( &(g_config.layer_2_indicator.index), value_data[0], value_data[1] ); + break; + } + case id_layer_3_indicator_color: + { + _set_color( &(g_config.layer_3_indicator.color), value_data ); + break; + } + case id_layer_3_indicator_row_col: + { + backlight_set_indicator_index( &(g_config.layer_3_indicator.index), value_data[0], value_data[1] ); + break; + } + case id_alphas_mods: + { + for ( int i=0; i<5; i++ ) + { + g_config.alphas_mods[i] = ( *(value_data+i*2) << 8 ) | ( *(value_data+i*2+1) ); + } + } #if defined(RGB_BACKLIGHT_M6_B) - case id_custom_color: - { - uint8_t index = value_data[0]; - if ( index >= 0 && index <= 6 ) - { - _set_color( &(g_config.custom_color[index]), &(value_data[1]) ); - } - } + case id_custom_color: + { + uint8_t index = value_data[0]; + if ( index >= 0 && index <= 6 ) + { + _set_color( &(g_config.custom_color[index]), &(value_data[1]) ); + } + } #endif - } + } - if ( reinitialize ) - { - backlight_init_drivers(); - } + if ( reinitialize ) + { + backlight_init_drivers(); + } } void backlight_config_get_value( uint8_t *data ) { - uint8_t *value_id = &(data[0]); - uint8_t *value_data = &(data[1]); - switch ( *value_id ) - { - case id_use_split_backspace: - { - *value_data = ( g_config.use_split_backspace ? 1 : 0 ); - break; - } - case id_use_split_left_shift: - { - *value_data = ( g_config.use_split_left_shift ? 1 : 0 ); - break; - } - case id_use_split_right_shift: - { - *value_data = ( g_config.use_split_right_shift ? 1 : 0 ); - break; - } - case id_use_7u_spacebar: - { - *value_data = ( g_config.use_7u_spacebar ? 1 : 0 ); - break; - } - case id_use_iso_enter: - { - *value_data = ( g_config.use_iso_enter ? 1 : 0 ); - break; - } - case id_disable_when_usb_suspended: - { - *value_data = ( g_config.disable_when_usb_suspended ? 1 : 0 ); - break; - } - case id_disable_hhkb_blocker_leds: - { - *value_data = ( g_config.disable_hhkb_blocker_leds ? 1 : 0 ); - break; - } - case id_disable_after_timeout: - { - *value_data = g_config.disable_after_timeout; - break; - } - case id_brightness: - { - *value_data = g_config.brightness; - break; - } - case id_effect: - { - *value_data = g_config.effect; - break; - } - case id_effect_speed: - { - *value_data = g_config.effect_speed; - break; - } - case id_color_1: - { - _get_color( &(g_config.color_1), value_data ); - break; - } - case id_color_2: - { - _get_color( &(g_config.color_2), value_data ); - break; - } - case id_caps_lock_indicator_color: - { - _get_color( &(g_config.caps_lock_indicator.color), value_data ); - break; - } - case id_caps_lock_indicator_row_col: - { - backlight_get_indicator_row_col( g_config.caps_lock_indicator.index, &(value_data[0]), &(value_data[1]) ); - break; - } - case id_layer_1_indicator_color: - { - _get_color( &(g_config.layer_1_indicator.color), value_data ); - break; - } - case id_layer_1_indicator_row_col: - { - backlight_get_indicator_row_col( g_config.layer_1_indicator.index, &(value_data[0]), &(value_data[1]) ); - break; - } - case id_layer_2_indicator_color: - { - _get_color( &(g_config.layer_2_indicator.color), value_data ); - break; - } - case id_layer_2_indicator_row_col: - { - backlight_get_indicator_row_col( g_config.layer_2_indicator.index, &(value_data[0]), &(value_data[1]) ); - break; - } - case id_layer_3_indicator_color: - { - _get_color( &(g_config.layer_3_indicator.color), value_data ); - break; - } - case id_layer_3_indicator_row_col: - { - backlight_get_indicator_row_col( g_config.layer_3_indicator.index, &(value_data[0]), &(value_data[1]) ); - break; - } - case id_alphas_mods: - { - for ( int i=0; i<5; i++ ) - { - *(value_data+i*2) = g_config.alphas_mods[i] >> 8; - *(value_data+i*2+1) = g_config.alphas_mods[i] & 0xFF; - } - } + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + switch ( *value_id ) + { + case id_use_split_backspace: + { + *value_data = ( g_config.use_split_backspace ? 1 : 0 ); + break; + } + case id_use_split_left_shift: + { + *value_data = ( g_config.use_split_left_shift ? 1 : 0 ); + break; + } + case id_use_split_right_shift: + { + *value_data = ( g_config.use_split_right_shift ? 1 : 0 ); + break; + } + case id_use_7u_spacebar: + { + *value_data = ( g_config.use_7u_spacebar ? 1 : 0 ); + break; + } + case id_use_iso_enter: + { + *value_data = ( g_config.use_iso_enter ? 1 : 0 ); + break; + } + case id_disable_when_usb_suspended: + { + *value_data = ( g_config.disable_when_usb_suspended ? 1 : 0 ); + break; + } + case id_disable_hhkb_blocker_leds: + { + *value_data = ( g_config.disable_hhkb_blocker_leds ? 1 : 0 ); + break; + } + case id_disable_after_timeout: + { + *value_data = g_config.disable_after_timeout; + break; + } + case id_brightness: + { + *value_data = g_config.brightness; + break; + } + case id_effect: + { + *value_data = g_config.effect; + break; + } + case id_effect_speed: + { + *value_data = g_config.effect_speed; + break; + } + case id_color_1: + { + _get_color( &(g_config.color_1), value_data ); + break; + } + case id_color_2: + { + _get_color( &(g_config.color_2), value_data ); + break; + } + case id_caps_lock_indicator_color: + { + _get_color( &(g_config.caps_lock_indicator.color), value_data ); + break; + } + case id_caps_lock_indicator_row_col: + { + backlight_get_indicator_row_col( g_config.caps_lock_indicator.index, &(value_data[0]), &(value_data[1]) ); + break; + } + case id_layer_1_indicator_color: + { + _get_color( &(g_config.layer_1_indicator.color), value_data ); + break; + } + case id_layer_1_indicator_row_col: + { + backlight_get_indicator_row_col( g_config.layer_1_indicator.index, &(value_data[0]), &(value_data[1]) ); + break; + } + case id_layer_2_indicator_color: + { + _get_color( &(g_config.layer_2_indicator.color), value_data ); + break; + } + case id_layer_2_indicator_row_col: + { + backlight_get_indicator_row_col( g_config.layer_2_indicator.index, &(value_data[0]), &(value_data[1]) ); + break; + } + case id_layer_3_indicator_color: + { + _get_color( &(g_config.layer_3_indicator.color), value_data ); + break; + } + case id_layer_3_indicator_row_col: + { + backlight_get_indicator_row_col( g_config.layer_3_indicator.index, &(value_data[0]), &(value_data[1]) ); + break; + } + case id_alphas_mods: + { + for ( int i=0; i<5; i++ ) + { + *(value_data+i*2) = g_config.alphas_mods[i] >> 8; + *(value_data+i*2+1) = g_config.alphas_mods[i] & 0xFF; + } + } #if defined(RGB_BACKLIGHT_M6_B) - case id_custom_color: - { - uint8_t index = value_data[0]; - if ( index >= 0 && index <= 6 ) - { - _get_color( &(g_config.custom_color[index]), &(value_data[1]) ); - } - } + case id_custom_color: + { + uint8_t index = value_data[0]; + if ( index >= 0 && index <= 6 ) + { + _get_color( &(g_config.custom_color[index]), &(value_data[1]) ); + } + } #endif - } + } } void backlight_config_set_alphas_mods( uint16_t *alphas_mods ) { - for ( int i=0; i<5; i++ ) - { - g_config.alphas_mods[i] = alphas_mods[i]; - } + for ( int i=0; i<5; i++ ) + { + g_config.alphas_mods[i] = alphas_mods[i]; + } - backlight_config_save(); + backlight_config_save(); } void backlight_config_load(void) { - eeprom_read_block( &g_config, ((void*)RGB_BACKLIGHT_CONFIG_EEPROM_ADDR), sizeof(backlight_config) ); + eeprom_read_block( &g_config, ((void*)RGB_BACKLIGHT_CONFIG_EEPROM_ADDR), sizeof(backlight_config) ); } void backlight_config_save(void) { - eeprom_update_block( &g_config, ((void*)RGB_BACKLIGHT_CONFIG_EEPROM_ADDR), sizeof(backlight_config) ); + eeprom_update_block( &g_config, ((void*)RGB_BACKLIGHT_CONFIG_EEPROM_ADDR), sizeof(backlight_config) ); } void backlight_init_drivers(void) { - // Initialize I2C - i2c_init(); + // Initialize I2C + i2c_init(); #if defined(RGB_BACKLIGHT_M6_B) - IS31FL3218_init(); + IS31FL3218_init(); #elif defined(RGB_BACKLIGHT_HS60) - IS31FL3733_init( ISSI_ADDR_1 ); + IS31FL3733_init( ISSI_ADDR_1, 0 ); - for ( int index = 0; index < BACKLIGHT_LED_COUNT; index++ ) - { -#if defined (HS60_ANSI) - bool enabled = !( ( index == 48-1 ) || //LA48 - ( index == 51-1 ) || //LA51 - ( index == 61-1 ) ); //LA61 -#elif defined (HS60_HHKB) - bool enabled = !( ( index == 61-1 ) || //LA61 - ( index == 62-1 ) ); //LA62 + for ( int index = 0; index < DRIVER_LED_TOTAL; index++ ) + { +#if defined(HS60_ANSI) + bool enabled = !( ( index == 48-1 ) || //LA48 + ( index == 51-1 ) || //LA51 + ( index == 61-1 ) ); //LA61 +#elif defined(HS60_HHKB) + bool enabled = !( ( index == 61-1 ) || //LA61 + ( index == 62-1 ) ); //LA62 #else //HS60_ISO - bool enabled = !( ( index == 51-1 ) || //LA51 - ( index == 61-1 ) ); //LA61 + bool enabled = !( ( index == 51-1 ) || //LA51 + ( index == 61-1 ) ); //LA61 #endif - // This only caches it for later - IS31FL3733_set_led_control_register( index, enabled, enabled, enabled ); - } - // This actually updates the LED drivers - IS31FL3733_update_led_control_registers( ISSI_ADDR_1, ISSI_ADDR_2 ); -#else - IS31FL3731_init( ISSI_ADDR_1 ); - IS31FL3731_init( ISSI_ADDR_2 ); + // This only caches it for later + IS31FL3733_set_led_control_register( index, enabled, enabled, enabled ); + } + // This actually updates the LED drivers + IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); +#elif defined(RGB_BACKLIGHT_NK65) + IS31FL3733_init( ISSI_ADDR_1, 0 ); + IS31FL3733_init( ISSI_ADDR_2, 0 ); - for ( int index = 0; index < BACKLIGHT_LED_COUNT; index++ ) - { - // OR the possible "disabled" cases together, then NOT the result to get the enabled state - // LC6 LD13 not present on Zeal65 -#if defined (RGB_BACKLIGHT_ZEAL65) - bool enabled = !( ( index == 18+5 && !g_config.use_split_backspace ) || // LB5 - ( index == 36+6 ) || // LC6 - ( index == 54+13 ) ); // LD13 -#elif defined (RGB_BACKLIGHT_KOYU) - bool enabled = !( ( index == 36+15 ) || // LC15 - ( index == 54+13 ) || // LD13 - ( index == 54+17 ) ); // LD17 -#elif defined (RGB_BACKLIGHT_M60_A) - bool enabled = !( - // LB6 LB7 LB8 LB15 LB16 LB17 not present on M60-A - ( index == 18+6 ) || // LB6 - ( index == 18+7 ) || // LB7 - ( index == 18+8 ) || // LB8 - ( index == 18+15 ) || // LB15 - ( index == 18+16 ) || // LB16 - ( index == 18+17 ) || // LB17 - // HHKB blockers (LC17, LD17) and ISO extra keys (LC15,LD13) not present on M60-A - ( index == 36+17 ) || // LC17 - ( index == 54+17 ) || // LD17 - ( index == 36+15 ) || // LC15 - ( index == 54+13 ) ); // LD13 -#elif defined (RGB_BACKLIGHT_ZEAL60) - // LB6 LB7 LB8 LB15 LB16 LB17 not present on Zeal60 - bool enabled = !( ( index == 18+5 && !g_config.use_split_backspace ) || // LB5 - ( index == 36+15 && !g_config.use_split_left_shift ) || // LC15 - ( index == 54+8 && !g_config.use_split_right_shift ) || // LD8 - ( index == 54+13 && g_config.use_7u_spacebar ) || // LD13 - ( index == 36+17 && g_config.disable_hhkb_blocker_leds ) || // LC17 - ( index == 54+17 && g_config.disable_hhkb_blocker_leds ) || // LD17 - ( index == 18+6 ) || // LB6 - ( index == 18+7 ) || // LB7 - ( index == 18+8 ) || // LB8 - ( index == 18+15 ) || // LB15 - ( index == 18+16 ) || // LB16 - ( index == 18+17 ) ); // LB17 + for ( int index = 0; index < DRIVER_LED_TOTAL; index++ ) + { + bool enabled = !( ( index == 61-1 ) || //LA61 + ( index > 6+64-1 ) ); //LB7-LB64 + // This only caches it for later + IS31FL3733_set_led_control_register( index, enabled, enabled, enabled ); + } + IS31FL3733_set_led_control_register( 7+64-1, 0, 1, 0 ); //Enable LB7 green enable for indicators + // This actually updates the LED drivers + IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); + IS31FL3733_update_led_control_registers( ISSI_ADDR_2, 1 ); +#else + IS31FL3731_init( ISSI_ADDR_1 ); + IS31FL3731_init( ISSI_ADDR_2 ); + + for ( int index = 0; index < DRIVER_LED_TOTAL; index++ ) + { + // OR the possible "disabled" cases together, then NOT the result to get the enabled state + // LC6 LD13 not present on Zeal65 +#if defined(RGB_BACKLIGHT_ZEAL65) + bool enabled = !( ( index == 18+5 && !g_config.use_split_backspace ) || // LB5 + ( index == 36+6 ) || // LC6 + ( index == 54+13 ) ); // LD13 +#elif defined(RGB_BACKLIGHT_KOYU) + bool enabled = !( ( index == 36+15 ) || // LC15 + ( index == 54+13 ) || // LD13 + ( index == 54+17 ) ); // LD17 +#elif defined(RGB_BACKLIGHT_M60_A) + bool enabled = !( + // LB6 LB7 LB8 LB15 LB16 LB17 not present on M60-A + ( index == 18+6 ) || // LB6 + ( index == 18+7 ) || // LB7 + ( index == 18+8 ) || // LB8 + ( index == 18+15 ) || // LB15 + ( index == 18+16 ) || // LB16 + ( index == 18+17 ) || // LB17 + // HHKB blockers (LC17, LD17) and ISO extra keys (LC15,LD13) not present on M60-A + ( index == 36+17 ) || // LC17 + ( index == 54+17 ) || // LD17 + ( index == 36+15 ) || // LC15 + ( index == 54+13 ) ); // LD13 +#elif defined(RGB_BACKLIGHT_ZEAL60) + // LB6 LB7 LB8 LB15 LB16 LB17 not present on Zeal60 + bool enabled = !( ( index == 18+5 && !g_config.use_split_backspace ) || // LB5 + ( index == 36+15 && !g_config.use_split_left_shift ) || // LC15 + ( index == 54+8 && !g_config.use_split_right_shift ) || // LD8 + ( index == 54+13 && g_config.use_7u_spacebar ) || // LD13 + ( index == 36+17 && g_config.disable_hhkb_blocker_leds ) || // LC17 + ( index == 54+17 && g_config.disable_hhkb_blocker_leds ) || // LD17 + ( index == 18+6 ) || // LB6 + ( index == 18+7 ) || // LB7 + ( index == 18+8 ) || // LB8 + ( index == 18+15 ) || // LB15 + ( index == 18+16 ) || // LB16 + ( index == 18+17 ) ); // LB17 #endif - // This only caches it for later - IS31FL3731_set_led_control_register( index, enabled, enabled, enabled ); - } - // This actually updates the LED drivers - IS31FL3731_update_led_control_registers( ISSI_ADDR_1, ISSI_ADDR_2 ); + // This only caches it for later + IS31FL3731_set_led_control_register( index, enabled, enabled, enabled ); + } + // This actually updates the LED drivers + IS31FL3731_update_led_control_registers( ISSI_ADDR_1, ISSI_ADDR_2 ); #endif // !defined(RGB_BACKLIGHT_M6_B) - // TODO: put the 1 second startup delay here? + // TODO: put the 1 second startup delay here? - // clear the key hits - for ( int led=0; ledevent.pressed ) - { - backlight_set_key_hit( record->event.key.row, record->event.key.col ); - } + // Record keypresses for backlight effects + if ( record->event.pressed ) + { + backlight_set_key_hit( record->event.key.row, record->event.key.col ); + } - switch(keycode) - { - case BR_INC: - if (record->event.pressed) - { - backlight_brightness_increase(); - } - return false; - break; - case BR_DEC: - if (record->event.pressed) - { - backlight_brightness_decrease(); - } - return false; - break; - case EF_INC: - if (record->event.pressed) - { - backlight_effect_increase(); - } - return false; - break; - case EF_DEC: - if (record->event.pressed) - { - backlight_effect_decrease(); - } - return false; - break; - case ES_INC: - if (record->event.pressed) - { - backlight_effect_speed_increase(); - } - return false; - break; - case ES_DEC: - if (record->event.pressed) - { - backlight_effect_speed_decrease(); - } - return false; - break; - case H1_INC: - if (record->event.pressed) - { - backlight_color_1_hue_increase(); - } - return false; - break; - case H1_DEC: - if (record->event.pressed) - { - backlight_color_1_hue_decrease(); - } - return false; - break; - case S1_INC: - if (record->event.pressed) - { - backlight_color_1_sat_increase(); - } - return false; - break; - case S1_DEC: - if (record->event.pressed) - { - backlight_color_1_sat_decrease(); - break; - } - return false; - break; - case H2_INC: - if (record->event.pressed) - { - backlight_color_2_hue_increase(); - } - return false; - break; - case H2_DEC: - if (record->event.pressed) - { - backlight_color_2_hue_decrease(); - } - return false; - break; - case S2_INC: - if (record->event.pressed) - { - backlight_color_2_sat_increase(); - } - return false; - break; - case S2_DEC: - if (record->event.pressed) - { - backlight_color_2_sat_decrease(); - break; - } - return false; - break; - } + switch(keycode) + { + case BR_INC: + if (record->event.pressed) + { + backlight_brightness_increase(); + } + return false; + break; + case BR_DEC: + if (record->event.pressed) + { + backlight_brightness_decrease(); + } + return false; + break; + case EF_INC: + if (record->event.pressed) + { + backlight_effect_increase(); + } + return false; + break; + case EF_DEC: + if (record->event.pressed) + { + backlight_effect_decrease(); + } + return false; + break; + case ES_INC: + if (record->event.pressed) + { + backlight_effect_speed_increase(); + } + return false; + break; + case ES_DEC: + if (record->event.pressed) + { + backlight_effect_speed_decrease(); + } + return false; + break; + case H1_INC: + if (record->event.pressed) + { + backlight_color_1_hue_increase(); + } + return false; + break; + case H1_DEC: + if (record->event.pressed) + { + backlight_color_1_hue_decrease(); + } + return false; + break; + case S1_INC: + if (record->event.pressed) + { + backlight_color_1_sat_increase(); + } + return false; + break; + case S1_DEC: + if (record->event.pressed) + { + backlight_color_1_sat_decrease(); + break; + } + return false; + break; + case H2_INC: + if (record->event.pressed) + { + backlight_color_2_hue_increase(); + } + return false; + break; + case H2_DEC: + if (record->event.pressed) + { + backlight_color_2_hue_decrease(); + } + return false; + break; + case S2_INC: + if (record->event.pressed) + { + backlight_color_2_sat_increase(); + } + return false; + break; + case S2_DEC: + if (record->event.pressed) + { + backlight_color_2_sat_decrease(); + break; + } + return false; + break; + } - return true; + return true; } // Deals with the messy details of incrementing an integer uint8_t increment( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) { - int16_t new_value = value; - new_value += step; - return MIN( MAX( new_value, min ), max ); + int16_t new_value = value; + new_value += step; + return MIN( MAX( new_value, min ), max ); } uint8_t decrement( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) { - int16_t new_value = value; - new_value -= step; - return MIN( MAX( new_value, min ), max ); + int16_t new_value = value; + new_value -= step; + return MIN( MAX( new_value, min ), max ); } void backlight_effect_increase(void) { - g_config.effect = increment( g_config.effect, 1, 0, BACKLIGHT_EFFECT_MAX ); - backlight_config_save(); + g_config.effect = increment( g_config.effect, 1, 0, BACKLIGHT_EFFECT_MAX ); + backlight_config_save(); } void backlight_effect_decrease(void) { - g_config.effect = decrement( g_config.effect, 1, 0, BACKLIGHT_EFFECT_MAX ); - backlight_config_save(); + g_config.effect = decrement( g_config.effect, 1, 0, BACKLIGHT_EFFECT_MAX ); + backlight_config_save(); } void backlight_effect_speed_increase(void) { - g_config.effect_speed = increment( g_config.effect_speed, 1, 0, 3 ); - backlight_config_save(); + g_config.effect_speed = increment( g_config.effect_speed, 1, 0, 3 ); + backlight_config_save(); } void backlight_effect_speed_decrease(void) { - g_config.effect_speed = decrement( g_config.effect_speed, 1, 0, 3 ); - backlight_config_save(); + g_config.effect_speed = decrement( g_config.effect_speed, 1, 0, 3 ); + backlight_config_save(); } void backlight_brightness_increase(void) { - g_config.brightness = increment( g_config.brightness, 8, 0, 255 ); - backlight_config_save(); + g_config.brightness = increment( g_config.brightness, 8, 0, 255 ); + backlight_config_save(); } void backlight_brightness_decrease(void) { - g_config.brightness = decrement( g_config.brightness, 8, 0, 255 ); - backlight_config_save(); + g_config.brightness = decrement( g_config.brightness, 8, 0, 255 ); + backlight_config_save(); } void backlight_color_1_hue_increase(void) { - g_config.color_1.h = increment( g_config.color_1.h, 8, 0, 255 ); - backlight_config_save(); + g_config.color_1.h = increment( g_config.color_1.h, 8, 0, 255 ); + backlight_config_save(); } void backlight_color_1_hue_decrease(void) { - g_config.color_1.h = decrement( g_config.color_1.h, 8, 0, 255 ); - backlight_config_save(); + g_config.color_1.h = decrement( g_config.color_1.h, 8, 0, 255 ); + backlight_config_save(); } void backlight_color_1_sat_increase(void) { - g_config.color_1.s = increment( g_config.color_1.s, 8, 0, 255 ); - backlight_config_save(); + g_config.color_1.s = increment( g_config.color_1.s, 8, 0, 255 ); + backlight_config_save(); } void backlight_color_1_sat_decrease(void) { - g_config.color_1.s = decrement( g_config.color_1.s, 8, 0, 255 ); - backlight_config_save(); + g_config.color_1.s = decrement( g_config.color_1.s, 8, 0, 255 ); + backlight_config_save(); } void backlight_color_2_hue_increase(void) { - g_config.color_2.h = increment( g_config.color_2.h, 8, 0, 255 ); - backlight_config_save(); + g_config.color_2.h = increment( g_config.color_2.h, 8, 0, 255 ); + backlight_config_save(); } void backlight_color_2_hue_decrease(void) { - g_config.color_2.h = decrement( g_config.color_2.h, 8, 0, 255 ); - backlight_config_save(); + g_config.color_2.h = decrement( g_config.color_2.h, 8, 0, 255 ); + backlight_config_save(); } void backlight_color_2_sat_increase(void) { - g_config.color_2.s = increment( g_config.color_2.s, 8, 0, 255 ); - backlight_config_save(); + g_config.color_2.s = increment( g_config.color_2.s, 8, 0, 255 ); + backlight_config_save(); } void backlight_color_2_sat_decrease(void) { - g_config.color_2.s = decrement( g_config.color_2.s, 8, 0, 255 ); - backlight_config_save(); + g_config.color_2.s = decrement( g_config.color_2.s, 8, 0, 255 ); + backlight_config_save(); } #if defined(RGB_DEBUGGING_ONLY) void backlight_test_led( uint8_t index, bool red, bool green, bool blue ) { - for ( int i=0; i Date: Thu, 16 May 2019 13:11:28 +0900 Subject: [PATCH 034/341] Add effect range to rgblight.c (#5856) * add rgblight_set_effect_range() * implement effect range * Arrange the order of function list in rgblight.h . * update docs/feature_rgblight.md * fix RGBLIGHT_RAINBOW_SWIRL_RANGE default value * add example code about Utility Functions * add example code about direct operation functions * When RGBLIGHT_SPLIT is defined, the following function has no meaning and is invalidated. * rgblight_setrgb_master(r, g, b) * rgblight_setrgb_slave(r, g, b) * rgblight_sethsv_master(h, s, v) * rgblight_sethsv_slave(h, s, v) * add temporary test code for rgblight_set_effect_range * fix rgblight_effect_knight() bug * Test End. Revert "add temporary test code for rgblight_set_effect_range" This reverts commit 5680cddd012d68b2db75a532862a7fef250f8973. --- docs/feature_rgblight.md | 134 ++++++++++++++++++++--------- quantum/rgblight.c | 117 +++++++++++++++----------- quantum/rgblight.h | 177 ++++++++++++++++++++++----------------- 3 files changed, 261 insertions(+), 167 deletions(-) diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index 1e0ce9147..be4ddfa72 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -129,7 +129,7 @@ The following options are used to tweak the various animations: |`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel | |`RGBLIGHT_EFFECT_KNIGHT_LENGTH` |`3` |The number of LEDs to light up for the "Knight" animation | |`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by | -|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`360` |Range adjustment for the rainbow swirl effect to get different swirls | +|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`255` |Range adjustment for the rainbow swirl effect to get different swirls | |`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation | ### Example Usage to Reduce Memory Footprint @@ -176,44 +176,100 @@ const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 170, 127, 85, 64}; If you need to change your RGB lighting in code, for example in a macro to change the color whenever you switch layers, QMK provides a set of functions to assist you. See [`rgblight.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight.h) for the full list, but the most commonly used functions include: -|Function |Description | -|--------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------| -|`rgblight_enable()` |Turn LEDs on, based on their previous state | -|`rgblight_enable_noeeprom()` |Turn LEDs on, based on their previous state (not written to EEPROM) | -|`rgblight_disable()` |Turn LEDs off | -|`rgblight_disable_noeeprom()` |Turn LEDs off (not written to EEPROM) | -|`rgblight_mode(x)` |Set the mode, if RGB animations are enabled | -|`rgblight_mode_noeeprom(x)` |Set the mode, if RGB animations are enabled (not written to EEPROM) | -|`rgblight_setrgb(r, g, b)` |Set all LEDs to the given RGB value where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) | -|`rgblight_setrgb_at(r, g, b, led)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `led` is between 0 and `RGBLED_NUM` (not written to EEPROM) | +### Utility Functions +|Function |Description | +|--------------------------------------------|-------------------------------------------------------------------| +|`sethsv(hue, sat, val, ledbuf)` |Set ledbuf to the given HSV value | +|`sethsv_raw(hue, sat, val, ledbuf)` |Set ledbuf to the given HSV value without RGBLIGHT_LIMIT_VAL check | +|`setrgb(r, g, b, ledbuf)` |Set ledbuf to the given RGB value where `r`/`g`/`b` | + +### Low level Functions +|Function |Description | +|--------------------------------------------|-------------------------------------------| +|`rgblight_set()` |Flash out led buffers to LEDs | +|`rgblight_set_clipping_range(pos, num)` |Set clipping Range. see [Clipping Range](#clipping-range) | + +Example: +```c +sethsv(HSV_WHITE, (LED_TYPE *)&led[0]); // led 0 +sethsv(HSV_RED, (LED_TYPE *)&led[1]); // led 1 +sethsv(HSV_GREEN, (LED_TYPE *)&led[2]); // led 2 +rgblight_set(); // Utility functions do not call rgblight_set() automatically, so they need to be called explicitly. +``` + +### Effects and Animations Functions +#### effect range setting +|Function |Description | +|--------------------------------------------|------------------| +|`rgblight_set_effect_range(pos, num)` |Set Effects Range | + +#### direct operation +|Function |Description | +|--------------------------------------------|-------------| +|`rgblight_setrgb_at(r, g, b, index)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `index` is between 0 and `RGBLED_NUM` (not written to EEPROM) | +|`rgblight_sethsv_at(h, s, v, index)` |Set a single LED to the given HSV value, where `h`/`s`/`v` are between 0 and 255, and `index` is between 0 and `RGBLED_NUM` (not written to EEPROM) | |`rgblight_setrgb_range(r, g, b, start, end)`|Set a continuous range of LEDs to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `start`(included) and `stop`(excluded) are between 0 and `RGBLED_NUM` (not written to EEPROM)| -|`rgblight_setrgb_master(r, g, b)` |Set the LEDs on the master side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) | -|`rgblight_setrgb_slave(r, g, b)` |Set the LEDs on the slave side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) | -|`rgblight_sethsv(h, s, v)` |Set all LEDs to the given HSV value where `h` is between 0 and 360 and `s`/`v` are between 0 and 255 | -|`rgblight_sethsv_noeeprom(h, s, v)` |Set all LEDs to the given HSV value where `h` is between 0 and 360 and `s`/`v` are between 0 and 255 (not written to EEPROM) | -|`rgblight_sethsv_at(h, s, v, led)` |Set a single LED to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255, and `led` is between 0 and `RGBLED_NUM` (not written to EEPROM)| -|`rgblight_sethsv_range(h, s, v, start, end)`|Set a continuous range of LEDs to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255, and `start`(included) and `stop`(excluded) are between 0 and `RGBLED_NUM` (not written to EEPROM)| -|`rgblight_sethsv_master(h, s, v)` |Set the LEDs on the master side to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255 (not written to EEPROM) | -|`rgblight_sethsv_slave(h, s, v)` |Set the LEDs on the slave side to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255 (not written to EEPROM) | -|`rgblight_toggle()` |Toggle all LEDs between on and off | -|`rgblight_toggle_noeeprom()` |Toggle all LEDs between on and off (not written to EEPROM) | -|`rgblight_step()` |Change the mode to the next RGB animation in the list of enabled RGB animations | -|`rgblight_step_noeeprom()` |Change the mode to the next RGB animation in the list of enabled RGB animations (not written to EEPROM) | -|`rgblight_step_reverse()` |Change the mode to the previous RGB animation in the list of enabled RGB animations | -|`rgblight_step_reverse_noeeprom()` |Change the mode to the previous RGB animation in the list of enabled RGB animations (not written to EEPROM) | -|`rgblight_increase_hue()` |Increase the hue for all LEDs. This wraps around at maximum hue | -|`rgblight_increase_hue_noeeprom()` |Increase the hue for all LEDs. This wraps around at maximum hue (not written to EEPROM) | -|`rgblight_decrease_hue()` |Decrease the hue for all LEDs. This wraps around at minimum hue | -|`rgblight_decrease_hue_noeeprom()` |Decrease the hue for all LEDs. This wraps around at minimum hue (not written to EEPROM) | -|`rgblight_increase_sat()` |Increase the saturation for all LEDs. This wraps around at maximum saturation | -|`rgblight_increase_sat_noeeprom()` |Increase the saturation for all LEDs. This wraps around at maximum saturation (not written to EEPROM) | -|`rgblight_decrease_sat()` |Decrease the saturation for all LEDs. This wraps around at minimum saturation | -|`rgblight_decrease_sat_noeeprom()` |Decrease the saturation for all LEDs. This wraps around at minimum saturation (not written to EEPROM) | -|`rgblight_increase_val()` |Increase the value for all LEDs. This wraps around at maximum value | -|`rgblight_increase_val_noeeprom()` |Increase the value for all LEDs. This wraps around at maximum value (not written to EEPROM) | -|`rgblight_decrease_val()` |Decrease the value for all LEDs. This wraps around at minimum value | -|`rgblight_decrease_val_noeeprom()` |Decrease the value for all LEDs. This wraps around at minimum value (not written to EEPROM) | -|`rgblight_set_clipping_range(pos, num)` |Set clipping Range | +|`rgblight_sethsv_range(h, s, v, start, end)`|Set a continuous range of LEDs to the given HSV value, where `h`/`s`/`v` are between 0 and 255, and `start`(included) and `stop`(excluded) are between 0 and `RGBLED_NUM` (not written to EEPROM)| +|`rgblight_setrgb(r, g, b)` |Set effect range LEDs to the given RGB value where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) | +|`rgblight_setrgb_master(r, g, b)` |Set the LEDs on the master side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) | +|`rgblight_setrgb_slave(r, g, b)` |Set the LEDs on the slave side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) | +|`rgblight_sethsv_master(h, s, v)` |Set the LEDs on the master side to the given HSV value, where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) | +|`rgblight_sethsv_slave(h, s, v)` |Set the LEDs on the slave side to the given HSV value, where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) | + +Example: +```c +rgblight_sethsv(HSV_WHITE, 0); // led 0 +rgblight_sethsv(HSV_RED, 1); // led 1 +rgblight_sethsv(HSV_GREEN, 2); // led 2 +// The above functions automatically calls rgblight_set(), so there is no need to call it explicitly. +// Note that it is inefficient to call repeatedly. +``` + +#### effect mode change +|Function |Description | +|--------------------------------------------|-------------| +|`rgblight_mode(x)` |Set the mode, if RGB animations are enabled | +|`rgblight_mode_noeeprom(x)` |Set the mode, if RGB animations are enabled (not written to EEPROM) | +|`rgblight_step()` |Change the mode to the next RGB animation in the list of enabled RGB animations | +|`rgblight_step_noeeprom()` |Change the mode to the next RGB animation in the list of enabled RGB animations (not written to EEPROM) | +|`rgblight_step_reverse()` |Change the mode to the previous RGB animation in the list of enabled RGB animations | +|`rgblight_step_reverse_noeeprom()` |Change the mode to the previous RGB animation in the list of enabled RGB animations (not written to EEPROM) | + +#### effects mode disable/enable +|Function |Description | +|--------------------------------------------|-------------| +|`rgblight_toggle()` |Toggle effect range LEDs between on and off | +|`rgblight_toggle_noeeprom()` |Toggle effect range LEDs between on and off (not written to EEPROM) | +|`rgblight_enable()` |Turn effect range LEDs on, based on their previous state | +|`rgblight_enable_noeeprom()` |Turn effect range LEDs on, based on their previous state (not written to EEPROM) | +|`rgblight_disable()` |Turn effect range LEDs off | +|`rgblight_disable_noeeprom()` |Turn effect range LEDs off (not written to EEPROM) | + +#### hue, sat, val change +|Function |Description | +|--------------------------------------------|-------------| +|`rgblight_increase_hue()` |Increase the hue for effect range LEDs. This wraps around at maximum hue | +|`rgblight_increase_hue_noeeprom()` |Increase the hue for effect range LEDs. This wraps around at maximum hue (not written to EEPROM) | +|`rgblight_decrease_hue()` |Decrease the hue for effect range LEDs. This wraps around at minimum hue | +|`rgblight_decrease_hue_noeeprom()` |Decrease the hue for effect range LEDs. This wraps around at minimum hue (not written to EEPROM) | +|`rgblight_increase_sat()` |Increase the saturation for effect range LEDs. This wraps around at maximum saturation | +|`rgblight_increase_sat_noeeprom()` |Increase the saturation for effect range LEDs. This wraps around at maximum saturation (not written to EEPROM) | +|`rgblight_decrease_sat()` |Decrease the saturation for effect range LEDs. This wraps around at minimum saturation | +|`rgblight_decrease_sat_noeeprom()` |Decrease the saturation for effect range LEDs. This wraps around at minimum saturation (not written to EEPROM) | +|`rgblight_increase_val()` |Increase the value for effect range LEDs. This wraps around at maximum value | +|`rgblight_increase_val_noeeprom()` |Increase the value for effect range LEDs. This wraps around at maximum value (not written to EEPROM) | +|`rgblight_decrease_val()` |Decrease the value for effect range LEDs. This wraps around at minimum value | +|`rgblight_decrease_val_noeeprom()` |Decrease the value for effect range LEDs. This wraps around at minimum value (not written to EEPROM) | +|`rgblight_sethsv(h, s, v)` |Set effect range LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 | +|`rgblight_sethsv_noeeprom(h, s, v)` |Set effect range LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) | + +#### query +|Function |Description | +|-----------------------|-----------------| +|`rgblight_get_mode()` |Get current mode | +|`rgblight_get_hue()` |Get current hue | +|`rgblight_get_sat()` |Get current sat | +|`rgblight_get_val()` |Get current val | ## Colors @@ -324,4 +380,6 @@ In addition to setting the Clipping Range, you can use `RGBLIGHT_LED_MAP` togeth ``` clip mapped +## Hardware Modification + If your keyboard lacks onboard underglow LEDs, you may often be able to solder on an RGB LED strip yourself. You will need to find an unused pin to wire to the data pin of your LED strip. Some keyboards may break out unused pins from the MCU to make soldering easier. The other two pins, VCC and GND, must also be connected to the appropriate power pins. diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 77772e292..75e4ef0d8 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -101,19 +101,35 @@ LED_TYPE led[RGBLED_NUM]; static uint8_t clipping_start_pos = 0; static uint8_t clipping_num_leds = RGBLED_NUM; +static uint8_t effect_start_pos = 0; +static uint8_t effect_end_pos = RGBLED_NUM; +static uint8_t effect_num_leds = RGBLED_NUM; void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds) { clipping_start_pos = start_pos; clipping_num_leds = num_leds; } +void rgblight_set_effect_range(uint8_t start_pos, uint8_t num_leds) { + if (start_pos >= RGBLED_NUM) return; + if (start_pos + num_leds > RGBLED_NUM) return; + effect_start_pos = start_pos; + effect_end_pos = start_pos + num_leds; + effect_num_leds = num_leds; +} -void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { - HSV hsv = { hue, sat, val > RGBLIGHT_LIMIT_VAL ? RGBLIGHT_LIMIT_VAL : val }; +void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { + HSV hsv = { hue, sat, val }; RGB rgb = hsv_to_rgb(hsv); setrgb(rgb.r, rgb.g, rgb.b, led1); } +void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { + sethsv_raw( hue, sat, + val > RGBLIGHT_LIMIT_VAL ? RGBLIGHT_LIMIT_VAL : val, + led1); +} + void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) { (*led1).r = r; (*led1).g = g; @@ -501,15 +517,15 @@ void rgblight_sethsv_eeprom_helper(uint8_t hue, uint8_t sat, uint8_t val, bool w #else uint8_t range = RGBLED_GRADIENT_RANGES[delta / 2]; #endif - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - uint8_t _hue = ((uint16_t)i * (uint16_t)range) / RGBLED_NUM; + for (uint8_t i = 0; i < effect_num_leds; i++) { + uint8_t _hue = ((uint16_t)i * (uint16_t)range) / effect_num_leds; if (direction) { _hue = hue + _hue; } else { _hue = hue - _hue; } dprintf("rgblight rainbow set hsv: %d,%d,%d,%u\n", i, _hue, direction, range); - sethsv(_hue, sat, val, (LED_TYPE *)&led[i]); + sethsv(_hue, sat, val, (LED_TYPE *)&led[i + effect_start_pos]); } rgblight_set(); } @@ -557,7 +573,7 @@ uint8_t rgblight_get_val(void) { void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b) { if (!rgblight_config.enable) { return; } - for (uint8_t i = 0; i < RGBLED_NUM; i++) { + for (uint8_t i = effect_start_pos; i < effect_end_pos; i++) { led[i].r = r; led[i].g = g; led[i].b = b; @@ -615,6 +631,7 @@ void rgblight_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start, rgblight_setrgb_range(tmp_led.r, tmp_led.g, tmp_led.b, start, end); } +#ifndef RGBLIGHT_SPLIT void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b) { rgblight_setrgb_range(r, g, b, 0 , (uint8_t) RGBLED_NUM/2); } @@ -630,36 +647,34 @@ void rgblight_sethsv_master(uint8_t hue, uint8_t sat, uint8_t val) { void rgblight_sethsv_slave(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_range(hue, sat, val, (uint8_t) RGBLED_NUM/2, (uint8_t) RGBLED_NUM); } +#endif // ifndef RGBLIGHT_SPLIT #ifndef RGBLIGHT_CUSTOM_DRIVER void rgblight_set(void) { - LED_TYPE *start_led = led + clipping_start_pos; + LED_TYPE *start_led; uint16_t num_leds = clipping_num_leds; - if (rgblight_config.enable) { - #ifdef RGBLIGHT_LED_MAP - LED_TYPE led0[RGBLED_NUM]; - for(uint8_t i = 0; i < RGBLED_NUM; i++) { - led0[i] = led[pgm_read_byte(&led_map[i])]; - } - start_led = led0 + clipping_start_pos; - #endif - #ifdef RGBW - ws2812_setleds_rgbw(start_led, num_leds); - #else - ws2812_setleds(start_led, num_leds); - #endif - } else { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { + + if (!rgblight_config.enable) { + for (uint8_t i = effect_start_pos; i < effect_end_pos; i++) { led[i].r = 0; led[i].g = 0; led[i].b = 0; } - #ifdef RGBW - ws2812_setleds_rgbw(start_led, num_leds); - #else - ws2812_setleds(start_led, num_leds); - #endif } +#ifdef RGBLIGHT_LED_MAP + LED_TYPE led0[RGBLED_NUM]; + for(uint8_t i = 0; i < RGBLED_NUM; i++) { + led0[i] = led[pgm_read_byte(&led_map[i])]; + } + start_led = led0 + clipping_start_pos; +#else + start_led = led + clipping_start_pos; +#endif +#ifdef RGBW + ws2812_setleds_rgbw(start_led, num_leds); +#else + ws2812_setleds(start_led, num_leds); +#endif } #endif @@ -926,9 +941,9 @@ void rgblight_effect_rainbow_swirl(animation_status_t *anim) { uint8_t hue; uint8_t i; - for (i = 0; i < RGBLED_NUM; i++) { - hue = (RGBLIGHT_RAINBOW_SWIRL_RANGE / RGBLED_NUM * i + anim->current_hue); - sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i]); + for (i = 0; i < effect_num_leds; i++) { + hue = (RGBLIGHT_RAINBOW_SWIRL_RANGE / effect_num_leds * i + anim->current_hue); + sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i + effect_start_pos]); } rgblight_set(); @@ -957,7 +972,7 @@ void rgblight_effect_snake(animation_status_t *anim) { #if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) if (anim->pos == 0) { // restart signal if (increment == 1) { - pos = RGBLED_NUM - 1; + pos = effect_num_leds - 1; } else { pos = 0; } @@ -965,26 +980,27 @@ void rgblight_effect_snake(animation_status_t *anim) { } #endif - for (i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; + for (i = 0; i < effect_num_leds; i++) { + LED_TYPE *ledp = led + i + effect_start_pos; + ledp->r = 0; + ledp->g = 0; + ledp->b = 0; for (j = 0; j < RGBLIGHT_EFFECT_SNAKE_LENGTH; j++) { k = pos + j * increment; if (k < 0) { - k = k + RGBLED_NUM; + k = k + effect_num_leds; } if (i == k) { sethsv(rgblight_config.hue, rgblight_config.sat, (uint8_t)(rgblight_config.val*(RGBLIGHT_EFFECT_SNAKE_LENGTH-j)/RGBLIGHT_EFFECT_SNAKE_LENGTH), - (LED_TYPE *)&led[i]); + ledp); } } } rgblight_set(); if (increment == 1) { if (pos - 1 < 0) { - pos = RGBLED_NUM - 1; + pos = effect_num_leds - 1; #if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) anim->pos = 0; #endif @@ -995,7 +1011,7 @@ void rgblight_effect_snake(animation_status_t *anim) { #endif } } else { - pos = (pos + 1) % RGBLED_NUM; + pos = (pos + 1) % effect_num_leds; #if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) anim->pos = pos; #endif @@ -1023,14 +1039,14 @@ void rgblight_effect_knight(animation_status_t *anim) { } #endif // Set all the LEDs to 0 - for (i = 0; i < RGBLED_NUM; i++) { + for (i = effect_start_pos; i < effect_end_pos; i++) { led[i].r = 0; led[i].g = 0; led[i].b = 0; } // Determine which LEDs should be lit up for (i = 0; i < RGBLIGHT_EFFECT_KNIGHT_LED_NUM; i++) { - cur = (i + RGBLIGHT_EFFECT_KNIGHT_OFFSET) % RGBLED_NUM; + cur = (i + RGBLIGHT_EFFECT_KNIGHT_OFFSET) % effect_num_leds + effect_start_pos; if (i >= low_bound && i <= high_bound) { sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[cur]); @@ -1064,9 +1080,9 @@ void rgblight_effect_christmas(animation_status_t *anim) { uint8_t i; anim->current_offset = (anim->current_offset + 1) % 2; - for (i = 0; i < RGBLED_NUM; i++) { + for (i = 0; i < effect_num_leds; i++) { hue = 0 + ((i/RGBLIGHT_EFFECT_CHRISTMAS_STEP + anim->current_offset) % 2) * 85; - sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i]); + sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i + effect_start_pos]); } rgblight_set(); } @@ -1099,13 +1115,14 @@ void rgblight_effect_rgbtest(animation_status_t *anim) { #ifdef RGBLIGHT_EFFECT_ALTERNATING void rgblight_effect_alternating(animation_status_t *anim) { - for(int i = 0; ipos){ - sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i]); - }else if (i>=RGBLED_NUM/2 && !anim->pos){ - sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i]); - }else{ - sethsv(rgblight_config.hue, rgblight_config.sat, 0, (LED_TYPE *)&led[i]); + for (int i = 0; i < effect_num_leds; i++) { + LED_TYPE *ledp = led + i + effect_start_pos; + if (ipos) { + sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, ledp); + } else if (i>=effect_num_leds/2 && !anim->pos) { + sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, ledp); + } else { + sethsv(rgblight_config.hue, rgblight_config.sat, 0, ledp); } } rgblight_set(); diff --git a/quantum/rgblight.h b/quantum/rgblight.h index 35d7942ca..064522a2b 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -99,7 +99,7 @@ enum RGBLIGHT_EFFECT_MODE { #endif #ifndef RGBLIGHT_EFFECT_KNIGHT_LED_NUM -#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM RGBLED_NUM +#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM (effect_num_leds) #endif #ifndef RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL @@ -170,6 +170,100 @@ typedef struct _rgblight_status_t { #endif } rgblight_status_t; +/* === Utility Functions ===*/ +void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1); +void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1); // without RGBLIGHT_LIMIT_VAL check +void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1); + +/* === Low level Functions === */ +void rgblight_set(void); +void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds); + +/* === Effects and Animations Functions === */ +/* effect range setting */ +void rgblight_set_effect_range(uint8_t start_pos, uint8_t num_leds); + +/* direct operation */ +void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index); +void rgblight_sethsv_at(uint8_t hue, uint8_t sat, uint8_t val, uint8_t index); +void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end); +void rgblight_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end); +void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b); + +#ifndef RGBLIGHT_SPLIT +void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b); +void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b); +void rgblight_sethsv_master(uint8_t hue, uint8_t sat, uint8_t val); +void rgblight_sethsv_slave(uint8_t hue, uint8_t sat, uint8_t val); +#endif + +/* effect mode change */ +void rgblight_mode(uint8_t mode); +void rgblight_mode_noeeprom(uint8_t mode); +void rgblight_increase(void); +void rgblight_decrease(void); +void rgblight_step(void); +void rgblight_step_noeeprom(void); +void rgblight_step_reverse(void); +void rgblight_step_reverse_noeeprom(void); + +/* effects mode disable/enable */ +void rgblight_toggle(void); +void rgblight_toggle_noeeprom(void); +void rgblight_enable(void); +void rgblight_enable_noeeprom(void); +void rgblight_disable(void); +void rgblight_disable_noeeprom(void); + +/* hue, sat, val change */ +void rgblight_increase_hue(void); +void rgblight_increase_hue_noeeprom(void); +void rgblight_decrease_hue(void); +void rgblight_decrease_hue_noeeprom(void); +void rgblight_increase_sat(void); +void rgblight_increase_sat_noeeprom(void); +void rgblight_decrease_sat(void); +void rgblight_decrease_sat_noeeprom(void); +void rgblight_increase_val(void); +void rgblight_increase_val_noeeprom(void); +void rgblight_decrease_val(void); +void rgblight_decrease_val_noeeprom(void); +void rgblight_increase_speed(void); +void rgblight_decrease_speed(void); +void rgblight_sethsv(uint8_t hue, uint8_t sat, uint8_t val); +void rgblight_sethsv_noeeprom(uint8_t hue, uint8_t sat, uint8_t val); + +/* query */ +uint8_t rgblight_get_mode(void); +uint8_t rgblight_get_hue(void); +uint8_t rgblight_get_sat(void); +uint8_t rgblight_get_val(void); + +/* === qmk_firmware (core)internal Functions === */ +void rgblight_init(void); +uint32_t rgblight_read_dword(void); +void rgblight_update_dword(uint32_t dword); +uint32_t eeconfig_read_rgblight(void); +void eeconfig_update_rgblight(uint32_t val); +void eeconfig_update_rgblight_default(void); +void eeconfig_debug_rgblight(void); + +void rgb_matrix_increase(void); +void rgb_matrix_decrease(void); + +void rgblight_sethsv_eeprom_helper(uint8_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom); +void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom); + +#define EZ_RGB(val) rgblight_show_solid_color((val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF) +void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b); + +void rgblight_task(void); + +void rgblight_timer_init(void); +void rgblight_timer_enable(void); +void rgblight_timer_disable(void); +void rgblight_timer_toggle(void); + #ifdef RGBLIGHT_SPLIT #define RGBLIGHT_STATUS_CHANGE_MODE (1<<0) #define RGBLIGHT_STATUS_CHANGE_HSVS (1<<1) @@ -183,87 +277,12 @@ typedef struct _rgblight_status_t { /* for split keyboard master side */ uint8_t rgblight_get_change_flags(void); - void rgblight_clear_change_flags(void); - void rgblight_get_syncinfo(rgblight_syncinfo_t *syncinfo); + void rgblight_clear_change_flags(void); + void rgblight_get_syncinfo(rgblight_syncinfo_t *syncinfo); /* for split keyboard slave side */ - void rgblight_update_sync(rgblight_syncinfo_t *syncinfo, bool write_to_eeprom); + void rgblight_update_sync(rgblight_syncinfo_t *syncinfo, bool write_to_eeprom); #endif -void rgblight_init(void); -void rgblight_increase(void); -void rgblight_decrease(void); -void rgblight_toggle(void); -void rgblight_enable(void); -void rgblight_disable(void); -void rgblight_step(void); -void rgblight_step_reverse(void); -uint8_t rgblight_get_mode(void); -void rgblight_mode(uint8_t mode); -void rgblight_set(void); -uint32_t rgblight_read_dword(void); -void rgblight_update_dword(uint32_t dword); -void rgblight_increase_hue(void); -void rgblight_decrease_hue(void); -void rgblight_increase_sat(void); -void rgblight_decrease_sat(void); -void rgblight_increase_val(void); -void rgblight_decrease_val(void); -void rgblight_increase_speed(void); -void rgblight_decrease_speed(void); -void rgblight_sethsv(uint8_t hue, uint8_t sat, uint8_t val); -uint8_t rgblight_get_hue(void); -uint8_t rgblight_get_sat(void); -uint8_t rgblight_get_val(void); -void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b); -void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index); -void rgblight_sethsv_at(uint8_t hue, uint8_t sat, uint8_t val, uint8_t index); -void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end); -void rgblight_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end); -void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b); -void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b); -void rgblight_sethsv_master(uint8_t hue, uint8_t sat, uint8_t val); -void rgblight_sethsv_slave(uint8_t hue, uint8_t sat, uint8_t val); -void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds); - -uint32_t eeconfig_read_rgblight(void); -void eeconfig_update_rgblight(uint32_t val); -void eeconfig_update_rgblight_default(void); -void eeconfig_debug_rgblight(void); - -void rgb_matrix_increase(void); -void rgb_matrix_decrease(void); - -void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1); -void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1); - -void rgblight_sethsv_noeeprom(uint8_t hue, uint8_t sat, uint8_t val); -void rgblight_mode_noeeprom(uint8_t mode); -void rgblight_toggle_noeeprom(void); -void rgblight_enable_noeeprom(void); -void rgblight_disable_noeeprom(void); -void rgblight_step_noeeprom(void); -void rgblight_step_reverse_noeeprom(void); -void rgblight_increase_hue_noeeprom(void); -void rgblight_decrease_hue_noeeprom(void); -void rgblight_increase_sat_noeeprom(void); -void rgblight_decrease_sat_noeeprom(void); -void rgblight_increase_val_noeeprom(void); -void rgblight_decrease_val_noeeprom(void); - -void rgblight_sethsv_eeprom_helper(uint8_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom); -void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom); - - -#define EZ_RGB(val) rgblight_show_solid_color((val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF) -void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b); - -void rgblight_task(void); - -void rgblight_timer_init(void); -void rgblight_timer_enable(void); -void rgblight_timer_disable(void); -void rgblight_timer_toggle(void); - #ifdef RGBLIGHT_USE_TIMER typedef struct _animation_status_t { From 6764bb0157d621c63b97831afb9061345159df5a Mon Sep 17 00:00:00 2001 From: zvecr Date: Thu, 16 May 2019 13:53:48 +0100 Subject: [PATCH 035/341] Align Configurator support for ai03/lunar (#5864) --- keyboards/ai03/lunar/info.json | 73 +++++++++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) diff --git a/keyboards/ai03/lunar/info.json b/keyboards/ai03/lunar/info.json index c7f6454f0..e18a10bde 100644 --- a/keyboards/ai03/lunar/info.json +++ b/keyboards/ai03/lunar/info.json @@ -7,7 +7,78 @@ "height": 5, "layouts": { "LAYOUT": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Insert", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Home", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.5}, {"x":4.25, "y":4, "w":2.25}, {"x":6.5, "y":4, "w":1.5}, {"x":8, "y":4, "w":2.75}, {"label":"Alt", "x":10.75, "y":4, "w":1.25}, {"label":"Win", "x":12, "y":4}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"@", "x":2, "y":0}, + {"label":"#", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"BackspaceL", "x":13, "y":0}, + {"label":"BackspaceR", "x":14, "y":0}, + {"label":"Insert", "x":15, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"Delete", "x":15, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Home", "x":15, "y":2}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"\u2191", "x":14, "y":3}, + {"label":"End", "x":15, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.5}, + {"label":"Win", "x":1.5, "y":4, "w":1.25}, + {"label":"Alt", "x":2.75, "y":4, "w":1.5}, + {"x":4.25, "y":4, "w":2.25}, + {"x":6.5, "y":4, "w":1.5}, + {"x":8, "y":4, "w":2.75}, + {"label":"Alt", "x":10.75, "y":4, "w":1.25}, + {"label":"Win", "x":12, "y":4}, + {"label":"\u2190", "x":13, "y":4}, + {"label":"\u2193", "x":14, "y":4}, + {"label":"\u2192", "x":15, "y":4} + ] } } } \ No newline at end of file From fc06975fa3ea31049c8a1dc7a42b78b90db1c89b Mon Sep 17 00:00:00 2001 From: zvecr Date: Thu, 16 May 2019 13:54:43 +0100 Subject: [PATCH 036/341] Add Configurator support for ai03/orbit (#5863) * Add Configurator support for ai03/orbit * Add Configurator support for ai03/orbit - align with documented KLE --- keyboards/ai03/orbit/info.json | 88 ++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/keyboards/ai03/orbit/info.json b/keyboards/ai03/orbit/info.json index e69de29bb..ca8388113 100644 --- a/keyboards/ai03/orbit/info.json +++ b/keyboards/ai03/orbit/info.json @@ -0,0 +1,88 @@ +{ + "keyboard_name": "orbit", + "url": "https://github.com/ai03-2725/Orbit", + "maintainer": "ai03", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0.63}, + {"x":1, "y":0.38}, + {"x":2, "y":0.38}, + {"x":3, "y":0.13}, + {"x":4, "y":0}, + {"x":5, "y":0.13}, + {"x":6, "y":0.25}, + {"x":9, "y":0.25}, + {"x":10, "y":0.13}, + {"x":11, "y":0}, + {"x":12, "y":0.13}, + {"x":13, "y":0.38}, + {"x":14, "y":0.38}, + {"x":15, "y":0.63}, + + {"x":0, "y":1.63}, + {"x":1, "y":1.38}, + {"x":2, "y":1.38}, + {"x":3, "y":1.13}, + {"x":4, "y":1}, + {"x":5, "y":1.13}, + {"x":6, "y":1.25}, + {"x":9, "y":1.25}, + {"x":10, "y":1.13}, + {"x":11, "y":1}, + {"x":12, "y":1.13}, + {"x":13, "y":1.38}, + {"x":14, "y":1.38}, + {"x":15, "y":1.63}, + + {"x":0, "y":2.63}, + {"x":1, "y":2.38}, + {"x":2, "y":2.38}, + {"x":3, "y":2.13}, + {"x":4, "y":2}, + {"x":5, "y":2.13}, + {"x":6, "y":2.25}, + {"x":9, "y":2.25}, + {"x":10, "y":2.13}, + {"x":11, "y":2}, + {"x":12, "y":2.13}, + {"x":13, "y":2.38}, + {"x":14, "y":2.38}, + {"x":15, "y":2.63}, + + {"x":0, "y":3.63}, + {"x":1, "y":3.38}, + {"x":2, "y":3.38}, + {"x":3, "y":3.13}, + {"x":4, "y":3}, + {"x":5, "y":3.13}, + {"x":6, "y":3.25}, + {"x":9, "y":3.25}, + {"x":10, "y":3.13}, + {"x":11, "y":3}, + {"x":12, "y":3.13}, + {"x":13, "y":3.38}, + {"x":14, "y":3.38}, + {"x":15, "y":3.63}, + + {"x":1, "y":4.38}, + {"x":2, "y":4.38}, + {"x":3, "y":4.13}, + {"x":4, "y":4}, + + {"x":5.5, "y":4.25}, + {"x":6.5, "y":4.5, "h":1.5}, + + {"x":8.5, "y":4.5, "h":1.5}, + {"x":9.5, "y":4.25}, + + {"x":11, "y":4}, + {"x":12, "y":4.13}, + {"x":13, "y":4.38}, + {"x":14, "y":4.38} + ] + } + } +} \ No newline at end of file From b541369c45f13369c16de1b887f6ca5b7e589e6d Mon Sep 17 00:00:00 2001 From: Pavlos Vinieratos Date: Thu, 16 May 2019 17:21:51 +0200 Subject: [PATCH 037/341] [Docs] Fix typo in Userspace doc (#5871) * typo * Update docs/feature_userspace.md Co-Authored-By: fauxpark --- docs/feature_userspace.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/feature_userspace.md b/docs/feature_userspace.md index d82d43138..2f119c8bd 100644 --- a/docs/feature_userspace.md +++ b/docs/feature_userspace.md @@ -110,7 +110,7 @@ QMK has a bunch of [functions](custom_quantum_functions.md) that have [`_quantum However, you can actually add support for keymap version, so that you can use it in both your userspace and your keymap! -For instance, lets looks at the `layer_state_set_user` function. Lets enable the [Tri Layer State](ref_functions.md#olkb-tri-layers) functionalitly to all of our boards, and then still have your `keymap.c` still able to use this functionality. +For instance, let's look at the `layer_state_set_user()` function. You can enable the [Tri Layer State](ref_functions.md#olkb-tri-layers) functionality on all of your boards, while also retaining the Tri Layer functionality in your `keymap.c` files. In your `` file, you'd want to add this: ```c From a8af694d265d5d136e81669ec7b30052a8f4de08 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu, 16 May 2019 08:52:38 -0700 Subject: [PATCH 038/341] [Keyboard] Leaf60 hotswap and universal pcb (#5882) * initial commit * copy paste with some fixes the code from fox lab leaf60 repo * add 60_ansi and 60_hhkb and community layout support * add QMK Configurator support * turn bootmagic to lite and turn on rgb and backlights * disable some features so firmware isn't too big * initial commit for hotswap leaf60 * add hotswap support * edits for consistency * add a generic leaf60 readme * turn off console and command to save firmware space * not enabling sleep led enable * not enabling sleep led enable * had one extra key in 60_hhkb * get rid of limit val define * Update keyboards/foxlab/leaf60/hotswap/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/foxlab/leaf60/hotswap/rules.mk Co-Authored-By: fauxpark * Update keyboards/foxlab/leaf60/universal/rules.mk Co-Authored-By: fauxpark --- keyboards/foxlab/leaf60/hotswap/config.h | 229 ++++++++++++++++++ keyboards/foxlab/leaf60/hotswap/hotswap.c | 59 +++++ keyboards/foxlab/leaf60/hotswap/hotswap.h | 40 +++ keyboards/foxlab/leaf60/hotswap/info.json | 12 + .../leaf60/hotswap/keymaps/default/config.h | 19 ++ .../leaf60/hotswap/keymaps/default/keymap.c | 46 ++++ .../leaf60/hotswap/keymaps/default/readme.md | 1 + keyboards/foxlab/leaf60/hotswap/readme.md | 13 + keyboards/foxlab/leaf60/hotswap/rules.mk | 80 ++++++ keyboards/foxlab/leaf60/readme.md | 7 + keyboards/foxlab/leaf60/universal/config.h | 229 ++++++++++++++++++ keyboards/foxlab/leaf60/universal/info.json | 20 ++ .../leaf60/universal/keymaps/default/config.h | 19 ++ .../leaf60/universal/keymaps/default/keymap.c | 46 ++++ .../universal/keymaps/default/readme.md | 1 + keyboards/foxlab/leaf60/universal/readme.md | 13 + keyboards/foxlab/leaf60/universal/rules.mk | 82 +++++++ keyboards/foxlab/leaf60/universal/universal.c | 61 +++++ keyboards/foxlab/leaf60/universal/universal.h | 68 ++++++ 19 files changed, 1045 insertions(+) create mode 100644 keyboards/foxlab/leaf60/hotswap/config.h create mode 100644 keyboards/foxlab/leaf60/hotswap/hotswap.c create mode 100644 keyboards/foxlab/leaf60/hotswap/hotswap.h create mode 100644 keyboards/foxlab/leaf60/hotswap/info.json create mode 100644 keyboards/foxlab/leaf60/hotswap/keymaps/default/config.h create mode 100644 keyboards/foxlab/leaf60/hotswap/keymaps/default/keymap.c create mode 100644 keyboards/foxlab/leaf60/hotswap/keymaps/default/readme.md create mode 100644 keyboards/foxlab/leaf60/hotswap/readme.md create mode 100644 keyboards/foxlab/leaf60/hotswap/rules.mk create mode 100644 keyboards/foxlab/leaf60/readme.md create mode 100644 keyboards/foxlab/leaf60/universal/config.h create mode 100644 keyboards/foxlab/leaf60/universal/info.json create mode 100644 keyboards/foxlab/leaf60/universal/keymaps/default/config.h create mode 100644 keyboards/foxlab/leaf60/universal/keymaps/default/keymap.c create mode 100644 keyboards/foxlab/leaf60/universal/keymaps/default/readme.md create mode 100644 keyboards/foxlab/leaf60/universal/readme.md create mode 100644 keyboards/foxlab/leaf60/universal/rules.mk create mode 100644 keyboards/foxlab/leaf60/universal/universal.c create mode 100644 keyboards/foxlab/leaf60/universal/universal.h diff --git a/keyboards/foxlab/leaf60/hotswap/config.h b/keyboards/foxlab/leaf60/hotswap/config.h new file mode 100644 index 000000000..a471ea8e5 --- /dev/null +++ b/keyboards/foxlab/leaf60/hotswap/config.h @@ -0,0 +1,229 @@ +/* +Copyright 2019 Fox Lab + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Fox Lab +#define PRODUCT Leaf60 Hotswap +#define DESCRIPTION A custom hotswap 60% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D2, D1, D0, D3, D5 } +#define MATRIX_COL_PINS { F5, F4, F1, F0, B0, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 4 + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 8 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/foxlab/leaf60/hotswap/hotswap.c b/keyboards/foxlab/leaf60/hotswap/hotswap.c new file mode 100644 index 000000000..20778d927 --- /dev/null +++ b/keyboards/foxlab/leaf60/hotswap/hotswap.c @@ -0,0 +1,59 @@ +/* Copyright 2019 Fox Lab + * + * 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 . + */ +#include "hotswap.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + setPinOutput(E6); + matrix_init_user(); +} +/* + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ + +void led_set_kb(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(E6); + } else { + writePinHigh(E6); + } + led_set_user(usb_led); +} diff --git a/keyboards/foxlab/leaf60/hotswap/hotswap.h b/keyboards/foxlab/leaf60/hotswap/hotswap.h new file mode 100644 index 000000000..eaf0b2d3a --- /dev/null +++ b/keyboards/foxlab/leaf60/hotswap/hotswap.h @@ -0,0 +1,40 @@ +/* Copyright 2019 Fox Lab + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_60_tsangan_hhkb( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K407, K411, K412, K413 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, KC_NO }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, KC_NO, K407, KC_NO, KC_NO, KC_NO, K411, K412, K413, KC_NO } \ +} diff --git a/keyboards/foxlab/leaf60/hotswap/info.json b/keyboards/foxlab/leaf60/hotswap/info.json new file mode 100644 index 000000000..1e8daa704 --- /dev/null +++ b/keyboards/foxlab/leaf60/hotswap/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Fox Lab Hotswap Leaf60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_tsangan_hhkb": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.5}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}, {"x":13.5, "y":4, "w":1.5}] + } + } +} \ No newline at end of file diff --git a/keyboards/foxlab/leaf60/hotswap/keymaps/default/config.h b/keyboards/foxlab/leaf60/hotswap/keymaps/default/config.h new file mode 100644 index 000000000..26c6d6ade --- /dev/null +++ b/keyboards/foxlab/leaf60/hotswap/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/foxlab/leaf60/hotswap/keymaps/default/keymap.c b/keyboards/foxlab/leaf60/hotswap/keymaps/default/keymap.c new file mode 100644 index 000000000..3f9ea1b49 --- /dev/null +++ b/keyboards/foxlab/leaf60/hotswap/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2019 Fox Lab + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_60_tsangan_hhkb( + KC_ESC, 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_GRV, KC_BSLS, + 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_BSPC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + 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_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RCTL), + + LAYOUT_60_tsangan_hhkb( + RESET, 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_TRNS, KC_TRNS, + KC_TRNS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/foxlab/leaf60/hotswap/keymaps/default/readme.md b/keyboards/foxlab/leaf60/hotswap/keymaps/default/readme.md new file mode 100644 index 000000000..870439f26 --- /dev/null +++ b/keyboards/foxlab/leaf60/hotswap/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Fox Lab Hotswap Leaf60 \ No newline at end of file diff --git a/keyboards/foxlab/leaf60/hotswap/readme.md b/keyboards/foxlab/leaf60/hotswap/readme.md new file mode 100644 index 000000000..cdec1870d --- /dev/null +++ b/keyboards/foxlab/leaf60/hotswap/readme.md @@ -0,0 +1,13 @@ +# Fox Lab Hotswap Leaf60 + +A hotswap, Tsangan-layout, gasket-mount 60% keyboard. + +Keyboard Maintainer: [Fox Lab](https://github.com/fox-lab), [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Leaf60 powered by the ATmega32U4 +Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=99002.0) + +Make example for this keyboard (after setting up your build environment): + + make foxlab/leaf60/hotswap:default + +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). diff --git a/keyboards/foxlab/leaf60/hotswap/rules.mk b/keyboards/foxlab/leaf60/hotswap/rules.mk new file mode 100644 index 000000000..75ee00a1a --- /dev/null +++ b/keyboards/foxlab/leaf60/hotswap/rules.mk @@ -0,0 +1,80 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +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 = no # Console for debug(+400) +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/foxlab/leaf60/readme.md b/keyboards/foxlab/leaf60/readme.md new file mode 100644 index 000000000..994915680 --- /dev/null +++ b/keyboards/foxlab/leaf60/readme.md @@ -0,0 +1,7 @@ +# Fox Lab Leaf60 + +The Leaf60 is a 60% gasket mount board sold via [Geekhack Group Buy](https://geekhack.org/index.php?topic=99002.0). + +It was available with a universal layout PCB and a hotswap tsangan PCB. + +**Firmware generated for one PCB will not work on the other.** \ No newline at end of file diff --git a/keyboards/foxlab/leaf60/universal/config.h b/keyboards/foxlab/leaf60/universal/config.h new file mode 100644 index 000000000..d8d66ee38 --- /dev/null +++ b/keyboards/foxlab/leaf60/universal/config.h @@ -0,0 +1,229 @@ +/* +Copyright 2019 Fox Lab + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Fox Lab +#define PRODUCT Leaf60 Universal +#define DESCRIPTION A custom 60% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D0, D1, F0, F4, F1 } +#define MATRIX_COL_PINS { B0, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 8 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/foxlab/leaf60/universal/info.json b/keyboards/foxlab/leaf60/universal/info.json new file mode 100644 index 000000000..f08503377 --- /dev/null +++ b/keyboards/foxlab/leaf60/universal/info.json @@ -0,0 +1,20 @@ +{ + "keyboard_name": "Fox Lab Leaf60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_ansi": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":2.75}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_hhkb": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/foxlab/leaf60/universal/keymaps/default/config.h b/keyboards/foxlab/leaf60/universal/keymaps/default/config.h new file mode 100644 index 000000000..d8f6533c6 --- /dev/null +++ b/keyboards/foxlab/leaf60/universal/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Fox Lab + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/foxlab/leaf60/universal/keymaps/default/keymap.c b/keyboards/foxlab/leaf60/universal/keymaps/default/keymap.c new file mode 100644 index 000000000..ff84fa399 --- /dev/null +++ b/keyboards/foxlab/leaf60/universal/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2019 Fox Lab + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_all( + KC_ESC, 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_GRV, KC_BSPC, + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL), + + LAYOUT_all( + RESET, 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_TRNS, KC_TRNS, + KC_TRNS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/foxlab/leaf60/universal/keymaps/default/readme.md b/keyboards/foxlab/leaf60/universal/keymaps/default/readme.md new file mode 100644 index 000000000..a9f033367 --- /dev/null +++ b/keyboards/foxlab/leaf60/universal/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Universal Leaf60 \ No newline at end of file diff --git a/keyboards/foxlab/leaf60/universal/readme.md b/keyboards/foxlab/leaf60/universal/readme.md new file mode 100644 index 000000000..b65f1d40f --- /dev/null +++ b/keyboards/foxlab/leaf60/universal/readme.md @@ -0,0 +1,13 @@ +# Fox Lab Leaf60 + +A 60% gasket sandwich made by Fox Lab. + +Keyboard Maintainer: [Fox Lab](https://github.com/fox-lab), [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Leaf60 powered by the ATmega32U4 +Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=99002.0) + +Make example for this keyboard (after setting up your build environment): + + make foxlab/leaf60/universal:default + +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). diff --git a/keyboards/foxlab/leaf60/universal/rules.mk b/keyboards/foxlab/leaf60/universal/rules.mk new file mode 100644 index 000000000..a86541033 --- /dev/null +++ b/keyboards/foxlab/leaf60/universal/rules.mk @@ -0,0 +1,82 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = 60_ansi 60_hhkb diff --git a/keyboards/foxlab/leaf60/universal/universal.c b/keyboards/foxlab/leaf60/universal/universal.c new file mode 100644 index 000000000..5fe663a1b --- /dev/null +++ b/keyboards/foxlab/leaf60/universal/universal.c @@ -0,0 +1,61 @@ +/* Copyright 2019 Fox Lab + * + * 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 . + */ +#include "universal.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + setPinOutput(E6); + matrix_init_user(); +} + +/* + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ + + +void led_set_kb(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(E6); + } else { + writePinHigh(E6); + } + led_set_user(usb_led); +} diff --git a/keyboards/foxlab/leaf60/universal/universal.h b/keyboards/foxlab/leaf60/universal/universal.h new file mode 100644 index 000000000..2c31229dc --- /dev/null +++ b/keyboards/foxlab/leaf60/universal/universal.h @@ -0,0 +1,68 @@ +/* Copyright 2019 Fox Lab + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K404, K406, K408, K410, K411, K412, K413 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, KC_NO }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO }, \ + { K400, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, KC_NO } \ +} + +#define LAYOUT_60_ansi( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \ + K400, K401, K402, K406, K410, K411, K412, K413 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, KC_NO }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, KC_NO }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, KC_NO } \ +} + +#define LAYOUT_60_hhkb( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K401, K402, K406, K410, K411 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, KC_NO }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO }, \ + { KC_NO, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, KC_NO, KC_NO } \ +} From 1a28906a3da1f14034b81871b90bcce0ed56c286 Mon Sep 17 00:00:00 2001 From: Pavlos Vinieratos Date: Thu, 16 May 2019 18:38:28 +0200 Subject: [PATCH 039/341] [Keymap] Pvinis/update for iris (#5889) * add default functions * some indenting * add ctl and alt * maybe? --- keyboards/keebio/iris/keymaps/pvinis/config.h | 10 +++++----- keyboards/keebio/iris/keymaps/pvinis/keymap.c | 14 ++++++-------- users/pvinis/config.h | 1 + users/pvinis/pvinis.c | 10 ++++++++++ users/pvinis/pvinis.h | 4 ++-- 5 files changed, 24 insertions(+), 15 deletions(-) diff --git a/keyboards/keebio/iris/keymaps/pvinis/config.h b/keyboards/keebio/iris/keymaps/pvinis/config.h index 7a7beb0b8..b2fb43be9 100644 --- a/keyboards/keebio/iris/keymaps/pvinis/config.h +++ b/keyboards/keebio/iris/keymaps/pvinis/config.h @@ -2,9 +2,9 @@ #ifdef PRODUCT -#undef PRODUCT -#define PRODUCT Iris Keyboard - pvinis -#endif // PRODUCT + #undef PRODUCT + #define PRODUCT Iris Keyboard - pvinis +#endif // Use I2C or Serial, not both @@ -20,5 +20,5 @@ // choose pin to use for audio. c6 is the one iris uses. #ifdef AUDIO_ENABLE -#define C6_AUDIO -#endif // AUDIO_ENABLE + #define C6_AUDIO +#endif diff --git a/keyboards/keebio/iris/keymaps/pvinis/keymap.c b/keyboards/keebio/iris/keymaps/pvinis/keymap.c index fb9e4adcf..2f6d5a6b4 100644 --- a/keyboards/keebio/iris/keymaps/pvinis/keymap.c +++ b/keyboards/keebio/iris/keymaps/pvinis/keymap.c @@ -23,20 +23,18 @@ #endif #ifdef AUDIO_ENABLE - //#define STARTUP_SONG SONG(SONIC_RING) + // #define STARTUP_SONG SONG(SONIC_RING) #endif #ifdef AUDIO_ENABLE -float tone_sonic[][2] = SONG(IN_LIKE_FLINT); -float tone_1[][2] = SONG(QWERTY_SOUND); -float tone_2[][2] = SONG(OLD_SPICE); -float tone_3[][2] = SONG(OVERWATCH_THEME); -float tone_4[][2] = SONG(QWERTY_SOUND); + float tone_sonic[][2] = SONG(IN_LIKE_FLINT); + float tone_1[][2] = SONG(QWERTY_SOUND); + float tone_2[][2] = SONG(OLD_SPICE); + float tone_3[][2] = SONG(OVERWATCH_THEME); + float tone_4[][2] = SONG(QWERTY_SOUND); #endif - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ,-----------------------------. ,-----------------------------. diff --git a/users/pvinis/config.h b/users/pvinis/config.h index 7f17f2d02..8e2efb40a 100644 --- a/users/pvinis/config.h +++ b/users/pvinis/config.h @@ -2,6 +2,7 @@ #ifdef AUDIO_ENABLE // #define STARTUP_SONG SONG(SONIC_RING) +// #define DAC_SAMPLE_MAX 65535U // maybe this works for volume? #endif // allow rolling when keys have hold functionality diff --git a/users/pvinis/pvinis.c b/users/pvinis/pvinis.c index 754403579..e97edcb98 100644 --- a/users/pvinis/pvinis.c +++ b/users/pvinis/pvinis.c @@ -77,3 +77,13 @@ qk_tap_dance_action_t tap_dance_actions[] = { void keyboard_post_init_user(void) { keyboard_post_init_user_local(); } + + +// default functions +__attribute__ ((weak)) +void keyboard_post_init_user_local(void) {} + +__attribute__ ((weak)) +uint32_t layer_state_set_user_local(uint32_t state) { + return state; +} diff --git a/users/pvinis/pvinis.h b/users/pvinis/pvinis.h index 0c5e2841a..0c75c6a66 100644 --- a/users/pvinis/pvinis.h +++ b/users/pvinis/pvinis.h @@ -78,8 +78,8 @@ enum { #define _________________QWERTY_R2_________________ KC_H , KC_J , KC_K , KC_L , KC_SCLN #define _________________QWERTY_R3_________________ KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH -#define _____________MOD_QWERTY_L2_________________ KC_A , SFT_T(KC_S), GUI_T(KC_D), KC_F , KC_G -#define _____________MOD_QWERTY_R2_________________ KC_H , KC_J , GUI_T(KC_K), SFT_T(KC_L), KC_SCLN +#define _____________MOD_QWERTY_L2_________________ CTL_T(KC_A), SFT_T(KC_S), GUI_T(KC_D), ALT_T(KC_F), KC_G +#define _____________MOD_QWERTY_R2_________________ KC_H , ALT_T(KC_J), GUI_T(KC_K), SFT_T(KC_L), CTL_T(KC_SCLN) // ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, // | Q | G | M | L | W | | Y | F | I | O | P | From 63ddad86a92f11725548cd9775f82e7293aef050 Mon Sep 17 00:00:00 2001 From: ENDO Katsuhiro Date: Fri, 17 May 2019 01:39:06 +0900 Subject: [PATCH 040/341] Add a new keyboard Halberd (#5874) * Add a new keyboard Halberd. * Update default keymap and add new keymap. * Use pragma once. * Comment out IS_COMMAND macro. * Remove unnecessary backslashes. * Remove dead code. * Change layer defines to enum. * Remove DISABLE_JTAG definition. * Change BOOTMAGIC_ENABLE to "lite". * Remove unnecessary line. Co-Authored-By: fauxpark --- keyboards/halberd/config.h | 232 ++++++++++++++++++ keyboards/halberd/halberd.c | 43 ++++ keyboards/halberd/halberd.h | 40 +++ keyboards/halberd/info.json | 13 + keyboards/halberd/keymaps/default/config.h | 19 ++ keyboards/halberd/keymaps/default/keymap.c | 160 ++++++++++++ keyboards/halberd/keymaps/default/readme.md | 1 + .../halberd/keymaps/right_modifiers/config.h | 19 ++ .../halberd/keymaps/right_modifiers/keymap.c | 160 ++++++++++++ .../halberd/keymaps/right_modifiers/readme.md | 2 + keyboards/halberd/readme.md | 15 ++ keyboards/halberd/rules.mk | 80 ++++++ 12 files changed, 784 insertions(+) create mode 100644 keyboards/halberd/config.h create mode 100644 keyboards/halberd/halberd.c create mode 100644 keyboards/halberd/halberd.h create mode 100644 keyboards/halberd/info.json create mode 100644 keyboards/halberd/keymaps/default/config.h create mode 100644 keyboards/halberd/keymaps/default/keymap.c create mode 100644 keyboards/halberd/keymaps/default/readme.md create mode 100644 keyboards/halberd/keymaps/right_modifiers/config.h create mode 100644 keyboards/halberd/keymaps/right_modifiers/keymap.c create mode 100644 keyboards/halberd/keymaps/right_modifiers/readme.md create mode 100644 keyboards/halberd/readme.md create mode 100644 keyboards/halberd/rules.mk diff --git a/keyboards/halberd/config.h b/keyboards/halberd/config.h new file mode 100644 index 000000000..ab46c4d8a --- /dev/null +++ b/keyboards/halberd/config.h @@ -0,0 +1,232 @@ +/* Copyright 2019 ENDO Katsuhiro + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Kagizaraya +#define PRODUCT Halberd +#define DESCRIPTION 40% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 11 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D6, D4, D5, E6 } +#define MATRIX_COL_PINS { D7, B4, C7, C6, B6, B5, F7, F6, F5, F4, F1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN F0 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 40 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) +*/ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 + +#define TAPPING_TERM 100 + + diff --git a/keyboards/halberd/halberd.c b/keyboards/halberd/halberd.c new file mode 100644 index 000000000..8b59310a7 --- /dev/null +++ b/keyboards/halberd/halberd.c @@ -0,0 +1,43 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * 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 . + */ +#include "halberd.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/halberd/halberd.h b/keyboards/halberd/halberd.h new file mode 100644 index 000000000..d2adb4a15 --- /dev/null +++ b/keyboards/halberd/halberd.h @@ -0,0 +1,40 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K20, K21, \ + K22, K23, K24, K25, K26, K27, K28, K29, K30, K31, K32, \ + K33, K34, K35, K36, K37, K38, K39 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10 }, \ + { K11, K12, K13, K14, K15, K16, K17, K18, K19, K20, K21 }, \ + { K22, K23, K24, K25, K26, K27, K28, K29, K30, K31, K32 }, \ + { KC_NO, KC_NO, K33, K34, K35, K36, K37, K38, K39, KC_NO, KC_NO } \ +} + diff --git a/keyboards/halberd/info.json b/keyboards/halberd/info.json new file mode 100644 index 000000000..5e2a57f21 --- /dev/null +++ b/keyboards/halberd/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Halberd", + "url": "", + "maintainer": "ka2hiro", + "width": 11, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"label":"!", "x":0, "y":0}, {"label":"@", "x":1, "y":0}, {"label":"#", "x":2, "y":0}, {"label":"$", "x":3, "y":0}, {"label":"%", "x":4, "y":0}, {"label":"Tab", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"Tab", "x":0, "y":1}, {"label":"_", "x":1, "y":1}, {"label":"+", "x":2, "y":1}, {"label":"|", "x":3, "y":1}, {"label":"~", "x":4, "y":1}, {"label":"BkSp", "x":5, "y":1}, {"label":":", "x":6, "y":1}, {"label":"\"", "x":7, "y":1}, {"label":">", "x":8, "y":1}, {"label":"{", "x":9, "y":1}, {"label":"}", "x":10, "y":1}, {"label":"Caps", "x":0, "y":2}, {"label":"-", "x":1, "y":2}, {"label":"=", "x":2, "y":2}, {"label":"\\", "x":3, "y":2}, {"label":"`", "x":4, "y":2}, {"label":"Enter", "x":5, "y":2}, {"label":";", "x":6, "y":2}, {"label":"'", "x":7, "y":2}, {"label":"<", "x":8, "y":2}, {"label":"[", "x":9, "y":2}, {"label":"]", "x":10, "y":2}, {"label":"GUI", "x":2, "y":3}, {"label":"Lower", "x":3, "y":3}, {"label":"Esc", "x":4, "y":3}, {"x":5, "y":3}, {"label":"Shift", "x":6, "y":3}, {"label":"Raise", "x":7, "y":3}, {"label":"Alt", "x":8, "y":3}] + } + } +} + diff --git a/keyboards/halberd/keymaps/default/config.h b/keyboards/halberd/keymaps/default/config.h new file mode 100644 index 000000000..cea12f905 --- /dev/null +++ b/keyboards/halberd/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/halberd/keymaps/default/keymap.c b/keyboards/halberd/keymaps/default/keymap.c new file mode 100644 index 000000000..c79a81def --- /dev/null +++ b/keyboards/halberd/keymaps/default/keymap.c @@ -0,0 +1,160 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * + * ,----------------------------------------------------------------------------. + * | Q | W | E | R | T | Tab | Y | U | I | O | P | + * |------+------+------+------+------|------|------+------+------+------+------| + * | A | S | D | F | G | BkSp | H | J | K | L | ; | + * |------+------+------+------+------|------|------+------+------+------+------| + * | Z | X | C | V | B | Enter| N | M | , | . | / | + * `-------------+------+------+------|------|------+------+------+------+------' + * | GUI | LOWER|Ctrl/Esc|Space|Shift| RAISE| Alt | + * `------------------------------------------------' + */ +[_QWERTY] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TAB, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_BSPC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LGUI, LOWER, MT(MOD_LCTL, KC_ESC), KC_SPC, KC_LSFT, RAISE, KC_LALT +), + +/* Raise + * + * ,----------------------------------------------------------------------------. + * | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + * |------+------+------+------+------|------|------+------+------+------+------| + * | Tab | _ | + | | | ~ | | : | " | > | { | } | + * |------+------+------+------+------|------|------+------+------+------+------| + * | Caps| - | = | \ | ` | | ; | ' | < | [ | ] | + * `-------------+------+------+------|------|------+------+------+------+------' + * | | LOWER| | | Esc | RAISE| | + * `------------------------------------------------' + */ +[_RAISE] = LAYOUT( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + KC_TAB, KC_UNDS, KC_PLUS, KC_PIPE, KC_TILD, _______, KC_COLN, KC_DQUO, KC_GT, KC_LCBR, KC_RCBR, + KC_CAPS, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, _______, KC_SCLN, KC_QUOT, KC_LT, KC_LBRC, KC_RBRC, + _______, _______, _______, _______, _______, _______, _______ +), + +/* Lower + * + * ,----------------------------------------------------------------------------. + * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | + * |------+------+------+------+------|------|------+------+------+------+------| + * | Tab | | | |Enter | | Left | Down | Up | Right| Enter| + * |------+------+------+------+------|------|------+------+------+------+------| + * | Ctrl| | GUI | Alt | Del | | BkSp | PgUp | PgDn | | | + * `-------------+------+------+------|------|------+------+------+------+------' + * | | LOWER| | | | RAISE| | + * `------------------------------------------------' + */ +[_LOWER] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_TAB, _______, _______, _______, KC_ENT, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ENT, + KC_LCTL, _______, KC_LGUI, KC_LALT, KC_DEL, _______, KC_BSPC, KC_PGUP, KC_PGDN, _______, _______, + _______, _______, _______, _______, _______, _______, _______ +), + + +/* Adjust (Lower + Raise) + * + * ,----------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | + * |------+------+------+------+------|------|------+------+------+------+------| + * | F11 | F12 | |RGBSAI|RGBSAD| |RGBVAI|RGBVAD| | | | + * |------+------+------+------+------|------|------+------+------+------+------| + * | Reset|RGBTOG|RGBMOD|RGBHUI|RGBHUD| | Prev | Next | Vol- | Vol+ | Play | + * `-------------+------+------+------|------|------+------+------+------+------' + * | | LOWER| | | | RAISE| | + * `------------------------------------------------' + */ +[_ADJUST] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_F11, KC_F12, RGB_RMOD, RGB_SAI, RGB_SAD, _______, RGB_VAI, RGB_VAD, _______, _______, _______, + RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, _______, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______ +) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + // persistant_default_layer_set(1UL<<_QWERTY); + set_single_persistent_default_layer(_QWERTY); + } + return false; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/halberd/keymaps/default/readme.md b/keyboards/halberd/keymaps/default/readme.md new file mode 100644 index 000000000..567b45c47 --- /dev/null +++ b/keyboards/halberd/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for halberd diff --git a/keyboards/halberd/keymaps/right_modifiers/config.h b/keyboards/halberd/keymaps/right_modifiers/config.h new file mode 100644 index 000000000..cea12f905 --- /dev/null +++ b/keyboards/halberd/keymaps/right_modifiers/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/halberd/keymaps/right_modifiers/keymap.c b/keyboards/halberd/keymaps/right_modifiers/keymap.c new file mode 100644 index 000000000..f74eef454 --- /dev/null +++ b/keyboards/halberd/keymaps/right_modifiers/keymap.c @@ -0,0 +1,160 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * + * ,----------------------------------------------------------------------------. + * | Q | W | E | R | T | Y | U | I | O | P | BkSp | + * |------+------+------+------+------|------+------+------+------+------|------| + * | A | S | D | F | G | H | J | K | L | ; | Enter| + * |------+------+------+------+------|------+------+------+------+------|------| + * | Z | X | C | V | B | N | M | , | . | / | Shift| + * `-------------+------+------+------|------+------+------+------+------+------' + * | GUI | LOWER|Ctrl/Esc|Space| RAISE| Alt | Tab | + * `------------------------------------------------' + */ +[_QWERTY] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, + KC_LGUI, LOWER, MT(MOD_LCTL, KC_ESC), KC_SPC, RAISE, KC_LALT, KC_TAB +), + +/* Raise + * + * ,----------------------------------------------------------------------------. + * | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * |------+------+------+------+------|------+------+------+------+------|------| + * | Tab | _ | + | | | ~ | : | " | > | { | } | | + * |------+------+------+------+------|------+------+------+------+------|------| + * | Caps| - | = | \ | ` | ; | ' | < | [ | ] | | + * `-------------+------+------+------|------+------+------+------+------+------' + * | | | | | | | | + * `------------------------------------------------' + */ +[_RAISE] = LAYOUT( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_TAB, KC_UNDS, KC_PLUS, KC_PIPE, KC_TILD, KC_COLN, KC_DQUO, KC_GT, KC_LCBR, KC_RCBR, _______, + KC_CAPS, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_SCLN, KC_QUOT, KC_LT, KC_LBRC, KC_RBRC, _______, + _______, _______, _______, _______, _______, _______, _______ +), + +/* Lower + * + * ,----------------------------------------------------------------------------. + * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------|------+------+------+------+------|------| + * | Tab | | | |Enter | Left | Down | Up | Right| Enter| | + * |------+------+------+------+------|------+------+------+------+------|------| + * | Ctrl| | GUI | Alt | Del | BkSp | PgUp | PgDn | | | | + * `-------------+------+------+------|------+------+------+------+------+------' + * | | | | | | | | + * `------------------------------------------------' + */ +[_LOWER] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_TAB, _______, _______, _______, KC_ENT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ENT, _______, + KC_LCTL, _______, KC_LGUI, KC_LALT, KC_DEL, KC_BSPC, KC_PGUP, KC_PGDN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ +), + + +/* Adjust (Lower + Raise) + * + * ,----------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | + * |------+------+------+------+------|------+------+------+------+------|------| + * | F11 | F12 | |RGBSAI|RGBSAD|RGBVAI|RGBVAD| | | | | + * |------+------+------+------+------|------+------+------+------+------|------| + * | Reset|RGBTOG|RGBMOD|RGBHUI|RGBHUD| Prev | Next | Vol- | Vol+ | Play | | + * `-------------+------+------+------|------+------+------+------+------+------' + * | | | | | | | | + * `------------------------------------------------' + */ +[_ADJUST] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + KC_F11, KC_F12, RGB_RMOD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, + RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, + _______, _______, _______, _______, _______, _______, _______ +) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + // persistant_default_layer_set(1UL<<_QWERTY); + set_single_persistent_default_layer(_QWERTY); + } + return false; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/halberd/keymaps/right_modifiers/readme.md b/keyboards/halberd/keymaps/right_modifiers/readme.md new file mode 100644 index 000000000..2479922bd --- /dev/null +++ b/keyboards/halberd/keymaps/right_modifiers/readme.md @@ -0,0 +1,2 @@ +# Modifiers on the right side. + diff --git a/keyboards/halberd/readme.md b/keyboards/halberd/readme.md new file mode 100644 index 000000000..7fa0388fd --- /dev/null +++ b/keyboards/halberd/readme.md @@ -0,0 +1,15 @@ +# Halberd + +![Halberd](https://i.imgur.com/QabQNPQ.jpg) + +40% keyboard. + +Keyboard Maintainer: [ka2hiro](https://github.com/ka2hiro) [@ka2hiro](https://twitter.com/ka2hiro) +Hardware Supported: Halberd PCB, ATMEGA32U4 +Hardware Availability: [@kagizaraya](https://twitter.com/kagizaraya) + +Make example for this keyboard (after setting up your build environment): + + make halberd:default:dfu + +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). diff --git a/keyboards/halberd/rules.mk b/keyboards/halberd/rules.mk new file mode 100644 index 000000000..ed4e6bde3 --- /dev/null +++ b/keyboards/halberd/rules.mk @@ -0,0 +1,80 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) From 5a8e387b774f9af6932a61ce17d5e762b141d884 Mon Sep 17 00:00:00 2001 From: Jan Christoph Ebersbach Date: Thu, 16 May 2019 18:40:00 +0200 Subject: [PATCH 041/341] [Keymap] Signum 3.0 Swap positions (#5892) --- .../signum/3_0/elitec/keymaps/default/keymap.c | 16 ++++++++-------- .../signum/3_0/elitec/keymaps/default/layout.py | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/keyboards/signum/3_0/elitec/keymaps/default/keymap.c b/keyboards/signum/3_0/elitec/keymaps/default/keymap.c index 511be8c0d..026907791 100644 --- a/keyboards/signum/3_0/elitec/keymaps/default/keymap.c +++ b/keyboards/signum/3_0/elitec/keymaps/default/keymap.c @@ -666,18 +666,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ------------------------------------------------- ------------------------------------------------- * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ] | * ------------------------------------------------- ------------------------------------------------- - * | | DF0 | DF1 | XXX | MO3 | XXX | | 4 | 4 | 5 | 6 | - | = | + * | | DF0 | DF1 | XXX | MO3 | MO3 | | 4 | 4 | 5 | 6 | - | = | * ------------------------------------------------- ------------------------------------------------- * | | MO5 | XXX | XXX | XXX | XXX | | 1 | 1 | 2 | 3 | \ | | * ----------------------------------------------------------------------------------------------------------------- - * TG2 | | Del | | |BSpace | 0 | + * TG2 | | | Del | | 0 |BSpace | * ------------------------------------------------- */ LAYOUT_ortho_4x12( KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC, - KC_TRNS, DF(0), DF(1), KC_NO, MO(3), KC_NO, KC_4, KC_4, KC_5, KC_6, KC_MINS, KC_EQL, + KC_TRNS, DF(0), DF(1), KC_NO, MO(3), MO(3), KC_4, KC_4, KC_5, KC_6, KC_MINS, KC_EQL, KC_TRNS, MO(5), KC_NO, KC_NO, KC_NO, KC_NO, KC_1, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, - TG(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_BSPC, KC_0, KC_TRNS, KC_TRNS, KC_TRNS + TG(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_0, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS ), /* @@ -685,7 +685,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ------------------------------------------------- ------------------------------------------------- * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | XXX | * ------------------------------------------------- ------------------------------------------------- - * | | XXX | XXX | XXX | MO3 | XXX | | F4 | F4 | F5 | F6 | F11 | XXX | + * | | XXX | XXX | XXX | MO3 | MO3 | | F4 | F4 | F5 | F6 | F11 | XXX | * ------------------------------------------------- ------------------------------------------------- * | | XXX | XXX | XXX | XXX | XXX | | F1 | F1 | F2 | F3 | F12 | | * ----------------------------------------------------------------------------------------------------------------- @@ -694,7 +694,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ LAYOUT_ortho_4x12( KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_NO, - KC_TRNS, KC_NO, KC_NO, KC_NO, MO(3), KC_NO, KC_F4, KC_F4, KC_F5, KC_F6, KC_F11, KC_NO, + KC_TRNS, KC_NO, KC_NO, KC_NO, MO(3), MO(3), KC_F4, KC_F4, KC_F5, KC_F6, KC_F11, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F1, KC_F2, KC_F3, KC_F12, KC_TRNS, TG(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), @@ -708,14 +708,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ------------------------------------------------- ------------------------------------------------- * | | XXX | XXX | XXX |CPg Up |CPg Up | | Pg Up | |v Arrow| XXX | App | | * ----------------------------------------------------------------------------------------------------------------- - * TG4 | | Del | | |BSpace | | + * TG4 | | | Del | |BSpace | | * ------------------------------------------------- */ LAYOUT_ortho_4x12( KC_ESC, KC_ESC, LCTL(KC_W), LCTL(KC_T), LCTL(KC_PGDN), LCTL(KC_PGDN), KC_PGDN, KC_HOME, KC_UP, KC_INS, LSFT(KC_INS), KC_ESC, KC_TRNS, KC_CAPS, LGUI(KC_LEFT), LGUI(KC_TAB), LGUI(KC_RGHT), LGUI(KC_RGHT), KC_LEFT, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_PSCR, KC_TRNS, KC_NO, KC_NO, KC_NO, LCTL(KC_PGUP), LCTL(KC_PGUP), KC_PGUP, KC_TRNS, KC_DOWN, KC_NO, KC_APP, KC_TRNS, - TG(4), KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + TG(4), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), /* diff --git a/keyboards/signum/3_0/elitec/keymaps/default/layout.py b/keyboards/signum/3_0/elitec/keymaps/default/layout.py index dd5fd3334..635a6bb19 100644 --- a/keyboards/signum/3_0/elitec/keymaps/default/layout.py +++ b/keyboards/signum/3_0/elitec/keymaps/default/layout.py @@ -446,15 +446,15 @@ colemak = [ # 2 numpad = [ "`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "]", - "", "DF0", "DF1", "XXX", "MO3", "XXX", "4", "4", "5", "6", "-", "=", + "", "DF0", "DF1", "XXX", "MO3", "MO3", "4", "4", "5", "6", "-", "=", "", "MO5", "XXX", "XXX", "XXX", "XXX", "1", "1", "2", "3", "\\", "", - "TG2", "", "", "", "Del", "", "", "BSpace", "0", "", "", "", + "TG2", "", "", "", "", "Del", "", "0", "BSpace", "", "", "", ] # 3 fpad = [ "", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "XXX", - "", "XXX", "XXX", "XXX", "MO3", "XXX", "F4", "F4", "F5", "F6", "F11", "XXX", + "", "XXX", "XXX", "XXX", "MO3", "MO3", "F4", "F4", "F5", "F6", "F11", "XXX", "", "XXX", "XXX", "XXX", "XXX", "XXX", "F1", "F1", "F2", "F3", "F12", "", "TG3", "", "", "", "", "", "", "", "", "", "", "", ] @@ -464,7 +464,7 @@ movement = [ "Esc", "Esc", "Tab x", "Tab n", "CPg Dn", "CPg Dn", "Pg Down", "Home", "^ Arrow", "Insert", "SInsert", "Esc", "", "Caps", "< Gui", "Gui Tab", "> Gui", "> Gui", "< Arrow", "< Arrow", "v Arrow", "> Arrow", "End", "Pr Scr", "", "XXX", "XXX", "XXX", "CPg Up", "CPg Up", "Pg Up", "", "v Arrow", "XXX", "App", "", - "TG4", "", "", "", "Del", "", "", "BSpace", "", "", "", "", + "TG4", "", "", "", "", "Del", "", "BSpace", "", "", "", "", ] # 5 From 48b01446ba6b74d7e0793f972873a10fceef2f62 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Thu, 16 May 2019 10:28:06 -0700 Subject: [PATCH 042/341] Make delay for Capslock in Hold-Tap functions configurable (#5497) * Increase delay for Hold-Tap register for CAPSLOCK Because it seems that the 80ms delay wasn't too much * Screw it, make the caps delay a define and make it configurable --- docs/config_options.md | 2 ++ tmk_core/common/action.c | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/config_options.md b/docs/config_options.md index 3ef00394d..cab3c0747 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -171,6 +171,8 @@ If you define these options you will enable the associated feature, which may in * how long for the Combo keys to be detected. Defaults to `TAPPING_TERM` if not defined. * `#define TAP_CODE_DELAY 100` * Sets the delay between `register_code` and `unregister_code`, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds. +* `#define TAP_HOLD_CAPS_DELAY 200` + * Sets the delay for Tap Hold keys (`LT`, `MT`) when using `KC_CAPSLOCK` keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 200ms if not defined. ## RGB Light Configuration diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index d4d4ac28d..bb4e66c9c 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -44,6 +44,9 @@ int retro_tapping_counter = 0; #include #endif +#ifndef TAP_HOLD_CAPS_DELAY +# define TAP_HOLD_CAPS_DELAY 200 +#endif /** \brief Called to execute an action. * * FIXME: Needs documentation. @@ -518,7 +521,7 @@ void process_action(keyrecord_t *record, action_t action) if (tap_count > 0) { dprint("KEYMAP_TAP_KEY: Tap: unregister_code\n"); if (action.layer_tap.code == KC_CAPS) { - wait_ms(80); + wait_ms(TAP_HOLD_CAPS_DELAY); } unregister_code(action.layer_tap.code); } else { @@ -853,8 +856,13 @@ void unregister_code(uint8_t code) */ void tap_code(uint8_t code) { register_code(code); + if (code == KC_CAPS) { + wait_ms(TAP_HOLD_CAPS_DELAY); + } #if TAP_CODE_DELAY > 0 + else { wait_ms(TAP_CODE_DELAY); + } #endif unregister_code(code); } From 9c7818582d9f82b1378cfbfb654dbb8e9348b268 Mon Sep 17 00:00:00 2001 From: mogira <7379940+mogira@users.noreply.github.com> Date: Sat, 18 May 2019 04:37:12 +0900 Subject: [PATCH 043/341] Fix the modifier of font variable in ssd1306.c (#5880) --- keyboards/claw44/ssd1306.c | 2 +- keyboards/comet46/ssd1306.c | 2 +- keyboards/crkbd/ssd1306.c | 2 +- keyboards/lily58/ssd1306.c | 2 +- keyboards/yosino58/ssd1306.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/claw44/ssd1306.c b/keyboards/claw44/ssd1306.c index 781c72263..e32fc091c 100644 --- a/keyboards/claw44/ssd1306.c +++ b/keyboards/claw44/ssd1306.c @@ -13,7 +13,7 @@ #include "sendchar.h" #include "timer.h" -static const unsigned char font[] PROGMEM; +extern const unsigned char font[] PROGMEM; // Set this to 1 to help diagnose early startup problems // when testing power-on with ble. Turn it off otherwise, diff --git a/keyboards/comet46/ssd1306.c b/keyboards/comet46/ssd1306.c index 4330c8497..20c2738db 100644 --- a/keyboards/comet46/ssd1306.c +++ b/keyboards/comet46/ssd1306.c @@ -13,7 +13,7 @@ #include "sendchar.h" #include "timer.h" -static const unsigned char font[] PROGMEM; +extern const unsigned char font[] PROGMEM; // Set this to 1 to help diagnose early startup problems // when testing power-on with ble. Turn it off otherwise, diff --git a/keyboards/crkbd/ssd1306.c b/keyboards/crkbd/ssd1306.c index 4330c8497..20c2738db 100644 --- a/keyboards/crkbd/ssd1306.c +++ b/keyboards/crkbd/ssd1306.c @@ -13,7 +13,7 @@ #include "sendchar.h" #include "timer.h" -static const unsigned char font[] PROGMEM; +extern const unsigned char font[] PROGMEM; // Set this to 1 to help diagnose early startup problems // when testing power-on with ble. Turn it off otherwise, diff --git a/keyboards/lily58/ssd1306.c b/keyboards/lily58/ssd1306.c index 4330c8497..20c2738db 100755 --- a/keyboards/lily58/ssd1306.c +++ b/keyboards/lily58/ssd1306.c @@ -13,7 +13,7 @@ #include "sendchar.h" #include "timer.h" -static const unsigned char font[] PROGMEM; +extern const unsigned char font[] PROGMEM; // Set this to 1 to help diagnose early startup problems // when testing power-on with ble. Turn it off otherwise, diff --git a/keyboards/yosino58/ssd1306.c b/keyboards/yosino58/ssd1306.c index 70b7301b3..3353f615f 100644 --- a/keyboards/yosino58/ssd1306.c +++ b/keyboards/yosino58/ssd1306.c @@ -13,7 +13,7 @@ #include "sendchar.h" #include "timer.h" -static const unsigned char font[] PROGMEM; +extern const unsigned char font[] PROGMEM; // Set this to 1 to help diagnose early startup problems // when testing power-on with ble. Turn it off otherwise, From 49464be64559710318f4d8edc5a92a7a90784734 Mon Sep 17 00:00:00 2001 From: marksard <38324387+marksard@users.noreply.github.com> Date: Sat, 18 May 2019 04:40:02 +0900 Subject: [PATCH 044/341] [Keymap] Add keymap for minivan (#5887) * Keyboard: add treeadstone48 * rename layout defines * Use of pragma once * move common include code * fixed info.json * change keymap layout from kc to normal * fix alpha revision keymap * fixed info.json * remove USE_Link_Time_Optimization * Added like_jis keymap for minivan/KUMO keyboard. * Fixed comments * Fixed review --- .../minivan/keymaps/like_jis/config.h | 43 +++++ .../minivan/keymaps/like_jis/keymap.c | 173 ++++++++++++++++++ .../minivan/keymaps/like_jis/readme.md | 63 +++++++ .../minivan/keymaps/like_jis/rules.mk | 25 +++ 4 files changed, 304 insertions(+) create mode 100644 keyboards/thevankeyboards/minivan/keymaps/like_jis/config.h create mode 100644 keyboards/thevankeyboards/minivan/keymaps/like_jis/keymap.c create mode 100644 keyboards/thevankeyboards/minivan/keymaps/like_jis/readme.md create mode 100644 keyboards/thevankeyboards/minivan/keymaps/like_jis/rules.mk diff --git a/keyboards/thevankeyboards/minivan/keymaps/like_jis/config.h b/keyboards/thevankeyboards/minivan/keymaps/like_jis/config.h new file mode 100644 index 000000000..4c4e6d37b --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/like_jis/config.h @@ -0,0 +1,43 @@ +#pragma once + +// place overrides here +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_TERM_PER_KEY + +#ifdef MOUSEKEY_ENABLE + #undef MOUSEKEY_INTERVAL + #define MOUSEKEY_INTERVAL 1 + + #undef MOUSEKEY_TIME_TO_MAX + #define MOUSEKEY_TIME_TO_MAX 150 + + #undef MOUSEKEY_MAX_SPEED + #define MOUSEKEY_MAX_SPEED 3 + + #undef MOUSEKEY_MOVE_DELTA + #define MOUSEKEY_MOVE_DELTA 4 + + #undef MOUSEKEY_DELAY + #define MOUSEKEY_DELAY 0 +#endif + +// Selection of RGBLIGHT MODE to use. +#if defined(LED_ANIMATIONS) + //#define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + //#define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT + //#define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + //#define RGBLIGHT_EFFECT_RGB_TEST + //#define RGBLIGHT_EFFECT_ALTERNATING +#endif + +// LED Setting: if you have KUMO you can use RGBLIGHT_ENABLE = yes +#ifdef RGBLIGHT_ENABLE + #define RGB_DI_PIN D0 + #define RGBLIGHT_TIMER + #define RGBLED_NUM 3 +#endif diff --git a/keyboards/thevankeyboards/minivan/keymaps/like_jis/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/like_jis/keymap.c new file mode 100644 index 000000000..3d282e182 --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/like_jis/keymap.c @@ -0,0 +1,173 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// 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. +enum layer_number { + _BASE = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + LOWER = SAFE_RANGE, + RAISE, + ADJUST, + KANJI, + RGBRST +}; + +enum tapdances{ + TD_SCCL = 0, +}; + +// Layer Mode aliases +#define KC_TBSF LSFT_T(KC_TAB) +#define KC_ROSF RSFT_T(KC_RO) +#define KC_ALAP LALT_T(KC_APP) + +// Layer tap +#define KC_BSLO LT(_LOWER, KC_BSPC) +#define KC_SPRA LT(_RAISE, KC_SPC) +#define KC_MLAD MO(_ADJUST) + +#define KC_SCCL TD(TD_SCCL) + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_SCCL] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_QUOT), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------. + // Esc Q W E R T Y U I O P - + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + //Tab/Shift A S D F G H J K L ;/: Enter + KC_TBSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCCL, KC_ENT, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // Shift Z X C V B N M , . / yen + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ROSF, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // Ctrl Alt GUI/Comm BackSpace/Lower Space/Raise Alt Menu Ctrl + KC_LCTL, KC_LALT, KC_LGUI, KC_BSLO, KC_SPRA, KC_RALT, KC_ALAP, KC_RCTL + //`-----------------------------------------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------. + // F1 F2 F3 F4 F5 - ^ \ @ [ Delete + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, KC_DEL, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // F6 F7 F8 F9 F10 ; : ] + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, KC_BSLS, _______, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // F11 F12 Kana/Kanji Enter Delete + _______, KC_F11, KC_F12, XXXXXXX, KANJI, KC_ENT, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // Adjust + _______, _______, _______, _______, KC_MLAD, _______, _______, _______ + //`-----------------------------------------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------. + // 1 2 3 4 5 6 7 8 9 0 - + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // Left Down Up Right + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, _______, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // , . / yen + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_COMM, KC_DOT, KC_SLSH, KC_ROSF, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______ + //`-----------------------------------------------------------------------------------------------------------' + ), + + [_ADJUST] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------. + // Reset LEDReset MacMode WinMode Home PageDown PageUp End + _______, RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // LED On/Off Hue/Saturation/Value Increment Mouse Left Down Up Right + _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, _______, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // LED Mode Hue/Saturation/Value Decrement Mouse Button Left Right + _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______ + //`-----------------------------------------------------------------------------------------------------------' + ) +}; + +#define TAPPING_LAYER_TERM 150 // Custom LT Tapping term +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case KC_BSLO: + return TAPPING_LAYER_TERM; + case KC_SPRA: + return TAPPING_LAYER_TERM; + default: + return TAPPING_TERM; + } +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case KANJI: + if (record->event.pressed) { + if (keymap_config.swap_lalt_lgui == false) { + register_code(KC_LANG2); + } else { + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG2); + } + break; + #ifdef RGBLIGHT_ENABLE + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif +} diff --git a/keyboards/thevankeyboards/minivan/keymaps/like_jis/readme.md b/keyboards/thevankeyboards/minivan/keymaps/like_jis/readme.md new file mode 100644 index 000000000..d7c1a091e --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/like_jis/readme.md @@ -0,0 +1,63 @@ +# The LikeJIS is Japanese Keyboard like keymap + +This keymap use for KUMO. Therefore it can use full color LED indicators used by D0 pin. But this keymap as use as Illumination :) + +## Keymap Description + +- Tab/Shift ...... Tab key is one tap, Shift key is long push. +- ;/: ...... ; key is one tap, : key is double tap. +- BackSpace/Lower ...... Backspace key is one tap, Move to Lower layer with long push. +- Space/Raise ...... Space key is one tap, Move to Raise layer with . +- Kanji ...... Japanese IME toggle key. + +## How to move to Ajdust Layer + +At first, Move to Lower layer with long push. After that Adjust key with long push. Now you have into Adjust layer state. + +```c +Base Layer + //,-----------------------------------------------------------------------------------------------------------. + // Esc Q W E R T Y U I O P - + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + //Tab/Shift A S D F G H J K L ;/: Enter + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // Shift Z X C V B N M , . / \ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // Ctrl Alt GUI BackSpace/Lower Space/Raise Alt Menu Ctrl + //`-----------------------------------------------------------------------------------------------------------' + +Lower Layer + //,-----------------------------------------------------------------------------------------------------------. + // F1 F2 F3 F4 F5 - ^ \ @ [ Delete + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // F6 F7 F8 F9 F10 ; : ] + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // F11 F12 Kanji Enter Delete + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // Adjust + //`-----------------------------------------------------------------------------------------------------------' + +Raise Layer + //,-----------------------------------------------------------------------------------------------------------. + // 1 2 3 4 5 6 7 8 9 0 - + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // Left Down Up Right + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // , . / \ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // + //`-----------------------------------------------------------------------------------------------------------' + +Adjust Layer + //,-----------------------------------------------------------------------------------------------------------. + // Reset LEDReset MacMode WinMode Home PageDown PageUp End + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // LED On/Off Hue Saturation Value Increment MouseLeft Down Up Right + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // LED Mode Hue Saturation Value Decrement Button L R + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // + //`-----------------------------------------------------------------------------------------------------------' + }; + +``` diff --git a/keyboards/thevankeyboards/minivan/keymaps/like_jis/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/like_jis/rules.mk new file mode 100644 index 000000000..07f71d6db --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/like_jis/rules.mk @@ -0,0 +1,25 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +TAP_DANCE_ENABLE = yes + +LED_ANIMATIONS = yes # LED animations + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + # OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS +endif From 8be32e98d8bd112c24b292d9c25a94f6e2ed71ac Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Fri, 17 May 2019 12:54:10 -0700 Subject: [PATCH 045/341] [Keyboard] New Keyboard: Mars 8.0 TKL (#5894) * fix the things the stupid script broke * create an appropriate LAYOUT macro using LAYOUT_tkl_ansi * create an appropriate keymap stolen from the phantom default keymap * add correct pins used and rgb led numbers * change vendor and device name * add QMK Configurator support * fix up RGB underglow * update readme * introduce new layout macro tkl_iso * add QMK Configurator support for new layout macro * enable backlight and add community layout support --- keyboards/ft/mars80/config.h | 50 +++ keyboards/ft/mars80/info.json | 16 + keyboards/ft/mars80/keymaps/default/config.h | 19 + keyboards/ft/mars80/keymaps/default/keymap.c | 75 ++++ keyboards/ft/mars80/keymaps/default/readme.md | 1 + keyboards/ft/mars80/mars80.c | 91 ++++ keyboards/ft/mars80/mars80.h | 63 +++ keyboards/ft/mars80/readme.md | 44 ++ keyboards/ft/mars80/rules.mk | 50 +++ keyboards/ft/mars80/usbconfig.h | 393 ++++++++++++++++++ 10 files changed, 802 insertions(+) create mode 100644 keyboards/ft/mars80/config.h create mode 100644 keyboards/ft/mars80/info.json create mode 100644 keyboards/ft/mars80/keymaps/default/config.h create mode 100644 keyboards/ft/mars80/keymaps/default/keymap.c create mode 100644 keyboards/ft/mars80/keymaps/default/readme.md create mode 100644 keyboards/ft/mars80/mars80.c create mode 100644 keyboards/ft/mars80/mars80.h create mode 100644 keyboards/ft/mars80/readme.md create mode 100644 keyboards/ft/mars80/rules.mk create mode 100644 keyboards/ft/mars80/usbconfig.h diff --git a/keyboards/ft/mars80/config.h b/keyboards/ft/mars80/config.h new file mode 100644 index 000000000..e03d1b399 --- /dev/null +++ b/keyboards/ft/mars80/config.h @@ -0,0 +1,50 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 . +*/ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0001 +#define MANUFACTURER FT +#define PRODUCT Mars 8.0 +#define DESCRIPTION A custom TKL Keyboard + +#define RGBLED_NUM 20 + +#define MATRIX_ROWS 7 +#define MATRIX_COLS 14 +// 0 1 2 3 4 5 6 7 8 9 A B C D +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2 } +#define UNUSED_PINS {} + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCING_DELAY 5 + +#define NO_BACKLIGHT_CLOCK +#define BACKLIGHT_LEVELS 1 +#define RGBLIGHT_ANIMATIONS + +#define NO_UART 1 + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + diff --git a/keyboards/ft/mars80/info.json b/keyboards/ft/mars80/info.json new file mode 100644 index 000000000..7d71cd040 --- /dev/null +++ b/keyboards/ft/mars80/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "Mars 8.0", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT_tkl_ansi": { + "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5, "w":2.25}, {"x":0, "y":4.5, "w":2.25}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5, "w":1.25}, {"x":11.25, "y":5.5, "w":1.25}, {"x":12.5, "y":5.5, "w":1.25}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] + }, + + "LAYOUT_tkl_iso": { + "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.75, "y":2.5, "w":1.25, "h":2}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5}, {"x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5, "w":1.25}, {"x":11.25, "y":5.5, "w":1.25}, {"x":12.5, "y":5.5, "w":1.25}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] + } + } +} diff --git a/keyboards/ft/mars80/keymaps/default/config.h b/keyboards/ft/mars80/keymaps/default/config.h new file mode 100644 index 000000000..26c6d6ade --- /dev/null +++ b/keyboards/ft/mars80/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/ft/mars80/keymaps/default/keymap.c b/keyboards/ft/mars80/keymaps/default/keymap.c new file mode 100644 index 000000000..ba7ef83d9 --- /dev/null +++ b/keyboards/ft/mars80/keymaps/default/keymap.c @@ -0,0 +1,75 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_tkl_ansi( + KC_ESC, 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_PSCR, KC_SLCK, KC_BRK, \ + KC_GRV, 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_INS, KC_HOME, 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_DEL, KC_END, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + 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_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [1] = LAYOUT_tkl_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MSEL, \ + _______, _______, _______, KC_CALC, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/ft/mars80/keymaps/default/readme.md b/keyboards/ft/mars80/keymaps/default/readme.md new file mode 100644 index 000000000..180935f5d --- /dev/null +++ b/keyboards/ft/mars80/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Mars 8.0 \ No newline at end of file diff --git a/keyboards/ft/mars80/mars80.c b/keyboards/ft/mars80/mars80.c new file mode 100644 index 000000000..754345082 --- /dev/null +++ b/keyboards/ft/mars80/mars80.c @@ -0,0 +1,91 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ + +#include "mars80.h" + +#include "rgblight.h" +#include "i2c_master.h" +#include "quantum.h" + +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; + +void rgblight_set(void) { + if (!rgblight_config.enable) { + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; + } + } + + i2c_init(); + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); +} +#endif + +void matrix_init_kb(void) { +#ifdef RGBLIGHT_ENABLE + if (rgblight_config.enable) { + i2c_init(); + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); + } +#endif + // call user level keymaps, if any + matrix_init_user(); +} + +void matrix_scan_kb(void) { +#ifdef RGBLIGHT_ENABLE + rgblight_task(); +#endif + matrix_scan_user(); + /* Nothing else for now. */ +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +void backlight_init_ports(void) { + // initialize pins D0, D1, D4 and D6 as output + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + // turn backlight LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); +} + +void backlight_set(uint8_t level) { + if (level == 0) { + // turn backlight LEDs off + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); + } else { + // turn backlight LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); + } +} \ No newline at end of file diff --git a/keyboards/ft/mars80/mars80.h b/keyboards/ft/mars80/mars80.h new file mode 100644 index 000000000..6308d06d0 --- /dev/null +++ b/keyboards/ft/mars80/mars80.h @@ -0,0 +1,63 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define LAYOUT_tkl_iso( \ + k11, k13, k14, k15, k16, k18, k19, k1A, k1B, k1C, k10, k1D, k12, k02, k03, k00, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k20, k2D, k07, k06, k05, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k30, k0D, k09, k08, \ + k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k3D, k40, \ + k51, k4D, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D, \ + k61, k62, k63, k65, k69, k6A, k6B, k6C, k60, k6D, k68 \ +) \ +{ \ + { k00, KC_NO, k02, k03, KC_NO, k05, k06, k07, k08, k09, KC_NO, KC_NO, KC_NO, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, KC_NO, k18, k19, k1A, k1B, k1C, k1D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D }, \ + { KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D }, \ + { k60, k61, k62, k63, KC_NO, k65, KC_NO, KC_NO, k68, k69, k6A, k6B, k6C, k6D }, \ +} + +#define LAYOUT_tkl_ansi( \ + k11, k13, k14, k15, k16, k18, k19, k1A, k1B, k1C, k10, k1D, k12, k02, k03, k00, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k20, k2D, k07, k06, k05, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k30, k3D, k0D, k09, k08, \ + k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k40, \ + k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D, \ + k61, k62, k63, k65, k69, k6A, k6B, k6C, k60, k6D, k68 \ +) \ +{ \ + { k00, KC_NO, k02, k03, KC_NO, k05, k06, k07, k08, k09, KC_NO, KC_NO, KC_NO, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, KC_NO, k18, k19, k1A, k1B, k1C, k1D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, KC_NO }, \ + { KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D }, \ + { k60, k61, k62, k63, KC_NO, k65, KC_NO, KC_NO, k68, k69, k6A, k6B, k6C, k6D }, \ +} diff --git a/keyboards/ft/mars80/readme.md b/keyboards/ft/mars80/readme.md new file mode 100644 index 000000000..962275133 --- /dev/null +++ b/keyboards/ft/mars80/readme.md @@ -0,0 +1,44 @@ +# Mars 8.0 + +TKL Keyboard with in switch backlight and RGB Underglow. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Mars 8.0 PCB +Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=93723.0) + +Make example for this keyboard (after setting up your build environment): + + make ft/mars80:default + +Flashing + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +**Reset Key:** Hold down the key located at `K00`, commonly programmed as `Pause/Break` while plugging in the keyboard. + +Windows: +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset. +3. Press the `Find Device` button and ensure that your keyboard is found. +4. Press the `Open .hex File` button and locate the `.hex` file you created. +5. Press the `Flash Device` button and wait for the process to complete. + +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python3 + pip3 install pyusb + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + ``` +4. Place your keyboard into reset. +5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. + +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). diff --git a/keyboards/ft/mars80/rules.mk b/keyboards/ft/mars80/rules.mk new file mode 100644 index 000000000..159307f8d --- /dev/null +++ b/keyboards/ft/mars80/rules.mk @@ -0,0 +1,50 @@ +# Copyright 2019 Luiz Ribeiro +# +# 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 . + +# MCU name +MCU = atmega32a +PROTOCOL = VUSB + +# unsupported features for now +NO_UART = yes +NO_SUSPEND_POWER_DOWN = yes + +# processor frequency +F_CPU = 12000000 + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes +RGBLIGHT_CUSTOM_DRIVER = yes + +OPT_DEFS = -DDEBUG_LEVEL=0 + +SRC += i2c_master.c + +# programming options +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex + +LAYOUTS = tkl_ansi tkl_iso diff --git a/keyboards/ft/mars80/usbconfig.h b/keyboards/ft/mars80/usbconfig.h new file mode 100644 index 000000000..338b67f58 --- /dev/null +++ b/keyboards/ft/mars80/usbconfig.h @@ -0,0 +1,393 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#pragma once + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_MAX_BUS_POWER 500 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'f', 't' +#define USB_CFG_VENDOR_NAME_LEN 2 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'm', 'a', 'r', 's', '8', '0' +#define USB_CFG_DEVICE_NAME_LEN 6 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect From b34d2c73fa30d80281d1eab4f354092d25f5a747 Mon Sep 17 00:00:00 2001 From: kingwangwong <31333140+kingwangwong@users.noreply.github.com> Date: Fri, 17 May 2019 14:57:10 -0500 Subject: [PATCH 046/341] [Keymap] Adding my keymap for the minivan/kumo (#5896) * adding my keymap for the KUMO * edited the readme file * edited some more files * edited some more files * edited files from feedback * edited one more files from feedback * edited rules --- .../minivan/keymaps/king/keymap.c | 114 ++++++++++++++++++ .../minivan/keymaps/king/readme.md | 4 + .../minivan/keymaps/king/rules.mk | 6 + 3 files changed, 124 insertions(+) create mode 100644 keyboards/thevankeyboards/minivan/keymaps/king/keymap.c create mode 100644 keyboards/thevankeyboards/minivan/keymaps/king/readme.md create mode 100644 keyboards/thevankeyboards/minivan/keymaps/king/rules.mk diff --git a/keyboards/thevankeyboards/minivan/keymaps/king/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/king/keymap.c new file mode 100644 index 000000000..6b1e1769e --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/king/keymap.c @@ -0,0 +1,114 @@ +#include QMK_KEYBOARD_H + + +enum layer_names { + _ML, + _FL, + _NL, + _SL, + _RL +}; + + +#define SPC_FUN LT(_FL, KC_SPC) +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* 0: Main Layer + + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────────┐ + * │ ESC │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ENTER │ + * ├─────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────────┤ + * │ TAB │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │' │ + * ├──────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬─────┤ + * │ LSHFT │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │MO(SL│ + * ├────────┬┴─────┴─┬───┴─┬───┴─────┴──┬──┴─────┴─────┴─┬───┴─┬───┴─┬───┴─────┤ + * │LCTRL │ LGUI │ LALT│SPACE(_NL) │MO(_NL) │BKSPC│ │MO(RL │ + * └────────┴────────┴─────┴────────────┴────────────────┴─────┴─────┴─────────┘ + */ + [_ML] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, + 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, MO(_SL), + KC_LCTL, KC_LGUI, KC_LALT, SPC_FUN, MO(_NL), KC_BSPC, XXXXXXX, MO(_RL) + ), + + + /* 1: Function Layer + + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────────┐ + * │ │ │HOME │ UP │END │PGUP │ │ F1 │ F2 │ F3 │ F4 │ │ + * ├─────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────────┤ + * │ CAPS │ │LEFT │DOWN │RIGHT│PGDN │ │ F5 │ F6 │ F7 │ F8 │ │ + * ├──────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬─────┤ + * │ │ │ │ DEL │ INS │ │ │ F9 │ F10 │ F11 │ F12 │ │ + * ├────────┬┴─────┴─┬───┴─┬───┴─────┴──┬──┴─────┴─────┴─┬───┴─┬───┴─┬───┴─────┤ + * │ │ │ │ │ │ │ │ │ + * └────────┴────────┴─────┴────────────┴────────────────┴─────┴─────┴─────────┘ + */ + [_FL] = LAYOUT( + _______, XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, _______, + KC_CAPS, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, _______, + _______, XXXXXXX, XXXXXXX, KC_DEL, KC_INS, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + + + /* 2: Number Layer + + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────────┐ + * │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ │ + * ├─────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────────┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 8 │ 0 │ │ + * ├──────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────────┬┴─────┴─┬───┴─┬───┴─────┴──┬──┴─────┴─────┴─┬───┴─┬───┴─┬───┴─────┤ + * │ │ │ │ │ │ │ │ │ + * └────────┴────────┴─────┴────────────┴────────────────┴─────┴─────┴─────────┘ + */ + [_NL] = LAYOUT( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* 3: Symbol Layer + + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────────┐ + * │ │ _ │ + │ { │ } │ | │ │ │ │ │ │ │ + * ├─────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────────┤ + * │ │ - │ = │ [ │ ] │ \ │ │ DEL │ INS │ │ │ │ + * ├──────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────────┬┴─────┴─┬───┴─┬───┴─────┴──┬──┴─────┴─────┴─┬───┴─┬───┴─┬───┴─────┤ + * │ │ │ │ │ │ │ │ │ + * └────────┴────────┴─────┴────────────┴────────────────┴─────┴─────┴─────────┘ + */ + [_SL] = LAYOUT( + _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, XXXXXXX, KC_DEL, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* 4: Reset Layer + + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────────┐ + * │RESET│ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────────┬┴─────┴─┬───┴─┬───┴─────┴──┬──┴─────┴─────┴─┬───┴─┬───┴─┬───┴─────┤ + * │ │ │ │ │ │ │ │ │ + * └────────┴────────┴─────┴────────────┴────────────────┴─────┴─────┴─────────┘ + */ + [_RL] = LAYOUT( + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ) +}; + diff --git a/keyboards/thevankeyboards/minivan/keymaps/king/readme.md b/keyboards/thevankeyboards/minivan/keymaps/king/readme.md new file mode 100644 index 000000000..edcf5f43e --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/king/readme.md @@ -0,0 +1,4 @@ +# King's KUMO layout + +Currently uses the fewest key layout (three keys on both sides of the bottom row) for the KUMO/minivan + diff --git a/keyboards/thevankeyboards/minivan/keymaps/king/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/king/rules.mk new file mode 100644 index 000000000..9865184ab --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/king/rules.mk @@ -0,0 +1,6 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +CONSOLE_ENABLE = no # Console for debug(+400) From 7a0174f871792c62fdd1b737f2dc9db753695245 Mon Sep 17 00:00:00 2001 From: Chris Broekema Date: Fri, 17 May 2019 21:58:28 +0200 Subject: [PATCH 047/341] [Keyboard] keypad enter should not be remapped in Model M default keymap (#5897) --- keyboards/converter/modelm101/keymaps/default/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/converter/modelm101/keymaps/default/keymap.c b/keyboards/converter/modelm101/keymaps/default/keymap.c index 4a8614a3f..644e9a5ef 100644 --- a/keyboards/converter/modelm101/keymaps/default/keymap.c +++ b/keyboards/converter/modelm101/keymaps/default/keymap.c @@ -21,7 +21,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, - KC_LSFT, KC_NUBS, 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_P1, KC_P2, KC_P3, KC_LGUI, + KC_LSFT, KC_NUBS, 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_P1, KC_P2, KC_P3, KC_PENT, KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT ), }; From d0c9ad6433d6ed30e8076fd26c8551f579cb08c8 Mon Sep 17 00:00:00 2001 From: Jeremy Bernhardt Date: Fri, 17 May 2019 14:02:22 -0600 Subject: [PATCH 048/341] [Keyboard] Georgi improvements (#5899) * Georgi improvements * The writing was in the -Wall --- keyboards/georgi/config.h | 2 +- keyboards/georgi/keymaps/colemak-dh/keymap.c | 306 ++++++++++++++++++ keyboards/georgi/keymaps/colemak-dh/readme.md | 11 + keyboards/georgi/keymaps/colemak-dh/rules.mk | 45 +++ keyboards/georgi/keymaps/default/keymap.c | 12 +- keyboards/georgi/keymaps/default/rules.mk | 1 + keyboards/georgi/sten.c | 12 + keyboards/georgi/sten.h | 8 + 8 files changed, 395 insertions(+), 2 deletions(-) create mode 100644 keyboards/georgi/keymaps/colemak-dh/keymap.c create mode 100644 keyboards/georgi/keymaps/colemak-dh/readme.md create mode 100644 keyboards/georgi/keymaps/colemak-dh/rules.mk diff --git a/keyboards/georgi/config.h b/keyboards/georgi/config.h index 30f07667e..b35a1be78 100644 --- a/keyboards/georgi/config.h +++ b/keyboards/georgi/config.h @@ -23,7 +23,7 @@ along with this program. If not, see . /* Defaults */ -#define VERSION "v1.0: Stenoknight" +#define VERSION "v1.1: ClayM" #define VERBOSE #define FORCE_NKRO diff --git a/keyboards/georgi/keymaps/colemak-dh/keymap.c b/keyboards/georgi/keymaps/colemak-dh/keymap.c new file mode 100644 index 000000000..29b35f6ab --- /dev/null +++ b/keyboards/georgi/keymaps/colemak-dh/keymap.c @@ -0,0 +1,306 @@ +/* + * Good on you for modifying your layout, this is the most nonQMK layout you will come across + * There are three modes, Steno (the default), QWERTY (Toggleable) and a Momentary symbol layer + * + * Don't modify the steno layer directly, instead add chords using the keycodes and macros + * from sten.h to the layout you want to modify. + * + * Observe the comment above processQWERTY! + * + * http://docs.gboards.ca + */ + +#include QMK_KEYBOARD_H +#include "sten.h" +#include "keymap_steno.h" +#define IGNORE_MOD_TAP_INTERRUPT + +// Steno Layers +#define FUNCT ( LSD | LK | LP | LH ) +#define MEDIA ( LSD | LK | LW | LR ) +#define MOVE ( LSD | LK ) +#define NUM ( PWR ) +#define SYM ( RZ ) + +// Keys and chords that, once they appear, are added to every subsequent partial chord +// until the whole thing is sent. +uint32_t stenoLayers[] = {NUM, SYM, MOVE, MEDIA, FUNCT}; + +// QMK Layers +#define STENO_LAYER 0 +#define GAMING 1 +#define GAMING_2 2 + +/* Keyboard Layout + * ,---------------------------------. ,------------------------------. + * | FN | LSU | LFT | LP | LH | ST1 | | ST3 | RF | RP | RL | RT | RD | + * |-----+-----+-----+----+----|-----| |-----|----+----+----+----+----| + * | PWR | LSD | LK | LW | LR | ST2 | | ST4 | RR | RB | RG | RS | RZ | + * `---------------------------------' `------------------------------' + * ,---------------, .---------------. + * | LNO | LA | LO | | RE | RU | RNO | + * `---------------' `---------------' + */ + +// Note: You can only use basic keycodes here! +// +// P() is just a wrapper to make your life easier. +// PC() applies the mapping to all of the StenoLayers. For overloading, define these last. +// +// FN is unavailable. That is reserved for system use. +// Chords containing PWR are always available, even in steno mode. +// +// http://docs.gboards.ca +uint32_t processQwerty(bool lookup) { + // Special keys + P( RT | RS | RD | RZ | LNO, SEND_STRING(VERSION); SEND_STRING(__DATE__)); + P( LFT | LK | LP | LW, REPEAT()); + + // Mouse Keys + /* P( LO | LSD | LK, CLICK_MOUSE(KC_MS_BTN2)); */ + /* P( LO | LR | LW, CLICK_MOUSE(KC_MS_BTN1)); */ + + +/* Function layer + * ,-----------------------------------, ,-----------------------------------, + * | | | | NCTFUNCTF | | | | F1 | F2 | F3 | F4 | | + * | + + + + + | | + F5 + F6 + F7 + F8 + | + * | | FUNCTFUNC | | | | | | F9 | F10 | F11 | F12 | | + * `-----+-----+-----+-----+-----+-----' `-----+-----+-----+-----+-----+-----' +*/ + P( FUNCT | RF, SEND(KC_F1)); + P( FUNCT | RP, SEND(KC_F2)); + P( FUNCT | RL, SEND(KC_F3)); + P( FUNCT | RT, SEND(KC_F4)); + + P( FUNCT | RF | RR, SEND(KC_F5)); + P( FUNCT | RP | RB, SEND(KC_F6)); + P( FUNCT | RL | RG, SEND(KC_F7)); + P( FUNCT | RT | RS, SEND(KC_F8)); + + P( FUNCT | RR, SEND(KC_F9)); + P( FUNCT | RG, SEND(KC_F10)); + P( FUNCT | RB, SEND(KC_F11)); + P( FUNCT | RS, SEND(KC_F12)); + + +/* Movement layer + * ,-----------------------------------, ,-----------------------------------, + * | | | | | | | | | <- | ↓ | ↑ | -> | | + * | + + + + + | | + + + + + | + * | | MOVEMOVEM | | | | | | Hm | PgD | PgU | End | | + * `-----+-----+-----+-----+-----+-----' `-----+-----+-----+-----+-----+-----' +*/ + P( MOVE | RF, SEND(KC_LEFT)); + P( MOVE | RP, SEND(KC_DOWN)); + P( MOVE | RL, SEND(KC_UP)); + P( MOVE | RT, SEND(KC_RIGHT)); + + P( MOVE | RR, SEND(KC_HOME)); + P( MOVE | RB, SEND(KC_PGDN)); + P( MOVE | RG, SEND(KC_PGUP)); + P( MOVE | RS, SEND(KC_END)); + + +/* Media Layer + * ,-----------------------------------, ,-----------------------------------, + * | | | | | | | | |Prev |Play | PLY |Next | VolU| + * | + + + + + | | + + + + + | + * | | MEDIAMEDIAMEDIAMEDIAM | | | | | | |Mute | VolD| + * `-----+-----+-----+-----+-----+-----' `-----+-----+-----+-----+-----+-----' +*/ + P( MEDIA | RF, SEND(KC_MPRV)); + P( MEDIA | RP, SEND(KC_MPLY)); + P( MEDIA | RL, SEND(KC_MPLY)); + P( MEDIA | RT, SEND(KC_MNXT)); + P( MEDIA | RD, SEND(KC_VOLU)); + + P( MEDIA | RS, SEND(KC_MUTE)); + P( MEDIA | RZ, SEND(KC_VOLD)); + + +/* Numbers + * ,-----------------------------------, ,-----------------------------------, + * | | | a | b | c | | | : | 1 | 2 | 3 | . | | + * | + + d + e + f + | | 0 + 4 + 5 + 6 + - + | + * | NUM | | | | | | | | 7 | 8 | 9 | 0 | | + * `-----+-----+-----+-----+-----+-----' `-----+-----+-----+-----+-----+-----' +*/ + P( NUM | LFT, SEND(KC_A)); + P( NUM | LP, SEND(KC_B)); + P( NUM | LH, SEND(KC_C)); + P( NUM | LK, SEND(KC_D)); + P( NUM | LW, SEND(KC_E)); + P( NUM | LR, SEND(KC_F)); + + // Right hand + P( NUM | ST3, SEND_STRING(":")); + P( NUM | RF, SEND(KC_1)); + P( NUM | RP, SEND(KC_2)); + P( NUM | RL, SEND(KC_3)); + P( NUM | RT, SEND(KC_DOT)); + + P( NUM | ST3 | ST4, SEND(KC_0)); + P( NUM | RF | RR, SEND(KC_4)); + P( NUM | RP | RB, SEND(KC_5)); + P( NUM | RG | RL, SEND(KC_6)); + P( NUM | RT | RS, SEND(KC_MINUS)); + + P( NUM | RR, SEND(KC_7)); + P( NUM | RB, SEND(KC_8)); + P( NUM | RG, SEND(KC_9)); + P( NUM | RS, SEND(KC_0)); + + +/* Symbols + * ,-----------------------------------, ,-----------------------------------, + * | | ` | [ | { | ( | < | | > | ) | } | ] | ? | | + * | + ~ + - + ' + : + _ | | \ + = + " + + + ? + | + * | | ! | @ | # | $ | % | | | | ^ | & | * | ? | SYM | + * `-----+-----+-----+-----+-----+-----' `-----+-----+-----+-----+-----+-----' +*/ + // Left hand + P( SYM | LSU, SEND(KC_GRV)); + P( SYM | LFT, SEND(KC_LBRC)); + P( SYM | LP, SEND_STRING("{")); + P( SYM | LH, SEND_STRING("(")); + P( SYM | ST1, SEND_STRING("<")); + + P( SYM | LSU | LSD, SEND_STRING("~")); + P( SYM | LFT | LK, SEND(KC_MINS)); + P( SYM | LP | LW, SEND(KC_QUOTE)); + P( SYM | LH | LR, SEND_STRING(":")); + P( SYM | ST1 | ST2, SEND_STRING("_")); + + P( SYM | LSD, SEND_STRING("!")); + P( SYM | LK, SEND_STRING("@")); + P( SYM | LW, SEND_STRING("#")); + P( SYM | LR, SEND_STRING("$")); + P( SYM | ST2, SEND_STRING("%")); + + // Right hand + P( SYM | ST3, SEND_STRING(">")); + P( SYM | RF, SEND_STRING(")")); + P( SYM | RP, SEND_STRING("}")); + P( SYM | RL, SEND_STRING("]")); + P( SYM | RT, SEND_STRING("?")); + + P( SYM | ST3 | ST4, SEND(KC_BSLASH)); + P( SYM | RF | RR, SEND(KC_EQUAL)); + P( SYM | RP | RB, SEND_STRING("\"")); + P( SYM | RG | RL, SEND_STRING("+")); + P( SYM | RT | RS, SEND_STRING("?")); + + P( SYM | ST4, SEND_STRING("|")); + P( SYM | RR, SEND_STRING("^")); + P( SYM | RB, SEND_STRING("&")); + P( SYM | RG, SEND_STRING("*")); + P( SYM | RS, SEND_STRING("?")); + + +/* Letters + * ,-----------------------------------, ,-----------------------------------, + * | | Q | W | F | P | B | | J | L | U | Y | ; | ctl | + * +-----+- A -+- R -+- S -+- T -+- G -| |- M -+- N -+- E -+- I -+- O -+-----| + * | bsp | Z | X | C | D | V | | K | H | , | . | / | del | + * `-----+-----+-----+-----+-----+-----' `-----+-----+-----+-----+-----+-----' + * ,---------------, .---------------. + * | alt | ent|shfr| | spc| gui| alt | + * `---------------' `---------------' +*/ + // Left hand + P( LSU, SEND(KC_Q)); + P( LFT, SEND(KC_W)); + P( LP, SEND(KC_F)); + P( LH, SEND(KC_P)); + P( ST1, SEND(KC_B)); + + P( LSU | LSD, SEND(KC_A)); + P( LFT | LK, SEND(KC_R)); + P( LP | LW, SEND(KC_S)); + P( LH | LR, SEND(KC_T)); + P( ST1 | ST2, SEND(KC_G)); + + P( LSD, SEND(KC_Z)); + P( LK, SEND(KC_X)); + P( LW, SEND(KC_C)); + P( LR, SEND(KC_D)); + P( ST2, SEND(KC_V)); + + // Right hand + P( ST3, SEND(KC_J)); + P( RF, SEND(KC_L)); + P( RP, SEND(KC_U)); + P( RL, SEND(KC_Y)); + P( RT, SEND(KC_SCLN)); + + P( ST3 | ST4, SEND(KC_M)); + P( RF | RR, SEND(KC_N)); + P( RP | RB, SEND(KC_E)); + P( RG | RL, SEND(KC_I)); + P( RT | RS, SEND(KC_O)); + + P( ST4, SEND(KC_K)); + P( RR, SEND(KC_H)); + P( RB, SEND(KC_COMM)); + P( RG, SEND(KC_DOT)); + P( RS, SEND(KC_SLSH)); + + // Thumb Chords and modifiers + // + PC( LNO | RNO | LA | RU, SEND(KC_LCTL); SEND(KC_LSFT)); + PC( LNO | LA | RE, SEND(KC_LCTL); SEND(KC_LSFT); SEND(KC_LALT)); + + // overrides + P( PWR | LO, SEND(KC_LSFT); SEND(KC_BSPC)); + P( PWR | RD, SEND(KC_LCTL); SEND(KC_BSPC)); + P( RZ | RD, SEND(KC_LCTL); SEND(KC_DEL)); + + PC( LNO | LA | LO, SEND(KC_LSFT); SEND(KC_ESC)); + PC( LA | LO, SEND(KC_ESC)); + PC( LNO, SEND(KC_LALT)); + PC( LA, SEND(KC_ENT)); + PC( LO, SEND(KC_LSFT)); + + PC( RNO, SEND(KC_RALT)); + PC( RE | RU, SEND(KC_TAB)); + PC( RE, SEND(KC_SPC)); + PC( RU, SEND(KC_LGUI)); + + PC( PWR, SEND(KC_BSPC)); + PC( RD, SEND(KC_LCTL)); + P( RZ, SEND(KC_DEL)); + + return 0; +} + +// "Layers" +// Steno layer should be first in your map. +// When PWR | FN | ST3 | ST4 is pressed, the layer is increased to the next map. You must return to STENO_LAYER at the end. +// If you need more space for chords, remove the two gaming layers. +// Note: If using NO_ACTION_TAPPING, LT will not work! + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Main layer, everything goes through here + [STENO_LAYER] = LAYOUT_georgi( + STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, + STN_PWR, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, + STN_N1, STN_A, STN_O, STN_E, STN_U, STN_N7 + ), + // Gaming layer with Numpad, Very limited + [GAMING] = LAYOUT_georgi( + KC_LSFT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_DQUO, + KC_LALT, KC_SPC, LT(GAMING_2, KC_ENT), KC_DEL, KC_ASTR, TO(STENO_LAYER) + ), + + [GAMING_2] = LAYOUT_georgi( + KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_LT, KC_GT, KC_QUES, KC_RSFT, + KC_LALT, KC_SPC, KC_ENT, KC_DEL, KC_ASTR, TO(STENO_LAYER) + ) +}; + +// Don't fuck with this, thanks. +size_t keymapsCount = sizeof(keymaps)/sizeof(keymaps[0]); +size_t stenoLayerCount = sizeof(stenoLayers)/sizeof(stenoLayers[0]); diff --git a/keyboards/georgi/keymaps/colemak-dh/readme.md b/keyboards/georgi/keymaps/colemak-dh/readme.md new file mode 100644 index 000000000..f9da34b02 --- /dev/null +++ b/keyboards/georgi/keymaps/colemak-dh/readme.md @@ -0,0 +1,11 @@ +# Georgi QWERTY/Steno firmware + +This is the default keymap for Georgi, it's based heavily off of the naps62 ErgoDox and the Gergo layout. +It is both a ergonomic and programmer friendly keymap. + +Ideally you should copy this directory and make your changes there. If you come up with a good layout submit a PR! + +## Space issues +If you find yourself running out of space for dictionary entries, disabling mousekeys in rules.mk will save +you about 4k for entries! +Get a free 1k by deleting the Gaming layers from the keymap! diff --git a/keyboards/georgi/keymaps/colemak-dh/rules.mk b/keyboards/georgi/keymaps/colemak-dh/rules.mk new file mode 100644 index 000000000..07394aef4 --- /dev/null +++ b/keyboards/georgi/keymaps/colemak-dh/rules.mk @@ -0,0 +1,45 @@ +#---------------------------------------------------------------------------- +# make georgi:claymager:dfu +# Make sure you have dfu-programmer installed! +#---------------------------------------------------------------------------- + +NO_REPEAT = yes +VERBOSE = yes +KEYBOARD_SHARED_EP = yes +CUSTOM_MATRIX = yes +STENO_LAYERS = yes + +#Firmware reduction options +MOUSEKEY_ENABLE = yes # 1500 bytes +NO_TAPPING = no # 2000 bytes +NO_PRINT = yes + +#Debug options +CONSOLE_ENABLE = no +DEBUG_MATRIX_SCAN_RATE = no +DEBUG_MATRIX = no +ONLY_QWERTY = no + +# A bunch of stuff that you shouldn't touch unless you +# know what you're doing. +# +# No touchy, capiche? +SRC += matrix.c i2c_master.c +ifeq ($(strip $(DEBUG_MATRIX)), yes) + OPT_DEFS += -DDEBUG_MATRIX +endif +ifeq ($(strip $(NO_REPEAT)), yes) + OPT_DEFS += -DNO_REPEAT +endif +ifeq ($(strip $(NO_PRINT)), yes) + OPT_DEFS += -DNO_PRINT -DNO_DEBUG +endif +ifeq ($(strip $(ONLY_QWERTY)), yes) + OPT_DEFS += -DONLYQWERTY +endif +ifeq ($(strip $(NO_TAPPING)), yes) + OPT_DEFS += -DNO_ACTION_TAPPING +endif +ifeq ($(strip $(STENO_LAYERS)), yes) + OPT_DEFS += -DSTENOLAYERS +endif diff --git a/keyboards/georgi/keymaps/default/keymap.c b/keyboards/georgi/keymaps/default/keymap.c index 3a0edb892..404aac8fc 100644 --- a/keyboards/georgi/keymaps/default/keymap.c +++ b/keyboards/georgi/keymaps/default/keymap.c @@ -38,6 +38,12 @@ // Note: You can only use basic keycodes here! // P() is just a wrapper to make your life easier. +// PC() applies the mapping to all of the StenoLayers. +// To overload, declare it with P() first. +// Be sure to enable in rules.mk and see colemak-dh for usage +// +// FN is unavailable. That is reserved for system use. +// Chords containing PWR are always available, even in steno mode. // // http://docs.gboards.ca uint32_t processQwerty(bool lookup) { @@ -135,7 +141,7 @@ uint32_t processQwerty(bool lookup) { P( RZ, SEND(KC_ESC)); // Symbols and Numbers - P( PWR | RE | RU, SEND(KC_ENT)); + P( PWR | RE | RU, SEND(KC_ENT)); P( PWR | LA | LO, SEND(KC_SPC)); P( PWR | LP | LW, SEND(KC_LSFT); SEND(KC_9)); // ( P( PWR | LH | LR, SEND(KC_LSFT); SEND(KC_0)); // ) @@ -169,6 +175,10 @@ uint32_t processQwerty(bool lookup) { P( PWR | RE, SEND(KC_SCLN)); P( PWR | RU, SEND(KC_BSLS)); P( PWR | LNO, SEND(KC_BSLS)); + P( PWR | RF | RR, SEND(KC_LEFT)); + P( PWR | RP | RB, SEND(KC_DOWN)); + P( PWR | RL | RG, SEND(KC_UP)); + P( PWR | RT | RS, SEND(KC_RIGHT)); // Letters P( LSU | LSD, SEND(KC_A)); diff --git a/keyboards/georgi/keymaps/default/rules.mk b/keyboards/georgi/keymaps/default/rules.mk index 90d8057c3..7bd3d7aa2 100644 --- a/keyboards/georgi/keymaps/default/rules.mk +++ b/keyboards/georgi/keymaps/default/rules.mk @@ -7,6 +7,7 @@ NO_REPEAT = no VERBOSE = yes KEYBOARD_SHARED_EP = yes CUSTOM_MATRIX = yes +STENO_LAYERS = no #Firmware reduction options MOUSEKEY_ENABLE = yes # 1500 bytes diff --git a/keyboards/georgi/sten.c b/keyboards/georgi/sten.c index 1a84c7893..197abaf92 100644 --- a/keyboards/georgi/sten.c +++ b/keyboards/georgi/sten.c @@ -11,6 +11,18 @@ uint32_t pChord = 0; // Previous Chord int pChordIndex = 0; // Keys in previousachord uint32_t pChordState[32]; // Previous chord sate uint32_t stickyBits = 0; // Or'd with every incoming press +#ifndef NO_DEBUG +char debugMsg[32]; +#endif + +// StenoLayer +uint32_t releasedChord = 0; // Keys released from current chord +uint32_t tChord = 0; // Protects state of cChord + +#ifndef STENOLAYERS +uint32_t stenoLayers[] = { PWR }; +size_t stenoLayerCount = sizeof(stenoLayers)/sizeof(stenoLayers[0]); +#endif // Mode state enum MODE { STENO = 0, QWERTY, COMMAND }; diff --git a/keyboards/georgi/sten.h b/keyboards/georgi/sten.h index 5a9771d9a..e94f10fc2 100644 --- a/keyboards/georgi/sten.h +++ b/keyboards/georgi/sten.h @@ -13,6 +13,9 @@ extern size_t keymapsCount; // Total keymaps extern uint32_t cChord; // Current Chord +extern uint32_t stenoLayers[]; // Chords that simulate QMK layers +extern size_t stenoLayerCount; // Number of simulated layers +uint32_t refChord; // Reference chord for PC macro // Function defs void processChord(bool useFakeSteno); @@ -30,6 +33,11 @@ void CLICK_MOUSE(uint8_t); // Keymap helper #define P(chord, act) if (cChord == (chord)) { if (!lookup) {act;} return chord;} +#define PC(chord, act) if (cChord == (chord)) { if (!lookup) {act;} return chord;} \ + for(int i = 0; i < stenoLayerCount; i++) { \ + refChord = stenoLayers[i] | chord; \ + if (cChord == (refChord)) { if (!lookup) {act;} return refChord;}; \ +} // Shift to internal representation // i.e) S(teno)R(ight)F From 90a45aac6e8fdbf8d781d711bb6a27574130ff38 Mon Sep 17 00:00:00 2001 From: Jeremy Bernhardt Date: Fri, 17 May 2019 14:07:38 -0600 Subject: [PATCH 049/341] [Keyboard] Butterstick fix (#5900) * Working on chording * Working on chording * Got layouts in order * Initial Georgi support * forgot to add keymaps * Updated readme * Update keyboards/georgi/keymaps/template/readme.md Co-Authored-By: germ * Update keyboards/georgi/georgi.h Co-Authored-By: germ * Update keyboards/georgi/keymaps/default/keymap.c Co-Authored-By: germ * Update keyboards/georgi/keymaps/default/keymap.c Co-Authored-By: germ * Update keyboards/georgi/rules.mk Co-Authored-By: germ * Update keyboards/georgi/rules.mk Co-Authored-By: germ * Update keyboards/georgi/matrix.c Co-Authored-By: germ * Update keyboards/georgi/georgi.c Co-Authored-By: germ * Update keyboards/georgi/georgi.c Co-Authored-By: germ * Update keyboards/georgi/rules.mk Co-Authored-By: germ * Update keyboards/georgi/keymaps/default/keymap.c Co-Authored-By: germ * Update keyboards/georgi/keymaps/template/keymap.c Co-Authored-By: germ * Update keyboards/georgi/matrix.c Co-Authored-By: germ * Disabled features, updated info * Update keyboards/georgi/config.h Co-Authored-By: germ * Update keyboards/georgi/config.h Co-Authored-By: germ * Fixed info.json * Split the number button and fixed gaming mode. * started work on history feature * Working history/multikeyfuckery * type * inital code reduction refactor * Got multikey patched up, optimizing for size * Forgot to remove stuff * fixed key repeat * Key repeat added. * Symshift locking * Midchord Sym shenanigans. * Added only QWERTY mode * Split out header * Added stickybits, minimal layour * Fixing user layout * Whitespace fixing * Fixing Version name * Starting work on BS * Fixing default layout and rules * Updated Butter fw * Copy-paste rebase * more fixing from merge. Fuck * Forgot to roll version * Added revisions as per @mechmerlin * Somehow forgot backspace * Forgot Backspace? --- keyboards/butterstick/keymaps/default/keymap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/butterstick/keymaps/default/keymap.c b/keyboards/butterstick/keymaps/default/keymap.c index faabbef79..e4d1ea91f 100644 --- a/keyboards/butterstick/keymaps/default/keymap.c +++ b/keyboards/butterstick/keymaps/default/keymap.c @@ -45,6 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { uint32_t processQwerty(bool lookup) { // SECRET AGENT CHORDS P( LSU | LK | RS | RD, SEND_STRING(VERSION); SEND_STRING(__DATE__)); + P( LR | ST2| RR | RB, SEND(KC_BSPC)); P( LSD | RZ, SEND(KC_SPC)); // Dual chords From 00d1d7828c63538122d9d3db7336b9a40c9ffe80 Mon Sep 17 00:00:00 2001 From: Alex Ong Date: Sat, 18 May 2019 06:47:50 +1000 Subject: [PATCH 050/341] Typedef'ed layer_state_t to uint32_t (#3637) * Typedef'ed layer_state_t to uint32_t. This enables future work with layer_state_t to uint8_t for optimization purposes. * Removed accidental xeal60 commit * Revert to egyptian brackets, added sizeof(layer_state_t) so when layer_state_t is redefined it will automagically work. * Add additional typedefs * Add checks for setting layer state * Update tmk_core/common/action_layer.h Co-Authored-By: alex-ong * Revert commit. --- quantum/quantum.h | 4 ++-- tmk_core/common/action.c | 8 +++---- tmk_core/common/action_layer.c | 36 ++++++++++++++++---------------- tmk_core/common/action_layer.h | 38 ++++++++++++++++++++-------------- tmk_core/common/bootmagic.c | 4 ++-- tmk_core/common/magic.c | 2 +- 6 files changed, 50 insertions(+), 42 deletions(-) diff --git a/quantum/quantum.h b/quantum/quantum.h index 208268df6..451dd8a4b 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -61,10 +61,10 @@ #include "send_string_keycodes.h" #include "suspend.h" -extern uint32_t default_layer_state; +extern layer_state_t default_layer_state; #ifndef NO_ACTION_LAYER - extern uint32_t layer_state; + extern layer_state_t layer_state; #endif #ifdef MIDI_ENABLE diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index bb4e66c9c..3991a8a9e 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -406,8 +406,8 @@ void process_action(keyrecord_t *record, action_t action) /* Default Layer Bitwise Operation */ if (!event.pressed) { uint8_t shift = action.layer_bitop.part*4; - uint32_t bits = ((uint32_t)action.layer_bitop.bits)<= 0; i--) { + for (int8_t i = sizeof(layer_state_t)-1; i >= 0; i--) { if (layers & (1UL << i)) { action = action_for_key(i, key); if (action.code != ACTION_TRANSPARENT) { diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h index 6e2f35d90..7fa30c86d 100644 --- a/tmk_core/common/action_layer.h +++ b/tmk_core/common/action_layer.h @@ -21,24 +21,32 @@ along with this program. If not, see . #include "keyboard.h" #include "action.h" +#if defined(LAYER_STATE_8BIT) || ( defined(DYNAMIC_KEYMAP_ENABLE) && DYNAMIC_KEYMAP_LAYER_COUNT >= 8 ) +typedef uint8_t layer_state_t; +#elif defined(LAYER_STATE_16BIT) +typedef uint16_t layer_state_t; +#else +typedef uint32_t layer_state_t; +#endif + /* * Default Layer */ -extern uint32_t default_layer_state; +extern layer_state_t default_layer_state; void default_layer_debug(void); -void default_layer_set(uint32_t state); +void default_layer_set(layer_state_t state); __attribute__((weak)) -uint32_t default_layer_state_set_kb(uint32_t state); +layer_state_t default_layer_state_set_kb(layer_state_t state); __attribute__((weak)) -uint32_t default_layer_state_set_user(uint32_t state); +layer_state_t default_layer_state_set_user(layer_state_t state); #ifndef NO_ACTION_LAYER /* bitwise operation */ -void default_layer_or(uint32_t state); -void default_layer_and(uint32_t state); -void default_layer_xor(uint32_t state); +void default_layer_or(layer_state_t state); +void default_layer_and(layer_state_t state); +void default_layer_xor(layer_state_t state); #else #define default_layer_or(state) #define default_layer_and(state) @@ -50,11 +58,11 @@ void default_layer_xor(uint32_t state); * Keymap Layer */ #ifndef NO_ACTION_LAYER -extern uint32_t layer_state; +extern layer_state_t layer_state; -void layer_state_set(uint32_t state); +void layer_state_set(layer_state_t state); bool layer_state_is(uint8_t layer); -bool layer_state_cmp(uint32_t layer1, uint8_t layer2); +bool layer_state_cmp(layer_state_t layer1, uint8_t layer2); void layer_debug(void); void layer_clear(void); @@ -63,9 +71,9 @@ void layer_on(uint8_t layer); void layer_off(uint8_t layer); void layer_invert(uint8_t layer); /* bitwise operation */ -void layer_or(uint32_t state); -void layer_and(uint32_t state); -void layer_xor(uint32_t state); +void layer_or(layer_state_t state); +void layer_and(layer_state_t state); +void layer_xor(layer_state_t state); #else #define layer_state 0 @@ -84,8 +92,8 @@ void layer_xor(uint32_t state); #define layer_xor(state) #endif -uint32_t layer_state_set_user(uint32_t state); -uint32_t layer_state_set_kb(uint32_t state); +layer_state_t layer_state_set_user(layer_state_t state); +layer_state_t layer_state_set_kb(layer_state_t state); /* pressed actions cache */ #if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE) diff --git a/tmk_core/common/bootmagic.c b/tmk_core/common/bootmagic.c index 9f79fb8ee..cc780d17a 100644 --- a/tmk_core/common/bootmagic.c +++ b/tmk_core/common/bootmagic.c @@ -99,10 +99,10 @@ void bootmagic(void) if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_7)) { default_layer |= (1<<7); } if (default_layer) { eeconfig_update_default_layer(default_layer); - default_layer_set((uint32_t)default_layer); + default_layer_set((layer_state_t)default_layer); } else { default_layer = eeconfig_read_default_layer(); - default_layer_set((uint32_t)default_layer); + default_layer_set((layer_state_t)default_layer); } } diff --git a/tmk_core/common/magic.c b/tmk_core/common/magic.c index 714acc0f5..2b1a6a6ad 100644 --- a/tmk_core/common/magic.c +++ b/tmk_core/common/magic.c @@ -33,6 +33,6 @@ void magic(void) uint8_t default_layer = 0; default_layer = eeconfig_read_default_layer(); - default_layer_set((uint32_t)default_layer); + default_layer_set((layer_state_t)default_layer); } From d85110b6ec5fcdf3ef88b41909ce739b017abbea Mon Sep 17 00:00:00 2001 From: Josh Date: Fri, 17 May 2019 16:48:53 -0400 Subject: [PATCH 051/341] Adds a configurable initial delay to the audio clicky feature (#4286) * Adding an AUDIO_CLICKY_DELAY_DURATION configurable value to the AUDIO_CLICKY feature. * Tweaking my community keymap to work better with my rev 4 planck. --- docs/feature_audio.md | 3 ++- layouts/community/ortho_4x12/mindsound/config.h | 5 +++-- quantum/process_keycode/process_clicky.c | 11 ++++++++--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/docs/feature_audio.md b/docs/feature_audio.md index e1dd4c5a8..7511598bc 100644 --- a/docs/feature_audio.md +++ b/docs/feature_audio.md @@ -175,8 +175,9 @@ You can configure the default, min and max frequencies, the stepping and built i | `AUDIO_CLICKY_FREQ_DEFAULT` | 440.0f | Sets the default/starting audio frequency for the clicky sounds. | | `AUDIO_CLICKY_FREQ_MIN` | 65.0f | Sets the lowest frequency (under 60f are a bit buggy). | | `AUDIO_CLICKY_FREQ_MAX` | 1500.0f | Sets the the highest frequency. Too high may result in coworkers attacking you. | -| `AUDIO_CLICKY_FREQ_FACTOR` | 1.18921f| Sets the stepping of UP/DOWN key codes. | +| `AUDIO_CLICKY_FREQ_FACTOR` | 1.18921f| Sets the stepping of UP/DOWN key codes. This is a multiplicative factor. The default steps the frequency up/down by a musical minor third. | | `AUDIO_CLICKY_FREQ_RANDOMNESS` | 0.05f | Sets a factor of randomness for the clicks, Setting this to `0f` will make each click identical, and `1.0f` will make this sound much like the 90's computer screen scrolling/typing effect. | +| `AUDIO_CLICKY_DELAY_DURATION` | 1 | An integer note duration where 1 is 1/16th of the tempo, or a sixty-fourth note (see `quantum/audio/musical_notes.h` for implementation details). The main clicky effect will be delayed by this duration. Adjusting this to values around 6-12 will help compensate for loud switches. | diff --git a/layouts/community/ortho_4x12/mindsound/config.h b/layouts/community/ortho_4x12/mindsound/config.h index 76e7da204..e615fe77e 100644 --- a/layouts/community/ortho_4x12/mindsound/config.h +++ b/layouts/community/ortho_4x12/mindsound/config.h @@ -15,9 +15,10 @@ #define STARTUP_SONG SONG(ADVENTURE_TIME) #define AUDIO_CLICKY #define AUDIO_CLICKY_ON + #define AUDIO_CLICKY_DELAY_DURATION 0 #define AUDIO_CLICKY_FREQ_MAX 2500.0f - #define AUDIO_CLICKY_FREQ_RANDOMNESS 0.2f - #define AUDIO_CLICKY_FREQ_DEFAULT 110.0f + #define AUDIO_CLICKY_FREQ_RANDOMNESS 0.3f + #define AUDIO_CLICKY_FREQ_DEFAULT 880.0f #endif // for some reason the LSvi rev1 disables action tapping... diff --git a/quantum/process_keycode/process_clicky.c b/quantum/process_keycode/process_clicky.c index 12fef51f9..43b803afe 100644 --- a/quantum/process_keycode/process_clicky.c +++ b/quantum/process_keycode/process_clicky.c @@ -3,6 +3,9 @@ #ifdef AUDIO_CLICKY +#ifndef AUDIO_CLICKY_DELAY_DURATION +#define AUDIO_CLICKY_DELAY_DURATION 1 +#endif // !AUDIO_CLICKY_DELAY_DURATION #ifndef AUDIO_CLICKY_FREQ_DEFAULT #define AUDIO_CLICKY_FREQ_DEFAULT 440.0f #endif // !AUDIO_CLICKY_FREQ_DEFAULT @@ -21,7 +24,9 @@ float clicky_freq = AUDIO_CLICKY_FREQ_DEFAULT; float clicky_rand = AUDIO_CLICKY_FREQ_RANDOMNESS; -float clicky_song[][2] = {{AUDIO_CLICKY_FREQ_DEFAULT, 3}, {AUDIO_CLICKY_FREQ_DEFAULT, 1}}; // 3 and 1 --> durations + +// the first "note" is an intentional delay; the 2nd and 3rd notes are the "clicky" +float clicky_song[][2] = {{AUDIO_CLICKY_FREQ_MIN, AUDIO_CLICKY_DELAY_DURATION}, {AUDIO_CLICKY_FREQ_DEFAULT, 3}, {AUDIO_CLICKY_FREQ_DEFAULT, 1}}; // 3 and 1 --> durations extern audio_config_t audio_config; @@ -34,8 +39,8 @@ void clicky_play(void) { #ifndef NO_MUSIC_MODE if (music_activated || midi_activated || !audio_config.enable) return; #endif // !NO_MUSIC_MODE - clicky_song[0][0] = 2.0f * clicky_freq * (1.0f + clicky_rand * ( ((float)rand()) / ((float)(RAND_MAX)) ) ); - clicky_song[1][0] = clicky_freq * (1.0f + clicky_rand * ( ((float)rand()) / ((float)(RAND_MAX)) ) ); + clicky_song[1][0] = 2.0f * clicky_freq * (1.0f + clicky_rand * ( ((float)rand()) / ((float)(RAND_MAX)) ) ); + clicky_song[2][0] = clicky_freq * (1.0f + clicky_rand * ( ((float)rand()) / ((float)(RAND_MAX)) ) ); PLAY_SONG(clicky_song); } From f06910f5bf4de66b800342a47f24800e2f229b07 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 7 May 2019 00:22:55 -0700 Subject: [PATCH 052/341] Re-enable Audio And there was much rejoicingmake keebio/iris/rev2:drashna AUDIO_ENABLE=yes! --- keyboards/keebio/iris/keymaps/drashna/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/keebio/iris/keymaps/drashna/rules.mk b/keyboards/keebio/iris/keymaps/drashna/rules.mk index 1311ab280..a315e1a0b 100644 --- a/keyboards/keebio/iris/keymaps/drashna/rules.mk +++ b/keyboards/keebio/iris/keymaps/drashna/rules.mk @@ -5,7 +5,7 @@ CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration TAP_DANCE_ENABLE = no RGBLIGHT_ENABLE = yes -AUDIO_ENABLE = no +AUDIO_ENABLE = yes NKRO_ENABLE = yes BACKLIGHT_ENABLE = no SWAP_HANDS_ENABLE = no From ed6d5d5b7be2e41d184b484c70562651ed1f2f45 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 7 May 2019 14:16:00 -0700 Subject: [PATCH 053/341] Re-add debounce to ergodox EZ --- layouts/community/ergodox/drashna/config.h | 1 + 1 file changed, 1 insertion(+) diff --git a/layouts/community/ergodox/drashna/config.h b/layouts/community/ergodox/drashna/config.h index 7feaf6f25..afc5a1ddc 100644 --- a/layouts/community/ergodox/drashna/config.h +++ b/layouts/community/ergodox/drashna/config.h @@ -13,3 +13,4 @@ #define PRODUCT DrashnaDox - Hacked ErgoDox EZ Shine #undef DEBOUNCE +#define DEBOUNCE 10 From 42a6bd2fd4f797a5ef629621cd50ca4ac2a7f835 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 7 May 2019 21:08:41 -0700 Subject: [PATCH 054/341] Fix rgb matrix helper function --- layouts/community/ergodox/drashna/keymap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index 08689cf3d..fd867ede5 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c @@ -399,7 +399,8 @@ void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); } -void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { +extern led_config_t g_led_config; +void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) { if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { rgb_matrix_set_color( i, red, green, blue ); From 6af0c1e1293cbc50b7d5136c2c8260cec1d1a21b Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Thu, 9 May 2019 23:50:30 -0700 Subject: [PATCH 055/341] Make sure that RGM Matrix is checked properly --- users/drashna/rules.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk index 085840f1c..cdb9e5436 100644 --- a/users/drashna/rules.mk +++ b/users/drashna/rules.mk @@ -33,6 +33,7 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) endif endif +RGB_MATRIX_ENABLE ?= no ifneq ($(strip $(RGB_MATRIX_ENABLE)), no) SRC += rgb_stuff.c endif From db7c3b9220eb97e3c453e86c461760eda3652700 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 10 May 2019 01:36:07 -0700 Subject: [PATCH 056/341] Fix merge commit? --- keyboards/crkbd/keymaps/drashna/config.h | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/crkbd/keymaps/drashna/config.h b/keyboards/crkbd/keymaps/drashna/config.h index 0b035ba3c..670ad9fec 100644 --- a/keyboards/crkbd/keymaps/drashna/config.h +++ b/keyboards/crkbd/keymaps/drashna/config.h @@ -69,6 +69,7 @@ along with this program. If not, see . # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS # define DISABLE_RGB_MATRIX_SOLID_SPLASH # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#endif #ifdef AUDIO_ENABLE # define B6_AUDIO From 667b927004641d6352378af5eb19785572dbc341 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 11 May 2019 12:25:59 -0700 Subject: [PATCH 057/341] Disable more RGB matrix modes --- layouts/community/ergodox/drashna_glow/config.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layouts/community/ergodox/drashna_glow/config.h b/layouts/community/ergodox/drashna_glow/config.h index 5eb1c6d0f..e6c8223e9 100644 --- a/layouts/community/ergodox/drashna_glow/config.h +++ b/layouts/community/ergodox/drashna_glow/config.h @@ -18,7 +18,9 @@ # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON # define DISABLE_RGB_MATRIX_DUAL_BEACON # define DISABLE_RGB_MATRIX_RAINBOW_BEACON +# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS # define DISABLE_RGB_MATRIX_DIGITAL_RAIN +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS From f520316124fb789af0981fd6e5381f090c300acb Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sun, 12 May 2019 10:33:10 -0700 Subject: [PATCH 058/341] Increase Debounce for Ergodox EZ The performance improvements have made it necessary, actually --- layouts/community/ergodox/drashna/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/community/ergodox/drashna/config.h b/layouts/community/ergodox/drashna/config.h index afc5a1ddc..821710ed8 100644 --- a/layouts/community/ergodox/drashna/config.h +++ b/layouts/community/ergodox/drashna/config.h @@ -13,4 +13,4 @@ #define PRODUCT DrashnaDox - Hacked ErgoDox EZ Shine #undef DEBOUNCE -#define DEBOUNCE 10 +#define DEBOUNCE 15 From 6689f900fc0ed9022706af7605d40225a3348f63 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 13 May 2019 14:48:53 -0700 Subject: [PATCH 059/341] Consolidate RGB Matrix layer indication function And changes to iris --- keyboards/crkbd/keymaps/drashna/keymap.c | 54 ++++++++++++++++++- .../keebio/iris/keymaps/drashna/keymap.c | 2 +- layouts/community/ergodox/drashna/keymap.c | 37 +++++-------- layouts/community/ortho_4x12/drashna/keymap.c | 30 ++++------- users/drashna/rgb_stuff.c | 11 ++++ users/drashna/rgb_stuff.h | 2 + 6 files changed, 92 insertions(+), 44 deletions(-) diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c index 3eea7af9f..75b62cad8 100644 --- a/keyboards/crkbd/keymaps/drashna/keymap.c +++ b/keyboards/crkbd/keymaps/drashna/keymap.c @@ -22,7 +22,7 @@ enum crkbd_keycodes { KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RGUI_T(KC_QUOT), \ OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ - LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE \ + KC_GRV, KC_SPC, LT(_LOWER,KC_BSPC), LT(_RAISE,KC_DEL), KC_ENT, RAISE \ ) #define LAYOUT_crkbd_base_wrapper(...) LAYOUT_crkbd_base(__VA_ARGS__) @@ -156,6 +156,8 @@ void add_keylog(uint16_t keycode) { if (keycode < 60) { keylog_str[0] = code_to_name[keycode]; } + keylog_str[KEYLOG_LEN] = 0; + log_timer = timer_read(); } @@ -267,3 +269,53 @@ uint16_t get_tapping_term(uint16_t keycode) { return TAPPING_TERM; } } + +#ifdef RGB_MATRIX_ENABLE + +void rgb_matrix_indicators_user(void) { + if ( userspace_config.rgb_layer_change && +#ifdef RGB_DISABLE_WHEN_USB_SUSPENDED + !g_suspend_state && +#endif +#if defined(RGBLIGHT_ENABLE) + (!rgblight_config.enable && rgb_matrix_config.enable) +#else + rgb_matrix_config.enable +#endif + ) { + switch (biton32(layer_state)) { + case _MODS: + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_UNDERGLOW); break; + case _GAMEPAD: + rgb_matrix_layer_helper(0xFF, 0x80, 0x00, LED_FLAG_UNDERGLOW); break; + case _DIABLO: + rgb_matrix_layer_helper(0xFF, 0x00, 0x00, LED_FLAG_UNDERGLOW); break; + case _RAISE: + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_UNDERGLOW); break; + case _LOWER: + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_UNDERGLOW); break; + case _ADJUST: + rgb_matrix_layer_helper(0xFF, 0x00, 0x00, LED_FLAG_UNDERGLOW); break; + default: + switch (biton32(default_layer_state)) { + case _QWERTY: + rgb_matrix_layer_helper(0x00, 0xFF, 0xFF, LED_FLAG_UNDERGLOW); break; + case _COLEMAK: + rgb_matrix_layer_helper(0xFF, 0x00, 0xFF, LED_FLAG_UNDERGLOW); break; + case _DVORAK: + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_UNDERGLOW); break; + case _WORKMAN: + rgb_matrix_layer_helper(0xD9, 0xA5, 0x21, LED_FLAG_UNDERGLOW); break; + case _NORMAN: + rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D, LED_FLAG_UNDERGLOW); break; + case _MALTRON: + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_UNDERGLOW); break; + case _EUCALYN: + rgb_matrix_layer_helper(0xFF, 0x80, 0xBF, LED_FLAG_UNDERGLOW); break; + case _CARPLAX: + rgb_matrix_layer_helper(0x00, 0x00, 0xFF, LED_FLAG_UNDERGLOW); break; + } + } + } +} +#endif diff --git a/keyboards/keebio/iris/keymaps/drashna/keymap.c b/keyboards/keebio/iris/keymaps/drashna/keymap.c index 95092cc52..44ffb59f6 100644 --- a/keyboards/keebio/iris/keymaps/drashna/keymap.c +++ b/keyboards/keebio/iris/keymaps/drashna/keymap.c @@ -13,7 +13,7 @@ KC_TAB , K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSLS, \ KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \ OS_LSFT, CTL_T(K21), K22, K23, K24, K25, OS_LALT, OS_RGUI, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ - LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE \ + KC_GRV, KC_SPC, LT(_LOWER,KC_BSPC), LT(_RAISE,KC_DEL), KC_ENT, RAISE \ ) #define LAYOUT_iris_base_wrapper(...) LAYOUT_iris_base(__VA_ARGS__) diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index fd867ede5..71ac549ae 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c @@ -399,15 +399,6 @@ void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); } -extern led_config_t g_led_config; -void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) { - for (int i = 0; i < DRIVER_LED_TOTAL; i++) { - if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { - rgb_matrix_set_color( i, red, green, blue ); - } - } -} - void rgb_matrix_indicators_user(void) { if ( userspace_config.rgb_layer_change && #ifdef RGB_DISABLE_WHEN_USB_SUSPENDED @@ -421,9 +412,9 @@ void rgb_matrix_indicators_user(void) { ) { switch (biton32(layer_state)) { case _MODS: - rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break; + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_MODIFIER); break; case _GAMEPAD: - rgb_matrix_layer_helper(0xFF, 0x80, 0x00); + rgb_matrix_layer_helper(0xFF, 0x80, 0x00, LED_FLAG_MODIFIER); rgb_matrix_set_color(32, 0x00, 0xFF, 0x00); // Q rgb_matrix_set_color(31, 0x00, 0xFF, 0xFF); // W rgb_matrix_set_color(30, 0xFF, 0x00, 0x00); // E @@ -439,31 +430,31 @@ void rgb_matrix_indicators_user(void) { break; case _DIABLO: - rgb_matrix_layer_helper(0xFF, 0x00, 0x00); break; + rgb_matrix_layer_helper(0xFF, 0x00, 0x00, LED_FLAG_MODIFIER); break; case _RAISE: - rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break; + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_MODIFIER); break; case _LOWER: - rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break; + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_MODIFIER); break; case _ADJUST: - rgb_matrix_layer_helper(0xFF, 0x00, 0x00); break; + rgb_matrix_layer_helper(0xFF, 0x00, 0x00, LED_FLAG_MODIFIER); break; default: switch (biton32(default_layer_state)) { case _QWERTY: - rgb_matrix_layer_helper(0x00, 0xFF, 0xFF); break; + rgb_matrix_layer_helper(0x00, 0xFF, 0xFF, LED_FLAG_MODIFIER); break; case _COLEMAK: - rgb_matrix_layer_helper(0xFF, 0x00, 0xFF); break; + rgb_matrix_layer_helper(0xFF, 0x00, 0xFF, LED_FLAG_MODIFIER); break; case _DVORAK: - rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break; + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_MODIFIER); break; case _WORKMAN: - rgb_matrix_layer_helper(0xD9, 0xA5, 0x21); break; + rgb_matrix_layer_helper(0xD9, 0xA5, 0x21, LED_FLAG_MODIFIER); break; case _NORMAN: - rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D); break; + rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D, LED_FLAG_MODIFIER); break; case _MALTRON: - rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break; + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_MODIFIER); break; case _EUCALYN: - rgb_matrix_layer_helper(0xFF, 0x80, 0xBF); break; + rgb_matrix_layer_helper(0xFF, 0x80, 0xBF, LED_FLAG_MODIFIER); break; case _CARPLAX: - rgb_matrix_layer_helper(0x00, 0x00, 0xFF); break; + rgb_matrix_layer_helper(0x00, 0x00, 0xFF, LED_FLAG_MODIFIER); break; } } } diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index 9b0c2d794..3ebcd84a6 100644 --- a/layouts/community/ortho_4x12/drashna/keymap.c +++ b/layouts/community/ortho_4x12/drashna/keymap.c @@ -180,14 +180,6 @@ void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); } -void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) { - for (int i = 0; i < DRIVER_LED_TOTAL; i++) { - if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { - rgb_matrix_set_color( i, red, green, blue ); - } - } -} - void rgb_matrix_indicators_user(void) { uint8_t this_mod = get_mods(); uint8_t this_led = host_keyboard_leds(); @@ -209,29 +201,29 @@ void rgb_matrix_indicators_user(void) { ) { switch (biton32(layer_state)) { case _RAISE: - rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break; + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_MODIFIER); break; case _LOWER: - rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break; + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_MODIFIER); break; case _ADJUST: - rgb_matrix_layer_helper(0xFF, 0x00, 0x00); break; + rgb_matrix_layer_helper(0xFF, 0x00, 0x00, LED_FLAG_MODIFIER); break; default: switch (biton32(default_layer_state)) { case _QWERTY: - rgb_matrix_layer_helper(0x00, 0xFF, 0xFF); break; + rgb_matrix_layer_helper(0x00, 0xFF, 0xFF, LED_FLAG_MODIFIER); break; case _COLEMAK: - rgb_matrix_layer_helper(0xFF, 0x00, 0xFF); break; + rgb_matrix_layer_helper(0xFF, 0x00, 0xFF, LED_FLAG_MODIFIER); break; case _DVORAK: - rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break; + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_MODIFIER); break; case _WORKMAN: - rgb_matrix_layer_helper(0xD9, 0xA5, 0x21); break; + rgb_matrix_layer_helper(0xD9, 0xA5, 0x21, LED_FLAG_MODIFIER); break; case _NORMAN: - rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D); break; + rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D, LED_FLAG_MODIFIER); break; case _MALTRON: - rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break; + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_MODIFIER); break; case _EUCALYN: - rgb_matrix_layer_helper(0xFF, 0x80, 0xBF); break; + rgb_matrix_layer_helper(0xFF, 0x80, 0xBF, LED_FLAG_MODIFIER); break; case _CARPLAX: - rgb_matrix_layer_helper(0x00, 0x00, 0xFF); break; + rgb_matrix_layer_helper(0x00, 0x00, 0xFF, LED_FLAG_MODIFIER); break; } } } diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index 9e19747fa..342186617 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c @@ -334,3 +334,14 @@ uint32_t layer_state_set_rgb(uint32_t state) { return state; } + +#ifdef RGB_MATRIX_ENABLE +extern led_config_t g_led_config; +void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, uint8_t led_type) { + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + if (HAS_FLAGS(g_led_config.flags[i], led_type)) { + rgb_matrix_set_color( i, red, green, blue ); + } + } +} +#endif diff --git a/users/drashna/rgb_stuff.h b/users/drashna/rgb_stuff.h index 886f20ffc..572104612 100644 --- a/users/drashna/rgb_stuff.h +++ b/users/drashna/rgb_stuff.h @@ -19,3 +19,5 @@ uint32_t layer_state_set_rgb(uint32_t state); uint32_t default_layer_state_set_rgb(uint32_t state); void rgblight_sethsv_default_helper(uint8_t index); void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); + +void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, uint8_t led_type); From 2a6cb0487656b2f954ff6f01f41628138fed9a58 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 13 May 2019 19:40:19 -0700 Subject: [PATCH 060/341] Fix lighting issue for gamepad --- layouts/community/ergodox/drashna/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index 71ac549ae..74382f175 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c @@ -424,8 +424,8 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(35, 0x00, 0xFF, 0xFF); // D rgb_matrix_set_color(34, 0x7A, 0x00, 0xFF); // F - rgb_matrix_set_color(27, 0xFF, 0xFF, 0xFF); // 1 - rgb_matrix_set_color(26, 0x00, 0xFF, 0x00); // 2 + rgb_matrix_set_color(userspace_config.swapped_numbers ? 27 : 26, 0xFF, 0xFF, 0xFF); // 1 + rgb_matrix_set_color(userspace_config.swapped_numbers ? 26 : 27, 0x00, 0xFF, 0x00); // 2 rgb_matrix_set_color(25, 0x7A, 0x00, 0xFF); // 3 break; From ed08787aaac2f4f96f11f7c074af9c825b6e4917 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 13 May 2019 20:55:19 -0700 Subject: [PATCH 061/341] Update Corne Keyboard configuration --- keyboards/crkbd/keymaps/drashna/config.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/keyboards/crkbd/keymaps/drashna/config.h b/keyboards/crkbd/keymaps/drashna/config.h index 670ad9fec..724d52c38 100644 --- a/keyboards/crkbd/keymaps/drashna/config.h +++ b/keyboards/crkbd/keymaps/drashna/config.h @@ -48,17 +48,24 @@ along with this program. If not, see . #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_KEYPRESSES // reacts to keypresses # define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS +// # define DISABLE_RGB_MATRIX_ALPHAS_MODS # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define DISABLE_RGB_MATRIX_BREATHING # define DISABLE_RGB_MATRIX_CYCLE_ALL +# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT # define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN +// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN +// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON # define DISABLE_RGB_MATRIX_DUAL_BEACON # define DISABLE_RGB_MATRIX_RAINBOW_BEACON # define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -// #define DISABLE_RGB_MATRIX_RAINDROPS -// #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN +// # define DISABLE_RGB_MATRIX_RAINDROPS +// # define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// # define DISABLE_RGB_MATRIX_TYPING_HEATMAP +// # define DISABLE_RGB_MATRIX_DIGITAL_RAIN # define DISABLE_RGB_MATRIX_SOLID_REACTIVE # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE @@ -67,6 +74,8 @@ along with this program. If not, see . # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define DISABLE_RGB_MATRIX_SPLASH +// # define DISABLE_RGB_MATRIX_MULTISPLASH # define DISABLE_RGB_MATRIX_SOLID_SPLASH # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif From 05e2baaa49ffaef14f704e5b25763fc1ec967b21 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 13 May 2019 20:58:46 -0700 Subject: [PATCH 062/341] Update Corne Keyboard layout --- keyboards/crkbd/keymaps/drashna/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c index 75b62cad8..a7a3decf1 100644 --- a/keyboards/crkbd/keymaps/drashna/keymap.c +++ b/keyboards/crkbd/keymaps/drashna/keymap.c @@ -20,9 +20,9 @@ enum crkbd_keycodes { ) \ LAYOUT_wrapper( \ KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ - KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RGUI_T(KC_QUOT), \ + KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \ OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ - KC_GRV, KC_SPC, LT(_LOWER,KC_BSPC), LT(_RAISE,KC_DEL), KC_ENT, RAISE \ + KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI \ ) #define LAYOUT_crkbd_base_wrapper(...) LAYOUT_crkbd_base(__VA_ARGS__) From bcfc24fd13661612b4af3836b174fe02960a13e7 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 13 May 2019 21:03:17 -0700 Subject: [PATCH 063/341] Update KC_MAKE macro to better handle crkbd split --- users/drashna/process_records.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c index a5487b585..770219917 100644 --- a/users/drashna/process_records.c +++ b/users/drashna/process_records.c @@ -39,22 +39,26 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { clear_mods(); clear_oneshot_mods(); send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), TAP_CODE_DELAY); #ifndef MAKE_BOOTLOADER - if ( ( temp_mod | temp_osm ) & MOD_MASK_SHIFT ) + if ( ( temp_mod | temp_osm ) & MOD_MASK_SHIFT ) +#endif + { + #if defined(__arm__) + send_string_with_delay_P(PSTR(":dfu-util"), TAP_CODE_DELAY); + #elif defined(BOOTLOADER_DFU) + send_string_with_delay_P(PSTR(":dfu"), TAP_CODE_DELAY); + #elif defined(BOOTLOADER_HALFKAY) + send_string_with_delay_P(PSTR(":teensy"), TAP_CODE_DELAY); + #elif defined(BOOTLOADER_CATERINA) + send_string_with_delay_P(PSTR(":avrdude"), TAP_CODE_DELAY); + #endif // bootloader options + } + if ( ( temp_mod | temp_osm ) & MOD_MASK_CTRL) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), TAP_CODE_DELAY); } +#ifdef RGB_MATRIX_SPLIT_RIGHT + send_string_with_delay_P(PSTR(" RGB_MATRIX_SPLIT_RIGHT=yes OLED_DRIVER_ENABLE=no"), TAP_CODE_DELAY); #endif - { - #if defined(__arm__) - send_string_with_delay_P(PSTR(":dfu-util"), TAP_CODE_DELAY); - #elif defined(BOOTLOADER_DFU) - send_string_with_delay_P(PSTR(":dfu"), TAP_CODE_DELAY); - #elif defined(BOOTLOADER_HALFKAY) - send_string_with_delay_P(PSTR(":teensy"), TAP_CODE_DELAY); - #elif defined(BOOTLOADER_CATERINA) - send_string_with_delay_P(PSTR(":avrdude"), TAP_CODE_DELAY); - #endif // bootloader options - } - if ( ( temp_mod | temp_osm ) & MOD_MASK_CTRL) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), TAP_CODE_DELAY); } send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY); } + break; case VRSN: // Prints firmware version From ebfc39cc5083dd7c597f274883621b932ce6c33f Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 14 May 2019 09:11:57 -0700 Subject: [PATCH 064/341] Tweaks to Corne Keyboard Layout --- keyboards/crkbd/keymaps/drashna/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c index a7a3decf1..a96420379 100644 --- a/keyboards/crkbd/keymaps/drashna/keymap.c +++ b/keyboards/crkbd/keymaps/drashna/keymap.c @@ -100,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, KC_MPLY, - _______, _______, _______, KC_NUKE, TG_MODS, _______ + _______, KC_NUKE, _______, _______, TG_MODS, _______ ) }; From 356521864e9f49d50131f4779ff9e56dc8b12e8f Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 14 May 2019 23:26:41 -0700 Subject: [PATCH 065/341] Enable RGB Matrix Sleep --- keyboards/crkbd/keymaps/drashna/keymap.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c index a96420379..af0bc0d9a 100644 --- a/keyboards/crkbd/keymaps/drashna/keymap.c +++ b/keyboards/crkbd/keymaps/drashna/keymap.c @@ -272,6 +272,14 @@ uint16_t get_tapping_term(uint16_t keycode) { #ifdef RGB_MATRIX_ENABLE +void suspend_power_down_keymap(void) { + rgb_matrix_set_suspend_state(true); +} + +void suspend_wakeup_init_keymap(void) { + rgb_matrix_set_suspend_state(false); +} + void rgb_matrix_indicators_user(void) { if ( userspace_config.rgb_layer_change && #ifdef RGB_DISABLE_WHEN_USB_SUSPENDED From 89e9785d7a87e8dbb941dd272c032f34658169fd Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 17 May 2019 15:21:45 -0700 Subject: [PATCH 066/341] Update my code to use layer_state_t typedef --- layouts/community/ortho_4x12/drashna/keymap.c | 2 +- users/drashna/drashna.c | 8 ++++---- users/drashna/drashna.h | 4 ++-- users/drashna/rgb_stuff.c | 2 +- users/drashna/rgb_stuff.h | 4 ++-- users/drashna/template.c | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index 3ebcd84a6..c1c016ce9 100644 --- a/layouts/community/ortho_4x12/drashna/keymap.c +++ b/layouts/community/ortho_4x12/drashna/keymap.c @@ -319,7 +319,7 @@ void dip_update(uint8_t index, bool active) { #endif // KEYBOARD_planck_rev6 #ifdef KEYBOARD_planck_ez -uint32_t layer_state_set_keymap(uint32_t state) { +layer_state_t layer_state_set_keymap(layer_state_t state) { palClearPad(GPIOB, 8); palClearPad(GPIOB, 9); diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index 7c60a2e4a..acc6b9f9e 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c @@ -187,13 +187,13 @@ void matrix_scan_user(void) { __attribute__ ((weak)) -uint32_t layer_state_set_keymap (uint32_t state) { +layer_state_t layer_state_set_keymap (layer_state_t state) { return state; } // on layer change, no matter where the change was initiated // Then runs keymap's layer change check -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); #ifdef RGBLIGHT_ENABLE state = layer_state_set_rgb(state); @@ -203,12 +203,12 @@ uint32_t layer_state_set_user(uint32_t state) { __attribute__ ((weak)) -uint32_t default_layer_state_set_keymap (uint32_t state) { +layer_state_t default_layer_state_set_keymap (layer_state_t state) { return state; } // Runs state check and changes underglow color and animation -uint32_t default_layer_state_set_user(uint32_t state) { +layer_state_t default_layer_state_set_user(layer_state_t state) { state = default_layer_state_set_keymap(state); #if 0 #ifdef RGBLIGHT_ENABLE diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index 5df67792a..507504f04 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h @@ -67,8 +67,8 @@ void shutdown_keymap(void); void suspend_power_down_keymap(void); void suspend_wakeup_init_keymap(void); void matrix_scan_keymap(void); -uint32_t layer_state_set_keymap (uint32_t state); -uint32_t default_layer_state_set_keymap (uint32_t state); +layer_state_t layer_state_set_keymap (layer_state_t state); +layer_state_t default_layer_state_set_keymap (layer_state_t state); void led_set_keymap(uint8_t usb_led); void eeconfig_init_keymap(void); diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index 342186617..7d364fa68 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c @@ -275,7 +275,7 @@ void matrix_scan_rgb(void) { } -uint32_t layer_state_set_rgb(uint32_t state) { +layer_state_t layer_state_set_rgb(layer_state_t state) { #ifdef RGBLIGHT_ENABLE if (userspace_config.rgb_layer_change) { switch (biton32(state)) { diff --git a/users/drashna/rgb_stuff.h b/users/drashna/rgb_stuff.h index 572104612..f5bbd0f3b 100644 --- a/users/drashna/rgb_stuff.h +++ b/users/drashna/rgb_stuff.h @@ -15,8 +15,8 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record); void scan_rgblight_fadeout(void); void keyboard_post_init_rgb(void); void matrix_scan_rgb(void); -uint32_t layer_state_set_rgb(uint32_t state); -uint32_t default_layer_state_set_rgb(uint32_t state); +layer_state_t layer_state_set_rgb(layer_state_t state); +layer_state_t default_layer_state_set_rgb(layer_state_t state); void rgblight_sethsv_default_helper(uint8_t index); void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); diff --git a/users/drashna/template.c b/users/drashna/template.c index 0e188f3a5..d90e6bdec 100644 --- a/users/drashna/template.c +++ b/users/drashna/template.c @@ -62,11 +62,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { __attribute__ ((weak)) -uint32_t layer_state_set_keymap (uint32_t state) { +layer_state_t layer_state_set_keymap (layer_state_t state) { return state; } -uint32_t layer_state_set_user (uint32_t state) { +layer_state_t layer_state_set_user (layer_state_t state) { return layer_state_set_keymap (state); } From ba26736d7e0679e87e34add2445cdae541e2a0b8 Mon Sep 17 00:00:00 2001 From: Ryan Caltabiano Date: Sat, 18 May 2019 15:12:35 -0500 Subject: [PATCH 067/341] Fix bit count calculation for iterating layers --- tmk_core/common/action_layer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c index be28107b6..dfcbc110a 100644 --- a/tmk_core/common/action_layer.c +++ b/tmk_core/common/action_layer.c @@ -303,7 +303,7 @@ uint8_t layer_switch_get_layer(keypos_t key) { layer_state_t layers = layer_state | default_layer_state; /* check top layer first */ - for (int8_t i = sizeof(layer_state_t)-1; i >= 0; i--) { + for (int8_t i = sizeof(layer_state_t) * 8 - 1; i >= 0; i--) { if (layers & (1UL << i)) { action = action_for_key(i, key); if (action.code != ACTION_TRANSPARENT) { From 0099bbf9a64a0b4df1093f528481bff39af2c80d Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Sun, 19 May 2019 11:09:06 -0500 Subject: [PATCH 068/341] Single Color Band scrolling left to right effects (#5867) --- docs/feature_rgb_matrix.md | 4 ++++ .../colorband_sat_anim.h | 21 +++++++++++++++++++ .../colorband_val_anim.h | 21 +++++++++++++++++++ .../rgb_matrix_effects.inc | 2 ++ 4 files changed, 48 insertions(+) create mode 100644 quantum/rgb_matrix_animations/colorband_sat_anim.h create mode 100644 quantum/rgb_matrix_animations/colorband_val_anim.h diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 8347660df..df124ea0f 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -194,6 +194,8 @@ enum rgb_matrix_effects { RGB_MATRIX_ALPHAS_MODS, // Static dual hue, speed is hue for secondary hue RGB_MATRIX_GRADIENT_UP_DOWN, // Static gradient top to bottom, speed controls how much gradient changes RGB_MATRIX_BREATHING, // Single hue brightness cycling animation + RGB_MATRIX_BAND_SAT, // Single hue band fading saturation scrolling left to right + RGB_MATRIX_BAND_VAL, // Single hue band fading brightness scrolling left to right RGB_MATRIX_CYCLE_ALL, // Full keyboard solid hue cycling through full gradient RGB_MATRIX_CYCLE_LEFT_RIGHT, // Full gradient scrolling left to right RGB_MATRIX_CYCLE_UP_DOWN, // Full gradient scrolling top to bottom @@ -235,6 +237,8 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con |`#define DISABLE_RGB_MATRIX_ALPHAS_MODS` |Disables `RGB_MATRIX_ALPHAS_MODS` | |`#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN` |Disables `RGB_MATRIX_GRADIENT_UP_DOWN` | |`#define DISABLE_RGB_MATRIX_BREATHING` |Disables `RGB_MATRIX_BREATHING` | +|`#define DISABLE_RGB_MATRIX_BAND_SAT` |Disables `RGB_MATRIX_BAND_SAT` | +|`#define DISABLE_RGB_MATRIX_BAND_VAL` |Disables `RGB_MATRIX_BAND_VAL` | |`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` | |`#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Disables `RGB_MATRIX_CYCLE_LEFT_RIGHT` | |`#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Disables `RGB_MATRIX_CYCLE_UP_DOWN` | diff --git a/quantum/rgb_matrix_animations/colorband_sat_anim.h b/quantum/rgb_matrix_animations/colorband_sat_anim.h new file mode 100644 index 000000000..89773b6ce --- /dev/null +++ b/quantum/rgb_matrix_animations/colorband_sat_anim.h @@ -0,0 +1,21 @@ +#ifndef DISABLE_RGB_MATRIX_BAND_SAT +RGB_MATRIX_EFFECT(BAND_SAT) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +bool BAND_SAT(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, 0, rgb_matrix_config.val }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + int16_t s = rgb_matrix_config.sat - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8; + hsv.s = s < 0 ? 0 : s; + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_BAND_SAT diff --git a/quantum/rgb_matrix_animations/colorband_val_anim.h b/quantum/rgb_matrix_animations/colorband_val_anim.h new file mode 100644 index 000000000..bf41cec91 --- /dev/null +++ b/quantum/rgb_matrix_animations/colorband_val_anim.h @@ -0,0 +1,21 @@ +#ifndef DISABLE_RGB_MATRIX_BAND_VAL +RGB_MATRIX_EFFECT(BAND_VAL) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +bool BAND_VAL(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, 0 }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + int16_t v = rgb_matrix_config.val - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8; + hsv.v = v < 0 ? 0 : v; + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_BAND_VAL diff --git a/quantum/rgb_matrix_animations/rgb_matrix_effects.inc b/quantum/rgb_matrix_animations/rgb_matrix_effects.inc index f05a415a5..4b01afaa3 100644 --- a/quantum/rgb_matrix_animations/rgb_matrix_effects.inc +++ b/quantum/rgb_matrix_animations/rgb_matrix_effects.inc @@ -3,6 +3,8 @@ #include "rgb_matrix_animations/alpha_mods_anim.h" #include "rgb_matrix_animations/gradient_up_down_anim.h" #include "rgb_matrix_animations/breathing_anim.h" +#include "rgb_matrix_animations/colorband_sat_anim.h" +#include "rgb_matrix_animations/colorband_val_anim.h" #include "rgb_matrix_animations/cycle_all_anim.h" #include "rgb_matrix_animations/cycle_left_right_anim.h" #include "rgb_matrix_animations/cycle_up_down_anim.h" From f11fde9bf5898a09201042d612caaff8d4692bb9 Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Sun, 19 May 2019 11:11:08 -0500 Subject: [PATCH 069/341] Fixing hsv_to_rgb where s = 0 and v < 255 (#5915) * Fixing hsv to rgb where s is 0 and v is < 255 * Update color.c --- quantum/color.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quantum/color.c b/quantum/color.c index 466e6edac..a309da379 100644 --- a/quantum/color.c +++ b/quantum/color.c @@ -27,9 +27,13 @@ RGB hsv_to_rgb( HSV hsv ) if ( hsv.s == 0 ) { +#ifdef USE_CIE1931_CURVE + rgb.r = rgb.g = rgb.b = pgm_read_byte( &CIE1931_CURVE[hsv.v] ); +#else rgb.r = hsv.v; rgb.g = hsv.v; rgb.b = hsv.v; +#endif return rgb; } From a0d6c5a1136e2c56aa4a57eac08355c2b5d79ad5 Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Sun, 19 May 2019 11:15:50 -0500 Subject: [PATCH 070/341] [Keymap] Update Xulkal user code (#5920) --- users/xulkal/config.h | 10 +----- users/xulkal/process_records.c | 56 +++++----------------------------- users/xulkal/process_records.h | 18 +++++++---- 3 files changed, 20 insertions(+), 64 deletions(-) diff --git a/users/xulkal/config.h b/users/xulkal/config.h index ecd01f794..c794530d4 100644 --- a/users/xulkal/config.h +++ b/users/xulkal/config.h @@ -5,6 +5,7 @@ #undef TAPPING_TERM #define TAPPING_TERM 175 +#define SPACE_CADET_MODIFIER_CARRYOVER #define LSPO_KEYS KC_LSFT, KC_TRNS, KC_LBRC #define RSPC_KEYS KC_RSFT, KC_TRNS, KC_RBRC #define LCPO_KEYS KC_LCTL, KC_TRNS, KC_MINS @@ -27,12 +28,3 @@ #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS #define DISABLE_RGB_MATRIX_SPLASH #define DISABLE_RGB_MATRIX_SOLID_SPLASH - -// Don't like or feel to identical to other effects -#if defined(__AVR__) -#define DISABLE_RGB_MATRIX_RAINBOW_BEACON -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#endif diff --git a/users/xulkal/process_records.c b/users/xulkal/process_records.c index 7c2b5e133..5ba59965f 100644 --- a/users/xulkal/process_records.c +++ b/users/xulkal/process_records.c @@ -15,47 +15,15 @@ qk_tap_dance_action_t tap_dance_actions[] = { extern void eeconfig_update_rgb_matrix_default(void); #endif +#ifdef TRILAYER_ENABLED +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} +#endif + bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint16_t reset_timer; switch (keycode) { - case QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); - } - return false; - case GAME: -#ifndef GAMELAYER_DISABLE - if (record->event.pressed) { - set_single_persistent_default_layer(_GAME); - } -#endif - return false; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); -#ifdef TRILAYER_ENABLED - update_tri_layer(_LOWER, _RAISE, _ADJUST); -#endif - } else { - layer_off(_LOWER); -#ifdef TRILAYER_ENABLED - update_tri_layer(_LOWER, _RAISE, _ADJUST); -#endif - } - return false; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); -#ifdef TRILAYER_ENABLED - update_tri_layer(_LOWER, _RAISE, _ADJUST); -#endif - } else { - layer_off(_RAISE); -#ifdef TRILAYER_ENABLED - update_tri_layer(_LOWER, _RAISE, _ADJUST); -#endif - } - return false; case RGBRST: #if defined(RGBLIGHT_ENABLE) if (record->event.pressed) { @@ -79,20 +47,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; } - return process_record_keymap(keycode, record) && -#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) - process_record_rgb(keycode, record) && -#endif // RGBLIGHT_ENABLE; - true; + return process_record_keymap(keycode, record); } __attribute__ ((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } - - -__attribute__ ((weak)) -bool process_record_rgb(uint16_t keycode, keyrecord_t *record) { - return true; -} diff --git a/users/xulkal/process_records.h b/users/xulkal/process_records.h index d79ab7e32..8a195df5c 100644 --- a/users/xulkal/process_records.h +++ b/users/xulkal/process_records.h @@ -4,6 +4,17 @@ #define RIS_ESC LT(_RAISE, KC_ESC) #define RIS_CAPS LT(_RAISE, KC_CAPS) +#define QWERTY DF(_QWERTY) + +#ifndef GAMELAYER_DISABLE +#define GAME DF(_GAME) +#else +#define GAME KC_TRANSPARENT +#endif + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + #ifdef TAP_DANCE_ENABLE #include "process_tap_dance.h" @@ -42,12 +53,7 @@ enum layer_number { }; enum custom_keycodes { - QWERTY = SAFE_RANGE, - GAME, - LOWER, - RAISE, - RGBRST + RGBRST = SAFE_RANGE }; bool process_record_keymap(uint16_t keycode, keyrecord_t *record); -bool process_record_rgb(uint16_t keycode, keyrecord_t *record); From 270b39b2eb44247cff75ddd216a8e67f8f264991 Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Sun, 19 May 2019 11:19:46 -0500 Subject: [PATCH 071/341] Spirals, Pinwheels, and Documentation....Oh My! RGB Matrix Effects (#5877) * Spirals, Pinwheels, and Documentation....Oh My! * Spiral effect band thickness adjustments * Fixing animation spin directions --- docs/feature_rgb_matrix.md | 12 +++++++++ lib/lib8tion/trig8.h | 25 +++++++++++++++++++ .../colorband_pinwheel_sat_anim.h | 22 ++++++++++++++++ .../colorband_pinwheel_val_anim.h | 22 ++++++++++++++++ .../colorband_spiral_sat_anim.h | 23 +++++++++++++++++ .../colorband_spiral_val_anim.h | 23 +++++++++++++++++ .../cycle_pinwheel_anim.h | 22 ++++++++++++++++ .../rgb_matrix_animations/cycle_spiral_anim.h | 23 +++++++++++++++++ .../rgb_matrix_effects.inc | 6 +++++ 9 files changed, 178 insertions(+) create mode 100644 quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h create mode 100644 quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h create mode 100644 quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h create mode 100644 quantum/rgb_matrix_animations/colorband_spiral_val_anim.h create mode 100644 quantum/rgb_matrix_animations/cycle_pinwheel_anim.h create mode 100644 quantum/rgb_matrix_animations/cycle_spiral_anim.h diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index df124ea0f..18636776c 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -196,12 +196,18 @@ enum rgb_matrix_effects { RGB_MATRIX_BREATHING, // Single hue brightness cycling animation RGB_MATRIX_BAND_SAT, // Single hue band fading saturation scrolling left to right RGB_MATRIX_BAND_VAL, // Single hue band fading brightness scrolling left to right + RGB_MATRIX_BAND_PINWHEEL_SAT, // Single hue 3 blade spinning pinwheel fades saturation + RGB_MATRIX_BAND_PINWHEEL_VAL, // Single hue 3 blade spinning pinwheel fades brightness + RGB_MATRIX_BAND_SPIRAL_SAT, // Single hue spinning spiral fades saturation + RGB_MATRIX_BAND_SPIRAL_VAL, // Single hue spinning spiral fades brightness RGB_MATRIX_CYCLE_ALL, // Full keyboard solid hue cycling through full gradient RGB_MATRIX_CYCLE_LEFT_RIGHT, // Full gradient scrolling left to right RGB_MATRIX_CYCLE_UP_DOWN, // Full gradient scrolling top to bottom RGB_MATRIX_CYCLE_OUT_IN, // Full gradient scrolling out to in RGB_MATRIX_CYCLE_OUT_IN_DUAL, // Full dual gradients scrolling out to in RGB_MATRIX_RAINBOW_MOVING_CHEVRON, // Full gradent Chevron shapped scrolling left to right + RGB_MATRIX_CYCLE_PINWHEEL, // Full gradient spinning pinwheel around center of keyboard + RGB_MATRIX_CYCLE_SPIRAL, // Full gradient spinning spiral around center of keyboard RGB_MATRIX_DUAL_BEACON, // Full gradient spinning around center of keyboard RGB_MATRIX_RAINBOW_BEACON, // Full tighter gradient spinning around center of keyboard RGB_MATRIX_RAINBOW_PINWHEELS, // Full dual gradients spinning two halfs of keyboard @@ -239,6 +245,10 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con |`#define DISABLE_RGB_MATRIX_BREATHING` |Disables `RGB_MATRIX_BREATHING` | |`#define DISABLE_RGB_MATRIX_BAND_SAT` |Disables `RGB_MATRIX_BAND_SAT` | |`#define DISABLE_RGB_MATRIX_BAND_VAL` |Disables `RGB_MATRIX_BAND_VAL` | +|`#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT` |Disables `RGB_MATRIX_BAND_PINWHEEL_SAT` | +|`#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL` |Disables `RGB_MATRIX_BAND_PINWHEEL_VAL` | +|`#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT` |Disables `RGB_MATRIX_BAND_SPIRAL_SAT` | +|`#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL` |Disables `RGB_MATRIX_BAND_SPIRAL_VAL` | |`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` | |`#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Disables `RGB_MATRIX_CYCLE_LEFT_RIGHT` | |`#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Disables `RGB_MATRIX_CYCLE_UP_DOWN` | @@ -246,6 +256,8 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con |`#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL` |Disables `RGB_MATRIX_CYCLE_OUT_IN_DUAL` | |`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON` | |`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` | +|`#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL` |Disables `RGB_MATRIX_CYCLE_PINWHEEL` | +|`#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL` |Disables `RGB_MATRIX_CYCLE_SPIRAL` | |`#define DISABLE_RGB_MATRIX_RAINBOW_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` | |`#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Disables `RGB_MATRIX_RAINBOW_PINWHEELS` | |`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` | diff --git a/lib/lib8tion/trig8.h b/lib/lib8tion/trig8.h index 6ef3ce625..cfba6373f 100644 --- a/lib/lib8tion/trig8.h +++ b/lib/lib8tion/trig8.h @@ -255,5 +255,30 @@ LIB8STATIC uint8_t cos8( uint8_t theta) return sin8( theta + 64); } +/// Fast 16-bit approximation of atan2(x). +/// @returns atan2, value between 0 and 255 +LIB8STATIC uint8_t atan2_8(int16_t dy, int16_t dx) +{ + if (dy == 0) + { + if (dx >= 0) + return 0; + else + return 128; + } + + int16_t abs_y = dy > 0 ? dy : -dy; + int8_t a; + + if (dx >= 0) + a = 32 - (32 * (dx - abs_y) / (dx + abs_y)); + else + a = 96 - (32 * (dx + abs_y) / (abs_y - dx)); + + if (dy < 0) + return -a; // negate if in quad III or IV + return a; +} + ///@} #endif diff --git a/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h b/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h new file mode 100644 index 000000000..3e6df1fbe --- /dev/null +++ b/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h @@ -0,0 +1,22 @@ +#ifndef DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +RGB_MATRIX_EFFECT(BAND_PINWHEEL_SAT) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +bool BAND_PINWHEEL_SAT(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, 0, rgb_matrix_config.val }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 2); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + int16_t dx = g_led_config.point[i].x - 112; + int16_t dy = g_led_config.point[i].y - 32; + hsv.s = rgb_matrix_config.sat - time - atan2_8(dy, dx) * 3; + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT diff --git a/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h b/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h new file mode 100644 index 000000000..88cc7d1f2 --- /dev/null +++ b/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h @@ -0,0 +1,22 @@ +#ifndef DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +RGB_MATRIX_EFFECT(BAND_PINWHEEL_VAL) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +bool BAND_PINWHEEL_VAL(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, 0 }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 2); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + int16_t dx = g_led_config.point[i].x - 112; + int16_t dy = g_led_config.point[i].y - 32; + hsv.v = rgb_matrix_config.val - time - atan2_8(dy, dx) * 3; + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL diff --git a/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h b/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h new file mode 100644 index 000000000..44955900a --- /dev/null +++ b/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h @@ -0,0 +1,23 @@ +#ifndef DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +RGB_MATRIX_EFFECT(BAND_SPIRAL_SAT) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +bool BAND_SPIRAL_SAT(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, 0, rgb_matrix_config.val }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 2); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + int16_t dx = g_led_config.point[i].x - 112; + int16_t dy = g_led_config.point[i].y - 32; + uint8_t dist = sqrt16(dx * dx + dy * dy); + hsv.s = rgb_matrix_config.sat + dist - time - atan2_8(dy, dx); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT diff --git a/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h b/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h new file mode 100644 index 000000000..5aea0c8da --- /dev/null +++ b/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h @@ -0,0 +1,23 @@ +#ifndef DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL +RGB_MATRIX_EFFECT(BAND_SPIRAL_VAL) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +bool BAND_SPIRAL_VAL(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, 0 }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 2); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + int16_t dx = g_led_config.point[i].x - 112; + int16_t dy = g_led_config.point[i].y - 32; + uint8_t dist = sqrt16(dx * dx + dy * dy); + hsv.v = rgb_matrix_config.val + dist - time - atan2_8(dy, dx); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL diff --git a/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h b/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h new file mode 100644 index 000000000..59d60ac07 --- /dev/null +++ b/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h @@ -0,0 +1,22 @@ +#ifndef DISABLE_RGB_MATRIX_CYCLE_PINWHEEL +RGB_MATRIX_EFFECT(CYCLE_PINWHEEL) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +bool CYCLE_PINWHEEL(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + int16_t dx = g_led_config.point[i].x - 112; + int16_t dy = g_led_config.point[i].y - 32; + hsv.h = atan2_8(dy, dx) + time; + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_CYCLE_PINWHEEL diff --git a/quantum/rgb_matrix_animations/cycle_spiral_anim.h b/quantum/rgb_matrix_animations/cycle_spiral_anim.h new file mode 100644 index 000000000..865309c25 --- /dev/null +++ b/quantum/rgb_matrix_animations/cycle_spiral_anim.h @@ -0,0 +1,23 @@ +#ifndef DISABLE_RGB_MATRIX_CYCLE_SPIRAL +RGB_MATRIX_EFFECT(CYCLE_SPIRAL) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +bool CYCLE_SPIRAL(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 2); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + int16_t dx = g_led_config.point[i].x - 112; + int16_t dy = g_led_config.point[i].y - 32; + uint8_t dist = sqrt16(dx * dx + dy * dy); + hsv.h = dist - time - atan2_8(dy, dx); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_CYCLE_SPIRAL diff --git a/quantum/rgb_matrix_animations/rgb_matrix_effects.inc b/quantum/rgb_matrix_animations/rgb_matrix_effects.inc index 4b01afaa3..01332ed0d 100644 --- a/quantum/rgb_matrix_animations/rgb_matrix_effects.inc +++ b/quantum/rgb_matrix_animations/rgb_matrix_effects.inc @@ -5,12 +5,18 @@ #include "rgb_matrix_animations/breathing_anim.h" #include "rgb_matrix_animations/colorband_sat_anim.h" #include "rgb_matrix_animations/colorband_val_anim.h" +#include "rgb_matrix_animations/colorband_pinwheel_sat_anim.h" +#include "rgb_matrix_animations/colorband_pinwheel_val_anim.h" +#include "rgb_matrix_animations/colorband_spiral_sat_anim.h" +#include "rgb_matrix_animations/colorband_spiral_val_anim.h" #include "rgb_matrix_animations/cycle_all_anim.h" #include "rgb_matrix_animations/cycle_left_right_anim.h" #include "rgb_matrix_animations/cycle_up_down_anim.h" #include "rgb_matrix_animations/rainbow_moving_chevron_anim.h" #include "rgb_matrix_animations/cycle_out_in_anim.h" #include "rgb_matrix_animations/cycle_out_in_dual_anim.h" +#include "rgb_matrix_animations/cycle_pinwheel_anim.h" +#include "rgb_matrix_animations/cycle_spiral_anim.h" #include "rgb_matrix_animations/dual_beacon_anim.h" #include "rgb_matrix_animations/rainbow_beacon_anim.h" #include "rgb_matrix_animations/rainbow_pinwheels_anim.h" From 5c7b37bbbde969eb056d531c897c1d5f80beeb58 Mon Sep 17 00:00:00 2001 From: Ryan Caltabiano Date: Wed, 15 May 2019 22:23:42 -0500 Subject: [PATCH 072/341] Added custom center point to rgb matrix --- docs/feature_rgb_matrix.md | 6 ++++-- quantum/rgb_matrix.c | 6 ++++++ quantum/rgb_matrix_animations/cycle_out_in_anim.h | 4 ++-- quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h | 4 ++-- quantum/rgb_matrix_animations/dual_beacon_anim.h | 2 +- quantum/rgb_matrix_animations/rainbow_beacon_anim.h | 2 +- quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h | 2 +- 7 files changed, 17 insertions(+), 9 deletions(-) diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 18636776c..8f0cd12b3 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -144,14 +144,16 @@ const led_config_t g_led_config = { { } }; ``` -The first part, `// Key Matrix to LED Index`, tells the system what key this LED represents by using the key's electrical matrix row & col. The second part, `// LED Index to Physical Position` represents the LED's physical position on the keyboard. The first value, `x`, is between 0-224 (inclusive), and the second value, `y`, is between 0-64 (inclusive). This range is due to effect that calculate the center or halves for their animations. The easiest way to calculate these positions is imagine your keyboard is a grid, and the top left of the keyboard represents x, y coordinate 0, 0 and the bottom right of your keyboard represents 224, 64. Using this as a basis, you can use the following formula to calculate the physical position: +The first part, `// Key Matrix to LED Index`, tells the system what key this LED represents by using the key's electrical matrix row & col. The second part, `// LED Index to Physical Position` represents the LED's physical `{ x, y }` position on the keyboard. The default expected range of values for `{ x, y }` is the inclusive range `{ 0..224, 0..64 }`. This default expected range is due to effects that calculate the center of the keyboard for their animations. The easiest way to calculate these positions is imagine your keyboard is a grid, and the top left of the keyboard represents `{ x, y }` coordinate `{ 0, 0 }` and the bottom right of your keyboard represents `{ 224, 64 }`. Using this as a basis, you can use the following formula to calculate the physical position: ```C x = 224 / (NUMBER_OF_COLS - 1) * COL_POSITION y = 64 / (NUMBER_OF_ROWS - 1) * ROW_POSITION ``` -Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout. +Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout. + +As mentioned earlier, the center of the keyboard by default is expected to be `{ 112, 32 }`, but this can be changed if you want to more accurately calculate the LED's physical `{ x, y }` positions. Keyboard designers can implement `#define RGB_MATRIX_CENTER { 112, 32 }` in their config.h file with the new center point of the keyboard, or where they want it to be allowing more possibilities for the `{ x, y }` values. Do note that the maximum value for x or y is 255, and the recommended maximum is 224 as this gives animations runoff room before they reset. `// LED Index to Flag` is a bitmask, whether or not a certain LEDs is of a certain type. It is recommended that LEDs are set to only 1 type. diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index 9b9932df5..a6a9549af 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c @@ -26,6 +26,12 @@ #include "lib/lib8tion/lib8tion.h" +#ifndef RGB_MATRIX_CENTER + const point_t k_rgb_matrix_center = { 112, 32 }; +#else + const point_t k_rgb_matrix_center = RGB_MATRIX_CENTER; +#endif + // ------------------------------------------ // -----Begin rgb effect includes macros----- #define RGB_MATRIX_EFFECT(name) diff --git a/quantum/rgb_matrix_animations/cycle_out_in_anim.h b/quantum/rgb_matrix_animations/cycle_out_in_anim.h index dc9d09fd3..29209e4d7 100644 --- a/quantum/rgb_matrix_animations/cycle_out_in_anim.h +++ b/quantum/rgb_matrix_animations/cycle_out_in_anim.h @@ -9,8 +9,8 @@ bool CYCLE_OUT_IN(effect_params_t* params) { uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); for (uint8_t i = led_min; i < led_max; i++) { RGB_MATRIX_TEST_LED_FLAGS(); - int16_t dx = g_led_config.point[i].x - 112; - int16_t dy = g_led_config.point[i].y - 32; + int16_t dx = g_led_config.point[i].x - k_rgb_matrix_center.x; + int16_t dy = g_led_config.point[i].y - k_rgb_matrix_center.y; uint8_t dist = sqrt16(dx * dx + dy * dy); hsv.h = 3 * dist / 2 + time; RGB rgb = hsv_to_rgb(hsv); diff --git a/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h b/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h index 941e6b9a8..b2f79ceea 100644 --- a/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h +++ b/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h @@ -9,8 +9,8 @@ bool CYCLE_OUT_IN_DUAL(effect_params_t* params) { uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); for (uint8_t i = led_min; i < led_max; i++) { RGB_MATRIX_TEST_LED_FLAGS(); - int16_t dx = 56 - abs8(g_led_config.point[i].x - 112); - int16_t dy = g_led_config.point[i].y - 32; + int16_t dx = (k_rgb_matrix_center.x / 2) - abs8(g_led_config.point[i].x - k_rgb_matrix_center.x); + int16_t dy = g_led_config.point[i].y - k_rgb_matrix_center.y; uint8_t dist = sqrt16(dx * dx + dy * dy); hsv.h = 3 * dist + time; RGB rgb = hsv_to_rgb(hsv); diff --git a/quantum/rgb_matrix_animations/dual_beacon_anim.h b/quantum/rgb_matrix_animations/dual_beacon_anim.h index f853f71ec..59c91046d 100644 --- a/quantum/rgb_matrix_animations/dual_beacon_anim.h +++ b/quantum/rgb_matrix_animations/dual_beacon_anim.h @@ -11,7 +11,7 @@ bool DUAL_BEACON(effect_params_t* params) { int8_t sin_value = sin8(time) - 128; for (uint8_t i = led_min; i < led_max; i++) { RGB_MATRIX_TEST_LED_FLAGS(); - hsv.h = ((g_led_config.point[i].y - 32) * cos_value + (g_led_config.point[i].x - 112) * sin_value) / 128 + rgb_matrix_config.hue; + hsv.h = ((g_led_config.point[i].y - k_rgb_matrix_center.y) * cos_value + (g_led_config.point[i].x - k_rgb_matrix_center.x) * sin_value) / 128 + rgb_matrix_config.hue; RGB rgb = hsv_to_rgb(hsv); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } diff --git a/quantum/rgb_matrix_animations/rainbow_beacon_anim.h b/quantum/rgb_matrix_animations/rainbow_beacon_anim.h index a0e0f814c..564e3c480 100644 --- a/quantum/rgb_matrix_animations/rainbow_beacon_anim.h +++ b/quantum/rgb_matrix_animations/rainbow_beacon_anim.h @@ -11,7 +11,7 @@ bool RAINBOW_BEACON(effect_params_t* params) { int16_t sin_value = 2 * (sin8(time) - 128); for (uint8_t i = led_min; i < led_max; i++) { RGB_MATRIX_TEST_LED_FLAGS(); - hsv.h = ((g_led_config.point[i].y - 32) * cos_value + (g_led_config.point[i].x - 112) * sin_value) / 128 + rgb_matrix_config.hue; + hsv.h = ((g_led_config.point[i].y - k_rgb_matrix_center.y) * cos_value + (g_led_config.point[i].x - k_rgb_matrix_center.x) * sin_value) / 128 + rgb_matrix_config.hue; RGB rgb = hsv_to_rgb(hsv); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } diff --git a/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h b/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h index 275aaa48d..7d189b927 100644 --- a/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h +++ b/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h @@ -11,7 +11,7 @@ bool PINWHEELS(effect_params_t* params) { int16_t sin_value = 3 * (sin8(time) - 128); for (uint8_t i = led_min; i < led_max; i++) { RGB_MATRIX_TEST_LED_FLAGS(); - hsv.h = ((g_led_config.point[i].y - 32) * cos_value + (56 - abs8(g_led_config.point[i].x - 112)) * sin_value) / 128 + rgb_matrix_config.hue; + hsv.h = ((g_led_config.point[i].y - k_rgb_matrix_center.y) * cos_value + (56 - abs8(g_led_config.point[i].x - k_rgb_matrix_center.x)) * sin_value) / 128 + rgb_matrix_config.hue; RGB rgb = hsv_to_rgb(hsv); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } From 56930a0174b685676b8b34cb9f6436db8f8569ae Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Sun, 19 May 2019 11:39:30 -0500 Subject: [PATCH 073/341] [Keyboard] Update LED positions to be more physically accurate for Sol rev1 (#5921) --- keyboards/rgbkb/sol/rev1/config.h | 2 ++ keyboards/rgbkb/sol/rev1/rev1.c | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/keyboards/rgbkb/sol/rev1/config.h b/keyboards/rgbkb/sol/rev1/config.h index 056869daa..51c4bbb65 100644 --- a/keyboards/rgbkb/sol/rev1/config.h +++ b/keyboards/rgbkb/sol/rev1/config.h @@ -32,3 +32,5 @@ along with this program. If not, see . #define RGBLED_NUM 70 #endif #define DRIVER_LED_TOTAL RGBLED_NUM + +#define RGB_MATRIX_CENTER { 112, 35 } diff --git a/keyboards/rgbkb/sol/rev1/rev1.c b/keyboards/rgbkb/sol/rev1/rev1.c index 68e64af79..6ee4b610b 100644 --- a/keyboards/rgbkb/sol/rev1/rev1.c +++ b/keyboards/rgbkb/sol/rev1/rev1.c @@ -16,17 +16,17 @@ led_config_t g_led_config = { { { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 68, 68 } }, { // Left Hand Mapped Left to Right - { 0, 0 }, { 22, 0 }, { 37, 0 }, { 37, 0 }, { 67, 0 }, { 82, 0 }, { 104, 0 }, - { 0, 16 }, { 22, 16 }, { 37, 16 }, { 37, 16 }, { 67, 16 }, { 82, 16 }, { 104, 16 }, - { 0, 32 }, { 22, 32 }, { 37, 32 }, { 37, 32 }, { 67, 32 }, { 82, 32 }, { 104, 32 }, - { 0, 48 }, { 22, 48 }, { 37, 48 }, { 37, 48 }, { 67, 48 }, { 82, 48 }, { 104, 48 }, - { 0, 64 }, { 22, 64 }, { 37, 64 }, { 37, 64 }, { 67, 64 }, { 89, 45 }, { 97, 55 }, + { 0, 0 }, { 21, 0 }, { 38, 0 }, { 56, 0 }, { 73, 0 }, { 91, 0 }, { 112, 0 }, + { 0, 18 }, { 21, 18 }, { 38, 18 }, { 56, 18 }, { 73, 18 }, { 91, 18 }, { 108, 13 }, + { 0, 35 }, { 21, 35 }, { 38, 35 }, { 56, 35 }, { 73, 35 }, { 91, 35 }, { 108, 31 }, + { 0, 52 }, { 21, 52 }, { 38, 52 }, { 56, 52 }, { 73, 52 }, { 91, 52 }, { 108, 48 }, + { 0, 70 }, { 21, 70 }, { 38, 70 }, { 56, 70 }, { 73, 70 }, { 89, 91 }, { 101, 103 }, // Left Hand Mapped Right to Left - { 224, 0 }, { 202, 0 }, { 187, 0 }, { 172, 0 }, { 157, 0 }, { 142, 0 }, { 120, 0 }, - { 224, 16 }, { 202, 16 }, { 187, 16 }, { 172, 16 }, { 157, 16 }, { 142, 16 }, { 120, 16 }, - { 224, 32 }, { 202, 32 }, { 187, 32 }, { 172, 32 }, { 157, 32 }, { 142, 32 }, { 120, 32 }, - { 224, 48 }, { 202, 48 }, { 187, 48 }, { 172, 48 }, { 157, 48 }, { 142, 48 }, { 120, 48 }, - { 224, 64 }, { 202, 64 }, { 187, 64 }, { 172, 64 }, { 157, 64 }, { 135, 45 }, { 127, 55 } + { 224, 0 }, { 203, 0 }, { 186, 0 }, { 168, 0 }, { 151, 0 }, { 133, 0 }, { 112, 0 }, + { 224, 18 }, { 203, 18 }, { 186, 18 }, { 168, 18 }, { 151, 18 }, { 133, 18 }, { 116, 13 }, + { 224, 35 }, { 203, 35 }, { 186, 35 }, { 168, 35 }, { 151, 35 }, { 133, 35 }, { 116, 31 }, + { 224, 52 }, { 203, 52 }, { 186, 52 }, { 168, 52 }, { 151, 52 }, { 133, 52 }, { 116, 48 }, + { 224, 70 }, { 203, 70 }, { 186, 70 }, { 168, 70 }, { 151, 70 }, { 135, 91 }, { 123, 103 }, }, { // Left Hand Mapped Left to Right 1, 4, 4, 4, 4, 4, 1, From 5e7b929717bd6b461816f6800310b2ea90673900 Mon Sep 17 00:00:00 2001 From: coseyfannitutti <43188488+coseyfannitutti@users.noreply.github.com> Date: Sun, 19 May 2019 12:43:10 -0400 Subject: [PATCH 074/341] [Keyboard] Add mullet and mulletpad keyboards (#5878) * Added mullet and mulletpad keyboards * Added mullet and mulletpad keyboards * Update keyboards/coseyfannitutti/mullet/mullet.h Co-Authored-By: fauxpark * Update keyboards/coseyfannitutti/mullet/mullet.h Co-Authored-By: fauxpark * Update keyboards/coseyfannitutti/mullet/mullet.h Co-Authored-By: fauxpark * Update keyboards/coseyfannitutti/mulletpad/mulletpad.h Co-Authored-By: fauxpark * Update keyboards/coseyfannitutti/mulletpad/mulletpad.h Co-Authored-By: fauxpark * Update keyboards/coseyfannitutti/mulletpad/mulletpad.h Co-Authored-By: fauxpark * Update keyboards/coseyfannitutti/mullet/config.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mullet/keymaps/alternate/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mullet/keymaps/default/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mullet/mullet.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * removed unnecessary slashes from keymaps * Update keyboards/coseyfannitutti/mullet/mullet.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mullet/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mullet/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mullet/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mullet/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mulletpad/config.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update config.h * Update keyboards/coseyfannitutti/mulletpad/keymaps/default/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mulletpad/mulletpad.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mulletpad/mulletpad.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mulletpad/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mulletpad/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mulletpad/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * update config.h * Update keyboards/coseyfannitutti/mullet/rules.mk Co-Authored-By: fauxpark * Update keyboards/coseyfannitutti/mulletpad/rules.mk Co-Authored-By: fauxpark * Update keyboards/coseyfannitutti/mulletpad/mulletpad.h Co-Authored-By: fauxpark * Update keyboards/coseyfannitutti/mulletpad/rules.mk Co-Authored-By: fauxpark * Update keyboards/coseyfannitutti/mulletpad/keymaps/default/keymap.c Co-Authored-By: fauxpark * update info.json * Update readme.md update readme.me * Update keyboards/coseyfannitutti/mulletpad/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mulletpad/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mulletpad/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mulletpad/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mulletpad/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- keyboards/coseyfannitutti/mullet/config.h | 172 ++++++++++++++++++ keyboards/coseyfannitutti/mullet/info.json | 12 ++ .../mullet/keymaps/alternate/keymap.c | 68 +++++++ .../mullet/keymaps/default/keymap.c | 68 +++++++ keyboards/coseyfannitutti/mullet/mullet.c | 23 +++ keyboards/coseyfannitutti/mullet/mullet.h | 42 +++++ keyboards/coseyfannitutti/mullet/readme.md | 15 ++ keyboards/coseyfannitutti/mullet/rules.mk | 80 ++++++++ keyboards/coseyfannitutti/mulletpad/config.h | 172 ++++++++++++++++++ keyboards/coseyfannitutti/mulletpad/info.json | 12 ++ .../mulletpad/keymaps/default/keymap.c | 27 +++ .../coseyfannitutti/mulletpad/mulletpad.c | 23 +++ .../coseyfannitutti/mulletpad/mulletpad.h | 42 +++++ keyboards/coseyfannitutti/mulletpad/readme.md | 15 ++ keyboards/coseyfannitutti/mulletpad/rules.mk | 82 +++++++++ 15 files changed, 853 insertions(+) create mode 100644 keyboards/coseyfannitutti/mullet/config.h create mode 100644 keyboards/coseyfannitutti/mullet/info.json create mode 100644 keyboards/coseyfannitutti/mullet/keymaps/alternate/keymap.c create mode 100644 keyboards/coseyfannitutti/mullet/keymaps/default/keymap.c create mode 100644 keyboards/coseyfannitutti/mullet/mullet.c create mode 100644 keyboards/coseyfannitutti/mullet/mullet.h create mode 100644 keyboards/coseyfannitutti/mullet/readme.md create mode 100644 keyboards/coseyfannitutti/mullet/rules.mk create mode 100644 keyboards/coseyfannitutti/mulletpad/config.h create mode 100644 keyboards/coseyfannitutti/mulletpad/info.json create mode 100644 keyboards/coseyfannitutti/mulletpad/keymaps/default/keymap.c create mode 100644 keyboards/coseyfannitutti/mulletpad/mulletpad.c create mode 100644 keyboards/coseyfannitutti/mulletpad/mulletpad.h create mode 100644 keyboards/coseyfannitutti/mulletpad/readme.md create mode 100644 keyboards/coseyfannitutti/mulletpad/rules.mk diff --git a/keyboards/coseyfannitutti/mullet/config.h b/keyboards/coseyfannitutti/mullet/config.h new file mode 100644 index 000000000..527294e51 --- /dev/null +++ b/keyboards/coseyfannitutti/mullet/config.h @@ -0,0 +1,172 @@ +/* +Copyright 2019 COSEYFANNITUTTI + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6969 +#define DEVICE_VER 0x0001 +#define MANUFACTURER coseyfannitutti +#define PRODUCT mullet +#define DESCRIPTION 65% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D0, D1, B0, F0, F1 } +#define MATRIX_COL_PINS { B2, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D2, D3 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D5 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_SLEEP +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +//#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +//#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + diff --git a/keyboards/coseyfannitutti/mullet/info.json b/keyboards/coseyfannitutti/mullet/info.json new file mode 100644 index 000000000..a60888633 --- /dev/null +++ b/keyboards/coseyfannitutti/mullet/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "mullet", + "url": "https://github.com/coseyfannitutti/mullet", + "maintainer": "coseyfannitutti", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Insert", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Page Up", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Page Down", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Fn", "x":11.25, "y":4, "w":1.25}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/coseyfannitutti/mullet/keymaps/alternate/keymap.c b/keyboards/coseyfannitutti/mullet/keymaps/alternate/keymap.c new file mode 100644 index 000000000..21ca2ffb6 --- /dev/null +++ b/keyboards/coseyfannitutti/mullet/keymaps/alternate/keymap.c @@ -0,0 +1,68 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FL 1 + + /* Qwerty + * .---------------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | Del | + * |---------------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | PgUp| + * |---------------------------------------------------------------------------------------------+ + * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | PgDn| + * |---------------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Up | Fn | + * |---------------------------------------------------------------------------------------------+ + * | Ctrl | Win | Alt | Space | RAlt | Fn |||||Left |Down |Right| + * '---------------------------------------------------------------------------------------------' + */ + + /* FnLayer + * .---------------------------------------------------------------------------------------------. + * | ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete | | + * |---------------------------------------------------------------------------------------------+ + * | Tab |STATC|BRTHE|RNBOW|RESET| | | | | | |PrScr| | \ | Home| + * |---------------------------------------------------------------------------------------------+ + * | Caps |RGBH+|RGBS+|RGBB+| | | | | | | | | Enter | End | + * |---------------------------------------------------------------------------------------------+ + * | Shift |RGBH-|RGBS-|RGBB-| | | | |RGBM-|RGBM+|RGBTG| Shift |VolUp| | + * |---------------------------------------------------------------------------------------------+ + * | Ctrl | Win | Alt | | RAlt | Fn ||||| |VolDn| | + * '---------------------------------------------------------------------------------------------' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT( + 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_DEL, + 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_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + 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_UP, MO(_FL), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_LEFT, KC_DOWN, KC_RIGHT), + + [_FL] = LAYOUT( + /* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc delete */ + 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, KC_PSCR, + /* tab Q W E R T Y U I O P [ ] \ pg up */ + KC_TRNS, RGB_M_P, RGB_M_B, RGB_M_R, RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_BSLS, KC_HOME, + /* caps A S D F G H J K L ; ' enter pg dn */ + KC_TRNS, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_END, + /* shift Z X C V B N M , . / shift up fn */ + KC_LSFT, RGB_HUD, RGB_SAD, RGB_VAD,KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE,RGB_RMOD, RGB_MOD, RGB_TOG, KC_RSFT, KC_VOLU, KC_TRNS, + /* ctrl win alt space alt fn left down right */ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS) +}; diff --git a/keyboards/coseyfannitutti/mullet/keymaps/default/keymap.c b/keyboards/coseyfannitutti/mullet/keymaps/default/keymap.c new file mode 100644 index 000000000..07d939dfd --- /dev/null +++ b/keyboards/coseyfannitutti/mullet/keymaps/default/keymap.c @@ -0,0 +1,68 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FL 1 + + /* Qwerty + * .---------------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | Ins | + * |---------------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | Del | + * |---------------------------------------------------------------------------------------------+ + * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | PgUp| + * |---------------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | U | Pgdn| + * |---------------------------------------------------------------------------------------------+ + * | Ctrl | Win | Alt | Space | RAlt | FN ||||| L | D | R | + * '---------------------------------------------------------------------------------------------' + */ + + /* FnLayer + * .---------------------------------------------------------------------------------------------. + * | ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE |PNTSC| + * |---------------------------------------------------------------------------------------------+ + * | Tab |STATC|BRTHE|RNBOW|RESET| | | | | | |PAUSE| | \ | | + * |---------------------------------------------------------------------------------------------+ + * | Caps |RGBH+|RGBS+|RGBB+| | | | | | | | INS | Enter | HOME| + * |---------------------------------------------------------------------------------------------+ + * | Shift |RGBH-|RGBS-|RGBB-| | | | |RGBM-|RGBM+|RGBTG| Shift |VOLUP| END | + * |---------------------------------------------------------------------------------------------+ + * | Ctrl | Win | Alt | | RAlt | FN ||||| L |VOLDN| R | + * '---------------------------------------------------------------------------------------------' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT( + 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_INS, + 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_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + 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_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_LEFT, KC_DOWN, KC_RIGHT), + + [_FL] = LAYOUT( + /* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc insert*/ + 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, KC_PSCR, + /* tab Q W E R T Y U I O P [ ] \ delete*/ + KC_TRNS, RGB_M_P, RGB_M_B, RGB_M_R, RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_BSLS, KC_TRNS, + /* caps A S D F G H J K L ; ' enter pg up*/ + KC_TRNS, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, + /* shift Z X C V B N M , . / shift up pg dn*/ + KC_LSFT, RGB_HUD, RGB_SAD, RGB_VAD,KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE,RGB_RMOD, RGB_MOD, RGB_TOG, KC_RSFT, KC_VOLU, KC_END, + /* ctrl win alt space alt fn left down right*/ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS) +}; diff --git a/keyboards/coseyfannitutti/mullet/mullet.c b/keyboards/coseyfannitutti/mullet/mullet.c new file mode 100644 index 000000000..4f451f3db --- /dev/null +++ b/keyboards/coseyfannitutti/mullet/mullet.c @@ -0,0 +1,23 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#include "mullet.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} diff --git a/keyboards/coseyfannitutti/mullet/mullet.h b/keyboards/coseyfannitutti/mullet/mullet.h new file mode 100644 index 000000000..848fd1922 --- /dev/null +++ b/keyboards/coseyfannitutti/mullet/mullet.h @@ -0,0 +1,42 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define _x_ KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E \ +) { \ +{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ +{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ +{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, _x_, K2D, K2E }, \ +{ K30, _x_, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ +{ K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, _x_, K4A, K4B, K4C, K4D, K4E} \ +} diff --git a/keyboards/coseyfannitutti/mullet/readme.md b/keyboards/coseyfannitutti/mullet/readme.md new file mode 100644 index 000000000..45c17fb5b --- /dev/null +++ b/keyboards/coseyfannitutti/mullet/readme.md @@ -0,0 +1,15 @@ +# mullet + +![mullet](https://i.imgur.com/EBOMbhH.jpg) + +A 68 key keyboard with USB Type-C and RGB underglow + +Keyboard Maintainer: [coseyfannitutti](https://github.com/coseyfannitutti) +Hardware Supported: Mullet, atmega32u4 +Hardware Availability: https://github.com/coseyfannitutti/mullet + +Make example for this keyboard (after setting up your build environment): + + make coseyfannitutti/mullet:default + +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). diff --git a/keyboards/coseyfannitutti/mullet/rules.mk b/keyboards/coseyfannitutti/mullet/rules.mk new file mode 100644 index 000000000..fa02fe6fc --- /dev/null +++ b/keyboards/coseyfannitutti/mullet/rules.mk @@ -0,0 +1,80 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/coseyfannitutti/mulletpad/config.h b/keyboards/coseyfannitutti/mulletpad/config.h new file mode 100644 index 000000000..ad5941055 --- /dev/null +++ b/keyboards/coseyfannitutti/mulletpad/config.h @@ -0,0 +1,172 @@ +/* +Copyright 2019 COSEYFANNITUTTI + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6666 +#define DEVICE_VER 0x0001 +#define MANUFACTURER coseyfannitutti +#define PRODUCT mulletpad +#define DESCRIPTION numpad + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F4, F1, F5, F6, F7 } +#define MATRIX_COL_PINS { F0, C7, C6, B6, } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +//#define RGB_DI_PIN D5 +//#ifdef RGB_DI_PIN +//#define RGBLIGHT_ANIMATIONS +//#define RGBLED_NUM 8 +//#define RGBLIGHT_HUE_STEP 8 +//#define RGBLIGHT_SAT_STEP 8 +//#define RGBLIGHT_VAL_STEP 8 +//#define RGBLIGHT_SLEEP +//#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +//#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +//#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + diff --git a/keyboards/coseyfannitutti/mulletpad/info.json b/keyboards/coseyfannitutti/mulletpad/info.json new file mode 100644 index 000000000..1cfade20d --- /dev/null +++ b/keyboards/coseyfannitutti/mulletpad/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "mulletpad", + "url": "https://github.com/coseyfannitutti/mulletpad", + "maintainer": "coseyfannitutti", + "width": 4, + "height": 5, + "layouts": { + "LAYOUT": { + "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":"+", "x":3, "y":1, "h":2}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"Enter", "x":3, "y":3, "h":2}, {"label":"0", "x":0, "y":4, "w":2}, {"label":".", "x":2, "y":4}] + } + } +} diff --git a/keyboards/coseyfannitutti/mulletpad/keymaps/default/keymap.c b/keyboards/coseyfannitutti/mulletpad/keymaps/default/keymap.c new file mode 100644 index 000000000..ffdc1044d --- /dev/null +++ b/keyboards/coseyfannitutti/mulletpad/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define _BL 0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT_numpad_5x4( + 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 ) +}; diff --git a/keyboards/coseyfannitutti/mulletpad/mulletpad.c b/keyboards/coseyfannitutti/mulletpad/mulletpad.c new file mode 100644 index 000000000..be335cc54 --- /dev/null +++ b/keyboards/coseyfannitutti/mulletpad/mulletpad.c @@ -0,0 +1,23 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#include "mulletpad.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} diff --git a/keyboards/coseyfannitutti/mulletpad/mulletpad.h b/keyboards/coseyfannitutti/mulletpad/mulletpad.h new file mode 100644 index 000000000..41c5c014a --- /dev/null +++ b/keyboards/coseyfannitutti/mulletpad/mulletpad.h @@ -0,0 +1,42 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define _x_ KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_numpad_5x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, \ + K20, K21, K22, K23, \ + K30, K31, K32, \ + K40, K42, K43 \ +) { \ +{ K00, K01, K02, K03, }, \ +{ K10, K11, K12, _x_, }, \ +{ K20, K21, K22, K23, }, \ +{ K30, K31, K32, _x_, }, \ +{ K40, _x_, K42, K43, }, \ +} diff --git a/keyboards/coseyfannitutti/mulletpad/readme.md b/keyboards/coseyfannitutti/mulletpad/readme.md new file mode 100644 index 000000000..9ee49ca96 --- /dev/null +++ b/keyboards/coseyfannitutti/mulletpad/readme.md @@ -0,0 +1,15 @@ +# mulletpad + +![mulletpad](https://i.imgur.com/MHKo5f5.png) + +A 17-key numpad with USB Type-C. + +Keyboard Maintainer: [coseyfannitutti](https://github.com/coseyfannitutti) +Hardware Supported: Mulletpad, atmega32u4 +Hardware Availability: https://github.com/coseyfannitutti/mulletpad + +Make example for this keyboard (after setting up your build environment): + + make coseyfannitutti/mulletpad:default + +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). diff --git a/keyboards/coseyfannitutti/mulletpad/rules.mk b/keyboards/coseyfannitutti/mulletpad/rules.mk new file mode 100644 index 000000000..b3a473ef4 --- /dev/null +++ b/keyboards/coseyfannitutti/mulletpad/rules.mk @@ -0,0 +1,82 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +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 +# 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = numpad_5x4 From 26203401a1748daf664eb3e811aaf9cf0b3a7b5e Mon Sep 17 00:00:00 2001 From: marksard <38324387+marksard@users.noreply.github.com> Date: Mon, 20 May 2019 01:43:58 +0900 Subject: [PATCH 075/341] [Keyboard] Add keyboard treadstone32 (#5888) * Keyboard: add treeadstone48 * rename layout defines * Use of pragma once * move common include code * fixed info.json * change keymap layout from kc to normal * fix alpha revision keymap * fixed info.json * remove USE_Link_Time_Optimization * Added Treadstone32 keyboard. * Fixed some code * Fixed some codes * Fixed config.h * modified review point * Fixed redundant include --- keyboards/treadstone32/config.h | 103 +++++++++++ keyboards/treadstone32/info.json | 175 ++++++++++++++++++ .../treadstone32/keymaps/default/config.h | 58 ++++++ .../treadstone32/keymaps/default/keymap.c | 170 +++++++++++++++++ .../treadstone32/keymaps/default/readme.md | 5 + .../treadstone32/keymaps/default/readme_jp.md | 55 ++++++ .../treadstone32/keymaps/default/rules.mk | 25 +++ .../treadstone32/keymaps/like_jis/config.h | 58 ++++++ .../treadstone32/keymaps/like_jis/keymap.c | 170 +++++++++++++++++ .../treadstone32/keymaps/like_jis/readme.md | 5 + .../keymaps/like_jis/readme_jp.md | 55 ++++++ .../treadstone32/keymaps/like_jis/rules.mk | 25 +++ keyboards/treadstone32/readme.md | 18 ++ keyboards/treadstone32/rules.mk | 64 +++++++ keyboards/treadstone32/treadstone32.c | 43 +++++ keyboards/treadstone32/treadstone32.h | 45 +++++ 16 files changed, 1074 insertions(+) create mode 100644 keyboards/treadstone32/config.h create mode 100644 keyboards/treadstone32/info.json create mode 100644 keyboards/treadstone32/keymaps/default/config.h create mode 100644 keyboards/treadstone32/keymaps/default/keymap.c create mode 100644 keyboards/treadstone32/keymaps/default/readme.md create mode 100644 keyboards/treadstone32/keymaps/default/readme_jp.md create mode 100644 keyboards/treadstone32/keymaps/default/rules.mk create mode 100644 keyboards/treadstone32/keymaps/like_jis/config.h create mode 100644 keyboards/treadstone32/keymaps/like_jis/keymap.c create mode 100644 keyboards/treadstone32/keymaps/like_jis/readme.md create mode 100644 keyboards/treadstone32/keymaps/like_jis/readme_jp.md create mode 100644 keyboards/treadstone32/keymaps/like_jis/rules.mk create mode 100644 keyboards/treadstone32/readme.md create mode 100644 keyboards/treadstone32/rules.mk create mode 100644 keyboards/treadstone32/treadstone32.c create mode 100644 keyboards/treadstone32/treadstone32.h diff --git a/keyboards/treadstone32/config.h b/keyboards/treadstone32/config.h new file mode 100644 index 000000000..6151d6e82 --- /dev/null +++ b/keyboards/treadstone32/config.h @@ -0,0 +1,103 @@ +/* +Copyright 2019 marksard + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xDFA5 +#define DEVICE_VER 0x0010 +#define MANUFACTURER marksard +#define PRODUCT treadstone32 +#define DESCRIPTION Minimal Symmetrical staggered 32-Key Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 5 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F1, F0, E6, B2, B4, D7, D6, D4 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, C7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + +#define RGBLED_NUM 6 + +#ifndef IOS_DEVICE_ENABLE + #define RGBLIGHT_LIMIT_VAL 200 + #define RGBLIGHT_VAL_STEP 17 +#else + #define RGBLIGHT_LIMIT_VAL 50 + #define RGBLIGHT_VAL_STEP 4 +#endif +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) +// USB_MAX_POWER_CONSUMPTION value for treadstone32 keyboard +// 120 RGBoff +// 330 RGB 6 +// 300 RGB 32 + #define USB_MAX_POWER_CONSUMPTION 400 +#else + // fix iPhone and iPad power adapter issue + // iOS device need lessthan 100 + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + +/* + * Feature disable options + * 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_FUNCTION diff --git a/keyboards/treadstone32/info.json b/keyboards/treadstone32/info.json new file mode 100644 index 000000000..2ac18be86 --- /dev/null +++ b/keyboards/treadstone32/info.json @@ -0,0 +1,175 @@ +{ + "keyboard_name": "Treadstone32", + "url": "https://github.com/marksard/Keyboards", + "maintainer": "marksard", + "width": 10.5, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + { + "label": "Q", + "x": 0, + "y": 0 + }, + { + "label": "W", + "x": 1, + "y": 0 + }, + { + "label": "E", + "x": 2, + "y": 0 + }, + { + "label": "R", + "x": 3, + "y": 0 + }, + { + "label": "T", + "x": 4, + "y": 0 + }, + { + "label": "Y", + "x": 5.5, + "y": 0 + }, + { + "label": "U", + "x": 6.5, + "y": 0 + }, + { + "label": "I", + "x": 7.5, + "y": 0 + }, + { + "label": "O", + "x": 8.5, + "y": 0 + }, + { + "label": "P", + "x": 9.5, + "y": 0 + }, + { + "label": "A", + "x": 0.25, + "y": 1 + }, + { + "label": "S", + "x": 1.25, + "y": 1 + }, + { + "label": "D", + "x": 2.25, + "y": 1 + }, + { + "label": "F", + "x": 3.25, + "y": 1 + }, + { + "label": "G", + "x": 4.25, + "y": 1 + }, + { + "label": "H", + "x": 5.25, + "y": 1 + }, + { + "label": "J", + "x": 6.25, + "y": 1 + }, + { + "label": "K", + "x": 7.25, + "y": 1 + }, + { + "label": "L", + "x": 8.25, + "y": 1 + }, + { + "label": "enter", + "x": 9.25, + "y": 1 + }, + { + "label": "Z", + "x": 0, + "y": 2 + }, + { + "label": "X", + "x": 1, + "y": 2 + }, + { + "label": "C", + "x": 2, + "y": 2 + }, + { + "label": "V", + "x": 3, + "y": 2 + }, + { + "label": "B", + "x": 4, + "y": 2 + }, + { + "label": "N", + "x": 5.5, + "y": 2 + }, + { + "label": "M", + "x": 6.5, + "y": 2 + }, + { + "label": ",", + "x": 7.5, + "y": 2 + }, + { + "label": ".", + "x": 8.5, + "y": 2 + }, + { + "label": "/", + "x": 9.5, + "y": 2 + }, + { + "label": "backspace", + "x": 3.25, + "y": 3, + "w": 2 + }, + { + "label": "space", + "x": 5.25, + "y": 3, + "w": 2 + } + ] + } + } +} diff --git a/keyboards/treadstone32/keymaps/default/config.h b/keyboards/treadstone32/keymaps/default/config.h new file mode 100644 index 000000000..a6363f9b9 --- /dev/null +++ b/keyboards/treadstone32/keymaps/default/config.h @@ -0,0 +1,58 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +// place overrides here +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT + +#define TAPPING_LAYER_TERM 150 // Custom LT Tapping term +#define TAPPING_TERM_PER_KEY + +#ifdef MOUSEKEY_ENABLE + #undef MOUSEKEY_INTERVAL + #define MOUSEKEY_INTERVAL 1 + + #undef MOUSEKEY_TIME_TO_MAX + #define MOUSEKEY_TIME_TO_MAX 150 + + #undef MOUSEKEY_MAX_SPEED + #define MOUSEKEY_MAX_SPEED 3 + + #undef MOUSEKEY_MOVE_DELTA + #define MOUSEKEY_MOVE_DELTA 4 + + #undef MOUSEKEY_DELAY + #define MOUSEKEY_DELAY 0 +#endif + +// Selection of RGBLIGHT MODE to use. +#if defined(LED_ANIMATIONS) + //#define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + //#define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT + //#define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + //#define RGBLIGHT_EFFECT_RGB_TEST + //#define RGBLIGHT_EFFECT_ALTERNATING +#endif diff --git a/keyboards/treadstone32/keymaps/default/keymap.c b/keyboards/treadstone32/keymaps/default/keymap.c new file mode 100644 index 000000000..a7b908c9d --- /dev/null +++ b/keyboards/treadstone32/keymaps/default/keymap.c @@ -0,0 +1,170 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +// 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. +enum layer_number { + _BASE = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGBRST = SAFE_RANGE, + LOWER, + RAISE, + KANJI, +}; + +// enum tapdances{ +// TD_CODO = 0, +// TD_SLRO, +// }; + +// Layer Mode aliases +#define KC_MLAD MO(_ADJUST) + +// Base layer mod tap +#define KC_A_SF LSFT_T(KC_A) +#define KC_Z_CT LCTL_T(KC_Z) +#define KC_X_AL LALT_T(KC_X) +#define KC_C_GU LGUI_T(KC_C) +#define KC_SSCT LCTL_T(KC_SLSH) +#define KC_ENSF LSFT_T(KC_ENT) + +// Lower layer mod tap +#define KC_F6SF LSFT_T(KC_F6) +#define KC_BSSF LSFT_T(KC_BSLS) +#define KC_11CT LCTL_T(KC_F11) +#define KC_12AL LALT_T(KC_F12) + +// Layer tap +#define KC_BSLO LT(_LOWER, KC_BSPC) +#define KC_SPRA LT(_RAISE, KC_SPC) + +// Tap dance +// #define KC_CODO TD(TD_CODO) +// #define KC_SLRO TD(TD_SLRO) + +// qk_tap_dance_action_t tap_dance_actions[] = { +// [TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT), +// [TD_SLRO] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_RO), +// }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + //,---------------------------------------------------------------------------------------------------. + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_A_SF, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_Z_CT, KC_X_AL, KC_C_GU, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SSCT, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + KC_BSLO, KC_SPRA + // `---------|---------' + ), + + [_LOWER] = LAYOUT( + //,---------------------------------------------------------------------------------------------------. + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_F6SF, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_11CT, KC_12AL, KC_ESC, KC_TAB, KANJI, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, KC_GRV, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + _______, KC_MLAD + // `---------|---------' + ), + + [_RAISE] = LAYOUT( + //,---------------------------------------------------------------------------------------------------. + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LSFT, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, KC_MINS, KC_RO, KC_COMM, KC_DOT, KC_SSCT, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + _______, _______ + // `---------|---------' + ), + + [_ADJUST] = LAYOUT( + //,---------------------------------------------------------------------------------------------------. + RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + _______, _______ + // `---------|---------' + ) +}; + +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case KC_BSLO: + return TAPPING_LAYER_TERM; + case KC_SPRA: + return TAPPING_LAYER_TERM; + default: + return TAPPING_TERM; + } +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case KANJI: + if (record->event.pressed) { + if (keymap_config.swap_lalt_lgui == false) { + register_code(KC_LANG2); + } else { + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG2); + } + break; + #ifdef RGBLIGHT_ENABLE + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void keyboard_post_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif +} diff --git a/keyboards/treadstone32/keymaps/default/readme.md b/keyboards/treadstone32/keymaps/default/readme.md new file mode 100644 index 000000000..387efc0d4 --- /dev/null +++ b/keyboards/treadstone32/keymaps/default/readme.md @@ -0,0 +1,5 @@ +# Default keymap for treadstone32 + +## Description + +## How to use diff --git a/keyboards/treadstone32/keymaps/default/readme_jp.md b/keyboards/treadstone32/keymaps/default/readme_jp.md new file mode 100644 index 000000000..ff078dcc8 --- /dev/null +++ b/keyboards/treadstone32/keymaps/default/readme_jp.md @@ -0,0 +1,55 @@ +# US配列ライクデフォルトキーマップ + +## 概要 + + US配列ライクなデフォルトキーマップです。 + +## キーマップの見かた + +qmk_firmware\tmk_core\common\keycode.h +に基本的なキーコードがあります。また、Keymap.cの上部にカスタムしたKC_で始まるものを登録しています。 + +Leyer Tap、Mod TapというQMKの機能を使っています。 + +Layer Tapはタップで指定したキー、長押しで指定したレイヤーに移動します。 +例:LT(RAISE, KC_V) → タップでV、長押しでRAISEレイヤー移動 + +Mod Tapはタップで視程したキー、長押しで視程したレイヤーに移動します。 +例:LSFT_T(KC_Z) → タップでZ、長押しで左シフト + +もう少し詳しい内容についてはQMK Documentをお読みいただくかネットを検索すれば情報が載っていますので別途検索してみてください。 + +## 機能 + + QWERTYキーマップをベースにしていて、LowerレイヤーとRaiseレイヤーに他のキーを配置しています。 + Lowerを最初し続けながらRaiseを同時押しするとAdjustレイヤーを使うことが出来ます。 + +## OS切り替え方法 + + Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + +- KNRM: QMKのノーマル状態です。macだと正常に使える(はず)です +- KSWP: ノーマル状態のままWindowsで使用するとALTキーとGUI(win)キーが逆ですので、それを入れ換えます。Windowsユーザーはこちらのモードにしてください + +## IME切り替え方法 + + Winの場合、LowerレイヤーにKANJIキー(半角/全角 漢字)がありますので、Lower+KANJIで切り替えてください。 + +## ソフトウェアリセットについて + + キーボードにはハードウェアのリセットボタンが付いていますが、ソフトウェアリセットをかけられます。 + LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来、AdjustレイヤーのRESETを押下するとリセットがかかります。 + +## LEDの点灯切り替え方法 + + Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + +- RGBRST: LEDのリセット +- RGB_TOG: LEDのON/OFF切り替え +- RGB_MOD: LEDの光り方の変更 +- RGB_HUI: Hue+ 色合いを変更 +- RGB_HUD: Hue- 色合いを変更 +- RGB_SAI: Saturation+ 色の濃さを変更 +- RGB_SAD: Saturation- 色の濃さを変更 +- RGB_VAI: Value+ 明るさを変更 +- RGB_VAD: Value- 明るさを変更 diff --git a/keyboards/treadstone32/keymaps/default/rules.mk b/keyboards/treadstone32/keymaps/default/rules.mk new file mode 100644 index 000000000..8c4541fa1 --- /dev/null +++ b/keyboards/treadstone32/keymaps/default/rules.mk @@ -0,0 +1,25 @@ + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +TAP_DANCE_ENABLE = no + +# If your custom treadstone32 pcb, you can rewrite to yes. +RGBLIGHT_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations + +# Other selectable option +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + # OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/treadstone32/keymaps/like_jis/config.h b/keyboards/treadstone32/keymaps/like_jis/config.h new file mode 100644 index 000000000..a6363f9b9 --- /dev/null +++ b/keyboards/treadstone32/keymaps/like_jis/config.h @@ -0,0 +1,58 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +// place overrides here +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT + +#define TAPPING_LAYER_TERM 150 // Custom LT Tapping term +#define TAPPING_TERM_PER_KEY + +#ifdef MOUSEKEY_ENABLE + #undef MOUSEKEY_INTERVAL + #define MOUSEKEY_INTERVAL 1 + + #undef MOUSEKEY_TIME_TO_MAX + #define MOUSEKEY_TIME_TO_MAX 150 + + #undef MOUSEKEY_MAX_SPEED + #define MOUSEKEY_MAX_SPEED 3 + + #undef MOUSEKEY_MOVE_DELTA + #define MOUSEKEY_MOVE_DELTA 4 + + #undef MOUSEKEY_DELAY + #define MOUSEKEY_DELAY 0 +#endif + +// Selection of RGBLIGHT MODE to use. +#if defined(LED_ANIMATIONS) + //#define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + //#define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT + //#define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + //#define RGBLIGHT_EFFECT_RGB_TEST + //#define RGBLIGHT_EFFECT_ALTERNATING +#endif diff --git a/keyboards/treadstone32/keymaps/like_jis/keymap.c b/keyboards/treadstone32/keymaps/like_jis/keymap.c new file mode 100644 index 000000000..891f48446 --- /dev/null +++ b/keyboards/treadstone32/keymaps/like_jis/keymap.c @@ -0,0 +1,170 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +// 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. +enum layer_number { + _BASE = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGBRST = SAFE_RANGE, + LOWER, + RAISE, + KANJI, +}; + +// enum tapdances{ +// TD_CODO = 0, +// TD_SLRO, +// }; + +// Layer Mode aliases +#define KC_MLAD MO(_ADJUST) + +// Base layer mod tap +#define KC_A_SF LSFT_T(KC_A) +#define KC_Z_CT LCTL_T(KC_Z) +#define KC_X_AL LALT_T(KC_X) +#define KC_C_GU LGUI_T(KC_C) +#define KC_SSCT LCTL_T(KC_SLSH) +#define KC_ENSF LSFT_T(KC_ENT) + +// Lower layer mod tap +#define KC_F6SF LSFT_T(KC_F6) +#define KC_BSSF LSFT_T(KC_BSLS) +#define KC_11CT LCTL_T(KC_F11) +#define KC_12AL LALT_T(KC_F12) + +// Layer tap +#define KC_BSLO LT(_LOWER, KC_BSPC) +#define KC_SPRA LT(_RAISE, KC_SPC) + +// Tap dance +// #define KC_CODO TD(TD_CODO) +// #define KC_SLRO TD(TD_SLRO) + +// qk_tap_dance_action_t tap_dance_actions[] = { +// [TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT), +// [TD_SLRO] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_RO), +// }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + //,---------------------------------------------------------------------------------------------------. + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_A_SF, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_Z_CT, KC_X_AL, KC_C_GU, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SSCT, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + KC_BSLO, KC_SPRA + // `---------|---------' + ), + + [_LOWER] = LAYOUT( + //,---------------------------------------------------------------------------------------------------. + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_F6SF, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, KC_BSSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_11CT, KC_12AL, KC_ESC, KC_TAB, KANJI, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, KC_RO, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + _______, KC_MLAD + // `---------|---------' + ), + + [_RAISE] = LAYOUT( + //,---------------------------------------------------------------------------------------------------. + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LSFT, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, KC_MINS, KC_RO, KC_COMM, KC_DOT, KC_SSCT, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + _______, _______ + // `---------|---------' + ), + + [_ADJUST] = LAYOUT( + //,---------------------------------------------------------------------------------------------------. + RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + _______, _______ + // `---------|---------' + ) +}; + +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case KC_BSLO: + return TAPPING_LAYER_TERM; + case KC_SPRA: + return TAPPING_LAYER_TERM; + default: + return TAPPING_TERM; + } +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case KANJI: + if (record->event.pressed) { + if (keymap_config.swap_lalt_lgui == false) { + register_code(KC_LANG2); + } else { + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG2); + } + break; + #ifdef RGBLIGHT_ENABLE + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void keyboard_post_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif +} diff --git a/keyboards/treadstone32/keymaps/like_jis/readme.md b/keyboards/treadstone32/keymaps/like_jis/readme.md new file mode 100644 index 000000000..206133ee7 --- /dev/null +++ b/keyboards/treadstone32/keymaps/like_jis/readme.md @@ -0,0 +1,5 @@ +# The like jis type keyboard keymap for treadstone32 + +## Description + +## How to use diff --git a/keyboards/treadstone32/keymaps/like_jis/readme_jp.md b/keyboards/treadstone32/keymaps/like_jis/readme_jp.md new file mode 100644 index 000000000..3242f101e --- /dev/null +++ b/keyboards/treadstone32/keymaps/like_jis/readme_jp.md @@ -0,0 +1,55 @@ +# JISキーボードライクなキーマップ + +## 概要 + + デフォルトキーマップの記号類をJISライクな配置に揃えなおしたものです。 + +## キーマップの見かた + +qmk_firmware\tmk_core\common\keycode.h +に基本的なキーコードがあります。また、Keymap.cの上部にカスタムしたKC_で始まるものを登録しています。 + +Leyer Tap、Mod TapというQMKの機能を使っています。 + +Layer Tapはタップで指定したキー、長押しで指定したレイヤーに移動します。 +例:LT(RAISE, KC_V) → タップでV、長押しでRAISEレイヤー移動 + +Mod Tapはタップで視程したキー、長押しで視程したレイヤーに移動します。 +例:LSFT_T(KC_Z) → タップでZ、長押しで左シフト + +もう少し詳しい内容についてはQMK Documentをお読みいただくかネットを検索すれば情報が載っていますので別途検索してみてください。 + +## 機能 + + QWERTYキーマップをベースにしていて、LowerレイヤーとRaiseレイヤーに他のキーを配置しています。 + Lowerを最初し続けながらRaiseを同時押しするとAdjustレイヤーを使うことが出来ます。 + +## OS切り替え方法 + + Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + +- KNRM: QMKのノーマル状態です。macだと正常に使える(はず)です +- KSWP: ノーマル状態のままWindowsで使用するとALTキーとGUI(win)キーが逆ですので、それを入れ換えます。Windowsユーザーはこちらのモードにしてください + +## IME切り替え方法 + + Winの場合、LowerレイヤーにKANJIキー(半角/全角 漢字)がありますので、Lower+KANJIで切り替えてください。 + +## ソフトウェアリセットについて + + キーボードにはハードウェアのリセットボタンが付いていますが、ソフトウェアリセットをかけられます。 + LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来、AdjustレイヤーのRESETを押下するとリセットがかかります。 + +## LEDの点灯切り替え方法 + + Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + +- RGBRST: LEDのリセット +- RGB_TOG: LEDのON/OFF切り替え +- RGB_MOD: LEDの光り方の変更 +- RGB_HUI: Hue+ 色合いを変更 +- RGB_HUD: Hue- 色合いを変更 +- RGB_SAI: Saturation+ 色の濃さを変更 +- RGB_SAD: Saturation- 色の濃さを変更 +- RGB_VAI: Value+ 明るさを変更 +- RGB_VAD: Value- 明るさを変更 diff --git a/keyboards/treadstone32/keymaps/like_jis/rules.mk b/keyboards/treadstone32/keymaps/like_jis/rules.mk new file mode 100644 index 000000000..8c4541fa1 --- /dev/null +++ b/keyboards/treadstone32/keymaps/like_jis/rules.mk @@ -0,0 +1,25 @@ + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +TAP_DANCE_ENABLE = no + +# If your custom treadstone32 pcb, you can rewrite to yes. +RGBLIGHT_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations + +# Other selectable option +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + # OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/treadstone32/readme.md b/keyboards/treadstone32/readme.md new file mode 100644 index 000000000..989a29c20 --- /dev/null +++ b/keyboards/treadstone32/readme.md @@ -0,0 +1,18 @@ +# treadstone32 + +![treadstone32](https://github.com/marksard/Keyboards/raw/master/_image/20190421-P4210001.jpg) + +A 32-key Symmetric staggered keyboard. + +Keyboard Maintainer: [marksard](https://github.com/marksard) +Hardware Supported: The PCBs, controllers supported +Hardware Availability: links to where you can find this hardware + +Make example for this keyboard (after setting up your build environment): + + make treadstone32:default:dfu + +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). + +[Build guide](https://github.com/marksard/Keyboards/blob/master/treadstone32/documents/treadstone32_buildguide.md) +[Firmware](https://github.com/marksard/qmk_firmware/tree/my_customize/keyboards/treadstone32) diff --git a/keyboards/treadstone32/rules.mk b/keyboards/treadstone32/rules.mk new file mode 100644 index 000000000..1d37dfc69 --- /dev/null +++ b/keyboards/treadstone32/rules.mk @@ -0,0 +1,64 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +LEADER_ENABLE = no + diff --git a/keyboards/treadstone32/treadstone32.c b/keyboards/treadstone32/treadstone32.c new file mode 100644 index 000000000..9d27f86ff --- /dev/null +++ b/keyboards/treadstone32/treadstone32.c @@ -0,0 +1,43 @@ +/* Copyright 2019 marksard + * + * 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 . + */ +#include "treadstone32.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/treadstone32/treadstone32.h b/keyboards/treadstone32/treadstone32.h new file mode 100644 index 000000000..90181124c --- /dev/null +++ b/keyboards/treadstone32/treadstone32.h @@ -0,0 +1,45 @@ +/* Copyright 2019 marksard. + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define K_N KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + L09, L08, L07, L06, L05, L04, L03, L02, L01, L00, \ + L19, L18, L17, L16, L15, L14, L13, L12, L11, L10, \ + L29, L28, L27, L26, L25, L24, L23, L22, L21, L20, \ + L35, L34 \ + ) \ + { \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { K_N, K_N, K_N, K_N, L34 }, \ + { L05, L06, L07, L08, L09 }, \ + { L15, L16, L17, L18, L19 }, \ + { L25, L26, L27, L28, L29 }, \ + { L35, K_N, K_N, K_N, K_N } \ + } From e0ecc53f4e0852796e16b170851fa396ab9ae854 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Mon, 20 May 2019 02:46:41 +1000 Subject: [PATCH 076/341] Make DEBUG keycode disable as well as enable (#5898) * Make DEBUG keycode disable as well as enable * print() can always be used regardless of debug_enable state --- quantum/quantum.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index 473ead65f..23263b700 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -312,8 +312,12 @@ bool process_record_quantum(keyrecord_t *record) { return false; case DEBUG: if (record->event.pressed) { - debug_enable = true; + debug_enable ^= 1; + if (debug_enable) { print("DEBUG: enabled.\n"); + } else { + print("DEBUG: disabled.\n"); + } } return false; case EEPROM_RESET: From 11c7cd47aee697ac73bf7ec5704086e2a15d7dca Mon Sep 17 00:00:00 2001 From: jotix <47826561+jotix@users.noreply.github.com> Date: Sun, 19 May 2019 13:49:23 -0300 Subject: [PATCH 077/341] [Keymap] jotix ortho_4x12_layout tweakings (#5904) * jotix ortho_4x12_layout tweakings * jotix ortho_4x12_layout tweakings --- layouts/community/ortho_4x12/jotix/keymap.c | 71 +++++++++++++-------- 1 file changed, 46 insertions(+), 25 deletions(-) diff --git a/layouts/community/ortho_4x12/jotix/keymap.c b/layouts/community/ortho_4x12/jotix/keymap.c index cd5413da7..faaa0d0ee 100644 --- a/layouts/community/ortho_4x12/jotix/keymap.c +++ b/layouts/community/ortho_4x12/jotix/keymap.c @@ -7,12 +7,16 @@ extern keymap_config_t keymap_config; // 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 _QWERTY 0 -#define _FN 1 -#define _UNICODE 2 -#define _ADJUST 3 +enum layers { + _QWERTY, + _LOWER, + _RAISE, + _UNICODE, + _ADJUST, +}; -#define FN MO(_FN) +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) #define UNICODE MO(_UNICODE) enum unicode_names { @@ -112,8 +116,7 @@ const uint32_t PROGMEM unicode_map[] = { #define U_UNIC XP(UACUTE, UACUTE_M) #define Y_UNIC XP(UDIER, UDIER_M ) #define N_UNIC XP(NTILDE, NTILDE_M) - -#define TAB_UNI LT(_UNICODE, KC_TAB) +#define ORD_UN XP(ORDF, ORDM) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -121,36 +124,54 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * | esc | Q | W | E | R | T | Y | U | I | O | P | bksp | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * |tab/unic| A | S | D | F | G | H | J | K | L | ; | ' | + * | tab | A | S | D | F | G | H | J | K | L | ; | del | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | lshift | Z | X | C | V | B | N | M | , | . | / | enter | + * | lshift | Z | X | C | V | B | N | M | , | . | up | enter | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | lctrl | lalt | caps | del | lgui | space | space | fn | left | down | up | right | + * | lctrl | lalt | lower | unic | lgui | space | space | raise | / | left | down | right | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ */ [_QWERTY] = LAYOUT_ortho_4x12 ( KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - TAB_UNI, 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_ENT, - KC_LCTL, KC_LALT, KC_CAPS, KC_DEL, KC_LGUI, KC_SPC, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_DEL, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT, + KC_LCTL, KC_LALT, LOWER, UNICODE, KC_LGUI, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT ), -/* fn +/* Lower + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | F1 | F2 | F3 | F4 | | | 7 | 8 | 9 | - | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | F5 | F6 | F7 | F8 | | | 4 | 5 | 6 | + | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | F9 | F10 | F11 | F12 | | nlck | 1 | 2 | 3 | / | pent | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | | | | | | | | 0 | . | * | ; | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + */ +[_LOWER] = LAYOUT_ortho_4x12 ( + _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, + _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, + _______, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_NLCK, KC_P1, KC_P2, KC_P3, KC_PSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PAST, KC_SCLN +), + +/* Raise * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * | caps | | | | | | \ | - | = | [ | ] | | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | F7 | F8 | F9 | F10 | F11 | F12 | ` | | | | | + * | | | | | | | ` | | | | pgup | | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | | | | | | | | home | pgdn | pgun | end | + * | | | | | | | | | | home | pgdn | end | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ */ -[_FN] = LAYOUT_ortho_4x12 ( +[_RAISE] = LAYOUT_ortho_4x12 ( _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_GRV, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END + KC_CAPS, _______, _______, _______, _______, _______, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, _______, _______, _______, _______, _______, KC_GRV, KC_QUOT, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END ), /* @@ -158,9 +179,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_UNICODE] = LAYOUT_ortho_4x12 ( _______, X(EXCL), X(WORR), E_UNIC, X(EURO), X(TONG), Y_UNIC, U_UNIC, I_UNIC, O_UNIC, X(POUN), _______, - _______, A_UNIC, X(SMIL), X(DISS), X(SCRE), X(DEGR), X(SMIH), X(NOT), X(QUAR), X(HALF), X(ORDF), X(ORDM), - _______, X(DIZY), X(ANGR), X(COPY), X(QUAD), X(CUBE), N_UNIC, X(NEUT), X(LDQU), X(RDQU), X(QUES), _______, - _______, _______, _______, _______, _______, _______, _______, _______, X(ARRL), X(ARRD), X(ARRU), X(ARRR) + _______, A_UNIC, X(SMIL), X(DISS), X(SCRE), X(DEGR), X(SMIH), X(NOT), X(QUAR), X(HALF), ORD_UN, _______, + _______, X(DIZY), X(ANGR), X(COPY), X(QUAD), X(CUBE), N_UNIC, X(NEUT), X(LDQU), X(RDQU), X(ARRU), _______, + _______, _______, _______, _______, _______, _______, _______, _______, X(QUES), X(ARRL), X(ARRD), X(ARRR) ), /* @@ -175,7 +196,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; uint32_t layer_state_set_user(uint32_t state) { - return update_tri_layer_state(state, _FN, _UNICODE, _ADJUST); + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } void matrix_init_user(void) { From d67eb20aed97410e11a17f7f5799d822f98a7558 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sun, 19 May 2019 09:50:57 -0700 Subject: [PATCH 078/341] [Keyboard] Pearl Refactors (#5907) * use pragma once * remove custom matrix * remove custom i2c code in favor of QMK's i2c_master * rename to all lower case readme * update readme * turn off bootmagic as it doesn't work anyway * Update keyboards/pearl/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- keyboards/pearl/README.md | 85 ----------------------------- keyboards/pearl/config.h | 4 +- keyboards/pearl/i2c.c | 106 ------------------------------------ keyboards/pearl/i2c.h | 27 --------- keyboards/pearl/matrix.c | 106 ------------------------------------ keyboards/pearl/pearl.c | 71 +++++++++++++++++------- keyboards/pearl/pearl.h | 6 +- keyboards/pearl/readme.md | 47 ++++++++++++++++ keyboards/pearl/rules.mk | 5 +- keyboards/pearl/usbconfig.h | 5 +- 10 files changed, 104 insertions(+), 358 deletions(-) delete mode 100644 keyboards/pearl/README.md delete mode 100644 keyboards/pearl/i2c.c delete mode 100644 keyboards/pearl/i2c.h delete mode 100644 keyboards/pearl/matrix.c create mode 100644 keyboards/pearl/readme.md diff --git a/keyboards/pearl/README.md b/keyboards/pearl/README.md deleted file mode 100644 index ec54ba80f..000000000 --- a/keyboards/pearl/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# Pearl 40% - -Pearl 40% is a keyboard designed by Koobaczech. It uses an Atmel -ATMEGA32A MCU. - -## Compiling and flashing - -These instructions are for building and flashing your Pearl 40% without -Bootmapper Client. - -### Requirements - -#### Windows - -(to be written, help needed) - -#### Mac - -Apart from regular QMK and AVR dependencies you need to install -`bootloadHID`. You can install it with `homebrew` as follows: - - $ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb - -If you don't use `homebrew` you can try following the compiling -instructions defined below in the Linux section. - -#### Linux - -For Linux you require all regular QMK dependencies, but make sure you're -using `gcc-avr` version 4.9 or higher. 4.8 and lower do not contain the -proper definitions for ATMEGA32A MCUs and QMK will fail while attempting -to compile a HEX for Pearl 40%. - -E.g. you cannot compile Pearl 40% HEX on a regular Ubuntu 14.04 as -`gcc-avr` version is maxed to 4.8 on it. - -Additionally you need an operational `bootloadHID` binary. - -You can install `bootloadHID` by taking the following steps: - - $ git clone https://github.com/robertgzr/bootloadHID ~/tmp/bootloadHIDsrc - $ cd ~/tmp/bootloadHIDsrc/commandline - $ make VENDORID=0x16c0 PRODUCTID=0x05DF # vid and pid for atmega32a - $ chmod +x bootloadHID && cp bootloadHID /usr/bin/bootloadHID - -Running `which bootloadHID` should return `/usr/bin/bootloadHID`. - -### Compiling - -Enter the QMK root directory and compile a keymap with the following -command: - - $ make pearl: - -where `` is a layout directory under the `pearl` directory. - -QMK should compile a HEX (called `pearl_.hex`) for you, which -you can flash using `bootloadHID`. - -### Flashing - -To enable Pearl 40% bootloading mode, unplug the keyboard, then plug it -in while holding `Esc` at the same time (the top-leftmost switch on the -PCB, next to the USB connector). Once the board is in bootload mode, -issue the following command (you might require `sudo` to perform the -command): - - # assuming we're still in the QMK root dir where you compiled a HEX into - $ bootloadHID -r ./pearl_.hex - -You should see something similar to - - > Page size = - > Device size = ; remaining - > Uploading bytes starting at 0 (0x0) - > ... - -where `` should be slowly increasing as the HEX is being -flashed to the board. If there is some warning about `resource busy` it -should still work OK. - -Once done the board underglow should turn red and the new firmware has -been flashed. If you can't type on the board try plugging it in again -(without holding any keys to prevent accidentally setting it into -bootload mode again). diff --git a/keyboards/pearl/config.h b/keyboards/pearl/config.h index 6edf170d9..00850b8f0 100644 --- a/keyboards/pearl/config.h +++ b/keyboards/pearl/config.h @@ -35,8 +35,8 @@ along with this program. If not, see . #define MATRIX_ROWS 4 #define MATRIX_COLS 13 -#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } -#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6} +#define MATRIX_ROW_PINS { B0, B1, B2, B3 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3} #define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pearl/i2c.c b/keyboards/pearl/i2c.c deleted file mode 100644 index a4f952135..000000000 --- a/keyboards/pearl/i2c.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -// Please do not modify this file - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -// Please do not modify this file - -#ifndef __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/pearl/matrix.c b/keyboards/pearl/matrix.c deleted file mode 100644 index 57aa36b5f..000000000 --- a/keyboards/pearl/matrix.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 . -*/ - -#include -#include - -#include "matrix.h" - -#ifndef DEBOUNCE -#define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -uint8_t matrix_scan(void) { - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - matrix_set_row_status(row); - _delay_us(5); - - matrix_row_t cols = ( - // cols 0..7, PORTA 0 -> 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_user(); - - return 1; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/pearl/pearl.c b/keyboards/pearl/pearl.c index 3bbadb0a7..c8cd8a860 100644 --- a/keyboards/pearl/pearl.c +++ b/keyboards/pearl/pearl.c @@ -15,16 +15,11 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "pearl.h" #include "rgblight.h" -#include "backlight.h" - -#include - -#include "action_layer.h" -#include "i2c.h" +#include "i2c_master.h" #include "quantum.h" +#ifdef RGBLIGHT_ENABLE extern rgblight_config_t rgblight_config; void rgblight_set(void) { @@ -37,23 +32,59 @@ void rgblight_set(void) { } i2c_init(); - i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); +} +#endif + +void matrix_init_kb(void) { +#ifdef RGBLIGHT_ENABLE + if (rgblight_config.enable) { + i2c_init(); + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); + } +#endif + // call user level keymaps, if any + matrix_init_user(); } -void backlight_init_ports(void) { - DDRD |= (1<<4); - PORTD &= ~(1<<4); -} - -void backlight_set(uint8_t level) { - if (level > 0) { - PORTD |= (1<<4); - } else { - PORTD &= ~(1<<4); - } +void matrix_scan_kb(void) { +#ifdef RGBLIGHT_ENABLE + rgblight_task(); +#endif + matrix_scan_user(); + /* Nothing else for now. */ } __attribute__ ((weak)) void matrix_scan_user(void) { - rgblight_task(); } + +void backlight_init_ports(void) { + // initialize pins D0, D1, D4 and D6 as output + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + // turn backlight LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); +} + +void backlight_set(uint8_t level) { + if (level == 0) { + // turn backlight LEDs off + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); + } else { + // turn backlight LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); + } +} \ No newline at end of file diff --git a/keyboards/pearl/pearl.h b/keyboards/pearl/pearl.h index 6f5fbce5d..72df1595d 100644 --- a/keyboards/pearl/pearl.h +++ b/keyboards/pearl/pearl.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef PEARL_H -#define PEARL_H +#pragma once #include "quantum.h" #include "pearl.h" @@ -56,6 +55,3 @@ along with this program. If not, see . { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO}, \ { K30, K31, KC_NO, KC_NO, KC_NO, K35, KC_NO, KC_NO, KC_NO, K39, K3A, KC_NO, KC_NO}, \ } - - -#endif diff --git a/keyboards/pearl/readme.md b/keyboards/pearl/readme.md new file mode 100644 index 000000000..c39d86cf3 --- /dev/null +++ b/keyboards/pearl/readme.md @@ -0,0 +1,47 @@ +# Pearl 40% + +Pearl 40% is a keyboard designed by Koobaczech. It uses an Atmel +ATMEGA32A MCU. + +Keyboard Maintainer: [Ethan Madden](https://github.com/jetpacktuxedo) +Hardware Supported: Pearl +Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=92259.0) + +Make example for this keyboard (after setting up your build environment): + + make pearl:default + +Flashing + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +**Reset Key:** Hold down the key located at `K00`. + +Windows: +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset. +3. Press the `Find Device` button and ensure that your keyboard is found. +4. Press the `Open .hex File` button and locate the `.hex` file you created. +5. Press the `Flash Device` button and wait for the process to complete. + +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python3 + pip3 install pyusb + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + ``` +4. Place your keyboard into reset. +5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. + +**Please Note:** You will need to use the `EEP_RST` keycode first, followed by unplugging/replugging the board to get RGB underglow effects to work. + +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). diff --git a/keyboards/pearl/rules.mk b/keyboards/pearl/rules.mk index fac85172e..4db92d121 100644 --- a/keyboards/pearl/rules.mk +++ b/keyboards/pearl/rules.mk @@ -31,7 +31,7 @@ F_CPU = 12000000 BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = full +BOOTMAGIC_ENABLE = no MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes @@ -43,8 +43,7 @@ RGBLIGHT_CUSTOM_DRIVER = yes OPT_DEFS = -DDEBUG_LEVEL=0 # custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c +SRC = i2c_master.c # programming options PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/pearl/usbconfig.h b/keyboards/pearl/usbconfig.h index d2d848fcd..54a7d20f1 100644 --- a/keyboards/pearl/usbconfig.h +++ b/keyboards/pearl/usbconfig.h @@ -8,8 +8,7 @@ * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ */ -#ifndef __usbconfig_h_included__ -#define __usbconfig_h_included__ +#pragma once #include "config.h" @@ -392,5 +391,3 @@ section at the end of this file). /* #define USB_INTR_PENDING EIFR */ #define USB_INTR_PENDING_BIT INTF1 #define USB_INTR_VECTOR INT1_vect - -#endif /* __usbconfig_h_included__ */ From 2ce3c5548ae7329a80d4db73a5ce3e7f092332f3 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sun, 19 May 2019 09:51:56 -0700 Subject: [PATCH 079/341] [Keyboard] E6V2 BMC OE (#5908) * rename bmc due to confusion as the bmc from r2 is different * update readme * Update keyboards/exclusive/e6v2/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- keyboards/exclusive/e6v2/{bmc => oe_bmc}/config.h | 2 +- keyboards/exclusive/e6v2/{bmc => oe_bmc}/info.json | 0 .../exclusive/e6v2/{bmc => oe_bmc}/keymaps/default/config.h | 0 .../exclusive/e6v2/{bmc => oe_bmc}/keymaps/default/keymap.c | 0 .../e6v2/{bmc => oe_bmc}/keymaps/default/readme.md | 0 keyboards/exclusive/e6v2/{bmc/bmc.c => oe_bmc/oe_bmc.c} | 2 +- keyboards/exclusive/e6v2/{bmc/bmc.h => oe_bmc/oe_bmc.h} | 0 keyboards/exclusive/e6v2/{bmc => oe_bmc}/readme.md | 6 +++--- keyboards/exclusive/e6v2/{bmc => oe_bmc}/rules.mk | 0 keyboards/exclusive/e6v2/{bmc => oe_bmc}/usbconfig.h | 0 keyboards/exclusive/e6v2/readme.md | 2 +- 11 files changed, 6 insertions(+), 6 deletions(-) rename keyboards/exclusive/e6v2/{bmc => oe_bmc}/config.h (97%) rename keyboards/exclusive/e6v2/{bmc => oe_bmc}/info.json (100%) rename keyboards/exclusive/e6v2/{bmc => oe_bmc}/keymaps/default/config.h (100%) rename keyboards/exclusive/e6v2/{bmc => oe_bmc}/keymaps/default/keymap.c (100%) rename keyboards/exclusive/e6v2/{bmc => oe_bmc}/keymaps/default/readme.md (100%) rename keyboards/exclusive/e6v2/{bmc/bmc.c => oe_bmc/oe_bmc.c} (99%) rename keyboards/exclusive/e6v2/{bmc/bmc.h => oe_bmc/oe_bmc.h} (100%) rename keyboards/exclusive/e6v2/{bmc => oe_bmc}/readme.md (85%) rename keyboards/exclusive/e6v2/{bmc => oe_bmc}/rules.mk (100%) rename keyboards/exclusive/e6v2/{bmc => oe_bmc}/usbconfig.h (100%) diff --git a/keyboards/exclusive/e6v2/bmc/config.h b/keyboards/exclusive/e6v2/oe_bmc/config.h similarity index 97% rename from keyboards/exclusive/e6v2/bmc/config.h rename to keyboards/exclusive/e6v2/oe_bmc/config.h index 7c6fcccdb..fc7c91ca6 100644 --- a/keyboards/exclusive/e6v2/bmc/config.h +++ b/keyboards/exclusive/e6v2/oe_bmc/config.h @@ -22,7 +22,7 @@ along with this program. If not, see . #define PRODUCT_ID 0x0000 #define DEVICE_VER 0x0001 #define MANUFACTURER exclusive -#define PRODUCT e6v2 bmc +#define PRODUCT e6v2 oe bmc #define DESCRIPTION A custom 60% keyboard /* key matrix size */ diff --git a/keyboards/exclusive/e6v2/bmc/info.json b/keyboards/exclusive/e6v2/oe_bmc/info.json similarity index 100% rename from keyboards/exclusive/e6v2/bmc/info.json rename to keyboards/exclusive/e6v2/oe_bmc/info.json diff --git a/keyboards/exclusive/e6v2/bmc/keymaps/default/config.h b/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/config.h similarity index 100% rename from keyboards/exclusive/e6v2/bmc/keymaps/default/config.h rename to keyboards/exclusive/e6v2/oe_bmc/keymaps/default/config.h diff --git a/keyboards/exclusive/e6v2/bmc/keymaps/default/keymap.c b/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/keymap.c similarity index 100% rename from keyboards/exclusive/e6v2/bmc/keymaps/default/keymap.c rename to keyboards/exclusive/e6v2/oe_bmc/keymaps/default/keymap.c diff --git a/keyboards/exclusive/e6v2/bmc/keymaps/default/readme.md b/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/readme.md similarity index 100% rename from keyboards/exclusive/e6v2/bmc/keymaps/default/readme.md rename to keyboards/exclusive/e6v2/oe_bmc/keymaps/default/readme.md diff --git a/keyboards/exclusive/e6v2/bmc/bmc.c b/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c similarity index 99% rename from keyboards/exclusive/e6v2/bmc/bmc.c rename to keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c index 257b68b8b..5357550ae 100644 --- a/keyboards/exclusive/e6v2/bmc/bmc.c +++ b/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "bmc.h" +#include "oe_bmc.h" #include "rgblight.h" #include "i2c_master.h" diff --git a/keyboards/exclusive/e6v2/bmc/bmc.h b/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.h similarity index 100% rename from keyboards/exclusive/e6v2/bmc/bmc.h rename to keyboards/exclusive/e6v2/oe_bmc/oe_bmc.h diff --git a/keyboards/exclusive/e6v2/bmc/readme.md b/keyboards/exclusive/e6v2/oe_bmc/readme.md similarity index 85% rename from keyboards/exclusive/e6v2/bmc/readme.md rename to keyboards/exclusive/e6v2/oe_bmc/readme.md index b69ac792c..a386abf6c 100644 --- a/keyboards/exclusive/e6v2/bmc/readme.md +++ b/keyboards/exclusive/e6v2/oe_bmc/readme.md @@ -1,6 +1,6 @@ -# E6-V2 Bootmapper Client (ps2avrgb) +# E6-V2 Bootmapper Client (ps2avrgb) OE -These docs are for the BMC version of the E6-V2 PCB which has an atmega32a microcontroller. Please do not flash this `.hex` file on your atmega32u4 equipped E6-V2. +These docs are for the BMC version of the E6-V2 PCB sold during Round 1 which has an atmega32a microcontroller. Please do not flash this `.hex` file on your atmega32u4 equipped E6-V2 or your E6V2 BMC from Round 2. Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) Hardware Supported: ps2avrgb E6-V2 with atmega32a microcontroller @@ -8,7 +8,7 @@ Hardware Availability: [geekhack.org/index.php?topic=90787.0](https://geekhack.o Make example for this keyboard (after setting up your build environment): - make exclusive/e6v2/bmc:default + make exclusive/e6v2/oe_bmc:default Flashing diff --git a/keyboards/exclusive/e6v2/bmc/rules.mk b/keyboards/exclusive/e6v2/oe_bmc/rules.mk similarity index 100% rename from keyboards/exclusive/e6v2/bmc/rules.mk rename to keyboards/exclusive/e6v2/oe_bmc/rules.mk diff --git a/keyboards/exclusive/e6v2/bmc/usbconfig.h b/keyboards/exclusive/e6v2/oe_bmc/usbconfig.h similarity index 100% rename from keyboards/exclusive/e6v2/bmc/usbconfig.h rename to keyboards/exclusive/e6v2/oe_bmc/usbconfig.h diff --git a/keyboards/exclusive/e6v2/readme.md b/keyboards/exclusive/e6v2/readme.md index c09d1ccf1..515db082e 100644 --- a/keyboards/exclusive/e6v2/readme.md +++ b/keyboards/exclusive/e6v2/readme.md @@ -13,7 +13,7 @@ The E6-V2 is a 60% keyboard manufactured by Exclusive. These docs are for the QMK version of the E6-V2 PCB. [More info on qmk.fm](http://qmk.fm/) -The E6V2 has been available with either a bootmapper client or QMK powered PCB. During the second round, the QMK powered PCB was redesigned and used different ports and a different switch matrix. +The E6V2 has been available with either a Bootmapper Client or QMK-powered PCB. During the second round, the QMK-powered and BMC PCBs were redesigned, and used different ports and a different switch matrix. Please use the appropriate version when making your firmware. Flashing one in place of the other, can brick your PCB. Please be certain whether you have a OE or LE PCB. From 2a8fd5823244eb1c7e8906b4118f01d2078c4e28 Mon Sep 17 00:00:00 2001 From: marksard <38324387+marksard@users.noreply.github.com> Date: Mon, 20 May 2019 02:00:53 +0900 Subject: [PATCH 080/341] [Keymap] Add keymap nomu30 likejijs (#5917) * Keyboard: add treeadstone48 * rename layout defines * Use of pragma once * move common include code * fixed info.json * change keymap layout from kc to normal * fix alpha revision keymap * fixed info.json * remove USE_Link_Time_Optimization * Add like_jis keymap for nomu30 --- keyboards/nomu30/keymaps/like_jis/config.h | 66 ++++++++ keyboards/nomu30/keymaps/like_jis/keymap.c | 159 ++++++++++++++++++++ keyboards/nomu30/keymaps/like_jis/readme.md | 64 ++++++++ keyboards/nomu30/keymaps/like_jis/rules.mk | 26 ++++ 4 files changed, 315 insertions(+) create mode 100644 keyboards/nomu30/keymaps/like_jis/config.h create mode 100644 keyboards/nomu30/keymaps/like_jis/keymap.c create mode 100644 keyboards/nomu30/keymaps/like_jis/readme.md create mode 100644 keyboards/nomu30/keymaps/like_jis/rules.mk diff --git a/keyboards/nomu30/keymaps/like_jis/config.h b/keyboards/nomu30/keymaps/like_jis/config.h new file mode 100644 index 000000000..8861dc539 --- /dev/null +++ b/keyboards/nomu30/keymaps/like_jis/config.h @@ -0,0 +1,66 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +// place overrides here +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT + +#define TAPPING_LAYER_TERM 150 // Custom LT Tapping term +#define TAPPING_TERM_PER_KEY + +#ifdef MOUSEKEY_ENABLE + #undef MOUSEKEY_INTERVAL + #define MOUSEKEY_INTERVAL 1 + + #undef MOUSEKEY_TIME_TO_MAX + #define MOUSEKEY_TIME_TO_MAX 150 + + #undef MOUSEKEY_MAX_SPEED + #define MOUSEKEY_MAX_SPEED 3 + + #undef MOUSEKEY_MOVE_DELTA + #define MOUSEKEY_MOVE_DELTA 4 + + #undef MOUSEKEY_DELAY + #define MOUSEKEY_DELAY 0 +#endif + +// Selection of RGBLIGHT MODE to use. +#if defined(LED_ANIMATIONS) + //#define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + //#define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT + //#define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + //#define RGBLIGHT_EFFECT_RGB_TEST + //#define RGBLIGHT_EFFECT_ALTERNATING +#endif + +// LED Setting: if you have KUMO you can use RGBLIGHT_ENABLE = yes +#ifdef RGBLIGHT_ENABLE + #define RGB_DI_PIN B5 + #define RGBLIGHT_TIMER + + #define RGBLED_NUM 6 +#endif diff --git a/keyboards/nomu30/keymaps/like_jis/keymap.c b/keyboards/nomu30/keymaps/like_jis/keymap.c new file mode 100644 index 000000000..203d0a7a4 --- /dev/null +++ b/keyboards/nomu30/keymaps/like_jis/keymap.c @@ -0,0 +1,159 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +// 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. +enum layer_number { + _BASE = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGBRST = SAFE_RANGE, + LOWER, + RAISE, + KANJI, +}; + +// enum tapdances{ +// TD_CODO = 0, +// TD_SLRO, +// }; + +// Layer Mode aliases +#define KC_MLAD MO(_ADJUST) + +// Base layer mod tap +#define KC_CMSF LSFT_T(KC_COMM) +#define KC_DTCT LCTL_T(KC_DOT) +#define KC_Z_AL LALT_T(KC_Z) +#define KC_X_GU LGUI_T(KC_X) +#define KC_ENSF LSFT_T(KC_ENT) + +// Lower layer mod tap +#define KC_BSSF LSFT_T(KC_BSLS) +#define KC_11AL LALT_T(KC_F11) + +// Layer tap +#define KC_BSLO LT(_LOWER, KC_BSPC) +#define KC_SPRA LT(_RAISE, KC_SPC) + +// Tap dance +// #define KC_CODO TD(TD_CODO) +// #define KC_SLRO TD(TD_SLRO) + +// qk_tap_dance_action_t tap_dance_actions[] = { +// [TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT), +// [TD_SLRO] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_RO), +// }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------------------. + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLO, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_CMSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_DTCT, KC_Z_AL, KC_X_GU, KC_C, KC_V, KC_B, KC_N, KC_M, KC_SPRA + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_LOWER] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------------------. + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, _______, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, KC_BSSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, KC_11AL, KC_F12, KC_ESC, KC_TAB, KANJI, KC_COMM, KC_DOT, KC_MLAD + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_RAISE] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------------------. + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LSFT, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLSH, KC_RO, _______ + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_ADJUST] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------------------. + RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ) +}; + +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case KC_BSLO: + return TAPPING_LAYER_TERM; + case KC_SPRA: + return TAPPING_LAYER_TERM; + default: + return TAPPING_TERM; + } +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case KANJI: + if (record->event.pressed) { + if (keymap_config.swap_lalt_lgui == false) { + register_code(KC_LANG2); + } else { + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG2); + } + break; + #ifdef RGBLIGHT_ENABLE + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void keyboard_post_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif +} diff --git a/keyboards/nomu30/keymaps/like_jis/readme.md b/keyboards/nomu30/keymaps/like_jis/readme.md new file mode 100644 index 000000000..ad64f06b1 --- /dev/null +++ b/keyboards/nomu30/keymaps/like_jis/readme.md @@ -0,0 +1,64 @@ +# The LikeJIS is Japanese Keyboard like keymap + +A Nomu30 can use full color LED strip used by B5 pin. This keymap can use LED animation option. + +## Keymap Description + +- KC_CMSF ...... , key is one tap, Shift key is long push. +- KC_DTCT ...... . key is one tap, Ctrl key is long tap. +- KC_ENSF ...... Enter key is one tap, Ctrl key is long tap. +- KC_Z_AL ...... Z key is one tap, Alt key is long tap. +- KC_X_GU ...... X key is one tap, GUI key is long tap. +- KC_BSLO ...... Backspace key is one tap, Move to Lower layer with long push. +- KC_SPRA ...... Space key is one tap, Move to Raise layer with. +- AG_NORM ...... If you use Mac set to mode. +- AG_SWAP ...... If you use Win set to mode. +- KANJI ...... Japanese IME toggle key. + +## How to move to Ajdust Layer + +At first, Move to Lower layer with long push. After that Adjust key with long push. Now you have into Adjust layer state. + +```c + + [_BASE] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------------------. + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLO, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_CMSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_DTCT, KC_Z_AL, KC_X_GU, KC_C, KC_V, KC_B, KC_N, KC_M, KC_SPRA + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_LOWER] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------------------. + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, _______, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, KC_BSSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, KC_11AL, KC_F12, KC_ESC, KC_TAB, KANJI, KC_COMM, KC_DOT, KC_MLAD + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_RAISE] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------------------. + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LSFT, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLSH, KC_RO, _______ + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_ADJUST] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------------------. + RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ) + +``` diff --git a/keyboards/nomu30/keymaps/like_jis/rules.mk b/keyboards/nomu30/keymaps/like_jis/rules.mk new file mode 100644 index 000000000..b1a6026c2 --- /dev/null +++ b/keyboards/nomu30/keymaps/like_jis/rules.mk @@ -0,0 +1,26 @@ + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +TAP_DANCE_ENABLE = no + +# If your custom treadstone32 pcb, you can rewrite to yes. +RGBLIGHT_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations + +# Other selectable option +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + # OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend From b479eff94013c32b6f3f926a23b7e4a6cf7a3a6e Mon Sep 17 00:00:00 2001 From: marksard <38324387+marksard@users.noreply.github.com> Date: Mon, 20 May 2019 02:02:13 +0900 Subject: [PATCH 081/341] [Keymap] Add keymap csprt (#5918) * Keyboard: add treeadstone48 * rename layout defines * Use of pragma once * move common include code * fixed info.json * change keymap layout from kc to normal * fix alpha revision keymap * fixed info.json * remove USE_Link_Time_Optimization * Add center sprit keymap for nomu30 --- .../nomu30/keymaps/center_sprit/config.h | 66 ++++++++ .../nomu30/keymaps/center_sprit/keymap.c | 159 ++++++++++++++++++ .../nomu30/keymaps/center_sprit/readme.md | 68 ++++++++ .../nomu30/keymaps/center_sprit/rules.mk | 26 +++ 4 files changed, 319 insertions(+) create mode 100644 keyboards/nomu30/keymaps/center_sprit/config.h create mode 100644 keyboards/nomu30/keymaps/center_sprit/keymap.c create mode 100644 keyboards/nomu30/keymaps/center_sprit/readme.md create mode 100644 keyboards/nomu30/keymaps/center_sprit/rules.mk diff --git a/keyboards/nomu30/keymaps/center_sprit/config.h b/keyboards/nomu30/keymaps/center_sprit/config.h new file mode 100644 index 000000000..8861dc539 --- /dev/null +++ b/keyboards/nomu30/keymaps/center_sprit/config.h @@ -0,0 +1,66 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +// place overrides here +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT + +#define TAPPING_LAYER_TERM 150 // Custom LT Tapping term +#define TAPPING_TERM_PER_KEY + +#ifdef MOUSEKEY_ENABLE + #undef MOUSEKEY_INTERVAL + #define MOUSEKEY_INTERVAL 1 + + #undef MOUSEKEY_TIME_TO_MAX + #define MOUSEKEY_TIME_TO_MAX 150 + + #undef MOUSEKEY_MAX_SPEED + #define MOUSEKEY_MAX_SPEED 3 + + #undef MOUSEKEY_MOVE_DELTA + #define MOUSEKEY_MOVE_DELTA 4 + + #undef MOUSEKEY_DELAY + #define MOUSEKEY_DELAY 0 +#endif + +// Selection of RGBLIGHT MODE to use. +#if defined(LED_ANIMATIONS) + //#define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + //#define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT + //#define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + //#define RGBLIGHT_EFFECT_RGB_TEST + //#define RGBLIGHT_EFFECT_ALTERNATING +#endif + +// LED Setting: if you have KUMO you can use RGBLIGHT_ENABLE = yes +#ifdef RGBLIGHT_ENABLE + #define RGB_DI_PIN B5 + #define RGBLIGHT_TIMER + + #define RGBLED_NUM 6 +#endif diff --git a/keyboards/nomu30/keymaps/center_sprit/keymap.c b/keyboards/nomu30/keymaps/center_sprit/keymap.c new file mode 100644 index 000000000..8ef037f42 --- /dev/null +++ b/keyboards/nomu30/keymaps/center_sprit/keymap.c @@ -0,0 +1,159 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +// 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. +enum layer_number { + _BASE = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGBRST = SAFE_RANGE, + LOWER, + RAISE, + KANJI, +}; + +enum tapdances{ + TD_CODO = 0, + }; + +// Layer Mode aliases +#define KC_MLAD MO(_ADJUST) + +// Base layer mod tap +#define KC_SLSF LSFT_T(KC_SLSH) +#define KC_Z_CT LCTL_T(KC_Z) +#define KC_X_AL LALT_T(KC_X) +#define KC_C_GU LGUI_T(KC_C) +#define KC_ENSF LSFT_T(KC_ENT) +#define KC_M_CT LCTL_T(KC_M) + +// Lower layer mod tap +#define KC_F6SF LSFT_T(KC_F6) +#define KC_BSSF LSFT_T(KC_BSLS) +#define KC_11CT LCTL_T(KC_F11) +#define KC_12AL LALT_T(KC_F12) + +// Layer tap +#define KC_BSLO LT(_LOWER, KC_BSPC) +#define KC_SPRA LT(_RAISE, KC_SPC) + +// Tap dance +#define KC_CODO TD(TD_CODO) + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT), + }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + //,-------------------------------------------------------------------------------------------------------------. + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSLO, KC_Y, KC_U, KC_I, KC_O, KC_P, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_SLSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_Z_CT, KC_X_AL, KC_C_GU, KC_V, KC_B, KC_SPRA, KC_N, KC_M_CT, KC_CODO + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_LOWER] = LAYOUT( + //,-------------------------------------------------------------------------------------------------------------. + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, KC_BSSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_11CT, KC_12AL, KC_ESC, KC_TAB, KANJI, KC_MLAD, XXXXXXX, KC_COMM, KC_DOT + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_RAISE] = LAYOUT( + //,-------------------------------------------------------------------------------------------------------------. + KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LSFT, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_SLSH, KC_RO + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_ADJUST] = LAYOUT( + //,-------------------------------------------------------------------------------------------------------------. + RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, _______, KC_BTN1, KC_BTN2, XXXXXXX + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ) +}; + +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case KC_BSLO: + return TAPPING_LAYER_TERM; + case KC_SPRA: + return TAPPING_LAYER_TERM; + default: + return TAPPING_TERM; + } +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case KANJI: + if (record->event.pressed) { + if (keymap_config.swap_lalt_lgui == false) { + register_code(KC_LANG2); + } else { + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG2); + } + break; + #ifdef RGBLIGHT_ENABLE + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void keyboard_post_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif +} diff --git a/keyboards/nomu30/keymaps/center_sprit/readme.md b/keyboards/nomu30/keymaps/center_sprit/readme.md new file mode 100644 index 000000000..754e37f46 --- /dev/null +++ b/keyboards/nomu30/keymaps/center_sprit/readme.md @@ -0,0 +1,68 @@ +# The center sprit (as known as treadstone/stonehenge style staggered like keymap) + +See [stonehenge30](https://github.com/marksard/qmk_firmware/tree/my_customize/keyboards/stonehenge30) + +A Nomu30 can use full color LED strip used by B5 pin. This keymap can use LED animation option. + +## Keymap Description + +- KC_SLSF ...... / key is one tap, Shift key is long push. +- KC_Z_CT ...... Z key is one tap, Ctrl key is long tap. +- KC_X_AL ...... X key is one tap, Alt key is long tap. +- KC_C_GU ...... C key is one tap, GUI key is long tap. +- KC_M_CT ...... M key is one tap, Ctrl key is long tap. +- KC_ENSF ...... Enter key is one tap, Ctrl key is long tap. +- KC_CODO ...... , key is one tap, . key is double tap. +- KC_BSLO ...... Backspace key is one tap, Move to Lower layer with long push. +- KC_SPRA ...... Space key is one tap, Move to Raise layer with. +- AG_NORM ...... If you use Mac set to mode. +- AG_SWAP ...... If you use Win set to mode. +- KANJI ...... Japanese IME toggle key. + +## How to move to Ajdust Layer + +At first, Move to Lower layer with long push. After that Adjust key with long push. Now you have into Adjust layer state. + +```c + + [_BASE] = LAYOUT( + //,-------------------------------------------------------------------------------------------------------------. + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSLO, KC_Y, KC_U, KC_I, KC_O, KC_P, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_SLSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_Z_CT, KC_X_AL, KC_C_GU, KC_V, KC_B, KC_SPRA, KC_N, KC_M_CT, KC_CODO + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_LOWER] = LAYOUT( + //,-------------------------------------------------------------------------------------------------------------. + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, KC_BSSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_11CT, KC_12AL, KC_ESC, KC_TAB, KANJI, KC_MLAD, XXXXXXX, KC_COMM, KC_DOT + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_RAISE] = LAYOUT( + //,-------------------------------------------------------------------------------------------------------------. + KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LSFT, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_SLSH, KC_RO + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_ADJUST] = LAYOUT( + //,-------------------------------------------------------------------------------------------------------------. + RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, _______, KC_BTN1, KC_BTN2, XXXXXXX + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ) + +``` diff --git a/keyboards/nomu30/keymaps/center_sprit/rules.mk b/keyboards/nomu30/keymaps/center_sprit/rules.mk new file mode 100644 index 000000000..1b0d208ce --- /dev/null +++ b/keyboards/nomu30/keymaps/center_sprit/rules.mk @@ -0,0 +1,26 @@ + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +TAP_DANCE_ENABLE = yes + +# If your custom treadstone32 pcb, you can rewrite to yes. +RGBLIGHT_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations + +# Other selectable option +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + # OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend From e8372692c58c3e731a7ccef58ddeaa45e2e71e9f Mon Sep 17 00:00:00 2001 From: Andrew Kannan Date: Sun, 19 May 2019 13:03:06 -0400 Subject: [PATCH 082/341] [Keyboard] Instant60 VIA Support (#5909) * VIA Support for Instant60 * Backlighting updates * Update default keymap * Add Standard layout default VIA supported layout * Clean up some backslashes * Add info.json * Update info json metadata * add info.json for practice65 * Update keyboards/cannonkeys/instant60/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/cannonkeys/practice65/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/cannonkeys/instant60/keymaps/via/keymap.c Co-Authored-By: fauxpark * Update keyboards/cannonkeys/instant60/keymaps/via_standard/keymap.c Co-Authored-By: fauxpark * Remove unused enum --- keyboards/cannonkeys/instant60/config.h | 12 +- keyboards/cannonkeys/instant60/info.json | 15 ++ .../instant60/keymaps/tsangan/keymap.c | 8 +- .../cannonkeys/instant60/keymaps/via/keymap.c | 43 +++++ .../cannonkeys/instant60/keymaps/via/rules.mk | 5 + .../instant60/keymaps/via_standard/keymap.c | 43 +++++ .../instant60/keymaps/via_standard/rules.mk | 5 + keyboards/cannonkeys/practice65/info.json | 12 ++ keyboards/cannonkeys/stm32f072/keyboard.c | 182 +++++++++++++++++- keyboards/cannonkeys/stm32f072/led.c | 3 +- 10 files changed, 317 insertions(+), 11 deletions(-) create mode 100644 keyboards/cannonkeys/instant60/info.json create mode 100644 keyboards/cannonkeys/instant60/keymaps/via/keymap.c create mode 100644 keyboards/cannonkeys/instant60/keymaps/via/rules.mk create mode 100644 keyboards/cannonkeys/instant60/keymaps/via_standard/keymap.c create mode 100644 keyboards/cannonkeys/instant60/keymaps/via_standard/rules.mk create mode 100644 keyboards/cannonkeys/practice65/info.json diff --git a/keyboards/cannonkeys/instant60/config.h b/keyboards/cannonkeys/instant60/config.h index d7554c172..095384fb9 100644 --- a/keyboards/cannonkeys/instant60/config.h +++ b/keyboards/cannonkeys/instant60/config.h @@ -66,12 +66,18 @@ along with this program. If not, see . // Bump this every time we change what we store // This will automatically reset the EEPROM with defaults // and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x01 +#define EEPROM_VERSION 0x02 #define EEPROM_VERSION_ADDR 34 -#define EEPROM_CUSTOM_BACKLIGHT 804 - +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 +// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635 +// start + layer * rows * col * 2 +#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 +#define EEPROM_CUSTOM_BACKLIGHT 636 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 200 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 /* * Feature disable options diff --git a/keyboards/cannonkeys/instant60/info.json b/keyboards/cannonkeys/instant60/info.json new file mode 100644 index 000000000..73a64b8b3 --- /dev/null +++ b/keyboards/cannonkeys/instant60/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "Instant60", + "url": "https://cannonkeys.com", + "maintainer": "awkannan", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_ansi": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_tsangan": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + } + } +} diff --git a/keyboards/cannonkeys/instant60/keymaps/tsangan/keymap.c b/keyboards/cannonkeys/instant60/keymaps/tsangan/keymap.c index e95ac1b69..c16c50630 100644 --- a/keyboards/cannonkeys/instant60/keymaps/tsangan/keymap.c +++ b/keyboards/cannonkeys/instant60/keymaps/tsangan/keymap.c @@ -31,18 +31,18 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_tsangan( - 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_DEL, \ - 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_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_BSLS, KC_DEL, \ + 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_BSPC, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN1),\ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL ), [_FN1] = LAYOUT_tsangan( - KC_GESC, 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, _______,\ + 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, _______,\ RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ - KC_GRV, _______, _______, _______, _______, _______, RESET + _______, _______, _______, _______, _______, _______, RESET ) }; diff --git a/keyboards/cannonkeys/instant60/keymaps/via/keymap.c b/keyboards/cannonkeys/instant60/keymaps/via/keymap.c new file mode 100644 index 000000000..9be7d187e --- /dev/null +++ b/keyboards/cannonkeys/instant60/keymaps/via/keymap.c @@ -0,0 +1,43 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ +#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 _BASE 0 +#define _FN1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_all( + 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_BSLS, KC_DEL, + 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_BSPC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FN1), KC_RCTL + ), + + [_FN1] = LAYOUT_all( + 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, _______, + RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, RESET + ) +}; diff --git a/keyboards/cannonkeys/instant60/keymaps/via/rules.mk b/keyboards/cannonkeys/instant60/keymaps/via/rules.mk new file mode 100644 index 000000000..d12497792 --- /dev/null +++ b/keyboards/cannonkeys/instant60/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +# rules.mk overrides to enable VIA + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes + diff --git a/keyboards/cannonkeys/instant60/keymaps/via_standard/keymap.c b/keyboards/cannonkeys/instant60/keymaps/via_standard/keymap.c new file mode 100644 index 000000000..b182ac5f4 --- /dev/null +++ b/keyboards/cannonkeys/instant60/keymaps/via_standard/keymap.c @@ -0,0 +1,43 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ +#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 _BASE 0 +#define _FN1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_all( + 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_DEL, + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FN1), KC_RCTL + ), + + [_FN1] = LAYOUT_all( + 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, _______, + RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, RESET + ) +}; diff --git a/keyboards/cannonkeys/instant60/keymaps/via_standard/rules.mk b/keyboards/cannonkeys/instant60/keymaps/via_standard/rules.mk new file mode 100644 index 000000000..d12497792 --- /dev/null +++ b/keyboards/cannonkeys/instant60/keymaps/via_standard/rules.mk @@ -0,0 +1,5 @@ +# rules.mk overrides to enable VIA + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes + diff --git a/keyboards/cannonkeys/practice65/info.json b/keyboards/cannonkeys/practice65/info.json new file mode 100644 index 000000000..6c448fda2 --- /dev/null +++ b/keyboards/cannonkeys/practice65/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Practice65", + "url": "https://cannonkeys.com", + "maintainer": "awkannan", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_default": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + } + } +} diff --git a/keyboards/cannonkeys/stm32f072/keyboard.c b/keyboards/cannonkeys/stm32f072/keyboard.c index f94ecb5fb..02c6dae18 100644 --- a/keyboards/cannonkeys/stm32f072/keyboard.c +++ b/keyboards/cannonkeys/stm32f072/keyboard.c @@ -5,9 +5,16 @@ #include "util.h" #include "quantum.h" +#include "ws2812.h" + +#include "raw_hid.h" +#include "dynamic_keymap.h" #include "tmk_core/common/eeprom.h" -#include "ws2812.h" +// HACK +#include "keyboards/zeal60/zeal60_api.h" // Temporary hack +#include "keyboards/zeal60/zeal60_keycodes.h" // Temporary hack + backlight_config_t kb_backlight_config = { .enable = true, @@ -41,6 +48,17 @@ void load_custom_config(){ kb_backlight_config.raw = eeprom_read_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT); } +#ifdef DYNAMIC_KEYMAP_ENABLE +void dynamic_keymap_custom_reset(void){ + void *p = (void*)(EEPROM_CUSTOM_BACKLIGHT); + void *end = (void*)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR); + while ( p != end ) { + eeprom_update_byte(p, 0); + ++p; + } +} +#endif + void eeprom_init_kb(void) { // If the EEPROM has the magic, the data is good. @@ -48,9 +66,17 @@ void eeprom_init_kb(void) if (eeprom_is_valid()) { load_custom_config(); } else { +#ifdef DYNAMIC_KEYMAP_ENABLE + // This resets the keymaps in EEPROM to what is in flash. + dynamic_keymap_reset(); + // This resets the macros in EEPROM to nothing. + dynamic_keymap_macro_reset(); + // Reset the custom stuff + dynamic_keymap_custom_reset(); +#endif // Save the magic number last, in case saving was interrupted + save_backlight_config_to_eeprom(); eeprom_set_valid(true); - save_backlight_config_to_eeprom(); } } @@ -120,6 +146,158 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { save_backlight_config_to_eeprom(); } return false; + default: + break; } + + #ifdef DYNAMIC_KEYMAP_ENABLE + // Handle macros + if (record->event.pressed) { + if ( keycode >= MACRO00 && keycode <= MACRO15 ) + { + uint8_t id = keycode - MACRO00; + dynamic_keymap_macro_send(id); + return false; + } + } + #endif //DYNAMIC_KEYMAP_ENABLE + return true; } + + +// Start Dynamic Keymap code +#ifdef RAW_ENABLE + +void raw_hid_receive( uint8_t *data, uint8_t length ) +{ + uint8_t *command_id = &(data[0]); + uint8_t *command_data = &(data[1]); + switch ( *command_id ) + { + case id_get_protocol_version: + { + command_data[0] = PROTOCOL_VERSION >> 8; + command_data[1] = PROTOCOL_VERSION & 0xFF; + break; + } + case id_get_keyboard_value: + { + switch( command_data[0]) + { + case id_uptime: + { + uint32_t value = timer_read32(); + command_data[1] = (value >> 24 ) & 0xFF; + command_data[2] = (value >> 16 ) & 0xFF; + command_data[3] = (value >> 8 ) & 0xFF; + command_data[4] = value & 0xFF; + break; + } + default: + { + *command_id = id_unhandled; + break; + } + } + break; + } +#ifdef DYNAMIC_KEYMAP_ENABLE + + case id_dynamic_keymap_get_keycode: + { + uint16_t keycode = dynamic_keymap_get_keycode( command_data[0], command_data[1], command_data[2] ); + command_data[3] = keycode >> 8; + command_data[4] = keycode & 0xFF; + break; + } + case id_dynamic_keymap_set_keycode: + { + dynamic_keymap_set_keycode( command_data[0], command_data[1], command_data[2], ( command_data[3] << 8 ) | command_data[4] ); + break; + } + case id_dynamic_keymap_reset: + { + dynamic_keymap_reset(); + break; + } + case id_dynamic_keymap_macro_get_count: + { + command_data[0] = dynamic_keymap_macro_get_count(); + break; + } + case id_dynamic_keymap_macro_get_buffer_size: + { + uint16_t size = dynamic_keymap_macro_get_buffer_size(); + command_data[0] = size >> 8; + command_data[1] = size & 0xFF; + break; + } + case id_dynamic_keymap_macro_get_buffer: + { + uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; + uint16_t size = command_data[2]; // size <= 28 + dynamic_keymap_macro_get_buffer( offset, size, &command_data[3] ); + break; + } + case id_dynamic_keymap_macro_set_buffer: + { + uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; + uint16_t size = command_data[2]; // size <= 28 + dynamic_keymap_macro_set_buffer( offset, size, &command_data[3] ); + break; + } + case id_dynamic_keymap_macro_reset: + { + dynamic_keymap_macro_reset(); + break; + } + case id_dynamic_keymap_get_layer_count: + { + command_data[0] = dynamic_keymap_get_layer_count(); + break; + } + case id_dynamic_keymap_get_buffer: + { + uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; + uint16_t size = command_data[2]; // size <= 28 + dynamic_keymap_get_buffer( offset, size, &command_data[3] ); + break; + } + case id_dynamic_keymap_set_buffer: + { + uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; + uint16_t size = command_data[2]; // size <= 28 + dynamic_keymap_set_buffer( offset, size, &command_data[3] ); + break; + } +#endif // DYNAMIC_KEYMAP_ENABLE + case id_eeprom_reset: + { + eeprom_reset(); + break; + } + case id_bootloader_jump: + { + // Need to send data back before the jump + // Informs host that the command is handled + raw_hid_send( data, length ); + // Give host time to read it + wait_ms(100); + bootloader_jump(); + break; + } + default: + { + // Unhandled message. + *command_id = id_unhandled; + break; + } + } + + // Return same buffer with values changed + raw_hid_send( data, length ); + +} + +#endif diff --git a/keyboards/cannonkeys/stm32f072/led.c b/keyboards/cannonkeys/stm32f072/led.c index d69d94685..5c7df47da 100644 --- a/keyboards/cannonkeys/stm32f072/led.c +++ b/keyboards/cannonkeys/stm32f072/led.c @@ -77,10 +77,9 @@ void backlight_init_ports(void) { pwmStart(&PWMD3, &pwmCFG); // pwmEnableChannel(&PWMD3, 0, PWM_FRACTION_TO_WIDTH(&PWMD3, 0xFFFF,cie_lightness(0xFFFF))); if(kb_backlight_config.enable){ + backlight_set(kb_backlight_config.level); if(kb_backlight_config.breathing){ breathing_enable(); - } else{ - backlight_set(kb_backlight_config.level); } } else { backlight_set(0); From e7af23788fbcff8e5bea896b458fb8da1639e66d Mon Sep 17 00:00:00 2001 From: crilith Date: Sun, 19 May 2019 14:12:34 -0500 Subject: [PATCH 083/341] [Keymap] Update keymap.c (#5923) Corrected formatting and added shortcuts. Removed invalid #define --- keyboards/melody96/keymaps/crilith/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/melody96/keymaps/crilith/keymap.c b/keyboards/melody96/keymaps/crilith/keymap.c index a1a1843ae..4c5e27668 100644 --- a/keyboards/melody96/keymaps/crilith/keymap.c +++ b/keyboards/melody96/keymaps/crilith/keymap.c @@ -16,16 +16,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( KC_ESC, 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_PSCR, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_DEL, KC_GRV, 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_BSLS, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - 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_P7, KC_P8, KC_P9, KC_PMNS, + 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_P7, KC_P8, KC_P9, KC_PPLS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_LSFT, KC_NUBS, 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_P1, KC_P2, KC_P3, KC_PENT, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, TT(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), LAYOUT( RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, - BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CALC, _______, _______, _______, + _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, KC_TAB, + BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TAB, _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PLAY, _______, KC_REC, KC_DONE, _______, _______, _______, _______, _______, _______), }; From c9a7161d934979770792ff1e91ccfcc3508d240b Mon Sep 17 00:00:00 2001 From: Ryan Caltabiano Date: Sun, 19 May 2019 08:34:25 -0500 Subject: [PATCH 084/341] Reduce rgb matrix firmware size --- quantum/rgb_matrix.c | 8 +++ .../colorband_pinwheel_sat_anim.h | 18 ++----- .../colorband_pinwheel_val_anim.h | 18 ++----- .../colorband_sat_anim.h | 18 +++---- .../colorband_spiral_sat_anim.h | 19 ++----- .../colorband_spiral_val_anim.h | 19 ++----- .../colorband_val_anim.h | 18 +++---- .../rgb_matrix_animations/cycle_all_anim.h | 16 +++--- .../cycle_left_right_anim.h | 16 ++---- .../rgb_matrix_animations/cycle_out_in_anim.h | 19 ++----- .../cycle_out_in_dual_anim.h | 21 +++----- .../cycle_pinwheel_anim.h | 18 ++----- .../rgb_matrix_animations/cycle_spiral_anim.h | 19 ++----- .../cycle_up_down_anim.h | 16 ++---- .../rgb_matrix_animations/dual_beacon_anim.h | 18 ++----- .../rainbow_beacon_anim.h | 18 ++----- .../rainbow_moving_chevron_anim.h | 16 ++---- .../rainbow_pinwheels_anim.h | 18 ++----- .../solid_reactive_anim.h | 28 ++-------- .../solid_reactive_cross.h | 52 +++++++------------ .../solid_reactive_nexus.h | 46 ++++++---------- .../solid_reactive_simple_anim.h | 27 ++-------- .../solid_reactive_wide.h | 39 +++++--------- .../rgb_matrix_animations/solid_splash_anim.h | 39 +++++--------- quantum/rgb_matrix_animations/splash_anim.h | 41 +++++---------- .../rgb_matrix_runners/effect_runner_dx_dy.h | 19 +++++++ .../effect_runner_dx_dy_dist.h | 20 +++++++ quantum/rgb_matrix_runners/effect_runner_i.h | 17 ++++++ .../effect_runner_reactive.h | 31 +++++++++++ .../effect_runner_reactive_splash.h | 30 +++++++++++ .../effect_runner_sin_cos_i.h | 19 +++++++ 31 files changed, 317 insertions(+), 404 deletions(-) create mode 100644 quantum/rgb_matrix_runners/effect_runner_dx_dy.h create mode 100644 quantum/rgb_matrix_runners/effect_runner_dx_dy_dist.h create mode 100644 quantum/rgb_matrix_runners/effect_runner_i.h create mode 100644 quantum/rgb_matrix_runners/effect_runner_reactive.h create mode 100644 quantum/rgb_matrix_runners/effect_runner_reactive_splash.h create mode 100644 quantum/rgb_matrix_runners/effect_runner_sin_cos_i.h diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index a6a9549af..98baf5cb5 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c @@ -32,6 +32,14 @@ const point_t k_rgb_matrix_center = RGB_MATRIX_CENTER; #endif +// Generic effect runners +#include "rgb_matrix_runners/effect_runner_dx_dy_dist.h" +#include "rgb_matrix_runners/effect_runner_dx_dy.h" +#include "rgb_matrix_runners/effect_runner_i.h" +#include "rgb_matrix_runners/effect_runner_sin_cos_i.h" +#include "rgb_matrix_runners/effect_runner_reactive.h" +#include "rgb_matrix_runners/effect_runner_reactive_splash.h" + // ------------------------------------------ // -----Begin rgb effect includes macros----- #define RGB_MATRIX_EFFECT(name) diff --git a/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h b/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h index 3e6df1fbe..cf9c0784a 100644 --- a/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h +++ b/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h @@ -2,20 +2,12 @@ RGB_MATRIX_EFFECT(BAND_PINWHEEL_SAT) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -bool BAND_PINWHEEL_SAT(effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); +static void BAND_PINWHEEL_SAT_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t time) { + hsv->s = rgb_matrix_config.sat - time - atan2_8(dy, dx) * 3; +} - HSV hsv = { rgb_matrix_config.hue, 0, rgb_matrix_config.val }; - uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 2); - for (uint8_t i = led_min; i < led_max; i++) { - RGB_MATRIX_TEST_LED_FLAGS(); - int16_t dx = g_led_config.point[i].x - 112; - int16_t dy = g_led_config.point[i].y - 32; - hsv.s = rgb_matrix_config.sat - time - atan2_8(dy, dx) * 3; - RGB rgb = hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; +bool BAND_PINWHEEL_SAT(effect_params_t* params) { + return effect_runner_dx_dy(params, &BAND_PINWHEEL_SAT_math); } #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h b/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h index 88cc7d1f2..05ad0ee32 100644 --- a/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h +++ b/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h @@ -2,20 +2,12 @@ RGB_MATRIX_EFFECT(BAND_PINWHEEL_VAL) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -bool BAND_PINWHEEL_VAL(effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); +static void BAND_PINWHEEL_VAL_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t time) { + hsv->v = rgb_matrix_config.val - time - atan2_8(dy, dx) * 3; +} - HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, 0 }; - uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 2); - for (uint8_t i = led_min; i < led_max; i++) { - RGB_MATRIX_TEST_LED_FLAGS(); - int16_t dx = g_led_config.point[i].x - 112; - int16_t dy = g_led_config.point[i].y - 32; - hsv.v = rgb_matrix_config.val - time - atan2_8(dy, dx) * 3; - RGB rgb = hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; +bool BAND_PINWHEEL_VAL(effect_params_t* params) { + return effect_runner_dx_dy(params, &BAND_PINWHEEL_VAL_math); } #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/colorband_sat_anim.h b/quantum/rgb_matrix_animations/colorband_sat_anim.h index 89773b6ce..8a40473e4 100644 --- a/quantum/rgb_matrix_animations/colorband_sat_anim.h +++ b/quantum/rgb_matrix_animations/colorband_sat_anim.h @@ -2,19 +2,13 @@ RGB_MATRIX_EFFECT(BAND_SAT) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -bool BAND_SAT(effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); - - HSV hsv = { rgb_matrix_config.hue, 0, rgb_matrix_config.val }; - uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); - for (uint8_t i = led_min; i < led_max; i++) { - RGB_MATRIX_TEST_LED_FLAGS(); +static void BAND_SAT_math(HSV* hsv, uint8_t i, uint8_t time) { int16_t s = rgb_matrix_config.sat - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8; - hsv.s = s < 0 ? 0 : s; - RGB rgb = hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; + hsv->s = s < 0 ? 0 : s; +} + +bool BAND_SAT(effect_params_t* params) { + return effect_runner_i(params, &BAND_SAT_math); } #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h b/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h index 44955900a..4af6c60b0 100644 --- a/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h +++ b/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h @@ -2,21 +2,12 @@ RGB_MATRIX_EFFECT(BAND_SPIRAL_SAT) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -bool BAND_SPIRAL_SAT(effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); +static void BAND_SPIRAL_SAT_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { + hsv->s = rgb_matrix_config.sat + dist - time - atan2_8(dy, dx); +} - HSV hsv = { rgb_matrix_config.hue, 0, rgb_matrix_config.val }; - uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 2); - for (uint8_t i = led_min; i < led_max; i++) { - RGB_MATRIX_TEST_LED_FLAGS(); - int16_t dx = g_led_config.point[i].x - 112; - int16_t dy = g_led_config.point[i].y - 32; - uint8_t dist = sqrt16(dx * dx + dy * dy); - hsv.s = rgb_matrix_config.sat + dist - time - atan2_8(dy, dx); - RGB rgb = hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; +bool BAND_SPIRAL_SAT(effect_params_t* params) { + return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_SAT_math); } #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h b/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h index 5aea0c8da..e787956a7 100644 --- a/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h +++ b/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h @@ -2,21 +2,12 @@ RGB_MATRIX_EFFECT(BAND_SPIRAL_VAL) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -bool BAND_SPIRAL_VAL(effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); +static void BAND_SPIRAL_VAL_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { + hsv->v = rgb_matrix_config.val + dist - time - atan2_8(dy, dx); +} - HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, 0 }; - uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 2); - for (uint8_t i = led_min; i < led_max; i++) { - RGB_MATRIX_TEST_LED_FLAGS(); - int16_t dx = g_led_config.point[i].x - 112; - int16_t dy = g_led_config.point[i].y - 32; - uint8_t dist = sqrt16(dx * dx + dy * dy); - hsv.v = rgb_matrix_config.val + dist - time - atan2_8(dy, dx); - RGB rgb = hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; +bool BAND_SPIRAL_VAL(effect_params_t* params) { + return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_VAL_math); } #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/colorband_val_anim.h b/quantum/rgb_matrix_animations/colorband_val_anim.h index bf41cec91..1e3740cea 100644 --- a/quantum/rgb_matrix_animations/colorband_val_anim.h +++ b/quantum/rgb_matrix_animations/colorband_val_anim.h @@ -2,19 +2,13 @@ RGB_MATRIX_EFFECT(BAND_VAL) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -bool BAND_VAL(effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); - - HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, 0 }; - uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); - for (uint8_t i = led_min; i < led_max; i++) { - RGB_MATRIX_TEST_LED_FLAGS(); +static void BAND_VAL_math(HSV* hsv, uint8_t i, uint8_t time) { int16_t v = rgb_matrix_config.val - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8; - hsv.v = v < 0 ? 0 : v; - RGB rgb = hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; + hsv->v = v < 0 ? 0 : v; +} + +bool BAND_VAL(effect_params_t* params) { + return effect_runner_i(params, &BAND_VAL_math); } #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/cycle_all_anim.h b/quantum/rgb_matrix_animations/cycle_all_anim.h index e6319cad7..380dbe05a 100644 --- a/quantum/rgb_matrix_animations/cycle_all_anim.h +++ b/quantum/rgb_matrix_animations/cycle_all_anim.h @@ -2,17 +2,13 @@ RGB_MATRIX_EFFECT(CYCLE_ALL) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -bool CYCLE_ALL(effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); +static void CYCLE_ALL_math(HSV* hsv, uint8_t i, uint8_t time) +{ + hsv->h = time; +} - HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; - hsv.h = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); - for (uint8_t i = led_min; i < led_max; i++) { - RGB_MATRIX_TEST_LED_FLAGS(); - RGB rgb = hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; +bool CYCLE_ALL(effect_params_t* params) { + return effect_runner_i(params, &CYCLE_ALL_math); } #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/cycle_left_right_anim.h b/quantum/rgb_matrix_animations/cycle_left_right_anim.h index d9a00530a..f270fb42c 100644 --- a/quantum/rgb_matrix_animations/cycle_left_right_anim.h +++ b/quantum/rgb_matrix_animations/cycle_left_right_anim.h @@ -2,18 +2,12 @@ RGB_MATRIX_EFFECT(CYCLE_LEFT_RIGHT) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -bool CYCLE_LEFT_RIGHT(effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); +static void CYCLE_LEFT_RIGHT_math(HSV* hsv, uint8_t i, uint8_t time) { + hsv->h = g_led_config.point[i].x - time; +} - HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; - uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); - for (uint8_t i = led_min; i < led_max; i++) { - RGB_MATRIX_TEST_LED_FLAGS(); - hsv.h = g_led_config.point[i].x - time; - RGB rgb = hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; +bool CYCLE_LEFT_RIGHT(effect_params_t* params) { + return effect_runner_i(params, &CYCLE_LEFT_RIGHT_math); } #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/cycle_out_in_anim.h b/quantum/rgb_matrix_animations/cycle_out_in_anim.h index 29209e4d7..46c7efef2 100644 --- a/quantum/rgb_matrix_animations/cycle_out_in_anim.h +++ b/quantum/rgb_matrix_animations/cycle_out_in_anim.h @@ -2,21 +2,12 @@ RGB_MATRIX_EFFECT(CYCLE_OUT_IN) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -bool CYCLE_OUT_IN(effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); +static void CYCLE_OUT_IN_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { + hsv->h = 3 * dist / 2 + time; +} - HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; - uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); - for (uint8_t i = led_min; i < led_max; i++) { - RGB_MATRIX_TEST_LED_FLAGS(); - int16_t dx = g_led_config.point[i].x - k_rgb_matrix_center.x; - int16_t dy = g_led_config.point[i].y - k_rgb_matrix_center.y; - uint8_t dist = sqrt16(dx * dx + dy * dy); - hsv.h = 3 * dist / 2 + time; - RGB rgb = hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; +bool CYCLE_OUT_IN(effect_params_t* params) { + return effect_runner_dx_dy_dist(params, &CYCLE_OUT_IN_math); } #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h b/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h index b2f79ceea..2fdb4ba91 100644 --- a/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h +++ b/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h @@ -2,21 +2,14 @@ RGB_MATRIX_EFFECT(CYCLE_OUT_IN_DUAL) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -bool CYCLE_OUT_IN_DUAL(effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); - - HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; - uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); - for (uint8_t i = led_min; i < led_max; i++) { - RGB_MATRIX_TEST_LED_FLAGS(); - int16_t dx = (k_rgb_matrix_center.x / 2) - abs8(g_led_config.point[i].x - k_rgb_matrix_center.x); - int16_t dy = g_led_config.point[i].y - k_rgb_matrix_center.y; +static void CYCLE_OUT_IN_DUAL_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t time) { + dx = (k_rgb_matrix_center.x / 2) - abs8(dx); uint8_t dist = sqrt16(dx * dx + dy * dy); - hsv.h = 3 * dist + time; - RGB rgb = hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; + hsv->h = 3 * dist + time; +} + +bool CYCLE_OUT_IN_DUAL(effect_params_t* params) { + return effect_runner_dx_dy(params, &CYCLE_OUT_IN_DUAL_math); } #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h b/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h index 59d60ac07..29e2d92c9 100644 --- a/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h +++ b/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h @@ -2,20 +2,12 @@ RGB_MATRIX_EFFECT(CYCLE_PINWHEEL) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -bool CYCLE_PINWHEEL(effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); +static void CYCLE_PINWHEEL_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t time) { + hsv->h = atan2_8(dy, dx) + time; +} - HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; - uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); - for (uint8_t i = led_min; i < led_max; i++) { - RGB_MATRIX_TEST_LED_FLAGS(); - int16_t dx = g_led_config.point[i].x - 112; - int16_t dy = g_led_config.point[i].y - 32; - hsv.h = atan2_8(dy, dx) + time; - RGB rgb = hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; +bool CYCLE_PINWHEEL(effect_params_t* params) { + return effect_runner_dx_dy(params, &CYCLE_PINWHEEL_math); } #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/cycle_spiral_anim.h b/quantum/rgb_matrix_animations/cycle_spiral_anim.h index 865309c25..a1354f60c 100644 --- a/quantum/rgb_matrix_animations/cycle_spiral_anim.h +++ b/quantum/rgb_matrix_animations/cycle_spiral_anim.h @@ -2,21 +2,12 @@ RGB_MATRIX_EFFECT(CYCLE_SPIRAL) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -bool CYCLE_SPIRAL(effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); +static void CYCLE_SPIRAL_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { + hsv->h = dist - time - atan2_8(dy, dx); +} - HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; - uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 2); - for (uint8_t i = led_min; i < led_max; i++) { - RGB_MATRIX_TEST_LED_FLAGS(); - int16_t dx = g_led_config.point[i].x - 112; - int16_t dy = g_led_config.point[i].y - 32; - uint8_t dist = sqrt16(dx * dx + dy * dy); - hsv.h = dist - time - atan2_8(dy, dx); - RGB rgb = hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; +bool CYCLE_SPIRAL(effect_params_t* params) { + return effect_runner_dx_dy_dist(params, &CYCLE_SPIRAL_math); } #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/cycle_up_down_anim.h b/quantum/rgb_matrix_animations/cycle_up_down_anim.h index f2b31d9da..b3ef4cdf2 100644 --- a/quantum/rgb_matrix_animations/cycle_up_down_anim.h +++ b/quantum/rgb_matrix_animations/cycle_up_down_anim.h @@ -2,18 +2,12 @@ RGB_MATRIX_EFFECT(CYCLE_UP_DOWN) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -bool CYCLE_UP_DOWN(effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); +static void CYCLE_UP_DOWN_math(HSV* hsv, uint8_t i, uint8_t time) { + hsv->h = g_led_config.point[i].y - time; +} - HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; - uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); - for (uint8_t i = led_min; i < led_max; i++) { - RGB_MATRIX_TEST_LED_FLAGS(); - hsv.h = g_led_config.point[i].y - time; - RGB rgb = hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; +bool CYCLE_UP_DOWN(effect_params_t* params) { + return effect_runner_i(params, &CYCLE_UP_DOWN_math); } #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/dual_beacon_anim.h b/quantum/rgb_matrix_animations/dual_beacon_anim.h index 59c91046d..d34f146a5 100644 --- a/quantum/rgb_matrix_animations/dual_beacon_anim.h +++ b/quantum/rgb_matrix_animations/dual_beacon_anim.h @@ -2,20 +2,12 @@ RGB_MATRIX_EFFECT(DUAL_BEACON) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -bool DUAL_BEACON(effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); +static void DUAL_BEACON_math(HSV* hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { + hsv->h = ((g_led_config.point[i].y - k_rgb_matrix_center.y) * cos + (g_led_config.point[i].x - k_rgb_matrix_center.x) * sin) / 128 + rgb_matrix_config.hue; +} - HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; - uint16_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); - int8_t cos_value = cos8(time) - 128; - int8_t sin_value = sin8(time) - 128; - for (uint8_t i = led_min; i < led_max; i++) { - RGB_MATRIX_TEST_LED_FLAGS(); - hsv.h = ((g_led_config.point[i].y - k_rgb_matrix_center.y) * cos_value + (g_led_config.point[i].x - k_rgb_matrix_center.x) * sin_value) / 128 + rgb_matrix_config.hue; - RGB rgb = hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; +bool DUAL_BEACON(effect_params_t* params) { + return effect_runner_sin_cos_i(params, &DUAL_BEACON_math); } #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/rainbow_beacon_anim.h b/quantum/rgb_matrix_animations/rainbow_beacon_anim.h index 564e3c480..061cac837 100644 --- a/quantum/rgb_matrix_animations/rainbow_beacon_anim.h +++ b/quantum/rgb_matrix_animations/rainbow_beacon_anim.h @@ -2,20 +2,12 @@ RGB_MATRIX_EFFECT(RAINBOW_BEACON) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -bool RAINBOW_BEACON(effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); +static void RAINBOW_BEACON_math(HSV* hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { + hsv->h = ((g_led_config.point[i].y - k_rgb_matrix_center.y) * 2 * cos + (g_led_config.point[i].x - k_rgb_matrix_center.x) * 2 * sin) / 128 + rgb_matrix_config.hue; +} - HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; - uint16_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); - int16_t cos_value = 2 * (cos8(time) - 128); - int16_t sin_value = 2 * (sin8(time) - 128); - for (uint8_t i = led_min; i < led_max; i++) { - RGB_MATRIX_TEST_LED_FLAGS(); - hsv.h = ((g_led_config.point[i].y - k_rgb_matrix_center.y) * cos_value + (g_led_config.point[i].x - k_rgb_matrix_center.x) * sin_value) / 128 + rgb_matrix_config.hue; - RGB rgb = hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; +bool RAINBOW_BEACON(effect_params_t* params) { + return effect_runner_sin_cos_i(params, &RAINBOW_BEACON_math); } #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h b/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h index 39352b0c1..f406566fa 100644 --- a/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h +++ b/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h @@ -2,18 +2,12 @@ RGB_MATRIX_EFFECT(RAINBOW_MOVING_CHEVRON) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -bool RAINBOW_MOVING_CHEVRON(effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); +static void RAINBOW_MOVING_CHEVRON_math(HSV* hsv, uint8_t i, uint8_t time) { + hsv->h = abs8(g_led_config.point[i].y - k_rgb_matrix_center.y) + (g_led_config.point[i].x - time) + rgb_matrix_config.hue; +} - HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; - uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); - for (uint8_t i = led_min; i < led_max; i++) { - RGB_MATRIX_TEST_LED_FLAGS(); - hsv.h = abs8(g_led_config.point[i].y - 32) + (g_led_config.point[i].x - time) + rgb_matrix_config.hue; - RGB rgb = hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; +bool RAINBOW_MOVING_CHEVRON(effect_params_t* params) { + return effect_runner_i(params, &RAINBOW_MOVING_CHEVRON_math); } #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h b/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h index 7d189b927..f19e9116d 100644 --- a/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h +++ b/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h @@ -2,20 +2,12 @@ RGB_MATRIX_EFFECT(PINWHEELS) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -bool PINWHEELS(effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); +static void PINWHEELS_math(HSV* hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { + hsv->h = ((g_led_config.point[i].y - k_rgb_matrix_center.y) * 3 * cos + (56 - abs8(g_led_config.point[i].x - k_rgb_matrix_center.x)) * 3 * sin) / 128 + rgb_matrix_config.hue; +} - HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; - uint16_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); - int16_t cos_value = 3 * (cos8(time) - 128); - int16_t sin_value = 3 * (sin8(time) - 128); - for (uint8_t i = led_min; i < led_max; i++) { - RGB_MATRIX_TEST_LED_FLAGS(); - hsv.h = ((g_led_config.point[i].y - k_rgb_matrix_center.y) * cos_value + (56 - abs8(g_led_config.point[i].x - k_rgb_matrix_center.x)) * sin_value) / 128 + rgb_matrix_config.hue; - RGB rgb = hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; +bool PINWHEELS(effect_params_t* params) { + return effect_runner_sin_cos_i(params, &PINWHEELS_math); } #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/solid_reactive_anim.h b/quantum/rgb_matrix_animations/solid_reactive_anim.h index 37e339907..762a95db3 100644 --- a/quantum/rgb_matrix_animations/solid_reactive_anim.h +++ b/quantum/rgb_matrix_animations/solid_reactive_anim.h @@ -3,30 +3,12 @@ RGB_MATRIX_EFFECT(SOLID_REACTIVE) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS +static void SOLID_REACTIVE_math(HSV* hsv, uint16_t offset) { + hsv->h = rgb_matrix_config.hue + qsub8(130, offset); +} + bool SOLID_REACTIVE(effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); - - HSV hsv = { rgb_matrix_config.hue, 255, rgb_matrix_config.val }; - // Max tick based on speed scale ensures results from scale16by8 with rgb_matrix_config.speed are no greater than 255 - uint16_t max_tick = 65535 / rgb_matrix_config.speed; - // Relies on hue being 8-bit and wrapping - for (uint8_t i = led_min; i < led_max; i++) { - RGB_MATRIX_TEST_LED_FLAGS(); - uint16_t tick = max_tick; - // Reverse search to find most recent key hit - for (int8_t j = g_last_hit_tracker.count - 1; j >= 0; j--) { - if (g_last_hit_tracker.index[j] == i && g_last_hit_tracker.tick[j] < tick) { - tick = g_last_hit_tracker.tick[j]; - break; - } - } - - uint16_t offset = scale16by8(tick, rgb_matrix_config.speed); - hsv.h = rgb_matrix_config.hue + qsub8(130, offset); - RGB rgb = hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; + return effect_runner_reactive(params, &SOLID_REACTIVE_math); } #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/solid_reactive_cross.h b/quantum/rgb_matrix_animations/solid_reactive_cross.h index 62210f82d..99f22c694 100644 --- a/quantum/rgb_matrix_animations/solid_reactive_cross.h +++ b/quantum/rgb_matrix_animations/solid_reactive_cross.h @@ -11,45 +11,29 @@ RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTICROSS) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static bool rgb_matrix_solid_reactive_multicross_range(uint8_t start, effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); - - HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, 0 }; - uint8_t count = g_last_hit_tracker.count; - for (uint8_t i = led_min; i < led_max; i++) { - hsv.v = 0; - for (uint8_t j = start; j < count; j++) { - RGB_MATRIX_TEST_LED_FLAGS(); - int16_t dx = g_led_config.point[i].x - g_last_hit_tracker.x[j]; - int16_t dy = g_led_config.point[i].y - g_last_hit_tracker.y[j]; - uint8_t dist = sqrt16(dx * dx + dy * dy); - int16_t dist2 = 16; - uint8_t dist3; - uint16_t effect = scale16by8(g_last_hit_tracker.tick[j], rgb_matrix_config.speed) + dist; - dx = dx < 0 ? dx * -1 : dx; - dy = dy < 0 ? dy * -1 : dy; - dx = dx * dist2 > 255 ? 255 : dx * dist2; - dy = dy * dist2 > 255 ? 255 : dy * dist2; - dist3 = dx > dy ? dy : dx; - effect += dist3; - if (effect > 255) +static void SOLID_REACTIVE_CROSS_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { + uint16_t effect = tick + dist; + dx = dx < 0 ? dx * -1 : dx; + dy = dy < 0 ? dy * -1 : dy; + dx = dx * 16 > 255 ? 255 : dx * 16; + dy = dy * 16 > 255 ? 255 : dy * 16; + effect += dx > dy ? dy : dx; + if (effect > 255) effect = 255; - hsv.v = qadd8(hsv.v, 255 - effect); - } - hsv.v = scale8(hsv.v, rgb_matrix_config.val); - RGB rgb = hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; -} - -bool SOLID_REACTIVE_MULTICROSS(effect_params_t* params) { - return rgb_matrix_solid_reactive_multicross_range(0, params); + hsv->v = qadd8(hsv->v, 255 - effect); } +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS bool SOLID_REACTIVE_CROSS(effect_params_t* params) { - return rgb_matrix_solid_reactive_multicross_range(qsub8(g_last_hit_tracker.count, 1), params); + return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_CROSS_math); } +#endif + +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +bool SOLID_REACTIVE_MULTICROSS(effect_params_t* params) { + return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_CROSS_math); +} +#endif #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS #endif // !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS) diff --git a/quantum/rgb_matrix_animations/solid_reactive_nexus.h b/quantum/rgb_matrix_animations/solid_reactive_nexus.h index 33f478ac7..8bebd042d 100644 --- a/quantum/rgb_matrix_animations/solid_reactive_nexus.h +++ b/quantum/rgb_matrix_animations/solid_reactive_nexus.h @@ -11,43 +11,29 @@ RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTINEXUS) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static bool rgb_matrix_solid_reactive_multinexus_range(uint8_t start, effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); - - HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, 0 }; - uint8_t count = g_last_hit_tracker.count; - for (uint8_t i = led_min; i < led_max; i++) { - hsv.v = 0; - for (uint8_t j = start; j < count; j++) { - RGB_MATRIX_TEST_LED_FLAGS(); - int16_t dx = g_led_config.point[i].x - g_last_hit_tracker.x[j]; - int16_t dy = g_led_config.point[i].y - g_last_hit_tracker.y[j]; - uint8_t dist = sqrt16(dx * dx + dy * dy); - int16_t dist2 = 8; - uint16_t effect = scale16by8(g_last_hit_tracker.tick[j], rgb_matrix_config.speed) - dist; - if (effect > 255) +static void SOLID_REACTIVE_NEXUS_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { + uint16_t effect = tick - dist; + if (effect > 255) effect = 255; - if (dist > 72) + if (dist > 72) effect = 255; - if ((dx > dist2 || dx < -dist2) && (dy > dist2 || dy < -dist2)) + if ((dx > 8 || dx < -8) && (dy > 8 || dy < -8)) effect = 255; - hsv.v = qadd8(hsv.v, 255 - effect); - hsv.h = rgb_matrix_config.hue + dy / 4; - } - hsv.v = scale8(hsv.v, rgb_matrix_config.val); - RGB rgb = hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; -} - -bool SOLID_REACTIVE_MULTINEXUS(effect_params_t* params) { - return rgb_matrix_solid_reactive_multinexus_range(0, params); + hsv->v = qadd8(hsv->v, 255 - effect); + hsv->h = rgb_matrix_config.hue + dy / 4; } +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS bool SOLID_REACTIVE_NEXUS(effect_params_t* params) { - return rgb_matrix_solid_reactive_multinexus_range(qsub8(g_last_hit_tracker.count, 1), params); + return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_NEXUS_math); } +#endif + +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +bool SOLID_REACTIVE_MULTINEXUS(effect_params_t* params) { + return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_NEXUS_math); +} +#endif #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS #endif // !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS) diff --git a/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h b/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h index f235824e2..36c6ec527 100644 --- a/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h +++ b/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h @@ -3,29 +3,12 @@ RGB_MATRIX_EFFECT(SOLID_REACTIVE_SIMPLE) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS +static void SOLID_REACTIVE_SIMPLE_math(HSV* hsv, uint16_t offset) { + hsv->v = scale8(255 - offset, rgb_matrix_config.val); +} + bool SOLID_REACTIVE_SIMPLE(effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); - - HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, 0 }; - // Max tick based on speed scale ensures results from scale16by8 with rgb_matrix_config.speed are no greater than 255 - uint16_t max_tick = 65535 / rgb_matrix_config.speed; - for (uint8_t i = led_min; i < led_max; i++) { - RGB_MATRIX_TEST_LED_FLAGS(); - uint16_t tick = max_tick; - // Reverse search to find most recent key hit - for (int8_t j = g_last_hit_tracker.count - 1; j >= 0; j--) { - if (g_last_hit_tracker.index[j] == i && g_last_hit_tracker.tick[j] < tick) { - tick = g_last_hit_tracker.tick[j]; - break; - } - } - - uint16_t offset = scale16by8(tick, rgb_matrix_config.speed); - hsv.v = scale8(255 - offset, rgb_matrix_config.val); - RGB rgb = hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; + return effect_runner_reactive(params, &SOLID_REACTIVE_SIMPLE_math); } #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/solid_reactive_wide.h b/quantum/rgb_matrix_animations/solid_reactive_wide.h index ff0f6f5ec..36edc475c 100644 --- a/quantum/rgb_matrix_animations/solid_reactive_wide.h +++ b/quantum/rgb_matrix_animations/solid_reactive_wide.h @@ -11,37 +11,24 @@ RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTIWIDE) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static bool rgb_matrix_solid_reactive_multiwide_range(uint8_t start, effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); - - HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, 0 }; - uint8_t count = g_last_hit_tracker.count; - for (uint8_t i = led_min; i < led_max; i++) { - hsv.v = 0; - for (uint8_t j = start; j < count; j++) { - RGB_MATRIX_TEST_LED_FLAGS(); - int16_t dx = g_led_config.point[i].x - g_last_hit_tracker.x[j]; - int16_t dy = g_led_config.point[i].y - g_last_hit_tracker.y[j]; - uint8_t dist = sqrt16(dx * dx + dy * dy); - uint16_t effect = scale16by8(g_last_hit_tracker.tick[j], rgb_matrix_config.speed) + dist * 5; - if (effect > 255) +static void SOLID_REACTIVE_WIDE_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { + uint16_t effect = tick + dist * 5; + if (effect > 255) effect = 255; - hsv.v = qadd8(hsv.v, 255 - effect); - } - hsv.v = scale8(hsv.v, rgb_matrix_config.val); - RGB rgb = hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; -} - -bool SOLID_REACTIVE_MULTIWIDE(effect_params_t* params) { - return rgb_matrix_solid_reactive_multiwide_range(0, params); + hsv->v = qadd8(hsv->v, 255 - effect); } +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE bool SOLID_REACTIVE_WIDE(effect_params_t* params) { - return rgb_matrix_solid_reactive_multiwide_range(qsub8(g_last_hit_tracker.count, 1), params); + return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_WIDE_math); } +#endif + +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +bool SOLID_REACTIVE_MULTIWIDE(effect_params_t* params) { + return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_WIDE_math); +} +#endif #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS #endif // !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE) diff --git a/quantum/rgb_matrix_animations/solid_splash_anim.h b/quantum/rgb_matrix_animations/solid_splash_anim.h index d439bd888..84c99ff00 100644 --- a/quantum/rgb_matrix_animations/solid_splash_anim.h +++ b/quantum/rgb_matrix_animations/solid_splash_anim.h @@ -11,37 +11,24 @@ RGB_MATRIX_EFFECT(SOLID_MULTISPLASH) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static bool rgb_matrix_solid_multisplash_range(uint8_t start, effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); - - HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, 0 }; - uint8_t count = g_last_hit_tracker.count; - for (uint8_t i = led_min; i < led_max; i++) { - RGB_MATRIX_TEST_LED_FLAGS(); - hsv.v = 0; - for (uint8_t j = start; j < count; j++) { - int16_t dx = g_led_config.point[i].x - g_last_hit_tracker.x[j]; - int16_t dy = g_led_config.point[i].y - g_last_hit_tracker.y[j]; - uint8_t dist = sqrt16(dx * dx + dy * dy); - uint16_t effect = scale16by8(g_last_hit_tracker.tick[j], rgb_matrix_config.speed) - dist; - if (effect > 255) +void SOLID_SPLASH_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { + uint16_t effect = tick - dist; + if (effect > 255) effect = 255; - hsv.v = qadd8(hsv.v, 255 - effect); - } - hsv.v = scale8(hsv.v, rgb_matrix_config.val); - RGB rgb = hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; -} - -bool SOLID_MULTISPLASH(effect_params_t* params) { - return rgb_matrix_solid_multisplash_range(0, params); + hsv->v = qadd8(hsv->v, 255 - effect); } +#ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH bool SOLID_SPLASH(effect_params_t* params) { - return rgb_matrix_solid_multisplash_range(qsub8(g_last_hit_tracker.count, 1), params); + return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_SPLASH_math); } +#endif + +#ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +bool SOLID_MULTISPLASH(effect_params_t* params) { + return effect_runner_reactive_splash(0, params, &SOLID_SPLASH_math); +} +#endif #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS #endif // !defined(DISABLE_RGB_MATRIX_SPLASH) && !defined(DISABLE_RGB_MATRIX_MULTISPLASH) diff --git a/quantum/rgb_matrix_animations/splash_anim.h b/quantum/rgb_matrix_animations/splash_anim.h index 214dab68d..c4c051653 100644 --- a/quantum/rgb_matrix_animations/splash_anim.h +++ b/quantum/rgb_matrix_animations/splash_anim.h @@ -11,40 +11,25 @@ RGB_MATRIX_EFFECT(MULTISPLASH) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -static bool rgb_matrix_multisplash_range(uint8_t start, effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); - - HSV hsv = { 0, rgb_matrix_config.sat, 0 }; - uint8_t count = g_last_hit_tracker.count; - for (uint8_t i = led_min; i < led_max; i++) { - RGB_MATRIX_TEST_LED_FLAGS(); - hsv.h = rgb_matrix_config.hue; - hsv.v = 0; - for (uint8_t j = start; j < count; j++) { - int16_t dx = g_led_config.point[i].x - g_last_hit_tracker.x[j]; - int16_t dy = g_led_config.point[i].y - g_last_hit_tracker.y[j]; - uint8_t dist = sqrt16(dx * dx + dy * dy); - uint16_t effect = scale16by8(g_last_hit_tracker.tick[j], rgb_matrix_config.speed) - dist; +void SPLASH_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { + uint16_t effect = tick - dist; if (effect > 255) effect = 255; - hsv.h += effect; - hsv.v = qadd8(hsv.v, 255 - effect); - } - hsv.v = scale8(hsv.v, rgb_matrix_config.val); - RGB rgb = hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; -} - -bool MULTISPLASH(effect_params_t* params) { - return rgb_matrix_multisplash_range(0, params); + hsv->h += effect; + hsv->v = qadd8(hsv->v, 255 - effect); } +#ifndef DISABLE_RGB_MATRIX_SPLASH bool SPLASH(effect_params_t* params) { - return rgb_matrix_multisplash_range(qsub8(g_last_hit_tracker.count, 1), params); + return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SPLASH_math); } +#endif + +#ifndef DISABLE_RGB_MATRIX_MULTISPLASH +bool MULTISPLASH(effect_params_t* params) { + return effect_runner_reactive_splash(0, params, &SPLASH_math); +} +#endif #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS #endif // !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH) diff --git a/quantum/rgb_matrix_runners/effect_runner_dx_dy.h b/quantum/rgb_matrix_runners/effect_runner_dx_dy.h new file mode 100644 index 000000000..43312629d --- /dev/null +++ b/quantum/rgb_matrix_runners/effect_runner_dx_dy.h @@ -0,0 +1,19 @@ +#pragma once + +typedef void (*dx_dy_f)(HSV* hsv, int16_t dx, int16_t dy, uint8_t time); + +bool effect_runner_dx_dy(effect_params_t* params, dx_dy_f effect_func) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 2); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + int16_t dx = g_led_config.point[i].x - k_rgb_matrix_center.x; + int16_t dy = g_led_config.point[i].y - k_rgb_matrix_center.y; + effect_func(&hsv, dx, dy, time); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} diff --git a/quantum/rgb_matrix_runners/effect_runner_dx_dy_dist.h b/quantum/rgb_matrix_runners/effect_runner_dx_dy_dist.h new file mode 100644 index 000000000..a7310c853 --- /dev/null +++ b/quantum/rgb_matrix_runners/effect_runner_dx_dy_dist.h @@ -0,0 +1,20 @@ +#pragma once + +typedef void (*dx_dy_dist_f)(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time); + +bool effect_runner_dx_dy_dist(effect_params_t* params, dx_dy_dist_f effect_func) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 2); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + int16_t dx = g_led_config.point[i].x - k_rgb_matrix_center.x; + int16_t dy = g_led_config.point[i].y - k_rgb_matrix_center.y; + uint8_t dist = sqrt16(dx * dx + dy * dy); + effect_func(&hsv, dx, dy, dist, time); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} diff --git a/quantum/rgb_matrix_runners/effect_runner_i.h b/quantum/rgb_matrix_runners/effect_runner_i.h new file mode 100644 index 000000000..85405ba1b --- /dev/null +++ b/quantum/rgb_matrix_runners/effect_runner_i.h @@ -0,0 +1,17 @@ +#pragma once + +typedef void (*i_f)(HSV* hsv, uint8_t i, uint8_t time); + +bool effect_runner_i(effect_params_t* params, i_f effect_func) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + effect_func(&hsv, i, time); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} diff --git a/quantum/rgb_matrix_runners/effect_runner_reactive.h b/quantum/rgb_matrix_runners/effect_runner_reactive.h new file mode 100644 index 000000000..94cd7d545 --- /dev/null +++ b/quantum/rgb_matrix_runners/effect_runner_reactive.h @@ -0,0 +1,31 @@ +#pragma once + +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED + +typedef void (*reactive_f)(HSV* hsv, uint16_t offset); + +bool effect_runner_reactive(effect_params_t* params, reactive_f effect_func) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; + uint16_t max_tick = 65535 / rgb_matrix_config.speed; + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + uint16_t tick = max_tick; + // Reverse search to find most recent key hit + for (int8_t j = g_last_hit_tracker.count - 1; j >= 0; j--) { + if (g_last_hit_tracker.index[j] == i && g_last_hit_tracker.tick[j] < tick) { + tick = g_last_hit_tracker.tick[j]; + break; + } + } + + uint16_t offset = scale16by8(tick, rgb_matrix_config.speed); + effect_func(&hsv, offset); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix_runners/effect_runner_reactive_splash.h b/quantum/rgb_matrix_runners/effect_runner_reactive_splash.h new file mode 100644 index 000000000..cb2b0d794 --- /dev/null +++ b/quantum/rgb_matrix_runners/effect_runner_reactive_splash.h @@ -0,0 +1,30 @@ +#pragma once + +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED + +typedef void (*reactive_splash_f)(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick); + +bool effect_runner_reactive_splash(uint8_t start, effect_params_t* params, reactive_splash_f effect_func) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { 0, rgb_matrix_config.sat, 0 }; + uint8_t count = g_last_hit_tracker.count; + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + hsv.h = rgb_matrix_config.hue; + hsv.v = 0; + for (uint8_t j = start; j < count; j++) { + int16_t dx = g_led_config.point[i].x - g_last_hit_tracker.x[j]; + int16_t dy = g_led_config.point[i].y - g_last_hit_tracker.y[j]; + uint8_t dist = sqrt16(dx * dx + dy * dy); + uint16_t tick = scale16by8(g_last_hit_tracker.tick[j], rgb_matrix_config.speed); + effect_func(&hsv, dx, dy, dist, tick); + } + hsv.v = scale8(hsv.v, rgb_matrix_config.val); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix_runners/effect_runner_sin_cos_i.h b/quantum/rgb_matrix_runners/effect_runner_sin_cos_i.h new file mode 100644 index 000000000..54e4c6d86 --- /dev/null +++ b/quantum/rgb_matrix_runners/effect_runner_sin_cos_i.h @@ -0,0 +1,19 @@ +#pragma once + +typedef void (*sin_cos_i_f)(HSV* hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time); + +bool effect_runner_sin_cos_i(effect_params_t* params, sin_cos_i_f effect_func) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; + uint16_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); + int8_t cos_value = cos8(time) - 128; + int8_t sin_value = sin8(time) - 128; + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + effect_func(&hsv, cos_value, sin_value, i, time); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} From 1435a2ca61f0c00d9784ea2f43fd455c96a295c7 Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Sun, 19 May 2019 18:11:18 -0500 Subject: [PATCH 085/341] Update my Quefrency/KBD67 keymaps, adding BDN9 macropad keymap as well (#5924) * Set Quefrency bootloader correctly for Elite-C * Update Quefrency layout to be more like HHKB * Update KBD67 layout to be more like HHKB * Add keymap for BDN9 macropad --- .../kbd67/hotswap/keymaps/bcat/keymap.c | 4 +- .../kbd67/hotswap/keymaps/bcat/readme.md | 2 +- keyboards/keebio/bdn9/keymaps/bcat/keymap.c | 43 +++++++++++++++++++ keyboards/keebio/bdn9/keymaps/bcat/readme.md | 7 +++ .../keebio/quefrency/keymaps/bcat/keymap.c | 4 +- .../keebio/quefrency/keymaps/bcat/readme.md | 2 +- .../keebio/quefrency/keymaps/bcat/rules.mk | 2 + 7 files changed, 58 insertions(+), 6 deletions(-) create mode 100644 keyboards/keebio/bdn9/keymaps/bcat/keymap.c create mode 100644 keyboards/keebio/bdn9/keymaps/bcat/readme.md diff --git a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c index de18f2ff4..0f8d05efb 100644 --- a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c @@ -20,8 +20,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Function layer: http://www.keyboard-layout-editor.com/#/gists/f29128427f674c43777f045e363d1b44 */ [LAYER_FUNCTION] = LAYOUT( - _______, 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_MPLY, KC_VOLU, KC_MSTP, _______, _______, EEP_RST, _______, _______, KC_INS, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, _______, \ + _______, 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_INS, KC_DEL, _______, \ + _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, EEP_RST, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ KC_CAPS, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, KC_APP, _______, _______, _______, _______ \ diff --git a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md index 88b9742a6..0aa6fa136 100644 --- a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md @@ -10,4 +10,4 @@ cluster. ## Function layer -![Function layer layout](https://i.imgur.com/K5Z5qbw.png) +![Function layer layout](https://i.imgur.com/KScatX6.png) diff --git a/keyboards/keebio/bdn9/keymaps/bcat/keymap.c b/keyboards/keebio/bdn9/keymaps/bcat/keymap.c new file mode 100644 index 000000000..06d5e83bd --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/bcat/keymap.c @@ -0,0 +1,43 @@ +#include QMK_KEYBOARD_H + +enum layer { + LAYER_FIRST, + LAYER_SECOND, +}; + +/* Switch to second layer when held. */ +#define LY_SECND MO(LAYER_SECOND) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* First layer (F1-F6) */ + [LAYER_FIRST] = LAYOUT( + KC_MUTE, LY_SECND, BL_TOGG, \ + KC_F4, KC_F5, KC_F6, \ + KC_F1, KC_F2, KC_F3 \ + ), + + /* Second layer (F7-F12) */ + [LAYER_SECOND] = LAYOUT( + _______, _______, _______, \ + KC_F10, KC_F11, KC_F12, \ + KC_F7, KC_F8, KC_F9 \ + ), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + switch (index) { + /* Top-left encoder (volume): */ + case 0: + tap_code(clockwise ? KC_VOLU : KC_VOLD); + break; + + /* Top-right encoder (backlight brightness): */ + case 1: + if (clockwise) { + backlight_increase(); + } else { + backlight_decrease(); + } + break; + } +} diff --git a/keyboards/keebio/bdn9/keymaps/bcat/readme.md b/keyboards/keebio/bdn9/keymaps/bcat/readme.md new file mode 100644 index 000000000..277d9bfb1 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/bcat/readme.md @@ -0,0 +1,7 @@ +# bcat's BDN9 layout + +This is a simple macropad with seven keys and two rotary encoders. We use one +encoder for volume and the other for backlight brightness. Six of the keys are +F keys (for gaming, since I use keyboards without function keys normally), with +the remaining key a layer toggle that switches the function keys between F1-F6 +and F7-F12. diff --git a/keyboards/keebio/quefrency/keymaps/bcat/keymap.c b/keyboards/keebio/quefrency/keymaps/bcat/keymap.c index 28818c96f..c9431ba91 100644 --- a/keyboards/keebio/quefrency/keymaps/bcat/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/bcat/keymap.c @@ -24,8 +24,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Function layer: http://www.keyboard-layout-editor.com/#/gists/59636898946da51f91fb290f8e078b4d */ [LAYER_FUNCTION] = LAYOUT_65( - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, RGB_HUI, \ - _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, EEP_RST, _______, _______, KC_INS, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, RGB_SAI, \ + _______, 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_INS, KC_DEL, RGB_HUI, \ + _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, EEP_RST, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, RGB_SAI, \ KC_CAPS, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_SAD, \ _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_HUD, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD \ diff --git a/keyboards/keebio/quefrency/keymaps/bcat/readme.md b/keyboards/keebio/quefrency/keymaps/bcat/readme.md index 1ecf42c29..51e5f2598 100644 --- a/keyboards/keebio/quefrency/keymaps/bcat/readme.md +++ b/keyboards/keebio/quefrency/keymaps/bcat/readme.md @@ -10,7 +10,7 @@ cluster, and mouse keys on their own layer centered around the arrow cluster. ## Function layer -![Function layer layout](https://i.imgur.com/Hu5wNpl.png) +![Function layer layout](https://i.imgur.com/ISklbfF.png) ## Mouse layer diff --git a/keyboards/keebio/quefrency/keymaps/bcat/rules.mk b/keyboards/keebio/quefrency/keymaps/bcat/rules.mk index 6c605daec..274e217ca 100644 --- a/keyboards/keebio/quefrency/keymaps/bcat/rules.mk +++ b/keyboards/keebio/quefrency/keymaps/bcat/rules.mk @@ -1 +1,3 @@ +BOOTLOADER = atmel-dfu # Elite-C + MOUSEKEY_ENABLE = yes From 228e7145c0a8c7415f89b2e6333529381fa3fd77 Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Sun, 19 May 2019 19:14:28 -0500 Subject: [PATCH 086/341] Remove spurious backslashes from my keymaps (#5927) Suggested in #5924. --- .../kbd67/hotswap/keymaps/bcat/keymap.c | 20 ++++++------- keyboards/keebio/bdn9/keymaps/bcat/keymap.c | 12 ++++---- .../keebio/quefrency/keymaps/bcat/keymap.c | 30 +++++++++---------- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c index 0f8d05efb..ab2cfa80a 100644 --- a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c @@ -11,19 +11,19 @@ enum layer { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Default layer: http://www.keyboard-layout-editor.com/#/gists/dd675b40cc4df2c7bb78847ac29f5988 */ [LAYER_DEFAULT] = LAYOUT( - KC_ESC, 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_BSLS, KC_GRV, KC_HOME, \ - 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_BSPC, KC_PGUP, \ - 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, KC_PGDN, \ - 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_UP, KC_END, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LY_FUNC, KC_LEFT, KC_DOWN, KC_RGHT \ + KC_ESC, 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_BSLS, KC_GRV, KC_HOME, + 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_BSPC, KC_PGUP, + 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, KC_PGDN, + 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_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LY_FUNC, KC_LEFT, KC_DOWN, KC_RGHT ), /* Function layer: http://www.keyboard-layout-editor.com/#/gists/f29128427f674c43777f045e363d1b44 */ [LAYER_FUNCTION] = LAYOUT( - _______, 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_INS, KC_DEL, _______, \ - _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, EEP_RST, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ - KC_CAPS, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, KC_APP, _______, _______, _______, _______ \ + _______, 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_INS, KC_DEL, _______, + _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, EEP_RST, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, + KC_CAPS, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_APP, _______, _______, _______, _______ ), }; diff --git a/keyboards/keebio/bdn9/keymaps/bcat/keymap.c b/keyboards/keebio/bdn9/keymaps/bcat/keymap.c index 06d5e83bd..3507aaede 100644 --- a/keyboards/keebio/bdn9/keymaps/bcat/keymap.c +++ b/keyboards/keebio/bdn9/keymaps/bcat/keymap.c @@ -11,16 +11,16 @@ enum layer { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* First layer (F1-F6) */ [LAYER_FIRST] = LAYOUT( - KC_MUTE, LY_SECND, BL_TOGG, \ - KC_F4, KC_F5, KC_F6, \ - KC_F1, KC_F2, KC_F3 \ + KC_MUTE, LY_SECND, BL_TOGG, + KC_F4, KC_F5, KC_F6, + KC_F1, KC_F2, KC_F3 ), /* Second layer (F7-F12) */ [LAYER_SECOND] = LAYOUT( - _______, _______, _______, \ - KC_F10, KC_F11, KC_F12, \ - KC_F7, KC_F8, KC_F9 \ + _______, _______, _______, + KC_F10, KC_F11, KC_F12, + KC_F7, KC_F8, KC_F9 ), }; diff --git a/keyboards/keebio/quefrency/keymaps/bcat/keymap.c b/keyboards/keebio/quefrency/keymaps/bcat/keymap.c index c9431ba91..80e934577 100644 --- a/keyboards/keebio/quefrency/keymaps/bcat/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/bcat/keymap.c @@ -15,28 +15,28 @@ enum layer { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Default layer: http://www.keyboard-layout-editor.com/#/gists/60a262432bb340b37d364a4424f3037b */ [LAYER_DEFAULT] = LAYOUT_65( - KC_ESC, 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_BSLS, KC_GRV, KC_HOME, \ - 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_BSPC, KC_PGUP, \ - 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, KC_PGDN, \ - 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_UP, KC_END, \ - KC_LCTL, KC_LGUI, KC_LALT, LY_FUNC, KC_SPC, KC_SPC, XXXXXXX, KC_RALT, LY_FUNC, LY_MOUSE, KC_LEFT, KC_DOWN, KC_RGHT \ + KC_ESC, 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_BSLS, KC_GRV, KC_HOME, + 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_BSPC, KC_PGUP, + 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, KC_PGDN, + 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_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, LY_FUNC, KC_SPC, KC_SPC, XXXXXXX, KC_RALT, LY_FUNC, LY_MOUSE, KC_LEFT, KC_DOWN, KC_RGHT ), /* Function layer: http://www.keyboard-layout-editor.com/#/gists/59636898946da51f91fb290f8e078b4d */ [LAYER_FUNCTION] = LAYOUT_65( - _______, 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_INS, KC_DEL, RGB_HUI, \ - _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, EEP_RST, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, RGB_SAI, \ - KC_CAPS, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_SAD, \ - _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_HUD, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD \ + _______, 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_INS, KC_DEL, RGB_HUI, + _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, EEP_RST, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, RGB_SAI, + KC_CAPS, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_SAD, + _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_HUD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD ), /* Mouse layer: http://www.keyboard-layout-editor.com/#/gists/05b9fbe8a34f65ed85ded659b3941152 */ [LAYER_MOUSE] = LAYOUT_65( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN3, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_U, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_D, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN3, KC_BTN1, KC_MS_U, KC_BTN2, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN3, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_U, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_D, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN3, KC_BTN1, KC_MS_U, KC_BTN2, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R ), }; From cd826e39d27353aa0ba1e5cd53dd957902703e25 Mon Sep 17 00:00:00 2001 From: jotix <47826561+jotix@users.noreply.github.com> Date: Mon, 20 May 2019 12:22:20 -0300 Subject: [PATCH 087/341] vim style cursor keys (#5932) --- layouts/community/ortho_4x12/jotix/keymap.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/layouts/community/ortho_4x12/jotix/keymap.c b/layouts/community/ortho_4x12/jotix/keymap.c index faaa0d0ee..16120e7d8 100644 --- a/layouts/community/ortho_4x12/jotix/keymap.c +++ b/layouts/community/ortho_4x12/jotix/keymap.c @@ -126,16 +126,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * | tab | A | S | D | F | G | H | J | K | L | ; | del | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | lshift | Z | X | C | V | B | N | M | , | . | up | enter | + * | lshift | Z | X | C | V | B | N | M | , | . | / | enter | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | lctrl | lalt | lower | unic | lgui | space | space | raise | / | left | down | right | + * | lctrl | lalt | lower | unic | lgui | space | space | raise | left | down | up | right | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ */ [_QWERTY] = LAYOUT_ortho_4x12 ( 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_DEL, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT, - KC_LCTL, KC_LALT, LOWER, UNICODE, KC_LGUI, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LCTL, KC_LALT, LOWER, UNICODE, KC_LGUI, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Lower @@ -162,16 +162,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * | caps | | | | | | \ | - | = | [ | ] | | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | | | | | | ` | | | | pgup | | + * | | | | | | | ` | | | | | | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | | | | | | | | | home | pgdn | end | + * | | | | | | | | | home | pgdn | pgup | end | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ */ [_RAISE] = LAYOUT_ortho_4x12 ( _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, KC_CAPS, _______, _______, _______, _______, _______, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, - _______, _______, _______, _______, _______, _______, KC_GRV, KC_QUOT, _______, _______, KC_PGUP, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + _______, _______, _______, _______, _______, _______, KC_GRV, KC_QUOT, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END ), /* @@ -180,8 +180,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_UNICODE] = LAYOUT_ortho_4x12 ( _______, X(EXCL), X(WORR), E_UNIC, X(EURO), X(TONG), Y_UNIC, U_UNIC, I_UNIC, O_UNIC, X(POUN), _______, _______, A_UNIC, X(SMIL), X(DISS), X(SCRE), X(DEGR), X(SMIH), X(NOT), X(QUAR), X(HALF), ORD_UN, _______, - _______, X(DIZY), X(ANGR), X(COPY), X(QUAD), X(CUBE), N_UNIC, X(NEUT), X(LDQU), X(RDQU), X(ARRU), _______, - _______, _______, _______, _______, _______, _______, _______, _______, X(QUES), X(ARRL), X(ARRD), X(ARRR) + _______, X(DIZY), X(ANGR), X(COPY), X(QUAD), X(CUBE), N_UNIC, X(NEUT), X(LDQU), X(RDQU), X(QUES), _______, + _______, _______, _______, _______, _______, _______, _______, _______, X(ARRU), X(ARRL), X(ARRD), X(ARRR) ), /* From 566b8c57b1ded327ee462c552563026b0f6fa20e Mon Sep 17 00:00:00 2001 From: Danny Date: Mon, 20 May 2019 13:16:40 -0400 Subject: [PATCH 088/341] [Keyboard] Fix pinout of Levinson Rev 1 scrap sale boards to use non-jumpered pinout (#5935) --- keyboards/keebio/levinson/rev1/config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/keebio/levinson/rev1/config.h b/keyboards/keebio/levinson/rev1/config.h index 0359796fe..eec95f727 100644 --- a/keyboards/keebio/levinson/rev1/config.h +++ b/keyboards/keebio/levinson/rev1/config.h @@ -36,7 +36,7 @@ along with this program. If not, see . // wiring of each half #define MATRIX_ROW_PINS { D7, E6, B4, B5 } -#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, F4 } +#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } /* Set 0 if debouncing isn't needed */ #define DEBOUNCING_DELAY 5 @@ -55,5 +55,5 @@ along with this program. If not, see . #define RGBLED_NUM 12 // Number of LEDs /* Backlight LEDs */ -#define BACKLIGHT_PIN B6 +#define BACKLIGHT_PIN C6 #define BACKLIGHT_LEVELS 7 From 843c67d805b72e9bbfaa14f0ef93f1506c1fcc98 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 20 May 2019 15:19:31 -0700 Subject: [PATCH 089/341] Plain60: Configurator layout extension (#5929) * Add LAYOUT_60_ansi * Add LAYOUT_60_iso * Add LAYOUT_60_ansi_split_bs_rshift * Add LAYOUT_60_iso_split_bs_rshift * Enable Community Layout support Added: - 60_ansi - 60_ansi_split_bs_rshift - 60_iso * Add LAYOUT_60_hhkb and enable its community layout support --- keyboards/plain60/info.json | 335 ++++++++++++++++++++++++++++++++++++ keyboards/plain60/plain60.h | 75 ++++++++ keyboards/plain60/rules.mk | 2 + 3 files changed, 412 insertions(+) diff --git a/keyboards/plain60/info.json b/keyboards/plain60/info.json index dca4b3cdc..91eab457a 100644 --- a/keyboards/plain60/info.json +++ b/keyboards/plain60/info.json @@ -74,6 +74,341 @@ {"label":"k4c", "x":12.5, "y":4, "w":1.25}, {"label":"k4d", "x":13.75, "y":4, "w":1.25} ] + }, + "LAYOUT_60_ansi": { + "key_count": 61, + "layout": [ + {"label":"k00", "x":0, "y":0}, + {"label":"k01", "x":1, "y":0}, + {"label":"k02", "x":2, "y":0}, + {"label":"k03", "x":3, "y":0}, + {"label":"k04", "x":4, "y":0}, + {"label":"k05", "x":5, "y":0}, + {"label":"k06", "x":6, "y":0}, + {"label":"k07", "x":7, "y":0}, + {"label":"k08", "x":8, "y":0}, + {"label":"k09", "x":9, "y":0}, + {"label":"k0a", "x":10, "y":0}, + {"label":"k0b", "x":11, "y":0}, + {"label":"k0c", "x":12, "y":0}, + {"label":"k0e", "x":13, "y":0, "w":2}, + {"label":"k10", "x":0, "y":1, "w":1.5}, + {"label":"k11", "x":1.5, "y":1}, + {"label":"k12", "x":2.5, "y":1}, + {"label":"k13", "x":3.5, "y":1}, + {"label":"k14", "x":4.5, "y":1}, + {"label":"k15", "x":5.5, "y":1}, + {"label":"k16", "x":6.5, "y":1}, + {"label":"k17", "x":7.5, "y":1}, + {"label":"k18", "x":8.5, "y":1}, + {"label":"k19", "x":9.5, "y":1}, + {"label":"k1a", "x":10.5, "y":1}, + {"label":"k1b", "x":11.5, "y":1}, + {"label":"k1c", "x":12.5, "y":1}, + {"label":"k1d", "x":13.5, "y":1, "w":1.5}, + {"label":"k20", "x":0, "y":2, "w":1.75}, + {"label":"k21", "x":1.75, "y":2}, + {"label":"k22", "x":2.75, "y":2}, + {"label":"k23", "x":3.75, "y":2}, + {"label":"k24", "x":4.75, "y":2}, + {"label":"k25", "x":5.75, "y":2}, + {"label":"k26", "x":6.75, "y":2}, + {"label":"k27", "x":7.75, "y":2}, + {"label":"k28", "x":8.75, "y":2}, + {"label":"k29", "x":9.75, "y":2}, + {"label":"k2a", "x":10.75, "y":2}, + {"label":"k2b", "x":11.75, "y":2}, + {"label":"k2d", "x":12.75, "y":2, "w":2.25}, + {"label":"k30", "x":0, "y":3, "w":2.25}, + {"label":"k32", "x":2.25, "y":3}, + {"label":"k33", "x":3.25, "y":3}, + {"label":"k34", "x":4.25, "y":3}, + {"label":"k35", "x":5.25, "y":3}, + {"label":"k36", "x":6.25, "y":3}, + {"label":"k37", "x":7.25, "y":3}, + {"label":"k38", "x":8.25, "y":3}, + {"label":"k39", "x":9.25, "y":3}, + {"label":"k3a", "x":10.25, "y":3}, + {"label":"k3b", "x":11.25, "y":3}, + {"label":"k3c", "x":12.25, "y":3, "w":2.75}, + {"label":"k40", "x":0, "y":4, "w":1.25}, + {"label":"k41", "x":1.25, "y":4, "w":1.25}, + {"label":"k42", "x":2.5, "y":4, "w":1.25}, + {"label":"k46", "x":3.75, "y":4, "w":6.25}, + {"label":"k4a", "x":10, "y":4, "w":1.25}, + {"label":"k4b", "x":11.25, "y":4, "w":1.25}, + {"label":"k4c", "x":12.5, "y":4, "w":1.25}, + {"label":"k4d", "x":13.75, "y":4, "w":1.25} + ] + }, + "LAYOUT_60_ansi_split_bs_rshift": { + "key_count": 63, + "layout": [ + {"label":"k00", "x":0, "y":0}, + {"label":"k01", "x":1, "y":0}, + {"label":"k02", "x":2, "y":0}, + {"label":"k03", "x":3, "y":0}, + {"label":"k04", "x":4, "y":0}, + {"label":"k05", "x":5, "y":0}, + {"label":"k06", "x":6, "y":0}, + {"label":"k07", "x":7, "y":0}, + {"label":"k08", "x":8, "y":0}, + {"label":"k09", "x":9, "y":0}, + {"label":"k0a", "x":10, "y":0}, + {"label":"k0b", "x":11, "y":0}, + {"label":"k0c", "x":12, "y":0}, + {"label":"k0d", "x":13, "y":0}, + {"label":"k0e", "x":14, "y":0}, + {"label":"k10", "x":0, "y":1, "w":1.5}, + {"label":"k11", "x":1.5, "y":1}, + {"label":"k12", "x":2.5, "y":1}, + {"label":"k13", "x":3.5, "y":1}, + {"label":"k14", "x":4.5, "y":1}, + {"label":"k15", "x":5.5, "y":1}, + {"label":"k16", "x":6.5, "y":1}, + {"label":"k17", "x":7.5, "y":1}, + {"label":"k18", "x":8.5, "y":1}, + {"label":"k19", "x":9.5, "y":1}, + {"label":"k1a", "x":10.5, "y":1}, + {"label":"k1b", "x":11.5, "y":1}, + {"label":"k1c", "x":12.5, "y":1}, + {"label":"k1d", "x":13.5, "y":1, "w":1.5}, + {"label":"k20", "x":0, "y":2, "w":1.75}, + {"label":"k21", "x":1.75, "y":2}, + {"label":"k22", "x":2.75, "y":2}, + {"label":"k23", "x":3.75, "y":2}, + {"label":"k24", "x":4.75, "y":2}, + {"label":"k25", "x":5.75, "y":2}, + {"label":"k26", "x":6.75, "y":2}, + {"label":"k27", "x":7.75, "y":2}, + {"label":"k28", "x":8.75, "y":2}, + {"label":"k29", "x":9.75, "y":2}, + {"label":"k2a", "x":10.75, "y":2}, + {"label":"k2b", "x":11.75, "y":2}, + {"label":"k2d", "x":12.75, "y":2, "w":2.25}, + {"label":"k30", "x":0, "y":3, "w":2.25}, + {"label":"k32", "x":2.25, "y":3}, + {"label":"k33", "x":3.25, "y":3}, + {"label":"k34", "x":4.25, "y":3}, + {"label":"k35", "x":5.25, "y":3}, + {"label":"k36", "x":6.25, "y":3}, + {"label":"k37", "x":7.25, "y":3}, + {"label":"k38", "x":8.25, "y":3}, + {"label":"k39", "x":9.25, "y":3}, + {"label":"k3a", "x":10.25, "y":3}, + {"label":"k3b", "x":11.25, "y":3}, + {"label":"k3c", "x":12.25, "y":3, "w":1.75}, + {"label":"k3d", "x":14, "y":3}, + {"label":"k40", "x":0, "y":4, "w":1.25}, + {"label":"k41", "x":1.25, "y":4, "w":1.25}, + {"label":"k42", "x":2.5, "y":4, "w":1.25}, + {"label":"k46", "x":3.75, "y":4, "w":6.25}, + {"label":"k4a", "x":10, "y":4, "w":1.25}, + {"label":"k4b", "x":11.25, "y":4, "w":1.25}, + {"label":"k4c", "x":12.5, "y":4, "w":1.25}, + {"label":"k4d", "x":13.75, "y":4, "w":1.25} + ] + }, + "LAYOUT_60_hhkb": { + "key_count": 60, + "layout": [ + {"label":"k00", "x":0, "y":0}, + {"label":"k01", "x":1, "y":0}, + {"label":"k02", "x":2, "y":0}, + {"label":"k03", "x":3, "y":0}, + {"label":"k04", "x":4, "y":0}, + {"label":"k05", "x":5, "y":0}, + {"label":"k06", "x":6, "y":0}, + {"label":"k07", "x":7, "y":0}, + {"label":"k08", "x":8, "y":0}, + {"label":"k09", "x":9, "y":0}, + {"label":"k0a", "x":10, "y":0}, + {"label":"k0b", "x":11, "y":0}, + {"label":"k0c", "x":12, "y":0}, + {"label":"k0d", "x":13, "y":0}, + {"label":"k0e", "x":14, "y":0}, + {"label":"k10", "x":0, "y":1, "w":1.5}, + {"label":"k11", "x":1.5, "y":1}, + {"label":"k12", "x":2.5, "y":1}, + {"label":"k13", "x":3.5, "y":1}, + {"label":"k14", "x":4.5, "y":1}, + {"label":"k15", "x":5.5, "y":1}, + {"label":"k16", "x":6.5, "y":1}, + {"label":"k17", "x":7.5, "y":1}, + {"label":"k18", "x":8.5, "y":1}, + {"label":"k19", "x":9.5, "y":1}, + {"label":"k1a", "x":10.5, "y":1}, + {"label":"k1b", "x":11.5, "y":1}, + {"label":"k1c", "x":12.5, "y":1}, + {"label":"k1d", "x":13.5, "y":1, "w":1.5}, + {"label":"k20", "x":0, "y":2, "w":1.75}, + {"label":"k21", "x":1.75, "y":2}, + {"label":"k22", "x":2.75, "y":2}, + {"label":"k23", "x":3.75, "y":2}, + {"label":"k24", "x":4.75, "y":2}, + {"label":"k25", "x":5.75, "y":2}, + {"label":"k26", "x":6.75, "y":2}, + {"label":"k27", "x":7.75, "y":2}, + {"label":"k28", "x":8.75, "y":2}, + {"label":"k29", "x":9.75, "y":2}, + {"label":"k2a", "x":10.75, "y":2}, + {"label":"k2b", "x":11.75, "y":2}, + {"label":"k2d", "x":12.75, "y":2, "w":2.25}, + {"label":"k30", "x":0, "y":3, "w":2.25}, + {"label":"k32", "x":2.25, "y":3}, + {"label":"k33", "x":3.25, "y":3}, + {"label":"k34", "x":4.25, "y":3}, + {"label":"k35", "x":5.25, "y":3}, + {"label":"k36", "x":6.25, "y":3}, + {"label":"k37", "x":7.25, "y":3}, + {"label":"k38", "x":8.25, "y":3}, + {"label":"k39", "x":9.25, "y":3}, + {"label":"k3a", "x":10.25, "y":3}, + {"label":"k3b", "x":11.25, "y":3}, + {"label":"k3c", "x":12.25, "y":3, "w":1.75}, + {"label":"k3d", "x":14, "y":3}, + {"label":"k41", "x":1.5, "y":4}, + {"label":"k42", "x":2.5, "y":4, "w":1.5}, + {"label":"k46", "x":4, "y":4, "w":7}, + {"label":"k4b", "x":11, "y":4, "w":1.5}, + {"label":"k4c", "x":12.5, "y":4} + ] + }, + "LAYOUT_60_iso": { + "key_count": 62, + "layout": [ + {"label":"k00", "x":0, "y":0}, + {"label":"k01", "x":1, "y":0}, + {"label":"k02", "x":2, "y":0}, + {"label":"k03", "x":3, "y":0}, + {"label":"k04", "x":4, "y":0}, + {"label":"k05", "x":5, "y":0}, + {"label":"k06", "x":6, "y":0}, + {"label":"k07", "x":7, "y":0}, + {"label":"k08", "x":8, "y":0}, + {"label":"k09", "x":9, "y":0}, + {"label":"k0a", "x":10, "y":0}, + {"label":"k0b", "x":11, "y":0}, + {"label":"k0c", "x":12, "y":0}, + {"label":"k0e", "x":13, "y":0, "w":2}, + {"label":"k10", "x":0, "y":1, "w":1.5}, + {"label":"k11", "x":1.5, "y":1}, + {"label":"k12", "x":2.5, "y":1}, + {"label":"k13", "x":3.5, "y":1}, + {"label":"k14", "x":4.5, "y":1}, + {"label":"k15", "x":5.5, "y":1}, + {"label":"k16", "x":6.5, "y":1}, + {"label":"k17", "x":7.5, "y":1}, + {"label":"k18", "x":8.5, "y":1}, + {"label":"k19", "x":9.5, "y":1}, + {"label":"k1a", "x":10.5, "y":1}, + {"label":"k1b", "x":11.5, "y":1}, + {"label":"k1c", "x":12.5, "y":1}, + {"label":"k20", "x":0, "y":2, "w":1.75}, + {"label":"k21", "x":1.75, "y":2}, + {"label":"k22", "x":2.75, "y":2}, + {"label":"k23", "x":3.75, "y":2}, + {"label":"k24", "x":4.75, "y":2}, + {"label":"k25", "x":5.75, "y":2}, + {"label":"k26", "x":6.75, "y":2}, + {"label":"k27", "x":7.75, "y":2}, + {"label":"k28", "x":8.75, "y":2}, + {"label":"k29", "x":9.75, "y":2}, + {"label":"k2a", "x":10.75, "y":2}, + {"label":"k2b", "x":11.75, "y":2}, + {"label":"k2c", "x":12.75, "y":2}, + {"label":"k2d", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"k30", "x":0, "y":3, "w":1.25}, + {"label":"k31", "x":1.25, "y":3}, + {"label":"k32", "x":2.25, "y":3}, + {"label":"k33", "x":3.25, "y":3}, + {"label":"k34", "x":4.25, "y":3}, + {"label":"k35", "x":5.25, "y":3}, + {"label":"k36", "x":6.25, "y":3}, + {"label":"k37", "x":7.25, "y":3}, + {"label":"k38", "x":8.25, "y":3}, + {"label":"k39", "x":9.25, "y":3}, + {"label":"k3a", "x":10.25, "y":3}, + {"label":"k3b", "x":11.25, "y":3}, + {"label":"k3c", "x":12.25, "y":3, "w":2.75}, + {"label":"k40", "x":0, "y":4, "w":1.25}, + {"label":"k41", "x":1.25, "y":4, "w":1.25}, + {"label":"k42", "x":2.5, "y":4, "w":1.25}, + {"label":"k46", "x":3.75, "y":4, "w":6.25}, + {"label":"k4a", "x":10, "y":4, "w":1.25}, + {"label":"k4b", "x":11.25, "y":4, "w":1.25}, + {"label":"k4c", "x":12.5, "y":4, "w":1.25}, + {"label":"k4d", "x":13.75, "y":4, "w":1.25} + ] + }, + "LAYOUT_60_iso_split_bs_rshift": { + "key_count": 64, + "layout": [ + {"label":"k00", "x":0, "y":0}, + {"label":"k01", "x":1, "y":0}, + {"label":"k02", "x":2, "y":0}, + {"label":"k03", "x":3, "y":0}, + {"label":"k04", "x":4, "y":0}, + {"label":"k05", "x":5, "y":0}, + {"label":"k06", "x":6, "y":0}, + {"label":"k07", "x":7, "y":0}, + {"label":"k08", "x":8, "y":0}, + {"label":"k09", "x":9, "y":0}, + {"label":"k0a", "x":10, "y":0}, + {"label":"k0b", "x":11, "y":0}, + {"label":"k0c", "x":12, "y":0}, + {"label":"k0d", "x":13, "y":0}, + {"label":"k0e", "x":14, "y":0}, + {"label":"k10", "x":0, "y":1, "w":1.5}, + {"label":"k11", "x":1.5, "y":1}, + {"label":"k12", "x":2.5, "y":1}, + {"label":"k13", "x":3.5, "y":1}, + {"label":"k14", "x":4.5, "y":1}, + {"label":"k15", "x":5.5, "y":1}, + {"label":"k16", "x":6.5, "y":1}, + {"label":"k17", "x":7.5, "y":1}, + {"label":"k18", "x":8.5, "y":1}, + {"label":"k19", "x":9.5, "y":1}, + {"label":"k1a", "x":10.5, "y":1}, + {"label":"k1b", "x":11.5, "y":1}, + {"label":"k1c", "x":12.5, "y":1}, + {"label":"k20", "x":0, "y":2, "w":1.75}, + {"label":"k21", "x":1.75, "y":2}, + {"label":"k22", "x":2.75, "y":2}, + {"label":"k23", "x":3.75, "y":2}, + {"label":"k24", "x":4.75, "y":2}, + {"label":"k25", "x":5.75, "y":2}, + {"label":"k26", "x":6.75, "y":2}, + {"label":"k27", "x":7.75, "y":2}, + {"label":"k28", "x":8.75, "y":2}, + {"label":"k29", "x":9.75, "y":2}, + {"label":"k2a", "x":10.75, "y":2}, + {"label":"k2b", "x":11.75, "y":2}, + {"label":"k2c", "x":12.75, "y":2}, + {"label":"k2d", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"k30", "x":0, "y":3, "w":1.25}, + {"label":"k31", "x":1.25, "y":3}, + {"label":"k32", "x":2.25, "y":3}, + {"label":"k33", "x":3.25, "y":3}, + {"label":"k34", "x":4.25, "y":3}, + {"label":"k35", "x":5.25, "y":3}, + {"label":"k36", "x":6.25, "y":3}, + {"label":"k37", "x":7.25, "y":3}, + {"label":"k38", "x":8.25, "y":3}, + {"label":"k39", "x":9.25, "y":3}, + {"label":"k3a", "x":10.25, "y":3}, + {"label":"k3b", "x":11.25, "y":3}, + {"label":"k3c", "x":12.25, "y":3, "w":1.75}, + {"label":"k3d", "x":14, "y":3}, + {"label":"k40", "x":0, "y":4, "w":1.25}, + {"label":"k41", "x":1.25, "y":4, "w":1.25}, + {"label":"k42", "x":2.5, "y":4, "w":1.25}, + {"label":"k46", "x":3.75, "y":4, "w":6.25}, + {"label":"k4a", "x":10, "y":4, "w":1.25}, + {"label":"k4b", "x":11.25, "y":4, "w":1.25}, + {"label":"k4c", "x":12.5, "y":4, "w":1.25}, + {"label":"k4d", "x":13.75, "y":4, "w":1.25} + ] } } } diff --git a/keyboards/plain60/plain60.h b/keyboards/plain60/plain60.h index f7b497bab..4893e7ad7 100644 --- a/keyboards/plain60/plain60.h +++ b/keyboards/plain60/plain60.h @@ -20,5 +20,80 @@ {k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, k4c, k4d, XXX} \ } +#define LAYOUT_60_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k41, k42, k46, k4a, k4b, k4c, k4d \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, XXX, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, XXX}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, XXX}, \ + {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, XXX, XXX}, \ + {k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, k4c, k4d, XXX} \ +} + +#define LAYOUT_60_ansi_split_bs_rshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k41, k42, k46, k4a, k4b, k4c, k4d \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, XXX}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, XXX}, \ + {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, XXX, XXX}, \ + {k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, k4c, k4d, XXX} \ +} + +#define LAYOUT_60_hhkb( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k41, k42, k46, k4b, k4c \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, XXX}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, XXX}, \ + {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, XXX, XXX}, \ + {XXX, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4b, k4c, XXX, XXX} \ +} + +#define LAYOUT_60_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k41, k42, k46, k4a, k4b, k4c, k4d \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, XXX, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, XXX, XXX}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, XXX}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, XXX, XXX}, \ + {k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, k4c, k4d, XXX} \ +} + +#define LAYOUT_60_iso_split_bs_rshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k41, k42, k46, k4a, k4b, k4c, k4d \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, XXX, XXX}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, XXX}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, XXX}, \ + {k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, k4c, k4d, XXX} \ +} + void matrix_init_user(void); void matrix_scan_user(void); diff --git a/keyboards/plain60/rules.mk b/keyboards/plain60/rules.mk index a1a0e9ca1..da9cb9fbd 100644 --- a/keyboards/plain60/rules.mk +++ b/keyboards/plain60/rules.mk @@ -64,3 +64,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RAW_ENABLE = yes DYNAMIC_KEYMAP_ENABLE = yes + +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_hhkb 60_iso From 57f5cd3ca7903a8736f79d3d08a7dc6dc75793b3 Mon Sep 17 00:00:00 2001 From: Kenneth Aloysius Date: Tue, 21 May 2019 05:43:29 +0700 Subject: [PATCH 090/341] [Keyboard] YD60MQ support (#5911) * Keep ASCII art consistent with keymap * Possible fix for xyverz ortho keymap: define RGBLED_NUM * Update DZ60 keymap; TODO store old keymap under different directory? * Change RGUI to RALT because 7u spacebar is too long * Save old bottom row keymap * Update Iris keymap: replace backslash with grv * Add ortho_4x12 layout * Added Delete key to Iris keymap * Move delete key * Oh look a new keyboard * ortho4x12: get an adjust layer back * Remove jj40 keymap, add custom power draw #define * Set WhiteFox to advertise only 100mA of power draw * Update WhiteFox keymap * Update WF keymap (2) * Remove lets_split keymap, update community krusli keymap * Add #define for BACKLIGHT_LEVELS (unused) * Update Whitefox keymap * Add YD60 from auto-generated kbfirmware files * Bring files up to speed with new standards * Fix: KEYMAP -> LAYOUT * Fix keymap differences (DZ60 -> YD60) * Update keymap * Update README * Fix RShift position * Specify that the port is for the YD60MQ variant * Update keyboards/iris/keymaps/krusli/keymap.c Co-Authored-By: fauxpark * Fix Iris and Let's Split keymaps * Remove unused keymap file * Use #include QMK_KEYBOARD_H * Add atmel-dfu selection to yd60 * Rename dir to YD60MQ, update definitions * Use new convenience macros/functions for led_set_user * Use #pragma once * Change all ?= to = in rules.mk * Use pragma once for yd60mq.h * Take out DZ60 and Iris changes * Remove now-removed Iris folder * Revert adding ortho_4x12 * Revert on xyverz ortho_4x12 keymap * Undo deleting JJ40 keymap files * Don't revert beyond upstream jj40 state * Extra files from earlier commit is to be deleted * Remove WhiteFox keymap not in upstream yet * Re-add my Let's Split keymap * Revert keymap changes * Cleanup: indentation * Update keyboards/yd60mq/rules.mk Co-Authored-By: fauxpark * Update keyboards/yd60mq/rules.mk Co-Authored-By: fauxpark * Cleanup & move kb backlighting code to yd60mq.c * Update README, rename to lowercase * Update README: rename to lowercase * Update README with links and picture of PCB * Remove PREVENT_STUCK_MODIFIERS Co-Authored-By: Drashna Jaelre --- keyboards/yd60mq/config.h | 47 +++++++++++++++++ keyboards/yd60mq/keymaps/default/keymap.c | 25 ++++++++++ keyboards/yd60mq/keymaps/krusli/keymap.c | 19 +++++++ keyboards/yd60mq/readme.md | 20 ++++++++ keyboards/yd60mq/rules.mk | 61 +++++++++++++++++++++++ keyboards/yd60mq/yd60mq.c | 13 +++++ keyboards/yd60mq/yd60mq.h | 18 +++++++ 7 files changed, 203 insertions(+) create mode 100644 keyboards/yd60mq/config.h create mode 100644 keyboards/yd60mq/keymaps/default/keymap.c create mode 100644 keyboards/yd60mq/keymaps/krusli/keymap.c create mode 100644 keyboards/yd60mq/readme.md create mode 100644 keyboards/yd60mq/rules.mk create mode 100644 keyboards/yd60mq/yd60mq.c create mode 100644 keyboards/yd60mq/yd60mq.h diff --git a/keyboards/yd60mq/config.h b/keyboards/yd60mq/config.h new file mode 100644 index 000000000..2a899fa3e --- /dev/null +++ b/keyboards/yd60mq/config.h @@ -0,0 +1,47 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER YMDK +#define PRODUCT YD60MQ +#define DESCRIPTION Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, F7, B5, B4, D7, D6, B3, B2 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B7 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 5 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* prevent stuck modifiers */ + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + diff --git a/keyboards/yd60mq/keymaps/default/keymap.c b/keyboards/yd60mq/keymaps/default/keymap.c new file mode 100644 index 000000000..a5a0145ee --- /dev/null +++ b/keyboards/yd60mq/keymaps/default/keymap.c @@ -0,0 +1,25 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_ESC, 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_BSLS, KC_GRV, + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, + KC_LSFT, KC_NUHS, 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_DEL, + KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + LAYOUT( + RESET, 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_TRNS, KC_DEL, + KC_TRNS, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} diff --git a/keyboards/yd60mq/keymaps/krusli/keymap.c b/keyboards/yd60mq/keymaps/krusli/keymap.c new file mode 100644 index 000000000..d9c276565 --- /dev/null +++ b/keyboards/yd60mq/keymaps/krusli/keymap.c @@ -0,0 +1,19 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_ESC, 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_BSLS, KC_GRV, + 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_BSPC, + 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_BSLS, KC_ENT, + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, KC_RSFT, MO(1), + KC_LCTL, KC_LALT, KC_LGUI, _______, KC_SPC, _______, _______, KC_RALT, _______, KC_RGUI, KC_RCTL), + + LAYOUT( + 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_INS, KC_DEL, + KC_CAPS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_SAD, RGB_SAI, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, RESET, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, _______, + _______, KC_NO, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) + +}; diff --git a/keyboards/yd60mq/readme.md b/keyboards/yd60mq/readme.md new file mode 100644 index 000000000..78f442d88 --- /dev/null +++ b/keyboards/yd60mq/readme.md @@ -0,0 +1,20 @@ +YD60MQ +====== + +![YD60MQ PCB](https://ae01.alicdn.com/kf/HTB1PVQ2X_HuK1RkSndVq6xVwpXaO.jpg) + +Customizable 60% PCB by [YMDK](https://ymdk.aliexpress.com/store/429151?spm=2114.10010108.0.0.3ab23641lIkgzm). + +Keyboard Maintainer: QMK Community +Hardware Supported: YD60MQ +Hardware Availability: YMDK - [AliExpress](https://www.aliexpress.com/item/YMDK-60-YD60MQ-QMK-Programmable-Underglow-RGB-Led-PCB-Plate-Stabilizers-For-DIY-Mechanical-Keyboard-Interchange/32869207240.html) + +Make example for this keyboard (after setting up your build environment): + + make yd60mq:default + +The keyboard uses a DFU bootloader. To make a keymap and use dfu-util to flash it: + + make yd60mq:default:dfu + +See the [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. diff --git a/keyboards/yd60mq/rules.mk b/keyboards/yd60mq/rules.mk new file mode 100644 index 000000000..2a8963011 --- /dev/null +++ b/keyboards/yd60mq/rules.mk @@ -0,0 +1,61 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# 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 = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +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 keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes diff --git a/keyboards/yd60mq/yd60mq.c b/keyboards/yd60mq/yd60mq.c new file mode 100644 index 000000000..96306d6a6 --- /dev/null +++ b/keyboards/yd60mq/yd60mq.c @@ -0,0 +1,13 @@ +#include "yd60mq.h" + +void led_set_kb(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + setPinOutput(F4); + writePinLow(F4); + } else { + setPinInput(F4); + writePinLow(F4); + } + + led_set_user(usb_led); +} diff --git a/keyboards/yd60mq/yd60mq.h b/keyboards/yd60mq/yd60mq.h new file mode 100644 index 000000000..5f5d8a242 --- /dev/null +++ b/keyboards/yd60mq/yd60mq.h @@ -0,0 +1,18 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K400, K401, K402, K403, K407, K408, K409, K410, K411, K412, K413 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { K400, K401, K402, K403, KC_NO, KC_NO, KC_NO, K407, K408, K409, K410, K411, K412, K413, KC_NO } \ +} + From 5904933a3f2266f97cf43a9ed752ceaf9dee1d0c Mon Sep 17 00:00:00 2001 From: Jesper Nellemann Jakobsen Date: Tue, 21 May 2019 00:46:24 +0200 Subject: [PATCH 091/341] [Keymap] bingocaller's DZ60 MacOS keymap (#5914) * Added customisations and README * Tweak keymap: word traversal/deletion * Add w and b word traversal/deletion keycodes. * Add fine volume control key codes, but don't use them, because they conflict with other key codes. `A` somehow got remapped to fine volume up. * Set mousekey delay to zero * Use SAFE_RANGE for key codes. * Update keymap and README Add new mouse-specific layer 3, activated by pressing and holding space. Add brightness controls to layer 4 (previously, layer 3). Update README: * New keyboard-layout mockup image. * Add actual link to kbdfans.cn. * Update layer descriptions. * Fix indentation in keymap.c * Use _______ over KC_TRNS to increase readability * Custom keys: use #define over process_record_user * Use enum for naming layers * Rename README.md -> readme.md --- keyboards/dz60/keymaps/bingocaller/config.h | 2 + keyboards/dz60/keymaps/bingocaller/keymap.c | 93 +++++++++++++++ keyboards/dz60/keymaps/bingocaller/readme.md | 114 +++++++++++++++++++ 3 files changed, 209 insertions(+) create mode 100644 keyboards/dz60/keymaps/bingocaller/config.h create mode 100644 keyboards/dz60/keymaps/bingocaller/keymap.c create mode 100644 keyboards/dz60/keymaps/bingocaller/readme.md diff --git a/keyboards/dz60/keymaps/bingocaller/config.h b/keyboards/dz60/keymaps/bingocaller/config.h new file mode 100644 index 000000000..470e3d18b --- /dev/null +++ b/keyboards/dz60/keymaps/bingocaller/config.h @@ -0,0 +1,2 @@ +#undef MOUSEKEY_DELAY +#define MOUSEKEY_DELAY 0 diff --git a/keyboards/dz60/keymaps/bingocaller/keymap.c b/keyboards/dz60/keymaps/bingocaller/keymap.c new file mode 100644 index 000000000..961d82556 --- /dev/null +++ b/keyboards/dz60/keymaps/bingocaller/keymap.c @@ -0,0 +1,93 @@ +#include QMK_KEYBOARD_H + +#define WORD_BACK A(KC_LEFT) +#define WORD_FORWARD A(KC_RIGHT) +#define DELETE_WORD_BACK A(KC_BSPACE) +#define DELETE_WORD_FORWARD A(KC_DELETE) +#define FINE_VOLUP S(A(KC__VOLUP)) +#define FINE_VOLDOWN S(A(KC__VOLDOWN)) + +enum layers { + _BASE, + _ARROWS, + _HDUE, // Home, PgDown, PgUp, End + _MOUSE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Default layer: + * Space Cadet shifts (parentheses on tap) + * Caps Lock is Control on hold, Esc on tap + * Hyper/Caps Lock on Control + * Hold D to activate layer 1 + * Hold Space to activate layer 3 (Mouse keys) + * Hold FN to activate layer 4 + */ + [_BASE] = LAYOUT( + KC_GRV, 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_NO, KC_BSPC, + 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, + LCTL_T(KC_ESC), KC_A, KC_S, LT(_ARROWS, KC_D), KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSPO, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_NO, + ALL_T(KC_CAPS), KC_LALT, KC_LGUI, KC_NO, LT(_MOUSE, KC_SPC), KC_NO, KC_RGUI, KC_RALT, KC_NO, MO(_FN), ALL_T(KC_CAPS)), + + /* Layer 1: + * Vim arrows (HJKL) + * Vim-like move across words with W(ord), and B(eginning) + * Media controls (fine volume controls using Option+Shift) + * Backspace/Del on N/M + * Hold F to activate layer 2 + */ + [_ARROWS] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, WORD_FORWARD, _______, _______, _______, _______, KC_MRWD, KC_MPLY, KC_MFFD, KC__MUTE, FINE_VOLDOWN, FINE_VOLUP, _______, + _______, _______, _______, _______, LT(_HDUE, _______), _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, WORD_BACK, KC_BSPC, KC_DEL, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + /* Layer 2: + * Home, End, Page Up, Page Down + * Delete word forward/back on W/B + */ + [_HDUE] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, DELETE_WORD_FORWARD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_PGUP, KC_END, _______, _______, _______, + _______, _______, _______, _______, _______, _______, DELETE_WORD_BACK, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + /* Layer 3: + * Mouse keys + * Cursor movement: HJKL + * MB 1, 2, and 3 on F, D, and S, respectively + * Mouse wheel: U(p) and D(own) + */ + [_MOUSE] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_BTN3, KC_BTN2, KC_BTN1, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, _______, + _______, _______, _______, _______, KC_WH_D, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + /* Layer 4: + * F1-12 + * Del on backspace + * RGB (underglow) controls + * RESET firmware on backslash + * Screen brightness: Z (decrease), X (increase) + */ + [_FN] = LAYOUT( + _______, 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, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_BRMD, KC_BRMU, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + // TEMPLATE + // LAYOUT( + // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; diff --git a/keyboards/dz60/keymaps/bingocaller/readme.md b/keyboards/dz60/keymaps/bingocaller/readme.md new file mode 100644 index 000000000..0cb3f77e2 --- /dev/null +++ b/keyboards/dz60/keymaps/bingocaller/readme.md @@ -0,0 +1,114 @@ +# MacOS standard 60% keymap with Vim-like arrows + +This is a MacOS-specific keymap for DZ60 configured in a standard 60% ANSI layout, with a stepped Caps Lock: + +[![](https://i.imgur.com/lFP2O41.png)](http://www.keyboard-layout-editor.com/#/gists/4b156fdf2c1426bffc82fadd2b1c5634) + +**[Fully assembled 60% keyboard from KBDfans](https://kbdfans.cn/collections/fully-assembled-keyboard/products/fully-assembled-plastic-case-mechanical-keyboard)** + +## Base Layer + +``` +,-----------------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | +|-----------------------------------------------------------------------------------------+ +| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | +|-----------------------------------------------------------------------------------------+ +| Ctrl/Esc | A | S | D/L1 | F | G | H | J | K | L | ; | ' | Enter | +|-----------------------------------------------------------------------------------------+ +| Shift/( | Z | X | C | V | B | N | M | , | . | / | Shift/) | +|-----------------------------------------------------------------------------------------+ +| Hyper | Alt | Cmd | Space/L3 | Cmd | Alt | L4 | Hyper | +`-----------------------------------------------------------------------------------------' +``` + +* Space Cadet shifts (parentheses on tap) +* Caps Lock is Control on hold, Esc on tap +* Hyper/Caps Lock on Control +* Hold D to activate layer 1 +* Hold Space to activate layer 3 (Mouse keys) +* Hold FN to activate layer 4 + +## `L1` + +``` +,-----------------------------------------------------------------------------------------. +| | | | | | | | | | | | | | | +|-----------------------------------------------------------------------------------------+ +| | | W→ | | | | | ⏮ | ⏯ | ⏭ | 🔇 | 🔉 | 🔊 | | +|-----------------------------------------------------------------------------------------+ +| | | | | L2 | | ← | ↓ | ↑ | → | | | | +|-----------------------------------------------------------------------------------------+ +| | | | | | W← | ⌫ | ⌦ | | | | | +|-----------------------------------------------------------------------------------------+ +| | | | | | | | | +`-----------------------------------------------------------------------------------------' +``` + +* Vim arrows (HJKL) +* Vim-like move across words with W(ord), and B(eginning) +* Media controls (fine volume controls using Option+Shift) +* Backspace/Del on N/M +* Hold F to activate layer 2 + +## `L2` + +``` +,-----------------------------------------------------------------------------------------. +| | | | | | | | | | | | | | | +|-----------------------------------------------------------------------------------------+ +| | | W⌦ | | | | | | | | | | | | +|-----------------------------------------------------------------------------------------+ +| | | | | | | ↖ | ⇞ | ⇟ | ↘︎ | | | | +|-----------------------------------------------------------------------------------------+ +| | | | | | W⌫ | | | | | | | +|-----------------------------------------------------------------------------------------+ +| | | | | | | | | +`-----------------------------------------------------------------------------------------' +``` + +* Home, End, Page Up, Page Down +* Delete word forward/back on W/B + +## `L3` + +``` +,-----------------------------------------------------------------------------------------. +| | | | | | | | | | | | | | | +|-----------------------------------------------------------------------------------------+ +| | | | | MWU | | | | | | | | | | +|-----------------------------------------------------------------------------------------+ +| | | M3 | M2 | M1 | | M← | M↓ | M↑ | M→ | | | | +|-----------------------------------------------------------------------------------------+ +| | | | | MWD | | | | | | | | +|-----------------------------------------------------------------------------------------+ +| | | | | | | | | +`-----------------------------------------------------------------------------------------' +``` + +* Mouse keys + * Cursor movement: HJKL + * MB 1, 2, and 3 on F, D, and S, respectively + * Mouse wheel: Up (R) and Down (V) + +## `L4` + +``` +,-----------------------------------------------------------------------------------------. +| | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | ⌦ | +|-----------------------------------------------------------------------------------------+ +| |RGB_T|RGB_M|RGB_H+|RGB_H-|RGB_S+|RGB_S-|RGB_V+|RGB_V-| | | | | RESET | +|-----------------------------------------------------------------------------------------+ +| | | | | | | | | | | | | | +|-----------------------------------------------------------------------------------------+ +| | 🔅 | 🔆 | | | | | | | | | | +|-----------------------------------------------------------------------------------------+ +| | | | | | | | | +`-----------------------------------------------------------------------------------------' +``` + +* F1-12 +* Del on backspace +* RGB (underglow) controls +* RESET firmware on backspace +* Screen brightness: Z (decrease), X (increase) From d93c53fc62a15ccb38b94aca9dc09284103564e6 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Mon, 20 May 2019 15:52:06 -0700 Subject: [PATCH 092/341] [Keyboard] fix hhkb bottom layer (#5926) --- keyboards/foxlab/leaf60/universal/universal.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/foxlab/leaf60/universal/universal.h b/keyboards/foxlab/leaf60/universal/universal.h index 2c31229dc..ab3f388a4 100644 --- a/keyboards/foxlab/leaf60/universal/universal.h +++ b/keyboards/foxlab/leaf60/universal/universal.h @@ -58,11 +58,11 @@ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \ K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ - K401, K402, K406, K410, K411 \ + K401, K402, K406, K411, K412 \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO }, \ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, KC_NO }, \ { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO }, \ - { KC_NO, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, KC_NO, KC_NO } \ + { KC_NO, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, K412, KC_NO, KC_NO } \ } From 0aece4ddab37e603699cb4ba9e8b72fdaf5a619c Mon Sep 17 00:00:00 2001 From: Anthony Leung Date: Tue, 21 May 2019 09:03:38 -0400 Subject: [PATCH 093/341] add dz60rgb-ansi layout to configurator (#5938) * add dz60rgb-ansi layout to configurator * fix mekanist's dz60rgb keymap --- keyboards/dztech/dz60rgb/info.json | 9 +++++++-- keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c | 6 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/keyboards/dztech/dz60rgb/info.json b/keyboards/dztech/dz60rgb/info.json index 4615706c6..d615fe53d 100644 --- a/keyboards/dztech/dz60rgb/info.json +++ b/keyboards/dztech/dz60rgb/info.json @@ -6,7 +6,12 @@ "height": 5, "layouts": { "LAYOUT": { + "key_count": 63, "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"Shift", "x":11.25, "y":3, "w":1.75}, {"label":"\u2191", "x":13, "y":3},{"label":"?", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Ctrl", "x":11, "y":4}, {"label":"\u2190", "x":12, "y":4}, {"label":"\u2193", "x":13, "y":4}, {"label":"\u2192", "x":14, "y":4}] - } - } + }, + "LAYOUT_ANSI": { + "key_count": 61, + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + } + } } diff --git a/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c b/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c index a7f1dd73e..11afb22d9 100644 --- a/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c @@ -64,13 +64,13 @@ void rgb_matrix_indicators_user(void) if (!g_suspend_state) { switch (biton32(layer_state)) { case _LAYER1: - rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break; + rgb_matrix_layer_helper(0xFF, 0x00, 0x00); break; case _LAYER2: - rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break; + rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break; case _LAYER4: - rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break; + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break; } } From 68501261c3a8dbf04a2f1de7ad23640e8074ab87 Mon Sep 17 00:00:00 2001 From: Michael Pio Date: Wed, 22 May 2019 01:49:33 +0800 Subject: [PATCH 094/341] [Keyboard] Add Ixora keypad (#5931) * added ixora files * upload ixora * update readme * Update keyboards/peiorisboards/ixora/ixora.h Co-Authored-By: fauxpark * Update keyboards/peiorisboards/ixora/ixora.h Co-Authored-By: fauxpark * Update keyboards/peiorisboards/ixora/ixora.h Co-Authored-By: fauxpark * Update keyboards/peiorisboards/ixora/keymaps/default/keymap.c Co-Authored-By: fauxpark * Update keyboards/peiorisboards/ixora/keymaps/default/keymap.c Co-Authored-By: fauxpark * Update keyboards/peiorisboards/ixora/keymaps/wntrmln/keymap.c Co-Authored-By: fauxpark * Update keyboards/peiorisboards/ixora/keymaps/wntrmln/keymap.c Co-Authored-By: fauxpark * update files according to suggestions * removed unused code --- .../ixora/boards/GENERIC_STM32_F042X6/board.c | 101 ++ .../ixora/boards/GENERIC_STM32_F042X6/board.h | 896 ++++++++++++++++++ .../boards/GENERIC_STM32_F042X6/board.mk | 5 + .../peiorisboards/ixora/bootloader_defs.h | 7 + keyboards/peiorisboards/ixora/chconf.h | 521 ++++++++++ keyboards/peiorisboards/ixora/config.h | 24 + keyboards/peiorisboards/ixora/halconf.h | 350 +++++++ keyboards/peiorisboards/ixora/info.json | 21 + keyboards/peiorisboards/ixora/ixora.c | 43 + keyboards/peiorisboards/ixora/ixora.h | 40 + .../ixora/keymaps/default/keymap.c | 42 + .../ixora/keymaps/wntrmln/keymap.c | 26 + keyboards/peiorisboards/ixora/mcuconf.h | 168 ++++ keyboards/peiorisboards/ixora/readme.md | 22 + keyboards/peiorisboards/ixora/rules.mk | 47 + 15 files changed, 2313 insertions(+) create mode 100644 keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.c create mode 100644 keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.h create mode 100644 keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.mk create mode 100644 keyboards/peiorisboards/ixora/bootloader_defs.h create mode 100644 keyboards/peiorisboards/ixora/chconf.h create mode 100644 keyboards/peiorisboards/ixora/config.h create mode 100644 keyboards/peiorisboards/ixora/halconf.h create mode 100644 keyboards/peiorisboards/ixora/info.json create mode 100644 keyboards/peiorisboards/ixora/ixora.c create mode 100644 keyboards/peiorisboards/ixora/ixora.h create mode 100644 keyboards/peiorisboards/ixora/keymaps/default/keymap.c create mode 100644 keyboards/peiorisboards/ixora/keymaps/wntrmln/keymap.c create mode 100644 keyboards/peiorisboards/ixora/mcuconf.h create mode 100644 keyboards/peiorisboards/ixora/readme.md create mode 100644 keyboards/peiorisboards/ixora/rules.mk diff --git a/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.c b/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.c new file mode 100644 index 000000000..19adfb933 --- /dev/null +++ b/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.c @@ -0,0 +1,101 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include "hal.h" + +#if HAL_USE_PAL || defined(__DOXYGEN__) +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +const PALConfig pal_default_config = { +#if STM32_HAS_GPIOA + {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, + VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, +#endif +#if STM32_HAS_GPIOB + {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, + VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, +#endif +#if STM32_HAS_GPIOC + {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, + VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, +#endif +#if STM32_HAS_GPIOD + {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, + VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, +#endif +#if STM32_HAS_GPIOE + {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, + VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, +#endif +#if STM32_HAS_GPIOF + {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, + VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, +#endif +#if STM32_HAS_GPIOG + {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, + VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, +#endif +#if STM32_HAS_GPIOH + {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, + VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, +#endif +#if STM32_HAS_GPIOI + {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} +#endif +}; +#endif + +void enter_bootloader_mode_if_requested(void); + +/** + * @brief Early initialization code. + * @details This initialization must be performed just after stack setup + * and before any other initialization. + */ +void __early_init(void) { + enter_bootloader_mode_if_requested(); + stm32_clock_init(); +} + +#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) +/** + * @brief MMC_SPI card detection. + */ +bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief MMC_SPI card write protection detection. + */ +bool mmc_lld_is_write_protected(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif + +/** + * @brief Board-specific initialization code. + * @todo Add your board-specific code, if any. + */ +void boardInit(void) { +} diff --git a/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.h b/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.h new file mode 100644 index 000000000..ee9d31e04 --- /dev/null +++ b/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.h @@ -0,0 +1,896 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +#ifndef _BOARD_H +#define _BOARD_H + +/* + * Setup for STMicroelectronics STM32 Nucleo32-F042K6 board. + */ + +/* + * Board identifier. + */ +#define BOARD_GENERIC_STM32_F042X6 +#define BOARD_NAME "Generic STM32F042 PCB" + +/* + * Board oscillators-related settings. + * NOTE: LSE not fitted. + * NOTE: HSE not fitted. + */ +#if !defined(STM32_LSECLK) +#define STM32_LSECLK 0U +#endif + +#define STM32_LSEDRV (3U << 3U) + +#if !defined(STM32_HSECLK) +#define STM32_HSECLK 0U +#endif + +/* + * MCU type as defined in the ST header. + */ +#define STM32F042x6 + +/* + * IO pins assignments. + */ +#define GPIOA_PIN0 0U +#define GPIOA_PIN1 1U +#define GPIOA_PIN2 2U +#define GPIOA_PIN3 3U +#define GPIOA_PIN4 4U +#define GPIOA_PIN5 5U +#define GPIOA_PIN6 6U +#define GPIOA_PIN7 7U +#define GPIOA_PIN8 8U +#define GPIOA_PIN9 9U +#define GPIOA_PIN10 10U +#define GPIOA_PIN11 11U +#define GPIOA_PIN12 12U +#define GPIOA_PIN13 13U +#define GPIOA_PIN14 14U +#define GPIOA_PIN15 15U + +#define GPIOB_PIN0 0U +#define GPIOB_PIN1 1U +#define GPIOB_PIN2 2U +#define GPIOB_PIN3 3U +#define GPIOB_PIN4 4U +#define GPIOB_PIN5 5U +#define GPIOB_PIN6 6U +#define GPIOB_PIN7 7U +#define GPIOB_PIN8 8U +#define GPIOB_PIN9 9U +#define GPIOB_PIN10 10U +#define GPIOB_PIN11 11U +#define GPIOB_PIN12 12U +#define GPIOB_PIN13 13U +#define GPIOB_PIN14 14U +#define GPIOB_PIN15 15U + +#define GPIOC_PIN0 0U +#define GPIOC_PIN1 1U +#define GPIOC_PIN2 2U +#define GPIOC_PIN3 3U +#define GPIOC_PIN4 4U +#define GPIOC_PIN5 5U +#define GPIOC_PIN6 6U +#define GPIOC_PIN7 7U +#define GPIOC_PIN8 8U +#define GPIOC_PIN9 9U +#define GPIOC_PIN10 10U +#define GPIOC_PIN11 11U +#define GPIOC_PIN12 12U +#define GPIOC_PIN13 13U +#define GPIOC_PIN14 14U +#define GPIOC_PIN15 15U + +#define GPIOD_PIN0 0U +#define GPIOD_PIN1 1U +#define GPIOD_PIN2 2U +#define GPIOD_PIN3 3U +#define GPIOD_PIN4 4U +#define GPIOD_PIN5 5U +#define GPIOD_PIN6 6U +#define GPIOD_PIN7 7U +#define GPIOD_PIN8 8U +#define GPIOD_PIN9 9U +#define GPIOD_PIN10 10U +#define GPIOD_PIN11 11U +#define GPIOD_PIN12 12U +#define GPIOD_PIN13 13U +#define GPIOD_PIN14 14U +#define GPIOD_PIN15 15U + +#define GPIOE_PIN0 0U +#define GPIOE_PIN1 1U +#define GPIOE_PIN2 2U +#define GPIOE_PIN3 3U +#define GPIOE_PIN4 4U +#define GPIOE_PIN5 5U +#define GPIOE_PIN6 6U +#define GPIOE_PIN7 7U +#define GPIOE_PIN8 8U +#define GPIOE_PIN9 9U +#define GPIOE_PIN10 10U +#define GPIOE_PIN11 11U +#define GPIOE_PIN12 12U +#define GPIOE_PIN13 13U +#define GPIOE_PIN14 14U +#define GPIOE_PIN15 15U + +#define GPIOF_PIN0 0U +#define GPIOF_PIN1 1U +#define GPIOF_PIN2 2U +#define GPIOF_PIN3 3U +#define GPIOF_PIN4 4U +#define GPIOF_PIN5 5U +#define GPIOF_PIN6 6U +#define GPIOF_PIN7 7U +#define GPIOF_PIN8 8U +#define GPIOF_PIN9 9U +#define GPIOF_PIN10 10U +#define GPIOF_PIN11 11U +#define GPIOF_PIN12 12U +#define GPIOF_PIN13 13U +#define GPIOF_PIN14 14U +#define GPIOF_PIN15 15U + +/* + * IO lines assignments. + */ + +#define LINE_BOOT0 PAL_LINE(GPIOB, 8U) +#define LINE_SWCLK PAL_LINE(GPIOA, 14U) +#define LINE_SWDIO PAL_LINE(GPIOA, 13U) + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * Please refer to the STM32 Reference Manual for details. + */ +#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) +#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) +#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) +#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) +#define PIN_ODR_LOW(n) (0U << (n)) +#define PIN_ODR_HIGH(n) (1U << (n)) +#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) +#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) +#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) +#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) +#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) +#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) +#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) +#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) +#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) +#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) + +/* + * GPIOA setup: + * + * PA0 - COL5 + * PA1 - COL4 + * PA2 - COL3 + * PA3 - COL2 + * PA4 - COL1 + * PA5 - COL0 + * PA6 - ROW4 + * PA7 - ROW3 + * PA8 - NC + * PA9 - ROW1 + * PA10 - ROW0 + * PA11 - USB_DM + * PA12 - USB_DP + * PA13 - COL15/SWDIO (for now, COL15) + * PA14 - COL14/SWCLK (for now, COL14) + * PA15 - COL13 + */ +#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_PIN0) | \ + PIN_MODE_INPUT(GPIOA_PIN1) | \ + PIN_MODE_INPUT(GPIOA_PIN2) | \ + PIN_MODE_INPUT(GPIOA_PIN3) | \ + PIN_MODE_INPUT(GPIOA_PIN4) | \ + PIN_MODE_INPUT(GPIOA_PIN5) | \ + PIN_MODE_INPUT(GPIOA_PIN6) | \ + PIN_MODE_INPUT(GPIOA_PIN7) | \ + PIN_MODE_INPUT(GPIOA_PIN8) | \ + PIN_MODE_INPUT(GPIOA_PIN9) | \ + PIN_MODE_INPUT(GPIOA_PIN10) | \ + PIN_MODE_INPUT(GPIOA_PIN11) | \ + PIN_MODE_INPUT(GPIOA_PIN12) | \ + PIN_MODE_INPUT(GPIOA_PIN13) | \ + PIN_MODE_INPUT(GPIOA_PIN14) | \ + PIN_MODE_INPUT(GPIOA_PIN15)) +#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) +#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ + PIN_OSPEED_HIGH(GPIOA_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN15)) +#define VAL_GPIOA_PUPDR (PIN_PUPDR_PULLUP(GPIOA_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ + PIN_PUPDR_FLOATING(GPIOA_PIN11) | \ + PIN_PUPDR_FLOATING(GPIOA_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN15)) +#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_PIN0) | \ + PIN_ODR_HIGH(GPIOA_PIN1) | \ + PIN_ODR_HIGH(GPIOA_PIN2) | \ + PIN_ODR_HIGH(GPIOA_PIN3) | \ + PIN_ODR_HIGH(GPIOA_PIN4) | \ + PIN_ODR_HIGH(GPIOA_PIN5) | \ + PIN_ODR_HIGH(GPIOA_PIN6) | \ + PIN_ODR_HIGH(GPIOA_PIN7) | \ + PIN_ODR_HIGH(GPIOA_PIN8) | \ + PIN_ODR_HIGH(GPIOA_PIN9) | \ + PIN_ODR_HIGH(GPIOA_PIN10) | \ + PIN_ODR_HIGH(GPIOA_PIN11) | \ + PIN_ODR_HIGH(GPIOA_PIN12) | \ + PIN_ODR_HIGH(GPIOA_PIN13) | \ + PIN_ODR_HIGH(GPIOA_PIN14) | \ + PIN_ODR_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN7, 0U)) +#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN15, 0U)) + +/* + * GPIOB setup: + * + * PB0 - ROW2 + * PB1 - RGB_D + * PB2 - PIN2 (input pullup). + * PB3 - COL12 + * PB4 - COL11 + * PB5 - COL10 + * PB6 - COL9 + * PB7 - COL8 + * PB8 - BOOT0 (set as output for STM32F042) + * PB9 - PIN9 (input pullup). + * PB10 - PIN10 (input pullup). + * PB11 - PIN11 (input pullup). + * PB12 - PIN12 (input pullup). + * PB13 - PIN13 (input pullup). + * PB14 - PIN14 (input pullup). + * PB15 - PIN15 (input pullup). + */ +#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ + PIN_MODE_OUTPUT(GPIOB_PIN1) | \ + PIN_MODE_INPUT(GPIOB_PIN2) | \ + PIN_MODE_INPUT(GPIOB_PIN3) | \ + PIN_MODE_INPUT(GPIOB_PIN4) | \ + PIN_MODE_INPUT(GPIOB_PIN5) | \ + PIN_MODE_INPUT(GPIOB_PIN6) | \ + PIN_MODE_INPUT(GPIOB_PIN7) | \ + PIN_MODE_OUTPUT(GPIOB_PIN8) | \ + PIN_MODE_INPUT(GPIOB_PIN9) | \ + PIN_MODE_INPUT(GPIOB_PIN10) | \ + PIN_MODE_INPUT(GPIOB_PIN11) | \ + PIN_MODE_INPUT(GPIOB_PIN12) | \ + PIN_MODE_INPUT(GPIOB_PIN13) | \ + PIN_MODE_INPUT(GPIOB_PIN14) | \ + PIN_MODE_INPUT(GPIOB_PIN15)) +#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) +#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ + PIN_OSPEED_HIGH(GPIOB_PIN1) | \ + PIN_OSPEED_HIGH(GPIOB_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ + PIN_OSPEED_HIGH(GPIOB_PIN9) | \ + PIN_OSPEED_HIGH(GPIOB_PIN10) | \ + PIN_OSPEED_HIGH(GPIOB_PIN11) | \ + PIN_OSPEED_HIGH(GPIOB_PIN12) | \ + PIN_OSPEED_HIGH(GPIOB_PIN13) | \ + PIN_OSPEED_HIGH(GPIOB_PIN14) | \ + PIN_OSPEED_HIGH(GPIOB_PIN15)) +#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ + PIN_PUPDR_FLOATING(GPIOB_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN7) | \ + PIN_PUPDR_PULLDOWN(GPIOB_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN15)) +#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ + PIN_ODR_HIGH(GPIOB_PIN1) | \ + PIN_ODR_HIGH(GPIOB_PIN2) | \ + PIN_ODR_HIGH(GPIOB_PIN3) | \ + PIN_ODR_HIGH(GPIOB_PIN4) | \ + PIN_ODR_HIGH(GPIOB_PIN5) | \ + PIN_ODR_HIGH(GPIOB_PIN6) | \ + PIN_ODR_HIGH(GPIOB_PIN7) | \ + PIN_ODR_HIGH(GPIOB_PIN8) | \ + PIN_ODR_HIGH(GPIOB_PIN9) | \ + PIN_ODR_HIGH(GPIOB_PIN10) | \ + PIN_ODR_HIGH(GPIOB_PIN11) | \ + PIN_ODR_HIGH(GPIOB_PIN12) | \ + PIN_ODR_HIGH(GPIOB_PIN13) | \ + PIN_ODR_HIGH(GPIOB_PIN14) | \ + PIN_ODR_HIGH(GPIOB_PIN15)) +#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN7, 0U)) +#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN15, 0U)) + +/* + * GPIOC setup: + * + * PC0 - PIN0 (input pullup). + * PC1 - PIN1 (input pullup). + * PC2 - PIN2 (input pullup). + * PC3 - PIN3 (input pullup). + * PC4 - PIN4 (input pullup). + * PC5 - PIN5 (input pullup). + * PC6 - PIN6 (input pullup). + * PC7 - PIN7 (input pullup). + * PC8 - PIN8 (input pullup). + * PC9 - PIN9 (input pullup). + * PC10 - PIN10 (input pullup). + * PC11 - PIN11 (input pullup). + * PC12 - PIN12 (input pullup). + * PC13 - PIN13 (input pullup). + * PC14 - PIN14 (input pullup). + * PC15 - PIN15 (input pullup). + */ +#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_PIN0) | \ + PIN_MODE_INPUT(GPIOC_PIN1) | \ + PIN_MODE_INPUT(GPIOC_PIN2) | \ + PIN_MODE_INPUT(GPIOC_PIN3) | \ + PIN_MODE_INPUT(GPIOC_PIN4) | \ + PIN_MODE_INPUT(GPIOC_PIN5) | \ + PIN_MODE_INPUT(GPIOC_PIN6) | \ + PIN_MODE_INPUT(GPIOC_PIN7) | \ + PIN_MODE_INPUT(GPIOC_PIN8) | \ + PIN_MODE_INPUT(GPIOC_PIN9) | \ + PIN_MODE_INPUT(GPIOC_PIN10) | \ + PIN_MODE_INPUT(GPIOC_PIN11) | \ + PIN_MODE_INPUT(GPIOC_PIN12) | \ + PIN_MODE_INPUT(GPIOC_PIN13) | \ + PIN_MODE_INPUT(GPIOC_PIN14) | \ + PIN_MODE_INPUT(GPIOC_PIN15)) +#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN15)) +#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_PIN0) | \ + PIN_OSPEED_HIGH(GPIOC_PIN1) | \ + PIN_OSPEED_HIGH(GPIOC_PIN2) | \ + PIN_OSPEED_HIGH(GPIOC_PIN3) | \ + PIN_OSPEED_HIGH(GPIOC_PIN4) | \ + PIN_OSPEED_HIGH(GPIOC_PIN5) | \ + PIN_OSPEED_HIGH(GPIOC_PIN6) | \ + PIN_OSPEED_HIGH(GPIOC_PIN7) | \ + PIN_OSPEED_HIGH(GPIOC_PIN8) | \ + PIN_OSPEED_HIGH(GPIOC_PIN9) | \ + PIN_OSPEED_HIGH(GPIOC_PIN10) | \ + PIN_OSPEED_HIGH(GPIOC_PIN11) | \ + PIN_OSPEED_HIGH(GPIOC_PIN12) | \ + PIN_OSPEED_HIGH(GPIOC_PIN13) | \ + PIN_OSPEED_HIGH(GPIOC_PIN14) | \ + PIN_OSPEED_HIGH(GPIOC_PIN15)) +#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN15)) +#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_PIN0) | \ + PIN_ODR_HIGH(GPIOC_PIN1) | \ + PIN_ODR_HIGH(GPIOC_PIN2) | \ + PIN_ODR_HIGH(GPIOC_PIN3) | \ + PIN_ODR_HIGH(GPIOC_PIN4) | \ + PIN_ODR_HIGH(GPIOC_PIN5) | \ + PIN_ODR_HIGH(GPIOC_PIN6) | \ + PIN_ODR_HIGH(GPIOC_PIN7) | \ + PIN_ODR_HIGH(GPIOC_PIN8) | \ + PIN_ODR_HIGH(GPIOC_PIN9) | \ + PIN_ODR_HIGH(GPIOC_PIN10) | \ + PIN_ODR_HIGH(GPIOC_PIN11) | \ + PIN_ODR_HIGH(GPIOC_PIN12) | \ + PIN_ODR_HIGH(GPIOC_PIN13) | \ + PIN_ODR_HIGH(GPIOC_PIN14) | \ + PIN_ODR_HIGH(GPIOC_PIN15)) +#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN7, 0U)) +#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN15, 0U)) + +/* + * GPIOD setup: + * + * PD0 - PIN0 (input pullup). + * PD1 - PIN1 (input pullup). + * PD2 - PIN2 (input pullup). + * PD3 - PIN3 (input pullup). + * PD4 - PIN4 (input pullup). + * PD5 - PIN5 (input pullup). + * PD6 - PIN6 (input pullup). + * PD7 - PIN7 (input pullup). + * PD8 - PIN8 (input pullup). + * PD9 - PIN9 (input pullup). + * PD10 - PIN10 (input pullup). + * PD11 - PIN11 (input pullup). + * PD12 - PIN12 (input pullup). + * PD13 - PIN13 (input pullup). + * PD14 - PIN14 (input pullup). + * PD15 - PIN15 (input pullup). + */ +#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ + PIN_MODE_INPUT(GPIOD_PIN1) | \ + PIN_MODE_INPUT(GPIOD_PIN2) | \ + PIN_MODE_INPUT(GPIOD_PIN3) | \ + PIN_MODE_INPUT(GPIOD_PIN4) | \ + PIN_MODE_INPUT(GPIOD_PIN5) | \ + PIN_MODE_INPUT(GPIOD_PIN6) | \ + PIN_MODE_INPUT(GPIOD_PIN7) | \ + PIN_MODE_INPUT(GPIOD_PIN8) | \ + PIN_MODE_INPUT(GPIOD_PIN9) | \ + PIN_MODE_INPUT(GPIOD_PIN10) | \ + PIN_MODE_INPUT(GPIOD_PIN11) | \ + PIN_MODE_INPUT(GPIOD_PIN12) | \ + PIN_MODE_INPUT(GPIOD_PIN13) | \ + PIN_MODE_INPUT(GPIOD_PIN14) | \ + PIN_MODE_INPUT(GPIOD_PIN15)) +#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) +#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_HIGH(GPIOD_PIN0) | \ + PIN_OSPEED_HIGH(GPIOD_PIN1) | \ + PIN_OSPEED_HIGH(GPIOD_PIN2) | \ + PIN_OSPEED_HIGH(GPIOD_PIN3) | \ + PIN_OSPEED_HIGH(GPIOD_PIN4) | \ + PIN_OSPEED_HIGH(GPIOD_PIN5) | \ + PIN_OSPEED_HIGH(GPIOD_PIN6) | \ + PIN_OSPEED_HIGH(GPIOD_PIN7) | \ + PIN_OSPEED_HIGH(GPIOD_PIN8) | \ + PIN_OSPEED_HIGH(GPIOD_PIN9) | \ + PIN_OSPEED_HIGH(GPIOD_PIN10) | \ + PIN_OSPEED_HIGH(GPIOD_PIN11) | \ + PIN_OSPEED_HIGH(GPIOD_PIN12) | \ + PIN_OSPEED_HIGH(GPIOD_PIN13) | \ + PIN_OSPEED_HIGH(GPIOD_PIN14) | \ + PIN_OSPEED_HIGH(GPIOD_PIN15)) +#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN15)) +#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ + PIN_ODR_HIGH(GPIOD_PIN1) | \ + PIN_ODR_HIGH(GPIOD_PIN2) | \ + PIN_ODR_HIGH(GPIOD_PIN3) | \ + PIN_ODR_HIGH(GPIOD_PIN4) | \ + PIN_ODR_HIGH(GPIOD_PIN5) | \ + PIN_ODR_HIGH(GPIOD_PIN6) | \ + PIN_ODR_HIGH(GPIOD_PIN7) | \ + PIN_ODR_HIGH(GPIOD_PIN8) | \ + PIN_ODR_HIGH(GPIOD_PIN9) | \ + PIN_ODR_HIGH(GPIOD_PIN10) | \ + PIN_ODR_HIGH(GPIOD_PIN11) | \ + PIN_ODR_HIGH(GPIOD_PIN12) | \ + PIN_ODR_HIGH(GPIOD_PIN13) | \ + PIN_ODR_HIGH(GPIOD_PIN14) | \ + PIN_ODR_HIGH(GPIOD_PIN15)) +#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN7, 0U)) +#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN15, 0U)) + +/* + * GPIOE setup: + * + * PE0 - PIN0 (input pullup). + * PE1 - PIN1 (input pullup). + * PE2 - PIN2 (input pullup). + * PE3 - PIN3 (input pullup). + * PE4 - PIN4 (input pullup). + * PE5 - PIN5 (input pullup). + * PE6 - PIN6 (input pullup). + * PE7 - PIN7 (input pullup). + * PE8 - PIN8 (input pullup). + * PE9 - PIN9 (input pullup). + * PE10 - PIN10 (input pullup). + * PE11 - PIN11 (input pullup). + * PE12 - PIN12 (input pullup). + * PE13 - PIN13 (input pullup). + * PE14 - PIN14 (input pullup). + * PE15 - PIN15 (input pullup). + */ +#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ + PIN_MODE_INPUT(GPIOE_PIN1) | \ + PIN_MODE_INPUT(GPIOE_PIN2) | \ + PIN_MODE_INPUT(GPIOE_PIN3) | \ + PIN_MODE_INPUT(GPIOE_PIN4) | \ + PIN_MODE_INPUT(GPIOE_PIN5) | \ + PIN_MODE_INPUT(GPIOE_PIN6) | \ + PIN_MODE_INPUT(GPIOE_PIN7) | \ + PIN_MODE_INPUT(GPIOE_PIN8) | \ + PIN_MODE_INPUT(GPIOE_PIN9) | \ + PIN_MODE_INPUT(GPIOE_PIN10) | \ + PIN_MODE_INPUT(GPIOE_PIN11) | \ + PIN_MODE_INPUT(GPIOE_PIN12) | \ + PIN_MODE_INPUT(GPIOE_PIN13) | \ + PIN_MODE_INPUT(GPIOE_PIN14) | \ + PIN_MODE_INPUT(GPIOE_PIN15)) +#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) +#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_HIGH(GPIOE_PIN0) | \ + PIN_OSPEED_HIGH(GPIOE_PIN1) | \ + PIN_OSPEED_HIGH(GPIOE_PIN2) | \ + PIN_OSPEED_HIGH(GPIOE_PIN3) | \ + PIN_OSPEED_HIGH(GPIOE_PIN4) | \ + PIN_OSPEED_HIGH(GPIOE_PIN5) | \ + PIN_OSPEED_HIGH(GPIOE_PIN6) | \ + PIN_OSPEED_HIGH(GPIOE_PIN7) | \ + PIN_OSPEED_HIGH(GPIOE_PIN8) | \ + PIN_OSPEED_HIGH(GPIOE_PIN9) | \ + PIN_OSPEED_HIGH(GPIOE_PIN10) | \ + PIN_OSPEED_HIGH(GPIOE_PIN11) | \ + PIN_OSPEED_HIGH(GPIOE_PIN12) | \ + PIN_OSPEED_HIGH(GPIOE_PIN13) | \ + PIN_OSPEED_HIGH(GPIOE_PIN14) | \ + PIN_OSPEED_HIGH(GPIOE_PIN15)) +#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN15)) +#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ + PIN_ODR_HIGH(GPIOE_PIN1) | \ + PIN_ODR_HIGH(GPIOE_PIN2) | \ + PIN_ODR_HIGH(GPIOE_PIN3) | \ + PIN_ODR_HIGH(GPIOE_PIN4) | \ + PIN_ODR_HIGH(GPIOE_PIN5) | \ + PIN_ODR_HIGH(GPIOE_PIN6) | \ + PIN_ODR_HIGH(GPIOE_PIN7) | \ + PIN_ODR_HIGH(GPIOE_PIN8) | \ + PIN_ODR_HIGH(GPIOE_PIN9) | \ + PIN_ODR_HIGH(GPIOE_PIN10) | \ + PIN_ODR_HIGH(GPIOE_PIN11) | \ + PIN_ODR_HIGH(GPIOE_PIN12) | \ + PIN_ODR_HIGH(GPIOE_PIN13) | \ + PIN_ODR_HIGH(GPIOE_PIN14) | \ + PIN_ODR_HIGH(GPIOE_PIN15)) +#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN7, 0U)) +#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN15, 0U)) + +/* + * GPIOF setup: + * + * PF0 - COL7 + * PF1 - COL6 + * PF2 - PIN2 (input pullup). + * PF3 - PIN3 (input pullup). + * PF4 - PIN4 (input pullup). + * PF5 - PIN5 (input pullup). + * PF6 - PIN6 (input pullup). + * PF7 - PIN7 (input pullup). + * PF8 - PIN8 (input pullup). + * PF9 - PIN9 (input pullup). + * PF10 - PIN10 (input pullup). + * PF11 - PIN11 (input pullup). + * PF12 - PIN12 (input pullup). + * PF13 - PIN13 (input pullup). + * PF14 - PIN14 (input pullup). + * PF15 - PIN15 (input pullup). + */ +#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_PIN0) | \ + PIN_MODE_INPUT(GPIOF_PIN1) | \ + PIN_MODE_INPUT(GPIOF_PIN2) | \ + PIN_MODE_INPUT(GPIOF_PIN3) | \ + PIN_MODE_INPUT(GPIOF_PIN4) | \ + PIN_MODE_INPUT(GPIOF_PIN5) | \ + PIN_MODE_INPUT(GPIOF_PIN6) | \ + PIN_MODE_INPUT(GPIOF_PIN7) | \ + PIN_MODE_INPUT(GPIOF_PIN8) | \ + PIN_MODE_INPUT(GPIOF_PIN9) | \ + PIN_MODE_INPUT(GPIOF_PIN10) | \ + PIN_MODE_INPUT(GPIOF_PIN11) | \ + PIN_MODE_INPUT(GPIOF_PIN12) | \ + PIN_MODE_INPUT(GPIOF_PIN13) | \ + PIN_MODE_INPUT(GPIOF_PIN14) | \ + PIN_MODE_INPUT(GPIOF_PIN15)) +#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) +#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN1) | \ + PIN_OSPEED_HIGH(GPIOF_PIN2) | \ + PIN_OSPEED_HIGH(GPIOF_PIN3) | \ + PIN_OSPEED_HIGH(GPIOF_PIN4) | \ + PIN_OSPEED_HIGH(GPIOF_PIN5) | \ + PIN_OSPEED_HIGH(GPIOF_PIN6) | \ + PIN_OSPEED_HIGH(GPIOF_PIN7) | \ + PIN_OSPEED_HIGH(GPIOF_PIN8) | \ + PIN_OSPEED_HIGH(GPIOF_PIN9) | \ + PIN_OSPEED_HIGH(GPIOF_PIN10) | \ + PIN_OSPEED_HIGH(GPIOF_PIN11) | \ + PIN_OSPEED_HIGH(GPIOF_PIN12) | \ + PIN_OSPEED_HIGH(GPIOF_PIN13) | \ + PIN_OSPEED_HIGH(GPIOF_PIN14) | \ + PIN_OSPEED_HIGH(GPIOF_PIN15)) +#define VAL_GPIOF_PUPDR (PIN_PUPDR_PULLUP(GPIOF_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN15)) +#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_PIN0) | \ + PIN_ODR_HIGH(GPIOF_PIN1) | \ + PIN_ODR_HIGH(GPIOF_PIN2) | \ + PIN_ODR_HIGH(GPIOF_PIN3) | \ + PIN_ODR_HIGH(GPIOF_PIN4) | \ + PIN_ODR_HIGH(GPIOF_PIN5) | \ + PIN_ODR_HIGH(GPIOF_PIN6) | \ + PIN_ODR_HIGH(GPIOF_PIN7) | \ + PIN_ODR_HIGH(GPIOF_PIN8) | \ + PIN_ODR_HIGH(GPIOF_PIN9) | \ + PIN_ODR_HIGH(GPIOF_PIN10) | \ + PIN_ODR_HIGH(GPIOF_PIN11) | \ + PIN_ODR_HIGH(GPIOF_PIN12) | \ + PIN_ODR_HIGH(GPIOF_PIN13) | \ + PIN_ODR_HIGH(GPIOF_PIN14) | \ + PIN_ODR_HIGH(GPIOF_PIN15)) +#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN7, 0U)) +#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN15, 0U)) + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* _BOARD_H */ diff --git a/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.mk b/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.mk new file mode 100644 index 000000000..bbeb5bbff --- /dev/null +++ b/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F042X6/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F042X6 diff --git a/keyboards/peiorisboards/ixora/bootloader_defs.h b/keyboards/peiorisboards/ixora/bootloader_defs.h new file mode 100644 index 000000000..4994be9c2 --- /dev/null +++ b/keyboards/peiorisboards/ixora/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here: + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFC400 \ No newline at end of file diff --git a/keyboards/peiorisboards/ixora/chconf.h b/keyboards/peiorisboards/ixora/chconf.h new file mode 100644 index 000000000..b836a3b99 --- /dev/null +++ b/keyboards/peiorisboards/ixora/chconf.h @@ -0,0 +1,521 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 10000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE TRUE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP TRUE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS TRUE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ \ No newline at end of file diff --git a/keyboards/peiorisboards/ixora/config.h b/keyboards/peiorisboards/ixora/config.h new file mode 100644 index 000000000..bf74b13cc --- /dev/null +++ b/keyboards/peiorisboards/ixora/config.h @@ -0,0 +1,24 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0C61 +#define DEVICE_VER 0x00C6 +#define MANUFACTURER PeiorisBoards +#define PRODUCT Ixora Rev1 +#define DESCRIPTION 6key Macropad + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 6 + +#define MATRIX_ROW_PINS { A0 } +#define MATRIX_COL_PINS { B4, A15, B3, A1, B6, B5 } + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 0 diff --git a/keyboards/peiorisboards/ixora/halconf.h b/keyboards/peiorisboards/ixora/halconf.h new file mode 100644 index 000000000..bc2b66f2e --- /dev/null +++ b/keyboards/peiorisboards/ixora/halconf.h @@ -0,0 +1,350 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB TRUE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 256 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ \ No newline at end of file diff --git a/keyboards/peiorisboards/ixora/info.json b/keyboards/peiorisboards/ixora/info.json new file mode 100644 index 000000000..a1818632c --- /dev/null +++ b/keyboards/peiorisboards/ixora/info.json @@ -0,0 +1,21 @@ +{ + "keyboard_name": "Ixora", + "url": "", + "maintainer": "Peioris", + "width": 3, + "height": 2, + "layouts": { + "LAYOUT_full": { + "layout": [{"label":"1", "x":0, "y":0}, {"label":"2", "x":1, "y":0}, {"label":"3", "x":2, "y":0}, {"label":"Caps Lock", "x":0, "y":1}, {"label":"Num Lock", "x":1, "y":1}, {"label":"Scroll Lock", "x":2, "y":1}] + }, + "LAYOUT_blocker_right": { + "layout": [{"label":"1", "x":0, "y":0}, {"label":"2", "x":1, "y":0}, {"label":"Caps Lock", "x":0, "y":1}, {"label":"Num Lock", "x":1, "y":1}, {"label":"Scroll Lock", "x":2, "y":1}] + }, + "LAYOUT_blocker_left": { + "layout": [{"label":"2", "x":1, "y":0}, {"label":"3", "x":2, "y":0}, {"label":"Caps Lock", "x":0, "y":1}, {"label":"Num Lock", "x":1, "y":1}, {"label":"Scroll Lock", "x":2, "y":1}] + }, + "LAYOUT_arrows": { + "layout": [{"label":"\u2191", "x":1, "y":0}, {"label":"\u2190", "x":0, "y":1}, {"label":"\u2193", "x":1, "y":1}, {"label":"\u2192", "x":2, "y":1}] + } + } + } diff --git a/keyboards/peiorisboards/ixora/ixora.c b/keyboards/peiorisboards/ixora/ixora.c new file mode 100644 index 000000000..7996db629 --- /dev/null +++ b/keyboards/peiorisboards/ixora/ixora.c @@ -0,0 +1,43 @@ +#include "ixora.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + setPinOutput(A8); + setPinOutput(A9); + setPinOutput(A10); + writePinLow(A8); + writePinLow(A9); + writePinLow(A10); + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinHigh(A10); + } else { + writePinLow(A10); + } + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinHigh(A9); + } else { + writePinLow(A9); + } + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinHigh(A8); + } else { + writePinLow(A8); + } + led_set_user(usb_led); +} diff --git a/keyboards/peiorisboards/ixora/ixora.h b/keyboards/peiorisboards/ixora/ixora.h new file mode 100644 index 000000000..92cf6586a --- /dev/null +++ b/keyboards/peiorisboards/ixora/ixora.h @@ -0,0 +1,40 @@ +#pragma once + +#define XXX KC_NO + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. + +#define LAYOUT_full( \ + K00, K01, K02, \ + K03, K04, K05 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05 } \ +} + +#define LAYOUT_blocker_right( \ + K00, K01, \ + K03, K04, K05 \ +) \ +{ \ + { K00, K01, XXX, K03, K04, K05 } \ +} + +#define LAYOUT_blocker_left( \ + K01, K02, \ + K03, K04, K05 \ +) \ +{ \ + { XXX, K01, K02, K03, K04, K05 } \ +} + +#define LAYOUT_arrows( \ + K01, \ + K03, K04, K05 \ +) \ +{ \ + { XXX, K01, XXX, K03, K04, K05 } \ +} + diff --git a/keyboards/peiorisboards/ixora/keymaps/default/keymap.c b/keyboards/peiorisboards/ixora/keymaps/default/keymap.c new file mode 100644 index 000000000..85a646851 --- /dev/null +++ b/keyboards/peiorisboards/ixora/keymaps/default/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2018 Peioris + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,-----------------. + * |RESET| 2 | 3 | + * |-----------------| + * |Caps |NmLk |ScLk | + * `-----------------' + */ +[0] = LAYOUT_full( + RESET, KC_2, KC_3, + KC_CAPS, KC_NLCK, KC_SLCK) +}; + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/peiorisboards/ixora/keymaps/wntrmln/keymap.c b/keyboards/peiorisboards/ixora/keymaps/wntrmln/keymap.c new file mode 100644 index 000000000..3e08c7801 --- /dev/null +++ b/keyboards/peiorisboards/ixora/keymaps/wntrmln/keymap.c @@ -0,0 +1,26 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,-----------------. + * |RESET| 2 | 3 | + * |-----------------| + * |Caps |NmLk |ScLk | + * `-----------------' + */ +[0] = LAYOUT_full( + KC_PSCR, KC_MUTE, LGUI(KC_1), + KC_MPRV, KC_MPLY, KC_MNXT) +}; + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/peiorisboards/ixora/mcuconf.h b/keyboards/peiorisboards/ixora/mcuconf.h new file mode 100644 index 000000000..4643e9f92 --- /dev/null +++ b/keyboards/peiorisboards/ixora/mcuconf.h @@ -0,0 +1,168 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ \ No newline at end of file diff --git a/keyboards/peiorisboards/ixora/readme.md b/keyboards/peiorisboards/ixora/readme.md new file mode 100644 index 000000000..1a011ba9a --- /dev/null +++ b/keyboards/peiorisboards/ixora/readme.md @@ -0,0 +1,22 @@ +Ixora +========= + +[Ixora](https://i.imgur.com/GqDk3XY.png) + + +Ixora is an ARM-powered 6-key macropad with a USB connector, hotswap sockets, and indicator LEDs. + +Keyboard Maintainer: [Peioris](https://github.com/coarse) +Hardware Supported: Ixora PCB +Hardware Availability: [Peioris](https://github.com/coarse) + +Make example for this keyboard (after setting up your build environment): + + make peiorisboards/ixora:default:dfu-util + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. + +#### Developer's Note + +STM32F042xx chips does not allow jumping to bootloader without BOOT0 being set to high, therefore it is impossible to enter the bootloader from sending a `RESET` keycode nor using bootmagic or bootmagic lite. +The only way to enter bootloader is to hold the BOOT0 button while the keyboard is powering up or after a power reset (done by pressing the reset switch or sending a `RESET` keycode). diff --git a/keyboards/peiorisboards/ixora/rules.mk b/keyboards/peiorisboards/ixora/rules.mk new file mode 100644 index 000000000..9d89d9663 --- /dev/null +++ b/keyboards/peiorisboards/ixora/rules.mk @@ -0,0 +1,47 @@ +# project specific files + +## chip/board settings +# - the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F0xx + +# Linker script to use +# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F042x6 + +# Startup code to use +# - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f0xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = GENERIC_STM32_F042X6 + +# Cortex version +MCU = cortex-m0 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 6 + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +#OPT_DEFS = -DCORTEX_VTOR_INIT=0x00001000 +OPT_DEFS = + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +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 +NKRO_ENABLE = yes # USB Nkey Rollover +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in From a0d5f0722f8d045903670babbdc76ad1c5842b7c Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Tue, 21 May 2019 13:59:08 -0400 Subject: [PATCH 095/341] [Keymap] Romac added and tweaks to existing keymaps (#5941) * Initial keymap for Romac * Formatting changes * keymap tweaks * Add new cycle layer key * add cycle layer code * initial upload * keymap updates * keymap updates * keymap updates for new layer names * new enum layers * case added for 4th layer * removed extra space for formatting --- keyboards/hs60/v2/keymaps/stanrc85/keymap.c | 14 ++-- keyboards/romac/keymaps/stanrc85/config.h | 11 +++ keyboards/romac/keymaps/stanrc85/keymap.c | 78 +++++++++++++++++++ keyboards/romac/keymaps/stanrc85/rules.mk | 1 + .../community/60_ansi/stanrc85-ansi/keymap.c | 14 ++-- users/stanrc85/layer_rgb.c | 25 +++--- users/stanrc85/stanrc85.h | 19 +++-- 7 files changed, 132 insertions(+), 30 deletions(-) create mode 100644 keyboards/romac/keymaps/stanrc85/config.h create mode 100644 keyboards/romac/keymaps/stanrc85/keymap.c create mode 100644 keyboards/romac/keymaps/stanrc85/rules.mk diff --git a/keyboards/hs60/v2/keymaps/stanrc85/keymap.c b/keyboards/hs60/v2/keymaps/stanrc85/keymap.c index 8e4c8b42b..2e6a70483 100644 --- a/keyboards/hs60/v2/keymaps/stanrc85/keymap.c +++ b/keyboards/hs60/v2/keymaps/stanrc85/keymap.c @@ -17,33 +17,33 @@ #include "stanrc85.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_60_ansi( + [_QWERTY] = LAYOUT_60_ansi( TD_TESC, 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_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_CTLE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, 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_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(3), TD_TCTL), + KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(_FN2_60), TD_TCTL), - [1] = LAYOUT_60_ansi( + [_DEFAULT] = LAYOUT_60_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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, 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_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(2), MO(3), KC_RCTL), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1_60), MO(_FN2_60), KC_RCTL), - [2] = LAYOUT_60_ansi( + [_FN1_60] = LAYOUT_60_ansi( KC_TILD, 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, _______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, KC_PSCR, _______, _______, KC_INS, KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, KC_RDP, _______, _______, _______, _______, _______, _______, KC_WBAK, KC_WFWD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - [3] = LAYOUT_60_ansi( + [_FN2_60] = LAYOUT_60_ansi( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, _______, EF_INC, ES_INC, S1_INC, H1_INC, S2_INC, H2_INC, BR_INC, _______, _______, _______, _______, _______, RESET, _______, EF_DEC, ES_DEC, S1_DEC, H1_DEC, S2_DEC, H2_DEC, BR_DEC, _______, _______, _______, _______, KC_MAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, TG(1)) + _______, _______, _______, _______, _______, _______, _______, TG(_DEFAULT)) }; // Backlight specific keys: diff --git a/keyboards/romac/keymaps/stanrc85/config.h b/keyboards/romac/keymaps/stanrc85/config.h new file mode 100644 index 000000000..722fd7e9e --- /dev/null +++ b/keyboards/romac/keymaps/stanrc85/config.h @@ -0,0 +1,11 @@ +#undef RGBLED_NUM +#define RGBLED_NUM 16 + +#define RGB_DI_PIN F4 +#ifdef RGB_DI_PIN + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_ANIMATIONS +#endif + diff --git a/keyboards/romac/keymaps/stanrc85/keymap.c b/keyboards/romac/keymaps/stanrc85/keymap.c new file mode 100644 index 000000000..ecca61cae --- /dev/null +++ b/keyboards/romac/keymaps/stanrc85/keymap.c @@ -0,0 +1,78 @@ +/* Copyright 2019 Stanrc85 + * + * 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 . + */ + +#include QMK_KEYBOARD_H +#include "stanrc85.h" + +enum keys { + U_LAYR = SAFE_RANGE, + D_LAYR +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_NUMPAD] = LAYOUT( + KC_7, KC_8, KC_9, + KC_4, KC_5, KC_6, + KC_1, KC_2, KC_3, + U_LAYR, KC_0, KC_ENT), + + [_NAVKEY] = LAYOUT( + KC_HOME, KC_INS, KC_PGUP, + KC_END, KC_UP, KC_PGDN, + KC_LEFT, KC_DOWN, KC_RGHT, + U_LAYR, TD_TWIN, D_LAYR), + + [_MEDIA] = LAYOUT( + KC_MUTE, KC_VOLD, KC_VOLU, + CA_QUOT, KC_MPLY, CA_SCLN, + CA_COPY, CA_PSTE, KC_NO, + U_LAYR, KC_NO, D_LAYR), + + [_RGB] = LAYOUT( + RGB_SAI, RGB_VAI, RGB_HUI, + RGB_SAD, RGB_VAD, RGB_HUD, + RGB_TOG, RGB_MOD, KC_NO, + U_LAYR, KC_NO, D_LAYR), + + [_FN1PAD] = LAYOUT( + KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, RESET, + KC_NO, KC_NO, KC_MAKE, + KC_NO, KC_LSFT, D_LAYR) +}; + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + keypos_t key; + uint8_t current_layer; + uint8_t next_layer; + switch (keycode) { + case U_LAYR: //cycles up the layers + if (!record->event.pressed) { + current_layer = layer_switch_get_layer(key); + next_layer = current_layer+1; + layer_move(next_layer); + } + break; + case D_LAYR: //cycles down the layers + if (!record->event.pressed) { + current_layer = layer_switch_get_layer(key); + next_layer = current_layer-1; + layer_move(next_layer); + } + break; + } + return true; +}; diff --git a/keyboards/romac/keymaps/stanrc85/rules.mk b/keyboards/romac/keymaps/stanrc85/rules.mk new file mode 100644 index 000000000..1e3cebb14 --- /dev/null +++ b/keyboards/romac/keymaps/stanrc85/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/layouts/community/60_ansi/stanrc85-ansi/keymap.c b/layouts/community/60_ansi/stanrc85-ansi/keymap.c index d820171d4..f47839890 100644 --- a/layouts/community/60_ansi/stanrc85-ansi/keymap.c +++ b/layouts/community/60_ansi/stanrc85-ansi/keymap.c @@ -17,33 +17,33 @@ #include "stanrc85.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_60_ansi( + [_QWERTY] = LAYOUT_60_ansi( TD_TESC, 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_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_CTLE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, 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_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(3), TD_TCTL), + KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(_FN2_60), TD_TCTL), - [1] = LAYOUT_60_ansi( + [_DEFAULT] = LAYOUT_60_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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, 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_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(2), MO(3), KC_RCTL), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1_60), MO(_FN2_60), KC_RCTL), - [2] = LAYOUT_60_ansi( + [_FN1_60] = LAYOUT_60_ansi( KC_TILD, 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, _______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, KC_PSCR, _______, _______, KC_INS, KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, KC_RDP, _______, _______, _______, _______, _______, _______, KC_WBAK, KC_WFWD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - [3] = LAYOUT_60_ansi( + [_FN2_60] = LAYOUT_60_ansi( _______, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, RGB_SAI, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, TG(1)) + _______, _______, _______, _______, _______, _______, _______, TG(_DEFAULT)) }; bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { diff --git a/users/stanrc85/layer_rgb.c b/users/stanrc85/layer_rgb.c index 23eeb3b08..58f17489a 100644 --- a/users/stanrc85/layer_rgb.c +++ b/users/stanrc85/layer_rgb.c @@ -1,26 +1,29 @@ #include "stanrc85.h" void matrix_init_user(void) { - rgblight_setrgb(0xFF, 0x00, 0x00); + rgblight_setrgb(0xFF, 0x00, 0x00); }; uint32_t layer_state_set_user(uint32_t state) { switch (biton32(state)) { case 0: - rgblight_setrgb (0xFF, 0x00, 0x00); - break; + rgblight_setrgb (0xFF, 0x00, 0x00); + break; case 1: - rgblight_setrgb (0x00, 0xFF, 0x00); - break; + rgblight_setrgb (0x00, 0xFF, 0x00); + break; case 2: - rgblight_setrgb (0x00, 0x00, 0xFF); - break; + rgblight_setrgb (0x00, 0x00, 0xFF); + break; case 3: - rgblight_setrgb (0xFF, 0xFF, 0xFF); - break; + rgblight_setrgb (0xFF, 0xFF, 0xFF); + break; + case 4: + rgblight_setrgb (0xFF, 0x00, 0xFF); + break; default: // for any other layers, or the default layer - rgblight_setrgb (0xFF, 0x00, 0x00); - break; + rgblight_setrgb (0xFF, 0x00, 0x00); + break; } return state; } diff --git a/users/stanrc85/stanrc85.h b/users/stanrc85/stanrc85.h index b3d413fa1..ceb7167e1 100644 --- a/users/stanrc85/stanrc85.h +++ b/users/stanrc85/stanrc85.h @@ -3,10 +3,17 @@ #include "quantum.h" #include "version.h" -#define DEFAULT 0 //Custom ANSI -#define LAYER1 1 //Default ANSI (enable with Fn2+CAPS) -#define LAYER2 2 //Function keys, arrows, custom shortcuts, volume control -#define LAYER3 3 //RGB Underglow controls and RESET +enum my_layers { + _NUMPAD = 0, //Macropad numpad + _NAVKEY, //Macropad nav keys + _MEDIA, //Macropad media controls + _RGB, //Macropad RGB controls + _FN1PAD, //Macropad reset and make commands + _QWERTY = 0, //Qwerty with custom shortcuts and functions + _DEFAULT, //Default ANSI for gaming, enable with FN2+RCtl + _FN1_60, //Function keys, arrows, custom shortcuts, volume control + _FN2_60 //RGB Underglow controls and RESET +}; //Aliases for longer keycodes #define KC_CAD LALT(LCTL(KC_DEL)) @@ -14,10 +21,12 @@ #define CA_QUOT LCA(KC_QUOT) #define CA_SCLN LCA(KC_SCLN) #define KC_CTLE LCTL_T(KC_ESC) -#define LT_SPCF LT(2, KC_SPC) +#define LT_SPCF LT(_FN1_60, KC_SPC) #define TD_TESC TD(TD_ESC) #define TD_TWIN TD(TD_WIN) #define TD_TCTL TD(TD_RCTL) +#define CA_COPY LCTL(KC_C) +#define CA_PSTE LCTL(KC_V) enum cust_keys { KC_MAKE = SAFE_RANGE, From 419f2c3f4048037901e95504ef38104c77bd715e Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Tue, 21 May 2019 11:00:32 -0700 Subject: [PATCH 096/341] [Keyboard] QMK Configurator support for Diverge TM 2(#5943) --- keyboards/divergetm2/info.json | 59 ++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 keyboards/divergetm2/info.json diff --git a/keyboards/divergetm2/info.json b/keyboards/divergetm2/info.json new file mode 100644 index 000000000..3a4389bb8 --- /dev/null +++ b/keyboards/divergetm2/info.json @@ -0,0 +1,59 @@ +{ + "keyboard_name": "UniKeyboard Diverge TM 2", + "url": "", + "maintainer": "islandman93, xton", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"L00", "x":0, "y":0}, + {"label":"L01", "x":1, "y":0}, + {"label":"L02", "x":2, "y":0}, + {"label":"L03", "x":3, "y":0}, + {"label":"L04", "x":4, "y":0}, + {"label":"L05", "x":5, "y":0}, + {"label":"R00", "x":7, "y":0}, + {"label":"R01", "x":8, "y":0}, + {"label":"R02", "x":9, "y":0}, + {"label":"R03", "x":10, "y":0}, + {"label":"R04", "x":11, "y":0}, + {"label":"R05", "x":12, "y":0}, + {"label":"L10", "x":0, "y":1}, + {"label":"L11", "x":1, "y":1}, + {"label":"L12", "x":2, "y":1}, + {"label":"L13", "x":3, "y":1}, + {"label":"L14", "x":4, "y":1}, + {"label":"L15", "x":5, "y":1}, + {"label":"R10", "x":7, "y":1}, + {"label":"R11", "x":8, "y":1}, + {"label":"R12", "x":9, "y":1}, + {"label":"R13", "x":10, "y":1}, + {"label":"R14", "x":11, "y":1}, + {"label":"R15", "x":12, "y":1}, + {"label":"L20", "x":0, "y":2}, + {"label":"L21", "x":1, "y":2}, + {"label":"L22", "x":2, "y":2}, + {"label":"L23", "x":3, "y":2}, + {"label":"L24", "x":4, "y":2}, + {"label":"L25", "x":5, "y":2}, + {"label":"R20", "x":7, "y":2}, + {"label":"R21", "x":8, "y":2}, + {"label":"R22", "x":9, "y":2}, + {"label":"R23", "x":10, "y":2}, + {"label":"R24", "x":11, "y":2}, + {"label":"R25", "x":12, "y":2}, + {"label":"L30", "x":0, "y":3}, + {"label":"L31", "x":1, "y":3}, + {"label":"L32", "x":2, "y":3}, + {"label":"L33", "x":3, "y":3}, + {"label":"L34", "x":4, "y":3, "w":2}, + {"label":"R31", "x":7, "y":3, "w":2}, + {"label":"R32", "x":9, "y":3}, + {"label":"R33", "x":10, "y":3}, + {"label":"R34", "x":11, "y":3}, + {"label":"R35", "x":12, "y":3} + ] + } + } +} From fdd8c5c50c4f433da6791a4d410f2ee772ee20c3 Mon Sep 17 00:00:00 2001 From: dsanchezseco Date: Tue, 21 May 2019 20:01:29 +0200 Subject: [PATCH 097/341] [Keymap] dsanchezseco for planck (#5944) * added user keymap * updated keymap * updated keymap * swapped positions of alt and altGr --- .../planck/keymaps/dsanchezseco/keymap.c | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/keyboards/planck/keymaps/dsanchezseco/keymap.c b/keyboards/planck/keymaps/dsanchezseco/keymap.c index 311cc110b..90ad2bc59 100644 --- a/keyboards/planck/keymaps/dsanchezseco/keymap.c +++ b/keyboards/planck/keymaps/dsanchezseco/keymap.c @@ -43,14 +43,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Alt | GUI |Lower | Space | Bksp |Raise | Left | Down | Up |Right | + * | Ctrl | AltGr| Alt | GUI |Lower |Space | Bksp |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ [_DVORAK] = LAYOUT_planck_grid( KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINUS, - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, - KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SFTENT, + KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Lower @@ -61,15 +61,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | AltGr| | | | Del | | Play | Vol- | Vol+ | Next | + * | | | | | | | Del | | Play | Vol- | Vol+ | Next | * `-----------------------------------------------------------------------------------' - * ^-- sticky */ [_LOWER] = LAYOUT_planck_grid( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, KC_ENT, - _______, OSM(MOD_RALT), _______, _______, _______, _______, KC_DEL, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, KC_DEL, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT ), /* Raise @@ -80,15 +79,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | AltGr| | | | Del | | Play | Vol- | Vol+ | Next | + * | | | | | | | Del | | Play | Vol- | Vol+ | Next | * `-----------------------------------------------------------------------------------' - * ^-- sticky */ [_RAISE] = LAYOUT_planck_grid( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, KC_ENT, - _______, OSM(MOD_RALT), _______, _______, _______, _______, KC_DEL, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, KC_DEL, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT ), /* Adjust (Lower + Raise) @@ -103,7 +101,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_planck_grid( - _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL, _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ From fc3965ef70ead4d01209c344f9a5f8e1dcf8a1dd Mon Sep 17 00:00:00 2001 From: Jesper Nellemann Jakobsen Date: Tue, 21 May 2019 20:03:57 +0200 Subject: [PATCH 098/341] [Keymap] Update Mouse key settings (#5946) Set shorter `MOUSEKEY_INTERVAL` and `MOUSEKEY_TIME_TO_MAX`. Move mouse scroll buttons around and update comment to reflect change. --- keyboards/dz60/keymaps/bingocaller/config.h | 3 ++- keyboards/dz60/keymaps/bingocaller/keymap.c | 6 +++--- keyboards/dz60/keymaps/bingocaller/readme.md | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/keyboards/dz60/keymaps/bingocaller/config.h b/keyboards/dz60/keymaps/bingocaller/config.h index 470e3d18b..b04b47a30 100644 --- a/keyboards/dz60/keymaps/bingocaller/config.h +++ b/keyboards/dz60/keymaps/bingocaller/config.h @@ -1,2 +1,3 @@ -#undef MOUSEKEY_DELAY #define MOUSEKEY_DELAY 0 +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_TIME_TO_MAX 15 diff --git a/keyboards/dz60/keymaps/bingocaller/keymap.c b/keyboards/dz60/keymaps/bingocaller/keymap.c index 961d82556..6b3317497 100644 --- a/keyboards/dz60/keymaps/bingocaller/keymap.c +++ b/keyboards/dz60/keymaps/bingocaller/keymap.c @@ -60,13 +60,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * Mouse keys * Cursor movement: HJKL * MB 1, 2, and 3 on F, D, and S, respectively - * Mouse wheel: U(p) and D(own) + * Mouse wheel: up (V), down (R) (reversed because of Natural Scrolling) */ [_MOUSE] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, KC_BTN3, KC_BTN2, KC_BTN1, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, _______, _______, _______, _______, _______, KC_WH_D, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_BTN3, KC_BTN2, KC_BTN1, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, _______, + _______, _______, _______, _______, _______, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), /* Layer 4: diff --git a/keyboards/dz60/keymaps/bingocaller/readme.md b/keyboards/dz60/keymaps/bingocaller/readme.md index 0cb3f77e2..d32dc6267 100644 --- a/keyboards/dz60/keymaps/bingocaller/readme.md +++ b/keyboards/dz60/keymaps/bingocaller/readme.md @@ -89,7 +89,7 @@ This is a MacOS-specific keymap for DZ60 configured in a standard 60% ANSI layou * Mouse keys * Cursor movement: HJKL * MB 1, 2, and 3 on F, D, and S, respectively - * Mouse wheel: Up (R) and Down (V) + * Mouse wheel: up (V), down (R) (reversed because of Natural Scrolling) ## `L4` From 02787ac07f29ecb05a53dc986c215e177ee11d1d Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 21 May 2019 13:15:59 -0700 Subject: [PATCH 099/341] Add missing links to features page and sidebar section --- docs/_summary.md | 3 +++ docs/features.md | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/docs/_summary.md b/docs/_summary.md index 043943f1d..1c3153b04 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -54,9 +54,12 @@ * [Bootmagic](feature_bootmagic.md) * [Combos](feature_combo) * [Command](feature_command.md) + * [Debounce API](feature_debuonce.md) * [Dynamic Macros](feature_dynamic_macros.md) * [Encoders](feature_encoders.md) * [Grave Escape](feature_grave_esc.md) + * [Haptic Feedback](feature_haptic_feedback.md) + * [HD44780 LED](feature_hd44780.md) * [Key Lock](feature_key_lock.md) * [Layouts](feature_layouts.md) * [Leader Key](feature_leader_key.md) diff --git a/docs/features.md b/docs/features.md index cb69df35d..eb3f26d6a 100644 --- a/docs/features.md +++ b/docs/features.md @@ -7,12 +7,15 @@ QMK has a staggering number of features for building your keyboard. It can take * [Audio](feature_audio.md) - Connect a speaker to your keyboard for audio feedback, midi support, and music mode. * [Auto Shift](feature_auto_shift.md) - Tap for the normal key, hold slightly longer for its shifted state. * [Backlight](feature_backlight.md) - LED lighting support for your keyboard. +* [Bluetooth](feature_bluetooth.md) - BlueTooth support for your keyboard. * [Bootmagic](feature_bootmagic.md) - Adjust the behavior of your keyboard using hotkeys. * [Combos](feature_combo.md) - Custom actions for multiple key holds. * [Command](feature_command.md) - Runtime version of bootmagic (Formerly known as "Magic"). +* [Debounce API](feature_debuonce.md) - Customization of debouncing algorithms, and the ability to add more/custom debouncing. * [Dynamic Macros](feature_dynamic_macros.md) - Record and playback macros from the keyboard itself. * [Encoders](feature_encoders.md) - Rotary encoders! * [Grave Escape](feature_grave_esc.md) - Lets you use a single key for Esc and Grave. +* [Haptic Feedback](feature_haptic_feedback.md) - Add haptic feedback drivers to your board. * [HD44780 LCD Display](feature_hd44780.md) - Support for LCD character displays using the HD44780 standard. * [Key Lock](feature_key_lock.md) - Lock a key in the "down" state. * [Layouts](feature_layouts.md) - Use one keymap with any keyboard that supports your layout. @@ -20,6 +23,7 @@ QMK has a staggering number of features for building your keyboard. It can take * [LED Matrix](feature_led_matrix.md) - LED Matrix single color lights for per key lighting (Single Color, not RGB). * [Macros](feature_macros.md) - Send multiple key presses when pressing only one physical key. * [Mouse keys](feature_mouse_keys.md) - Control your mouse pointer from your keyboard. +* [OLED Driver](feature_oled_driver) - Add OLED screens to your keyboard. * [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) - Sticky Keys, lets hit a key rather than holding it. * [Pointing Device](feature_pointing_device.md) - Framework for connecting your custom pointing device to your keyboard. * [PS2 Mouse](feature_ps2_mouse.md) - Driver for connecting a PS/2 mouse directly to your keyboard. @@ -33,3 +37,4 @@ QMK has a staggering number of features for building your keyboard. It can take * [Thermal Printer](feature_thermal_printer.md) - Connect a thermal printer to your keyboard to be able to toggle on a printed log of everything you type. * [Unicode](feature_unicode.md) - Unicode input support. * [Userspace](feature_userspace.md) - Share code between different keymaps and keyboards. +* [Velocikey](feature_velocikey.md) - Allows changes in animation speed based on WPM/Typing speed. From eb756916c2b1d3b03b1aa26b8bb02e91ce849089 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 21 May 2019 13:40:50 -0700 Subject: [PATCH 100/341] [Keyboard] Fix 9key macropad keymap (#5942) Fails to compile on the configurator because tapdance is enabled for the entire keyboard --- keyboards/9key/keymaps/default/keymap.c | 38 ++----------- keyboards/9key/keymaps/default/rules.mk | 0 keyboards/9key/keymaps/tap_dance/keymap.c | 69 +++++++++++++++++++++++ keyboards/9key/keymaps/tap_dance/rules.mk | 1 + keyboards/9key/rules.mk | 4 +- 5 files changed, 76 insertions(+), 36 deletions(-) delete mode 100644 keyboards/9key/keymaps/default/rules.mk create mode 100644 keyboards/9key/keymaps/tap_dance/keymap.c create mode 100644 keyboards/9key/keymaps/tap_dance/rules.mk diff --git a/keyboards/9key/keymaps/default/keymap.c b/keyboards/9key/keymaps/default/keymap.c index 9f6397169..acc035073 100644 --- a/keyboards/9key/keymaps/default/keymap.c +++ b/keyboards/9key/keymaps/default/keymap.c @@ -1,16 +1,5 @@ #include QMK_KEYBOARD_H -// Tap Dance Declarations -enum { - ENT_5 = 0, - ZERO_7 -}; - -// Macro Declarations -enum { - DBL_0 = 0 -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* LAYER 0 @@ -24,8 +13,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [0] = LAYOUT( \ KC_1, KC_2, KC_3, \ - KC_4, TD(ENT_5), KC_6, \ - TD(ZERO_7), KC_8, LT(1, KC_9) \ + KC_4, KC_5, KC_6, \ + KC_7, KC_8, LT(1, KC_9) \ ), /* LAYER 1 @@ -39,27 +28,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [1] = LAYOUT( \ KC_ESC, KC_PLUS, KC_MINS, \ - KC_BSPC, KC_ASTR, KC_SLSH, \ - M(DBL_0), KC_DOT, KC_TRNS \ + KC_ENTER, KC_ASTR, KC_SLSH, \ + KC_0, KC_DOT, KC_TRNS \ ) }; - -qk_tap_dance_action_t tap_dance_actions[] = { - [ENT_5] = ACTION_TAP_DANCE_DOUBLE(KC_5, KC_ENT), - [ZERO_7] = ACTION_TAP_DANCE_DOUBLE(KC_7, KC_0) -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - if (record->event.pressed) { - switch(id) { - case DBL_0: - SEND_STRING("00"); - return false; - } - } - return MACRO_NONE; -}; - -void matrix_init_user(void) { -} \ No newline at end of file diff --git a/keyboards/9key/keymaps/default/rules.mk b/keyboards/9key/keymaps/default/rules.mk deleted file mode 100644 index e69de29bb..000000000 diff --git a/keyboards/9key/keymaps/tap_dance/keymap.c b/keyboards/9key/keymaps/tap_dance/keymap.c new file mode 100644 index 000000000..a96880aa5 --- /dev/null +++ b/keyboards/9key/keymaps/tap_dance/keymap.c @@ -0,0 +1,69 @@ +#include QMK_KEYBOARD_H + +// Tap Dance Declarations +enum tap_dances { + ENT_5 = 0, + ZERO_7, +}; + +// Macro Declarations +enum custom_keycodes { + DBL_0 = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* LAYER 0 + * ,-----------------------. + * | 1 | 2 | 3 | + * |-------+-------+-------| + * | 4 | 5/ENT | 6 | Dbl Tap 5 for Enter + * |-------+-------+-------| + * | 7/0 | 8 | 9/FN | 7/0 = Dbl Tap 7 for 0 - 9/FN = Hold 9 for FN + * `-----------------------' + */ +[0] = LAYOUT( \ + KC_1, KC_2, KC_3, \ + KC_4, TD(ENT_5), KC_6, \ + TD(ZERO_7), KC_8, LT(1, KC_9) \ +), + +/* LAYER 1 + * ,-----------------------. + * | ESC | + | - | + * |-------+-------+-------| + * | BSPC | * | / | + * |-------+-------+-------| + * | 00 | . | | + * `-----------------------' + */ +[1] = LAYOUT( \ + KC_ESC, KC_PLUS, KC_MINS, \ + KC_BSPC, KC_ASTR, KC_SLSH, \ + DBL_0, KC_DOT, KC_TRNS \ +) + +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [ENT_5] = ACTION_TAP_DANCE_DOUBLE(KC_5, KC_ENT), + [ZERO_7] = ACTION_TAP_DANCE_DOUBLE(KC_7, KC_0) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DBL_0: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + tap_code(KC_P0); + tap_code(KC_P0); + } + break; + + } + return true; +}; + + +void matrix_init_user(void) { +} diff --git a/keyboards/9key/keymaps/tap_dance/rules.mk b/keyboards/9key/keymaps/tap_dance/rules.mk new file mode 100644 index 000000000..e5ddcae8d --- /dev/null +++ b/keyboards/9key/keymaps/tap_dance/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/9key/rules.mk b/keyboards/9key/rules.mk index e252640f7..9fae54fa9 100644 --- a/keyboards/9key/rules.mk +++ b/keyboards/9key/rules.mk @@ -47,7 +47,7 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Build Options -# change to "no" to disable the options, or define them in the Makefile in +# change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) @@ -63,7 +63,7 @@ UNICODE_ENABLE = yes # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. API_SYSEX_ENABLE = yes -TAP_DANCE_ENABLE = yes +TAP_DANCE_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend From 894010786c4a78b939df7114d1c3e70957a8a300 Mon Sep 17 00:00:00 2001 From: ymzcdg <49898694+ymzcdg@users.noreply.github.com> Date: Thu, 23 May 2019 05:33:10 +0800 Subject: [PATCH 101/341] translate docs into Mandarin Chinese (#5890) * translate docs into Mandarin Chinese translate faq_debug.md into Chinese * translate faq_build.md into Chinese translate faq_build.md into Chinese * faq_keymap.md to zh-cn faq_keymap.md to zh-cn --- docs/zh-cn/faq_build.md | 150 +++++++++++++++++++++++++ docs/zh-cn/faq_debug.md | 233 +++++++++++++++++++++++++++++++++++++++ docs/zh-cn/faq_keymap.md | 212 +++++++++++++++++++++++++++++++++++ 3 files changed, 595 insertions(+) create mode 100644 docs/zh-cn/faq_build.md create mode 100644 docs/zh-cn/faq_debug.md create mode 100644 docs/zh-cn/faq_keymap.md diff --git a/docs/zh-cn/faq_build.md b/docs/zh-cn/faq_build.md new file mode 100644 index 000000000..60d902007 --- /dev/null +++ b/docs/zh-cn/faq_build.md @@ -0,0 +1,150 @@ +# 关于构建的常见问题 + +本页所写是QMK构建的常见问题.如果你还没有进行过编译,就看一下[构建环境搭建](getting_started_build_tools.md) 和 [make的说明](getting_started_make_guide.md). + +## 如果您不能在Linux上编程 +您需要适当的权限才能操作设备。对于Linux用户, 请参阅下方有关`udev`规则的说明。如果您对`udev`有问题,解决方法是用`sudo`命令。如果您不熟悉此命令,使用`man sudo`查看其手册或[看这个网页](https://linux.die.net/man/8/sudo). + +在你的主控是ATMega32u4时,以下是使用`sudo`命令的样例: + + $ sudo dfu-programmer atmega32u4 erase --force + $ sudo dfu-programmer atmega32u4 flash your.hex + $ sudo dfu-programmer atmega32u4 reset + +或只用; + + $ sudo make ::dfu + +使用`sudo`运行`make`一般来说**不**推荐,如果可能,尽量使用前一种方法之一。 + +### Linux `udev` 规则 +在Linux上,您需要适当的权限才能访问MCU。你也可以在刷新固件时使用 `sudo`,或把这些文件放到`/etc/udev/rules.d/`。 + +**/etc/udev/rules.d/50-atmel-dfu.rules:** +``` +# Atmel ATMega32U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", MODE:="0666" +# Atmel USBKEY AT90USB1287 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", MODE:="0666" +# Atmel ATMega32U2 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", MODE:="0666" +``` + +**/etc/udev/rules.d/52-tmk-keyboard.rules:** +``` +# tmk键盘产品 https://github.com/tmk/tmk_keyboard +SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666" +``` +**/etc/udev/rules.d/54-input-club-keyboard.rules:** + +``` +# Input Club keyboard bootloader +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", MODE:="0666" +``` + +### 串行设备在Linux上检测不到bootloader模式 +确保您的内核对您的设备有相应的支持。 如果你的设备是 USB ACM, 比如Pro Micro (Atmega32u4),就要加上`CONFIG_USB_ACM=y`. 其他设备可能需要`USB_SERIAL` 及其任何子选项。 + +## DFU Bootloader的未知设备 + +如果您在使用Windows来刷新键盘的时候碰到了问题,检查设备管理器。如果在键盘处于 "bootloader模式"时你看到 "未知设备",说明你可能面临设备问题。 + +重新运行MSYS2上的安装脚本或许会凑效(比如在MSYS2/WSL运行 `./util/qmk_install.sh`) 或者重新安装QMK工具箱也可能会解决你的问题。 + +如果以上方法还是短针攻疽,那您可能需要使用[Zadig Utility](https://zadig.akeo.ie/)。下载此程序, 找到设备问题, 然后选择 `WinUSB`选项, 然后点击"Reinstall driver"。完成后再试试刷新你的键盘。倘若依然徒劳无功,那就尝试所有选项直到好用为止。 + +?> 事实上没有一个驱动的最佳选择,有些选项就是和某些系统相辅相成。但libUSB和WinUSB似乎也算是这里的最佳选择了。 +如果bootloader在设备列表中没有显示,你可能要使能 "List all devices"选项在选项菜单中`Options`,然后找到有问题的bootloader设备。(译者注:在win10中可能为 查看-显示隐藏的设备) + + +## WINAVR已淘汰 +不再推荐使用WINAVR,使用可能会导致问题 +详情请见[TMK Issue #99](https://github.com/tmk/tmk_keyboard/issues/99). + +## USB VID 和 PID +你可以在编辑`config.h`时使用任何你想用的ID值。实际上,使用任何可能未使用的ID都没有问题,除了有极低的与其他产品发生冲突的可能性。 + +大多数QMK主板使用`0xFEED`作为vendor ID。您应该查看其他键盘,以确保选择了唯一的Product ID。 + +也要看看这个。 +https://github.com/tmk/tmk_keyboard/issues/150 + +一也可以在下方链接购买一个唯一的VID:PID。不过个人使用似乎用不着这个。 +- http://www.obdev.at/products/vusb/license.html +- http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1 + +## Cortex: `cstddef: No such file or directory` +在Ubuntu 14.04上的GCC 4.8 会出现这种问题需要用这个PPA升级到4.9。 +https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded + +https://github.com/tmk/tmk_keyboard/issues/212 +https://github.com/tmk/tmk_keyboard/wiki/mbed-cortex-porting#compile-error-cstddef +https://developer.mbed.org/forum/mbed/topic/5205/ + +## `clock_prescale_set` and `clock_div_1` Not Available +你的工具链太旧了不支持MCU。比如WinAVR 20100110就不支持ATMega32u2. + +``` +Compiling C: ../../tmk_core/protocol/lufa/lufa.c +avr-gcc -c -mmcu=atmega32u2 -gdwarf-2 -DF_CPU=16000000UL -DINTERRUPT_CONTROL_ENDPOINT -DBOOTLOADER_SIZE=4096 -DF_USB=16000000UL -DARCH=ARCH_AVR8 -DUSB_DEVICE_ONLY -DUSE_FLASH_DESCRIPTORS -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -DFIXED_CONTROL_ENDPOINT_SIZE=8 -DFIXED_NUM_CONFIGURATIONS=1 -DPROTOCOL_LUFA -DEXTRAKEY_ENABLE -DCONSOLE_ENABLE -DCOMMAND_ENABLE -DVERSION=unknown -Os -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections -fno-inline-small-functions -fpack-struct -fshort-enums -fno-strict-aliasing -Wall -Wstrict-prototypes -Wa,-adhlns=obj_alps64/protocol/lufa/lufa.lst -I. -I../../tmk_core -I../../tmk_core/protocol/lufa -I../../tmk_core/protocol/lufa/LUFA-git -I../../tmk_core/common -std=gnu99 -include config.h -MMD -MP -MF .dep/obj_alps64_protocol_lufa_lufa.o.d ../../tmk_core/protocol/lufa/lufa.c -o obj_alps64/protocol/lufa/lufa.o +../../tmk_core/protocol/lufa/lufa.c: In function 'setup_mcu': +../../tmk_core/protocol/lufa/lufa.c:575: warning: implicit declaration of function 'clock_prescale_set' +../../tmk_core/protocol/lufa/lufa.c:575: error: 'clock_div_1' undeclared (first use in this function) +../../tmk_core/protocol/lufa/lufa.c:575: error: (Each undeclared identifier is reported only once +../../tmk_core/protocol/lufa/lufa.c:575: error: for each function it appears in.) +make: *** [obj_alps64/protocol/lufa/lufa.o] Error 1 +``` + + +## AVR的BOOTLOADER_SIZE +注意Teensy2.0++ bootloader的大小是2048字节。有些Makefile注释错了。 + +``` +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 2048 +# Atmel DFU loader 4096 (TMK Alt Controller) +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=2048 +``` + +## 在MacOS上 `avr-gcc: internal compiler error: Abort trap: 6 (program cc1)` +这是brew更新的问题,导致AVR GCC依赖的符号链接被损坏。 + +解决方案是移除并重新安装所有受影响的模块。 + +``` +brew rm avr-gcc +brew rm dfu-programmer +brew rm dfu-util +brew rm gcc-arm-none-eabi +brew rm avrdude +brew install avr-gcc +brew install dfu-programmer +brew install dfu-util +brew install gcc-arm-none-eabi +brew install avrdude +``` + +### avr-gcc 8.1 和 LUFA + +如果你把avr-gcc升级到7以上你可能会遇到关于LUFA的问题。比如: + +`lib/lufa/LUFA/Drivers/USB/Class/Device/AudioClassDevice.h:380:5: error: 'const' attribute on function returning 'void'` + +那你就需要在brew中把avr-gcc回退到7。 + +``` +brew uninstall --force avr-gcc +brew install avr-gcc@7 +brew link --force avr-gcc@7 +``` + +### 我刷新了我的键盘但是键盘不工作/按键没有注册 - 而且还是ARM的 (rev6 planck, clueboard 60, hs60v2, etc...) (Feb 2019) +由于EEPROM在基于ARM的芯片上的工作原理,保存的设置可能不再有效。这会影响默认层,而且*或许*在某些情况下,会使键盘不好用,我们仍在调查这些情况。重置EEPROM将解决此问题。 + +[Planck rev6键盘重置EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/539284620861243409/planck_rev6_default.bin) 是用于强制重置EEPROM的。刷入这个文件后,再次刷入正常固件,这会将键盘恢复到_正常_工作状态。 +[Preonic rev3键盘重置EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/537849497313738762/preonic_rev3_default.bin) + +如果以任何形式启用了bootmagic, 那么您还需要(看[Bootmagic文档](feature_bootmagic.md) 以及键盘信息,以了解如何执行此操作的详细信息). diff --git a/docs/zh-cn/faq_debug.md b/docs/zh-cn/faq_debug.md new file mode 100644 index 000000000..ca8b3fd25 --- /dev/null +++ b/docs/zh-cn/faq_debug.md @@ -0,0 +1,233 @@ +# 调试的常见问题 + +本篇详细介绍了人们在键盘故障排除时的各种常见问题。 + +# 调试控制台 + +## `hid_listen` 无法识别设备 +当设备的调试控制台未就绪时,您将看到如下内容: + +``` +Waiting for device:......... +``` + +插入设备后,*hid_listen*找到该设备,您将收到以下消息: + +``` +Waiting for new device:......................... +Listening: +``` + +如果您无法获得这条“Listening:”消息,请尝试在[Makefile]中使用 `CONSOLE_ENABLE=yes` + +在Linux这样的操作系统上,你可能需要一些权限。 +- 使用`sudo hid_listen` + +## 控制台没有返回消息 +检查: +- *hid_listen* 找到了你的设备。看前面。 +- 输入**Magic**+d打开调试。详见[Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands)。 +- 设置`debug_enable=true` ,一般存在于**matrix.c**的`matrix_init()`中。 +- 尝试使用'print'函数而不要用调试输出。详见**common/print.h**。 +- 断开其他有控制台功能的设备。 详见[Issue #97](https://github.com/tmk/tmk_keyboard/issues/97)。 + +## Linux或UNIX这样的系统如何请求超级用户权限 +用'sudo'来执行*hid_listen*就有权限了。 +``` +$ sudo hid_listen +``` + +或者把一个文件放到规则文件夹来为TMK设备添加*udev规则*,不同系统的目录可能有所不同。 + +文件: /etc/udev/rules.d/52-tmk-keyboard.rules(在Ubuntu系统的情况下) +``` +# tmk keyboard products https://github.com/tmk/tmk_keyboard +SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666" +``` + +*** + +# 其他 +## 安全注意事项 + +你应该不想要把你的键盘变成"砖头"吧,就是变成没法重写固件的那种。 +下面讲解一些参数来告诉你什么风险很大(其实也不是很大)。 + +- 假如你键盘表面没有设计重置键"RESET", 那你要进入bootloader的话就要按PCB上的RESET了。 + 按PCB上的RESET要拧开键盘底部。 +- 如果 tmk_core / common 里面的文件丢失键盘可能失灵。 +- .hex太大可能不太好; `make dfu` 会删除块,检验大小(咦?好像反了...)。 + 一但出错,刷新键盘失败的话就困在DFU出不去了。 + - 所以, 要知道大小限制。 Planck键盘上.hex文件最大大小是 is 7000h (十进制是28672) + +``` +Linking: .build/planck_rev4_cbbrowne.elf [OK] +Creating load file for Flash: .build/planck_rev4_cbbrowne.hex [OK] + +Size after: + text data bss dec hex filename + 0 22396 0 22396 577c planck_rev4_cbbrowne.hex +``` + + - 上面那个文件大小是 22396/577ch,比28672/7000h小 + - 当你有一个合适的.hex文件时,你就要重试加载那个了 + - 您在键盘Makefile中的某些选项可能消耗额外内存;注意以下这几个 + BOOTMAGIC_ENABLE, MOUSEKEY_ENABLE, EXTRAKEY_ENABLE, CONSOLE_ENABLE, API_SYSEX_ENABLE +- DFU 工具/不/可以写入bootloader (unless you throw in extra fruit salad of options), + 所以还是有点危险的 +- EEPROM大概有100000次循环寿命。不要总是频繁重写固件;EEPROM会玩坏的。 +## 全键无冲不好用 +首先你要在**Makefile**用如下命令编译固件`NKRO_ENABLE`。 + +全键无冲还不好用的话试着用`Magic` **N** 命令(默认是`LShift+RShift+N`)。这个命令会在**全键无冲**和**六键无冲**之间临时切换。有些情况**全键无冲**不好用你就需要使用**六键无冲**模式,尤其是在BIOS中。 + +如果你的固件使用`BOOTMAGIC_ENABLE`编译的你要用`BootMagic` **N** 命令(默认`Space+N`)打开开关。这个设置保存在EEPROM中并保存在电源循环中。 + + +https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch + + +## 指点杆需要复位电路(PS/2 鼠标支持) +如果没有复位电路,由于硬件初始化不正确,您将得到不一致的结果。查看TPM754复位电路。 + +- http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447 +- http://www.mikrocontroller.net/attachment/52583/tpm754.pdf + + +## 矩阵不可读16以上的列 +当列超过16时[matrix.h]的`read_cols()`中,用`1UL<<16`而不要用`1<<16`。 + +在C语言中`1` 是一个[int] 类型的[16 bit]值,在AVR中你不能左移大于15次。如果你使用`1<<16`的话会得到意外的零。你要用 [unsigned long]类型,比如`1UL`。 + +http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279 + + +## Bootloader跳转不好用 +在**Makefile**中正确配置**Makefile**大小。如果分区大小不正确,引导加载程序可能无法从**Magic command**和**Boot Magic**加载。 +``` +# bootloader字节数: +# Atmel DFU loader(ATmega32U4) 4096 +# Atmel DFU loader(AT90USB128) 8192 +# LUFA bootloader(ATmega32U4) 4096 +# Arduino Caterina(ATmega32U4) 4096 +# USBaspLoader(ATmega***) 2048 +# Teensy halfKay(ATmega32U4) 512 +# Teensy++ halfKay(AT90USB128) 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 +``` +AVR引导大小是通过**BOOTSZ**熔丝位来设置的。查阅你单片机的datasheet。 +记住,datasheet用的是**Word**(2字节)表示大小和地址,TMK用的是**Byte**。 + +AVR引导部分位于闪存的末尾,如下所示(Application是应用区,Bootloader是引导区)。 +``` +byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286) +0x0000 +---------------+ 0x00000 +---------------+ + | | | | + | | | | + | Application | | Application | + | | | | + = = = = + | | 32KB-4KB | | 128KB-8KB +0x6000 +---------------+ 0x1E000 +---------------+ + | Bootloader | 4KB | Bootloader | 8KB +0x7FFF +---------------+ 0x1FFFF +---------------+ + + +byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286) +0x0000 +---------------+ 0x00000 +---------------+ + | | | | + | | | | + | Application | | Application | + | | | | + = = = = + | | 32KB-512B | | 128KB-2KB +0x7E00 +---------------+ 0x1FC00 +---------------+ + | Bootloader | 512B | Bootloader | 2KB +0x7FFF +---------------+ 0x1FFFF +---------------+ +``` + +详情请见下方issue。 +https://github.com/tmk/tmk_keyboard/issues/179 + +如果你使用TeensyUSB, 有一个[已知bug](https://github.com/qmk/qmk_firmware/issues/164)硬件重置按钮阻止软件定义重置键工作。重新插拔键盘就好了。 + +## 特殊额外键不起作用(系统,音频控制键) +你要在`rules.mk`定义`EXTRAKEY_ENABLE`在QMK中使用它们。 + +``` +EXTRAKEY_ENABLE = yes # 音频控制和系统控制 +``` + +## 睡眠唤醒不好用 + +在Windows查看设备管理器中该键盘设备属性中电源管理选项卡中的`允许此设备唤醒计算机(O)`是否勾选。同时看一眼BIOS设置。 + +在主机睡眠时按下任何键都可以唤醒了。 + +## 使用Arduino? + +**注意Arduino的针脚名字和主控芯片的不一样。** 比如, Arduino的`D0`并不是`PD0`。自己用原理图捋一下电路。 + +- http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf +- http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf + +Arduino Leonardo和micro使用**ATMega32U4**,该芯片TMK可用,但Arduino的bootloader会导致问题。 + + +## 在USB AVR使用PF4-7针脚? +你要置位MCUCR寄存器JTD位来将PF4-7设置为GPIO。这些针脚默认是JTAG功能。 像ATMega*U* or AT90USB*这样的MCU会受影响。 + +如果是用Teensy的话就不需要了。Tennsy自带JTAGEN位未编程来失能该功能。 + +代码如下。 +``` + // F接口JTAG失能。在四个周期内写入两次JTD位。 + MCUCR |= (1< +![键盘设计图](https://i.imgur.com/5wsh5wM.png) + +## 我有一些键变成了其他功能或者不工作了 + +QMK有两个功能,Bootmagic和命令行,它允许您在运行中更改键盘的行为。该功能包括但不仅限于, 交换Ctrl/Caps,关闭界面,交换Alt/Gui,交换 Backspace/Backslash,禁用所有键,以及其他的行为改变。 + +快速解决方法是插入键盘时按住`Space`+`Backspace`。该操作将重置已保存设置,让这些键回复初始功能。这招不好用的话参阅下方: + +* [Bootmagic](feature_bootmagic.md) +* [命令](feature_command.md) + +## 菜单键不好用 + +现在大多数键盘 `KC_RGUI`和`KC_RCTL`中间的键子叫做`KC_APP`。这是因为在这个键子发明之前相关标准里就已经有键叫做`MENU(菜单)`了,所以微软叫他`APP(应用)`键。 + +## `KC_SYSREQ` 不工作 +使用抓屏的键码(`KC_PSCREEN`或`KC_PSCR`)而不用`KC_SYSREQ`。组合键'Alt + Print Screen'会被当作'System request'。 + +见[issue #168](https://github.com/tmk/tmk_keyboard/issues/168)和 +* http://en.wikipedia.org/wiki/Magic_SysRq_key +* http://en.wikipedia.org/wiki/System_request + +## 电源键不工作 + +这有点让人困惑,QMK有两个"Power(电源)"键码: `KC_POWER` 在键盘/小键盘的HID使用页面中,`KC_SYSTEM_POWER` (或者叫`KC_PWR`)在用户页。 + +前者只能被macOS识别,但是后者,即`KC_SLEP`和`KC_WAKE`三大主要操作系统全都支持,所以推荐使用这两个。Windows下这些键立即生效,macOS要长按直到弹出对话框。 + +## 自动大小写锁定 +可以解决'the'问题(正常应为The)。我经常在输入'The'时不慎输入了'the'或者'THe'。自动大小写锁定可以修正此类问题。详见下方链接。 +https://github.com/tmk/tmk_keyboard/issues/67 + +## 修改 键/层 卡住 +除非正确配置层切换,否则修改键或层可能会卡住。 +对于修改键和图层操作,必须把`KC_TRANS`放到目标层的相同位置,用于注销修改键或在释放事件时返回到上一层。 +* https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#31-momentary-switching +* http://geekhack.org/index.php?topic=57008.msg1492604#msg1492604 +* https://github.com/tmk/tmk_keyboard/issues/248 + + +## 机械自锁开关支持Mechanical Lock Switch Support + +本功能用于*机械自锁开关*比如[this Alps one](http://deskthority.net/wiki/Alps_SKCL_Lock)。你可以通过向`config.h`添加以下宏来使能该功能: + +``` +#define LOCKING_SUPPORT_ENABLE +#define LOCKING_RESYNC_ENABLE +``` + +在使能该功能后,要在键盘中使用`KC_LCAP`, `KC_LNUM` 和 `KC_LSCR`这三个键码。 + +远古机械键盘偶尔会有自锁机械开关,现在几乎没有了。***大多数情况下你不需要使用该功能,且要使用`KC_CAPS`, `KC_NLCK`和`KC_SLCK`这三个键码。*** + +## 输入ASCII之外的特殊字符比如Cédille 'Ç' +没有在所有系统中输入这个的通用方法。你要定义针对你的特定操作系统或布局的**宏**。 + +比如看这个**宏**代码的文章。 + +http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p195620 + +在**Windows**上,可以用`AltGr`键或**Alt码**。 +* http://en.wikipedia.org/wiki/AltGr_key +* https://zh.wikipedia.org/wiki/Alt%E7%A0%81 + +在**Mac OS**定义`Option`键组合。 +* https://zh.wikipedia.org/wiki/Option%E9%94%AE#%E6%9B%BF%E4%BB%A3%E9%94%AE%E7%9B%98%E8%BE%93%E5%85%A5 + +在**Xorg**可以改用`compose`键。 +* http://en.wikipedia.org/wiki/Compose_key + +下方链接查看**Unicode**输入。 +* http://en.wikipedia.org/wiki/Unicode_input + +## macOS上的`Fn` + +不像大多数FN键,苹果上那个有自己的键码...呃,基本上算吧。 他取缔了基本6键无冲HID报告的第六个键码 -- 所以苹果键盘其实是5键无冲的。 + +技术上说QMK可以发送这个键。但是,这样做需要修改报告格式以添加FN键的状态。这还不是最糟糕的,你的键盘的VID和PID和真的苹果键盘不一样的话还不会被识别。 +QMK官方支持这个会被律师函的,所以就当我没说过。 + +详见[issue#2179](https://github.com/qmk/qmk_firmware/issues/2179)。 + + +## Mac OSX的媒体控制键 +#### KC_MNXT 和 KC_MPRV 在Mac上不好用 +使用 `KC_MFFD`(`KC_MEDIA_FAST_FORWARD`) 和 `KC_MRWD`(`KC_MEDIA_REWIND`),不要用 `KC_MNXT` 和 `KC_MPRV`. +详见 https://github.com/tmk/tmk_keyboard/issues/195 + + +## Mac OSX中支持那些键? +你可以从此源码中获知在OSX中支持哪些键码 + +`usb_2_adb_keymap` 阵列映射 键盘/小键盘 页用于ADB扫描码(OSX内部键码). + +https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/Cosmo_USB2ADB.c + +`IOHIDConsumer::dispatchConsumerEvent`会处理用户页面用法。 + +https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/IOHIDConsumer.cpp + + +## Mac OSX中的JIS键 +岛国特别键比如`無変換(Muhenkan)`, `変換(Henkan)`, `ひらがな(hiragana)`OSX是不是别的。You can use **Seil** to enable those keys, try following options. + +* 在电脑键盘上使能NFER键 +* 在电脑键盘上使能XFER键 +* 在电脑键盘上使能KATAKAN键 + +https://pqrs.org/osx/karabiner/seil.html + + +## RN-42蓝牙模块与Karabiner不能有效协同工作 +Karabiner - Mac OSX的改键软件 - 默认RN-42模块是不会被响应的。想要Karabiner和你的键盘协同工作你要使能此选项: +https://github.com/tekezo/Karabiner/issues/403#issuecomment-102559237 + +此问题详见下方链接。 +https://github.com/tmk/tmk_keyboard/issues/213 +https://github.com/tekezo/Karabiner/issues/403 + + +## Esc 和 ` 双功能键 + +请见[Grave Escape](feature_grave_esc.md)功能。 + +## 右侧双角色修改键(诸如Shift、Alt等有修改其他键作用的键)变箭头键 +右侧修改键单击时会变为箭头键,长按就还是修改键。在TMK中双角色键称之为**TAP**. +``` + +#include "keymap_common.h" + + +/* 用TMK双角色键功能实现右侧修改键改箭头键 + * + * https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#213-modifier-with-tap-keydual-role + * https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys + */ +const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: qwerty */ + [0] = LAYOUT( \ + ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS,BSPC, \ + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \ + LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \ + LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,FN0, ESC, \ + FN4, LGUI,LALT, SPC, APP, FN2, FN1, FN3), + [1] = LAYOUT( \ + GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,TRNS, \ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,\ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN5, TRNS, \ + TRNS,TRNS,TRNS, TRNS, TRNS,FN7, FN6, FN8), +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_UP), + [1] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_DOWN), + [2] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_LEFT), + [3] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RIGHT), + [4] = ACTION_LAYER_MOMENTARY(1), + [5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_PGUP), + [6] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_PGDN), + [7] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_HOME), + [8] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_END), +}; + +``` + +双角色键说明: https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys + + +## Mac OSX的弹出键 +`KC_EJCT` 键码在OSX可以使用 https://github.com/tmk/tmk_keyboard/issues/250 +似乎Windows10会忽略该键码,Linux/Xorg可以识别该键码但默认不映射。 + +目前尚不清楚如何在真正的苹果键盘按出弹出键。HHKB使用`F20`用于弹出键(`Fn+f`),该功能在MAC模式有效但不保证与苹果弹出键码相符。 + + +## `action_util.c`中的 `weak_mods`和`real_mods`是什么 +___待改善___ + +real_mods 用于保存实际(物理)修改键的实际状态。 +weak_mods 用于保存虚拟或临时修改键,它将不会影响实际修改键。 + +以按下左侧Shift键然后输入ACTION_MODS_KEY(LSHIFT, KC_A)为例, + +在weak_mods时, +* (1) 按下不抬起左Shift: real_mods |= MOD_BIT(LSHIFT) +* (2) 按 ACTION_MODS_KEY(LSHIFT, KC_A): weak_mods |= MOD_BIT(LSHIFT) +* (3) 抬起 ACTION_MODS_KEY(LSHIFT, KC_A): weak_mods &= ~MOD_BIT(LSHIFT) +real_mods 还是保持在修改状态。 + +在没有weak_mods时, +* (1) 按下不抬起左Shift: real_mods |= MOD_BIT(LSHIFT) +* (2) 按 ACTION_MODS_KEY(LSHIFT, KC_A): real_mods |= MOD_BIT(LSHIFT) +* (3) 抬起 ACTION_MODS_KEY(LSHIFT, KC_A): real_mods &= ~MOD_BIT(LSHIFT) +此时real_mods失去‘实际左Shift’的状态。 + +weak_mods和real_mods现已全部加入键盘数据包发送豪华套餐。 +https://github.com/tmk/tmk_core/blob/master/common/action_util.c#L57 From dcb274b2867adeb0f516eb709c7f651aa61774a6 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 22 May 2019 20:55:52 -0700 Subject: [PATCH 102/341] Fix links Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- docs/_summary.md | 4 ++-- docs/features.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/_summary.md b/docs/_summary.md index 1c3153b04..02254a9d8 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -54,12 +54,12 @@ * [Bootmagic](feature_bootmagic.md) * [Combos](feature_combo) * [Command](feature_command.md) - * [Debounce API](feature_debuonce.md) + * [Debounce API](feature_debounce_type.md) * [Dynamic Macros](feature_dynamic_macros.md) * [Encoders](feature_encoders.md) * [Grave Escape](feature_grave_esc.md) * [Haptic Feedback](feature_haptic_feedback.md) - * [HD44780 LED](feature_hd44780.md) + * [HD44780 LCD Controller](feature_hd44780.md) * [Key Lock](feature_key_lock.md) * [Layouts](feature_layouts.md) * [Leader Key](feature_leader_key.md) diff --git a/docs/features.md b/docs/features.md index eb3f26d6a..ac9aad394 100644 --- a/docs/features.md +++ b/docs/features.md @@ -11,7 +11,7 @@ QMK has a staggering number of features for building your keyboard. It can take * [Bootmagic](feature_bootmagic.md) - Adjust the behavior of your keyboard using hotkeys. * [Combos](feature_combo.md) - Custom actions for multiple key holds. * [Command](feature_command.md) - Runtime version of bootmagic (Formerly known as "Magic"). -* [Debounce API](feature_debuonce.md) - Customization of debouncing algorithms, and the ability to add more/custom debouncing. +* [Debounce API](feature_debounce_type.md) - Customization of debouncing algorithms, and the ability to add more/custom debouncing. * [Dynamic Macros](feature_dynamic_macros.md) - Record and playback macros from the keyboard itself. * [Encoders](feature_encoders.md) - Rotary encoders! * [Grave Escape](feature_grave_esc.md) - Lets you use a single key for Esc and Grave. @@ -23,7 +23,7 @@ QMK has a staggering number of features for building your keyboard. It can take * [LED Matrix](feature_led_matrix.md) - LED Matrix single color lights for per key lighting (Single Color, not RGB). * [Macros](feature_macros.md) - Send multiple key presses when pressing only one physical key. * [Mouse keys](feature_mouse_keys.md) - Control your mouse pointer from your keyboard. -* [OLED Driver](feature_oled_driver) - Add OLED screens to your keyboard. +* [OLED Driver](feature_oled_driver.md) - Add OLED screens to your keyboard. * [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) - Sticky Keys, lets hit a key rather than holding it. * [Pointing Device](feature_pointing_device.md) - Framework for connecting your custom pointing device to your keyboard. * [PS2 Mouse](feature_ps2_mouse.md) - Driver for connecting a PS/2 mouse directly to your keyboard. @@ -37,4 +37,4 @@ QMK has a staggering number of features for building your keyboard. It can take * [Thermal Printer](feature_thermal_printer.md) - Connect a thermal printer to your keyboard to be able to toggle on a printed log of everything you type. * [Unicode](feature_unicode.md) - Unicode input support. * [Userspace](feature_userspace.md) - Share code between different keymaps and keyboards. -* [Velocikey](feature_velocikey.md) - Allows changes in animation speed based on WPM/Typing speed. +* [Velocikey](feature_velocikey.md) - Allows changes in RGB animation speed based on WPM/Typing speed. From c97315dc5a355636e1f514a93c28ea2842002742 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 22 May 2019 20:59:01 -0700 Subject: [PATCH 103/341] Additional link fixes Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- docs/_summary.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_summary.md b/docs/_summary.md index 02254a9d8..8a40ccd7f 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -52,7 +52,7 @@ * [Backlight](feature_backlight.md) * [Bluetooth](feature_bluetooth.md) * [Bootmagic](feature_bootmagic.md) - * [Combos](feature_combo) + * [Combos](feature_combo.md) * [Command](feature_command.md) * [Debounce API](feature_debounce_type.md) * [Dynamic Macros](feature_dynamic_macros.md) @@ -66,7 +66,7 @@ * [LED Matrix](feature_led_matrix.md) * [Macros](feature_macros.md) * [Mouse Keys](feature_mouse_keys.md) - * [OLED Driver](feature_oled_driver) + * [OLED Driver](feature_oled_driver.md) * [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) * [Pointing Device](feature_pointing_device.md) * [PS/2 Mouse](feature_ps2_mouse.md) From d31c54c8aff2645ca7762ad423735d409561ba39 Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 23 May 2019 06:06:55 +0200 Subject: [PATCH 104/341] [Keyboard] Add info.json to O4L5x12 (#5950) * [Keyboard] Add info.json to O4L5x12 * Apply suggestions from code review Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Better formatting * Add key_count to all layouts --- keyboards/keycapsss/o4l_5x12/info.json | 202 +++++++++++++++++++++++++ 1 file changed, 202 insertions(+) create mode 100644 keyboards/keycapsss/o4l_5x12/info.json diff --git a/keyboards/keycapsss/o4l_5x12/info.json b/keyboards/keycapsss/o4l_5x12/info.json new file mode 100644 index 000000000..7dba0dab5 --- /dev/null +++ b/keyboards/keycapsss/o4l_5x12/info.json @@ -0,0 +1,202 @@ +{ + "keyboard_name": "O4L 5x12", + "keyboard_folder": "keycapsss/o4l_5x12", + "url": "https://github.com/qmk/qmk_firmware/tree/master/keyboards/keycapsss/o4l_5x12", + "maintainer": "BenRoe", + "width": 12, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x12": { + "key_count": 60, + "layout": [ + {"w": 1, "x": 0, "y": 0}, + {"w": 1, "x": 1, "y": 0}, + {"w": 1, "x": 2, "y": 0}, + {"w": 1, "x": 3, "y": 0}, + {"w": 1, "x": 4, "y": 0}, + {"w": 1, "x": 5, "y": 0}, + {"w": 1, "x": 6, "y": 0}, + {"w": 1, "x": 7, "y": 0}, + {"w": 1, "x": 8, "y": 0}, + {"w": 1, "x": 9, "y": 0}, + {"w": 1, "x": 10, "y": 0}, + {"w": 1, "x": 11, "y": 0}, + {"w": 1, "x": 0, "y": 1}, + {"w": 1, "x": 1, "y": 1}, + {"w": 1, "x": 2, "y": 1}, + {"w": 1, "x": 3, "y": 1}, + {"w": 1, "x": 4, "y": 1}, + {"w": 1, "x": 5, "y": 1}, + {"w": 1, "x": 6, "y": 1}, + {"w": 1, "x": 7, "y": 1}, + {"w": 1, "x": 8, "y": 1}, + {"w": 1, "x": 9, "y": 1}, + {"w": 1, "x": 10, "y": 1}, + {"w": 1, "x": 11, "y": 1}, + {"w": 1, "x": 0, "y": 2}, + {"w": 1, "x": 1, "y": 2}, + {"w": 1, "x": 2, "y": 2}, + {"w": 1, "x": 3, "y": 2}, + {"w": 1, "x": 4, "y": 2}, + {"w": 1, "x": 5, "y": 2}, + {"w": 1, "x": 6, "y": 2}, + {"w": 1, "x": 7, "y": 2}, + {"w": 1, "x": 8, "y": 2}, + {"w": 1, "x": 9, "y": 2}, + {"w": 1, "x": 10, "y": 2}, + {"w": 1, "x": 11, "y": 2}, + {"w": 1, "x": 0, "y": 3}, + {"w": 1, "x": 1, "y": 3}, + {"w": 1, "x": 2, "y": 3}, + {"w": 1, "x": 3, "y": 3}, + {"w": 1, "x": 4, "y": 3}, + {"w": 1, "x": 5, "y": 3}, + {"w": 1, "x": 6, "y": 3}, + {"w": 1, "x": 7, "y": 3}, + {"w": 1, "x": 8, "y": 3}, + {"w": 1, "x": 9, "y": 3}, + {"w": 1, "x": 10, "y": 3}, + {"w": 1, "x": 11, "y": 3}, + {"w": 1, "x": 0, "y": 4}, + {"w": 1, "x": 1, "y": 4}, + {"w": 1, "x": 2, "y": 4}, + {"w": 1, "x": 3, "y": 4}, + {"w": 1, "x": 4, "y": 4}, + {"w": 1, "x": 5, "y": 4}, + {"w": 1, "x": 6, "y": 4}, + {"w": 1, "x": 7, "y": 4}, + {"w": 1, "x": 8, "y": 4}, + {"w": 1, "x": 9, "y": 4}, + {"w": 1, "x": 10, "y": 4}, + {"w": 1, "x": 11, "y": 4} + ] + }, + "LAYOUT_ortho_5x12_1x2uC": { + "key_count": 59, + "layout": [ + {"w": 1, "x": 0, "y": 0}, + {"w": 1, "x": 1, "y": 0}, + {"w": 1, "x": 2, "y": 0}, + {"w": 1, "x": 3, "y": 0}, + {"w": 1, "x": 4, "y": 0}, + {"w": 1, "x": 5, "y": 0}, + {"w": 1, "x": 6, "y": 0}, + {"w": 1, "x": 7, "y": 0}, + {"w": 1, "x": 8, "y": 0}, + {"w": 1, "x": 9, "y": 0}, + {"w": 1, "x": 10, "y": 0}, + {"w": 1, "x": 11, "y": 0}, + {"w": 1, "x": 0, "y": 1}, + {"w": 1, "x": 1, "y": 1}, + {"w": 1, "x": 2, "y": 1}, + {"w": 1, "x": 3, "y": 1}, + {"w": 1, "x": 4, "y": 1}, + {"w": 1, "x": 5, "y": 1}, + {"w": 1, "x": 6, "y": 1}, + {"w": 1, "x": 7, "y": 1}, + {"w": 1, "x": 8, "y": 1}, + {"w": 1, "x": 9, "y": 1}, + {"w": 1, "x": 10, "y": 1}, + {"w": 1, "x": 11, "y": 1}, + {"w": 1, "x": 0, "y": 2}, + {"w": 1, "x": 1, "y": 2}, + {"w": 1, "x": 2, "y": 2}, + {"w": 1, "x": 3, "y": 2}, + {"w": 1, "x": 4, "y": 2}, + {"w": 1, "x": 5, "y": 2}, + {"w": 1, "x": 6, "y": 2}, + {"w": 1, "x": 7, "y": 2}, + {"w": 1, "x": 8, "y": 2}, + {"w": 1, "x": 9, "y": 2}, + {"w": 1, "x": 10, "y": 2}, + {"w": 1, "x": 11, "y": 2}, + {"w": 1, "x": 0, "y": 3}, + {"w": 1, "x": 1, "y": 3}, + {"w": 1, "x": 2, "y": 3}, + {"w": 1, "x": 3, "y": 3}, + {"w": 1, "x": 4, "y": 3}, + {"w": 1, "x": 5, "y": 3}, + {"w": 1, "x": 6, "y": 3}, + {"w": 1, "x": 7, "y": 3}, + {"w": 1, "x": 8, "y": 3}, + {"w": 1, "x": 9, "y": 3}, + {"w": 1, "x": 10, "y": 3}, + {"w": 1, "x": 11, "y": 3}, + {"w": 1, "x": 0, "y": 4}, + {"w": 1, "x": 1, "y": 4}, + {"w": 1, "x": 2, "y": 4}, + {"w": 1, "x": 3, "y": 4}, + {"w": 1, "x": 4, "y": 4}, + {"w": 2, "x": 5, "y": 4}, + {"w": 1, "x": 7, "y": 4}, + {"w": 1, "x": 8, "y": 4}, + {"w": 1, "x": 9, "y": 4}, + {"w": 1, "x": 10, "y": 4}, + {"w": 1, "x": 11, "y": 4} + ] + }, + "LAYOUT_ortho_5x12_2x2u": { + "key_count": 58, + "layout": [ + {"w": 1, "x": 0, "y": 0}, + {"w": 1, "x": 1, "y": 0}, + {"w": 1, "x": 2, "y": 0}, + {"w": 1, "x": 3, "y": 0}, + {"w": 1, "x": 4, "y": 0}, + {"w": 1, "x": 5, "y": 0}, + {"w": 1, "x": 6, "y": 0}, + {"w": 1, "x": 7, "y": 0}, + {"w": 1, "x": 8, "y": 0}, + {"w": 1, "x": 9, "y": 0}, + {"w": 1, "x": 10, "y": 0}, + {"w": 1, "x": 11, "y": 0}, + {"w": 1, "x": 0, "y": 1}, + {"w": 1, "x": 1, "y": 1}, + {"w": 1, "x": 2, "y": 1}, + {"w": 1, "x": 3, "y": 1}, + {"w": 1, "x": 4, "y": 1}, + {"w": 1, "x": 5, "y": 1}, + {"w": 1, "x": 6, "y": 1}, + {"w": 1, "x": 7, "y": 1}, + {"w": 1, "x": 8, "y": 1}, + {"w": 1, "x": 9, "y": 1}, + {"w": 1, "x": 10, "y": 1}, + {"w": 1, "x": 11, "y": 1}, + {"w": 1, "x": 0, "y": 2}, + {"w": 1, "x": 1, "y": 2}, + {"w": 1, "x": 2, "y": 2}, + {"w": 1, "x": 3, "y": 2}, + {"w": 1, "x": 4, "y": 2}, + {"w": 1, "x": 5, "y": 2}, + {"w": 1, "x": 6, "y": 2}, + {"w": 1, "x": 7, "y": 2}, + {"w": 1, "x": 8, "y": 2}, + {"w": 1, "x": 9, "y": 2}, + {"w": 1, "x": 10, "y": 2}, + {"w": 1, "x": 11, "y": 2}, + {"w": 1, "x": 0, "y": 3}, + {"w": 1, "x": 1, "y": 3}, + {"w": 1, "x": 2, "y": 3}, + {"w": 1, "x": 3, "y": 3}, + {"w": 1, "x": 4, "y": 3}, + {"w": 1, "x": 5, "y": 3}, + {"w": 1, "x": 6, "y": 3}, + {"w": 1, "x": 7, "y": 3}, + {"w": 1, "x": 8, "y": 3}, + {"w": 1, "x": 9, "y": 3}, + {"w": 1, "x": 10, "y": 3}, + {"w": 1, "x": 11, "y": 3}, + {"w": 1, "x": 0, "y": 4}, + {"w": 1, "x": 1, "y": 4}, + {"w": 1, "x": 2, "y": 4}, + {"w": 1, "x": 3, "y": 4}, + {"w": 2, "x": 4, "y": 4}, + {"w": 2, "x": 6, "y": 4}, + {"w": 1, "x": 8, "y": 4}, + {"w": 1, "x": 9, "y": 4}, + {"w": 1, "x": 10, "y": 4}, + {"w": 1, "x": 11, "y": 4} + ] + } + } +} From fcb56534111652b9fa19d9d8e7bce635c7a63eb6 Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Wed, 22 May 2019 23:08:48 -0500 Subject: [PATCH 105/341] [Keymap] Switch Quefrency keymap from I2C back to serial; factor common configs into userspace (#5951) * Switch Quefrency from flaky I2C back to serial * Lower mouse wheel speed on Quefrency slightly * Migrate common settings to userspace * Enable Bootmagic Lite for consistent reset to bootloader. * Turn off some undesired features across all keyboards. * Remove EEPROM reset keybinding from all keyboards since Bootmagic Lite also does an EEPROM reset. * Set backlight and underglow increments consistently across all keyboards since lots of them like to override the deafults. * Set mouse keys consistently across all keyboards. * Update function layer keymap images --- .../kbd67/hotswap/keymaps/bcat/keymap.c | 2 +- .../kbd67/hotswap/keymaps/bcat/readme.md | 2 +- .../keebio/quefrency/keymaps/bcat/config.h | 28 ++++++++--------- .../keebio/quefrency/keymaps/bcat/keymap.c | 2 +- .../keebio/quefrency/keymaps/bcat/readme.md | 2 +- .../keebio/quefrency/keymaps/bcat/rules.mk | 2 -- users/bcat/config.h | 31 +++++++++++++++++++ users/bcat/rules.mk | 11 +++++++ 8 files changed, 59 insertions(+), 21 deletions(-) create mode 100644 users/bcat/config.h create mode 100644 users/bcat/rules.mk diff --git a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c index ab2cfa80a..6cb6afaea 100644 --- a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c @@ -21,7 +21,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Function layer: http://www.keyboard-layout-editor.com/#/gists/f29128427f674c43777f045e363d1b44 */ [LAYER_FUNCTION] = LAYOUT( _______, 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_INS, KC_DEL, _______, - _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, EEP_RST, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, + _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, KC_CAPS, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_APP, _______, _______, _______, _______ diff --git a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md index 0aa6fa136..d1779152f 100644 --- a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md @@ -10,4 +10,4 @@ cluster. ## Function layer -![Function layer layout](https://i.imgur.com/KScatX6.png) +![Function layer layout](https://i.imgur.com/urDnuTC.png) diff --git a/keyboards/keebio/quefrency/keymaps/bcat/config.h b/keyboards/keebio/quefrency/keymaps/bcat/config.h index 528cfd39a..c9e836597 100644 --- a/keyboards/keebio/quefrency/keymaps/bcat/config.h +++ b/keyboards/keebio/quefrency/keymaps/bcat/config.h @@ -1,10 +1,18 @@ #pragma once -/* Use I2C rather than serial communicaiton to reduce latency. */ -#define USE_I2C - -/* Turn off RGB lighting when the host goes to sleep. */ -#define RGBLIGHT_SLEEP +/* + * I2C seems to randomly drop keystrokes. Not sure why. It seems a bit like + * https://github.com/qmk/qmk_firmware/issues/5037, but that issue is closed, + * and our problems happen even with underglow disabled. + * + * This issue occurs with multiple TRRS cables of different lengths from + * different companies, so it's most likely not a cable issue. It may be that + * we are running into issues with long I2C runs, in which case stronger + * pull-up resistors might help: + * https://hackaday.com/2017/02/08/taking-the-leap-off-board-an-introduction-to-i2c-over-long-wires/. + * For now, just don't use I2C. + */ +#define USE_SERIAL /* Use an extra LED on the right side since it's wider on the 65% PCB. */ #undef RGBLED_NUM @@ -12,13 +20,3 @@ /* Set up RGB lighting so it works with either side as master. */ #define RGBLED_SPLIT { 8, 9 } - -/* Make mouse operation smoother. */ -#define MOUSEKEY_DELAY 0 -#define MOUSEKEY_INTERVAL 16 - -/* Lower mouse speed to adjust for reduced MOUSEKEY_INTERVAL. */ -#define MOUSEKEY_MAX_SPEED 7 -#define MOUSEKEY_TIME_TO_MAX 150 -#define MOUSEKEY_WHEEL_MAX_SPEED 4 -#define MOUSEKEY_WHEEL_TIME_TO_MAX 150 diff --git a/keyboards/keebio/quefrency/keymaps/bcat/keymap.c b/keyboards/keebio/quefrency/keymaps/bcat/keymap.c index 80e934577..fc66ff101 100644 --- a/keyboards/keebio/quefrency/keymaps/bcat/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/bcat/keymap.c @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Function layer: http://www.keyboard-layout-editor.com/#/gists/59636898946da51f91fb290f8e078b4d */ [LAYER_FUNCTION] = LAYOUT_65( _______, 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_INS, KC_DEL, RGB_HUI, - _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, EEP_RST, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, RGB_SAI, + _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, RGB_SAI, KC_CAPS, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_SAD, _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD diff --git a/keyboards/keebio/quefrency/keymaps/bcat/readme.md b/keyboards/keebio/quefrency/keymaps/bcat/readme.md index 51e5f2598..2e9e0f6d7 100644 --- a/keyboards/keebio/quefrency/keymaps/bcat/readme.md +++ b/keyboards/keebio/quefrency/keymaps/bcat/readme.md @@ -10,7 +10,7 @@ cluster, and mouse keys on their own layer centered around the arrow cluster. ## Function layer -![Function layer layout](https://i.imgur.com/ISklbfF.png) +![Function layer layout](https://i.imgur.com/4R1F72M.png) ## Mouse layer diff --git a/keyboards/keebio/quefrency/keymaps/bcat/rules.mk b/keyboards/keebio/quefrency/keymaps/bcat/rules.mk index 274e217ca..c87b447c1 100644 --- a/keyboards/keebio/quefrency/keymaps/bcat/rules.mk +++ b/keyboards/keebio/quefrency/keymaps/bcat/rules.mk @@ -1,3 +1 @@ BOOTLOADER = atmel-dfu # Elite-C - -MOUSEKEY_ENABLE = yes diff --git a/users/bcat/config.h b/users/bcat/config.h new file mode 100644 index 000000000..a29aded71 --- /dev/null +++ b/users/bcat/config.h @@ -0,0 +1,31 @@ +/* Turn off RGB lighting when the host goes to sleep. */ +#define RGBLIGHT_SLEEP + +/* Keep backlight and RGB level increments consistent across keyboards. */ +#undef BACKLIGHT_LEVELS +#undef RGBLIGHT_HUE_STEP +#undef RGBLIGHT_SAT_STEP +#undef RGBLIGHT_VAL_STEP + +#define BACKLIGHT_LEVELS 7 +#define RGVLIGHT_HUE_STEP 8 +#define RGVLIGHT_SAT_STEP 17 +#define RGVLIGHT_VAL_STEP 17 + +/* Make mouse operation smoother. */ +#undef MOUSEKEY_DELAY +#undef MOUSEKEY_INTERVAL + +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_INTERVAL 16 + +/* Lower mouse speed to adjust for reduced MOUSEKEY_INTERVAL. */ +#undef MOUSEKEY_MAX_SPEED +#undef MOUSEKEY_TIME_TO_MAX +#undef MOUSEKEY_WHEEL_MAX_SPEED +#undef MOUSEKEY_WHEEL_TIME_TO_MAX + +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_TIME_TO_MAX 150 +#define MOUSEKEY_WHEEL_MAX_SPEED 3 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 150 diff --git a/users/bcat/rules.mk b/users/bcat/rules.mk new file mode 100644 index 000000000..59f82709a --- /dev/null +++ b/users/bcat/rules.mk @@ -0,0 +1,11 @@ +# Enable Bootmagic Lite to consistently reset to bootloader and clear EEPROM. +BOOTMAGIC_ENABLE = lite + +# Enable mouse and media keys on all keyboards. +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes + +# Disable some unwanted features on all keyboards. +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +NKRO_ENABLE = no From 73715bacc26e47e574a5fbefb4d477cb4b7de9e7 Mon Sep 17 00:00:00 2001 From: tuesdayjohn Date: Thu, 23 May 2019 00:13:55 -0400 Subject: [PATCH 106/341] [Keymap] Added personal keymap in Kinesis matching username; updated old readme.md (#5955) * Added 'tuesdayjohn' folder; updated old readme.md * Update keymap.c * Update readme.md * Update keymap.c --- .../keymaps/insertsnideremarks/readme.md | 4 +- .../kinesis/keymaps/tuesdayjohn/config.h | 6 + .../kinesis/keymaps/tuesdayjohn/keymap.c | 427 ++++++++++++++++++ .../kinesis/keymaps/tuesdayjohn/readme.md | 219 +++++++++ .../kinesis/keymaps/tuesdayjohn/rules.mk | 19 + 5 files changed, 674 insertions(+), 1 deletion(-) create mode 100644 keyboards/kinesis/keymaps/tuesdayjohn/config.h create mode 100644 keyboards/kinesis/keymaps/tuesdayjohn/keymap.c create mode 100644 keyboards/kinesis/keymaps/tuesdayjohn/readme.md create mode 100644 keyboards/kinesis/keymaps/tuesdayjohn/rules.mk diff --git a/keyboards/kinesis/keymaps/insertsnideremarks/readme.md b/keyboards/kinesis/keymaps/insertsnideremarks/readme.md index 4c8fb153c..783c18818 100644 --- a/keyboards/kinesis/keymaps/insertsnideremarks/readme.md +++ b/keyboards/kinesis/keymaps/insertsnideremarks/readme.md @@ -1,4 +1,6 @@ -# insertsnideremarks' Kinesis Keymap +## I've changed my folder name to match my GitHub username. Please see https://github.com/qmk/qmk_firmware/tree/master/keyboards/kinesis/keymaps/tuesdayjohn for my current keymap files. + +## insertsnideremarks' Kinesis Keymap These layouts are derived from what I was using on my Kinesis Contoured keyboards with Hasu's USB-USB TMK converters. With the move to QMK via Stapelberg replacement controller, I've cleaned up the layouts a bit while adding more functions and layers. diff --git a/keyboards/kinesis/keymaps/tuesdayjohn/config.h b/keyboards/kinesis/keymaps/tuesdayjohn/config.h new file mode 100644 index 000000000..ebed17fed --- /dev/null +++ b/keyboards/kinesis/keymaps/tuesdayjohn/config.h @@ -0,0 +1,6 @@ +#pragma once + +// place overrides here +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_TERM 175 +#define TAPPING_TOGGLE 2 diff --git a/keyboards/kinesis/keymaps/tuesdayjohn/keymap.c b/keyboards/kinesis/keymaps/tuesdayjohn/keymap.c new file mode 100644 index 000000000..0cdb7d584 --- /dev/null +++ b/keyboards/kinesis/keymaps/tuesdayjohn/keymap.c @@ -0,0 +1,427 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum kinesis_layers { + _COLEMAK, // Colemak (default layer) + _QWERTY, // QWERTY + _GAMING, // Gaming/vanilla toggle layer (limited dual-role keys and layer access) + _NUMBERS, // Numbers & Symbols + _NUMBERS2, // Numbers & Symbols 2 (identical as _NUMBERS; basically used for tri-layer access to _ADJUST) + _FUNCTION, // Function + _FUNCTION2, // Function 2 (identical as _FUNCTION; used to allow for easier use of space and backspace while using function layer arrows) + _NUMPAD, // Numpad + _ADJUST, // Adjust layer (accessed via tri-layer feature) + _ADJUST2 // Second Adjust layer (accessed outside of tri-layer feature) +}; + +enum kinesis_keycodes { + COLEMAK = SAFE_RANGE, + QWERTY, + GAMING +}; + +//Tap Dance Declarations +enum { + ADJ = 0, + LBCB, + RBCB, + EQPL, + PLEQ, + MNUN, + SLAS, + GVTL, + PPEQ, + PMUN, + PSPA +}; + +void dance_LAYER_finished(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + layer_on(_ADJUST2); + set_oneshot_layer(_ADJUST2, ONESHOT_START); + } +} +void dance_LAYER_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + layer_off(_ADJUST2); + clear_oneshot_layer_state(ONESHOT_PRESSED); + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { +[ADJ] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LAYER_finished, dance_LAYER_reset), // Double-tap to activate Adjust layer via oneshot layer +[LBCB] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LCBR), // Left bracket on a single-tap, left brace on a double-tap +[RBCB] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_RCBR), // Right bracket on a single-tap, right brace on a double-tap +[EQPL] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_PLUS), // Plus sign on a single-tap, equal sign on a double-tap +[PLEQ] = ACTION_TAP_DANCE_DOUBLE(KC_PLUS, KC_EQL), // Equal sign on a single-tap, plus sign on a double-tap +[MNUN] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_UNDS), // Minus sign on a single-tap, underscore on a double-tap +[SLAS] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_ASTR), // Slash in a single-tap, asterisk in a double-tap +[GVTL] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, KC_TILD), // Grave on a single-tap, tilde on a double-tap +[PPEQ] = ACTION_TAP_DANCE_DOUBLE(KC_PPLS, KC_EQL), // Numpad plus sign on a single-tap, equal sign on a double-tap +[PMUN] = ACTION_TAP_DANCE_DOUBLE(KC_PMNS, KC_UNDS), // Numpad minus sign on a single-tap, underscore on a double-tap +[PSPA] = ACTION_TAP_DANCE_DOUBLE(KC_PSLS, KC_PAST) // Numpad slash on a single-tap, numpad asterisk on a double-tap +}; + +//Aliases for longer keycodes +#define NUMPAD TG(_NUMPAD) +#define ADJUST MO(_ADJUST2) +#define SPCFN LT(_FUNCTION, KC_SPC) +#define BSPCFN LT(_FUNCTION2, KC_BSPC) +#define ENTNS LT(_NUMBERS, KC_ENT) +#define DELNS LT(_NUMBERS2, KC_DEL) +#define CTLESC CTL_T(KC_ESC) +#define ALTAPP ALT_T(KC_APP) +#define CTL_A LCTL(KC_A) +#define CTL_C LCTL(KC_C) +#define CTL_V LCTL(KC_V) +#define CTL_X LCTL(KC_X) +#define CTL_Z LCTL(KC_Z) +#define CTL_Y LCTL(KC_Y) +#define CA_TAB LCA(KC_TAB) +#define HYPER ALL_T(KC_NO) +#define TD_ADJ TD(ADJ) +#define TD_LBCB TD(LBCB) +#define TD_RBCB TD(RBCB) +#define TD_EQPL TD(EQPL) +#define TD_PLEQ TD(PLEQ) +#define TD_MNUN TD(MNUN) +#define TD_SLAS TD(SLAS) +#define TD_GVTL TD(GVTL) +#define TD_PPEQ TD(PPEQ) +#define TD_PMUN TD(PMUN) +#define TD_PSPA TD(PSPA) +#define NKROTG MAGIC_TOGGLE_NKRO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* +Colemak +(Default layer; keys separated by "/" tap for first, hold for second; uses Space Cadet Shifts) +,--------------------------------------------------------------. ,--------------------------------------------------------------. +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | | F9 | F10 | F11 | F12 |PrtScr|ScrLck| Pause|Numpad|Adjust| +`--------------------------------------------------------------' `--------------------------------------------------------------' +,------------------------------------------------------. ,------------------------------------------------------. +| = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| ESC/Ctrl| A | R | S | T | D | | H | N | E | I | O | ' | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| SC Shift| Z | X | C | V | B | | K | M | , | . | / | SC Shift| +`---------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+---------' + | Ins | ` | [ | ] | | Left | Down | Up | Right | + `-----------------------------------' `-----------------------------------' + ,-----------------. ,-----------------. + | ESC/Ctl| Hyper | | RAlt | RCtl | + ,--------+--------+--------| |--------+--------+--------. + | Space | Enter | App/Alt| | RGUI | Delete | Bspc | + | / | / |--------| |--------| / | / | + | Fn | Number | Bspc | | Enter | Number2| Fn2 | + `--------------------------' `--------------------------' +*/ +[_COLEMAK] = LAYOUT_pretty( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, NUMPAD, ADJUST, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + CTLESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_INS, KC_GRV, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + CTLESC, HYPER, KC_RALT, KC_RCTL, + ALTAPP, KC_RGUI, + SPCFN, ENTNS, KC_BSPC, KC_ENT, DELNS, BSPCFN +), + +/* +QWERTY +(Keys separated by "/" tap for first, hold for second; uses Space Cadet Shifts) +,--------------------------------------------------------------. ,--------------------------------------------------------------. +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | | F9 | F10 | F11 | F12 |PrtScr|ScrLck| Pause|Numpad|Adjust| +`--------------------------------------------------------------' `--------------------------------------------------------------' +,------------------------------------------------------. ,------------------------------------------------------. +| = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| ESC/Ctrl| A | S | D | F | G | | H | J | K | L | ; | ' | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| SC Shift| Z | X | C | V | B | | N | M | , | . | / | SC Shift| +`---------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+---------' + | Ins | ` | [ | ] | | Left | Down | Up | Right | + `-----------------------------------' `-----------------------------------' + ,-----------------. ,-----------------. + | ESC/Ctl| Hyper | | RAlt | RCtl | + ,--------+--------+--------| |--------+--------+--------. + | Space | Enter | App/Alt| | RGUI | Delete | Bspc | + | / | / |--------| |--------| / | / | + | Fn | Number | Bspc | | Enter | Number2| Fn2 | + `--------------------------' `--------------------------' +*/ +[_QWERTY] = LAYOUT_pretty( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, NUMPAD, ADJUST, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_INS, KC_GRV, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + CTLESC, HYPER, KC_RALT, KC_RCTL, + ALTAPP, KC_RGUI, + SPCFN, ENTNS, KC_BSPC, KC_ENT, DELNS, BSPCFN +), + +/* +Numbers/Symbols layer +(Multiple characters: single-tap for first, double-tap for second) +,--------------------------------------------------------------. ,--------------------------------------------------------------. +| | | | | | | | | | | | | | | | | | | | +`--------------------------------------------------------------' `--------------------------------------------------------------' +,------------------------------------------------------. ,------------------------------------------------------. +| F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| | 6 | 7 | 8 | 9 | 0 | | ^ | & | * | ( | ) | | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| | 1 | 2 | 3 | 4 | 5 | | ! | @ | # | $ | % | | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| | | . | / * | - _ | + = | | ` ~ | [ { | ] } | | | | +`---------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+---------' + | ( | ) | [ { | ] } | | | | | | + `-----------------------------------' `-----------------------------------' + ,-----------------. ,-----------------. + | | | | | | + ,--------+--------+--------| |--------+--------+--------. + | | | | | | | | + | | |--------| |--------| | | + | | | | | | | | + `--------------------------' `--------------------------' +*/ +[_NUMBERS] = LAYOUT_pretty( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + _______, _______, KC_DOT, TD_SLAS, TD_MNUN, TD_PLEQ, TD_GVTL, TD_LBCB, TD_RBCB, _______, _______, _______, + KC_LPRN, KC_RPRN, TD_LBCB, TD_RBCB, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ +), + +[_NUMBERS2] = LAYOUT_pretty( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + _______, _______, KC_DOT, TD_SLAS, TD_MNUN, TD_PLEQ, TD_GVTL, TD_LBCB, TD_RBCB, _______, _______, _______, + KC_LPRN, KC_RPRN, TD_LBCB, TD_RBCB, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ +), + +/* +Function layer +,--------------------------------------------------------------. ,--------------------------------------------------------------. +| | | | | | | | | | | | | | | | | | | | +`--------------------------------------------------------------' `--------------------------------------------------------------' +,------------------------------------------------------. ,------------------------------------------------------. +| F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| | | | Up | | | | | | Up | Ctrl+Y | | | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| | Ctrl+A | Left | Down | Right | C+A+Tab| | PgUp | Left | Down | Right | Home | | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| | Ctrl+Z | Ctrl+X | Ctrl+C | Ctrl+V | Bspc | | PgDn | Mute | Vol- | Vol+ | End | | +`---------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+---------' + | | | | | | Prev | Play | Next | Stop | + `-----------------------------------' `-----------------------------------' + ,-----------------. ,-----------------. + | | | | | | + ,--------+--------+--------| |--------+--------+--------. + | | | | | | | | + | | |--------| |--------| | | + | | | | | | | | + `--------------------------' `--------------------------' +*/ +[_FUNCTION] = LAYOUT_pretty( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, _______, _______, KC_UP, _______, _______, _______, _______, KC_UP, CTL_Y, _______, _______, + _______, CTL_A, KC_LEFT, KC_DOWN, KC_RGHT, CA_TAB, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, + _______, CTL_Z, CTL_X, CTL_C, CTL_V, KC_BSPC, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_END, _______, + _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ +), + +[_FUNCTION2] = LAYOUT_pretty( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, _______, _______, KC_UP, _______, _______, _______, _______, KC_UP, CTL_Y, _______, _______, + _______, CTL_A, KC_LEFT, KC_DOWN, KC_RGHT, CA_TAB, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, + _______, CTL_Z, CTL_X, CTL_C, CTL_V, KC_BSPC, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_END, _______, + _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ +), + +/* +Numpad layer +(Left side duplicates layout from the Numbers layer, just with numpad output; right side layout close to PC numpad layout) +,--------------------------------------------------------------. ,--------------------------------------------------------------. +| | | | | | | | | | | | | | | | | | | | +`--------------------------------------------------------------' `--------------------------------------------------------------' +,------------------------------------------------------. ,------------------------------------------------------. +| | NumLock| | | | | | Tab | NumLock| KP / | KP * | KP - | | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| | KP 6 | KP 7 | KP 8 | KP 9 | KP 0 | | | KP 7 | KP 8 | KP 9 | KP + | | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| | KP 1 | KP 2 | KP 3 | KP 4 | KP 5 | | | KP 4 | KP 5 | KP 6 | = | | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| | | KP . | KP/KP* | KP- _ | KP+ = | | | KP 1 | KP 2 | KP 3 | KP Ent | | +`---------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+---------' + | ( | ) | [ { | ] } | | | KP 0 | KP . | KP Ent | + `-----------------------------------' `-----------------------------------' + ,-----------------. ,-----------------. + | | | | | | + ,--------+--------+--------| |--------+--------+--------. + | | | | | | | | + | | |--------| |--------| | | + | | | | | | | | + `--------------------------' `--------------------------' +*/ +[_NUMPAD] = LAYOUT_pretty( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_NLCK, _______, _______, _______, _______, KC_TAB, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, _______, + _______, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, _______, KC_P7, KC_P8, KC_P9, KC_PPLS, _______, + _______, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, _______, KC_P4, KC_P5, KC_P6, KC_EQL, _______, + _______, _______, KC_PDOT, TD_PSPA, TD_MNUN, TD_PPEQ, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, + KC_LPRN, KC_RPRN, TD_LBCB, TD_RBCB, _______, KC_P0, KC_PDOT, KC_PENT, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ +), + +/* +Gaming +(Toggle gaming layer with limited dual-role keys and layer access; NKRO turned on by default; Ent/NS + Delete/Numbers2 to access Adjust layer) +,--------------------------------------------------------------. ,--------------------------------------------------------------. +| | | | | | | | | | | | | | | | | | | | +`--------------------------------------------------------------' `--------------------------------------------------------------' +,------------------------------------------------------. ,------------------------------------------------------. +| | | | | | | | | | | | | | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| | | | | | | | | | | | | | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| LCtrl | | | | | | | | | | | | | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| Shift | | | | | | | | | | | | Shift | +`---------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+---------' + | | | | | | | | | | + `-----------------------------------' `-----------------------------------' + ,-----------------. ,-----------------. + | ESC |xxxxxxxx| | RAlt | RCtl | + ,--------+--------+--------| |--------+--------+--------. + | | | LAlt | | RGUI | Delete | Bspc | + | Space | Enter |--------| |--------| / | / | + | | | Bspc | |Enter/NS| Number2| Fn2 | + `--------------------------' `--------------------------' +*/ +[_GAMING] = LAYOUT_pretty( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LCTL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, + _______, _______, _______, _______, _______, _______, _______, _______, + KC_ESC, XXXXXXX, _______, _______, + KC_LALT, _______, + KC_SPC, KC_ENT, _______, ENTNS, _______, _______ +), + +/* +Adjust layer +(Press and hold Adjust key on the function row or Enter/Number + Delete/Number2 to access; Numpad and NKRO are on toggle) +,--------------------------------------------------------------. ,--------------------------------------------------------------. +| | | | | | | | | | | | | | | | | | | | +`--------------------------------------------------------------' `--------------------------------------------------------------' +,------------------------------------------------------. ,------------------------------------------------------. +| | Colemak| QWERTY | | Gaming | | | Numpad | | | | | RESET | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| | | | | | | | | | | | | | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| | | | | | | | | NKRO | | | | | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| | | | | | | | | | | | | | +`---------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+---------' + | | | | | | | | | | + `-----------------------------------' `-----------------------------------' + ,-----------------. ,-----------------. + | | | | | | + ,--------+--------+--------| |--------+--------+--------. + | | | | | | | | + | | |--------| |--------| | | + | | | | | | | | + `--------------------------' `--------------------------' +*/ +[_ADJUST] = LAYOUT_pretty( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, COLEMAK, QWERTY, _______, GAMING, _______, NUMPAD, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NKROTG, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ +), + +[_ADJUST2] = LAYOUT_pretty( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, COLEMAK, QWERTY, _______, GAMING, _______, NUMPAD, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NKROTG, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ +) + +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _NUMBERS, _NUMBERS2, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case COLEMAK: + if (record->event.pressed) { +// persistent_default_layer_set(1UL << _COLEMAK); + default_layer_set(1UL << _COLEMAK); + layer_move (_COLEMAK); + keymap_config.nkro = 0; + } + return false; + break; + case QWERTY: + if (record->event.pressed) { +// persistent_default_layer_set(1UL << _QWERTY); + default_layer_set(1UL << _QWERTY); + layer_move (_QWERTY); + keymap_config.nkro = 0; + } + return false; + break; + case GAMING: + if (record->event.pressed) { + layer_invert (_GAMING); + layer_off (_NUMPAD); + keymap_config.nkro = 1; + } + return false; + break; + } + return true; +} diff --git a/keyboards/kinesis/keymaps/tuesdayjohn/readme.md b/keyboards/kinesis/keymaps/tuesdayjohn/readme.md new file mode 100644 index 000000000..88af87e88 --- /dev/null +++ b/keyboards/kinesis/keymaps/tuesdayjohn/readme.md @@ -0,0 +1,219 @@ +# TuesdayJohn's Kinesis Keymap + +These layouts are derived from what I was using on my Kinesis Contoured keyboards with Hasu's USB-USB TMK converters. With the move to QMK via Stapelberg replacement controller, I've cleaned up the layouts a bit while adding more functions and layers. + +There are minor changes in the base keywell layout of non-alpha keys (e.g., CapsLock is ESC/Ctl, arrow clusters on one side), while the thumb clusters deviate more from the default layout. + +Changes to the thumb clusters include: +* The navigations keys moved to function layers. +* The function of 2u keys have been reversed - I've always used space with my left thumb, and I find it more helpful to have quick and easy access to Space and Enter while using my mouse/trackball. +* Backspace have been duplicated on both clusters. As with Space and Backspace, I find it helpful to have quick and easy access to Backspace while using my mouse/trackball. +* The 2u keys serve dual function as momentary layer switchers. + +I've largely left the function keys untouched, with the intension of not using them often. They are neither easy to use nor reach due to their locations and size, and Kinesis used not-so-great rubber dome switches for them (Advantage model and earlier). Kinesis have since replaced the keys with Cherry ML switches on Advantage2, but did not resolve the issues of size or location. Additionally, leaving the function keys unused here makes it easier for me to adapt the keymaps to my other keyboards, most of which do not have physical function keys. + +I use Colemak as my default layout. I've included QWERTY here as well. + +Additionally, there is a gaming layer on toggle. This layer is turned top of either Colemak or QWERTY and have limited access to the Function or Numbers/Symbols layers. Additionally, NKRO is turned on when the layer is turned on. + +Persistent default layer has been enabled for Colemak and QWERTY. The gaming/vanilla Colemak and QWERTY can be set as default layer, but will not be persistent. + +## Future plans + +* Add status LEDs to the Stapelberg PCB (usually used for Caps Lock, Num Lock, and Scroll Lock) to use as layer indicators. +* Add a speaker now that QMK supports additional pins for audio use. +* Utilize the leftover spots on the key matrix, as well as unused pins on Teensy++ 2.0 to run macropad and/or foot pedals. + + +## Layers + +### Function Keys on all layers +- 'Numpd' toggles the Numpad layer +- 'Adjst' is a momentary layer key to access the Adjust layer + +``` +,-----------------------------------------------------. ,----------------------------------------------------. +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst| +`-----------------------------------------------------' `----------------------------------------------------' +``` + +### Colemak +- Default layer +- Keys separated by "/" tap for first, hold for second +- Uses [Space Cadet Shifts](https://beta.docs.qmk.fm/features/feature_space_cadet) + +``` +,------------------------------------------------. ,------------------------------------------------. +| = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +|ESC/Ctrl| A | R | S | T | D | | H | N | E | I | O | ' | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +|SC Shift| Z | X | C | V | B | | K | M | , | . | / |SC Shift| +`--------+-------+-------+-------+-------+-------' `-------+-------+-------+-------+-------+--------' + | Ins | ` | [ | ] | | Left | Down | Up | Right | + `-------------------------------' `-------------------------------' + ,---------------. ,---------------. + |ESC/Ctl| Hyper | | RAlt | RCtl | + ,-------+-------+-------| |-------+-------+-------. + | Space | Enter |App/Alt| | RGUI | Delete| Bspc | + | / | / |-------| |-------| / | / | + | Fn | Number| Bspc | | Enter |Number2| Fn2 | + `-----------------------' `-----------------------' +``` + +### QWERTY +- Keys separated by "/" tap for first, hold for second +- Uses [Space Cadet Shifts](https://beta.docs.qmk.fm/features/feature_space_cadet) + +``` +,------------------------------------------------. ,------------------------------------------------. +| = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +|ESC/Ctrl| A | S | D | F | G | | H | J | K | L | ; | ' | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +|SC Shift| Z | X | C | V | B | | N | M | , | . | / |SC Shift| +`--------+-------+-------+-------+-------+-------' `-------+-------+-------+-------+-------+--------' + | Ins | ` | [ | ] | | Left | Down | Up | Right | + `-------------------------------' `-------------------------------' + ,---------------. ,---------------. + |ESC/Ctl| Hyper | | RAlt | RCtl | + ,-------+-------+-------| |-------+-------+-------. + | Space | Enter |App/Alt| | RGUI | Delete| Bspc | + | / | / |-------| |-------| / | / | + | Fn | Number| Bspc | | Enter |Number2| Fn2 | + `-----------------------' `-----------------------' +``` + +### Numbers & Symbols layer +- Momentary layer +- Multiple characters: Single-tap for first, double-tap for second + +``` +,------------------------------------------------. ,------------------------------------------------. +| F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| | 6 | 7 | 8 | 9 | 0 | | ^ | & | * | ( | ) | | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| | 1 | 2 | 3 | 4 | 5 | | ! | @ | # | $ | % | | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| | | . | / * | - _ | + = | | ` ~ | [ { | ] } | | | | +`--------+-------+-------+-------+-------+-------' `-------+-------+-------+-------+-------+--------' + | ( | ) | [ { | ] } | | | | | | + `-------------------------------' `-------------------------------' + ,---------------. ,---------------. + | | | | | | + ,-------+-------+-------| |-------+-------+-------. + | | | | | | | | + | | |-------| |-------| | | + | | | | | | | | + `-----------------------' `-----------------------' +``` + +### Function layer +- Momentary layer + +``` +,------------------------------------------------. ,------------------------------------------------. +| F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| | | | Up | | | | | | Up | Ctrl+Y| | | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| | Ctrl+A| Left | Down | Right | C+A+Tb| | PgUp | Left | Down | Right | Home | | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| | Ctrl+Z| Ctrl+X| Ctrl+C| Ctrl+V| Bspc | | PgDn | Mute | Vol- | Vol+ | End | | +`--------+-------+-------+-------+-------+-------' `-------+-------+-------+-------+-------+--------' + | | | | | | Prev | Play | Next | Stop | + `-------------------------------' `-------------------------------' + ,---------------. ,---------------. + | | | | | | + ,-------+-------+-------| |-------+-------+-------. + | | | | | | | | + | | |-------| |-------| | | + | | | | | | | | + `-----------------------' `-----------------------' +``` + +### Numpad layer +- Toggle layer +- Left side duplicates layout from the Numbers layer, just with numpad output +- Right side layout close to PC numpad layout +- Multiple characters: Single-tap for first, double-tap for second + +``` +,------------------------------------------------. ,------------------------------------------------. +| | NumLk | | | | | | Tab | NumLk | KP / | KP * | KP - | | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| | KP 6 | KP 7 | KP 8 | KP 9 | KP 0 | | | KP 7 | KP 8 | KP 9 | KP + | | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| | KP 1 | KP 2 | KP 3 | KP 4 | KP 5 | | | KP 4 | KP 5 | KP 6 | = | | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| | | KP . | KP/KP*| KP- _ | KP+ = | | | KP 1 | KP 2 | KP 3 | KP Ent| | +`--------+-------+-------+-------+-------+-------' `-------+-------+-------+-------+-------+--------' + | ( | ) | [ { | ] } | | KP 0 | , | KP . | KP Ent| + `-------------------------------' `-------------------------------' + ,---------------. ,---------------. + | | | | | | + ,-------+-------+-------| |-------+-------+-------. + | | | | | | | | + | | |-------| |-------| | | + | | | | | | | | + `-----------------------' `-----------------------' +``` + +### Gaming +- Toggle layer with limited access to Function or Numbers layers +- Mainly used for gaming +- NKRO turned on by default +- Press and hold Ent/NS + Delete/Numbers2 to access Adjust layer + +``` +,------------------------------------------------. ,------------------------------------------------. +| | | | | | | | | | | | | | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| | | | | | | | | | | | | | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| LCtrl | | | | | | | | | | | | | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| Shift | | | | | | | | | | | | Shift | +`--------+-------+-------+-------+-------+-------' `-------+-------+-------+-------+-------+--------' + | | | | | | | | | | + `-------------------------------' `-------------------------------' + ,---------------. ,---------------. + | ESC |xxxxxxx| | RAlt | RCtl | + ,-------+-------+-------| |-------+-------+-------. + | | | LAlt | | RGUI | Delete| Bspc | + | Space | Enter |-------| |-------| / | / | + | | | Bspc | | Ent/NS|Number2| Fn2 | + `-----------------------' `-----------------------' +``` + +### Adjust layer +- Momentary layer +- Press and hold Adjust key on the function row or Enter/Number + Delete/Number2 to access +- Gaming, Numpad, and NKRO are on toggle + +``` +,------------------------------------------------. ,------------------------------------------------. +| |Colemak| QWERTY| | Gaming| | | Numpad| | | | | RESET | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| | | | | | | | | | | | | | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| | | | | | | | | NKRO | | | | | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| | | | | | | | | | | | | | +`--------+-------+-------+-------+-------+-------' `-------+-------+-------+-------+-------+--------' + | | | | | | | | | | + `-------------------------------' `-------------------------------' + ,---------------. ,---------------. + | | | | | | + ,-------+-------+-------| |-------+-------+-------. + | | | | | | | | + | | |-------| |-------| | | + | | | | | | | | + `-----------------------' `-----------------------' + ``` + diff --git a/keyboards/kinesis/keymaps/tuesdayjohn/rules.mk b/keyboards/kinesis/keymaps/tuesdayjohn/rules.mk new file mode 100644 index 000000000..cf63c44f4 --- /dev/null +++ b/keyboards/kinesis/keymaps/tuesdayjohn/rules.mk @@ -0,0 +1,19 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# + +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 # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = yes # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +TAP_DANCE_ENABLE = yes # Enable Tap Dancing function From 03e53dc8a2958c44b03b3863c27ce29b94f81f08 Mon Sep 17 00:00:00 2001 From: Jarrett Drouillard Date: Thu, 23 May 2019 00:40:16 -0400 Subject: [PATCH 107/341] [Keymap] changes to my userspace and preonic keymap ( spring 2019 ) (#5881) * feat-user-kuatsure: abstract symbol row out * feat-user-kuatsure: abstract grouped bracket, brace, paren out * fix-preonic-kuatsure: remove eol as requested by @drashna * feat-user-kuatsure: add KC_MAKE and KC_FLSH thanks to @drashna for the help * chore-preonic-kuatsure: remove auto shift * chore-user-kuatsure: move leader seq's to macro syntax * feat-user-kuatsure: add `KC_VRSN` key plus use it preonic keymap * chore-user-kuatsure: namespace keyboard macros `KB` * chore-preonic-kuatsure: move some keyboardy keys around * chore-preonic-kuatsure: remove parens, brackets, braces from lower * chore-user-kuatsure: move tmux window shifts to dbl press leaders * feat-user-kuatsure: add a computer lock leader seq * fix-preonic-kuatsure: go back to lower brackets * chore-preonic-kuatsure: clear out raise * feat-various-kuatsure: add meh + tab mod tap * chore-preonic-kuatsure: `raise` eats `game_mod` layer * fix-preonic-kuatsure: reverse pg up and pg down * chore-user-kuatsure: add double tap to turn off music * chore-user-kuatsure: move like seqs together * chore-preonic-kuatsure: add a few more items to the num pad on raise * feat-user-kuatsure: re-enable td for <> keys * chore-user-kuatsure: give a little more grace period for leader * fix-user-kuatsure: give lock leader a gui buffer no timer or anything, but alfred doesn't boot up as quickly as I would like sometimes gui doesn't do anything but gives a little bit of a time bump * fix-user-kuatsure: changes from @drashna review --- keyboards/preonic/keymaps/kuatsure/config.h | 3 - keyboards/preonic/keymaps/kuatsure/keymap.c | 106 +++++--------- keyboards/preonic/keymaps/kuatsure/rules.mk | 1 - users/kuatsure/kuatsure.c | 148 ++++++++++++-------- users/kuatsure/kuatsure.h | 32 ++++- users/kuatsure/rules.mk | 1 + 6 files changed, 155 insertions(+), 136 deletions(-) diff --git a/keyboards/preonic/keymaps/kuatsure/config.h b/keyboards/preonic/keymaps/kuatsure/config.h index bae774211..ba0ed525e 100644 --- a/keyboards/preonic/keymaps/kuatsure/config.h +++ b/keyboards/preonic/keymaps/kuatsure/config.h @@ -3,9 +3,6 @@ #include "config_common.h" -#define NO_AUTO_SHIFT_SPECIAL -#define NO_AUTO_SHIFT_ALPHA - #ifdef AUDIO_ENABLE #define STARTUP_SONG SONG(PREONIC_SOUND) // #define STARTUP_SONG SONG(NO_SOUND) diff --git a/keyboards/preonic/keymaps/kuatsure/keymap.c b/keyboards/preonic/keymaps/kuatsure/keymap.c index 5a7fa40e5..907360d0c 100644 --- a/keyboards/preonic/keymaps/kuatsure/keymap.c +++ b/keyboards/preonic/keymaps/kuatsure/keymap.c @@ -20,20 +20,16 @@ enum preonic_layers { _QWERTY, _GAME, - _GAME_MOD, _LOWER, _RAISE, _ADJUST, }; enum preonic_keycodes { - QWERTY = SAFE_RANGE, + QWERTY = USER_SAFE_RANGE, GAME, - GAME_MOD, LOWER, RAISE, - - END_OF_LINE, }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -42,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | Y | U | I | O | P | \ | + * | Tab/M| Q | W | E | R | T | Y | U | I | O | P | \ | * |------+------+------+------+------+-------------+------+------+------+------+------| * | Esc/C| A | S | D | F | G | H | J | K | L | ; | ' | * |------+------+------+------+------+------|------+------+------+------+------+------| @@ -53,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_QWERTY] = LAYOUT_preonic_grid_wrapper( \ KC_GRV, _________________NUMBER_L1_________________, _________________NUMBER_R1_________________, KC_BSPC, \ - KC_TAB, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSLS, \ + KT_MTAB, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSLS, \ KT_CESC, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT, \ KC_LSFT, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, KC_ENT, \ KC_LEAD, GAME, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ @@ -61,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Game * - * Mostly transparent, but wanted to disable gui key, and give different raise / lower layers ( game_mod ). + * Mostly transparent, but wanted to disable gui key. * Also give a key to get back to qwerty layout. * * ,-----------------------------------------------------------------------------------. @@ -73,104 +69,83 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | |Qwerty| | Spc |Game+ | |Game+ | | | | | + * | |Qwerty| | Spc | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_GAME] = LAYOUT_preonic_grid_wrapper( \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, QWERTY, _______, KC_SPC, GAME_MOD, _______, _______, GAME_MOD, _______, _______, _______, _______ \ -), - -/* Game Modifiers - * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | F9 | F10 | F11 | F12 | ` | | 7 | 8 | 9 | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | F5 | F6 | F7 | F8 | ~ | | 4 | 5 | 6 | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * |Shift | F1 | F2 | F3 | F4 | | | 1 | 2 | 3 | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | 0 | 0 | | | - * `-----------------------------------------------------------------------------------' - */ -[_GAME_MOD] = LAYOUT_preonic_grid_wrapper( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, ____________FUNCTION_3____________, KC_GRV, _______, KC_7, KC_8, KC_9, _______, _______, \ - _______, ____________FUNCTION_2____________, KC_TILD, _______, KC_4, KC_5, KC_6, _______, _______, \ - KC_LSFT, ____________FUNCTION_1____________, _______, _______, KC_1, KC_2, KC_3, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_0, _______, _______ \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, QWERTY, _______, KC_SPC, _______, _______, _______, _______, _______, _______, _______, _______ \ ), /* Lower * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * | E`~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | Up | | ` | | { | } | _ | | | | + * | | | | Up | | ` | < | { | } | _ | | | | * |------+------+------+------+------+-------------+------+------+------+------+------| * | | Del | Left | Down | Right| ~ | = | ( | ) | + | : | " | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | Vol- | Prev | Play | Next | Vol+ | - | [ | ] | | ? | | + * | | Vol- | Prev | Play | Next | Vol+ | - | [ | ] | > | ? | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Mute | | | | | | Home | PgUp | PgDwn| End | + * | | Mute | | | | | | Home | PgDn | PgUp | End | * `-----------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT_preonic_grid_wrapper( \ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ - _______, _______, _______, KC_UP, _______, KC_GRV, _______, KC_LCBR, KC_RCBR, KC_UNDS, _______, KC_PIPE, \ - _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TILD, KC_EQL, KC_LPRN, KC_RPRN, KC_PLUS, KC_COLN, KC_DQT , \ - _______, KC_VOLD, KC_MRWD, KC_MPLY, KC_MFFD, KC_VOLU, KC_MINS, KC_LBRC, KC_RBRC, _______, KC_QUES, _______, \ - _______, KC_MUTE, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END \ + KC_GESC, _________________SYMBOL_L1_________________, _________________SYMBOL_R1_________________, _______, \ + _______, _______, _______, KC_UP, _______, KC_GRV, _______, ____CRBRACES____, KC_UNDS, _______, KC_PIPE, \ + _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TILD, KC_EQL, _____PARENS_____, KC_PLUS, KC_COLN, KC_DQT , \ + _______, KC_VOLD, KC_MRWD, KC_MPLY, KC_MFFD, KC_VOLU, KC_MINS, ___SQBRACKETS___, _______, KC_QUES, _______, \ + _______, KC_MUTE, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ ), /* Raise * ,-----------------------------------------------------------------------------------. - * | E`~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F9 | F10 | F11 | F12 | | * | 7 | 8 | 9 | 0 | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | F9 | F10 | F11 | F12 | | | { | } | | | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | F5 | F6 | F7 | F8 | | | ( | ) | < | > | | + * | | F5 | F6 | F7 | F8 | | = | 4 | 5 | 6 | + | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F1 | F2 | F3 | F4 | | | [ | ] | | | | + * | | F1 | F2 | F3 | F4 | | - | 1 | 2 | 3 | / | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | Enter | | Home | PgUp | PgDwn| End | + * | | | | | | | | 0 | 0 | | | * `-----------------------------------------------------------------------------------' */ [_RAISE] = LAYOUT_preonic_grid_wrapper( \ - KC_GESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ - _______, ____________FUNCTION_3____________, _______, _______, KC_LCBR, KC_RCBR, _______, _______, KC_BSPC, \ - _______, ____________FUNCTION_2____________, _______, _______, KC_LPRN, KC_RPRN, KC_LT, KC_GT, _______, \ - _______, ____________FUNCTION_1____________, _______, _______, KC_LBRC, KC_RBRC, _______, _______, _______, \ - _______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, ____________FUNCTION_3____________, _______, KC_ASTR, KC_7, KC_8, KC_9, KC_0, _______, \ + _______, ____________FUNCTION_2____________, _______, KC_EQL, KC_4, KC_5, KC_6, KC_PLUS, _______, \ + _______, ____________FUNCTION_1____________, _______, KC_MINS, KC_1, KC_2, KC_3, KC_SLASH, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_0, _______, _______ \ ), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Reset| Debug| | | | | | | | | Del | + * | | MAKE | FLSH | | | | | | | | | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | |Aud on|AudOff| | | | | | + * | | RESET| DEBUG| | |Aud on|AudOff| | | | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | |MusMod|Mus on|MusOff| | | | | | + * | | VRSN | | |MusMod|Mus on|MusOff| | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | |Qwerty| Game | | | * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_preonic_grid_wrapper( \ ____________FUNCTION_1____________, ____________FUNCTION_2____________, ____________FUNCTION_3____________, \ - _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, _______, _______, _______, _______, AU_ON, AU_OFF, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, MU_MOD, MU_ON, MU_OFF, _______, _______, _______, _______, _______, \ + _______, KB_MAKE, KB_FLSH, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, RESET, DEBUG, _______, _______, AU_ON, AU_OFF, _______, _______, _______, _______, _______, \ + _______, KB_VRSN, _______, _______, MU_MOD, MU_ON, MU_OFF, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, QWERTY, GAME, _______, _______ \ ), }; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: if (record->event.pressed) { @@ -186,15 +161,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; break; - case GAME_MOD: - if (record->event.pressed) { - layer_on(_GAME_MOD); - } else { - layer_off(_GAME_MOD); - } - return false; - break; - case LOWER: if (record->event.pressed) { layer_on(_LOWER); diff --git a/keyboards/preonic/keymaps/kuatsure/rules.mk b/keyboards/preonic/keymaps/kuatsure/rules.mk index 4aacc7051..9369f99a9 100644 --- a/keyboards/preonic/keymaps/kuatsure/rules.mk +++ b/keyboards/preonic/keymaps/kuatsure/rules.mk @@ -1,3 +1,2 @@ BACKLIGHT_ENABLE = no LEADER_ENABLE = yes -AUTO_SHIFT_ENABLE = yes diff --git a/users/kuatsure/kuatsure.c b/users/kuatsure/kuatsure.c index a18713626..f935e83c7 100644 --- a/users/kuatsure/kuatsure.c +++ b/users/kuatsure/kuatsure.c @@ -1,35 +1,62 @@ #include "kuatsure.h" +#include "version.h" + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LT), + [TD_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_GT) +}; + +__attribute__ ((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KB_MAKE: + if (!record->event.pressed) { + SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP SS_TAP(X_ENTER)); + } + return false; + break; + + case KB_VRSN: + if (!record->event.pressed) { + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + + case KB_FLSH: + if (!record->event.pressed) { + SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP + #if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) + ":dfu " + #elif defined(BOOTLOADER_HALFKAY) + ":teensy " + #elif defined(BOOTLOADER_CATERINA) + ":avrdude " + #endif + SS_TAP(X_ENTER) + ); + + reset_keyboard(); + } + return false; + break; + } + + return process_record_keymap(keycode, record); +} void tmux_prefix(void) { - register_code(KC_LCTL); - register_code(KC_SPC); - - unregister_code(KC_LCTL); - unregister_code(KC_SPC); + tap_code16(LCTL(KC_SPC)); } void tmux_pane_zoom(void) { tmux_prefix(); - register_code(KC_Z); - unregister_code(KC_Z); -} - -void tmux_pane_switch(uint16_t keycode) { - tmux_prefix(); - - register_code(KC_Q); - unregister_code(KC_Q); - - register_code(keycode); - unregister_code(keycode); -} - -void tmux_window_switch(uint16_t keycode) { - tmux_prefix(); - - register_code(keycode); - unregister_code(keycode); + SEND_STRING("z"); } LEADER_EXTERNS(); @@ -43,69 +70,70 @@ void matrix_scan_user(void) { // anything you can do in a macro https://docs.qmk.fm/macros.html // https://docs.qmk.fm/feature_leader_key.html + // Stop music and lock computer via alfred + SEQ_ONE_KEY(KC_H) { + SEND_STRING(SS_LGUI(" ") SS_TAP(X_LGUI) "afk" SS_TAP(X_ENTER)); + } + + // Stop music and lock computer via alfred + SEQ_TWO_KEYS(KC_H, KC_H) { + SEND_STRING(SS_LGUI(" ") SS_TAP(X_LGUI) "afk" SS_TAP(X_ENTER) SS_TAP(X_MEDIA_PLAY_PAUSE)); + } + // Whole Screen Shot SEQ_ONE_KEY(KC_A) { - register_code(KC_LGUI); - register_code(KC_LSFT); - register_code(KC_3); - - unregister_code(KC_3); - unregister_code(KC_LSFT); - unregister_code(KC_LGUI); + SEND_STRING(SS_LGUI(SS_LSFT("3"))); } // Selective Screen Shot SEQ_ONE_KEY(KC_S) { - register_code(KC_LGUI); - register_code(KC_LSFT); - register_code(KC_4); - - unregister_code(KC_4); - unregister_code(KC_LSFT); - unregister_code(KC_LGUI); + SEND_STRING(SS_LGUI(SS_LSFT("4"))); } // TMUX - shift to pane 1 and zoom SEQ_ONE_KEY(KC_J) { - tmux_pane_switch(KC_1); + tmux_prefix(); + SEND_STRING("q1"); tmux_pane_zoom(); } + // TMUX - shift to first window + SEQ_TWO_KEYS(KC_J, KC_J) { + tmux_prefix(); + SEND_STRING("1"); + } + // TMUX - shift to pane 2 and zoom SEQ_ONE_KEY(KC_K) { - tmux_pane_switch(KC_2); + tmux_prefix(); + SEND_STRING("q2"); tmux_pane_zoom(); } + // TMUX - shift to second window + SEQ_TWO_KEYS(KC_K, KC_K) { + tmux_prefix(); + SEND_STRING("2"); + } + // TMUX - shift to pane 3 and zoom SEQ_ONE_KEY(KC_L) { - tmux_pane_switch(KC_3); + tmux_prefix(); + SEND_STRING("q3"); tmux_pane_zoom(); } + // TMUX - shift to third window + SEQ_TWO_KEYS(KC_L, KC_L) { + tmux_prefix(); + SEND_STRING("3"); + } + // TMUX - shift to last pane and zoom SEQ_ONE_KEY(KC_SCOLON) { tmux_prefix(); - - register_code(KC_SCOLON); - unregister_code(KC_SCOLON); - + SEND_STRING(";"); tmux_pane_zoom(); } - - // TMUX - shift to first window - SEQ_ONE_KEY(KC_U) { - tmux_window_switch(KC_1); - } - - // TMUX - shift to second window - SEQ_ONE_KEY(KC_I) { - tmux_window_switch(KC_2); - } - - // TMUX - shift to third window - SEQ_ONE_KEY(KC_O) { - tmux_window_switch(KC_3); - } } } diff --git a/users/kuatsure/kuatsure.h b/users/kuatsure/kuatsure.h index 23d3c617c..8961d5621 100644 --- a/users/kuatsure/kuatsure.h +++ b/users/kuatsure/kuatsure.h @@ -3,12 +3,32 @@ #include "quantum.h" +enum kuatsure_keycodes { + KB_MAKE = SAFE_RANGE, + KB_FLSH, + KB_VRSN, + + USER_SAFE_RANGE, +}; + +enum { + TD_LBRC = 0, + TD_RBRC, +}; + +#define KT_LBRC TD(TD_LBRC) +#define KT_RBRC TD(TD_RBRC) + +#define TAPPING_TERM 200 + +#define LEADER_TIMEOUT 250 +#define LEADER_PER_KEY_TIMING + void tmux_prefix(void); void tmux_pane_zoom(void); -void tmux_pane_switch(uint16_t keycode); -void tmux_window_switch(uint16_t keycode); #define KT_CESC CTL_T(KC_ESC) +#define KT_MTAB MEH_T(KC_TAB) #undef LEADER_TIMEOUT #define LEADER_TIMEOUT 300 @@ -18,6 +38,9 @@ void tmux_window_switch(uint16_t keycode); #define _________________NUMBER_L1_________________ KC_1, KC_2, KC_3, KC_4, KC_5 #define _________________NUMBER_R1_________________ KC_6, KC_7, KC_8, KC_9, KC_0 +#define _________________SYMBOL_L1_________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC +#define _________________SYMBOL_R1_________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN + #define _________________QWERTY_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T #define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G #define _________________QWERTY_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B @@ -30,4 +53,9 @@ void tmux_window_switch(uint16_t keycode); #define ____________FUNCTION_2____________ KC_F5, KC_F6, KC_F7, KC_F8 #define ____________FUNCTION_3____________ KC_F9, KC_F10, KC_F11, KC_F12 +#define ___SQBRACKETS___ KT_LBRC, KT_RBRC +#define _____PARENS_____ KC_LPRN, KC_RPRN +#define ____CRBRACES____ KC_LCBR, KC_RCBR +#define ___ANBRACKETS___ KC_LT, KC_GT + #endif diff --git a/users/kuatsure/rules.mk b/users/kuatsure/rules.mk index f0d295aad..ed7e92905 100644 --- a/users/kuatsure/rules.mk +++ b/users/kuatsure/rules.mk @@ -1,3 +1,4 @@ CONSOLE_ENABLE = no +TAP_DANCE_ENABLE = yes SRC += kuatsure.c From 36f427f40cc64fa2dcd6da4eae20d467e88c0bd9 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Thu, 23 May 2019 10:29:18 -0700 Subject: [PATCH 108/341] Fix typo --- docs/features.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/features.md b/docs/features.md index ac9aad394..f9ef51eae 100644 --- a/docs/features.md +++ b/docs/features.md @@ -24,7 +24,7 @@ QMK has a staggering number of features for building your keyboard. It can take * [Macros](feature_macros.md) - Send multiple key presses when pressing only one physical key. * [Mouse keys](feature_mouse_keys.md) - Control your mouse pointer from your keyboard. * [OLED Driver](feature_oled_driver.md) - Add OLED screens to your keyboard. -* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) - Sticky Keys, lets hit a key rather than holding it. +* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) - Sticky Keys, lets you hit a key rather than holding it. * [Pointing Device](feature_pointing_device.md) - Framework for connecting your custom pointing device to your keyboard. * [PS2 Mouse](feature_ps2_mouse.md) - Driver for connecting a PS/2 mouse directly to your keyboard. * [RGB Light](feature_rgblight.md) - RGB lighting for your keyboard. From 701a1d94358a72d477326fb475c918823492b22d Mon Sep 17 00:00:00 2001 From: "Tobias V. Langhoff" Date: Fri, 24 May 2019 02:12:17 +0200 Subject: [PATCH 109/341] Fix layout comment (#5967) Swap the "Cmd" and "Alt" keys in the comment to reflect the actual layout. Also change "Cmd" to "Win" for consistency with the default keymap. --- keyboards/tada68/keymaps/iso-nor/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/tada68/keymaps/iso-nor/keymap.c b/keyboards/tada68/keymaps/iso-nor/keymap.c index d8813acff..ae0fccccc 100644 --- a/keyboards/tada68/keymaps/iso-nor/keymap.c +++ b/keyboards/tada68/keymaps/iso-nor/keymap.c @@ -14,7 +14,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |----------------------------------------------------------------| * |Shif| <>| Z| X| C| V| B| N| M| ,| .| -| Shift| Up|PgDn| * |----------------------------------------------------------------| - * |Ctrl|Alt |Cmd | Space |Alt| FN|Ctrl|Lef|Dow|Rig | + * |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig | * `----------------------------------------------------------------' */ [_BL] = LAYOUT_iso( From f7caca51f60d8b02a7cdcc16acfaa3d794f70bed Mon Sep 17 00:00:00 2001 From: Erovia Date: Fri, 24 May 2019 02:26:15 +0200 Subject: [PATCH 110/341] Add support for Dimple (#5963) Add support for Dimple, a 40% custom keyboard designed and produced by LazyDesigners. --- keyboards/lazydesigners/dimple/config.h | 66 +++++++++ keyboards/lazydesigners/dimple/dimple.c | 24 ++++ keyboards/lazydesigners/dimple/dimple.h | 46 ++++++ keyboards/lazydesigners/dimple/info.json | 56 ++++++++ .../dimple/keymaps/default/keymap.c | 136 ++++++++++++++++++ .../dimple/keymaps/default/readme.md | 60 ++++++++ keyboards/lazydesigners/dimple/readme.md | 17 +++ keyboards/lazydesigners/dimple/rules.mk | 58 ++++++++ 8 files changed, 463 insertions(+) create mode 100644 keyboards/lazydesigners/dimple/config.h create mode 100644 keyboards/lazydesigners/dimple/dimple.c create mode 100644 keyboards/lazydesigners/dimple/dimple.h create mode 100644 keyboards/lazydesigners/dimple/info.json create mode 100644 keyboards/lazydesigners/dimple/keymaps/default/keymap.c create mode 100644 keyboards/lazydesigners/dimple/keymaps/default/readme.md create mode 100644 keyboards/lazydesigners/dimple/readme.md create mode 100644 keyboards/lazydesigners/dimple/rules.mk diff --git a/keyboards/lazydesigners/dimple/config.h b/keyboards/lazydesigners/dimple/config.h new file mode 100644 index 000000000..0f7a8798e --- /dev/null +++ b/keyboards/lazydesigners/dimple/config.h @@ -0,0 +1,66 @@ +/* +Copyright 2019 Erovia + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0040 +#define DEVICE_VER 0x0001 +#define MANUFACTURER LazyDesigners +#define PRODUCT Dimple +#define DESCRIPTION A 40% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D0, D1, D2, D3 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, D4, D6, D7, B4, B5, B6, C6, C7 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* RBG underglow */ +#define RGB_DI_PIN B7 +#ifdef RGB_DI_PIN + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_SLEEP + #define RGBLED_NUM 50 + /* #define RGBLIGHT_HUE_STEP 8 */ + /* #define RGBLIGHT_SAT_STEP 8 */ + /* #define RGBLIGHT_VAL_STEP 8 */ +#endif + +/* CapsLock LED */ +#define BACKLIGHT_PIN E6 +#ifdef BACKLIGHT_PIN + #define BACKLIGHT_LEVELS 6 +#endif diff --git a/keyboards/lazydesigners/dimple/dimple.c b/keyboards/lazydesigners/dimple/dimple.c new file mode 100644 index 000000000..5f9571651 --- /dev/null +++ b/keyboards/lazydesigners/dimple/dimple.c @@ -0,0 +1,24 @@ +/* Copyright 2019 Erovia + * + * 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 . + */ +#include "dimple.h" + +void dimple_led_on() { + DDRE |= (1 << 6); PORTE &= ~(1 << 6); +} + +void dimple_led_off() { + DDRE &= ~(1 << 6); PORTE &= ~(1 << 6); +} diff --git a/keyboards/lazydesigners/dimple/dimple.h b/keyboards/lazydesigners/dimple/dimple.h new file mode 100644 index 000000000..ba8a413ed --- /dev/null +++ b/keyboards/lazydesigners/dimple/dimple.h @@ -0,0 +1,46 @@ +/* Copyright 2019 Erovia + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* + * ,---------------------------------------------------------------. + * | | | | | | | | | | | | | + * |---------------------------------------------------------------| + * | | | | | | | | | | | | | + * |---------------------------------------------------------------| + * | | | | | | | | | | | | + * |---------------------------------------------------------------| + * | | | | | | | | | + * `-----------------------------------------------------' + */ + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, \ + K300, K302, K303, K304, K306, K307, K308, K309 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, KC_NO }, \ + { K300, KC_NO, K302, K303, K304, KC_NO, K306, K307, K308, K309, KC_NO, KC_NO } \ +} + + +void dimple_led_on(void); +void dimple_led_off(void); diff --git a/keyboards/lazydesigners/dimple/info.json b/keyboards/lazydesigners/dimple/info.json new file mode 100644 index 000000000..db5137e1f --- /dev/null +++ b/keyboards/lazydesigners/dimple/info.json @@ -0,0 +1,56 @@ +{ + "keyboard_name": "Dimple", + "url": "http://lazydesigners.cn", + "maintainer": "Erovia", + "width": 12.5, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"Q", "x":1, "y":0}, + {"label":"W", "x":2, "y":0}, + {"label":"E", "x":3, "y":0}, + {"label":"R", "x":4, "y":0}, + {"label":"T", "x":5, "y":0}, + {"label":"Y", "x":6, "y":0}, + {"label":"U", "x":7, "y":0}, + {"label":"I", "x":8, "y":0}, + {"label":"O", "x":9, "y":0}, + {"label":"P", "x":10, "y":0}, + {"label":"Back
Space", "x":11, "y":0, "w":1.5}, + {"label":"Tab", "x":0, "y":1, "w":1.25}, + {"label":"A", "x":1.25, "y":1}, + {"label":"S", "x":2.25, "y":1}, + {"label":"D", "x":3.25, "y":1}, + {"label":"F", "x":4.25, "y":1}, + {"label":"G", "x":5.25, "y":1}, + {"label":"H", "x":6.25, "y":1}, + {"label":"J", "x":7.25, "y":1}, + {"label":"K", "x":8.25, "y":1}, + {"label":"L", "x":9.25, "y":1}, + {"label":"'", "x":10.25, "y":1}, + {"label":"Enter", "x":11.25, "y":1, "w":1.25}, + {"label":"Shift", "x":0, "y":2, "w":1.75}, + {"label":"Z", "x":1.75, "y":2}, + {"label":"X", "x":2.75, "y":2}, + {"label":"C", "x":3.75, "y":2}, + {"label":"V", "x":4.75, "y":2}, + {"label":"B", "x":5.75, "y":2}, + {"label":"N", "x":6.75, "y":2}, + {"label":"M", "x":7.75, "y":2}, + {"label":",", "x":8.75, "y":2}, + {"label":"Up", "x":9.75, "y":2}, + {"label":".", "x":10.75, "y":2, "w":1.75}, + {"label":"Ctrl", "x":0.75, "y":3}, + {"label":"Gui", "x":1.75, "y":3}, + {"label":"Alt", "x":2.75, "y":3}, + {"label":"Space", "x":3.75, "y":3, "w":2.25}, + {"label":"Space", "x":6, "y":3, "w":2.75}, + {"label":"Left", "x":8.75, "y":3}, + {"label":"Down", "x":9.75, "y":3}, + {"label":"Right", "x":10.75, "y":3} + ] + } + } +} diff --git a/keyboards/lazydesigners/dimple/keymaps/default/keymap.c b/keyboards/lazydesigners/dimple/keymaps/default/keymap.c new file mode 100644 index 000000000..e5a9c8466 --- /dev/null +++ b/keyboards/lazydesigners/dimple/keymaps/default/keymap.c @@ -0,0 +1,136 @@ +/* Copyright 2019 Erovia + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum custom_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +// Act as Shift on hold and as CapsLock on tap +#define SFT_CPS LSFT_T(KC_CAPS) +// Left space on tap, LOWER on hold +#define SPC_LOW LT(_LOWER, KC_SPC) +// Left space on tap, UPPER on hold +#define SPC_UPR LT(_RAISE, KC_SPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* + * ,---------------------------------------------------------------. + * |Esc | Q | W | E | R | T | Y | U | I | O | P | Bspc | + * |---------------------------------------------------------------| + * | Tab | A | S | D | F | G | H | J | K | L | ' |Enter | + * |---------------------------------------------------------------| + * | Shift | Z | X | C | V | B | N | M | , | Up | . | + * |---------------------------------------------------------------| + * |Ctrl|Gui |Alt | Spc/Lwr | Spc/Rse |Left|Down|Rght| + * `-----------------------------------------------------' + */ + + [_QWERTY] = LAYOUT( + KC_GESC, 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_QUOT, KC_ENT, + SFT_CPS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_UP, KC_DOT, + KC_LCTL, KC_LGUI, KC_LALT, SPC_LOW, SPC_UPR, KC_LEFT, KC_DOWN, KC_RGHT + ), + +/* + * ,---------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * |---------------------------------------------------------------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |---------------------------------------------------------------| + * | | F7 | F8 | F9 |F10 |F11 |F12 | | ; |PgUp| / | + * |---------------------------------------------------------------| + * | | | | | |Home|PgDn|End | + * `-----------------------------------------------------' + */ + + [_LOWER] = LAYOUT( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_NO, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_SCLN, KC_PGUP, KC_SLSH, + KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ), + +/* + * ,---------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |---------------------------------------------------------------| + * | Ins | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |---------------------------------------------------------------| + * | | F7 | F8 | F9 |F10 |F11 |F12 | | | | | + * |---------------------------------------------------------------| + * |VolD|Mute|VolU| | | | | | + * `-----------------------------------------------------' + */ + + [_RAISE] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NO, + KC_INS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_NO, KC_NO, + KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO + ), + +/* + * ,---------------------------------------------------------------. + * |EEPR|RST | | | | | | | | | | | + * |---------------------------------------------------------------| + * | | | | | | | | | | | | | + * |---------------------------------------------------------------| + * | | | | | | | | | | | | + * |---------------------------------------------------------------| + * |RGB-|RGB |RGB+| | | | | | + * `-----------------------------------------------------' + */ + + [_ADJUST] = LAYOUT( + EEP_RST, RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + RGB_VAD, RGB_TOG, RGB_VAI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), +}; + +void led_set_user(uint8_t usb_led) { +if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + dimple_led_on(); + } else { + dimple_led_off(); + } +} + +uint32_t layer_state_set_user(uint32_t state) { + state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + switch (biton32(state)) { + case _LOWER: + rgblight_sethsv_noeeprom(HSV_GREEN); + break; + case _RAISE: + rgblight_sethsv_noeeprom(HSV_GOLD); + break; + case _ADJUST: + rgblight_sethsv_noeeprom(HSV_RED); + break; + default: + rgblight_sethsv_noeeprom(HSV_WHITE); + break; + } + return state; +} diff --git a/keyboards/lazydesigners/dimple/keymaps/default/readme.md b/keyboards/lazydesigners/dimple/keymaps/default/readme.md new file mode 100644 index 000000000..c334b6c36 --- /dev/null +++ b/keyboards/lazydesigners/dimple/keymaps/default/readme.md @@ -0,0 +1,60 @@ +# The default keymap for Dimple + +**Features** + +* Shift acts as CapsLock when tapped +* Left space: space on tap, Lower layer on hold +* Right space: space on tap, Raise layer on hold +* Both space: Adjust layer on hold + +## QWERTY (Normal) Layer +``` + ,---------------------------------------------------------------. + |Esc | Q | W | E | R | T | Y | U | I | O | P | Bspc | + |---------------------------------------------------------------| + | Tab | A | S | D | F | G | H | J | K | L | ' |Enter | + |---------------------------------------------------------------| + | Shift | Z | X | C | V | B | N | M | , | Up | . | + |---------------------------------------------------------------| + |Ctrl|Gui |Alt | Spc/Lwr | Spc/Rse |Left|Down|Rght| + `-----------------------------------------------------' +``` + +## Lower Layer +``` + ,---------------------------------------------------------------. + | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + |---------------------------------------------------------------| + | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + |---------------------------------------------------------------| + | | F7 | F8 | F9 |F10 |F11 |F12 | | ; |PgUp| / | + |---------------------------------------------------------------| + | | | | | |Home|PgDn|End | + `-----------------------------------------------------' +``` + +## Raise Layer +``` + ,---------------------------------------------------------------. + | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + |---------------------------------------------------------------| + | Ins | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + |---------------------------------------------------------------| + | | F7 | F8 | F9 |F10 |F11 |F12 | | | | | + |---------------------------------------------------------------| + |VolD|Mute|VolU| | | | | | + `-----------------------------------------------------' +``` + +## Adjust Layer +``` +,---------------------------------------------------------------. + |EEPR|RST | | | | | | | | | | | + |---------------------------------------------------------------| + | | | | | | | | | | | | | + |---------------------------------------------------------------| + | | | | | | | | | | | | + |---------------------------------------------------------------| + |RGB-|RGB |RGB+| | | | | | + `-----------------------------------------------------' +``` diff --git a/keyboards/lazydesigners/dimple/readme.md b/keyboards/lazydesigners/dimple/readme.md new file mode 100644 index 000000000..04b4b438d --- /dev/null +++ b/keyboards/lazydesigners/dimple/readme.md @@ -0,0 +1,17 @@ +# Dimple + +![dimple](https://i.loli.net/2019/03/29/5c9daf903cad9.jpg) + +A 40% custom keyboard designed and produced by [LazyDesigners](http://lazydesigners.cn). + +Keyboard Maintainer: [Erovia](https://github.com/Erovia) +Hardware Supported: Dimple +Hardware Availability: Check for GBs on [Geekhack](https://geekhack.org) and on [LazyDesigner's homepage.](http://lazydesigners.cn) + +Make example for this keyboard (after setting up your build environment): + + make lazydesigners/dimple:default:dfu + +To enter the bootloader, either short the pins on the PCB or the RESET button on the FN layer. + +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). diff --git a/keyboards/lazydesigners/dimple/rules.mk b/keyboards/lazydesigners/dimple/rules.mk new file mode 100644 index 000000000..a818e871c --- /dev/null +++ b/keyboards/lazydesigners/dimple/rules.mk @@ -0,0 +1,58 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow From a37e44b2d7fdb41f01e53e382000f987563d8979 Mon Sep 17 00:00:00 2001 From: tuesdayjohn Date: Thu, 23 May 2019 20:41:25 -0400 Subject: [PATCH 111/341] Added keymap folder matching username; added readme to previous keymap (#5961) * Added keymap folder matching username; added readme into previous keymap * Update keymap.c --- .../keymaps/insertsnideremarks/readme.md | 1 + .../bfo9000/keymaps/tuesdayjohn/config.h | 42 +++ .../bfo9000/keymaps/tuesdayjohn/keymap.c | 341 ++++++++++++++++++ .../bfo9000/keymaps/tuesdayjohn/rules.mk | 19 + 4 files changed, 403 insertions(+) create mode 100644 keyboards/keebio/bfo9000/keymaps/insertsnideremarks/readme.md create mode 100644 keyboards/keebio/bfo9000/keymaps/tuesdayjohn/config.h create mode 100644 keyboards/keebio/bfo9000/keymaps/tuesdayjohn/keymap.c create mode 100644 keyboards/keebio/bfo9000/keymaps/tuesdayjohn/rules.mk diff --git a/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/readme.md b/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/readme.md new file mode 100644 index 000000000..0a3bdc45f --- /dev/null +++ b/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/readme.md @@ -0,0 +1 @@ +## I've changed my folder name to match my GitHub username. Please see https://github.com/qmk/qmk_firmware/tree/master/keyboards/keebio/bfo9000/keymaps/tuesdayjohn for my current keymap files. diff --git a/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/config.h b/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/config.h new file mode 100644 index 000000000..344634063 --- /dev/null +++ b/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/config.h @@ -0,0 +1,42 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ + +// #define USE_SERIAL +#define USE_I2C + +/* Select hand configuration */ +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_TERM 150 +#define TAPPING_TOGGLE 2 + +// #undef RGBLED_NUM +// #define RGBLIGHT_ANIMATIONS +// #define RGBLED_NUM 12 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 \ No newline at end of file diff --git a/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/keymap.c b/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/keymap.c new file mode 100644 index 000000000..e42f6797e --- /dev/null +++ b/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/keymap.c @@ -0,0 +1,341 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum bfo9000_layers { + _COLEMAK, // Colemak (default layer) + _QWERTY, // Qwerty + _GAMING, // Gaming/vanilla toggle layer (limited dual-role keys and layer access) + _NUMBERS, // Numbers & Symbols + _NUMBERS2, // Numbers & Symbols 2 (identical as _NUMBERS; basically used for tri-layer access to _ADJUST) + _FUNCTION, // Function + _FUNCTION2, // Function 2 (identical as _FUNCTION; used to allow for easier use of space and backspace while using function layer arrows) + _NUMPAD, // Numpad + _ADJUST, // Adjust layer (accessed via tri-layer feature) + _ADJUST2 // Second Adjust layer (accessed outside of tri-layer feature) +}; + +enum bfo9000_keycodes { + COLEMAK = SAFE_RANGE, + QWERTY, + GAMING +}; + +//Tap Dance Declarations +enum { + ADJ = 0, + LBCB, + RBCB, + EQPL, + PLEQ, + MNUN, + SLAS, + GVTL, + PPEQ, + PMUN, + PSPA +}; + +void dance_LAYER_finished(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + layer_on(_ADJUST2); + set_oneshot_layer(_ADJUST2, ONESHOT_START); + } +} +void dance_LAYER_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + layer_off(_ADJUST2); + clear_oneshot_layer_state(ONESHOT_PRESSED); + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { +[ADJ] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LAYER_finished, dance_LAYER_reset), // Double-tap to activate Adjust layer via oneshot layer +[LBCB] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LCBR), // Left bracket on a single-tap, left brace on a double-tap +[RBCB] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_RCBR), // Right bracket on a single-tap, right brace on a double-tap +[EQPL] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_PLUS), // Plus sign on a single-tap, equal sign on a double-tap +[PLEQ] = ACTION_TAP_DANCE_DOUBLE(KC_PLUS, KC_EQL), // Equal sign on a single-tap, plus sign on a double-tap +[MNUN] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_UNDS), // Minus sign on a single-tap, underscore on a double-tap +[SLAS] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_ASTR), // Slash in a single-tap, asterisk in a double-tap +[GVTL] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, KC_TILD), // Grave on a single-tap, tilde on a double-tap +[PPEQ] = ACTION_TAP_DANCE_DOUBLE(KC_PPLS, KC_EQL), // Numpad plus sign on a single-tap, equal sign on a double-tap +[PMUN] = ACTION_TAP_DANCE_DOUBLE(KC_PMNS, KC_UNDS), // Numpad minus sign on a single-tap, underscore on a double-tap +[PSPA] = ACTION_TAP_DANCE_DOUBLE(KC_PSLS, KC_PAST) // Numpad slash on a single-tap, numpad asterisk on a double-tap +}; + +//Aliases for longer keycodes +#define NUMPAD TG(_NUMPAD) +#define ADJUST MO(_ADJUST2) +#define SPCFN LT(_FUNCTION, KC_SPC) +#define BSPCFN LT(_FUNCTION2, KC_BSPC) +#define ENTNS LT(_NUMBERS, KC_ENT) +#define DELNS LT(_NUMBERS2, KC_DEL) +#define CTLESC CTL_T(KC_ESC) +#define ALTAPP ALT_T(KC_APP) +#define CTL_A LCTL(KC_A) +#define CTL_C LCTL(KC_C) +#define CTL_V LCTL(KC_V) +#define CTL_X LCTL(KC_X) +#define CTL_Z LCTL(KC_Z) +#define CTL_Y LCTL(KC_Y) +#define CA_TAB LCA(KC_TAB) +#define HYPER ALL_T(KC_NO) +#define TD_ADJ TD(ADJ) +#define TD_LBCB TD(LBCB) +#define TD_RBCB TD(RBCB) +#define TD_EQPL TD(EQPL) +#define TD_PLEQ TD(PLEQ) +#define TD_MNUN TD(MNUN) +#define TD_SLAS TD(SLAS) +#define TD_GVTL TD(GVTL) +#define TD_PPEQ TD(PPEQ) +#define TD_PMUN TD(PMUN) +#define TD_PSPA TD(PSPA) +#define NKROTG MAGIC_TOGGLE_NKRO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* +Colemak +(Default layer; keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) + ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. + | ESC | F1 | F2 | F3 | F4 | F5 | | | | | Adjust | | F12 | F6 | F7 | F8 | F9 | F10 | F11 | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | = | 1 | 2 | 3 | 4 | 5 | | | | | Numpad | | | 6 | 7 | 8 | 9 | 0 | - | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Tab | Q | W | F | P | G | | | Home | | Pause | | | J | L | U | Y | ; | \ | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Esc/Ctl| A | R | S | T | D | | | PgUp | | ScrLck | | | H | N | E | I | O | ' | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | SCShift| Z | X | C | V | B | Esc/Ctl| App/Alt| PgDn | | PrtScr | RAlt | RCtl | K | M | , | . | / | SCShift| + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Ins | ` | [ | ] | App/Alt| Spc/Fn | Ent/NS | Bspc | End | | | Enter | Del/NS2| Bsp/Fn2| RGUI | Left | Down | Up | Right | + `--------------------------------------------------------------------------------' `--------------------------------------------------------------------------------' +*/ +[_COLEMAK] = LAYOUT( \ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, ADJUST, _______, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, _______, NUMPAD, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, _______, _______, KC_HOME, KC_PAUS, _______, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + CTLESC, KC_A, KC_R, KC_S, KC_T, KC_D, _______, _______, KC_PGUP, KC_SLCK, _______, _______, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, CTLESC, ALTAPP, KC_PGDN, KC_PSCR, KC_RALT, KC_RCTL, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_INS, KC_GRV, KC_LBRC, KC_RBRC, ALTAPP, SPCFN, ENTNS, KC_BSPC, KC_END, _______, KC_ENT, DELNS, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* +QWERTY +(Keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) + ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. + | ESC | F1 | F2 | F3 | F4 | F5 | | | | | Adjust | | F12 | F6 | F7 | F8 | F9 | F10 | F11 | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | = | 1 | 2 | 3 | 4 | 5 | | | | | Numpad | | | 6 | 7 | 8 | 9 | 0 | - | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Tab | Q | W | E | R | T | | | Home | | Pause | | | Y | U | I | O | P | \ | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Esc/Ctl| A | S | D | F | G | | | PgUp | | ScrLck | | | H | J | K | L | ; | ' | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | SCShift| Z | X | C | V | B | Esc/Ctl| App/Alt| PgDn | | PrtScr | RAlt | RCtl | N | M | , | . | / | SCShift| + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Ins | ` | [ | ] | App/Alt| Spc/Fn | Ent/NS | Bspc | End | | | Enter | Del/NS2| Bsp/Fn2| RGUI | Left | Down | Up | Right | + `--------------------------------------------------------------------------------' `--------------------------------------------------------------------------------' +*/ +[_QWERTY] = LAYOUT( \ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, ADJUST, _______, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, NUMPAD, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_HOME, KC_PAUS, _______, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_PGUP, KC_SLCK, _______, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, CTLESC, ALTAPP, KC_PGDN, KC_PSCR, KC_RALT, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_INS, KC_GRV, KC_LBRC, KC_RBRC, ALTAPP, SPCFN, ENTNS, KC_BSPC, KC_END, _______, KC_ENT, DELNS, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* +Numbers/Symbols layer +(Multiple characters: single-tap for first, double-tap for second) + ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. + | | | | | | | | | | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | F12 | F1 | F2 | F3 | F4 | F5 | | | | | | | | F6 | F7 | F8 | F9 | F10 | F12 | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | 6 | 7 | 8 | 9 | 0 | | | | | | | | ^ | & | * | ( | ) | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | 1 | 2 | 3 | 4 | 5 | | | | | | | | ! | @ | # | $ | % | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | | . | / * | - _ | + = | | | | | | | | ` ~ | [ { | ] } | | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ( | ) | [ { | ] } | | | | | | | | | | | | | | | | + `--------------------------------------------------------------------------------' `--------------------------------------------------------------------------------' +*/ +[_NUMBERS] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, _______, _______, _______, _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + _______, _______, KC_DOT, TD_SLAS, TD_MNUN, TD_PLEQ, _______, _______, _______, _______, _______, _______, TD_GVTL, TD_LBCB, TD_RBCB, _______, _______, _______, + KC_LPRN, KC_RPRN, TD_LBCB, TD_RBCB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +[_NUMBERS2] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, _______, _______, _______, _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + _______, _______, KC_DOT, TD_SLAS, TD_MNUN, TD_PLEQ, _______, _______, _______, _______, _______, _______, TD_GVTL, TD_LBCB, TD_RBCB, _______, _______, _______, + KC_LPRN, KC_RPRN, TD_LBCB, TD_RBCB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* +Function layer + ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. + | | | | | | | | | | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | F12 | F1 | F2 | F3 | F4 | F5 | | | | | | | | F6 | F7 | F8 | F9 | F10 | F12 | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | | | Up | | | | | | | | | | | | Up | Ctrl+Y | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | Ctrl+A | Left | Down | Right | C+A+Tb | | | | | | | | PgUp | Right | Down | Left | Home | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | Ctrl+Z | Ctrl+X | Ctrl+C | Ctrl+V | Bspc | | | | | | | | PgDn | Mute | Vol- | Vol+ | End | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | | | | | | | | | | | | | | | Prev | Play | Next | Stop | + `--------------------------------------------------------------------------------' `--------------------------------------------------------------------------------' +*/ +[_FUNCTION] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, CTL_Y, _______, _______, + _______, CTL_A, KC_LEFT, KC_DOWN, KC_RGHT, CA_TAB, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, + _______, CTL_Z, CTL_X, CTL_C, CTL_V, KC_BSPC, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP +), + +[_FUNCTION2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, CTL_Y, _______, _______, + _______, CTL_A, KC_LEFT, KC_DOWN, KC_RGHT, CA_TAB, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, + _______, CTL_Z, CTL_X, CTL_C, CTL_V, KC_BSPC, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP +), + +/* +Numpad layer +(Left side duplicates layout from the Numbers layer, just with numpad output; right side layout close to PC numpad layout) + ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. + | | | | | | | | | | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | NumLk | | | | | | | | | | | Tab | NumLk | KP / | KP * | KP - | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | KP 6 | KP 7 | KP 8 | KP 9 | KP 0 | | | | | | | | KP 7 | KP 8 | KP 9 | KP + | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | KP 1 | KP 2 | KP 3 | KP 4 | KP 5 | | | | | | | | KP 4 | KP 5 | KP 6 | = | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | | KP . | KP/ KP*| KP- _ | KP+ = | | | | | | | | KP 1 | KP 2 | KP 3 | KP Ent | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ( | ) | [ { | ] } | | | | | | | | | | | KP 0 | KP . | KP Ent | | | + `--------------------------------------------------------------------------------' `--------------------------------------------------------------------------------' +*/ +[_NUMPAD] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_NLCK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TAB, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, _______, + _______, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PPLS, _______, + _______, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_EQL, _______, + _______, _______, KC_PDOT, TD_PSPA, TD_PMUN, TD_PPEQ, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, + KC_LPRN, KC_RPRN, TD_LBCB, TD_RBCB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT, _______ +), + +/* +Gaming +(Toggle gaming layer with limited dual-role keys and layer access; NKRO turned on by default; Ent/NS + Delete/Numbers2 to access Adjust layer) + ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. + | | | | | | | F6 | F7 | F8 | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | | | | | | 6 | 7 | 8 | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | | | | | | J | L | | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | LCtl | | | | | | H | N | | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Shift | | | | | | Esc | LAlt | | | | RAlt | RCtl | | | | | | Shift | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | | | | LAlt | Space | Enter | Bspc | | | | Ent/NS | Del/NS2| Bsp/Fn2| RGUI | | | | | + `--------------------------------------------------------------------------------' `--------------------------------------------------------------------------------' +*/ +[_GAMING] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, KC_F6, KC_F7, KC_F8, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_6, KC_7, KC_8, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_J, KC_L, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LCTL, _______, _______, _______, _______, _______, KC_H, KC_N, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LSFT, _______, _______, _______, _______, _______, KC_ESC, KC_LALT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, + _______, _______, _______, _______, KC_LALT, KC_SPC, KC_ENT, KC_BSPC, _______, _______, ENTNS, _______, _______, _______, _______, _______, _______, _______ +), + +/* +Adjust layer +(Press and hold Adjust key on the function row or Enter/Number + Delete/Number2 to access; Numpad and NKRO are on toggle) + ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. + | | | | | | | | | | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | Colemak| Qwerty | | Gaming | | | | | | | | | Numpad | | | | | RESET | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | | | | | | | | | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | | | | | | | | | | | | | | NKROTG | | | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | | | | | | | | | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | | | | | | | | | | | | | | | | | | | + `--------------------------------------------------------------------------------' `--------------------------------------------------------------------------------' +*/ +[_ADJUST] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, COLEMAK, QWERTY, _______, GAMING, _______, _______, _______, _______, _______, _______, _______, NUMPAD, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NKROTG, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +[_ADJUST2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, COLEMAK, QWERTY, _______, GAMING, _______, _______, _______, _______, _______, _______, _______, NUMPAD, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NKROTG, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _NUMBERS, _NUMBERS2, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case COLEMAK: + if (record->event.pressed) { +// persistent_default_layer_set(1UL << _COLEMAK); + default_layer_set(1UL << _COLEMAK); + layer_move (_COLEMAK); + keymap_config.nkro = 0; + } + return false; + break; + case QWERTY: + if (record->event.pressed) { +// persistent_default_layer_set(1UL << _QWERTY); + default_layer_set(1UL << _QWERTY); + layer_move (_QWERTY); + keymap_config.nkro = 0; + } + return false; + break; + case GAMING: + if (record->event.pressed) { + layer_invert (_GAMING); + layer_off (_NUMPAD); + keymap_config.nkro = 1; + } + return false; + break; + } + return true; +} diff --git a/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/rules.mk b/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/rules.mk new file mode 100644 index 000000000..cf63c44f4 --- /dev/null +++ b/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/rules.mk @@ -0,0 +1,19 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# + +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 # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = yes # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +TAP_DANCE_ENABLE = yes # Enable Tap Dancing function From 83afae31ed64ba577a4bd0336131598196d3e8c7 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Thu, 23 May 2019 17:42:06 -0700 Subject: [PATCH 112/341] Fix up Debouncing in AVR Templates (#5964) --- quantum/template/avr/config.h | 2 +- quantum/template/ps2avrgb/config.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/quantum/template/avr/config.h b/quantum/template/avr/config.h index 48d7afb14..c13784ba1 100644 --- a/quantum/template/avr/config.h +++ b/quantum/template/avr/config.h @@ -86,7 +86,7 @@ along with this program. If not, see . // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/quantum/template/ps2avrgb/config.h b/quantum/template/ps2avrgb/config.h index 8d9a993cf..d954fec96 100644 --- a/quantum/template/ps2avrgb/config.h +++ b/quantum/template/ps2avrgb/config.h @@ -37,7 +37,7 @@ along with this program. If not, see . #define UNUSED_PINS {} #define DIODE_DIRECTION COL2ROW -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #define NO_BACKLIGHT_CLOCK #define BACKLIGHT_LEVELS 1 From 362bfc5b15eeacd946f814efb726f4e7fd9a1328 Mon Sep 17 00:00:00 2001 From: Danny Date: Fri, 24 May 2019 15:14:14 -0400 Subject: [PATCH 113/341] Fix cypher iso (#5971) * Reformat JSON to look less like AIDS * Fix location of ISO Enter --- keyboards/westfoxtrot/cypher/info.json | 199 ++++++++++++++++++++++++- 1 file changed, 197 insertions(+), 2 deletions(-) diff --git a/keyboards/westfoxtrot/cypher/info.json b/keyboards/westfoxtrot/cypher/info.json index ab139aeaf..ddf4e9d5a 100644 --- a/keyboards/westfoxtrot/cypher/info.json +++ b/keyboards/westfoxtrot/cypher/info.json @@ -4,9 +4,204 @@ "height": 5, "layouts": { "LAYOUT_ansi": { - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Num Lock", "x":15.5, "y":0}, {"label":"/", "x":16.5, "y":0}, {"label":"*", "x":17.5, "y":0}, {"label":"-", "x":18.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"7", "x":15.5, "y":1}, {"label":"8", "x":16.5, "y":1}, {"label":"9", "x":17.5, "y":1}, {"label":"+", "x":18.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"4", "x":15.5, "y":2}, {"label":"5", "x":16.5, "y":2}, {"label":"6", "x":17.5, "y":2}, {"label":"=", "x":18.5, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Up", "x":14.25, "y":3.25}, {"label":"1", "x":15.5, "y":3}, {"label":"2", "x":16.5, "y":3}, {"label":"3", "x":17.5, "y":3}, {"label":"Enter", "x":18.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"label":"Space", "x":3.5, "y":4, "w":6}, {"label":"Alt", "x":9.5, "y":4, "w":1.25}, {"label":"Win", "x":10.75, "y":4}, {"label":"Ctrl", "x":11.75, "y":4, "w":1.25}, {"label":"Left", "x":13.25, "y":4.25}, {"label":"Down", "x":14.25, "y":4.25}, {"label":"Right", "x":15.25, "y":4.25}, {"label":"0", "x":16.5, "y":4}, {"label":".", "x":17.5, "y":4}, {"label":"Backspace", "x":18.5, "y":4}] }, + "layout": [ + {"label":"~","x":0,"y":0}, + {"label":"!","x":1,"y":0}, + {"label":"@","x":2,"y":0}, + {"label":"#","x":3,"y":0}, + {"label":"$","x":4,"y":0}, + {"label":"%","x":5,"y":0}, + {"label":"^","x":6,"y":0}, + {"label":"&","x":7,"y":0}, + {"label":"*","x":8,"y":0}, + {"label":"(","x":9,"y":0}, + {"label":")","x":10,"y":0}, + {"label":"_","x":11,"y":0}, + {"label":"+","x":12,"y":0}, + {"label":"Backspace","x":13,"y":0}, + {"label":"~","x":14,"y":0}, + + {"label":"Num Lock","x":15.5,"y":0}, + {"label":"/","x":16.5,"y":0}, + {"label":"*","x":17.5,"y":0}, + {"label":"-","x":18.5,"y":0}, + + {"label":"Tab","x":0,"y":1,"w":1.5}, + {"label":"Q","x":1.5,"y":1}, + {"label":"W","x":2.5,"y":1}, + {"label":"E","x":3.5,"y":1}, + {"label":"R","x":4.5,"y":1}, + {"label":"T","x":5.5,"y":1}, + {"label":"Y","x":6.5,"y":1}, + {"label":"U","x":7.5,"y":1}, + {"label":"I","x":8.5,"y":1}, + {"label":"O","x":9.5,"y":1}, + {"label":"P","x":10.5,"y":1}, + {"label":"{","x":11.5,"y":1}, + {"label":"}","x":12.5,"y":1}, + {"label":"|","x":13.5,"y":1,"w":1.5}, + + {"label":"7","x":15.5,"y":1}, + {"label":"8","x":16.5,"y":1}, + {"label":"9","x":17.5,"y":1}, + {"label":"+","x":18.5,"y":1}, + + {"label":"Caps Lock","x":0,"y":2,"w":1.75}, + {"label":"A","x":1.75,"y":2}, + {"label":"S","x":2.75,"y":2}, + {"label":"D","x":3.75,"y":2}, + {"label":"F","x":4.75,"y":2}, + {"label":"G","x":5.75,"y":2}, + {"label":"H","x":6.75,"y":2}, + {"label":"J","x":7.75,"y":2}, + {"label":"K","x":8.75,"y":2}, + {"label":"L","x":9.75,"y":2}, + {"label":":","x":10.75,"y":2}, + {"label":"\"","x":11.75,"y":2}, + {"label":"Enter","x":12.75,"y":2,"w":2.25}, + + {"label":"4","x":15.5,"y":2}, + {"label":"5","x":16.5,"y":2}, + {"label":"6","x":17.5,"y":2}, + {"label":"=","x":18.5,"y":2}, + + {"label":"Shift","x":0,"y":3,"w":2.25}, + {"label":"Z","x":2.25,"y":3}, + {"label":"X","x":3.25,"y":3}, + {"label":"C","x":4.25,"y":3}, + {"label":"V","x":5.25,"y":3}, + {"label":"B","x":6.25,"y":3}, + {"label":"N","x":7.25,"y":3}, + {"label":"M","x":8.25,"y":3}, + {"label":"<","x":9.25,"y":3}, + {"label":">","x":10.25,"y":3}, + {"label":"?","x":11.25,"y":3}, + {"label":"Shift","x":12.25,"y":3,"w":1.75}, + + {"label":"Up","x":14.25,"y":3.25}, + + {"label":"1","x":15.5,"y":3}, + {"label":"2","x":16.5,"y":3}, + {"label":"3","x":17.5,"y":3}, + {"label":"Enter","x":18.5,"y":3}, + + {"label":"Ctrl","x":0,"y":4,"w":1.25}, + {"label":"Win","x":1.25,"y":4}, + {"label":"Alt","x":2.25,"y":4,"w":1.25}, + {"label":"Space","x":3.5,"y":4,"w":6}, + {"label":"Alt","x":9.5,"y":4,"w":1.25}, + {"label":"Win","x":10.75,"y":4}, + {"label":"Ctrl","x":11.75,"y":4,"w":1.25}, + + {"label":"Left","x":13.25,"y":4.25}, + {"label":"Down","x":14.25,"y":4.25}, + {"label":"Right","x":15.25,"y":4.25}, + + {"label":"0","x":16.5,"y":4}, + {"label":".","x":17.5,"y":4}, + {"label":"Backspace","x":18.5,"y":4} + ] + }, "LAYOUT_iso": { - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Num Lock", "x":15.5, "y":0}, {"label":"/", "x":16.5, "y":0}, {"label":"*", "x":17.5, "y":0}, {"label":"-", "x":18.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"7", "x":15.5, "y":1}, {"label":"8", "x":16.5, "y":1}, {"label":"9", "x":17.5, "y":1}, {"label":"+", "x":18.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"4", "x":15.5, "y":2}, {"label":"5", "x":16.5, "y":2}, {"label":"6", "x":17.5, "y":2}, {"label":"=", "x":18.5, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Up", "x":14.25, "y":3.25}, {"label":"1", "x":15.5, "y":3}, {"label":"2", "x":16.5, "y":3}, {"label":"3", "x":17.5, "y":3}, {"label":"Enter", "x":18.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"label":"Space", "x":3.5, "y":4, "w":6}, {"label":"Alt", "x":9.5, "y":4, "w":1.25}, {"label":"Win", "x":10.75, "y":4}, {"label":"Ctrl", "x":11.75, "y":4, "w":1.25}, {"label":"Left", "x":13.25, "y":4.25}, {"label":"Down", "x":14.25, "y":4.25}, {"label":"Right", "x":15.25, "y":4.25}, {"label":"0", "x":16.5, "y":4}, {"label":".", "x":17.5, "y":4}, {"label":"Backspace", "x":18.5, "y":4}] } + "layout": [ + {"label":"~","x":0,"y":0}, + {"label":"!","x":1,"y":0}, + {"label":"@","x":2,"y":0}, + {"label":"#","x":3,"y":0}, + {"label":"$","x":4,"y":0}, + {"label":"%","x":5,"y":0}, + {"label":"^","x":6,"y":0}, + {"label":"&","x":7,"y":0}, + {"label":"*","x":8,"y":0}, + {"label":"(","x":9,"y":0}, + {"label":")","x":10,"y":0}, + {"label":"_","x":11,"y":0}, + {"label":"+","x":12,"y":0}, + {"label":"Backspace","x":13,"y":0}, + {"label":"~","x":14,"y":0}, + + {"label":"Num Lock","x":15.5,"y":0}, + {"label":"/","x":16.5,"y":0}, + {"label":"*","x":17.5,"y":0}, + {"label":"-","x":18.5,"y":0}, + + {"label":"Tab","x":0,"y":1,"w":1.5}, + {"label":"Q","x":1.5,"y":1}, + {"label":"W","x":2.5,"y":1}, + {"label":"E","x":3.5,"y":1}, + {"label":"R","x":4.5,"y":1}, + {"label":"T","x":5.5,"y":1}, + {"label":"Y","x":6.5,"y":1}, + {"label":"U","x":7.5,"y":1}, + {"label":"I","x":8.5,"y":1}, + {"label":"O","x":9.5,"y":1}, + {"label":"P","x":10.5,"y":1}, + {"label":"{","x":11.5,"y":1}, + {"label":"}","x":12.5,"y":1}, + + {"label":"7","x":15.5,"y":1}, + {"label":"8","x":16.5,"y":1}, + {"label":"9","x":17.5,"y":1}, + {"label":"+","x":18.5,"y":1}, + + {"label":"Caps Lock","x":0,"y":2,"w":1.75}, + {"label":"A","x":1.75,"y":2}, + {"label":"S","x":2.75,"y":2}, + {"label":"D","x":3.75,"y":2}, + {"label":"F","x":4.75,"y":2}, + {"label":"G","x":5.75,"y":2}, + {"label":"H","x":6.75,"y":2}, + {"label":"J","x":7.75,"y":2}, + {"label":"K","x":8.75,"y":2}, + {"label":"L","x":9.75,"y":2}, + {"label":":","x":10.75,"y":2}, + {"label":"\"","x":11.75,"y":2}, + {"label":"~","x":12.75,"y":2}, + {"label":"Enter","x":13.75,"y":1,"w":1.25,"h":2}, + + {"label":"4","x":15.5,"y":2}, + {"label":"5","x":16.5,"y":2}, + {"label":"6","x":17.5,"y":2}, + {"label":"=","x":18.5,"y":2}, + + {"label":"Shift","x":0,"y":3,"w":1.25}, + {"label":"|","x":1.25,"y":3}, + {"label":"Z","x":2.25,"y":3}, + {"label":"X","x":3.25,"y":3}, + {"label":"C","x":4.25,"y":3}, + {"label":"V","x":5.25,"y":3}, + {"label":"B","x":6.25,"y":3}, + {"label":"N","x":7.25,"y":3}, + {"label":"M","x":8.25,"y":3}, + {"label":"<","x":9.25,"y":3}, + {"label":">","x":10.25,"y":3}, + {"label":"?","x":11.25,"y":3}, + {"label":"Shift","x":12.25,"y":3,"w":1.75}, + + {"label":"Up","x":14.25,"y":3.25}, + + {"label":"1","x":15.5,"y":3}, + {"label":"2","x":16.5,"y":3}, + {"label":"3","x":17.5,"y":3}, + {"label":"Enter","x":18.5,"y":3}, + + {"label":"Ctrl","x":0,"y":4,"w":1.25}, + {"label":"Win","x":1.25,"y":4}, + {"label":"Alt","x":2.25,"y":4,"w":1.25}, + {"label":"Space","x":3.5,"y":4,"w":6}, + {"label":"Alt","x":9.5,"y":4,"w":1.25}, + {"label":"Win","x":10.75,"y":4}, + {"label":"Ctrl","x":11.75,"y":4,"w":1.25}, + + {"label":"Left","x":13.25,"y":4.25}, + {"label":"Down","x":14.25,"y":4.25}, + {"label":"Right","x":15.25,"y":4.25}, + + {"label":"0","x":16.5,"y":4}, + {"label":".","x":17.5,"y":4}, + {"label":"Backspace","x":18.5,"y":4} + ] + } } } From a1e2d51712385a12bba7d592e391200742be5ad7 Mon Sep 17 00:00:00 2001 From: AbstractKB <49011872+AbstractKB@users.noreply.github.com> Date: Fri, 24 May 2019 17:10:40 -0400 Subject: [PATCH 114/341] [Keyboard] Added Abstract Ellipse Rev1 (#5939) * mostly done with first version of Ellipse Rev1 software * mostly done, error with backlight breathing * more testing and changing default keymaps * ready for first release attempt * fix newline in readme * fix copyright and extraneous declarations and symbols * remove more excess backslashes * fixed more formatting --- keyboards/abstract/ellipse/info.json | 12 + .../ellipse/keymaps/abstractkb/config.h | 23 ++ .../ellipse/keymaps/abstractkb/keymap.c | 66 +++++ .../ellipse/keymaps/abstractkb/readme.md | 3 + .../ellipse/keymaps/abstractkb/rules.mk | 1 + .../abstract/ellipse/keymaps/default/config.h | 19 ++ .../abstract/ellipse/keymaps/default/keymap.c | 66 +++++ .../ellipse/keymaps/default/readme.md | 6 + .../abstract/ellipse/keymaps/default/rules.mk | 0 keyboards/abstract/ellipse/readme.md | 19 ++ keyboards/abstract/ellipse/rev1/config.h | 245 ++++++++++++++++++ keyboards/abstract/ellipse/rev1/rev1.c | 43 +++ keyboards/abstract/ellipse/rev1/rev1.h | 36 +++ keyboards/abstract/ellipse/rev1/rules.mk | 81 ++++++ 14 files changed, 620 insertions(+) create mode 100644 keyboards/abstract/ellipse/info.json create mode 100644 keyboards/abstract/ellipse/keymaps/abstractkb/config.h create mode 100644 keyboards/abstract/ellipse/keymaps/abstractkb/keymap.c create mode 100644 keyboards/abstract/ellipse/keymaps/abstractkb/readme.md create mode 100644 keyboards/abstract/ellipse/keymaps/abstractkb/rules.mk create mode 100644 keyboards/abstract/ellipse/keymaps/default/config.h create mode 100644 keyboards/abstract/ellipse/keymaps/default/keymap.c create mode 100644 keyboards/abstract/ellipse/keymaps/default/readme.md create mode 100644 keyboards/abstract/ellipse/keymaps/default/rules.mk create mode 100644 keyboards/abstract/ellipse/readme.md create mode 100644 keyboards/abstract/ellipse/rev1/config.h create mode 100644 keyboards/abstract/ellipse/rev1/rev1.c create mode 100644 keyboards/abstract/ellipse/rev1/rev1.h create mode 100644 keyboards/abstract/ellipse/rev1/rules.mk diff --git a/keyboards/abstract/ellipse/info.json b/keyboards/abstract/ellipse/info.json new file mode 100644 index 000000000..8ad50e6ca --- /dev/null +++ b/keyboards/abstract/ellipse/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Ellipse", + "url": "https://abstractkb.tk/product/ellipse-rev1", + "maintainer": "AbstractKB", + "width": 3, + "height": 2.25, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/abstract/ellipse/keymaps/abstractkb/config.h b/keyboards/abstract/ellipse/keymaps/abstractkb/config.h new file mode 100644 index 000000000..3bc66cd9b --- /dev/null +++ b/keyboards/abstract/ellipse/keymaps/abstractkb/config.h @@ -0,0 +1,23 @@ +/* Copyright 2019 AbstractKB + * + * 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 . + */ + +#pragma once + +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 2 +#define RGBLIGHT_ANIMATIONS + +// place overrides here diff --git a/keyboards/abstract/ellipse/keymaps/abstractkb/keymap.c b/keyboards/abstract/ellipse/keymaps/abstractkb/keymap.c new file mode 100644 index 000000000..8d649419d --- /dev/null +++ b/keyboards/abstract/ellipse/keymaps/abstractkb/keymap.c @@ -0,0 +1,66 @@ +/* Copyright 2019 AbstractKB + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +/*enum custom_keycodes { + MYKEY = SAFE_RANGE +};*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_MUTE, RGB_TOG, BL_TOGG, + RGB_M_SW, RGB_M_P, BL_BRTG + ) +}; + +/*bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +}*/ + +/*void matrix_init_user(void) { + +}*/ + +/*void matrix_scan_user(void) { + +}*/ + +/*void led_set_user(uint8_t usb_led) { + +}*/ + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + rgblight_increase_hue_noeeprom(); + } else { + rgblight_decrease_hue_noeeprom(); + } + } else if (index == 2) { /* Third encoder */ + if (clockwise) { + backlight_increase(); + } else { + backlight_decrease(); + } + } +} \ No newline at end of file diff --git a/keyboards/abstract/ellipse/keymaps/abstractkb/readme.md b/keyboards/abstract/ellipse/keymaps/abstractkb/readme.md new file mode 100644 index 000000000..5db2eb647 --- /dev/null +++ b/keyboards/abstract/ellipse/keymaps/abstractkb/readme.md @@ -0,0 +1,3 @@ +# My keymap + +This was used for testing lights but will become my personal keymap \ No newline at end of file diff --git a/keyboards/abstract/ellipse/keymaps/abstractkb/rules.mk b/keyboards/abstract/ellipse/keymaps/abstractkb/rules.mk new file mode 100644 index 000000000..54a2685bf --- /dev/null +++ b/keyboards/abstract/ellipse/keymaps/abstractkb/rules.mk @@ -0,0 +1 @@ +BACKLIGHT_ENABLE = yes \ No newline at end of file diff --git a/keyboards/abstract/ellipse/keymaps/default/config.h b/keyboards/abstract/ellipse/keymaps/default/config.h new file mode 100644 index 000000000..e406c488b --- /dev/null +++ b/keyboards/abstract/ellipse/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 AbstractKB + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/abstract/ellipse/keymaps/default/keymap.c b/keyboards/abstract/ellipse/keymaps/default/keymap.c new file mode 100644 index 000000000..ac1ec986b --- /dev/null +++ b/keyboards/abstract/ellipse/keymaps/default/keymap.c @@ -0,0 +1,66 @@ +/* Copyright 2019 AbstractKB + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +/*enum custom_keycodes { + MYKEY = SAFE_RANGE +};*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_A, RGB_TOG, KC_C, + KC_X, KC_Y, KC_Z + ) +}; + +/*bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +}*/ + +/*void matrix_init_user(void) { + +}*/ + +/*void matrix_scan_user(void) { + +}*/ + +/*void led_set_user(uint8_t usb_led) { + +}*/ + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_O); + } else { + tap_code(KC_P); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + rgblight_increase_hue_noeeprom(); + } else { + rgblight_decrease_hue_noeeprom(); + } + } else if (index == 2) { + if (clockwise) { + tap_code(KC_M); + } else { + tap_code(KC_R); + } + } +} \ No newline at end of file diff --git a/keyboards/abstract/ellipse/keymaps/default/readme.md b/keyboards/abstract/ellipse/keymaps/default/readme.md new file mode 100644 index 000000000..e14c0c8bd --- /dev/null +++ b/keyboards/abstract/ellipse/keymaps/default/readme.md @@ -0,0 +1,6 @@ +# The default keymap for Ellipse + +This keymap allows for basic testing of the keypad once assembled. +Each knob and key outputs a different standard letter keycode, +except for the middle knob which changes the hue of the RGB LEDs and when +pressed down turns off the RGB LEDs \ No newline at end of file diff --git a/keyboards/abstract/ellipse/keymaps/default/rules.mk b/keyboards/abstract/ellipse/keymaps/default/rules.mk new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/abstract/ellipse/readme.md b/keyboards/abstract/ellipse/readme.md new file mode 100644 index 000000000..973d36f44 --- /dev/null +++ b/keyboards/abstract/ellipse/readme.md @@ -0,0 +1,19 @@ +# EllipseRev1 + +![EllipseRev1](http://abstractkb.tk/wp-content/uploads/2019/03/ellipsetop.jpg) + +A small keypad with more knobs than ever before! 3 Knobs and 3 MX-style switches on one little board. + +At this time there are 2 small known issues with the Rev 1. One of which is that backlight breathing does not work, +and the other issue that has been encountered is that the post_init_user function does not seem to be called. +Hopefully these issues can be resolved soon; this QMK file is being released as orders have started to ship and they need to be configurable. + +Keyboard Maintainer: [AbstractKB](https://github.com/abstractkb) +Hardware Supported: The Abstract Ellipse Rev1 +Hardware Availability: https://abstractkb.tk + +Make example for this keyboard (after setting up your build environment): + + make abstract/ellipse/rev1:default:dfu + +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). diff --git a/keyboards/abstract/ellipse/rev1/config.h b/keyboards/abstract/ellipse/rev1/config.h new file mode 100644 index 000000000..4fcf96eb3 --- /dev/null +++ b/keyboards/abstract/ellipse/rev1/config.h @@ -0,0 +1,245 @@ +/* +Copyright 2019 AbstractKB + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER AbstractKB +#define PRODUCT EllipseRev1 +#define DESCRIPTION The Ellipse Macropad + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 3 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D3, C7 } +#define MATRIX_COL_PINS { F0, B6, B5 } +#define UNUSED_PINS { B0, D0, D1, D2, D4, D6, D7, F1, F4, F5, F6, F7 } + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN C6 +//#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 15 + +#define RGB_DI_PIN E6 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 3 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/*#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +)*/ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 + +#define NUMBER_OF_ENCODERS 3 +#define ENCODERS_PAD_A { B2, B3, D5 } +#define ENCODERS_PAD_B { B1, B7, B4 } +#define ENCODER_RESOLUTION 2 diff --git a/keyboards/abstract/ellipse/rev1/rev1.c b/keyboards/abstract/ellipse/rev1/rev1.c new file mode 100644 index 000000000..ae7aa640e --- /dev/null +++ b/keyboards/abstract/ellipse/rev1/rev1.c @@ -0,0 +1,43 @@ +/* Copyright 2019 AbstractKB + * + * 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 . + */ +#include "rev1.h" + +/*void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +}*/ \ No newline at end of file diff --git a/keyboards/abstract/ellipse/rev1/rev1.h b/keyboards/abstract/ellipse/rev1/rev1.h new file mode 100644 index 000000000..de8b9bacb --- /dev/null +++ b/keyboards/abstract/ellipse/rev1/rev1.h @@ -0,0 +1,36 @@ +/* Copyright 2019 AbstractKB + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K00, K01, K02, \ + K10, K11, K12 \ +) \ +{ \ + { K00, K01, K02 }, \ + { K10, K11, K12 }, \ +} + diff --git a/keyboards/abstract/ellipse/rev1/rules.mk b/keyboards/abstract/ellipse/rev1/rules.mk new file mode 100644 index 000000000..880d40e49 --- /dev/null +++ b/keyboards/abstract/ellipse/rev1/rules.mk @@ -0,0 +1,81 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +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 = no # Console for debug(+400) +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +ENCODER_ENABLE = yes # Enable support for rotary encoders From 4f1537b879366664c94faaef22190c2828115a26 Mon Sep 17 00:00:00 2001 From: Mark Date: Sat, 25 May 2019 00:18:57 +0300 Subject: [PATCH 115/341] [Keyboard] Fix formatting on keyboard to micro connection table (#5968) * Fix formatting on keyboard to micro connection table * Add whitespace to make more readable --- keyboards/converter/palm_usb/readme.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/keyboards/converter/palm_usb/readme.md b/keyboards/converter/palm_usb/readme.md index 17ba329da..850005d9e 100644 --- a/keyboards/converter/palm_usb/readme.md +++ b/keyboards/converter/palm_usb/readme.md @@ -23,9 +23,10 @@ qmk because the Arduino softserial library uses different pins from QMK. I've wired the pro micro hardware as follows. -Label| TX0,RX1,GND,GND,2 ,3 ,4 ,5 ,6 ,7 -Palm | , , * ,GND,VCC,RX ,NC ,RTS,nc ,DCD -MCU | ,D1 ,D0 , ,C6 , ,E6 +| Label | TX0 | RX1 | GND | GND | 2 | 3 | 4 | 5 | 6 | 7 | +| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | +| Palm | | | * | GND | VCC | RX | NC | RTS | NC | DCD | +| MCU | | | | | D1 | D0 | | C6 | | E6 | \* The RX line from the keyboard should be conected to a ~10K ohm pull down resistor to ground. RX --|--3 From 1da8ad86689ae8fe8c5852201c5914e745f0f38e Mon Sep 17 00:00:00 2001 From: Doug Raffle Date: Fri, 24 May 2019 18:06:37 -0400 Subject: [PATCH 116/341] Added media keys to 1up60rgb:raffle (#5973) --- keyboards/1upkeyboards/1up60rgb/keymaps/raffle/keymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/1upkeyboards/1up60rgb/keymaps/raffle/keymap.c b/keyboards/1upkeyboards/1up60rgb/keymaps/raffle/keymap.c index c166cd0b1..f4dd36d6d 100644 --- a/keyboards/1upkeyboards/1up60rgb/keymaps/raffle/keymap.c +++ b/keyboards/1upkeyboards/1up60rgb/keymaps/raffle/keymap.c @@ -37,11 +37,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RAISE, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, RGB, KC_RCTL ), // raise layer to handle function & nav keys - [_raise] = LAYOUT_all + [_raise] = LAYOUT_all ( 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, KC_DEL, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_LSCR, KC_PAUSE, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_INS, KC_DEL, KC_TRNS, KC_TRNS, + KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_CALC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_LSCR, KC_PAUSE, KC_TRNS, + KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_INS, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_APP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), From 1a55d84224609c935a5a98d2e824c6773353162f Mon Sep 17 00:00:00 2001 From: Maarten Dekkers Date: Sat, 25 May 2019 03:33:37 +0200 Subject: [PATCH 117/341] Add support for LSJ Ares (#5588) * Add support for LSJ Ares Thanks to the other ports which have made this port possible. * Update Ares code per request * More changes to Ares * Update Ares rules.mk Co-Authored-By: Maartenwut * Remove escaping backslashes from Ares default keymap --- keyboards/ares/ares.c | 107 +++++++ keyboards/ares/ares.h | 37 +++ keyboards/ares/config.h | 51 +++ keyboards/ares/info.json | 12 + keyboards/ares/keymaps/default/keymap.c | 40 +++ keyboards/ares/readme.md | 42 +++ keyboards/ares/rules.mk | 48 +++ keyboards/ares/usbconfig.h | 396 ++++++++++++++++++++++++ 8 files changed, 733 insertions(+) create mode 100644 keyboards/ares/ares.c create mode 100644 keyboards/ares/ares.h create mode 100644 keyboards/ares/config.h create mode 100644 keyboards/ares/info.json create mode 100644 keyboards/ares/keymaps/default/keymap.c create mode 100644 keyboards/ares/readme.md create mode 100644 keyboards/ares/rules.mk create mode 100644 keyboards/ares/usbconfig.h diff --git a/keyboards/ares/ares.c b/keyboards/ares/ares.c new file mode 100644 index 000000000..85c7435ed --- /dev/null +++ b/keyboards/ares/ares.c @@ -0,0 +1,107 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 . +*/ + +#include "ares.h" + +#ifdef RGBLIGHT_ENABLE + +#include +#include "i2c_master.h" +#include "rgblight.h" + +extern rgblight_config_t rgblight_config; + +void matrix_init_kb(void) { + i2c_init(); + // call user level keymaps, if any + matrix_init_user(); +} + +// custom RGB driver +void rgblight_set(void) { + if (!rgblight_config.enable) { + memset(led, 0, 3 * RGBLED_NUM); + } + + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); +} + +bool rgb_init = false; + +void matrix_scan_kb(void) { + // if LEDs were previously on before poweroff, turn them back on + if (rgb_init == false && rgblight_config.enable) { + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); + rgb_init = true; + } + + rgblight_task(); + matrix_scan_user(); +} + +#endif + +#ifdef BACKLIGHT_ENABLE +void backlight_init_ports(void) { + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); +} + +void backlight_set(uint8_t level) { + if (level == 0) { + // Turn out the lights + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); + } else { + // Turn on the lights + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); + } +} +#endif + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); +} +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + matrix_scan_user(); +} +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + return process_record_user(keycode, record); +} +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + led_set_user(usb_led); +} +*/ \ No newline at end of file diff --git a/keyboards/ares/ares.h b/keyboards/ares/ares.h new file mode 100644 index 000000000..41ecb570c --- /dev/null +++ b/keyboards/ares/ares.h @@ -0,0 +1,37 @@ +/* +Copyright 2019 Maarten Dekkers + +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 . +*/ + +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +#define LAYOUT( \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k00, k01, k02, k06, k0a, k0b, k0c, k0d \ +) \ +{ \ + {k00, k01, k02, XXX, XXX, XXX, k06, XXX, XXX, XXX, k0a, k0b, k0c, k0d, XXX}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, XXX}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, XXX}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, XXX}, \ + {k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e} \ +} diff --git a/keyboards/ares/config.h b/keyboards/ares/config.h new file mode 100644 index 000000000..f278c6fdc --- /dev/null +++ b/keyboards/ares/config.h @@ -0,0 +1,51 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 . +*/ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +#define MANUFACTURER LSJ +#define PRODUCT QMK Firmware for Ares + +#define RGBLED_NUM 16 + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } +#define UNUSED_PINS {} + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCING_DELAY 5 + +#define NO_BACKLIGHT_CLOCK +#define BACKLIGHT_LEVELS 1 +#define RGBLIGHT_ANIMATIONS + +#define NO_UART 1 + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 \ No newline at end of file diff --git a/keyboards/ares/info.json b/keyboards/ares/info.json new file mode 100644 index 000000000..00911deb9 --- /dev/null +++ b/keyboards/ares/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "LSJ Ares", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"Back space", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"|", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/ares/keymaps/default/keymap.c b/keyboards/ares/keymaps/default/keymap.c new file mode 100644 index 000000000..18e3d30b0 --- /dev/null +++ b/keyboards/ares/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +/* +Copyright 2019 Maarten Dekkers + +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 . +*/ + +#include QMK_KEYBOARD_H + +#define _MA 0 +#define _FN 1 + +#define ______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MA] = LAYOUT( + KC_ESC, 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_BSLS, KC_BSPC, + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTRL), +[_FN] = LAYOUT( + RGB_MOD, BL_TOGG, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, + ______, ______, ______, ______, ______, ______, ______, ______) + +}; diff --git a/keyboards/ares/readme.md b/keyboards/ares/readme.md new file mode 100644 index 000000000..338113a13 --- /dev/null +++ b/keyboards/ares/readme.md @@ -0,0 +1,42 @@ +lSJ Ares +======== + +Keyboard Maintainer: QMK Community +Hardware Supported: LSJ Ares PCB +Hardware Availability: https://geekhack.org/index.php?topic=93146.0 + +Make example for this keyboard (after setting up your build environment): + + make ares:default + +Flashing + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +Windows: +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset by holding the left control key and plugging the cable in. +3. Press the `Find Device` button and ensure that your keyboard is found. +4. Press the `Open .hex File` button and locate the `.hex` file you created. +5. Press the `Flash Device` button and wait for the process to complete. + +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python + brew install pyusb + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + +4. Place your keyboard into reset. +5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. + + +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. diff --git a/keyboards/ares/rules.mk b/keyboards/ares/rules.mk new file mode 100644 index 000000000..cd8edc611 --- /dev/null +++ b/keyboards/ares/rules.mk @@ -0,0 +1,48 @@ +# Copyright 2017 Luiz Ribeiro +# +# 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 . + +# MCU name +MCU = atmega32a +PROTOCOL = VUSB + +# unsupported features for now +NO_SUSPEND_POWER_DOWN = yes + +# processor frequency +F_CPU = 12000000 + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = lite +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = no +RGBLIGHT_CUSTOM_DRIVER = yes +NO_UART = yes + +OPT_DEFS = -DDEBUG_LEVEL=0 + +SRC += i2c_master.c + +# programming options +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/ares/usbconfig.h b/keyboards/ares/usbconfig.h new file mode 100644 index 000000000..89b7ffbaa --- /dev/null +++ b/keyboards/ares/usbconfig.h @@ -0,0 +1,396 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#ifndef __usbconfig_h_included__ +#define __usbconfig_h_included__ + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_MAX_BUS_POWER 500 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'L', 'S', 'J' +#define USB_CFG_VENDOR_NAME_LEN 3 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'A', 'r', 'e', 's' +#define USB_CFG_DEVICE_NAME_LEN 4 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect + +#endif /* __usbconfig_h_included__ */ From fe8c2209ca9172352cb46cc6cf7800e4998849ea Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 25 May 2019 03:05:29 +1000 Subject: [PATCH 118/341] Document MT keycode in keycodes.md --- docs/keycodes.md | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/docs/keycodes.md b/docs/keycodes.md index e9cfd3425..3ff87856e 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -344,23 +344,24 @@ This is a reference only. Each group of keys links to the page documenting their ## [Mod-Tap Keys](feature_advanced_keycodes.md#mod-tap) -|Key |Aliases |Description | -|------------|-----------------------------------------------------------------|-------------------------------------------------------| -|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped | -|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped | -|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped | -|`LGUI_T(kc)`|`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped | -|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped | -|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped | -|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped | -|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | -|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | -|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | -|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped | -|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped | -|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | -|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped| -|`HYPR_T(kc)`|`ALL_T(kc)` |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)| +|Key |Aliases |Description | +|-------------|-----------------------------------------------------------------|-------------------------------------------------------| +|`MT(mod, kc)`| |`mod` when held, `kc` when tapped | +|`LCTL_T(kc)` |`CTL_T(kc)` |Left Control when held, `kc` when tapped | +|`LSFT_T(kc)` |`SFT_T(kc)` |Left Shift when held, `kc` when tapped | +|`LALT_T(kc)` |`ALT_T(kc)` |Left Alt when held, `kc` when tapped | +|`LGUI_T(kc)` |`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped | +|`RCTL_T(kc)` | |Right Control when held, `kc` when tapped | +|`RSFT_T(kc)` | |Right Shift when held, `kc` when tapped | +|`RALT_T(kc)` |`ALGR_T(kc)` |Right Alt when held, `kc` when tapped | +|`RGUI_T(kc)` |`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | +|`SGUI_T(kc)` |`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | +|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | +|`LCAG_T(kc)` | |Left Control, Alt and GUI when held, `kc` when tapped | +|`RCAG_T(kc)` | |Right Control, Alt and GUI when held, `kc` when tapped | +|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | +|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped| +|`HYPR_T(kc)` |`ALL_T(kc)` |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)| ## [RGB Lighting](feature_rgblight.md) From 7fbb253f88b6a87f5d39662273b4d6e57619de53 Mon Sep 17 00:00:00 2001 From: chax Date: Tue, 21 May 2019 12:01:11 +0200 Subject: [PATCH 119/341] Add Solus support to linux_install.sh script --- util/linux_install.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/util/linux_install.sh b/util/linux_install.sh index df7039e09..fb003270b 100755 --- a/util/linux_install.sh +++ b/util/linux_install.sh @@ -6,6 +6,8 @@ GENTOO_WARNING="This script will make a USE change in order to ensure that that SLACKWARE_WARNING="You will need the following packages from slackbuilds.org:\n\tarm-binutils\n\tarm-gcc\n\tavr-binutils\n\tavr-gcc\n\tavr-libc\n\tavrdude\n\tdfu-programmer\n\tdfu-util\n\tnewlib\nThese packages will be installed with sudo and sboinstall, so ensure that your user is added to sudoers and that sboinstall is configured." +SOLUS_INFO="Your tools are now installed. To start using them, open new terminal or source these scripts:\n\t/usr/share/defaults/etc/profile.d/50-arm-toolchain-path.sh\n\t/usr/share/defaults/etc/profile.d/50-avr-toolchain-path.sh" + if grep ID /etc/os-release | grep -qE "fedora"; then sudo dnf install \ arm-none-eabi-binutils-cs \ @@ -155,6 +157,25 @@ elif grep ID /etc/os-release | grep -q slackware; then echo "Quitting..." fi +elif grep ID /etc/os-release | grep -q solus; then + sudo eopkg it \ + -c system.devel \ + arm-none-eabi-gcc \ + arm-none-eabi-binutils \ + arm-none-eabi-newlib \ + avr-libc \ + avr-binutils \ + avr-gcc \ + avrdude \ + dfu-util \ + dfu-programmer \ + python3 \ + git \ + wget \ + zip \ + unzip + printf "\n$SOLUS_INFO\n" + else echo "Sorry, we don't recognize your OS. Help us by contributing support!" echo From 0d12627f0b7fb3ea6438234b775b0c63a656891a Mon Sep 17 00:00:00 2001 From: chax Date: Wed, 22 May 2019 14:08:35 +0200 Subject: [PATCH 120/341] Add Solus support to linux_install.sh script added update-repo command before install command --- util/linux_install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/util/linux_install.sh b/util/linux_install.sh index fb003270b..3df7c0b2a 100755 --- a/util/linux_install.sh +++ b/util/linux_install.sh @@ -158,6 +158,7 @@ elif grep ID /etc/os-release | grep -q slackware; then fi elif grep ID /etc/os-release | grep -q solus; then + sudo eopkg ur sudo eopkg it \ -c system.devel \ arm-none-eabi-gcc \ From 2f961265a147dbf568dcc86fad8123b2d02656bc Mon Sep 17 00:00:00 2001 From: jotix <47826561+jotix@users.noreply.github.com> Date: Sun, 26 May 2019 14:47:54 -0300 Subject: [PATCH 121/341] [Keymap] jotix ortho_4x12 layout change (#5979) * jotix ortho_4x12 layout change * simplifying things * simplifying things --- layouts/community/ortho_4x12/jotix/config.h | 1 - layouts/community/ortho_4x12/jotix/keymap.c | 166 ++------------------ layouts/community/ortho_4x12/jotix/rules.mk | 1 - 3 files changed, 12 insertions(+), 156 deletions(-) delete mode 100644 layouts/community/ortho_4x12/jotix/config.h delete mode 100644 layouts/community/ortho_4x12/jotix/rules.mk diff --git a/layouts/community/ortho_4x12/jotix/config.h b/layouts/community/ortho_4x12/jotix/config.h deleted file mode 100644 index cdc202d5f..000000000 --- a/layouts/community/ortho_4x12/jotix/config.h +++ /dev/null @@ -1 +0,0 @@ -#define UNICODE_SELECTED_MODES UC_LNX diff --git a/layouts/community/ortho_4x12/jotix/keymap.c b/layouts/community/ortho_4x12/jotix/keymap.c index 16120e7d8..cf8c9e9d5 100644 --- a/layouts/community/ortho_4x12/jotix/keymap.c +++ b/layouts/community/ortho_4x12/jotix/keymap.c @@ -2,121 +2,22 @@ extern keymap_config_t keymap_config; -// 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. - enum layers { _QWERTY, _LOWER, _RAISE, - _UNICODE, _ADJUST, }; #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) -#define UNICODE MO(_UNICODE) -enum unicode_names { - AACUTE, - AACUTE_M, - EACUTE, - EACUTE_M, - IACUTE, - IACUTE_M, - OACUTE, - OACUTE_M, - UACUTE, - UACUTE_M, - UDIER, - UDIER_M, - NTILDE, - NTILDE_M, - POUN, - COPY, - ORDF, - ORDM, - QUAD, - CUBE, - DEGR, - QUAR, - HALF, - NOT, - LDQU, - RDQU, - QUES, - EXCL, - ARRL, - ARRU, - ARRR, - ARRD, - EURO, - SMIL, - NEUT, - SMIH, - ANGR, - WORR, - DIZY, - TONG, - DISS, - SCRE, -}; - -const uint32_t PROGMEM unicode_map[] = { - [AACUTE] = 0xe1, // á - [AACUTE_M] = 0xc1, // Á - [EACUTE] = 0xe9, // é - [EACUTE_M] = 0xc9, // É - [IACUTE] = 0xed, // í - [IACUTE_M] = 0xcd, // Í - [OACUTE] = 0xf3, // ó - [OACUTE_M] = 0xd3, // Ó - [UACUTE] = 0xfa, // ú - [UACUTE_M] = 0xda, // Ú - [UDIER] = 0xfc, // ü - [UDIER_M] = 0xdc, // Ü - [NTILDE] = 0xf1, // ñ - [NTILDE_M] = 0xd1, // Ñ - [POUN] = 0xa3, // £ - [COPY] = 0xa9, // © - [ORDF] = 0xaa, // ª - [ORDM] = 0xba, // º - [QUAD] = 0xb2, // ² - [CUBE] = 0xb3, // ³ - [DEGR] = 0xb0, // ° - [QUAR] = 0xbc, // ¼ - [HALF] = 0xbd, // ½ - [NOT] = 0xac, // ¬ - [LDQU] = 0xab, // « - [RDQU] = 0xbb, // » - [QUES] = 0xbf, // ¿ - [EXCL] = 0xa1, // ¡ - [ARRL] = 0x2190, // ← - [ARRU] = 0x2191, // ↑ - [ARRR] = 0x2192, // → - [ARRD] = 0x2193, // ↓ - [EURO] = 0x20ac, // € - [SMIL] = 0x1f603, // 😃 - [NEUT] = 0x1f610, // 😐 - [SMIH] = 0x1f608, // 😈 - [ANGR] = 0x1f620, // 😠 - [WORR] = 0x1f61f, // 😟 - [DIZY] = 0x1f635, // 😵 - [TONG] = 0x1f61d, // 😝 - [DISS] = 0x1f61e, // 😝 - [SCRE] = 0x1f631, // 😱 -}; - -#define A_UNIC XP(AACUTE, AACUTE_M) -#define E_UNIC XP(EACUTE, EACUTE_M) -#define I_UNIC XP(IACUTE, IACUTE_M) -#define O_UNIC XP(OACUTE, OACUTE_M) -#define U_UNIC XP(UACUTE, UACUTE_M) -#define Y_UNIC XP(UDIER, UDIER_M ) -#define N_UNIC XP(NTILDE, NTILDE_M) -#define ORD_UN XP(ORDF, ORDM) +#define FN_LAYER LAYOUT_ortho_4x12 (\ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,\ + KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,\ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TILD, _______, _______, _______, _______,\ + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END\ +), const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -124,65 +25,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * | esc | Q | W | E | R | T | Y | U | I | O | P | bksp | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | tab | A | S | D | F | G | H | J | K | L | ; | del | + * | tab | A | S | D | F | G | H | J | K | L | ; | ' | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * | lshift | Z | X | C | V | B | N | M | , | . | / | enter | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | lctrl | lalt | lower | unic | lgui | space | space | raise | left | down | up | right | + * | lctrl | lgui | lalt | ralt | lower | space | space | raise | left | down | up | right | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ */ [_QWERTY] = LAYOUT_ortho_4x12 ( 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_DEL, + 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_ENT, - KC_LCTL, KC_LALT, LOWER, UNICODE, KC_LGUI, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + KC_LCTL, KC_LGUI, KC_LALT, KC_RALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), -/* Lower - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | F1 | F2 | F3 | F4 | | | 7 | 8 | 9 | - | | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | F5 | F6 | F7 | F8 | | | 4 | 5 | 6 | + | | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | F9 | F10 | F11 | F12 | | nlck | 1 | 2 | 3 | / | pent | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | | | | | | | | 0 | . | * | ; | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - */ -[_LOWER] = LAYOUT_ortho_4x12 ( - _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, - _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, - _______, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_NLCK, KC_P1, KC_P2, KC_P3, KC_PSLS, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PAST, KC_SCLN -), +[_LOWER] = FN_LAYER -/* Raise - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | caps | | | | | | \ | - | = | [ | ] | | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | | | | | | ` | | | | | | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | | | | | | | | home | pgdn | pgup | end | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - */ -[_RAISE] = LAYOUT_ortho_4x12 ( - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - KC_CAPS, _______, _______, _______, _______, _______, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, - _______, _______, _______, _______, _______, _______, KC_GRV, KC_QUOT, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END -), - -/* - * unicode - */ -[_UNICODE] = LAYOUT_ortho_4x12 ( - _______, X(EXCL), X(WORR), E_UNIC, X(EURO), X(TONG), Y_UNIC, U_UNIC, I_UNIC, O_UNIC, X(POUN), _______, - _______, A_UNIC, X(SMIL), X(DISS), X(SCRE), X(DEGR), X(SMIH), X(NOT), X(QUAR), X(HALF), ORD_UN, _______, - _______, X(DIZY), X(ANGR), X(COPY), X(QUAD), X(CUBE), N_UNIC, X(NEUT), X(LDQU), X(RDQU), X(QUES), _______, - _______, _______, _______, _______, _______, _______, _______, _______, X(ARRU), X(ARRL), X(ARRD), X(ARRR) -), +[_RAISE] = FN_LAYER /* * Adjust @@ -201,4 +60,3 @@ uint32_t layer_state_set_user(uint32_t state) { void matrix_init_user(void) { } - diff --git a/layouts/community/ortho_4x12/jotix/rules.mk b/layouts/community/ortho_4x12/jotix/rules.mk deleted file mode 100644 index 502b2def7..000000000 --- a/layouts/community/ortho_4x12/jotix/rules.mk +++ /dev/null @@ -1 +0,0 @@ -UNICODEMAP_ENABLE = yes From df73a81db8d21af8c2ac45229eb7873787312d6a Mon Sep 17 00:00:00 2001 From: Kyle Terry Date: Sun, 26 May 2019 13:05:42 -0700 Subject: [PATCH 122/341] [Keyboard] adds spacetime keyboard (#5969) * adds spacetime keyboard * removes custom tap and mod functions this commit replaces tap_key, control_key and shift_key with built-in tap_code16. * changes thumb layer and makes left palm key ralt --- keyboards/spacetime/config.h | 245 ++++++++++++++++++ keyboards/spacetime/info.json | 68 +++++ keyboards/spacetime/keymaps/default/config.h | 19 ++ keyboards/spacetime/keymaps/default/keymap.c | 85 ++++++ keyboards/spacetime/keymaps/default/readme.md | 1 + .../spacetime/keymaps/kyleterry/keymap.c | 151 +++++++++++ .../spacetime/keymaps/kyleterry/rules.mk | 1 + keyboards/spacetime/readme.md | 6 + keyboards/spacetime/rev1/rev1.c | 40 +++ keyboards/spacetime/rev1/rev1.h | 48 ++++ keyboards/spacetime/rev1/rules.mk | 1 + keyboards/spacetime/rev2/rev2.c | 44 ++++ keyboards/spacetime/rev2/rev2.h | 48 ++++ keyboards/spacetime/rev2/rules.mk | 1 + keyboards/spacetime/rules.mk | 86 ++++++ keyboards/spacetime/spacetime.c | 1 + keyboards/spacetime/spacetime.h | 11 + 17 files changed, 856 insertions(+) create mode 100644 keyboards/spacetime/config.h create mode 100644 keyboards/spacetime/info.json create mode 100644 keyboards/spacetime/keymaps/default/config.h create mode 100644 keyboards/spacetime/keymaps/default/keymap.c create mode 100644 keyboards/spacetime/keymaps/default/readme.md create mode 100644 keyboards/spacetime/keymaps/kyleterry/keymap.c create mode 100644 keyboards/spacetime/keymaps/kyleterry/rules.mk create mode 100644 keyboards/spacetime/readme.md create mode 100644 keyboards/spacetime/rev1/rev1.c create mode 100644 keyboards/spacetime/rev1/rev1.h create mode 100644 keyboards/spacetime/rev1/rules.mk create mode 100644 keyboards/spacetime/rev2/rev2.c create mode 100644 keyboards/spacetime/rev2/rev2.h create mode 100644 keyboards/spacetime/rev2/rules.mk create mode 100644 keyboards/spacetime/rules.mk create mode 100644 keyboards/spacetime/spacetime.c create mode 100644 keyboards/spacetime/spacetime.h diff --git a/keyboards/spacetime/config.h b/keyboards/spacetime/config.h new file mode 100644 index 000000000..26eb8dd26 --- /dev/null +++ b/keyboards/spacetime/config.h @@ -0,0 +1,245 @@ +/* +Copyright 2019 Kyle Terry + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0A0C +#define DEVICE_VER 0x4A1F +#define MANUFACTURER Kyle Terry +#define PRODUCT spacetime +#define DESCRIPTION A split ortho keyboard with a 30 degree thumb cluster and support for oled + +/* key matrix size */ +#define MATRIX_ROWS 4*2 +#define MATRIX_COLS 7 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D4, C6, D7, E6 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +#define USE_SERIAL + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/spacetime/info.json b/keyboards/spacetime/info.json new file mode 100644 index 000000000..3cb4414ed --- /dev/null +++ b/keyboards/spacetime/info.json @@ -0,0 +1,68 @@ +{ + "keyboard_name": "spacetime", + "url": "https://github.com/kyleterry/spacetime-keyboard", + "maintainer": "qmk", + "width": 14, + "height": 4, + "layouts": { + "LAYOUT": { + "key_count": 50, + "layout": [ + {"label":"L00", "x":0, "y":0}, + {"label":"L01", "x":1, "y":0}, + {"label":"L02", "x":2, "y":0}, + {"label":"L03", "x":3, "y":0}, + {"label":"L04", "x":4, "y":0}, + {"label":"L05", "x":5, "y":0}, + {"label":"L06", "x":6, "y":0}, + {"label":"R00", "x":7, "y":0}, + {"label":"R01", "x":8, "y":0}, + {"label":"R02", "x":9, "y":0}, + {"label":"R03", "x":10, "y":0}, + {"label":"R04", "x":11, "y":0}, + {"label":"R05", "x":12, "y":0}, + {"label":"R06", "x":13, "y":0}, + + {"label":"L10", "x":0, "y":1}, + {"label":"L11", "x":1, "y":1}, + {"label":"L12", "x":2, "y":1}, + {"label":"L13", "x":3, "y":1}, + {"label":"L14", "x":4, "y":1}, + {"label":"L15", "x":5, "y":1}, + {"label":"L16", "x":6, "y":1}, + {"label":"R10", "x":7, "y":1}, + {"label":"R11", "x":8, "y":1}, + {"label":"R12", "x":9, "y":1}, + {"label":"R13", "x":10, "y":1}, + {"label":"R14", "x":11, "y":1}, + {"label":"R15", "x":12, "y":1}, + {"label":"R16", "x":13, "y":1}, + + {"label":"L20", "x":0, "y":2}, + {"label":"L21", "x":1, "y":2}, + {"label":"L22", "x":2, "y":2}, + {"label":"L23", "x":3, "y":2}, + {"label":"L24", "x":4, "y":2}, + {"label":"L25", "x":5, "y":2}, + {"label":"L26", "x":6, "y":2}, + {"label":"R20", "x":7, "y":2}, + {"label":"R21", "x":8, "y":2}, + {"label":"R22", "x":9, "y":2}, + {"label":"R23", "x":10, "y":2}, + {"label":"R24", "x":11, "y":2}, + {"label":"R25", "x":12, "y":2}, + {"label":"R26", "x":13, "y":2}, + + {"label":"L30", "x":0, "y":3, "w":1}, + {"label":"L34", "x":4, "y":3, "w":1}, + {"label":"L35", "x":5, "y":3, "w":2}, + {"label":"L36", "x":6, "y":3, "w":2}, + {"label":"R30", "x":7, "y":3, "w":2}, + {"label":"R31", "x":8, "y":3, "w":2}, + {"label":"R32", "x":9, "y":3, "w":1}, + {"label":"R36", "x":13, "y":3, "w":1} + ] + } + } +} + diff --git a/keyboards/spacetime/keymaps/default/config.h b/keyboards/spacetime/keymaps/default/config.h new file mode 100644 index 000000000..26a960039 --- /dev/null +++ b/keyboards/spacetime/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Kyle Terry + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/spacetime/keymaps/default/keymap.c b/keyboards/spacetime/keymaps/default/keymap.c new file mode 100644 index 000000000..ac2f5098f --- /dev/null +++ b/keyboards/spacetime/keymaps/default/keymap.c @@ -0,0 +1,85 @@ +/* Copyright 2019 Kyle Terry + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +enum layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +/* layer template: + * [_LAYER] = LAYOUT( + * _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + * _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + * _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + * _______, _______, _______, _______, _______, _______, _______, _______ + * ), + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LCTL, KC_RCTL, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LALT, KC_RALT, 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_LGUI, KC_APP, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LCTL, KC_LGUI, KC_SPC, LOWER, RAISE, KC_SPC, KC_RGUI, KC_RCTL + ), + + [_LOWER] = LAYOUT( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MNXT, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT( + _______, _______, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, KC_INS, _______, KC_PSCR, _______, + _______, KC_HOME, KC_PGDN, KC_END, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/spacetime/keymaps/default/readme.md b/keyboards/spacetime/keymaps/default/readme.md new file mode 100644 index 000000000..bcc95f4b7 --- /dev/null +++ b/keyboards/spacetime/keymaps/default/readme.md @@ -0,0 +1 @@ +# Spacetime Default Keymap diff --git a/keyboards/spacetime/keymaps/kyleterry/keymap.c b/keyboards/spacetime/keymaps/kyleterry/keymap.c new file mode 100644 index 000000000..32fbab5e0 --- /dev/null +++ b/keyboards/spacetime/keymaps/kyleterry/keymap.c @@ -0,0 +1,151 @@ +/* Copyright 2019 Kyle Terry + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define NUM MO(_NUM) +#define CTL_ESC CTL_T(KC_ESC) +#define OS_LGUI OSM (MOD_LGUI) +#define SGAME TO(_GAMING) +#define SQWER TO(_QWERTY) + +enum layers { + _QWERTY, + _GAMING, + _LOWER, + _RAISE, + _ADJUST, + _NUM +}; + +enum { + /* tap dance for raise and lower layer switching */ + TD_RL = 0, + /* tap dance for common cording */ + TD_C = 1, + /* tap dance for media keys */ + TD_MD = 2, +}; + +/* layer template: + * [_LAYER] = LAYOUT( + * _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + * _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + * _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + * _______, _______, _______, _______, _______, _______, _______, _______ + * ), + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LCTL, TD(TD_C),KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LALT, KC_ENT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, NUM, OS_LGUI, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, OS_LGUI, KC_SPC, LOWER, RAISE, KC_SPC, OS_LGUI, KC_RALT + ), + + [_GAMING] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LCTL, TD(TD_C),KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_ESC, KC_ENT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, NUM, OS_LGUI, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LALT, KC_V, KC_SPC, LOWER, RAISE, KC_SPC, OS_LGUI, KC_RALT + ), + + [_LOWER] = LAYOUT( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_LPRN, KC_RPRN, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, _______, _______, _______, _______, TD(TD_MD), KC_MNXT, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT( + _______, _______, KC_PGUP, _______, _______, _______, SQWER, _______, _______, _______, KC_INS, _______, KC_PSCR, _______, + _______, KC_HOME, KC_PGDN, KC_END, _______, _______, SGAME, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_NUM] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_ASTR, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, KC_MINS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOT, KC_1, KC_2, KC_3, KC_PLUS, + _______, _______, _______, _______, _______, _______, _______, KC_0 + ) +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} + +void td_common(qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: + /* this case handles ctrl+o which is my tmux prefix + */ + tap_code16(C(KC_O)); + reset_tap_dance(state); + break; + case 2: + /* this case handles shift+insert which is a common way + * for me to paste text in linux + */ + tap_code16(S(KC_INS)); + reset_tap_dance(state); + break; + } +} + +void td_media(qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: + tap_code16(KC_MPLY); + reset_tap_dance(state); + break; + case 2: + tap_code16(KC_MUTE); + reset_tap_dance(state); + break; + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_C] = ACTION_TAP_DANCE_FN(td_common), + [TD_MD] = ACTION_TAP_DANCE_FN(td_media), +}; diff --git a/keyboards/spacetime/keymaps/kyleterry/rules.mk b/keyboards/spacetime/keymaps/kyleterry/rules.mk new file mode 100644 index 000000000..31e0fcf29 --- /dev/null +++ b/keyboards/spacetime/keymaps/kyleterry/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE=yes diff --git a/keyboards/spacetime/readme.md b/keyboards/spacetime/readme.md new file mode 100644 index 000000000..94108baa2 --- /dev/null +++ b/keyboards/spacetime/readme.md @@ -0,0 +1,6 @@ +# Spacetime Keyboard + +A small split-design ortholinear board with a 30 degree thumb cluster and +a breakaway palm key on each side. + +PCB can be found on [GitHub](https://github.com/kyleterry/spacetime-keyboard) diff --git a/keyboards/spacetime/rev1/rev1.c b/keyboards/spacetime/rev1/rev1.c new file mode 100644 index 000000000..6fde622c2 --- /dev/null +++ b/keyboards/spacetime/rev1/rev1.c @@ -0,0 +1,40 @@ +/* Copyright 2019 Kyle Terry + * + * 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 . + */ +#include "rev1.h" + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + return process_record_user(keycode, record); +} + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/spacetime/rev1/rev1.h b/keyboards/spacetime/rev1/rev1.h new file mode 100644 index 000000000..dd5420456 --- /dev/null +++ b/keyboards/spacetime/rev1/rev1.h @@ -0,0 +1,48 @@ +/* Copyright 2019 Kyle Terry + * + * 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 . + */ +#pragma once + +#include "quantum.h" +#define ___ KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L34, L35, L36, R30, R31, R32, R36 \ +) { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, ___, ___, ___, L34, L35, L36 }, \ +\ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, ___, ___, ___, R32, R31, R30 } \ +} + +#ifdef USE_I2C + #error "I2C not Supported" +#endif diff --git a/keyboards/spacetime/rev1/rules.mk b/keyboards/spacetime/rev1/rules.mk new file mode 100644 index 000000000..b595964f7 --- /dev/null +++ b/keyboards/spacetime/rev1/rules.mk @@ -0,0 +1 @@ +OLED_DRIVER_ENABLE = no diff --git a/keyboards/spacetime/rev2/rev2.c b/keyboards/spacetime/rev2/rev2.c new file mode 100644 index 000000000..6b62c071e --- /dev/null +++ b/keyboards/spacetime/rev2/rev2.c @@ -0,0 +1,44 @@ +/* Copyright 2019 Kyle Terry + * + * 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 . + */ +#include "rev2.h" + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { +#ifdef SSD1306OLED + return process_record_gfx(keycode,record) && process_record_user(keycode, record); +#else + return process_record_user(keycode, record); +#endif +} + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/spacetime/rev2/rev2.h b/keyboards/spacetime/rev2/rev2.h new file mode 100644 index 000000000..dd5420456 --- /dev/null +++ b/keyboards/spacetime/rev2/rev2.h @@ -0,0 +1,48 @@ +/* Copyright 2019 Kyle Terry + * + * 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 . + */ +#pragma once + +#include "quantum.h" +#define ___ KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L34, L35, L36, R30, R31, R32, R36 \ +) { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, ___, ___, ___, L34, L35, L36 }, \ +\ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, ___, ___, ___, R32, R31, R30 } \ +} + +#ifdef USE_I2C + #error "I2C not Supported" +#endif diff --git a/keyboards/spacetime/rev2/rules.mk b/keyboards/spacetime/rev2/rules.mk new file mode 100644 index 000000000..c58266213 --- /dev/null +++ b/keyboards/spacetime/rev2/rules.mk @@ -0,0 +1 @@ +OLED_DRIVER_ENABLE = yes diff --git a/keyboards/spacetime/rules.mk b/keyboards/spacetime/rules.mk new file mode 100644 index 000000000..62e8f9955 --- /dev/null +++ b/keyboards/spacetime/rules.mk @@ -0,0 +1,86 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +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 +# 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +OLED_DRIVER_ENABLE = no + +# Enable generic behavior for split boards +SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = spacetime/rev1 diff --git a/keyboards/spacetime/spacetime.c b/keyboards/spacetime/spacetime.c new file mode 100644 index 000000000..7db11f1bc --- /dev/null +++ b/keyboards/spacetime/spacetime.c @@ -0,0 +1 @@ +#include "spacetime.h" diff --git a/keyboards/spacetime/spacetime.h b/keyboards/spacetime/spacetime.h new file mode 100644 index 000000000..0235c2b25 --- /dev/null +++ b/keyboards/spacetime/spacetime.h @@ -0,0 +1,11 @@ +#pragma once + +#ifdef KEYBOARD_spacetime_rev1 + #include "rev1.h" +#endif + +#ifdef KEYBOARD_spacetime_rev2 + #include "rev2.h" +#endif + +#include "quantum.h" From 6c7c178cd2b9d535e76a0cd9dd3d1293b8ba1ed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Ark?= Date: Mon, 27 May 2019 05:36:24 +0200 Subject: [PATCH 123/341] =?UTF-8?q?[Keymap]=20Added=20french=20B=C3=A9po?= =?UTF-8?q?=20support=20on=20Ergo42=20keeb=20(#5986)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added french Bépo support on Ergo42 keeb * Fixed some typos * Removed a unused include --- keyboards/ergo42/keymaps/shinze/config.h | 33 ++++++++++++++++++++ keyboards/ergo42/keymaps/shinze/keymap.c | 39 ++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 keyboards/ergo42/keymaps/shinze/config.h create mode 100644 keyboards/ergo42/keymaps/shinze/keymap.c diff --git a/keyboards/ergo42/keymaps/shinze/config.h b/keyboards/ergo42/keymaps/shinze/config.h new file mode 100644 index 000000000..360d6a562 --- /dev/null +++ b/keyboards/ergo42/keymaps/shinze/config.h @@ -0,0 +1,33 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + diff --git a/keyboards/ergo42/keymaps/shinze/keymap.c b/keyboards/ergo42/keymaps/shinze/keymap.c new file mode 100644 index 000000000..4f4247deb --- /dev/null +++ b/keyboards/ergo42/keymaps/shinze/keymap.c @@ -0,0 +1,39 @@ +#include QMK_KEYBOARD_H +#include "keymap_bepo.h" +#include "keymap_french.h" + +extern keymap_config_t keymap_config; + +#define BASE 0 +#define NUMB 1 +#define SHORT 2 + +// Special keys +#define COPY RGUI(BP_C) +#define PASTE RGUI(BP_V) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [BASE] = LAYOUT( \ + KC_TAB, BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV, KC_ESC, KC_BSPC, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, \ + BP_W, BP_A, BP_U, BP_I, BP_E, BP_COMM, _______, _______, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, \ + KC_LSFT, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, _______, _______, BP_APOS, BP_Q, BP_G, BP_H, BP_F, BP_CCED, \ + MO(SHORT), KC_LCTL, _______, KC_LALT, KC_LGUI, KC_SPC, MO(NUMB), KC_RGUI, KC_RSFT, KC_SPC, _______, _______, _______, _______ \ + ), + + [NUMB] = LAYOUT( \ + BP_HASH, BP_DQOT, BP_LDQT, BP_RDQT, BP_LPRN, BP_RPRN, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, BP_PERC, KC_BSPC, \ + BP_DLR, BP_1, BP_2, BP_3, BP_4, BP_5, KC_LBRC, KC_RBRC, BP_6, BP_7, BP_8, BP_9, BP_0, BP_DEGR, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [SHORT] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, COPY, PASTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ) + +}; + From a23c3396a9a1e4aed8020c47e7dc8f2624085017 Mon Sep 17 00:00:00 2001 From: M-AS Date: Tue, 28 May 2019 06:58:45 +0700 Subject: [PATCH 124/341] [Keymap] Updated personal keymaps (#5993) * added personal CTRL keymap * added personal dz60rgb keymap * enabled new rgb effect * added space cadet shift * media player track buttons now orange * updated keymaps with rgb setting and visual HSV setting preview * fixed source stuff? * added support for underglow toggle (bugged to all hell) * everything now behaves as expected when ti comes to RGB toggles, thank god * removed ifdefs * changed color of MAS_CRM * uh, whitespace * changed rgb positions and modifiers within RGB matrix thing for CTRL and DZ60RGB * updated keymap to work kindof * KEYMAP: changed list of rgb effects * changed CTRL rgb defaults * KEYMAP: new LED layout for ctrl --- .../dz60rgb/keymaps/matthewrobo/config.h | 22 +++-- .../ctrl/keymaps/matthewrobo/config.h | 23 ++++-- .../ctrl/keymaps/matthewrobo/config_led.c | 82 +++++++++++++++++++ .../ctrl/keymaps/matthewrobo/keymap.c | 13 +-- .../ctrl/keymaps/matthewrobo/rules.mk | 1 + 5 files changed, 121 insertions(+), 20 deletions(-) create mode 100644 keyboards/massdrop/ctrl/keymaps/matthewrobo/config_led.c diff --git a/keyboards/dztech/dz60rgb/keymaps/matthewrobo/config.h b/keyboards/dztech/dz60rgb/keymaps/matthewrobo/config.h index b6fb08dc1..7166bf70b 100644 --- a/keyboards/dztech/dz60rgb/keymaps/matthewrobo/config.h +++ b/keyboards/dztech/dz60rgb/keymaps/matthewrobo/config.h @@ -9,22 +9,35 @@ #undef DISABLE_RGB_MATRIX_MULTISPLASH #undef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +// #define DISABLE_RGB_MATRIX_SOLID_COLOR // #define DISABLE_RGB_MATRIX_ALPHAS_MODS -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#define DISABLE_RGB_MATRIX_BREATHING +// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +// #define DISABLE_RGB_MATRIX_BREATHING +#define DISABLE_RGB_MATRIX_BAND_SAT +// #define DISABLE_RGB_MATRIX_BAND_VAL +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL #define DISABLE_RGB_MATRIX_CYCLE_ALL #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -// #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN +#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL +// #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL #define DISABLE_RGB_MATRIX_DUAL_BEACON #define DISABLE_RGB_MATRIX_RAINBOW_BEACON #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS #define DISABLE_RGB_MATRIX_RAINDROPS #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP #define DISABLE_RGB_MATRIX_DIGITAL_RAIN -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS @@ -40,7 +53,6 @@ // #define RGB_MATRIX_KEYRELEASES - // some speed shit #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h index 35fd44619..4ee767cdd 100644 --- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h @@ -5,21 +5,35 @@ #define PERMISSIVE_HOLD #define TAPPING_TERM 150 +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS + +// #define DISABLE_RGB_MATRIX_SOLID_COLOR // #define DISABLE_RGB_MATRIX_ALPHAS_MODS -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#define DISABLE_RGB_MATRIX_BREATHING +// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +// #define DISABLE_RGB_MATRIX_BREATHING +#define DISABLE_RGB_MATRIX_BAND_SAT +// #define DISABLE_RGB_MATRIX_BAND_VAL +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL #define DISABLE_RGB_MATRIX_CYCLE_ALL #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -// #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN +#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL +// #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL #define DISABLE_RGB_MATRIX_DUAL_BEACON #define DISABLE_RGB_MATRIX_RAINBOW_BEACON #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS #define DISABLE_RGB_MATRIX_RAINDROPS #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP #define DISABLE_RGB_MATRIX_DIGITAL_RAIN -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS @@ -35,7 +49,6 @@ // #define RGB_MATRIX_KEYRELEASES - // some speed shit #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config_led.c b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config_led.c new file mode 100644 index 000000000..448793cf5 --- /dev/null +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config_led.c @@ -0,0 +1,82 @@ +#ifdef RGB_MATRIX_ENABLE +#include "ctrl.h" + +#include "led_matrix.h" +#include "rgb_matrix.h" +#include "config_led.h" + +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6, 7 }, + { 16, 17, 18, 19, 20, 21, 22, 23 }, + { 33, 34, 35, 36, 37, 38, 39, 40 }, + { 50, 51, 52, 53, 54, 55, 56, 57 }, + { 63, 64, 65, 66, 67, 68, 69, 70 }, + { 76, 77, 78, 79, 80, 81, 82, 83 }, + { 8, 9, 10, 11, 12, 13, 14, 15 }, + { 24, 25, 26, 27, 28, 29, 30, 31 }, + { 41, 42, 43, 44, 45, 46, 47, 48 }, + { 58, 59, 60, 61, 62, 75, 49, 32 }, + { 71, 72, 73, 74, 84, 85, 86, NO_LED } +}, { + // KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS + { 7, 5 }, { 31, 5 }, { 43, 5 }, { 55, 5 }, { 67, 5 }, { 85, 5 }, { 97, 5 }, { 109, 5 }, + { 121, 5 }, { 139, 5 }, { 151, 5 }, { 163, 5 }, { 175, 5 }, { 193, 5 }, { 205, 5 }, { 217, 5 }, + // KC_GRV, 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_INS, KC_HOME, KC_PGUP + { 7, 20 }, { 19, 20 }, { 31, 20 }, { 43, 20 }, { 55, 20 }, { 67, 20 }, { 79, 20 }, { 91, 20 }, + { 103, 20 }, { 115, 20 }, { 127, 20 }, { 139, 20 }, { 151, 20 }, { 169, 20 }, { 193, 20 }, { 205, 20 }, + { 217, 20 }, + // 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_DEL, KC_END, KC_PGDN + { 10, 30 }, { 25, 30 }, { 37, 30 }, { 49, 30 }, { 61, 30 }, { 73, 30 }, { 85, 30 }, { 97, 30 }, + { 109, 30 }, { 121, 30 }, { 133, 30 }, { 145, 30 }, { 157, 30 }, { 172, 30 }, { 193, 30 }, { 205, 30 }, + { 217, 30 }, + // KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT + { 11, 39 }, { 28, 39 }, { 40, 39 }, { 52, 39 }, { 64, 39 }, { 76, 39 }, { 88, 39 }, { 100, 39 }, + { 112, 39 }, { 124, 39 }, { 136, 39 }, { 148, 39 }, { 168, 39 }, + // 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_UP + { 14, 49 }, { 34, 49 }, { 46, 49 }, { 58, 49 }, { 70, 49 }, { 82, 49 }, { 94, 49 }, { 106, 49 }, + { 118, 49 }, { 130, 49 }, { 142, 49 }, { 165, 49 }, { 205, 49 }, + // KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + { 8, 59 }, { 23, 59 }, { 38, 59 }, { 83, 59 }, { 129, 59 }, { 144, 59 }, { 159, 59 }, { 174, 59 }, + { 193, 59 }, { 205, 59 }, { 217, 59 }, + // Underglow / Border + { 224, 64 }, { 204, 64 }, { 186, 64 }, { 167, 64 }, { 149, 64 }, { 130, 64 }, { 112, 64 }, { 94, 64 }, + { 75, 64 }, { 57, 64 }, { 38, 64 }, { 20, 64 }, { 0, 64 }, { 0, 47 }, { 0, 32 }, { 0, 17 }, + { 0, 0 }, { 20, 0 }, { 38, 0 }, { 57, 0 }, { 75, 0 }, { 94, 0 }, { 112, 0 }, { 130, 0 }, + { 149, 0 }, { 167, 0 }, { 186, 0 }, { 204, 0 }, { 224, 0 }, { 224, 17 }, { 224, 32 }, { 224, 47 } +}, { + // KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS + 1, 4, 4, 4, 4, 1, 1, 1, + 1, 4, 4, 4, 4, 1, 1, 1, + // KC_GRV, 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_INS, KC_HOME, KC_PGUP + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 1, 1, 1, + 1, + // 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_DEL, KC_END, KC_PGDN + 1, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 1, 1, + 1, + // KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT + 1, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 1, + // 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_UP + 1, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 1, 1, + // KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + 1, 1, 1, 4, 1, 1, 1, 1, + 1, 1, 1, + // Underglow / Border + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2 +} }; + + +#ifdef USB_LED_INDICATOR_ENABLE +void rgb_matrix_indicators_kb(void) +{ + led_matrix_indicators(); +} +#endif // USB_LED_INDICATOR_ENABLE + +#endif diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c b/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c index 2823292e6..112be66d6 100644 --- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c @@ -80,14 +80,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; -void set_color_helper(int index, uint8_t red, uint8_t green, uint8_t blue) -{ - if (!HAS_ANY_FLAGS(g_rgb_leds[index].flags, rgb_matrix_get_flags())) - { return; } - - rgb_matrix_set_color(index, red, green, blue); -} void rgb_matrix_indicators_user(void) { @@ -225,8 +217,9 @@ void rgb_matrix_indicators_user(void) void matrix_init_user(void) { autoshift_disable(); - rgb_matrix_sethsv(192, 112, 255); - rgb_matrix_mode(4); + rgb_matrix_sethsv(128, 255, 255); + // rgb_matrix_sethsv(192, 112, 255); + // rgb_matrix_mode(4); }; // Runs constantly in the background, in a loop. diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/rules.mk b/keyboards/massdrop/ctrl/keymaps/matthewrobo/rules.mk index 4fb7826ce..063d135a0 100644 --- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/rules.mk +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/rules.mk @@ -1,2 +1,3 @@ NKRO_ENABLE = yes # USB Nkey Rollover AUTO_SHIFT_ENABLE = yes # Auto Shift +SRC += config_led.c From 5aa4420f59907d4a6192b590fd5e9dfb1e295525 Mon Sep 17 00:00:00 2001 From: Tyler Wince Date: Mon, 27 May 2019 20:28:37 -0700 Subject: [PATCH 125/341] [Keymap] Add lets_split keymap (#5992) * tylerwince keymap added * modifications for PR * remove legacy import * fix some build errors * fix layers * restore custom_keycodes * remove trailing commas * change persistent layer function * update light noeeprom * layer state set user * missing trailing " * changes to single_default_layer --- .../lets_split/keymaps/tylerwince/config.h | 40 +++ .../lets_split/keymaps/tylerwince/keymap.c | 239 ++++++++++++++++++ .../lets_split/keymaps/tylerwince/rules.mk | 2 + 3 files changed, 281 insertions(+) create mode 100644 keyboards/lets_split/keymaps/tylerwince/config.h create mode 100644 keyboards/lets_split/keymaps/tylerwince/keymap.c create mode 100644 keyboards/lets_split/keymaps/tylerwince/rules.mk diff --git a/keyboards/lets_split/keymaps/tylerwince/config.h b/keyboards/lets_split/keymaps/tylerwince/config.h new file mode 100644 index 000000000..6fff5478d --- /dev/null +++ b/keyboards/lets_split/keymaps/tylerwince/config.h @@ -0,0 +1,40 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +//#define MASTER_RIGHT +// #define EE_HANDS + +#undef RGBLED_NUM +#define RGBLED_NUM 12 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + diff --git a/keyboards/lets_split/keymaps/tylerwince/keymap.c b/keyboards/lets_split/keymaps/tylerwince/keymap.c new file mode 100644 index 000000000..c781513c4 --- /dev/null +++ b/keyboards/lets_split/keymaps/tylerwince/keymap.c @@ -0,0 +1,239 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum layer_names { + _QWERTY = 0, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, + SH_GOUP, +}; + +//Tap Dance Declarations +enum { + TD_SEMI_COLON, +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_SEMI_COLON] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_COLN), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * ,------------------------------------------ ------------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | BSPC | + * |------+------+------+------+------+------- -------+------+------+------+------+------| + * |CTL/Es| A | S | D | F | G | | H | J | K | L | ; | " | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | Z | X | C | V | B | | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+ +------+------+------+------+------+------| + * |Things|1PASS | alt | CMD |Lower |Space | |Space |Raise | Next | Vol- | Vol+ | Play | + * `------------------------------------------ ------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, TD(TD_SEMI_COLON), 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_ENT , + RALT(KC_SPC), RGUI(KC_BSLS), KC_LALT, KC_LCMD, LOWER, KC_SPC, KC_SPC, RAISE, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Colemak + * ,------------------------------------------ ------------------------------------------. + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+------- -------+------+------+------+------+------| + * |CTL/Es| A | R | S | T | D | | H | N | E | I | O | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | Z | X | C | V | B | | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+ +------+------+------+------+------+------| + * |Things|1PASS | alt | CMD |Lower |Space | |Space |Raise | Next | Vol- | Vol+ | Play | + * `------------------------------------------ ------------------------------------------' + */ +[_COLEMAK] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, TD(TD_SEMI_COLON), KC_BSPC, + CTL_T(KC_ESC), 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_ENT , + RALT(KC_SPC), RGUI(KC_BSLS), KC_LALT, KC_LCMD, LOWER, KC_SPC, KC_SPC, RAISE, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Dvorak + * ,------------------------------------------ ------------------------------------------. + * | Tab | ' | , | . | P | Y | | F | G | C | R | L | Bksp | + * |------+------+------+------+------+------- -------+------+------+------+------+------| + * |CTL/Es| A | O | E | U | I | | D | H | T | N | S | / | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | ; | Q | J | K | X | | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+ +------+------+------+------+------+------| + * |Things|1PASS | alt | CMD |Lower |Space | |Space |Raise | Next | Vol- | Vol+ | Play | + * `------------------------------------------ ------------------------------------------' + */ +[_DVORAK] = LAYOUT_ortho_4x12( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + CTL_T(KC_ESC), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, TD(TD_SEMI_COLON), KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , + RALT(KC_SPC), RGUI(KC_BSLS), KC_LALT, KC_LCMD, LOWER, KC_SPC, KC_SPC, RAISE, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Lower + * ,------------------------------------------ ------------------------------------------. + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+------- -------+------+------+------+------+------| + * | F1 | F2 | F3 | F4 | F5 | F6 | | | _ | + | { | } | | | + * +------+------+------+------+------|------+ |------+------+------+------+------+------| + * | F7 | F8 | F9 | F10 | F11 | F12 | | | - | = | [ | ] | | + * |------+------+------+------+------+------+ +------+------+------+------+------+------| + * |Things|1PASS | alt | CMD |Lower |Space | |Space |Raise | Next | Vol- | Vol+ | Play | + * `------------------------------------------ ------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + RALT(KC_SPC), RGUI(KC_BSLS), KC_LALT, KC_LCMD, LOWER, KC_SPC, KC_SPC, RAISE, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,------------------------------------------ ------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------- -------+------+------+------+------+------| + * | Del | | | | | | | LEFT | DOWN | UP |RIGHT | | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+ +------+------+------+------+------+------| + * |Things|1PASS | alt | CMD |Lower |Space | |Space |Raise | Next | Vol- | Vol+ | Play | + * `------------------------------------------ ------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_DEL, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RALT(KC_SPC), RGUI(KC_BSLS), KC_LALT, KC_LCMD, LOWER, KC_SPC, KC_SPC, RAISE, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,------------------------------------------ ------------------------------------------. + * | | Reset| | | | | | |Qwerty|Colemk|Dvorak|WTLEFT|WTRGHT| + * |------+------+------+------+------+------- -------+------+------+------+------+------| + * | | |Aud on|Audoff|AGnorm|AGswap| |WLEFT |WDOWN | WUP |WRGHT |WBLEFT|WBRGHT| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | |RGBsUP|RGBsDN|RGBvUP|RGBvDN|WFULL | + * |------+------+------+------+------+------+ +------+------+------+------+------+------| + * | | | | | | | | | |RGBwav|RGBfla|RGBtog| | + * `------------------------------------------ ------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( + _______, RESET, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, LCA(KC_7), LCA(KC_8), + _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, LCA(KC_H), LCA(KC_J), LCA(KC_K), LCA(KC_L), LCA(KC_U), LCA(KC_I), + _______, _______, _______, _______, _______, _______, _______, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, LCA(KC_ENT), + _______, _______, _______, _______, _______, _______, _______, _______, RGB_M_K, RGB_M_B, RGB_TOG, _______ +) + + +}; + +void keyboard_post_init_user(void) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable_noeeprom(); + layer_state_set_user(layer_state); + #endif +} +void set_qwerty(void){ + rgblight_sethsv_noeeprom(255, 0, 160); +} +void set_lower(void){ + rgblight_sethsv_master(255, 255, 255); + rgblight_sethsv_slave(255, 0, 160); +} +void set_raise(void){ + rgblight_sethsv_slave(35, 255, 255); + rgblight_sethsv_master(255, 0, 160); +} +void set_adjust(void){ + rgblight_sethsv_slave(35, 255, 255); + rgblight_sethsv_master(255, 255, 255); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + set_qwerty(); + #endif + set_single_persistent_default_layer(_QWERTY); + } + return false; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_colemak); + #endif + set_single_persistent_default_layer(_COLEMAK); + } + return false; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_dvorak); + #endif + set_single_persistent_default_layer(_DVORAK); + } + return false; + case LOWER: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + set_lower(); + #endif + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + #ifdef RGBLIGHT_ENABLE + set_qwerty(); + #endif + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case RAISE: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + set_raise(); + #endif + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + #ifdef RGBLIGHT_ENABLE + set_qwerty(); + #endif + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case ADJUST: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + set_adjust(); + #endif + layer_on(_ADJUST); + } else { + #ifdef RGBLIGHT_ENABLE + set_qwerty(); + #endif + layer_off(_ADJUST); + } + return false; + } + return true; +} + diff --git a/keyboards/lets_split/keymaps/tylerwince/rules.mk b/keyboards/lets_split/keymaps/tylerwince/rules.mk new file mode 100644 index 000000000..3cfa539f3 --- /dev/null +++ b/keyboards/lets_split/keymaps/tylerwince/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE=yes +TAP_DANCE_ENABLE=yes From b0532c433edbe9419048882c1f14e0b54cd4e2b0 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Tue, 28 May 2019 06:52:31 -0700 Subject: [PATCH 126/341] Waldo LAYOUT_60_hhkb bugfix (#6000) * Fix typo in LAYOUT_60_hhkb macro Reported by Sushiimi - https://github.com/qmk/qmk_configurator/issues/376 * Unify white space Tabs and spaces were being mixed for indenting. No logic change. --- keyboards/waldo/waldo.h | 68 ++++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/keyboards/waldo/waldo.h b/keyboards/waldo/waldo.h index f683ca82f..1e300f942 100644 --- a/keyboards/waldo/waldo.h +++ b/keyboards/waldo/waldo.h @@ -3,61 +3,61 @@ #include "quantum.h" #define LAYOUT_60_ansi( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ - k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ k40, k41, k42, k46, k49, k4a, k4c, k4d \ ) \ { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, KC_NO }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, KC_NO }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, k2d, KC_NO }, \ - { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, KC_NO, KC_NO }, \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, k2d, KC_NO }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, KC_NO, KC_NO }, \ { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, k49, k4a, KC_NO, k4c, k4d, KC_NO } \ } #define LAYOUT_60_hhkb( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ - k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ - k41, k42, k46, k49, k4a \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k41, k42, k46, k49, k4a \ ) \ { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, KC_NO }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, k2d, KC_NO }, \ - { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO }, \ - { KC_NO, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, k49, k4a, KC_NO, KC_NO, KC_NO, C_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, k2d, KC_NO }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO }, \ + { KC_NO, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, k49, k4a, KC_NO, KC_NO, KC_NO, KC_NO } \ } #define LAYOUT_60_ansi_split_bs_rshift( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ - k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ k40, k41, k42, k46, k49, k4a, k4c, k4d \ ) \ { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, KC_NO }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, k2d, KC_NO }, \ - { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO }, \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, k2d, KC_NO }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO }, \ { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, k49, k4a, KC_NO, k4c, k4d, KC_NO } \ } #define LAYOUT_all( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ k40, k41, k42, k44, k46, k48, k49, k4a, k4c, k4d \ ) \ { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, KC_NO }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO }, \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO }, \ { k40, k41, k42, KC_NO, k44, KC_NO, k46, KC_NO, k48, k49, k4a, KC_NO, k4c, k4d } \ } From 7a7e3848c75536463fd5fea44620c3eb8085cc91 Mon Sep 17 00:00:00 2001 From: Mathias Andersson Date: Tue, 28 May 2019 19:57:17 +0200 Subject: [PATCH 127/341] [Keyboard] Add keyboard Moon (#5976) --- keyboards/moon/config.h | 44 ++ keyboards/moon/info.json | 467 ++++++++++++++++++ keyboards/moon/keymaps/default/config.h | 3 + keyboards/moon/keymaps/default/keymap.c | 13 + keyboards/moon/keymaps/default/readme.md | 1 + .../moon/keymaps/default_tkl_ansi/config.h | 3 + .../moon/keymaps/default_tkl_ansi/keymap.c | 13 + .../moon/keymaps/default_tkl_ansi/readme.md | 1 + .../keymaps/default_tkl_ansi_wkl/config.h | 3 + .../keymaps/default_tkl_ansi_wkl/keymap.c | 13 + .../keymaps/default_tkl_ansi_wkl/readme.md | 1 + .../moon/keymaps/default_tkl_iso/config.h | 3 + .../moon/keymaps/default_tkl_iso/keymap.c | 13 + .../moon/keymaps/default_tkl_iso/readme.md | 1 + .../moon/keymaps/default_tkl_iso_wkl/config.h | 3 + .../moon/keymaps/default_tkl_iso_wkl/keymap.c | 13 + .../keymaps/default_tkl_iso_wkl/readme.md | 1 + keyboards/moon/matrix.c | 218 ++++++++ keyboards/moon/moon.c | 69 +++ keyboards/moon/moon.h | 121 +++++ keyboards/moon/pca9555.c | 78 +++ keyboards/moon/pca9555.h | 55 +++ keyboards/moon/readme.md | 17 + keyboards/moon/rules.mk | 77 +++ 24 files changed, 1231 insertions(+) create mode 100644 keyboards/moon/config.h create mode 100644 keyboards/moon/info.json create mode 100644 keyboards/moon/keymaps/default/config.h create mode 100644 keyboards/moon/keymaps/default/keymap.c create mode 100644 keyboards/moon/keymaps/default/readme.md create mode 100644 keyboards/moon/keymaps/default_tkl_ansi/config.h create mode 100644 keyboards/moon/keymaps/default_tkl_ansi/keymap.c create mode 100644 keyboards/moon/keymaps/default_tkl_ansi/readme.md create mode 100644 keyboards/moon/keymaps/default_tkl_ansi_wkl/config.h create mode 100644 keyboards/moon/keymaps/default_tkl_ansi_wkl/keymap.c create mode 100644 keyboards/moon/keymaps/default_tkl_ansi_wkl/readme.md create mode 100644 keyboards/moon/keymaps/default_tkl_iso/config.h create mode 100644 keyboards/moon/keymaps/default_tkl_iso/keymap.c create mode 100644 keyboards/moon/keymaps/default_tkl_iso/readme.md create mode 100644 keyboards/moon/keymaps/default_tkl_iso_wkl/config.h create mode 100644 keyboards/moon/keymaps/default_tkl_iso_wkl/keymap.c create mode 100644 keyboards/moon/keymaps/default_tkl_iso_wkl/readme.md create mode 100644 keyboards/moon/matrix.c create mode 100644 keyboards/moon/moon.c create mode 100644 keyboards/moon/moon.h create mode 100644 keyboards/moon/pca9555.c create mode 100644 keyboards/moon/pca9555.h create mode 100644 keyboards/moon/readme.md create mode 100644 keyboards/moon/rules.mk diff --git a/keyboards/moon/config.h b/keyboards/moon/config.h new file mode 100644 index 000000000..a02cfdba1 --- /dev/null +++ b/keyboards/moon/config.h @@ -0,0 +1,44 @@ +/* +Copyright 2019 Mathias Andersson + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xFCB8 +#define DEVICE_VER 0x0001 +#define MANUFACTURER EVE +#define PRODUCT Moon +#define DESCRIPTION A tenkeyless keyboard with astonishing curves + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 11 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Backlight */ +#define BACKLIGHT_PIN C6 +#define BACKLIGHT_LEVELS 3 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/moon/info.json b/keyboards/moon/info.json new file mode 100644 index 000000000..d7182ee36 --- /dev/null +++ b/keyboards/moon/info.json @@ -0,0 +1,467 @@ +{ + "keyboard_name": "Moon", + "url": "https://geekhack.org/index.php?topic=90379.0", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "key_count": 88, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + {"label":"~", "x":0, "y":1.5}, + {"label":"!", "x":1, "y":1.5}, + {"label":"@", "x":2, "y":1.5}, + {"label":"#", "x":3, "y":1.5}, + {"label":"$", "x":4, "y":1.5}, + {"label":"%", "x":5, "y":1.5}, + {"label":"^", "x":6, "y":1.5}, + {"label":"&", "x":7, "y":1.5}, + {"label":"*", "x":8, "y":1.5}, + {"label":"(", "x":9, "y":1.5}, + {"label":")", "x":10, "y":1.5}, + {"label":"_", "x":11, "y":1.5}, + {"label":"+", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"PgUp", "x":17.25, "y":1.5}, + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"{", "x":11.5, "y":2.5}, + {"label":"}", "x":12.5, "y":2.5}, + {"label":"|", "x":13.5, "y":2.5, "w":1.5}, + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"PgDn", "x":17.25, "y":2.5}, + {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, + {"label":"A", "x":1.75, "y":3.5}, + {"label":"S", "x":2.75, "y":3.5}, + {"label":"D", "x":3.75, "y":3.5}, + {"label":"F", "x":4.75, "y":3.5}, + {"label":"G", "x":5.75, "y":3.5}, + {"label":"H", "x":6.75, "y":3.5}, + {"label":"J", "x":7.75, "y":3.5}, + {"label":"K", "x":8.75, "y":3.5}, + {"label":"L", "x":9.75, "y":3.5}, + {"label":":", "x":10.75, "y":3.5}, + {"label":"\"", "x":11.75, "y":3.5}, + {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, + {"label":"Shift", "x":0, "y":4.5, "w":1.25}, + {"label":"|", "x":1.25, "y":4.5}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":"<", "x":9.25, "y":4.5}, + {"label":">", "x":10.25, "y":4.5}, + {"label":"?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, + {"label":"Up", "x":16.25, "y":4.5}, + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, + {"label":"Space", "x":3.75, "y":5.5, "w":6.25}, + {"label":"Alt", "x":10, "y":5.5, "w":1.25}, + {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + {"label":"Left", "x":15.25, "y":5.5}, + {"label":"Down", "x":16.25, "y":5.5}, + {"label":"Right", "x":17.25, "y":5.5} + ] + }, + "LAYOUT_tkl_ansi": { + "key_count": 87, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + {"label":"~", "x":0, "y":1.5}, + {"label":"!", "x":1, "y":1.5}, + {"label":"@", "x":2, "y":1.5}, + {"label":"#", "x":3, "y":1.5}, + {"label":"$", "x":4, "y":1.5}, + {"label":"%", "x":5, "y":1.5}, + {"label":"^", "x":6, "y":1.5}, + {"label":"&", "x":7, "y":1.5}, + {"label":"*", "x":8, "y":1.5}, + {"label":"(", "x":9, "y":1.5}, + {"label":")", "x":10, "y":1.5}, + {"label":"_", "x":11, "y":1.5}, + {"label":"+", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"PgUp", "x":17.25, "y":1.5}, + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"{", "x":11.5, "y":2.5}, + {"label":"}", "x":12.5, "y":2.5}, + {"label":"|", "x":13.5, "y":2.5, "w":1.5}, + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"PgDn", "x":17.25, "y":2.5}, + {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, + {"label":"A", "x":1.75, "y":3.5}, + {"label":"S", "x":2.75, "y":3.5}, + {"label":"D", "x":3.75, "y":3.5}, + {"label":"F", "x":4.75, "y":3.5}, + {"label":"G", "x":5.75, "y":3.5}, + {"label":"H", "x":6.75, "y":3.5}, + {"label":"J", "x":7.75, "y":3.5}, + {"label":"K", "x":8.75, "y":3.5}, + {"label":"L", "x":9.75, "y":3.5}, + {"label":":", "x":10.75, "y":3.5}, + {"label":"\"", "x":11.75, "y":3.5}, + {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, + {"label":"Shift", "x":0, "y":4.5, "w":2.25}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":"<", "x":9.25, "y":4.5}, + {"label":">", "x":10.25, "y":4.5}, + {"label":"?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, + {"label":"Up", "x":16.25, "y":4.5}, + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, + {"label":"Space", "x":3.75, "y":5.5, "w":6.25}, + {"label":"Alt", "x":10, "y":5.5, "w":1.25}, + {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + {"label":"Left", "x":15.25, "y":5.5}, + {"label":"Down", "x":16.25, "y":5.5}, + {"label":"Right", "x":17.25, "y":5.5} + ] + }, + "LAYOUT_tkl_ansi_wkl": { + "key_count": 84, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + {"label":"~", "x":0, "y":1.5}, + {"label":"!", "x":1, "y":1.5}, + {"label":"@", "x":2, "y":1.5}, + {"label":"#", "x":3, "y":1.5}, + {"label":"$", "x":4, "y":1.5}, + {"label":"%", "x":5, "y":1.5}, + {"label":"^", "x":6, "y":1.5}, + {"label":"&", "x":7, "y":1.5}, + {"label":"*", "x":8, "y":1.5}, + {"label":"(", "x":9, "y":1.5}, + {"label":")", "x":10, "y":1.5}, + {"label":"_", "x":11, "y":1.5}, + {"label":"+", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"PgUp", "x":17.25, "y":1.5}, + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"{", "x":11.5, "y":2.5}, + {"label":"}", "x":12.5, "y":2.5}, + {"label":"|", "x":13.5, "y":2.5, "w":1.5}, + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"PgDn", "x":17.25, "y":2.5}, + {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, + {"label":"A", "x":1.75, "y":3.5}, + {"label":"S", "x":2.75, "y":3.5}, + {"label":"D", "x":3.75, "y":3.5}, + {"label":"F", "x":4.75, "y":3.5}, + {"label":"G", "x":5.75, "y":3.5}, + {"label":"H", "x":6.75, "y":3.5}, + {"label":"J", "x":7.75, "y":3.5}, + {"label":"K", "x":8.75, "y":3.5}, + {"label":"L", "x":9.75, "y":3.5}, + {"label":":", "x":10.75, "y":3.5}, + {"label":"\"", "x":11.75, "y":3.5}, + {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, + {"label":"Shift", "x":0, "y":4.5, "w":2.25}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":"<", "x":9.25, "y":4.5}, + {"label":">", "x":10.25, "y":4.5}, + {"label":"?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, + {"label":"Up", "x":16.25, "y":4.5}, + {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, + {"label":"Space", "x":4, "y":5.5, "w":7}, + {"label":"Alt", "x":11, "y":5.5, "w":1.5}, + {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, + {"label":"Left", "x":15.25, "y":5.5}, + {"label":"Down", "x":16.25, "y":5.5}, + {"label":"Right", "x":17.25, "y":5.5} + ] + }, + "LAYOUT_tkl_iso": { + "key_count": 88, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + {"label":"\u00ac", "x":0, "y":1.5}, + {"label":"!", "x":1, "y":1.5}, + {"label":"\"", "x":2, "y":1.5}, + {"label":"\u00a3", "x":3, "y":1.5}, + {"label":"$", "x":4, "y":1.5}, + {"label":"%", "x":5, "y":1.5}, + {"label":"^", "x":6, "y":1.5}, + {"label":"&", "x":7, "y":1.5}, + {"label":"*", "x":8, "y":1.5}, + {"label":"(", "x":9, "y":1.5}, + {"label":")", "x":10, "y":1.5}, + {"label":"_", "x":11, "y":1.5}, + {"label":"+", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"PgUp", "x":17.25, "y":1.5}, + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"{", "x":11.5, "y":2.5}, + {"label":"}", "x":12.5, "y":2.5}, + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"PgDn", "x":17.25, "y":2.5}, + {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, + {"label":"A", "x":1.75, "y":3.5}, + {"label":"S", "x":2.75, "y":3.5}, + {"label":"D", "x":3.75, "y":3.5}, + {"label":"F", "x":4.75, "y":3.5}, + {"label":"G", "x":5.75, "y":3.5}, + {"label":"H", "x":6.75, "y":3.5}, + {"label":"J", "x":7.75, "y":3.5}, + {"label":"K", "x":8.75, "y":3.5}, + {"label":"L", "x":9.75, "y":3.5}, + {"label":":", "x":10.75, "y":3.5}, + {"label":"@", "x":11.75, "y":3.5}, + {"label":"~", "x":12.75, "y":3.5}, + {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, + {"label":"Shift", "x":0, "y":4.5, "w":1.25}, + {"label":"|", "x":1.25, "y":4.5}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":"<", "x":9.25, "y":4.5}, + {"label":">", "x":10.25, "y":4.5}, + {"label":"?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, + {"label":"Up", "x":16.25, "y":4.5}, + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, + {"label":"Space", "x":3.75, "y":5.5, "w":6.25}, + {"label":"AltGr", "x":10, "y":5.5, "w":1.25}, + {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + {"label":"Left", "x":15.25, "y":5.5}, + {"label":"Down", "x":16.25, "y":5.5}, + {"label":"Right", "x":17.25, "y":5.5} + ] + }, + "LAYOUT_tkl_iso_wkl": { + "key_count": 85, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + {"label":"\u00ac", "x":0, "y":1.5}, + {"label":"!", "x":1, "y":1.5}, + {"label":"\"", "x":2, "y":1.5}, + {"label":"\u00a3", "x":3, "y":1.5}, + {"label":"$", "x":4, "y":1.5}, + {"label":"%", "x":5, "y":1.5}, + {"label":"^", "x":6, "y":1.5}, + {"label":"&", "x":7, "y":1.5}, + {"label":"*", "x":8, "y":1.5}, + {"label":"(", "x":9, "y":1.5}, + {"label":")", "x":10, "y":1.5}, + {"label":"_", "x":11, "y":1.5}, + {"label":"+", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"PgUp", "x":17.25, "y":1.5}, + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"{", "x":11.5, "y":2.5}, + {"label":"}", "x":12.5, "y":2.5}, + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"PgDn", "x":17.25, "y":2.5}, + {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, + {"label":"A", "x":1.75, "y":3.5}, + {"label":"S", "x":2.75, "y":3.5}, + {"label":"D", "x":3.75, "y":3.5}, + {"label":"F", "x":4.75, "y":3.5}, + {"label":"G", "x":5.75, "y":3.5}, + {"label":"H", "x":6.75, "y":3.5}, + {"label":"J", "x":7.75, "y":3.5}, + {"label":"K", "x":8.75, "y":3.5}, + {"label":"L", "x":9.75, "y":3.5}, + {"label":":", "x":10.75, "y":3.5}, + {"label":"@", "x":11.75, "y":3.5}, + {"label":"~", "x":12.75, "y":3.5}, + {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, + {"label":"Shift", "x":0, "y":4.5, "w":1.25}, + {"label":"|", "x":1.25, "y":4.5}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":"<", "x":9.25, "y":4.5}, + {"label":">", "x":10.25, "y":4.5}, + {"label":"?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, + {"label":"Up", "x":16.25, "y":4.5}, + {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, + {"label":"Space", "x":4, "y":5.5, "w":7}, + {"label":"AltGr", "x":11, "y":5.5, "w":1.5}, + {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, + {"label":"Left", "x":15.25, "y":5.5}, + {"label":"Down", "x":16.25, "y":5.5}, + {"label":"Right", "x":17.25, "y":5.5} + ] + } + } +} + diff --git a/keyboards/moon/keymaps/default/config.h b/keyboards/moon/keymaps/default/config.h new file mode 100644 index 000000000..271f48d00 --- /dev/null +++ b/keyboards/moon/keymaps/default/config.h @@ -0,0 +1,3 @@ +#pragma once + +// place overrides here diff --git a/keyboards/moon/keymaps/default/keymap.c b/keyboards/moon/keymaps/default/keymap.c new file mode 100644 index 000000000..7ab5a25f3 --- /dev/null +++ b/keyboards/moon/keymaps/default/keymap.c @@ -0,0 +1,13 @@ +#include QMK_KEYBOARD_H + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, 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_INS , KC_HOME, 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_DEL , KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_NO, 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_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT) +}; +// clang-format on diff --git a/keyboards/moon/keymaps/default/readme.md b/keyboards/moon/keymaps/default/readme.md new file mode 100644 index 000000000..3a1a93782 --- /dev/null +++ b/keyboards/moon/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for the Moon diff --git a/keyboards/moon/keymaps/default_tkl_ansi/config.h b/keyboards/moon/keymaps/default_tkl_ansi/config.h new file mode 100644 index 000000000..271f48d00 --- /dev/null +++ b/keyboards/moon/keymaps/default_tkl_ansi/config.h @@ -0,0 +1,3 @@ +#pragma once + +// place overrides here diff --git a/keyboards/moon/keymaps/default_tkl_ansi/keymap.c b/keyboards/moon/keymaps/default_tkl_ansi/keymap.c new file mode 100644 index 000000000..2eb006f6a --- /dev/null +++ b/keyboards/moon/keymaps/default_tkl_ansi/keymap.c @@ -0,0 +1,13 @@ +#include QMK_KEYBOARD_H + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_tkl_ansi( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, 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_INS , KC_HOME, 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_DEL , KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + 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_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT) +}; +// clang-format on diff --git a/keyboards/moon/keymaps/default_tkl_ansi/readme.md b/keyboards/moon/keymaps/default_tkl_ansi/readme.md new file mode 100644 index 000000000..bf1e2ac77 --- /dev/null +++ b/keyboards/moon/keymaps/default_tkl_ansi/readme.md @@ -0,0 +1 @@ +# The default ANSI keymap for the Moon diff --git a/keyboards/moon/keymaps/default_tkl_ansi_wkl/config.h b/keyboards/moon/keymaps/default_tkl_ansi_wkl/config.h new file mode 100644 index 000000000..271f48d00 --- /dev/null +++ b/keyboards/moon/keymaps/default_tkl_ansi_wkl/config.h @@ -0,0 +1,3 @@ +#pragma once + +// place overrides here diff --git a/keyboards/moon/keymaps/default_tkl_ansi_wkl/keymap.c b/keyboards/moon/keymaps/default_tkl_ansi_wkl/keymap.c new file mode 100644 index 000000000..ce3bcd713 --- /dev/null +++ b/keyboards/moon/keymaps/default_tkl_ansi_wkl/keymap.c @@ -0,0 +1,13 @@ +#include QMK_KEYBOARD_H + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_tkl_ansi_wkl( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, 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_INS , KC_HOME, 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_DEL , KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + 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_UP, + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT) +}; +// clang-format on diff --git a/keyboards/moon/keymaps/default_tkl_ansi_wkl/readme.md b/keyboards/moon/keymaps/default_tkl_ansi_wkl/readme.md new file mode 100644 index 000000000..f284c1b3c --- /dev/null +++ b/keyboards/moon/keymaps/default_tkl_ansi_wkl/readme.md @@ -0,0 +1 @@ +# The default winkeyless ANSI keymap for the Moon diff --git a/keyboards/moon/keymaps/default_tkl_iso/config.h b/keyboards/moon/keymaps/default_tkl_iso/config.h new file mode 100644 index 000000000..271f48d00 --- /dev/null +++ b/keyboards/moon/keymaps/default_tkl_iso/config.h @@ -0,0 +1,3 @@ +#pragma once + +// place overrides here diff --git a/keyboards/moon/keymaps/default_tkl_iso/keymap.c b/keyboards/moon/keymaps/default_tkl_iso/keymap.c new file mode 100644 index 000000000..868f68b1a --- /dev/null +++ b/keyboards/moon/keymaps/default_tkl_iso/keymap.c @@ -0,0 +1,13 @@ +#include QMK_KEYBOARD_H + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_tkl_iso( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, 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_INS , KC_HOME, 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_DEL , KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_BSLS, 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_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT) +}; +// clang-format on diff --git a/keyboards/moon/keymaps/default_tkl_iso/readme.md b/keyboards/moon/keymaps/default_tkl_iso/readme.md new file mode 100644 index 000000000..9dd1e2c25 --- /dev/null +++ b/keyboards/moon/keymaps/default_tkl_iso/readme.md @@ -0,0 +1 @@ +# The default ISO keymap for the Moon diff --git a/keyboards/moon/keymaps/default_tkl_iso_wkl/config.h b/keyboards/moon/keymaps/default_tkl_iso_wkl/config.h new file mode 100644 index 000000000..271f48d00 --- /dev/null +++ b/keyboards/moon/keymaps/default_tkl_iso_wkl/config.h @@ -0,0 +1,3 @@ +#pragma once + +// place overrides here diff --git a/keyboards/moon/keymaps/default_tkl_iso_wkl/keymap.c b/keyboards/moon/keymaps/default_tkl_iso_wkl/keymap.c new file mode 100644 index 000000000..6e1e1d570 --- /dev/null +++ b/keyboards/moon/keymaps/default_tkl_iso_wkl/keymap.c @@ -0,0 +1,13 @@ +#include QMK_KEYBOARD_H + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_tkl_iso_wkl( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, 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_INS , KC_HOME, 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_DEL , KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_BSLS, 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_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT) +}; +// clang-format on diff --git a/keyboards/moon/keymaps/default_tkl_iso_wkl/readme.md b/keyboards/moon/keymaps/default_tkl_iso_wkl/readme.md new file mode 100644 index 000000000..fabba452b --- /dev/null +++ b/keyboards/moon/keymaps/default_tkl_iso_wkl/readme.md @@ -0,0 +1 @@ +# The default winkeyless ISO keymap for the Moon diff --git a/keyboards/moon/matrix.c b/keyboards/moon/matrix.c new file mode 100644 index 000000000..c74c70f89 --- /dev/null +++ b/keyboards/moon/matrix.c @@ -0,0 +1,218 @@ +/* +Copyright 2012-2019 Jun Wako, Jack Humbert, Yiancar, Mathias Andersson + +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 . +*/ +#include +#include +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" +#include "pca9555.h" + +/* + * IC1 (PCA9555) IC2 (PCA9555) + * ,----------. ,----------. + * SDA --| SDA P00 |-- P1 SDA --| SDA P00 |-- P17 + * SCL --| SCL P01 |-- P2 SCL --| SCL P01 |-- P18 + * INT --| INT P02 |-- P3 INT --| INT P02 |-- P19 + * | P03 |-- P4 | P03 |-- P20 + * GND --| A0 P04 |-- P5 VCC --| A0 P04 |-- P21 + * SJ1 --| A1 P05 |-- P6 SJ1 --| A1 P05 |-- P22 + * GND --| A2 P06 |-- P7 GND --| A2 P06 |-- P23 + * | P07 |-- P8 | P07 |-- P24 + * | | | | + * | P10 |-- P9 | P10 |-- P25 + * | P11 |-- P10 | P11 |-- P26 + * | P12 |-- P11 | P12 |-- P27 + * | P13 |-- P12 | P13 |-- P28 + * | P14 |-- P13 | P14 |-- P29 + * | P15 |-- P14 | P15 |-- P30 + * | P16 |-- P15 | P16 |-- P31 + * | P17 |-- P16 | P17 |-- P32 + * `----------' `----------' + */ + +/* + * | Row | Pin | | Col | Pin | + * | --- | --- | | --- | --- | + * | 0 | P1 | | 0 | P25 | + * | 1 | P2 | | 1 | P26 | + * | 2 | P3 | | 2 | P27 | + * | 3 | P4 | | 3 | P28 | + * | 4 | P5 | | 4 | P29 | + * | 5 | P6 | | 5 | P30 | + * | 6 | P7 | | 6 | P20 | + * | 7 | P8 | | 7 | P21 | + * | 8 | P22 | + * | 9 | P23 | + * | A | P24 | + */ + +// PCA9555 slave addresses +#define IC1 0x20 +#define IC2 0x21 + +// PCA9555 column pin masks +#define PORT0_COLS_MASK 0b11111000 +#define PORT1_COLS_MASK 0b00111111 +#define COLS_MASK 0b0000011111111111 + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +/* matrix state(1:on, 0:off) */ +static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values +static matrix_row_t matrix[MATRIX_ROWS]; // debounced values + +__attribute__((weak)) void matrix_init_quantum(void) { matrix_init_kb(); } + +__attribute__((weak)) void matrix_scan_quantum(void) { matrix_scan_kb(); } + +__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } + +__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } + +__attribute__((weak)) void matrix_init_user(void) {} + +__attribute__((weak)) void matrix_scan_user(void) {} + +inline uint8_t matrix_rows(void) { return MATRIX_ROWS; } + +inline uint8_t matrix_cols(void) { return MATRIX_COLS; } + +inline bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & ((matrix_row_t)1 << col)); } + +inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } + +void matrix_print(void) { + print_matrix_header(); + + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + phex(row); + print(": "); + print_matrix_row(row); + print("\n"); + } +} + +uint8_t matrix_key_count(void) { + uint8_t count = 0; + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + count += matrix_bitpop(i); + } + return count; +} + +static void init_i2c(void) { + pca9555_init(IC1); + pca9555_init(IC2); +} + +static void init_pins(void) { + // init cols - IC2 port0 & IC2 port1 input + pca9555_set_config(IC2, PCA9555_PORT0, ALL_INPUT); + pca9555_set_config(IC2, PCA9555_PORT1, ALL_INPUT); + + // init rows - IC1 port0 output + pca9555_set_config(IC1, PCA9555_PORT0, ALL_OUTPUT); + pca9555_set_output(IC1, PCA9555_PORT0, ALL_HIGH); +} + +static void select_row(uint8_t row) { + // All rows are on the same IC and port + uint8_t mask = 1 << row; + + // set active row low : 0 + // set other rows hi-Z : 1 + pca9555_set_output(IC1, PCA9555_PORT0, ALL_HIGH & (~mask)); +} + +static uint16_t read_cols(void) { + uint16_t state_1 = pca9555_readPins(IC2, PCA9555_PORT0); + uint16_t state_2 = pca9555_readPins(IC2, PCA9555_PORT1); + + uint16_t state = ((state_1 & PORT0_COLS_MASK) << 3) | ((state_2 & PORT1_COLS_MASK)); + + // A low pin indicates an active column + return (~state) & COLS_MASK; +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + wait_us(30); + + current_matrix[current_row] |= read_cols(); + + // No need to unselect as `select_row` sets all the pins. + + return (last_row_value != current_matrix[current_row]); +} + +void matrix_init(void) { + // initialize i2c + init_i2c(); + + // initialize key pins + init_pins(); + + // initialize matrix state: all keys off + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + raw_matrix[i] = 0; + matrix[i] = 0; + } + + debounce_init(MATRIX_ROWS); + + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) { + bool changed = false; + + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { + changed |= read_cols_on_row(raw_matrix, current_row); + } + + debounce(raw_matrix, matrix, MATRIX_ROWS, changed); + + matrix_scan_quantum(); + + return (uint8_t)changed; +} diff --git a/keyboards/moon/moon.c b/keyboards/moon/moon.c new file mode 100644 index 000000000..c218bf5ef --- /dev/null +++ b/keyboards/moon/moon.c @@ -0,0 +1,69 @@ +/* Copyright 2019 Mathias Andersson + * + * 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 . + */ +#include "moon.h" + +#define CAPS_PIN B5 +#define SCROLL_PIN B6 + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + setPinOutput(CAPS_PIN); + setPinOutput(SCROLL_PIN); + + matrix_init_user(); +} + +/* + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +*/ + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinHigh(CAPS_PIN); + } else { + writePinLow(CAPS_PIN); + } + + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinHigh(SCROLL_PIN); + } else { + writePinLow(SCROLL_PIN); + } + + led_set_user(usb_led); +} diff --git a/keyboards/moon/moon.h b/keyboards/moon/moon.h new file mode 100644 index 000000000..8599aded1 --- /dev/null +++ b/keyboards/moon/moon.h @@ -0,0 +1,121 @@ +/* Copyright 2019 Mathias Andersson + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_all( \ + k06, k07, k08, k09, k0A, k00, k01, k02, k03, k04, k05, k66, k67, k68, k69, k6A, \ + k16, k17, k18, k19, k1A, k10, k11, k12, k13, k14, k15, k60, k61, k62, k63, k64, k65, \ + k26, k27, k28, k29, k2A, k20, k21, k22, k23, k24, k25, k76, k77, k78, k79, k7A, k70, \ + k36, k37, k38, k39, k3A, k30, k31, k32, k33, k34, k35, k71, k72, \ + k46, k47, k48, k49, k4A, k40, k41, k42, k43, k44, k45, k73, k75, k74, \ + k56, k57, k58, k59, k5A, k50, k51, k52, k53, k54, k55 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7A }, \ +} + +#define LAYOUT_tkl_ansi( \ + k06, k07, k08, k09, k0A, k00, k01, k02, k03, k04, k05, k66, k67, k68, k69, k6A, \ + k16, k17, k18, k19, k1A, k10, k11, k12, k13, k14, k15, k60, k61, k62, k63, k64, k65, \ + k26, k27, k28, k29, k2A, k20, k21, k22, k23, k24, k25, k76, k77, k78, k79, k7A, k70, \ + k36, k37, k38, k39, k3A, k30, k31, k32, k33, k34, k35, k71, k72, \ + k46, k48, k49, k4A, k40, k41, k42, k43, k44, k45, k73, k75, k74, \ + k56, k57, k58, k59, k5A, k50, k51, k52, k53, k54, k55 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A }, \ + { k40, k41, k42, k43, k44, k45, k46, KC_NO, k48, k49, k4A }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7A }, \ +} + +#define LAYOUT_tkl_ansi_wkl( \ + k06, k07, k08, k09, k0A, k00, k01, k02, k03, k04, k05, k66, k67, k68, k69, k6A, \ + k16, k17, k18, k19, k1A, k10, k11, k12, k13, k14, k15, k60, k61, k62, k63, k64, k65, \ + k26, k27, k28, k29, k2A, k20, k21, k22, k23, k24, k25, k76, k77, k78, k79, k7A, k70, \ + k36, k37, k38, k39, k3A, k30, k31, k32, k33, k34, k35, k71, k72, \ + k46, k48, k49, k4A, k40, k41, k42, k43, k44, k45, k73, k75, k74, \ + k56, k58, k59, k50, k52, k53, k54, k55 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A }, \ + { k40, k41, k42, k43, k44, k45, k46, KC_NO, k48, k49, k4A }, \ + { k50, KC_NO, k52, k53, k54, k55, k56, KC_NO, k58, k59, KC_NO }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7A }, \ +} + +#define LAYOUT_tkl_iso( \ + k06, k07, k08, k09, k0A, k00, k01, k02, k03, k04, k05, k66, k67, k68, k69, k6A, \ + k16, k17, k18, k19, k1A, k10, k11, k12, k13, k14, k15, k60, k61, k62, k63, k64, k65, \ + k26, k27, k28, k29, k2A, k20, k21, k22, k23, k24, k25, k76, k77, k79, k7A, k70, \ + k36, k37, k38, k39, k3A, k30, k31, k32, k33, k34, k35, k71, k78, k72, \ + k46, k47, k48, k49, k4A, k40, k41, k42, k43, k44, k45, k73, k75, k74, \ + k56, k57, k58, k59, k5A, k50, k51, k52, k53, k54, k55 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7A }, \ +} + +#define LAYOUT_tkl_iso_wkl( \ + k06, k07, k08, k09, k0A, k00, k01, k02, k03, k04, k05, k66, k67, k68, k69, k6A, \ + k16, k17, k18, k19, k1A, k10, k11, k12, k13, k14, k15, k60, k61, k62, k63, k64, k65, \ + k26, k27, k28, k29, k2A, k20, k21, k22, k23, k24, k25, k76, k77, k79, k7A, k70, \ + k36, k37, k38, k39, k3A, k30, k31, k32, k33, k34, k35, k71, k78, k72, \ + k46, k47, k48, k49, k4A, k40, k41, k42, k43, k44, k45, k73, k75, k74, \ + k56, k58, k59, k50, k52, k53, k54, k55 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A }, \ + { k50, KC_NO, k52, k53, k54, k55, k56, KC_NO, k58, k59, KC_NO }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7A }, \ +} diff --git a/keyboards/moon/pca9555.c b/keyboards/moon/pca9555.c new file mode 100644 index 000000000..b0e542d8d --- /dev/null +++ b/keyboards/moon/pca9555.c @@ -0,0 +1,78 @@ +/* Copyright 2019 + * + * 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 . + */ +#include "i2c_master.h" +#include "pca9555.h" + +#include "debug.h" + +#define SLAVE_TO_ADDR(n) (n << 1) +#define TIMEOUT 100 + +enum { + CMD_INPUT_0 = 0, + CMD_INPUT_1, + CMD_OUTPUT_0, + CMD_OUTPUT_1, + CMD_INVERSION_0, + CMD_INVERSION_1, + CMD_CONFIG_0, + CMD_CONFIG_1, +}; + +void pca9555_init(uint8_t slave_addr) { + static uint8_t s_init = 0; + if (!s_init) { + i2c_init(); + + s_init = 1; + } + + // TODO: could check device connected + // i2c_start(SLAVE_TO_ADDR(slave) | I2C_WRITE); + // i2c_stop(); +} + +void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmd = port ? CMD_CONFIG_1 : CMD_CONFIG_0; + + i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + print("pca9555_set_config::FAILED\n"); + } +} + +void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmd = port ? CMD_OUTPUT_1 : CMD_OUTPUT_0; + + i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + print("pca9555_set_output::FAILED\n"); + } +} + +uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmd = port ? CMD_INPUT_1 : CMD_INPUT_0; + + uint8_t data = 0; + i2c_status_t ret = i2c_readReg(addr, cmd, &data, sizeof(data), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + print("pca9555_readPins::FAILED\n"); + } + return data; +} diff --git a/keyboards/moon/pca9555.h b/keyboards/moon/pca9555.h new file mode 100644 index 000000000..ebb97e2f3 --- /dev/null +++ b/keyboards/moon/pca9555.h @@ -0,0 +1,55 @@ +/* Copyright 2019 + * + * 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 . + */ +#pragma once + +/* + PCA9555 + ,----------. + SDA --| SDA P00 |-- P00 + SCL --| SCL P01 |-- P01 + INT --| INT P02 |-- P02 + | P03 |-- P03 + A0 --| A0 P04 |-- P04 + A1 --| A1 P05 |-- P05 + A2 --| A2 P06 |-- P06 + | P07 |-- P07 + | | + | P10 |-- P10 + | P11 |-- P11 + | P12 |-- P12 + | P13 |-- P13 + | P14 |-- P14 + | P15 |-- P15 + | P16 |-- P16 + | P17 |-- P17 + `----------' +*/ + +#define PCA9555_PORT0 0 +#define PCA9555_PORT1 1 + +#define ALL_OUTPUT 0 +#define ALL_INPUT 0xFF +#define ALL_LOW 0 +#define ALL_HIGH 0xFF + +void pca9555_init(uint8_t slave_addr); + +void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf); + +void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf); + +uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port); diff --git a/keyboards/moon/readme.md b/keyboards/moon/readme.md new file mode 100644 index 000000000..6ba38826e --- /dev/null +++ b/keyboards/moon/readme.md @@ -0,0 +1,17 @@ +# Moon + +![moon](https://i.imgur.com/hQeOBMs.jpg) + +A tenkeyless keyboard with astonishing curves. Designed and manufactured by EVE. + +The PCB uses the [Kimera core](https://github.com/kairyu/kimera) controller. + +Keyboard Maintainer: [Mathias Andersson](https://github.com/wraul) +Hardware Supported: Moon (only the initial black PCB with Kimera core). +Hardware Availability: https://geekhack.org/index.php?topic=90379.0 + +Make example for this keyboard (after setting up your build environment): + + make moon:default + +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). diff --git a/keyboards/moon/rules.mk b/keyboards/moon/rules.mk new file mode 100644 index 000000000..699fc3395 --- /dev/null +++ b/keyboards/moon/rules.mk @@ -0,0 +1,77 @@ +# Project specific files +SRC += i2c_master.c pca9555.c matrix.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# Supported layouts +LAYOUTS = tkl_ansi tkl_iso + +# Build Options +# change yes to no to disable +# +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 = yes # 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 = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +CUSTOM_MATRIX = yes From ff6a57c3c320a2c73c0040337c677d8b2455c3ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klemen=20Ko=C5=A1ir?= Date: Wed, 29 May 2019 03:05:07 +0900 Subject: [PATCH 128/341] [Kenyboard] Add ansi_split_space_rshift layout to DZ60 (#6004) * [DZ60] Add ansi_split_space_rshift layout * [DZ60] Add kream keymap * Revert spacebar sizes --- keyboards/dz60/dz60.h | 27 +++++++++++++++++++++++++++ keyboards/dz60/info.json | 6 +++++- keyboards/dz60/keymaps/kream/keymap.c | 17 +++++++++++++++++ keyboards/dz60/keymaps/kream/rules.mk | 3 +++ 4 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 keyboards/dz60/keymaps/kream/keymap.c create mode 100644 keyboards/dz60/keymaps/kream/rules.mk diff --git a/keyboards/dz60/dz60.h b/keyboards/dz60/dz60.h index fb4a14c7d..f435c4072 100644 --- a/keyboards/dz60/dz60.h +++ b/keyboards/dz60/dz60.h @@ -197,6 +197,33 @@ { k40, k41, KC_NO, k43, k44, KC_NO, k46, KC_NO, k48, KC_NO, k4a, k4b, KC_NO, k4d, k4e } \ } +/* LAYOUT_60_ansi_split_space_rshift + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0e │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │10 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │1d │1e │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │20 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │2d │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │30 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3d │3e │ + * ├────┬───┴┬──┴─┬─┴───┴───┴┬──┴─┬─┴───┴──┬┴───┼───┴┬────┬┴───┤ + * │40 │41 │43 │44 │46 │48 │4a │4b │4d │4e │ + * └────┴────┴────┴──────────┴────┴────────┴────┴────┴────┴────┘ +*/ +#define LAYOUT_60_ansi_split_space_rshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, \ + k40, k41, k43, k44, k46, k48, k4a, k4b, k4d, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO, k0e }, \ + { k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ + { k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3d, k3e }, \ + { k40, k41, KC_NO, k43, k44, KC_NO, k46, KC_NO, k48, KC_NO, k4a, k4b, KC_NO, k4d, k4e } \ +} + /* LAYOUT_60_iso * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0e │ diff --git a/keyboards/dz60/info.json b/keyboards/dz60/info.json index 1eb2d6c8c..aca960dff 100644 --- a/keyboards/dz60/info.json +++ b/keyboards/dz60/info.json @@ -26,9 +26,13 @@ "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] }, "LAYOUT_60_ansi_split": { - "key_count": 61, + "key_count": 63, "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"label":"FN", "x":6.00, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] }, + "LAYOUT_60_ansi_split_space_rshift": { + "key_count": 64, + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"FN", "x":14, "y": 3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"label":"FN", "x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, "LAYOUT_60_iso": { "key_count": 62, "layout": [{"label":"¬", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"£", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] diff --git a/keyboards/dz60/keymaps/kream/keymap.c b/keyboards/dz60/keymaps/kream/keymap.c new file mode 100644 index 000000000..2c74de482 --- /dev/null +++ b/keyboards/dz60/keymaps/kream/keymap.c @@ -0,0 +1,17 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi_split_space_rshift( + 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_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, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_NO, KC_SPC, KC_CAPS, KC_NO, KC_NO, KC_ENT), + + [1] = LAYOUT_60_ansi_split_space_rshift( + 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, + _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_PSCR, KC_GRV, KC_TILD, _______, + _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, + _______, KC_SLCK, KC_PAUS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; diff --git a/keyboards/dz60/keymaps/kream/rules.mk b/keyboards/dz60/keymaps/kream/rules.mk new file mode 100644 index 000000000..6a82f21b3 --- /dev/null +++ b/keyboards/dz60/keymaps/kream/rules.mk @@ -0,0 +1,3 @@ +MOUSEKEY_ENABLE=no +BACKLIGHT_ENABLE=no +RGBLIGHT_ENABLE=no From 4d46489a2ac4ff7099e9b7498e34c6201f0b14cb Mon Sep 17 00:00:00 2001 From: moyi4681 Date: Wed, 29 May 2019 02:20:39 +0800 Subject: [PATCH 129/341] [Keyboard] add geekboards 8key macro-pad tester (#5940) * add geekboards 8key macro-pad tester * Update readme.md * Update keyboards/geekboards/tester/rules.mk Co-Authored-By: fauxpark * Update keyboards/geekboards/tester/keymaps/default/keymap.c Co-Authored-By: fauxpark * Update keyboards/geekboards/tester/keymaps/default/keymap.c Co-Authored-By: fauxpark * Update keyboards/geekboards/tester/keymaps/default/keymap.c Co-Authored-By: fauxpark * Update keyboards/geekboards/tester/keymaps/default/keymap.c Co-Authored-By: fauxpark * Update keymap.c * Update keyboards/geekboards/tester/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/geekboards/tester/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/geekboards/tester/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/geekboards/tester/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/geekboards/tester/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update readme.md * Update tester.c * Update keyboards/geekboards/tester/config.h Co-Authored-By: Drashna Jaelre * Update keyboards/geekboards/tester/rules.mk Co-Authored-By: Drashna Jaelre * Update keyboards/geekboards/tester/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/geekboards/tester/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre --- keyboards/geekboards/tester/config.h | 39 +++++++++++ .../tester/keymaps/default/keymap.c | 23 +++++++ keyboards/geekboards/tester/readme.md | 12 ++++ keyboards/geekboards/tester/rules.mk | 68 +++++++++++++++++++ keyboards/geekboards/tester/tester.c | 56 +++++++++++++++ keyboards/geekboards/tester/tester.h | 10 +++ 6 files changed, 208 insertions(+) create mode 100644 keyboards/geekboards/tester/config.h create mode 100644 keyboards/geekboards/tester/keymaps/default/keymap.c create mode 100644 keyboards/geekboards/tester/readme.md create mode 100644 keyboards/geekboards/tester/rules.mk create mode 100644 keyboards/geekboards/tester/tester.c create mode 100644 keyboards/geekboards/tester/tester.h diff --git a/keyboards/geekboards/tester/config.h b/keyboards/geekboards/tester/config.h new file mode 100644 index 000000000..ac67877ff --- /dev/null +++ b/keyboards/geekboards/tester/config.h @@ -0,0 +1,39 @@ +#pragma once + +#include "config_common.h" + + +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1319 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Geekboards +#define PRODUCT Geekboards Tester +#define DESCRIPTION Geekboards 8-keys macropad + + +#define MATRIX_ROWS 2 +#define MATRIX_COLS 4 + +#define MATRIX_ROW_PINS { B0, D4} +#define MATRIX_COL_PINS { F7, F6, D2, D3} +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW +#define LOCKING_SUPPORT_ENABL +#define LOCKING_RESYNC_ENABLE + +#define DEBOUNCE 3 +#define RGB_DISABLE_AFTER_TIMEOUT 0 +#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define RGB_MATRIX_KEYPRESSES +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_MULTISPLASH +#define DISABLE_RGB_MATRIX_SOLID_SPLASH +#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_ADDR_2 0b1110101 + +#define DRIVER_COUNT 2 +#define DRIVER_1_LED_TOTAL 8 +#define DRIVER_2_LED_TOTAL 0 +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/geekboards/tester/keymaps/default/keymap.c b/keyboards/geekboards/tester/keymaps/default/keymap.c new file mode 100644 index 000000000..e68f15f63 --- /dev/null +++ b/keyboards/geekboards/tester/keymaps/default/keymap.c @@ -0,0 +1,23 @@ +#include QMK_KEYBOARD_H +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT( /* Base */ + RGB_MOD, KC_1, KC_2, KC_3, + KC_4, KC_5, KC_6, MO(1) + ), +[1] = LAYOUT( /* Base */ + KC_ESC, KC_F1, KC_F2, KC_F3, + KC_F4, KC_F5, KC_F6, KC_F7 + ), +}; + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/geekboards/tester/readme.md b/keyboards/geekboards/tester/readme.md new file mode 100644 index 000000000..7da069308 --- /dev/null +++ b/keyboards/geekboards/tester/readme.md @@ -0,0 +1,12 @@ +Geekboards 8-keys macropad +===== + +Keyboard Maintainer: [dztech](https://github.com/moyi4681) +Hardware Supported: Geekboards 8-keys macropad +Hardware Availability: geekboards.ru(https://geekboards.ru/) + +Make example for this keyboard (after setting up your build environment): + + make geekboards/tester:default + +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). diff --git a/keyboards/geekboards/tester/rules.mk b/keyboards/geekboards/tester/rules.mk new file mode 100644 index 000000000..7e8d595fb --- /dev/null +++ b/keyboards/geekboards/tester/rules.mk @@ -0,0 +1,68 @@ +# MCU name +MCU = atmega32u4 + +# project specific files +#SRC = + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Boot Section +BOOTLOADER = qmk-dfu + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +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 on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +RGB_MATRIX_ENABLE = yes # Use RGB matrix diff --git a/keyboards/geekboards/tester/tester.c b/keyboards/geekboards/tester/tester.c new file mode 100644 index 000000000..4fab1a701 --- /dev/null +++ b/keyboards/geekboards/tester/tester.c @@ -0,0 +1,56 @@ +#include "tester.h" +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, C1_1, C3_2, C4_2}, //A1 + {0, C1_2, C2_2, C4_3}, //A2 + {0, C1_3, C2_3, C3_3}, //A3 + {0, C1_4, C2_4, C3_4}, //A4 + {0, C1_5, C2_5, C3_5}, //A5 + {0, C1_6, C2_6, C3_6}, //A6 + {0, C1_7, C2_7, C3_7}, //A7 + {0, C1_8, C2_8, C3_8}, //A8 +}; + +led_config_t g_led_config = { +{ + { 0, 1, 2, 3}, + { 4, 5, 6, 7} +}, +{ + { 0, 0 }, { 75, 0 }, { 151, 0 }, { 224, 0 }, { 0, 64 }, { 75, 64 }, { 151, 64 }, { 224, 64 } +}, +{ + 4, 4, 4, 4, 4, 4, 4, 4 +} +}; + + + +void matrix_init_kb(void) { + matrix_init_user(); +} + +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + return process_record_user(keycode, record); +} + +void suspend_power_down_kb(void) +{ + rgb_matrix_set_suspend_state(true); + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb(void) +{ + rgb_matrix_set_suspend_state(false); + suspend_wakeup_init_user(); +} diff --git a/keyboards/geekboards/tester/tester.h b/keyboards/geekboards/tester/tester.h new file mode 100644 index 000000000..28c555f0b --- /dev/null +++ b/keyboards/geekboards/tester/tester.h @@ -0,0 +1,10 @@ +#pragma once +#include "quantum.h" +#define LAYOUT( \ + k00, k01, k02, k03,\ + k10, k11, k12, k13\ +) \ +{ \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 } \ +} From a31c2ac03e78078f796df6e6cca08186368a1d72 Mon Sep 17 00:00:00 2001 From: Elliot Powell <32494740+e11i0t23@users.noreply.github.com> Date: Tue, 28 May 2019 19:35:19 +0100 Subject: [PATCH 130/341] [Keyboard] Merge Commissions to repo (#5995) * Moved commisions to one folder * Update keyboards/ep/comsn/hs68/config.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Resolve merge issues * Fix comiplation issues --- keyboards/ep/comsn/hs68/config.h | 59 +++ keyboards/ep/comsn/hs68/hs68.c | 43 +++ keyboards/ep/comsn/hs68/hs68.h | 42 ++ keyboards/ep/comsn/hs68/info.json | 364 ++++++++++++++++++ .../ep/comsn/hs68/keymaps/default/keymap.c | 27 ++ keyboards/ep/comsn/hs68/readme.md | 13 + keyboards/ep/comsn/hs68/rules.mk | 80 ++++ keyboards/ep/comsn/mollydooker/config.h | 214 ++++++++++ keyboards/ep/comsn/mollydooker/info.json | 96 +++++ .../mollydooker/keymaps/default/keymap.c | 55 +++ keyboards/ep/comsn/mollydooker/mollydooker.c | 43 +++ keyboards/ep/comsn/mollydooker/mollydooker.h | 41 ++ keyboards/ep/comsn/mollydooker/readme.md | 13 + keyboards/ep/comsn/mollydooker/rules.mk | 80 ++++ keyboards/ep/comsn/tf_longeboye/config.h | 64 +++ keyboards/ep/comsn/tf_longeboye/info.json | 99 +++++ .../tf_longeboye/keymaps/default/keymap.c | 38 ++ keyboards/ep/comsn/tf_longeboye/readme.md | 11 + keyboards/ep/comsn/tf_longeboye/rules.mk | 80 ++++ .../ep/comsn/tf_longeboye/tf__longeboye.c | 43 +++ .../ep/comsn/tf_longeboye/tf_longeboye.h | 40 ++ 21 files changed, 1545 insertions(+) create mode 100644 keyboards/ep/comsn/hs68/config.h create mode 100644 keyboards/ep/comsn/hs68/hs68.c create mode 100644 keyboards/ep/comsn/hs68/hs68.h create mode 100644 keyboards/ep/comsn/hs68/info.json create mode 100644 keyboards/ep/comsn/hs68/keymaps/default/keymap.c create mode 100644 keyboards/ep/comsn/hs68/readme.md create mode 100644 keyboards/ep/comsn/hs68/rules.mk create mode 100644 keyboards/ep/comsn/mollydooker/config.h create mode 100644 keyboards/ep/comsn/mollydooker/info.json create mode 100644 keyboards/ep/comsn/mollydooker/keymaps/default/keymap.c create mode 100644 keyboards/ep/comsn/mollydooker/mollydooker.c create mode 100644 keyboards/ep/comsn/mollydooker/mollydooker.h create mode 100644 keyboards/ep/comsn/mollydooker/readme.md create mode 100644 keyboards/ep/comsn/mollydooker/rules.mk create mode 100644 keyboards/ep/comsn/tf_longeboye/config.h create mode 100644 keyboards/ep/comsn/tf_longeboye/info.json create mode 100644 keyboards/ep/comsn/tf_longeboye/keymaps/default/keymap.c create mode 100644 keyboards/ep/comsn/tf_longeboye/readme.md create mode 100644 keyboards/ep/comsn/tf_longeboye/rules.mk create mode 100644 keyboards/ep/comsn/tf_longeboye/tf__longeboye.c create mode 100644 keyboards/ep/comsn/tf_longeboye/tf_longeboye.h diff --git a/keyboards/ep/comsn/hs68/config.h b/keyboards/ep/comsn/hs68/config.h new file mode 100644 index 000000000..db633a250 --- /dev/null +++ b/keyboards/ep/comsn/hs68/config.h @@ -0,0 +1,59 @@ +/* +Copyright 2019 Elliot Powell + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6868 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Elliot Powell +#define PRODUCT ephs68 +#define DESCRIPTION A Hotswapable keyboard for kayak + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS \ + { B6, B5, B4, D0, F6 } +#define MATRIX_COL_PINS \ + { B0, B1, B3, B2, B7, D3, F1, D5, D6, D7, F4, F5, C7, C6, F0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/ep/comsn/hs68/hs68.c b/keyboards/ep/comsn/hs68/hs68.c new file mode 100644 index 000000000..fdde3ad78 --- /dev/null +++ b/keyboards/ep/comsn/hs68/hs68.c @@ -0,0 +1,43 @@ +/* Copyright 2019 Elliot Powell + * + * 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 . + */ +#include "hs68.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/ep/comsn/hs68/hs68.h b/keyboards/ep/comsn/hs68/hs68.h new file mode 100644 index 000000000..394208c55 --- /dev/null +++ b/keyboards/ep/comsn/hs68/hs68.h @@ -0,0 +1,42 @@ +/* Copyright 2019 Elliot Powell + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define xxx KC_NO + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E \ +) { \ + {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E}, \ + {K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, xxx, K1E}, \ + {K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E}, \ + {K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E}, \ + { K40, K41, K42, xxx, xxx, xxx, K46, xxx, xxx, xxx, K4A, K4B, K4C, K4D, K4E } \ + } diff --git a/keyboards/ep/comsn/hs68/info.json b/keyboards/ep/comsn/hs68/info.json new file mode 100644 index 000000000..957684bc5 --- /dev/null +++ b/keyboards/ep/comsn/hs68/info.json @@ -0,0 +1,364 @@ +{ + "keyboard_name": "EPHS68", + "maintainer": "Elliot Powell (u/e11i0t23)", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + { + "label": "ESC", + "x": 0, + "y": 0 + }, + { + "label": "!", + "x": 1, + "y": 0 + }, + { + "label": "\"", + "x": 2, + "y": 0 + }, + { + "label": "\u00a3", + "x": 3, + "y": 0 + }, + { + "label": "$", + "x": 4, + "y": 0 + }, + { + "label": "%", + "x": 5, + "y": 0 + }, + { + "label": "^", + "x": 6, + "y": 0 + }, + { + "label": "&", + "x": 7, + "y": 0 + }, + { + "label": "*", + "x": 8, + "y": 0 + }, + { + "label": "(", + "x": 9, + "y": 0 + }, + { + "label": ")", + "x": 10, + "y": 0 + }, + { + "label": "_", + "x": 11, + "y": 0 + }, + { + "label": "+", + "x": 12, + "y": 0 + }, + { + "label": "Backspace", + "x": 13, + "y": 0, + "w": 2 + }, + { + "label": "GRAV", + "x": 15, + "y": 0 + }, + { + "label": "Tab", + "x": 0, + "y": 1, + "w": 1.5 + }, + { + "label": "Q", + "x": 1.5, + "y": 1 + }, + { + "label": "W", + "x": 2.5, + "y": 1 + }, + { + "label": "E", + "x": 3.5, + "y": 1 + }, + { + "label": "R", + "x": 4.5, + "y": 1 + }, + { + "label": "T", + "x": 5.5, + "y": 1 + }, + { + "label": "Y", + "x": 6.5, + "y": 1 + }, + { + "label": "U", + "x": 7.5, + "y": 1 + }, + { + "label": "I", + "x": 8.5, + "y": 1 + }, + { + "label": "O", + "x": 9.5, + "y": 1 + }, + { + "label": "P", + "x": 10.5, + "y": 1 + }, + { + "label": "{", + "x": 11.5, + "y": 1 + }, + { + "label": "}", + "x": 12.5, + "y": 1 + }, + { + "label": "DEL", + "x": 15, + "y": 1 + }, + { + "label": "Caps Lock", + "x": 0, + "y": 2, + "w": 1.75 + }, + { + "label": "A", + "x": 1.75, + "y": 2 + }, + { + "label": "S", + "x": 2.75, + "y": 2 + }, + { + "label": "D", + "x": 3.75, + "y": 2 + }, + { + "label": "F", + "x": 4.75, + "y": 2 + }, + { + "label": "G", + "x": 5.75, + "y": 2 + }, + { + "label": "H", + "x": 6.75, + "y": 2 + }, + { + "label": "J", + "x": 7.75, + "y": 2 + }, + { + "label": "K", + "x": 8.75, + "y": 2 + }, + { + "label": "L", + "x": 9.75, + "y": 2 + }, + { + "label": ":", + "x": 10.75, + "y": 2 + }, + { + "label": "@", + "x": 11.75, + "y": 2 + }, + { + "label": "~", + "x": 12.75, + "y": 2 + }, + { + "label": "Enter", + "x": 13.75, + "y": 1, + "w": 1.25, + "h": 2 + }, + { + "label": "PGUP", + "x": 15, + "y": 2 + }, + { + "label": "Shift", + "x": 0, + "y": 3, + "w": 1.25 + }, + { + "label": "|", + "x": 1.25, + "y": 3 + }, + { + "label": "Z", + "x": 2.25, + "y": 3 + }, + { + "label": "X", + "x": 3.25, + "y": 3 + }, + { + "label": "C", + "x": 4.25, + "y": 3 + }, + { + "label": "V", + "x": 5.25, + "y": 3 + }, + { + "label": "B", + "x": 6.25, + "y": 3 + }, + { + "label": "N", + "x": 7.25, + "y": 3 + }, + { + "label": "M", + "x": 8.25, + "y": 3 + }, + { + "label": "<", + "x": 9.25, + "y": 3 + }, + { + "label": ">", + "x": 10.25, + "y": 3 + }, + { + "label": "?", + "x": 11.25, + "y": 3 + }, + { + "label": "Shift", + "x": 12.25, + "y": 3, + "w": 1.75 + }, + { + "label": "UP", + "x": 14, + "y": 3 + }, + { + "label": "PGDN", + "x": 15, + "y": 3 + }, + { + "label": "Ctrl", + "x": 0, + "y": 4, + "w": 1.25 + }, + { + "label": "Win", + "x": 1.25, + "y": 4, + "w": 1.25 + }, + { + "label": "Alt", + "x": 2.5, + "y": 4, + "w": 1.25 + }, + { + "x": 3.75, + "y": 4, + "w": 6.25 + }, + { + "label": "AltGr", + "x": 10, + "y": 4, + "w": 1.25 + }, + { + "label": "Win", + "x": 11.25, + "y": 4, + "w": 1.25 + }, + { + "label": "LEFT", + "x": 13, + "y": 4 + }, + { + "label": "DOWN", + "x": 14, + "y": 4 + }, + { + "label": "RIGHT", + "x": 15, + "y": 4 + } + ] + } + } +} diff --git a/keyboards/ep/comsn/hs68/keymaps/default/keymap.c b/keyboards/ep/comsn/hs68/keymaps/default/keymap.c new file mode 100644 index 000000000..b2972da6d --- /dev/null +++ b/keyboards/ep/comsn/hs68/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2019 Elliot Powell + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, 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_INS, + 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_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUBS, KC_ENT, KC_END, + KC_LSFT, KC_NUHS, 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_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RIGHT + ), +}; diff --git a/keyboards/ep/comsn/hs68/readme.md b/keyboards/ep/comsn/hs68/readme.md new file mode 100644 index 000000000..0f230208f --- /dev/null +++ b/keyboards/ep/comsn/hs68/readme.md @@ -0,0 +1,13 @@ +# hs68 + +Hotswap 68% deisnged for the Kayak + +Keyboard Maintainer: [e11i0t23](https://github.com/e11i0t23) +Hardware Supported: ephs68 pcb. Kayak case kits +Hardware Availability: None + +Make example for this keyboard (after setting up your build environment): + + make ep/comsn/hs68:default + +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). diff --git a/keyboards/ep/comsn/hs68/rules.mk b/keyboards/ep/comsn/hs68/rules.mk new file mode 100644 index 000000000..b7d3b9b52 --- /dev/null +++ b/keyboards/ep/comsn/hs68/rules.mk @@ -0,0 +1,80 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/ep/comsn/mollydooker/config.h b/keyboards/ep/comsn/mollydooker/config.h new file mode 100644 index 000000000..3ba661525 --- /dev/null +++ b/keyboards/ep/comsn/mollydooker/config.h @@ -0,0 +1,214 @@ +/* +Copyright 2019 Elliot Powell + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x9696 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Elliot Powell +#define PRODUCT mollydooker +#define DESCRIPTION Custom southpaw replacement PCB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 19 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS \ + { F4, F5, F6, F7, D2 } +#define MATRIX_COL_PINS \ + { B1, B2, B3, E6, B7, F1, F0, D0, D1, D7, D5, D4, D6, B4, B5, D3, B6, C6, C7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE +#define RGB_DI_PIN B0 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 84 +#define RGBLIGHT_LIMIT_VAL 35 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ diff --git a/keyboards/ep/comsn/mollydooker/info.json b/keyboards/ep/comsn/mollydooker/info.json new file mode 100644 index 000000000..6ede5c1d8 --- /dev/null +++ b/keyboards/ep/comsn/mollydooker/info.json @@ -0,0 +1,96 @@ +{ + "keyboard_name": "mollydooker", + "maintainer": "Elliot Powell (u/e11i0t23)", + "width": 20, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "VolDn", "x": 0, "y": 0 }, + { "label": "VolUp", "x": 1, "y": 0 }, + { "label": "Mute", "x": 2, "y": 0 }, + { "label": "~", "x": 3, "y": 0 }, + { "label": "Esc", "x": 4, "y": 0 }, + { "label": "!", "x": 5, "y": 0 }, + { "label": "@", "x": 6, "y": 0 }, + { "label": "#", "x": 7, "y": 0 }, + { "label": "$", "x": 8, "y": 0 }, + { "label": "%", "x": 9, "y": 0 }, + { "label": "^", "x": 10, "y": 0 }, + { "label": "&", "x": 11, "y": 0 }, + { "label": "*", "x": 12, "y": 0 }, + { "label": "(", "x": 13, "y": 0 }, + { "label": ")", "x": 14, "y": 0 }, + { "label": "_", "x": 15, "y": 0 }, + { "label": "+", "x": 16, "y": 0 }, + { "label": "Backspace", "x": 17, "y": 0, "w": 2 }, + { "label": "Del", "x": 19, "y": 0 }, + { "label": "7", "x": 0, "y": 1 }, + { "label": "8", "x": 1, "y": 1 }, + { "label": "9", "x": 2, "y": 1 }, + { "label": "+", "x": 3, "y": 1, "h": 2 }, + { "label": "Tab", "x": 4, "y": 1, "w": 1.5 }, + { "label": "Q", "x": 5.5, "y": 1 }, + { "label": "W", "x": 6.5, "y": 1 }, + { "label": "E", "x": 7.5, "y": 1 }, + { "label": "R", "x": 8.5, "y": 1 }, + { "label": "T", "x": 9.5, "y": 1 }, + { "label": "Y", "x": 10.5, "y": 1 }, + { "label": "U", "x": 11.5, "y": 1 }, + { "label": "I", "x": 12.5, "y": 1 }, + { "label": "O", "x": 13.5, "y": 1 }, + { "label": "P", "x": 14.5, "y": 1 }, + { "label": "{", "x": 15.5, "y": 1 }, + { "label": "}", "x": 16.5, "y": 1 }, + { "label": "|", "x": 17.5, "y": 1, "w": 1.5 }, + { "label": "PgUp", "x": 19, "y": 1 }, + { "label": "4", "x": 0, "y": 2 }, + { "label": "5", "x": 1, "y": 2 }, + { "label": "6", "x": 2, "y": 2 }, + { "label": "Caps Lock", "x": 4, "y": 2, "w": 1.75 }, + { "label": "A", "x": 5.75, "y": 2 }, + { "label": "S", "x": 6.75, "y": 2 }, + { "label": "D", "x": 7.75, "y": 2 }, + { "label": "F", "x": 8.75, "y": 2 }, + { "label": "G", "x": 9.75, "y": 2 }, + { "label": "H", "x": 10.75, "y": 2 }, + { "label": "J", "x": 11.75, "y": 2 }, + { "label": "K", "x": 12.75, "y": 2 }, + { "label": "L", "x": 13.75, "y": 2 }, + { "label": ":", "x": 14.75, "y": 2 }, + { "label": "\"", "x": 15.75, "y": 2 }, + { "label": "Enter", "x": 16.75, "y": 2, "w": 2.25 }, + { "label": "PgDn", "x": 19, "y": 2 }, + { "label": "1", "x": 0, "y": 3 }, + { "label": "2", "x": 1, "y": 3 }, + { "label": "3", "x": 2, "y": 3 }, + { "label": "Enter", "x": 3, "y": 3, "h": 2 }, + { "label": "Shift", "x": 4, "y": 3, "w": 2.25 }, + { "label": "Z", "x": 6.25, "y": 3 }, + { "label": "X", "x": 7.25, "y": 3 }, + { "label": "C", "x": 8.25, "y": 3 }, + { "label": "V", "x": 9.25, "y": 3 }, + { "label": "B", "x": 10.25, "y": 3 }, + { "label": "N", "x": 11.25, "y": 3 }, + { "label": "M", "x": 12.25, "y": 3 }, + { "label": "<", "x": 13.25, "y": 3 }, + { "label": ">", "x": 14.25, "y": 3 }, + { "label": "?", "x": 15.25, "y": 3 }, + { "label": "Shift", "x": 16.25, "y": 3, "w": 1.75 }, + { "label": "Up", "x": 18, "y": 3 }, + { "label": "fn0", "x": 19, "y": 3 }, + { "label": "0", "x": 0, "y": 4, "w": 2 }, + { "label": ".", "x": 2, "y": 4 }, + { "label": "Ctrl", "x": 4, "y": 4, "w": 1.25 }, + { "label": "Win", "x": 5.25, "y": 4, "w": 1.25 }, + { "label": "Alt", "x": 6.5, "y": 4, "w": 1.25 }, + { "label": "Space", "x": 7.75, "y": 4, "w": 6.25 }, + { "label": "Alt", "x": 14, "y": 4, "w": 1.5 }, + { "label": "Ctrl", "x": 15.5, "y": 4, "w": 1.5 }, + { "label": "Left", "x": 17, "y": 4 }, + { "label": "Down", "x": 18, "y": 4 }, + { "label": "Right", "x": 19, "y": 4 } + ] + } + } +} diff --git a/keyboards/ep/comsn/mollydooker/keymaps/default/keymap.c b/keyboards/ep/comsn/mollydooker/keymaps/default/keymap.c new file mode 100644 index 000000000..a213973cd --- /dev/null +++ b/keyboards/ep/comsn/mollydooker/keymaps/default/keymap.c @@ -0,0 +1,55 @@ +/* Copyright 2019 Elliot Powell + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_NLCK, KC_PSLS, KC_PMNS, RGB_MOD, KC_ESC, 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_DEL, + KC_P7, KC_P8, KC_P9, KC_PPLS, 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_PGUP, + KC_P4, KC_P5, KC_P6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_P1, KC_P2, KC_P3, KC_PENT, 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_UP, KC_F5, + KC_P0, KC_PDOT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), +}; + +int RGB_current_mode; + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif + enum rgb_matrix_effects { + RGB_MATRIX_SOLID_COLOR = 1, + #ifdef RGB_MATRIX_KEYPRESSES + RGB_MATRIX_SOLID_REACTIVE, + #endif + RGB_MATRIX_EFFECT_MAX + }; + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/ep/comsn/mollydooker/mollydooker.c b/keyboards/ep/comsn/mollydooker/mollydooker.c new file mode 100644 index 000000000..d0d6f302e --- /dev/null +++ b/keyboards/ep/comsn/mollydooker/mollydooker.c @@ -0,0 +1,43 @@ +/* Copyright 2019 Elliot Powell + * + * 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 . + */ +#include "mollydooker.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/ep/comsn/mollydooker/mollydooker.h b/keyboards/ep/comsn/mollydooker/mollydooker.h new file mode 100644 index 000000000..0cdac37a0 --- /dev/null +++ b/keyboards/ep/comsn/mollydooker/mollydooker.h @@ -0,0 +1,41 @@ +/* Copyright 2019 Elliot Powell + * + * 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 . + */ +#pragma once +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define xxxx KC_NO + +#define LAYOUT( \ + K100, K101, K102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, k115, k116, k117, k118, \ + K200, k201, K202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, k214, k215, k216, k217, k218, \ + K300, k301, K302, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k314, k315, k317, k318, \ + K400, K401, K402, k403, k404, k405, k406, k407, k408, k409, k410, k411, k412, k413, k414, k416, k417, k418, \ + K500, K502, k504, k505, k506, k509, k513, k514, k516, k517, k518) \ +{ \ + {K100, K101, K102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, k115, k116, k117, k118}, \ + {K200, k201, K202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, k214, k215, k216, k217, k218}, \ + {K300, k301, K302, xxxx, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k314, k315, xxxx, k317, k318}, \ + {K400, K401, K402, k403, k404, k405, k406, k407, k408, k409, k410, k411, k412, k413, k414, xxxx, k416, k417, k418}, \ + {K500, xxxx, K502, xxxx, k504, k505, k506, xxxx, xxxx, k509, xxxx, xxxx, xxxx, k513, k514, xxxx, k516, k517, k518} \ +} diff --git a/keyboards/ep/comsn/mollydooker/readme.md b/keyboards/ep/comsn/mollydooker/readme.md new file mode 100644 index 000000000..c43875fdd --- /dev/null +++ b/keyboards/ep/comsn/mollydooker/readme.md @@ -0,0 +1,13 @@ +# mollydooker + +A southpaw extended 65 replacement PCB with per key RGB + +Keyboard Maintainer: [Elliot Powell](https://github.com/e11i0t23), [/u/e11i0t23](https://reddit.com/u/e11i0t23) +Hardware Supported: mollydooker +Hardware Availability: None + +Make example for this keyboard (after setting up your build environment): + + make ep/comsn/mollydooker:default + +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). diff --git a/keyboards/ep/comsn/mollydooker/rules.mk b/keyboards/ep/comsn/mollydooker/rules.mk new file mode 100644 index 000000000..db4f2edc0 --- /dev/null +++ b/keyboards/ep/comsn/mollydooker/rules.mk @@ -0,0 +1,80 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/ep/comsn/tf_longeboye/config.h b/keyboards/ep/comsn/tf_longeboye/config.h new file mode 100644 index 000000000..e622010db --- /dev/null +++ b/keyboards/ep/comsn/tf_longeboye/config.h @@ -0,0 +1,64 @@ +/* +Copyright 2019 Elliot Powell + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x9696 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Elliot Powell +#define PRODUCT TF Longeboye +#define DESCRIPTION TF Longeboye Designed for Papi SodaMan of MKUK + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 18 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS \ + { B5, B4, D1, D2, D3 } +#define MATRIX_COL_PINS \ + { F4, F5, F6, F7, B1, B3, B2, B6, F0, F1, C7, D5, B7, E6, D7, C6, D4, D0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/ep/comsn/tf_longeboye/info.json b/keyboards/ep/comsn/tf_longeboye/info.json new file mode 100644 index 000000000..5cfa993d3 --- /dev/null +++ b/keyboards/ep/comsn/tf_longeboye/info.json @@ -0,0 +1,99 @@ +{ + "keyboard_name": "tf_longeboye", + "maintainer": "Elliot Powell (u/e11i0t23)", + "width": 21.5, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "!", "x": 1, "y": 0 }, + { "label": "\"", "x": 2, "y": 0 }, + { "label": "\u00a3", "x": 3, "y": 0 }, + { "label": "$", "x": 4, "y": 0 }, + { "label": "%", "x": 5, "y": 0 }, + { "label": "^", "x": 6, "y": 0 }, + { "label": "&", "x": 7, "y": 0 }, + { "label": "*", "x": 8, "y": 0 }, + { "label": "(", "x": 9, "y": 0 }, + { "label": ")", "x": 10, "y": 0 }, + { "label": "_", "x": 11, "y": 0 }, + { "label": "+", "x": 12, "y": 0 }, + { "label": "Backspace", "x": 13, "y": 0, "w": 2 }, + { "label": "Insert", "x": 15.25, "y": 0 }, + { "label": "PgUp", "x": 16.25, "y": 0 }, + { "label": "Num Lock", "x": 17.5, "y": 0 }, + { "label": "/", "x": 18.5, "y": 0 }, + { "label": "*", "x": 19.5, "y": 0 }, + { "label": "-", "x": 20.5, "y": 0 }, + { "label": "Tab", "x": 0, "y": 1, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 1 }, + { "label": "W", "x": 2.5, "y": 1 }, + { "label": "E", "x": 3.5, "y": 1 }, + { "label": "R", "x": 4.5, "y": 1 }, + { "label": "T", "x": 5.5, "y": 1 }, + { "label": "Y", "x": 6.5, "y": 1 }, + { "label": "U", "x": 7.5, "y": 1 }, + { "label": "I", "x": 8.5, "y": 1 }, + { "label": "O", "x": 9.5, "y": 1 }, + { "label": "P", "x": 10.5, "y": 1 }, + { "label": "{", "x": 11.5, "y": 1 }, + { "label": "}", "x": 12.5, "y": 1 }, + { "label": "Delete", "x": 15.25, "y": 1 }, + { "label": "PgDn", "x": 16.25, "y": 1 }, + { "label": "7", "x": 17.5, "y": 1 }, + { "label": "8", "x": 18.5, "y": 1 }, + { "label": "9", "x": 19.5, "y": 1 }, + { "label": "+", "x": 20.5, "y": 1, "h": 2 }, + { "label": "Caps Lock", "x": 0, "y": 2, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 2 }, + { "label": "S", "x": 2.75, "y": 2 }, + { "label": "D", "x": 3.75, "y": 2 }, + { "label": "F", "x": 4.75, "y": 2 }, + { "label": "G", "x": 5.75, "y": 2 }, + { "label": "H", "x": 6.75, "y": 2 }, + { "label": "J", "x": 7.75, "y": 2 }, + { "label": "K", "x": 8.75, "y": 2 }, + { "label": "L", "x": 9.75, "y": 2 }, + { "label": ":", "x": 10.75, "y": 2 }, + { "label": "@", "x": 11.75, "y": 2 }, + { "label": "~", "x": 12.75, "y": 2 }, + { "label": "Enter", "x": 13.75, "y": 1, "w": 1.25, "h": 2 }, + { "label": "4", "x": 17.5, "y": 2 }, + { "label": "5", "x": 18.5, "y": 2 }, + { "label": "6", "x": 19.5, "y": 2 }, + { "label": "Shift", "x": 0, "y": 3, "w": 1.25 }, + { "label": "|", "x": 1.25, "y": 3 }, + { "label": "Z", "x": 2.25, "y": 3 }, + { "label": "X", "x": 3.25, "y": 3 }, + { "label": "C", "x": 4.25, "y": 3 }, + { "label": "V", "x": 5.25, "y": 3 }, + { "label": "B", "x": 6.25, "y": 3 }, + { "label": "N", "x": 7.25, "y": 3 }, + { "label": "M", "x": 8.25, "y": 3 }, + { "label": "<", "x": 9.25, "y": 3 }, + { "label": ">", "x": 10.25, "y": 3 }, + { "label": "?", "x": 11.25, "y": 3 }, + { "label": "Shift", "x": 12.25, "y": 3, "w": 1.75 }, + { "label": "fn", "x": 14, "y": 3 }, + { "label": "\u2191", "x": 15.25, "y": 3 }, + { "label": "1", "x": 17.5, "y": 3 }, + { "label": "2", "x": 18.5, "y": 3 }, + { "label": "3", "x": 19.5, "y": 3 }, + { "label": "Enter", "x": 20.5, "y": 3, "h": 2 }, + { "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 }, + { "label": "Win", "x": 1.25, "y": 4, "w": 1.25 }, + { "label": "Alt", "x": 2.5, "y": 4, "w": 1.25 }, + { "x": 3.75, "y": 4, "w": 6.25 }, + { "label": "Alt Gr", "x": 10, "y": 4, "w": 1.25 }, + { "label": "Fn", "x": 11.25, "y": 4, "w": 1.25 }, + { "label": "Ctrl", "x": 12.5, "y": 4, "w": 1.25 }, + { "label": "\u2190", "x": 14.25, "y": 4 }, + { "label": "\u2193", "x": 15.25, "y": 4 }, + { "label": "\u2192", "x": 16.25, "y": 4 }, + { "label": "0", "x": 17.5, "y": 4, "w": 2 }, + { "label": ".", "x": 19.5, "y": 4 } + ] + } + } +} diff --git a/keyboards/ep/comsn/tf_longeboye/keymaps/default/keymap.c b/keyboards/ep/comsn/tf_longeboye/keymaps/default/keymap.c new file mode 100644 index 000000000..2e9da9b04 --- /dev/null +++ b/keyboards/ep/comsn/tf_longeboye/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +/* Copyright 2019 Elliot Powell + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + + KC_ESC, 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_INS, KC_HOME, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_DEL, KC_END, KC_P7, KC_P8, KC_P9, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + [1] = LAYOUT( /* Base */ + + 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, SGUI(KC_S), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS +), + +}; + + diff --git a/keyboards/ep/comsn/tf_longeboye/readme.md b/keyboards/ep/comsn/tf_longeboye/readme.md new file mode 100644 index 000000000..3bd89fbec --- /dev/null +++ b/keyboards/ep/comsn/tf_longeboye/readme.md @@ -0,0 +1,11 @@ +# TF Longeboye + +Keyboard Maintainer: [Elliot Powell](https://github.com/e11i0t23), [/u/e11i0t23](https://reddit.com/u/e11i0t23) +Hardware Supported: TF Longeboye +Hardware Availability: None + +Make example for this keyboard (after setting up your build environment): + + make ep/comsn/tf_longeboye:default + +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). diff --git a/keyboards/ep/comsn/tf_longeboye/rules.mk b/keyboards/ep/comsn/tf_longeboye/rules.mk new file mode 100644 index 000000000..195c9e502 --- /dev/null +++ b/keyboards/ep/comsn/tf_longeboye/rules.mk @@ -0,0 +1,80 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/ep/comsn/tf_longeboye/tf__longeboye.c b/keyboards/ep/comsn/tf_longeboye/tf__longeboye.c new file mode 100644 index 000000000..9e8141772 --- /dev/null +++ b/keyboards/ep/comsn/tf_longeboye/tf__longeboye.c @@ -0,0 +1,43 @@ +/* Copyright 2019 Elliot Powell + * + * 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 . + */ +#include "tf_longeboye.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/ep/comsn/tf_longeboye/tf_longeboye.h b/keyboards/ep/comsn/tf_longeboye/tf_longeboye.h new file mode 100644 index 000000000..f673ff66d --- /dev/null +++ b/keyboards/ep/comsn/tf_longeboye/tf_longeboye.h @@ -0,0 +1,40 @@ +/* Copyright 2019 Elliot Powell + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K013, K014, K015, K016, K018, K019, K408, K114, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K113, K115, K116, K118, K119, K407, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, K214, K218, K219, K405, K216, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, K318, K319, K404, K316, \ + K400, K401, K402, K406, K410, K411, K413, K414, K415, K416, K418, K403 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K013, K014, K015, K016, K018, K019, }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K113, K114, K115, K116, K118, K119, }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, K214, KC_NO, K216, K218, K219, }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, K316, K318, K319, }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, KC_NO, K410, K411, K413, K414, K415, K416, K418, KC_NO, } \ +} From 70a7b84dabf3e8dc292f0aaf966a10ba9a8707f8 Mon Sep 17 00:00:00 2001 From: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> Date: Tue, 28 May 2019 20:38:47 +0200 Subject: [PATCH 131/341] Clean up duped filenames om qmk.fm (#5822) Removes all binaries that don't correspond to an entry in the .keyboards file --- util/travis_compiled_push.sh | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index d76030f83..25ed83fb0 100755 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -55,8 +55,29 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then # rm -f compiled/*.hex # ignore errors here - # In theory, this is more flexible, and will allow for additional expansion of additional types of files and other names - mv ../qmk_firmware/*_default.*[hb][ei][xn] ./compiled/ || true + # In theory, this is more flexible, and will allow for additional expansion of additional types of files and other names + mv ../qmk_firmware/*_default.*{hex,bin} ./compiled/ || true + + # get the list of keyboards + readarray -t keyboards < .keyboards + + # replace / with _ + keyboards=("${keyboards[@]//[\/]/_}") + + # remove all binaries that don't belong to a keyboard in .keyboards + for file in "./compiled"/* ; do + match=0 + for keyboard in "${keyboards[@]}" ; do + if [[ ${file##*/} = "${keyboard}_default.bin" ]] || [[ ${file##*/} = "${keyboard}_default.hex" ]]; then + match=1 + break + fi + done + if [[ $match = 0 ]]; then + echo "Removing deprecated binary: $file" + rm "$file" + fi + done bash _util/generate_keyboard_page.sh git add -A From 6d6646de049a77dab189bcd6efd99f505fc3aa9e Mon Sep 17 00:00:00 2001 From: Ryan Caltabiano Date: Sun, 26 May 2019 07:37:40 -0500 Subject: [PATCH 132/341] Fixing matrix_scan so it properly returns changed status --- quantum/matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/matrix.c b/quantum/matrix.c index ca63f50f2..e222a3097 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -326,5 +326,5 @@ uint8_t matrix_scan(void) debounce(raw_matrix, matrix, MATRIX_ROWS, changed); matrix_scan_quantum(); - return 1; + return (uint8_t)changed; } From 03bc8e71e6cf6881e9f899125e8486375eb488ef Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Tue, 28 May 2019 15:47:59 -0700 Subject: [PATCH 133/341] Duck Octagon V1 Configurator cleanup (#5957) * Expand info.json formatting to one line per key This is a white-space-only change. Make it easier for me to read the file. * Make sure every key object has a label Going to be using them shortly. * Insert key identifiers from v1.h into info.json labels Shows where each key is located in the switch matrix. * Move K5O to its correct location on the top row * Adjust white space in v1.h At this point, the macros for LAYOUT and LAYOUT_75_ansi are 100% identical, except for their names. * Redefine LAYOUT_75_ansi as an alias of LAYOUT No need for two code blocks with the same data. * Correct visual positioning in info.json - move Pause 1u to the right - move K5O to the top row, between Print Screen and Pause - move Enter key 1u to the left and 1u wider (1.25u to 2.25u) * Delete key identifiers from info.json labels Don't need them anymore now that we know where everything is. I'm calling K5O as ScrLk so it has a label, even though that's not actually what it is. Also gave the Spacebar a label because I prefer when all the keys have labels. * Enable 75_ansi Community Layout support * Reassign layout macro as LAYOUT_75_ansi and delete macro alias Configure the codebase so LAYOUT_75_ansi is the only layout macro available. * Add key_count key to info.json data --- keyboards/duck/octagon/v1/info.json | 90 ++++++++++++++++++++++++++++- keyboards/duck/octagon/v1/rules.mk | 3 +- keyboards/duck/octagon/v1/v1.h | 16 ----- 3 files changed, 90 insertions(+), 19 deletions(-) diff --git a/keyboards/duck/octagon/v1/info.json b/keyboards/duck/octagon/v1/info.json index 1feff9519..ff4526700 100644 --- a/keyboards/duck/octagon/v1/info.json +++ b/keyboards/duck/octagon/v1/info.json @@ -5,8 +5,94 @@ "width": 16, "height": 6, "layouts": { - "LAYOUT": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Home", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Page Up", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"x":12.75, "y":3}, {"label":"Enter", "x":13.75, "y":3, "w":1.25}, {"label":"Page Down", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"End", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Fn", "x":11, "y":5}, {"label":"Ctrl", "x":12, "y":5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] + "LAYOUT_75_ansi": { + "key_count": 84, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":1, "y":0}, + {"label":"F2", "x":2, "y":0}, + {"label":"F3", "x":3, "y":0}, + {"label":"F4", "x":4, "y":0}, + {"label":"F5", "x":5, "y":0}, + {"label":"F6", "x":6, "y":0}, + {"label":"F7", "x":7, "y":0}, + {"label":"F8", "x":8, "y":0}, + {"label":"F9", "x":9, "y":0}, + {"label":"F10", "x":10, "y":0}, + {"label":"F11", "x":11, "y":0}, + {"label":"F12", "x":12, "y":0}, + {"label":"PrtSc", "x":13, "y":0}, + {"label":"ScrLk", "x":14, "y":0}, + {"label":"Pause", "x":15, "y":0}, + {"label":"~", "x":0, "y":1}, + {"label":"!", "x":1, "y":1}, + {"label":"@", "x":2, "y":1}, + {"label":"#", "x":3, "y":1}, + {"label":"$", "x":4, "y":1}, + {"label":"%", "x":5, "y":1}, + {"label":"^", "x":6, "y":1}, + {"label":"&", "x":7, "y":1}, + {"label":"*", "x":8, "y":1}, + {"label":"(", "x":9, "y":1}, + {"label":")", "x":10, "y":1}, + {"label":"_", "x":11, "y":1}, + {"label":"+", "x":12, "y":1}, + {"label":"Backspace", "x":13, "y":1, "w":2}, + {"label":"Home", "x":15, "y":1}, + {"label":"Tab", "x":0, "y":2, "w":1.5}, + {"label":"Q", "x":1.5, "y":2}, + {"label":"W", "x":2.5, "y":2}, + {"label":"E", "x":3.5, "y":2}, + {"label":"R", "x":4.5, "y":2}, + {"label":"T", "x":5.5, "y":2}, + {"label":"Y", "x":6.5, "y":2}, + {"label":"U", "x":7.5, "y":2}, + {"label":"I", "x":8.5, "y":2}, + {"label":"O", "x":9.5, "y":2}, + {"label":"P", "x":10.5, "y":2}, + {"label":"{", "x":11.5, "y":2}, + {"label":"}", "x":12.5, "y":2}, + {"label":"|", "x":13.5, "y":2, "w":1.5}, + {"label":"Page Up", "x":15, "y":2}, + {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, + {"label":"A", "x":1.75, "y":3}, + {"label":"S", "x":2.75, "y":3}, + {"label":"D", "x":3.75, "y":3}, + {"label":"F", "x":4.75, "y":3}, + {"label":"G", "x":5.75, "y":3}, + {"label":"H", "x":6.75, "y":3}, + {"label":"J", "x":7.75, "y":3}, + {"label":"K", "x":8.75, "y":3}, + {"label":"L", "x":9.75, "y":3}, + {"label":":", "x":10.75, "y":3}, + {"label":"\"", "x":11.75, "y":3}, + {"label":"Enter", "x":12.75, "y":3, "w":2.25}, + {"label":"Page Down", "x":15, "y":3}, + {"label":"Shift", "x":0, "y":4, "w":2.25}, + {"label":"Z", "x":2.25, "y":4}, + {"label":"X", "x":3.25, "y":4}, + {"label":"C", "x":4.25, "y":4}, + {"label":"V", "x":5.25, "y":4}, + {"label":"B", "x":6.25, "y":4}, + {"label":"N", "x":7.25, "y":4}, + {"label":"M", "x":8.25, "y":4}, + {"label":"<", "x":9.25, "y":4}, + {"label":">", "x":10.25, "y":4}, + {"label":"?", "x":11.25, "y":4}, + {"label":"Shift", "x":12.25, "y":4, "w":1.75}, + {"label":"\u2191", "x":14, "y":4}, + {"label":"End", "x":15, "y":4}, + {"label":"Ctrl", "x":0, "y":5, "w":1.25}, + {"label":"Win", "x":1.25, "y":5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5, "w":1.25}, + {"label":"Space", "x":3.75, "y":5, "w":6.25}, + {"label":"Alt", "x":10, "y":5}, + {"label":"Fn", "x":11, "y":5}, + {"label":"Ctrl", "x":12, "y":5}, + {"label":"\u2190", "x":13, "y":5}, + {"label":"\u2193", "x":14, "y":5}, + {"label":"\u2192", "x":15, "y":5} + ] } } } diff --git a/keyboards/duck/octagon/v1/rules.mk b/keyboards/duck/octagon/v1/rules.mk index 66d2c8def..889b93ed4 100644 --- a/keyboards/duck/octagon/v1/rules.mk +++ b/keyboards/duck/octagon/v1/rules.mk @@ -69,4 +69,5 @@ RGBLIGHT_ENABLE = yes CUSTOM_MATRIX = yes SRC += matrix.c \ - + +LAYOUTS = 75_ansi diff --git a/keyboards/duck/octagon/v1/v1.h b/keyboards/duck/octagon/v1/v1.h index 471a91a33..9f3d1e369 100644 --- a/keyboards/duck/octagon/v1/v1.h +++ b/keyboards/duck/octagon/v1/v1.h @@ -17,22 +17,6 @@ #include "quantum.h" -#define LAYOUT( \ - K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5P, \ - K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4P, \ - K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3P, \ - K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K5O, K2N, K2P, \ - K1A, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1M, K1N, K1P, \ - K0A, K0B, K0C, K0G, K0J, K0K, K0L, K0M, K0N, K0P \ -) { \ - { K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P }, \ - { K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, KC_NO, K4P }, \ - { K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, KC_NO, K3P }, \ - { K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, KC_NO, K2N, KC_NO, K2P }, \ - { K1A, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, KC_NO, K1M, K1N, KC_NO, K1P }, \ - { K0A, K0B, K0C, KC_NO, KC_NO, K0G, KC_NO, KC_NO, K0J, K0K, K0L, KC_NO, K0M, K0N, KC_NO, K0P } \ -} - #define LAYOUT_75_ansi( \ K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, \ K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4P, \ From bd1cfcd5932c707abf6fe4d3c589c3f35e4d73b7 Mon Sep 17 00:00:00 2001 From: Elliot Powell <32494740+e11i0t23@users.noreply.github.com> Date: Wed, 29 May 2019 04:15:38 +0100 Subject: [PATCH 134/341] [Keyboard] Add support for AKB boards (#5996) * Move boards to akb folder * Updates for PR * fix for PR * Fix info.json --- keyboards/akb/eb46/config.h | 52 ++++++++++++ keyboards/akb/eb46/eb46.c | 43 ++++++++++ keyboards/akb/eb46/eb46.h | 40 ++++++++++ keyboards/akb/eb46/info.json | 58 ++++++++++++++ keyboards/akb/eb46/keymaps/default/keymap.c | 34 ++++++++ keyboards/akb/eb46/readme.md | 13 +++ keyboards/akb/eb46/rules.mk | 80 +++++++++++++++++++ keyboards/akb/raine/config.h | 52 ++++++++++++ keyboards/akb/raine/info.json | 84 ++++++++++++++++++++ keyboards/akb/raine/keymaps/default/keymap.c | 32 ++++++++ keyboards/akb/raine/raine.c | 18 +++++ keyboards/akb/raine/raine.h | 33 ++++++++ keyboards/akb/raine/readme.md | 15 ++++ keyboards/akb/raine/rules.mk | 80 +++++++++++++++++++ 14 files changed, 634 insertions(+) create mode 100644 keyboards/akb/eb46/config.h create mode 100644 keyboards/akb/eb46/eb46.c create mode 100644 keyboards/akb/eb46/eb46.h create mode 100644 keyboards/akb/eb46/info.json create mode 100644 keyboards/akb/eb46/keymaps/default/keymap.c create mode 100644 keyboards/akb/eb46/readme.md create mode 100644 keyboards/akb/eb46/rules.mk create mode 100644 keyboards/akb/raine/config.h create mode 100644 keyboards/akb/raine/info.json create mode 100644 keyboards/akb/raine/keymaps/default/keymap.c create mode 100644 keyboards/akb/raine/raine.c create mode 100644 keyboards/akb/raine/raine.h create mode 100644 keyboards/akb/raine/readme.md create mode 100644 keyboards/akb/raine/rules.mk diff --git a/keyboards/akb/eb46/config.h b/keyboards/akb/eb46/config.h new file mode 100644 index 000000000..965f769cc --- /dev/null +++ b/keyboards/akb/eb46/config.h @@ -0,0 +1,52 @@ +/* +Copyright 2019 Elliot Powell + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x4646 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Elliot Powell +#define PRODUCT eb46 +#define DESCRIPTION eb46 running qmk +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 13 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS \ + { B5, B4, D7, B6 } +#define MATRIX_COL_PINS \ + { B0, B1, B2, B3, B7, D0, D1, D2, D3, D5, D4, D6, C6 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 diff --git a/keyboards/akb/eb46/eb46.c b/keyboards/akb/eb46/eb46.c new file mode 100644 index 000000000..3417b4329 --- /dev/null +++ b/keyboards/akb/eb46/eb46.c @@ -0,0 +1,43 @@ +/* Copyright 2019 Elliot Powell + * + * 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 . + */ +#include "eb46.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/akb/eb46/eb46.h b/keyboards/akb/eb46/eb46.h new file mode 100644 index 000000000..8dd5290b8 --- /dev/null +++ b/keyboards/akb/eb46/eb46.h @@ -0,0 +1,40 @@ +/* Copyright 2019 Elliot Powell + * + * 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 . + */ +#pragma once +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define xxx KC_NO + +#define LAYOUT(\ + k000, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b,\ + k100, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, \ + k200, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, \ + k300, k30, k31, k32, k33, k36, k38, k39, k3a \ +) \ +{ \ + {k000, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b},\ + {k100, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, xxx},\ + {k200, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, xxx},\ + {k300, k30, k31, k32, k33, xxx, xxx, k36, xxx, k38, k39, k3a, xxx} \ +} diff --git a/keyboards/akb/eb46/info.json b/keyboards/akb/eb46/info.json new file mode 100644 index 000000000..5513df397 --- /dev/null +++ b/keyboards/akb/eb46/info.json @@ -0,0 +1,58 @@ +{ + "keyboard_name": "eb46", + "maintainer": "e11i0t23", + "width": 13.25, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "F1", "x": 0, "y": 0 }, + { "label": "Esc", "x": 1.25, "y": 0 }, + { "label": "Q", "x": 2.25, "y": 0 }, + { "label": "W", "x": 3.25, "y": 0 }, + { "label": "E", "x": 4.25, "y": 0 }, + { "label": "R", "x": 5.25, "y": 0 }, + { "label": "T", "x": 6.25, "y": 0 }, + { "label": "Y", "x": 7.25, "y": 0 }, + { "label": "U", "x": 8.25, "y": 0 }, + { "label": "I", "x": 9.25, "y": 0 }, + { "label": "O", "x": 10.25, "y": 0 }, + { "label": "P", "x": 11.25, "y": 0 }, + { "label": "BackSpace", "x": 12.25, "y": 0 }, + { "label": "F2", "x": 0, "y": 1 }, + { "label": "Tab", "x": 1.25, "y": 1, "w": 1.25 }, + { "label": "A", "x": 2.5, "y": 1 }, + { "label": "S", "x": 3.5, "y": 1 }, + { "label": "D", "x": 4.5, "y": 1 }, + { "label": "F", "x": 5.5, "y": 1 }, + { "label": "G", "x": 6.5, "y": 1 }, + { "label": "H", "x": 7.5, "y": 1 }, + { "label": "J", "x": 8.5, "y": 1 }, + { "label": "K", "x": 9.5, "y": 1 }, + { "label": "L", "x": 10.5, "y": 1 }, + { "label": "Enter", "x": 11.5, "y": 1, "w": 1.75 }, + { "label": "F3", "x": 0, "y": 2 }, + { "label": "Shift", "x": 1.25, "y": 2, "w": 1.75 }, + { "label": "Z", "x": 3, "y": 2 }, + { "label": "X", "x": 4, "y": 2 }, + { "label": "C", "x": 5, "y": 2 }, + { "label": "V", "x": 6, "y": 2 }, + { "label": "B", "x": 7, "y": 2 }, + { "label": "N", "x": 8, "y": 2 }, + { "label": "M", "x": 9, "y": 2 }, + { "label": "<", "x": 10, "y": 2 }, + { "label": ">", "x": 11, "y": 2 }, + { "label": "RShift", "x": 12, "y": 2, "w": 1.25 }, + { "label": "F4", "x": 0, "y": 3 }, + { "label": "Ctrl", "x": 1.25, "y": 3, "w": 1.25 }, + { "label": "Win", "x": 2.5, "y": 3 }, + { "label": "Alt", "x": 3.5, "y": 3, "w": 1.25 }, + { "label": "FN0", "x": 4.75, "y": 3, "w": 2.25 }, + { "label": "Space", "x": 7, "y": 3, "w": 2.75 }, + { "label": "Menu", "x": 9.75, "y": 3 }, + { "label": "RAlt", "x": 10.75, "y": 3, "w": 1.25 }, + { "label": "Super", "x": 12.25, "y": 3 } + ] + } + } +} diff --git a/keyboards/akb/eb46/keymaps/default/keymap.c b/keyboards/akb/eb46/keymaps/default/keymap.c new file mode 100644 index 000000000..c2114cc65 --- /dev/null +++ b/keyboards/akb/eb46/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2019 Elliot Powell + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_F5, KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_PGUP, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, + KC_PGDN, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, + KC_ESC, LCTL_T(KC_LBRC), KC_LGUI, KC_LALT, KC_SPC, LT(1, KC_SPC), KC_RALT, MO(2), RCTL_T(KC_RBRC) ), + [1] = LAYOUT( /* Base */ + _______, _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, _______, + _______, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ ), + [2] = LAYOUT( /* Base */ + _______, 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_SCLN, KC_QUOT, KC_NUHS, _______, + _______, _______, KC_NUBS, _______, _______, _______, _______, _______, _______, KC_SLSH, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RESET ), +}; diff --git a/keyboards/akb/eb46/readme.md b/keyboards/akb/eb46/readme.md new file mode 100644 index 000000000..e7d104622 --- /dev/null +++ b/keyboards/akb/eb46/readme.md @@ -0,0 +1,13 @@ +# eb46 + +EB46: A 40% plus macro keys + +Keyboard Maintainer: [Elliot Powell](https://github.com/e11i0t23), [/u/e11i0t23 on reddit](https://reddit.com/u/e11i0t23) +Hardware Supported: EB46 PCB +Hardware Availability: Coming Soon + +Make example for this keyboard (after setting up your build environment): + + make akb/eb46:default + +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). diff --git a/keyboards/akb/eb46/rules.mk b/keyboards/akb/eb46/rules.mk new file mode 100644 index 000000000..195c9e502 --- /dev/null +++ b/keyboards/akb/eb46/rules.mk @@ -0,0 +1,80 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/akb/raine/config.h b/keyboards/akb/raine/config.h new file mode 100644 index 000000000..a28fceef2 --- /dev/null +++ b/keyboards/akb/raine/config.h @@ -0,0 +1,52 @@ +/* +Copyright 2019 Elliot Powell + +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 . +*/ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER AKB +#define PRODUCT Raine M3 +#define DESCRIPTION Raine M3 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* key matrix pins */ +#define MATRIX_ROW_PINS \ + { E6, C6, F7, B2, B0 } +#define MATRIX_COL_PINS \ + { F6, F5, F4, B1, F1, F0, B3, B7, D0, D1, D2, D3, D5, D4, D6, D7 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/akb/raine/info.json b/keyboards/akb/raine/info.json new file mode 100644 index 000000000..0992f86d0 --- /dev/null +++ b/keyboards/akb/raine/info.json @@ -0,0 +1,84 @@ +{ + "keyboard_name": "raine", + "maintainer": "e11i0t23", + "width": 16.25, + "height": 5.25, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "1", "x": 1, "y": 0 }, + { "label": "2", "x": 2, "y": 0 }, + { "label": "3", "x": 3, "y": 0 }, + { "label": "4", "x": 4, "y": 0 }, + { "label": "5", "x": 5, "y": 0 }, + { "label": "6", "x": 6, "y": 0 }, + { "label": "7", "x": 7, "y": 0 }, + { "label": "8", "x": 8, "y": 0 }, + { "label": "9", "x": 9, "y": 0 }, + { "label": "0", "x": 10, "y": 0 }, + { "label": "_", "x": 11, "y": 0 }, + { "label": "BSP", "x": 12, "y": 0 }, + { "label": "Num Lock", "x": 13.25, "y": 0 }, + { "label": "Scroll Lock", "x": 14.25, "y": 0 }, + { "label": "Insert", "x": 15.25, "y": 0 }, + { "label": "Tab", "x": 0, "y": 1, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 1 }, + { "label": "W", "x": 2.5, "y": 1 }, + { "label": "E", "x": 3.5, "y": 1 }, + { "label": "R", "x": 4.5, "y": 1 }, + { "label": "T", "x": 5.5, "y": 1 }, + { "label": "Y", "x": 6.5, "y": 1 }, + { "label": "U", "x": 7.5, "y": 1 }, + { "label": "I", "x": 8.5, "y": 1 }, + { "label": "O", "x": 9.5, "y": 1 }, + { "label": "P", "x": 10.5, "y": 1 }, + { "label": "|", "x": 11.5, "y": 1, "w": 1.5 }, + { "label": "7", "x": 13.25, "y": 1 }, + { "label": "8", "x": 14.25, "y": 1 }, + { "label": "9", "x": 15.25, "y": 1 }, + { "label": "Caps", "x": 0, "y": 2, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 2 }, + { "label": "S", "x": 2.75, "y": 2 }, + { "label": "D", "x": 3.75, "y": 2 }, + { "label": "F", "x": 4.75, "y": 2 }, + { "label": "G", "x": 5.75, "y": 2 }, + { "label": "H", "x": 6.75, "y": 2 }, + { "label": "J", "x": 7.75, "y": 2 }, + { "label": "K", "x": 8.75, "y": 2 }, + { "label": "L", "x": 9.75, "y": 2 }, + { "label": "~", "x": 10.75, "y": 2 }, + { "label": "ENTER", "x": 11.75, "y": 2, "w": 1.25 }, + { "label": "4", "x": 13.25, "y": 2 }, + { "label": "5", "x": 14.25, "y": 2 }, + { "label": "6", "x": 15.25, "y": 2 }, + { "label": "Shift", "x": 0, "y": 3, "w": 1.25 }, + { "label": "|", "x": 1.25, "y": 3 }, + { "label": "Z", "x": 2.25, "y": 3 }, + { "label": "X", "x": 3.25, "y": 3 }, + { "label": "C", "x": 4.25, "y": 3 }, + { "label": "V", "x": 5.25, "y": 3 }, + { "label": "B", "x": 6.25, "y": 3 }, + { "label": "N", "x": 7.25, "y": 3 }, + { "label": "M", "x": 8.25, "y": 3 }, + { "label": "?", "x": 9.25, "y": 3 }, + { "label": "Shift", "x": 10.25, "y": 3, "w": 1.5 }, + { "x": 12, "y": 3.25 }, + { "label": "1", "x": 13.25, "y": 3 }, + { "label": "2", "x": 14.25, "y": 3 }, + { "label": "3", "x": 15.25, "y": 3 }, + { "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 }, + { "label": "Alt", "x": 2.25, "y": 4, "w": 1.25 }, + { "label": "SPLEFT", "x": 3.5, "y": 4, "w": 2.25 }, + { "label": "7U", "x": 5.75, "y": 4 }, + { "label": "SPRIGHT", "x": 6.75, "y": 4, "w": 1.75 }, + { "label": "Menu", "x": 9.5, "y": 4, "w": 1.25 }, + { "x": 11, "y": 4.25 }, + { "x": 12, "y": 4.25 }, + { "x": 13, "y": 4.25 }, + { "label": "0", "x": 14.25, "y": 4 }, + { "label": "Del", "x": 15.25, "y": 4 } + ] + } + } +} diff --git a/keyboards/akb/raine/keymaps/default/keymap.c b/keyboards/akb/raine/keymaps/default/keymap.c new file mode 100644 index 000000000..80e52528b --- /dev/null +++ b/keyboards/akb/raine/keymaps/default/keymap.c @@ -0,0 +1,32 @@ +/* Copyright 2019 Elliot Powell + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_BSPC, KC_NLCK, KC_SLCK, KC_INS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_P7, KC_P8, KC_P9, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_HASH, KC_ENT, KC_P4, KC_P5, KC_P6, + KC_LSFT, KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_SLSH, KC_LSFT, KC_UP, KC_P1, KC_P2, KC_P3, + KC_LCTL, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_DEL), + [1] = LAYOUT( /* Second */ + 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_LBRC, KC_RBRC, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_SCLN, KC_QUOT, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET), +}; + diff --git a/keyboards/akb/raine/raine.c b/keyboards/akb/raine/raine.c new file mode 100644 index 000000000..d73db4409 --- /dev/null +++ b/keyboards/akb/raine/raine.c @@ -0,0 +1,18 @@ +/* +Copyright 2019 Elliot Powell + +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 . +*/ + +#include "raine.h" diff --git a/keyboards/akb/raine/raine.h b/keyboards/akb/raine/raine.h new file mode 100644 index 000000000..fb5cd48cb --- /dev/null +++ b/keyboards/akb/raine/raine.h @@ -0,0 +1,33 @@ +/* +Copyright 2019 Elliot Powell + +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 . +*/ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K311, K312, K313, K314, K315, \ + K400, K402, K404, K405, K407, K409, K410, K412, K413, K414, K415 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, KC_NO, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K311, KC_NO, K312, K313, K314, K315 }, \ + { K400, KC_NO, K402, KC_NO, K404, K405, KC_NO, K407, KC_NO, K409, K410, KC_NO, K412, K413, K414, K415 } \ +} diff --git a/keyboards/akb/raine/readme.md b/keyboards/akb/raine/readme.md new file mode 100644 index 000000000..6aa11a11f --- /dev/null +++ b/keyboards/akb/raine/readme.md @@ -0,0 +1,15 @@ +# Raine-m³ + +![Raine-m³](https://i.imgur.com/da2dZh1.jpg) + +A custom board inspired by both the 1800 layout, and the compact functionality of 40% boards. + +Keyboard Maintainer: [e11i0t23](https://github.com/e11i0t23) +Hardware Supported: Official Raine-m³ PCB +Hardware Availability: Coming Soon + +Make example for this keyboard (after setting up your build environment): + + make akb/raine:default + +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). diff --git a/keyboards/akb/raine/rules.mk b/keyboards/akb/raine/rules.mk new file mode 100644 index 000000000..195c9e502 --- /dev/null +++ b/keyboards/akb/raine/rules.mk @@ -0,0 +1,80 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) From 38d3b7aa45424f47797eae738c04a82377f198c9 Mon Sep 17 00:00:00 2001 From: M-AS Date: Wed, 29 May 2019 10:57:09 +0700 Subject: [PATCH 135/341] [Keyboard] Changed LED positions for Massdrop CTRL and DZ60RGB (#5801) * changed rgb positions and modifiers within RGB matrix thing for CTRL and DZ60RGB * changed CTRL corner LEDs + centered horizontally * whoops - changed CTRL's underglow LEDs back to the underglow flag * whitespace * I changed the right file this time * Fixed DZ60RGB left shift out of position --- keyboards/dztech/dz60rgb/dz60rgb.c | 15 ++++++++------- keyboards/massdrop/ctrl/config_led.c | 28 ++++++++++++++-------------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/keyboards/dztech/dz60rgb/dz60rgb.c b/keyboards/dztech/dz60rgb/dz60rgb.c index 28ac7ce9e..0909ace23 100644 --- a/keyboards/dztech/dz60rgb/dz60rgb.c +++ b/keyboards/dztech/dz60rgb/dz60rgb.c @@ -416,19 +416,20 @@ led_config_t g_led_config = { { { 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, NO_LED, 41 }, { 62, 61, 60, NO_LED, NO_LED, 59, NO_LED, NO_LED, 58, 57, 56, 55, NO_LED, 54 } }, { - { 223, 0 }, { 206, 0 }, { 189, 0 }, { 172, 0 }, { 155, 0 }, { 137, 0 }, { 120, 0 }, { 103, 0 }, { 86, 0 }, { 68, 0 }, { 51, 0 }, { 34, 0 }, { 17, 0 }, { 0, 0 }, - { 223, 16 }, { 206, 16 }, { 189, 16 }, { 172, 16 }, { 155, 16 }, { 137, 16 }, { 120, 16 }, { 103, 16 }, { 86, 16 }, { 68, 16 }, { 51, 16 }, { 34, 16 }, { 17, 16 }, { 0, 16 }, - { 223, 32 }, { 189, 32 }, { 172, 32 }, { 155, 32 }, { 137, 32 }, { 120, 32 }, { 103, 32 }, { 86, 32 }, { 68, 32 }, { 51, 32 }, { 34, 32 }, { 17, 32 }, { 0, 32 }, { 223, 48 }, - { 189, 48 }, { 172, 48 }, { 155, 48 }, { 137, 48 }, { 120, 48 }, { 103, 48 }, { 86, 48 }, { 68, 48 }, { 51, 48 }, { 34, 48 }, { 17, 48 }, { 0, 48 }, { 223, 64 }, { 189, 64 }, - { 172, 64 }, { 155, 64 }, { 137, 64 }, { 86, 64 }, { 34, 64 }, { 17, 64 }, { 0, 64 } + { 216, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 }, + { 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 }, + { 214, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, { 224, 48 }, + { 208, 48 }, { 186, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 36, 48 }, { 9, 48 }, { 224, 64 }, { 208, 64 }, + { 192, 64 }, { 176, 64 }, { 160, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 } }, { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1 } }; + #endif void matrix_init_kb(void) { diff --git a/keyboards/massdrop/ctrl/config_led.c b/keyboards/massdrop/ctrl/config_led.c index 5f1c45207..448793cf5 100644 --- a/keyboards/massdrop/ctrl/config_led.c +++ b/keyboards/massdrop/ctrl/config_led.c @@ -39,31 +39,31 @@ led_config_t g_led_config = { { { 8, 59 }, { 23, 59 }, { 38, 59 }, { 83, 59 }, { 129, 59 }, { 144, 59 }, { 159, 59 }, { 174, 59 }, { 193, 59 }, { 205, 59 }, { 217, 59 }, // Underglow / Border - { 222, 64 }, { 204, 64 }, { 186, 64 }, { 167, 64 }, { 149, 64 }, { 130, 64 }, { 112, 64 }, { 94, 64 }, + { 224, 64 }, { 204, 64 }, { 186, 64 }, { 167, 64 }, { 149, 64 }, { 130, 64 }, { 112, 64 }, { 94, 64 }, { 75, 64 }, { 57, 64 }, { 38, 64 }, { 20, 64 }, { 0, 64 }, { 0, 47 }, { 0, 32 }, { 0, 17 }, { 0, 0 }, { 20, 0 }, { 38, 0 }, { 57, 0 }, { 75, 0 }, { 94, 0 }, { 112, 0 }, { 130, 0 }, - { 149, 0 }, { 167, 0 }, { 186, 0 }, { 204, 0 }, { 222, 1 }, { 224, 17 }, { 224, 32 }, { 224, 47 } + { 149, 0 }, { 167, 0 }, { 186, 0 }, { 204, 0 }, { 224, 0 }, { 224, 17 }, { 224, 32 }, { 224, 47 } }, { // KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 1, 4, + 1, 4, 4, 4, 4, 1, 1, 1, + 1, 4, 4, 4, 4, 1, 1, 1, // KC_GRV, 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_INS, KC_HOME, KC_PGUP 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, + 4, 4, 4, 4, 4, 1, 1, 1, + 1, // 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_DEL, KC_END, KC_PGDN - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, + 1, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 1, 1, + 1, // KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT 1, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, + 4, 4, 4, 4, 1, // 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_UP - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, + 1, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 1, 1, // KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, + 1, 1, 1, 4, 1, 1, 1, 1, + 1, 1, 1, // Underglow / Border 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, From 287767bba10ac866fae2ffadd45b2315c1e184e6 Mon Sep 17 00:00:00 2001 From: Fred Silberberg Date: Wed, 29 May 2019 07:44:43 -0700 Subject: [PATCH 136/341] Update 333fred keymaps and add new iris map. (#6010) * Update 333fred keymaps and add new iris map. * Fix iris key --- .../5x6/keymaps/333fred/keymap.c | 40 +--- .../keebio/iris/keymaps/333fred/config.h | 14 ++ .../keebio/iris/keymaps/333fred/keymap.c | 54 ++++++ .../keebio/iris/keymaps/333fred/rules.mk | 7 + .../rgbkb/zen/rev1/keymaps/333fred/keymap.c | 49 ++--- layouts/community/ergodox/333fred/keymap.c | 175 +++++------------- layouts/community/ortho_5x12/333fred/keymap.c | 51 ++--- users/333fred/333fred.c | 38 ++-- users/333fred/333fred.h | 9 +- users/333fred/333fred_config.h | 1 + users/333fred/rgb.c | 12 +- 11 files changed, 195 insertions(+), 255 deletions(-) create mode 100644 keyboards/keebio/iris/keymaps/333fred/config.h create mode 100644 keyboards/keebio/iris/keymaps/333fred/keymap.c create mode 100644 keyboards/keebio/iris/keymaps/333fred/rules.mk diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/keymap.c b/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/keymap.c index 4f6151a51..bc61579de 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/keymap.c +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/keymap.c @@ -43,38 +43,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [VIM] = LAYOUT_5x6( - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, - _______, _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, _______, - _______, M(DLEFT), M(DRIGHT), KC_LCTL, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, _______, _______ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, _______, + _______, DLEFT, DRIGHT, KC_LCTL, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ ), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch(id) { - case DLEFT: - if (record->event.pressed) { // Windows move desktop left - return MACRO(D(LCTL), D(LGUI), T(LEFT), U(LGUI), U(LCTL), END); - } - break; - case DRIGHT: - if (record->event.pressed) { // Windows move desktop right - return MACRO(D(LCTL), D(LGUI), T(RIGHT), U(LGUI), U(LCTL), END); - } - break; - case PSCREEN_APP: if (record->event.pressed) { - return MACRO(D(LALT), T(PSCR), U(LALT), END); - } - break; - } - return MACRO_NONE; -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { - tap_dance_process_record(keycode); - return true; + tap_dance_process_keycode(keycode); + return !try_handle_macro(keycode, record); } diff --git a/keyboards/keebio/iris/keymaps/333fred/config.h b/keyboards/keebio/iris/keymaps/333fred/config.h new file mode 100644 index 000000000..8a866b826 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/333fred/config.h @@ -0,0 +1,14 @@ +#pragma once + +#include "333fred_config.h" + +#define USE_SERIAL +#define EE_HANDS +#define NO_ACTION_MACRO + +#undef TAPPING_TERM +#define TAPPING_TERM 200 + +#undef RGBLED_NUM +#define RGBLED_NUM 24 +#define RGBLIGHT_SLEEP diff --git a/keyboards/keebio/iris/keymaps/333fred/keymap.c b/keyboards/keebio/iris/keymaps/333fred/keymap.c new file mode 100644 index 000000000..b8a65d7d2 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/333fred/keymap.c @@ -0,0 +1,54 @@ +#include QMK_KEYBOARD_H +#include "333fred.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [BASE] = LAYOUT( + //┌──────────────┬────────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬──────────────┐ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + //├──────────────┼────────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼──────────────┤ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + //├──────────────┼────────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼──────────────┤ + CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + //├──────────────┼────────────┼────────┼────────┼────────┼────────┼───────────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼──────────────┤ + OSM(MOD_LSFT), CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_DEL, KC_DOWN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, OSM(MOD_RSFT), + //└──────────────┴────────────┴────────┴────────┼────────┼────────┼───────────────┤ ├────────┼────────┼────────┼────────┴────────┴────────┴──────────────┘ + KC_LALT, KC_BSPC, TD(TD_SYM_VIM), KC_ENT, KC_SPC, KC_RGUI + // └────────┴────────┴───────────────┘ └────────┴────────┴────────┘ + ), + + + [SYMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PLUS, _______, KC_7, KC_8, KC_9, _______, KC_F12, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_EQL, _______, KC_4, KC_5, KC_6, _______, KC_VOLU, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_UP, KC_UP, KC_0, KC_1, KC_2, KC_3, _______, KC_VOLD, + //└────────┴────────┴────────┴───┬────┴───┬────┴───────┴─────┬───┴────┐ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, TD(TD_COPY_PASTE), _______, KC_MPRV, KC_MPLY, KC_MNXT + // └────────┴──────────────────┴────────┘ └────────┴────────┴────────┘ + ), + + + [VIM] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, DLEFT, DRIGHT, KC_LCTL, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, _______, _______, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + tap_dance_process_keycode(keycode); + return !try_handle_macro(keycode, record); +} diff --git a/keyboards/keebio/iris/keymaps/333fred/rules.mk b/keyboards/keebio/iris/keymaps/333fred/rules.mk new file mode 100644 index 000000000..2b5da5a22 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/333fred/rules.mk @@ -0,0 +1,7 @@ +NKRO_ENABLE = yes +KEY_LOCK_ENABLE = yes +TAP_DANCE_ENABLE = yes +CONSOLE_ENABLE = no +PERMISSIVE_HOLD = yes +EXTRAFLAGS += -flto + diff --git a/keyboards/rgbkb/zen/rev1/keymaps/333fred/keymap.c b/keyboards/rgbkb/zen/rev1/keymaps/333fred/keymap.c index 3dd769803..53756344f 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/333fred/keymap.c +++ b/keyboards/rgbkb/zen/rev1/keymaps/333fred/keymap.c @@ -3,12 +3,6 @@ extern keymap_config_t keymap_config; -enum custom_macros { - DLEFT, - DRIGHT, - PSCREEN_APP -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -46,11 +40,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `------------------------------------------------- -------------------------------------------------' */ [SYMB] = LAYOUT( \ - KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \ - _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE, KC_7, KC_8, KC_9, KC_ASTR, KC_RPRN, KC_F12, \ - _______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_GRV, KC_4, KC_5, KC_6, KC_PLUS, KC_RCBR, KC_PIPE, \ - M(PSCREEN_APP), KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_1, KC_2, KC_3, KC_BSLS, KC_VOLD, KC_VOLU, \ - KC_PSCR, _______, RESET, _______, _______, TO(GAME), _______, _______, KC_0, KC_DOT, KC_EQL, KC_MPRV, KC_MNXT, KC_MPLY \ + KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \ + _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE, KC_7, KC_8, KC_9, KC_ASTR, KC_RPRN, KC_F12, \ + _______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_GRV, KC_4, KC_5, KC_6, KC_PLUS, KC_RCBR, KC_PIPE, \ + PSCREEN_APP, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_1, KC_2, KC_3, KC_BSLS, KC_VOLD, KC_VOLU, \ + KC_PSCR, _______, RESET, _______, _______, TO(GAME), _______, _______, KC_0, KC_DOT, KC_EQL, KC_MPRV, KC_MNXT, KC_MPLY \ ), /* Vim Movement @@ -67,11 +61,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `------------------------------------------------..------------------------------------------------' */ [VIM] = LAYOUT( \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, \ - _______, RGB_SAI, RGB_VAI, RGB_SAD, KC_LSFT, _______, _______, _______, _______, _______, _______, _______, \ - _______, M(DLEFT), M(DRIGHT), KC_LCTL, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \ - _______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, \ + _______, RGB_SAI, RGB_VAI, RGB_SAD, KC_LSFT, _______, _______, _______, _______, _______, _______, _______, \ + _______, DLEFT, DRIGHT, KC_LCTL, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \ + _______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), /* Gaming mode (Raise) @@ -123,28 +117,7 @@ void persistant_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch(id) { - case DLEFT: - if (record->event.pressed) { // Windows move desktop left - return MACRO(D(LCTL), D(LGUI), T(LEFT), U(LGUI), U(LCTL), END); - } - break; - case DRIGHT: - if (record->event.pressed) { // Windows move desktop right - return MACRO(D(LCTL), D(LGUI), T(RIGHT), U(LGUI), U(LCTL), END); - } - break; - case PSCREEN_APP: - if (record->event.pressed) { - return MACRO(D(LALT), T(PSCR), U(LALT), END); - } - break; - } - return MACRO_NONE; -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { - tap_dance_process_record(keycode); + tap_dance_process_keycode(keycode); return true; } diff --git a/layouts/community/ergodox/333fred/keymap.c b/layouts/community/ergodox/333fred/keymap.c index c649e88dc..134592766 100644 --- a/layouts/community/ergodox/333fred/keymap.c +++ b/layouts/community/ergodox/333fred/keymap.c @@ -4,28 +4,6 @@ #include "version.h" #include "333fred.h" -enum custom_keycodes { - PLACEHOLDER = SAFE_RANGE, // can always be here - EPRM, - VRSN, -}; - -enum custom_macros { - // Windows macros - DLEFT, - DRIGHT, - PSCREEN_APP, - LSFT_TAB, - - // KeePass macros - KEEPASS_OPEN, - KEEPASS_TYPE, - - // Terminal Copy/Paste - TERM_CP, - TERM_PT -}; - // NOTE: Cells marked with ACCESS must remain transparent, they're the keys that actually get to that layer const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -85,26 +63,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[CODEFLOW] = LAYOUT_ergodox( // layer 1 : code +[CODEFLOW] = LAYOUT_ergodox_pretty( // layer 1 : code // left hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - // right han - - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_F7, KC_F8, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_F7, KC_F8, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ ), /* Keymap 3: Symbol Layer * @@ -129,14 +97,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [SYMB] = LAYOUT_ergodox_pretty( // left hand - KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_TRNS, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE, KC_TRNS, KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, - KC_TRNS, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_GRV, KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, - KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_TRNS, KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_0, KC_DOT, KC_EQL, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - M(PSCREEN_APP), KC_TRNS, - KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE, _______, _______, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + _______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_GRV, KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, _______, + _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, _______, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, _______, + _______, _______, _______, _______, _______, KC_0, KC_0, KC_DOT, KC_EQL, _______, + _______, _______, _______, _______, + PSCREEN_APP, _______, + _______, _______, KC_PSCR, _______, _______, _______ ), /* Keymap 3: Media and mouse keys * @@ -160,14 +128,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ [MDIA] = LAYOUT_ergodox_pretty( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - BL_INC, BL_DEC, KC_VOLU, KC_TRNS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_MS_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_BTN1, KC_BTN2, _______, _______, _______, _______, _______, + BL_INC, BL_DEC, KC_VOLU, _______, BL_TOGG, KC_VOLD, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT + _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT ), /* Keymap 4: Movement * @@ -192,14 +160,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // MEDIA AND MOUSE [VIM] = LAYOUT_ergodox_pretty( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, M(KEEPASS_OPEN), M(KEEPASS_TYPE), TERM_CP, TERM_PT, KC_TRNS, KC_TRNS, KC_TRNS, LCTL(KC_C), KC_TRNS, KC_TRNS, KC_TRNS, LCTL(KC_V), KC_TRNS, - KC_TRNS, M(DLEFT), M(DRIGHT), KC_LCTL, KC_LGUI, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, - KC_TRNS, M(LSFT_TAB), KC_TAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_HOME, KC_END, - KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, DLEFT, DRIGHT, KC_LCTL, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, + _______, _______, KC_TAB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_HOME, KC_END, + _______, _______, + _______, _______, _______, _______, _______, _______ ), /* Keymap 1: Game Layer * @@ -226,14 +194,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [GAME] = LAYOUT_ergodox_pretty( // layer 1 : code // left hand - KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_LCTL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_LSFT, KC_Z, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_ENT, KC_TRNS, KC_TRNS, KC_LOCK, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LCTL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LSFT, KC_Z, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_ENT, _______, _______, KC_LOCK, KC_BSPC, _______, _______, _______, _______, _______, KC_F5, KC_F6, LCTL(KC_C), LCTL(KC_V), - KC_TRNS, KC_UP, - KC_LALT, KC_SPC, OSM(SYMB), KC_DOWN, KC_TRNS, KC_TRNS + _______, KC_UP, + KC_LALT, KC_SPC, OSM(SYMB), KC_DOWN, _______, _______ ), /* Keymap 1: Game Arrow Layer * @@ -260,71 +228,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [GAME_ARROW] = LAYOUT_ergodox_pretty( // layer 1 : code // left hand - KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_LCTL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_LSFT, KC_Z, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_ENT, KC_TRNS, KC_TRNS, KC_LOCK, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LCTL, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LSFT, KC_Z, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_ENT, _______, _______, KC_LOCK, KC_BSPC, _______, _______, _______, _______, _______, KC_F5, KC_F6, LCTL(KC_C), LCTL(KC_V), - KC_TRNS, KC_UP, - KC_LALT, KC_SPC, OSM(SYMB), KC_DOWN, KC_TRNS, KC_TRNS + _______, KC_UP, + KC_LALT, KC_SPC, OSM(SYMB), KC_DOWN, _______, _______ ) }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case DLEFT: - if (record->event.pressed) { // Windows move desktop left - return MACRO(D(LCTL), D(LGUI), T(LEFT), U(LGUI), U(LCTL), END); - } - break; - case DRIGHT: - if (record->event.pressed) { // Windows move desktop right - return MACRO(D(LCTL), D(LGUI), T(RIGHT), U(LGUI), U(LCTL), END); - } - break; - case PSCREEN_APP: - if (record->event.pressed) { - return MACRO(D(LALT), T(PSCR), U(LALT), END); - } - break; - case LSFT_TAB: - if (record->event.pressed) { - return MACRO(D(LSFT), T(TAB), U(LSFT), END); - } - case KEEPASS_OPEN: - if (record->event.pressed) { // Keepass open application - return MACRO(D(LCTL), D(LALT), T(K), U(LALT), U(LCTL), END); - } - break; - case KEEPASS_TYPE: - if (record->event.pressed) { // Keepass autotype - return MACRO(D(LCTL), D(LALT), T(A), U(LALT), U(LCTL), END); - } - break; - case TERM_CP: - if (record->event.pressed) { // Terminal Copy - return MACRO(D(LCTL), T(INSERT), U(LCTL), END); - } - break; - case TERM_PT: - if (record->event.pressed) { // Terminal Paste - return MACRO(D(LSFT), T(INSERT), U(LSFT), END); - } - break; - } - return MACRO_NONE; -}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { - tap_dance_process_record(keycode); + tap_dance_process_keycode(keycode); return true; } // Runs constantly in the background, in a loop. -void matrix_scan_user_keyboard(void) { +void matrix_scan_user(void) { ergodox_board_led_on(); ergodox_led_all_on(); } diff --git a/layouts/community/ortho_5x12/333fred/keymap.c b/layouts/community/ortho_5x12/333fred/keymap.c index cc699dfc5..a228a49d4 100644 --- a/layouts/community/ortho_5x12/333fred/keymap.c +++ b/layouts/community/ortho_5x12/333fred/keymap.c @@ -3,11 +3,9 @@ extern keymap_config_t keymap_config; -enum custom_macros { - DLEFT, - DRIGHT, - PSCREEN_APP -}; +#if (!defined(LAYOUT) && defined(KEYMAP)) +# define LAYOUT KEYMAP +#endif const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -46,11 +44,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [SYMB] = LAYOUT_ortho_5x12( \ - KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \ - _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE, KC_7, KC_8, KC_9, KC_ASTR, KC_RPRN, KC_F12, \ - _______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_GRV, KC_4, KC_5, KC_6, KC_PLUS, KC_RCBR, KC_PIPE, \ - M(PSCREEN_APP), KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_1, KC_2, KC_3, KC_BSLS, KC_VOLD, KC_VOLU, \ - KC_PSCR, _______, _______, _______, _______, TG(GAME), KC_0, KC_DOT, KC_EQL, KC_MPRV, KC_MNXT, KC_MPLY \ + KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \ + _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE, KC_7, KC_8, KC_9, KC_ASTR, KC_RPRN, KC_F12, \ + _______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_GRV, KC_4, KC_5, KC_6, KC_PLUS, KC_RCBR, KC_PIPE, \ + PSCREEN_APP, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_1, KC_2, KC_3, KC_BSLS, KC_VOLD, KC_VOLU, \ + KC_PSCR, _______, _______, _______, _______, TG(GAME), KC_0, KC_DOT, KC_EQL, KC_MPRV, KC_MNXT, KC_MPLY \ ), /* Vim Movement (Hold down F) @@ -67,11 +65,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [VIM] = LAYOUT_ortho_5x12( \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, M(DLEFT), M(DRIGHT), KC_LCTL, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, DLEFT, DRIGHT, KC_LCTL, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), /* Gaming mode (Raise) @@ -102,28 +100,7 @@ void persistent_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch(id) { - case DLEFT: - if (record->event.pressed) { // Windows move desktop left - return MACRO(D(LCTL), D(LGUI), T(LEFT), U(LGUI), U(LCTL), END); - } - break; - case DRIGHT: - if (record->event.pressed) { // Windows move desktop right - return MACRO(D(LCTL), D(LGUI), T(RIGHT), U(LGUI), U(LCTL), END); - } - break; - case PSCREEN_APP: - if (record->event.pressed) { - return MACRO(D(LALT), T(PSCR), U(LALT), END); - } - break; - } - return MACRO_NONE; -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { - tap_dance_process_record(keycode); + tap_dance_process_keycode(keycode); return true; } diff --git a/users/333fred/333fred.c b/users/333fred/333fred.c index 3b2b36d02..79df8c4de 100644 --- a/users/333fred/333fred.c +++ b/users/333fred/333fred.c @@ -86,31 +86,37 @@ qk_tap_dance_action_t tap_dance_actions[] = { [TD_COPY_PASTE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_copy_paste_finished, NULL) }; -void tap_dance_process_record(uint16_t keycode) { +void tap_dance_process_keycode(uint16_t keycode) { if (tap_dance_state == SINGLE_TAP && keycode != TD(TD_SYM_VIM)) { tap_dance_active = false; } } -__attribute__ ((weak)) -void matrix_init_rgb(void) {} - __attribute__ ((weak)) void layer_state_set_rgb(uint32_t state) {} -__attribute__ ((weak)) -void matrix_scan_user_keyboard(void) {} - -void matrix_scan_user() { - static bool first_run = true; - if (first_run) { - first_run = false; - matrix_init_rgb(); - } - matrix_scan_user_keyboard(); -} - uint32_t layer_state_set_user(uint32_t state) { layer_state_set_rgb(state); return state; } + +bool try_handle_macro(uint16_t keycode, keyrecord_t *record) { + switch (keycode) + { + case DLEFT: + if (record->event.pressed) + SEND_STRING(SS_LGUI(SS_LALT(SS_TAP(X_LEFT)))); + return true; + case DRIGHT: + if (record->event.pressed) + SEND_STRING(SS_LGUI(SS_LALT(SS_TAP(X_RIGHT)))); + return true; + case PSCREEN_APP: + if (record->event.pressed) + SEND_STRING(SS_LALT(SS_TAP(X_PSCREEN))); + return true; + + default: + return false; + } +} diff --git a/users/333fred/333fred.h b/users/333fred/333fred.h index 0e6c6a196..17f3779b7 100644 --- a/users/333fred/333fred.h +++ b/users/333fred/333fred.h @@ -17,6 +17,13 @@ enum tap_dance_declarations { TD_COPY_PASTE, }; +enum custom_keys { + DLEFT = SAFE_RANGE, + DRIGHT, + PSCREEN_APP +}; + void tap_dance_sym_vim_finished(qk_tap_dance_state_t*, void*); void tap_dance_sym_vim_reset(qk_tap_dance_state_t*, void*); -void tap_dance_process_record(uint16_t); +void tap_dance_process_keycode(uint16_t); +bool try_handle_macro(uint16_t keycode, keyrecord_t *record); diff --git a/users/333fred/333fred_config.h b/users/333fred/333fred_config.h index b158e2d5a..c099072fc 100644 --- a/users/333fred/333fred_config.h +++ b/users/333fred/333fred_config.h @@ -1,3 +1,4 @@ #pragma once #define PERMISSIVE_HOLD +#define NO_ACTION_MACRO diff --git a/users/333fred/rgb.c b/users/333fred/rgb.c index a3dfd905c..5a6d74b5a 100644 --- a/users/333fred/rgb.c +++ b/users/333fred/rgb.c @@ -1,16 +1,11 @@ #include "quantum.h" #include "333fred.h" -void matrix_init_rgb(void) { - rgblight_enable_noeeprom(); - rgblight_sethsv_noeeprom(270, 255, 20); -} - void layer_state_set_rgb(uint32_t state) { switch (biton32(state)) { case BASE: // purple - rgblight_sethsv_noeeprom(270, 255, 20); + rgblight_sethsv_noeeprom(255, 255, 20); break; case SYMB: // blue @@ -26,3 +21,8 @@ void layer_state_set_rgb(uint32_t state) { break; } } + +void keyboard_post_init_user(void) { + rgblight_enable_noeeprom(); + layer_state_set_rgb(1); // Set layer 0 (bit 1) on +} From d16056e60a4ac20ad4b2d7bef3ecebe82d22674b Mon Sep 17 00:00:00 2001 From: fauxpark Date: Thu, 30 May 2019 00:45:28 +1000 Subject: [PATCH 137/341] Fix TO() and DF() calling layer_state_set_[kb,user] twice (#6003) --- tmk_core/common/action.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 3991a8a9e..6a560229a 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -412,7 +412,7 @@ void process_action(keyrecord_t *record, action_t action) case OP_BIT_AND: default_layer_and(bits | mask); break; case OP_BIT_OR: default_layer_or(bits | mask); break; case OP_BIT_XOR: default_layer_xor(bits | mask); break; - case OP_BIT_SET: default_layer_and(mask); default_layer_or(bits); break; + case OP_BIT_SET: default_layer_set(bits | mask); break; } } } else { @@ -426,7 +426,7 @@ void process_action(keyrecord_t *record, action_t action) case OP_BIT_AND: layer_and(bits | mask); break; case OP_BIT_OR: layer_or(bits | mask); break; case OP_BIT_XOR: layer_xor(bits | mask); break; - case OP_BIT_SET: layer_and(mask); layer_or(bits); break; + case OP_BIT_SET: layer_state_set(bits | mask); break; } } } From a1a7a84831230515bac68c9fe2c93cd90c02acb8 Mon Sep 17 00:00:00 2001 From: Jeremy Bernhardt Date: Wed, 29 May 2019 11:57:38 -0600 Subject: [PATCH 138/341] [Keymap] Georgi flippydippy layout (#6005) * keymap(gergo): colemak * added flipped numbers * Updated as per Drash --- keyboards/georgi/config.h | 1 + .../georgi/keymaps/default-flipped/keymap.c | 237 ++++++++++++++++++ .../georgi/keymaps/default-flipped/readme.md | 11 + .../georgi/keymaps/default-flipped/rules.mk | 41 +++ keyboards/georgi/keymaps/default/keymap.c | 1 - keyboards/georgi/keymaps/minimal/keymap.c | 1 - keyboards/georgi/keymaps/norman/keymap.c | 1 - 7 files changed, 290 insertions(+), 3 deletions(-) create mode 100644 keyboards/georgi/keymaps/default-flipped/keymap.c create mode 100644 keyboards/georgi/keymaps/default-flipped/readme.md create mode 100644 keyboards/georgi/keymaps/default-flipped/rules.mk diff --git a/keyboards/georgi/config.h b/keyboards/georgi/config.h index b35a1be78..49d54adcd 100644 --- a/keyboards/georgi/config.h +++ b/keyboards/georgi/config.h @@ -30,6 +30,7 @@ along with this program. If not, see . #define NO_ACTION_FUNCTION #define NO_ACTION_ONESHOT #define NO_ACTION_MACRO +#define IGNORE_MOD_TAP_INTERRUPT /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED diff --git a/keyboards/georgi/keymaps/default-flipped/keymap.c b/keyboards/georgi/keymaps/default-flipped/keymap.c new file mode 100644 index 000000000..09243f2a2 --- /dev/null +++ b/keyboards/georgi/keymaps/default-flipped/keymap.c @@ -0,0 +1,237 @@ +/* + * Good on you for modifying your layout, this is the most nonQMK layout you will come across + * There are three modes, Steno (the default), QWERTY (Toggleable) and a Momentary symbol layer + * + * Don't modify the steno layer directly, instead add chords using the keycodes and macros + * from sten.h to the layout you want to modify. + * + * Observe the comment above processQWERTY! + * + * http://docs.gboards.ca + */ + +#include QMK_KEYBOARD_H +#include "sten.h" +#include "keymap_steno.h" + +// Proper Layers +#define FUNCT (LSD | LK | LP | LH) +#define MEDIA (LSD | LK | LW | LR) +#define MOVE (ST1 | ST2) + +// QMK Layers +#define STENO_LAYER 0 +#define GAMING 1 +#define GAMING_2 2 + +/* Keyboard Layout + * ,---------------------------------. ,------------------------------. + * | FN | LSU | LFT | LP | LH | ST1 | | ST3 | RF | RP | RL | RT | RD | + * |-----+-----+-----+----+----|-----| |-----|----+----+----+----+----| + * | PWR | LSD | LK | LW | LR | ST2 | | ST4 | RR | BB | RG | RS | RZ | + * `---------------------------------' `------------------------------' + * ,---------------, .---------------. + * | LNO | LA | LO | | RE | RU | RNO | + * `---------------' `---------------' + */ + +// Note: You can only use basic keycodes here! +// P() is just a wrapper to make your life easier. +// +// http://docs.gboards.ca +uint32_t processQwerty(bool lookup) { + // Specials + P( RT | RS | RD | RZ | LNO, SEND_STRING(VERSION); SEND_STRING(__DATE__)); + P( LNO | RNO | LA | LO | RE | RU, SEND(KC_MPLY)); + P( LFT | LK | LP | LW, REPEAT()); + P( ST1 | ST2 | LW | ST4, SEND(KC_BSPC)); + + // Mouse Keys + P( LO | LSD | LK, CLICK_MOUSE(KC_MS_BTN2)); + P( LO | LR | LW, CLICK_MOUSE(KC_MS_BTN1)); + + // Thumb Chords + P( LA | LO | RE | RU, SEND(KC_CAPS)); + P( LA | RU, SEND(KC_ESC)); + P( LO | RE, SEND(KC_LCTL)); + P( LNO | RNO | LA | RU, SEND(KC_LCTL); SEND(KC_LSFT)); + P( LNO | LA | RE, SEND(KC_LCTL); SEND(KC_LSFT); SEND(KC_LALT)); + + // Mods + P( RT | RD | RS | RZ, SEND(KC_LGUI)); + P( RT | RD, SEND(KC_LCTL)); + P( RS | RZ, SEND(KC_LALT)); + P( LA | LNO, SEND(KC_LCTL)); + P( LA | LO, SEND(KC_LALT)); + P( LO, SEND(KC_LSFT)); + + // Function Layer + P( FUNCT | RF | RR, SEND(KC_F5)); + P( FUNCT | RP | RB, SEND(KC_F6)); + P( FUNCT | RL | RG, SEND(KC_F7)); + P( FUNCT | RT | RS, SEND(KC_F8)); + P( FUNCT | RF, SEND(KC_F1)); + P( FUNCT | RP, SEND(KC_F2)); + P( FUNCT | RL, SEND(KC_F3)); + P( FUNCT | RT, SEND(KC_F4)); + P( FUNCT | RR, SEND(KC_F9)); + P( FUNCT | RG, SEND(KC_F10)); + P( FUNCT | RB, SEND(KC_F11)); + P( FUNCT | RS, SEND(KC_F12)); + + // Movement Layer + P( MOVE | RF, SEND(KC_LEFT)); + P( MOVE | RP, SEND(KC_DOWN)); + P( MOVE | RL, SEND(KC_UP)); + P( MOVE | RT, SEND(KC_RIGHT)); + P( MOVE | ST3, SEND(KC_PGUP)); + P( MOVE | ST4, SEND(KC_PGDN)); + + // Media Layer + P( MEDIA | RF, SEND(KC_MPRV)); + P( MEDIA | RP, SEND(KC_MPLY)); + P( MEDIA | RL, SEND(KC_MPLY)); + P( MEDIA | RT, SEND(KC_MNXT)); + P( MEDIA | RD, SEND(KC_VOLU)); + P( MEDIA | RZ, SEND(KC_VOLD)); + P( MEDIA | RS, SEND(KC_MUTE)); + + // Number Row, Left + P( LNO | LSU, SEND(KC_1)); + P( LNO | LFT, SEND(KC_2)); + P( LNO | LP, SEND(KC_3)); + P( LNO | LH, SEND(KC_4)); + P( LNO | ST1, SEND(KC_5)); + P( LNO | ST3, SEND(KC_6)); + P( LNO | RF, SEND(KC_7)); + P( LNO | RP, SEND(KC_8)); + P( LNO | RL, SEND(KC_9)); + P( LNO | RT, SEND(KC_0)); + + // Number Row, Right + P( RNO | LSU, SEND(KC_1)); + P( RNO | LFT, SEND(KC_2)); + P( RNO | LP, SEND(KC_3)); + P( RNO | LH, SEND(KC_4)); + P( RNO | ST1, SEND(KC_5)); + P( RNO | ST3, SEND(KC_6)); + P( RNO | RF, SEND(KC_7)); + P( RNO | RP, SEND(KC_8)); + P( RNO | RL, SEND(KC_9)); + P( RNO | RT, SEND(KC_0)); + P( RNO | LA, SEND(KC_5)); + + // Specials + P( RU | RNO, SEND(KC_TAB)); + P( RE | RU, SEND(KC_BSPC)); + P( RD | RZ, SEND(KC_ENT)); + P( RE, SEND(KC_ENT)); + P( RD, SEND(KC_BSPC)); + P( LNO, SEND(KC_BSPC)); + P( RNO, SEND(KC_BSPC)); + P( LA, SEND(KC_SPC)); + P( RU, SEND(KC_SPC)); + P( RZ, SEND(KC_ESC)); + + // Symbols and Numbers + P( PWR | RE | RU, SEND(KC_ENT)); + P( PWR | LA | LO, SEND(KC_SPC)); + P( PWR | LP | LW, SEND(KC_LSFT); SEND(KC_9)); // ( + P( PWR | LH | LR, SEND(KC_LSFT); SEND(KC_0)); // ) + P( PWR | ST1 | ST2, SEND(KC_GRV)); // ` + P( PWR | RD | RZ, SEND(KC_ESC)); + P( PWR | LSU | LSD, SEND(KC_LSFT); SEND(KC_3)); // # + P( PWR | LFT | LK, SEND(KC_LSFT); SEND(KC_4)); // $ + P( PWR | LSU, SEND(KC_LSFT); SEND(KC_1)); // ! + P( PWR | LSD, SEND(KC_LSFT); SEND(KC_5)); // % + P( PWR | LFT, SEND(KC_LSFT); SEND(KC_2)); // @ + P( PWR | LK, SEND(KC_LSFT); SEND(KC_6)); // ^ + P( PWR | LP, SEND(KC_LSFT); SEND(KC_LBRC)); // { + P( PWR | LW, SEND(KC_LBRC)); + P( PWR | LH, SEND(KC_LSFT); SEND(KC_RBRC)); // } + P( PWR | LR, SEND(KC_RBRC)); + P( PWR | ST1, SEND(KC_LSFT); SEND(KC_BSLS)); // | + P( PWR | ST2, SEND(KC_LSFT); SEND(KC_GRV)); // ~ + P( PWR | ST3, SEND(KC_QUOT)); + P( PWR | ST4, SEND(KC_LSFT); SEND(KC_QUOT)); // " + P( PWR | RF, SEND(KC_KP_PLUS)); + P( PWR | RR, SEND(KC_LSFT); SEND(KC_7)); // & + P( PWR | RP, SEND(KC_MINS)); + P( PWR | RB, SEND(KC_EQL)); + P( PWR | RL, SEND(KC_SLSH)); + P( PWR | RG, SEND(KC_COMM)); + P( PWR | RT, SEND(KC_PAST)); + P( PWR | RS, SEND(KC_DOT)); + P( PWR | RD, SEND(KC_TAB)); + P( PWR | LA, SEND(KC_LSFT)); + P( PWR | LO, SEND(KC_SLSH)); + P( PWR | RE, SEND(KC_SCLN)); + P( PWR | RU, SEND(KC_BSLS)); + P( PWR | LNO, SEND(KC_BSLS)); + + // Letters + P( LSU | LSD, SEND(KC_A)); + P( LFT | LK, SEND(KC_S)); + P( LP | LW, SEND(KC_D)); + P( LH | LR, SEND(KC_F)); + P( ST1 | ST2, SEND(KC_G)); + P( ST3 | ST4, SEND(KC_H)); + P( RF | RR, SEND(KC_J)); + P( RT | RS, SEND(KC_SCLN)); + P( RG | RL, SEND(KC_L)); + P( RP | RB, SEND(KC_K)); + P( LSU, SEND(KC_Q)); + P( LSD, SEND(KC_Z)); + P( LFT, SEND(KC_W)); + P( LK, SEND(KC_X)); + P( LP, SEND(KC_E)); + P( LW, SEND(KC_C)); + P( LH, SEND(KC_R)); + P( LR, SEND(KC_V)); + P( ST1, SEND(KC_T)); + P( ST2, SEND(KC_B)); + P( ST3, SEND(KC_Y)); + P( ST4, SEND(KC_N)); + P( RF, SEND(KC_U)); + P( RR, SEND(KC_M)); + P( RP, SEND(KC_I)); + P( RB, SEND(KC_COMM)); + P( RL, SEND(KC_O)); + P( RG, SEND(KC_DOT)); + P( RT, SEND(KC_P)); + P( RS, SEND(KC_SLSH)); + P( RNO, SEND(KC_BSPC)); + P( LNO, SEND(KC_BSPC)); + + return 0; +} + +// "Layers" +// Steno layer should be first in your map. +// When PWR | FN | ST3 | ST4 is pressed, the layer is increased to the next map. You must return to STENO_LAYER at the end. +// If you need more space for chords, remove the two gaming layers. +// Note: If using NO_ACTION_TAPPING, LT will not work! + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Main layer, everything goes through here + [STENO_LAYER] = LAYOUT_georgi( + STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, + STN_PWR, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, + STN_A, STN_O, STN_N1, STN_N7, STN_E, STN_U + ), + // Gaming layer with Numpad, Very limited + [GAMING] = LAYOUT_georgi( + KC_LSFT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_DQUO, + KC_LALT, KC_SPC, LT(GAMING_2, KC_ENT), KC_DEL, KC_ASTR, TO(STENO_LAYER) + ), + + [GAMING_2] = LAYOUT_georgi( + KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_LT, KC_GT, KC_QUES, KC_RSFT, + KC_LALT, KC_SPC, KC_ENT, KC_DEL, KC_ASTR, TO(STENO_LAYER) + ) +}; + +// Don't fuck with this, thanks. +size_t keymapsCount = sizeof(keymaps)/sizeof(keymaps[0]); diff --git a/keyboards/georgi/keymaps/default-flipped/readme.md b/keyboards/georgi/keymaps/default-flipped/readme.md new file mode 100644 index 000000000..f9da34b02 --- /dev/null +++ b/keyboards/georgi/keymaps/default-flipped/readme.md @@ -0,0 +1,11 @@ +# Georgi QWERTY/Steno firmware + +This is the default keymap for Georgi, it's based heavily off of the naps62 ErgoDox and the Gergo layout. +It is both a ergonomic and programmer friendly keymap. + +Ideally you should copy this directory and make your changes there. If you come up with a good layout submit a PR! + +## Space issues +If you find yourself running out of space for dictionary entries, disabling mousekeys in rules.mk will save +you about 4k for entries! +Get a free 1k by deleting the Gaming layers from the keymap! diff --git a/keyboards/georgi/keymaps/default-flipped/rules.mk b/keyboards/georgi/keymaps/default-flipped/rules.mk new file mode 100644 index 000000000..90d8057c3 --- /dev/null +++ b/keyboards/georgi/keymaps/default-flipped/rules.mk @@ -0,0 +1,41 @@ +#---------------------------------------------------------------------------- +# make georgi:default:dfu +# Make sure you have dfu-programmer installed! +#---------------------------------------------------------------------------- + +NO_REPEAT = no +VERBOSE = yes +KEYBOARD_SHARED_EP = yes +CUSTOM_MATRIX = yes + +#Firmware reduction options +MOUSEKEY_ENABLE = yes # 1500 bytes +NO_TAPPING = no # 2000 bytes +NO_PRINT = yes + +#Debug options +CONSOLE_ENABLE = no +DEBUG_MATRIX_SCAN_RATE = no +DEBUG_MATRIX = no +ONLY_QWERTY = no + +# A bunch of stuff that you shouldn't touch unless you +# know what you're doing. +# +# No touchy, capiche? +SRC += matrix.c i2c_master.c +ifeq ($(strip $(DEBUG_MATRIX)), yes) + OPT_DEFS += -DDEBUG_MATRIX +endif +ifeq ($(strip $(NO_REPEAT)), yes) + OPT_DEFS += -DNO_REPEAT +endif +ifeq ($(strip $(NO_PRINT)), yes) + OPT_DEFS += -DNO_PRINT -DNO_DEBUG +endif +ifeq ($(strip $(ONLY_QWERTY)), yes) + OPT_DEFS += -DONLYQWERTY +endif +ifeq ($(strip $(NO_TAPPING)), yes) + OPT_DEFS += -DNO_ACTION_TAPPING +endif diff --git a/keyboards/georgi/keymaps/default/keymap.c b/keyboards/georgi/keymaps/default/keymap.c index 404aac8fc..93c551af2 100644 --- a/keyboards/georgi/keymaps/default/keymap.c +++ b/keyboards/georgi/keymaps/default/keymap.c @@ -13,7 +13,6 @@ #include QMK_KEYBOARD_H #include "sten.h" #include "keymap_steno.h" -#define IGNORE_MOD_TAP_INTERRUPT // Proper Layers #define FUNCT (LSD | LK | LP | LH) diff --git a/keyboards/georgi/keymaps/minimal/keymap.c b/keyboards/georgi/keymaps/minimal/keymap.c index 1d9b57e9a..e9294c5cc 100644 --- a/keyboards/georgi/keymaps/minimal/keymap.c +++ b/keyboards/georgi/keymaps/minimal/keymap.c @@ -13,7 +13,6 @@ #include QMK_KEYBOARD_H #include "sten.h" #include "keymap_steno.h" -#define IGNORE_MOD_TAP_INTERRUPT // Proper Layers #define FUNCT (LSD | LK | LP | LH) diff --git a/keyboards/georgi/keymaps/norman/keymap.c b/keyboards/georgi/keymaps/norman/keymap.c index 58c42c852..4591aab22 100644 --- a/keyboards/georgi/keymaps/norman/keymap.c +++ b/keyboards/georgi/keymaps/norman/keymap.c @@ -13,7 +13,6 @@ #include QMK_KEYBOARD_H #include "sten.h" #include "keymap_steno.h" -#define IGNORE_MOD_TAP_INTERRUPT // Proper Layers #define FUNCT (LSD | LK | LP | LH) From 2ca840d0b8e1c44365644c9c0e3059bfa4d2cd3e Mon Sep 17 00:00:00 2001 From: itsdrdick Date: Thu, 30 May 2019 02:01:14 +0800 Subject: [PATCH 139/341] [Keyboard] Added XW60 PCB (#6011) * Added XW60 PCB * Update keyboards/xw60/config.h Co-Authored-By: fauxpark * Update keyboards/xw60/rules.mk Co-Authored-By: fauxpark * Update keyboards/xw60/rules.mk Co-Authored-By: fauxpark * Update keyboards/xw60/xw60.h Co-Authored-By: fauxpark * Update keyboards/xw60/xw60.h Co-Authored-By: fauxpark * Update keyboards/xw60/xw60.h Co-Authored-By: fauxpark * Update rules.mk * Removed redundant line * Update keyboards/xw60/config.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/xw60/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- keyboards/xw60/config.h | 36 +++++++++++ keyboards/xw60/info.json | 18 ++++++ keyboards/xw60/keymaps/default/keymap.c | 38 ++++++++++++ keyboards/xw60/keymaps/default/readme.md | 58 ++++++++++++++++++ keyboards/xw60/keymaps/pingjunior/keymap.c | 30 +++++++++ keyboards/xw60/keymaps/pingjunior/readme.md | 44 ++++++++++++++ keyboards/xw60/readme.md | 29 +++++++++ keyboards/xw60/rules.mk | 67 +++++++++++++++++++++ keyboards/xw60/xw60.c | 1 + keyboards/xw60/xw60.h | 60 ++++++++++++++++++ 10 files changed, 381 insertions(+) create mode 100644 keyboards/xw60/config.h create mode 100644 keyboards/xw60/info.json create mode 100644 keyboards/xw60/keymaps/default/keymap.c create mode 100644 keyboards/xw60/keymaps/default/readme.md create mode 100644 keyboards/xw60/keymaps/pingjunior/keymap.c create mode 100644 keyboards/xw60/keymaps/pingjunior/readme.md create mode 100644 keyboards/xw60/readme.md create mode 100644 keyboards/xw60/rules.mk create mode 100644 keyboards/xw60/xw60.c create mode 100644 keyboards/xw60/xw60.h diff --git a/keyboards/xw60/config.h b/keyboards/xw60/config.h new file mode 100644 index 000000000..95404fffb --- /dev/null +++ b/keyboards/xw60/config.h @@ -0,0 +1,36 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Drclick +#define PRODUCT XW60 +#define DESCRIPTION qmk keyboard firmware for XW60 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ + +#define SOLENOID_PIN F6 +#define SOLENOID_ACTIVE true +#define SOLENOID_DEFAULT_DWELL 75 diff --git a/keyboards/xw60/info.json b/keyboards/xw60/info.json new file mode 100644 index 000000000..9a44f5588 --- /dev/null +++ b/keyboards/xw60/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "XW60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"K00", "x":0, "y":0}, {"label":"K01", "x":1, "y":0}, {"label":"K02", "x":2, "y":0}, {"label":"K03", "x":3, "y":0}, {"label":"K04", "x":4, "y":0}, {"label":"K05", "x":5, "y":0}, {"label":"K06", "x":6, "y":0}, {"label":"K07", "x":7, "y":0}, {"label":"K08", "x":8, "y":0}, {"label":"K09", "x":9, "y":0}, {"label":"K0A", "x":10, "y":0}, {"label":"K0B", "x":11, "y":0}, {"label":"K0C", "x":12, "y":0}, {"label":"K0D", "x":13, "y":0}, {"label":"K49", "x":14, "y":0}, {"label":"K10", "x":0, "y":1, "w":1.5}, {"label":"K11", "x":1.5, "y":1}, {"label":"K12", "x":2.5, "y":1}, {"label":"K13", "x":3.5, "y":1}, {"label":"K14", "x":4.5, "y":1}, {"label":"K15", "x":5.5, "y":1}, {"label":"K16", "x":6.5, "y":1}, {"label":"K17", "x":7.5, "y":1}, {"label":"K18", "x":8.5, "y":1}, {"label":"K19", "x":9.5, "y":1}, {"label":"K1A", "x":10.5, "y":1}, {"label":"K1B", "x":11.5, "y":1}, {"label":"K1C", "x":12.5, "y":1}, {"label":"K1D", "x":13.5, "y":1, "w":1.5}, {"label":"K20", "x":0, "y":2, "w":1.75}, {"label":"K21", "x":1.75, "y":2}, {"label":"K22", "x":2.75, "y":2}, {"label":"K23", "x":3.75, "y":2}, {"label":"K24", "x":4.75, "y":2}, {"label":"K25", "x":5.75, "y":2}, {"label":"K26", "x":6.75, "y":2}, {"label":"K27", "x":7.75, "y":2}, {"label":"K28", "x":8.75, "y":2}, {"label":"K29", "x":9.75, "y":2}, {"label":"K2A", "x":10.75, "y":2}, {"label":"K2B", "x":11.75, "y":2}, {"label":"K2C", "x":12.75, "y":2}, {"label":"K2D", "x":13.75, "y":2, "w":1.25}, {"label":"K30", "x":0, "y":3, "w":1.25}, {"label":"K31", "x":1.25, "y":3}, {"label":"K32", "x":2.25, "y":3}, {"label":"K33", "x":3.25, "y":3}, {"label":"K34", "x":4.25, "y":3}, {"label":"K35", "x":5.25, "y":3}, {"label":"K36", "x":6.25, "y":3}, {"label":"K37", "x":7.25, "y":3}, {"label":"K38", "x":8.25, "y":3}, {"label":"K39", "x":9.25, "y":3}, {"label":"K3A", "x":10.25, "y":3}, {"label":"K3B", "x":11.25, "y":3}, {"label":"K3D", "x":12.25, "y":3, "w":1.75}, {"label":"K3C", "x":14, "y":3}, {"label":"K40", "x":0, "y":4, "w":1.25}, {"label":"K41", "x":1.25, "y":4, "w":1.25}, {"label":"K42", "x":2.5, "y":4, "w":1.25}, {"label":"K44", "x":3.75, "y":4, "w":2}, {"label":"K45", "x":5.75, "y":4, "w":2.25}, {"label":"K46", "x":8, "y":4, "w":2}, {"label":"K4A", "x":10, "y":4, "w":1.25}, {"label":"K4B", "x":11.25, "y":4, "w":1.25}, {"label":"K4C", "x":12.5, "y":4, "w":1.25}, {"label":"K4D", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_pingjunior": { + "layout": [{"label":"K00", "x":0, "y":0}, {"label":"K01", "x":1, "y":0}, {"label":"K02", "x":2, "y":0}, {"label":"K03", "x":3, "y":0}, {"label":"K04", "x":4, "y":0}, {"label":"K05", "x":5, "y":0}, {"label":"K06", "x":6, "y":0}, {"label":"K07", "x":7, "y":0}, {"label":"K08", "x":8, "y":0}, {"label":"K09", "x":9, "y":0}, {"label":"K0A", "x":10, "y":0}, {"label":"K0B", "x":11, "y":0}, {"label":"K0C", "x":12, "y":0}, {"label":"K0D", "x":13, "y":0}, {"label":"K49", "x":14, "y":0}, {"label":"K10", "x":0, "y":1, "w":1.5}, {"label":"K11", "x":1.5, "y":1}, {"label":"K12", "x":2.5, "y":1}, {"label":"K13", "x":3.5, "y":1}, {"label":"K14", "x":4.5, "y":1}, {"label":"K15", "x":5.5, "y":1}, {"label":"K16", "x":6.5, "y":1}, {"label":"K17", "x":7.5, "y":1}, {"label":"K18", "x":8.5, "y":1}, {"label":"K19", "x":9.5, "y":1}, {"label":"K1A", "x":10.5, "y":1}, {"label":"K1B", "x":11.5, "y":1}, {"label":"K1C", "x":12.5, "y":1}, {"label":"K1D", "x":13.5, "y":1, "w":1.5}, {"label":"K20", "x":0, "y":2, "w":1.75}, {"label":"K21", "x":1.75, "y":2}, {"label":"K22", "x":2.75, "y":2}, {"label":"K23", "x":3.75, "y":2}, {"label":"K24", "x":4.75, "y":2}, {"label":"K25", "x":5.75, "y":2}, {"label":"K26", "x":6.75, "y":2}, {"label":"K27", "x":7.75, "y":2}, {"label":"K28", "x":8.75, "y":2}, {"label":"K29", "x":9.75, "y":2}, {"label":"K2A", "x":10.75, "y":2}, {"label":"K2B", "x":11.75, "y":2}, {"label":"K2C", "x":12.75, "y":2}, {"label":"K2D", "x":13.75, "y":2, "w":1.25}, {"label":"K31", "x":0, "y":3, "w":2.25}, {"label":"K32", "x":2.25, "y":3}, {"label":"K33", "x":3.25, "y":3}, {"label":"K34", "x":4.25, "y":3}, {"label":"K35", "x":5.25, "y":3}, {"label":"K36", "x":6.25, "y":3}, {"label":"K37", "x":7.25, "y":3}, {"label":"K38", "x":8.25, "y":3}, {"label":"K39", "x":9.25, "y":3}, {"label":"K3A", "x":10.25, "y":3}, {"label":"K3B", "x":11.25, "y":3}, {"label":"K3D", "x":12.25, "y":3, "w":1.75}, {"label":"K3C", "x":14, "y":3}, {"label":"K40", "x":0, "y":4, "w":1.5}, {"label":"K41", "x":1.5, "y":4}, {"label":"K42", "x":2.5, "y":4, "w":1.5}, {"label":"K45", "x":4, "y":4, "w":7}, {"label":"K4B", "x":11, "y":4, "w":1.5}, {"label":"K4C", "x":12.5, "y":4}, {"label":"K4D", "x":13.5, "y":4, "w":1.5}] + } + } + } + + + diff --git a/keyboards/xw60/keymaps/default/keymap.c b/keyboards/xw60/keymaps/default/keymap.c new file mode 100644 index 000000000..1a4d7fb3d --- /dev/null +++ b/keyboards/xw60/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* 0: defuault */ + LAYOUT( + KC_ESC, 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_NO, + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(3), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL + ), + /* 1: winkeyless */ + LAYOUT( + KC_ESC, 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_NO, + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(3), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_NO, KC_RALT, KC_RGUI, KC_RCTL + ), + /* 2: hhkb */ + LAYOUT( + KC_ESC, 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_BSLS, KC_GRV, + 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_BSPC, + 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_BSLS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(3), + KC_NO, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_NO, KC_RALT, KC_RGUI, KC_NO + ), + /* 3: fn */ + LAYOUT( + _______, 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_INS, KC_DEL, + KC_CAPS, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, KC_DEL, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, HPT_TOG,HPT_DWLI,HPT_DWLD, _______, _______, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/xw60/keymaps/default/readme.md b/keyboards/xw60/keymaps/default/readme.md new file mode 100644 index 000000000..0e146718a --- /dev/null +++ b/keyboards/xw60/keymaps/default/readme.md @@ -0,0 +1,58 @@ +# The default keymap for xw60 + + ### layer 0 - default + ``` + .--------------------------------------------------------------------------. + | esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | bksp | + |--------------------------------------------------------------------------| + | tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + |--------------------------------------------------------------------------| + | caps | A | S | D | F | G | H | J | K | L | ; | ' | \ |enter| + |--------------------------------------------------------------------------| + | sft | nubs| Z | X | C | V | B | N | M | , | . | / | shift | fn | + |--------------------------------------------------------------------------| + | ctrl| gui | alt | space / space / space | alt | gui | app | ctrl| + '--------------------------------------------------------------------------' + ``` + ### layer 1 - winkeyless + ``` + .--------------------------------------------------------------------------. + | esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | bksp | + |--------------------------------------------------------------------------| + | tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + |--------------------------------------------------------------------------| + | caps | A | S | D | F | G | H | J | K | L | ; | ' | \ |enter| + |--------------------------------------------------------------------------| + | sft | nubs| Z | X | C | V | B | N | M | , | . | / | shift | fn | + |--------------------------------------------------------------------------| + | ctrl | gui| alt | space | alt | gui| ctrl | + '--------------------------------------------------------------------------' + ``` + ### layer 2 - hhkb + ``` + .--------------------------------------------------------------------------. + | esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | + |--------------------------------------------------------------------------| + | tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | bksp | + |--------------------------------------------------------------------------| + | ctrl | A | S | D | F | G | H | J | K | L | ; | ' |pent|enter| + |--------------------------------------------------------------------------| + | shift | Z | X | C | V | B | N | M | , | . | / | rshift | fn | + '--------------------------------------------------------------------------' + | alt| gui | space | gui | alt| + '------------------------------------------------------------' + ``` + ### layer 3 - fn + ``` + ,--------------------------------------------------------------------------. + | | f1 | f2 | f3 | f4 | f5 | f6 | f7 | f8 | f9 | f10| f11| f12| ins| del| + |--------------------------------------------------------------------------| + | caps | | up | | | | | | | | | up | | del | + |--------------------------------------------------------------------------| + | |left|down|rght| | | | | | |left|rght| | | + |--------------------------------------------------------------------------| + | | | | | |buzz| + | - | | |down| | | + |--------------------------------------------------------------------------| + | | | | | | | | + '--------------------------------------------------------------------------' + ``` \ No newline at end of file diff --git a/keyboards/xw60/keymaps/pingjunior/keymap.c b/keyboards/xw60/keymaps/pingjunior/keymap.c new file mode 100644 index 000000000..51767b56f --- /dev/null +++ b/keyboards/xw60/keymaps/pingjunior/keymap.c @@ -0,0 +1,30 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* 0: default */ + LAYOUT_pingjunior( + KC_ESC, 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_GRV, KC_BSPC, + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_PENT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(2), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL + ), + /* 1: hhkb */ + LAYOUT_pingjunior( + KC_ESC, 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_BSLS, KC_GRV, + 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_BSPC, + 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_PENT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(2), + KC_NO, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_NO + ), + /* 2: fn */ + LAYOUT_pingjunior( + _______, 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_INS, KC_DEL, + KC_CAPS, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, KC_DEL, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, HPT_TOG,HPT_DWLI,HPT_DWLD, _______, _______, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/xw60/keymaps/pingjunior/readme.md b/keyboards/xw60/keymaps/pingjunior/readme.md new file mode 100644 index 000000000..0943a88a9 --- /dev/null +++ b/keyboards/xw60/keymaps/pingjunior/readme.md @@ -0,0 +1,44 @@ +# The default keymap for pingjunior + + ### layer 0 - default + ``` + .--------------------------------------------------------------------------. + | esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | ` |bksp| + |--------------------------------------------------------------------------| + | tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + |--------------------------------------------------------------------------| + | caps | A | S | D | F | G | H | J | K | L | ; | ' |pent|enter| + |--------------------------------------------------------------------------| + | shift | Z | X | C | V | B | N | M | , | . | / | shift | fn | + |--------------------------------------------------------------------------| + | ctrl | gui| alt | space | alt | gui/ ctrl | + '--------------------------------------------------------------------------' + ``` + ### layer 1 - hhkb + ``` + .--------------------------------------------------------------------------. + | esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | + |--------------------------------------------------------------------------| + | tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | bksp | + |--------------------------------------------------------------------------| + | ctrl | A | S | D | F | G | H | J | K | L | ; | ' |pent|enter| + |--------------------------------------------------------------------------| + | shift | Z | X | C | V | B | N | M | , | . | / | shift | fn | + '--------------------------------------------------------------------------' + | alt| gui | space | gui | alt| + '------------------------------------------------------------' + ``` + ### layer 2 - fn + ``` + ,--------------------------------------------------------------------------. + | | f1 | f2 | f3 | f4 | f5 | f6 | f7 | f8 | f9 | f10| f11| f12| ins| del| + |--------------------------------------------------------------------------| + | caps | | up | | | | | | | | | up | | del | + |--------------------------------------------------------------------------| + | |left|down|rght| | | | | | |left|rght| | | + |--------------------------------------------------------------------------| + | | | | | |buzz| + | - | | |down| | | + |--------------------------------------------------------------------------| + | | | | | | | | + '--------------------------------------------------------------------------' + ``` \ No newline at end of file diff --git a/keyboards/xw60/readme.md b/keyboards/xw60/readme.md new file mode 100644 index 000000000..c2e0ce0ee --- /dev/null +++ b/keyboards/xw60/readme.md @@ -0,0 +1,29 @@ +# XW60 + +A 60% custom PCB for non-MX switches. + +![XW60V1 PCB](https://i.imgur.com/1KVSEZ0.jpg) + +### Supported Switches: + +##### XW60 V1 + + - ALPS SKCM/SKCL + - ALPS SKCP (IBM 5576 version) + - SMK SECOND GENERATION + +##### XW60 V2 + + - ALPS SKCM/SKCL + - ALPS SKCC + - Omron B3G-S + +Keyboard Maintainer: [Drclick](https://github.com/itsdrdick) +Hardware Supported: XW60 V1 & V2 +Hardware Availability: https://shop159471890.taobao.com + +Make example for this keyboard (after setting up your build environment): + + make xw60:default + +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). diff --git a/keyboards/xw60/rules.mk b/keyboards/xw60/rules.mk new file mode 100644 index 000000000..01435ee54 --- /dev/null +++ b/keyboards/xw60/rules.mk @@ -0,0 +1,67 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +API_SYSEX_ENABLE = no +HAPTIC_ENABLE += SOLENOID +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/xw60/xw60.c b/keyboards/xw60/xw60.c new file mode 100644 index 000000000..98ae6a758 --- /dev/null +++ b/keyboards/xw60/xw60.c @@ -0,0 +1 @@ +#include "xw60.h" \ No newline at end of file diff --git a/keyboards/xw60/xw60.h b/keyboards/xw60/xw60.h new file mode 100644 index 000000000..52be45258 --- /dev/null +++ b/keyboards/xw60/xw60.h @@ -0,0 +1,60 @@ +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +/* + * ,-----------------------------------------------------------------------------------------. + * | K00 | K01 | K02 | K03 | K04 | K05 | K06 | K07 | K08 | K09 | K0A | K0B | K0C | K0D | K49 | + * |-----------------------------------------------------------------------------------------+ + * | K10 | K11 | K12 | K13 | K14 | K15 | K16 | K17 | K18 | K19 | K1A | K1B | K1C | K1D | + * |-----------------------------------------------------------------------------------------+ + * | K20 | K21 | K22 | K23 | K24 | K25 | K26 | K17 | K28 | K29 | K2A | K2B | K2C | K2D | + * |-----------------------------------------------------------------------------------------+ + * | K30 | K31 | K32 | K33 | K34 | K35 | K36 | K37 | K38 | K39 | K3A | K3B | K3D | K3C | + * |-----------------------------------------------------------------------------------------+ + * | K40 | K41 | K42 | | K44 | K45 | K46 | | K4A | K4B | K4C | K4D | + * `-----------------------------------------------------------------------------------------' + */ +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K41, K42, K44, K45, K46, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, XXX, K44, K45, K46, XXX, XXX, K49, K4A, K4B, K4C, K4D } \ +} + +/* + * ,-----------------------------------------------------------------------------------------. + * | K00 | K01 | K02 | K03 | K04 | K05 | K06 | K07 | K08 | K09 | K0A | K0B | K0C | K0D | K49 | + * |-----------------------------------------------------------------------------------------+ + * | K10 | K11 | K12 | K13 | K14 | K15 | K16 | K17 | K18 | K19 | K1A | K1B | K1C | K1D | + * |-----------------------------------------------------------------------------------------+ + * | K20 | K21 | K22 | K23 | K24 | K25 | K26 | K17 | K28 | K29 | K2A | K2B | K2C | K2D | + * |-----------------------------------------------------------------------------------------+ + * | K31 | K32 | K33 | K34 | K35 | K36 | K37 | K38 | K39 | K3A | K3B | K3D | K3C | + * |-----------------------------------------------------------------------------------------+ + * | K40 | K41 | K42 | K45 | K4B | K4C | K4D | + * `-----------------------------------------------------------------------------------------' + */ +#define LAYOUT_pingjunior( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K41, K42, K45, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { XXX, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, XXX, K4B, K4C, K4D } \ +} + From 4d97f352309f0b91900a1ecb8af2f1b9d246bddb Mon Sep 17 00:00:00 2001 From: Kimat Boven Date: Wed, 29 May 2019 20:10:30 +0200 Subject: [PATCH 140/341] Add belgian layout for sendstring (#6008) * belgian layout had no sendstring definition * backtick was not defined for belgian sendstring * slash definition was wrong for belgian sendstring Co-Authored-By: fauxpark * use BE_ keys whenever we can Co-Authored-By: fauxpark * ^ can be sent as a normal key (not a dead key) with altgr+para --- quantum/keymap_extras/sendstring_belgian.h | 94 ++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 quantum/keymap_extras/sendstring_belgian.h diff --git a/quantum/keymap_extras/sendstring_belgian.h b/quantum/keymap_extras/sendstring_belgian.h new file mode 100644 index 000000000..77531a14a --- /dev/null +++ b/quantum/keymap_extras/sendstring_belgian.h @@ -0,0 +1,94 @@ +/* Copyright 2019 kimat + * + * 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 . + */ +/* Sendstring definitions for the belgian layout */ +#ifndef SENDSTRING_BELGIAN +#define SENDSTRING_BELGIAN + +#include "keymap_belgian.h" + +const bool ascii_to_shift_lut[0x80] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 1, 1, 0, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 0, 0, 0, 0, 1, 1, + 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 +}; +const bool ascii_to_altgr_lut[0x80] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0 +}; + +// NOTE that you have to send the dead keys twice: tilda, circ +// SEND_STRING(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^^``_abcdefghijklmnopqrstuvwxyz{|}~~"); +const uint8_t ascii_to_keycode_lut[0x80] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + KC_BSPC, KC_TAB, KC_ENT, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, KC_ESC, 0, 0, 0, 0, + /* SPACE ! " # $ % & ' */ + KC_SPC, BE_EXLM, BE_QUOT, BE_QUOT, BE_DLR,BE_UGRV,BE_AMP, BE_APOS , + /* ( ) * + , - . / */ + BE_LPRN, BE_RPRN, BE_DLR,BE_EQL, BE_COMM, BE_MINS, BE_SCLN, BE_COLN, + /* 0 1 2 3 4 5 6 7 */ + BE_AGRV, BE_AMP, BE_EACU, BE_QUOT, BE_APOS, BE_LPRN, BE_PARA, BE_EGRV, + /* 8 9 : ; < = > ? */ + BE_EXLM, BE_CCED, BE_COLN, BE_SCLN, BE_LESS, BE_EQL, BE_LESS, BE_COMM, + /* @ A B C D E F G */ + BE_EACU, BE_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, + /* H I J K L M N O */ + KC_H, KC_I, KC_J, KC_K, KC_L, BE_M, KC_N, KC_O, + /* P Q R S T U V W */ + KC_P, BE_Q, KC_R, KC_S, KC_T, KC_U, KC_V, BE_W, + /* X Y Z [ \ ] ^ _ */ + KC_X, KC_Y, BE_Z, BE_CIRC, BE_LESS, BE_DLR, BE_PARA, BE_MINS, + /* ` a b c d e f g */ + BE_MU, BE_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, + /* h i j k l m n o */ + KC_H, KC_I, KC_J, KC_K, KC_L, BE_M, KC_N, KC_O, + /* p q r s t u v w */ + KC_P, BE_Q, KC_R, KC_S, KC_T, KC_U, KC_V, BE_W, + /* x y z { | } ~ DELETE */ + KC_X, KC_Y, BE_Z, BE_CCED, BE_AMP, BE_AGRV, BE_EQL, KC_DEL +}; + +#endif From 786ee9c7bef3852aa107c98c3a0edd0d0c7fe9bc Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed, 29 May 2019 11:16:13 -0700 Subject: [PATCH 141/341] [Keyboard] E6V2 R2 BMC PCB (#6009) * initial commit * remove mentions of oe and replace with le * add new layout macros with the spacebar change * add rgb underglow support * Update keyboards/exclusive/e6v2/le_bmc/rules.mk Co-Authored-By: fauxpark * Update keyboards/exclusive/e6v2/le_bmc/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- keyboards/exclusive/e6v2/le_bmc/config.h | 49 +++ keyboards/exclusive/e6v2/le_bmc/info.json | 24 ++ .../e6v2/le_bmc/keymaps/default/config.h | 19 + .../e6v2/le_bmc/keymaps/default/keymap.c | 74 ++++ .../e6v2/le_bmc/keymaps/default/readme.md | 1 + keyboards/exclusive/e6v2/le_bmc/le_bmc.c | 88 ++++ keyboards/exclusive/e6v2/le_bmc/le_bmc.h | 103 +++++ keyboards/exclusive/e6v2/le_bmc/readme.md | 44 ++ keyboards/exclusive/e6v2/le_bmc/rules.mk | 89 ++++ keyboards/exclusive/e6v2/le_bmc/usbconfig.h | 393 ++++++++++++++++++ 10 files changed, 884 insertions(+) create mode 100644 keyboards/exclusive/e6v2/le_bmc/config.h create mode 100644 keyboards/exclusive/e6v2/le_bmc/info.json create mode 100644 keyboards/exclusive/e6v2/le_bmc/keymaps/default/config.h create mode 100644 keyboards/exclusive/e6v2/le_bmc/keymaps/default/keymap.c create mode 100644 keyboards/exclusive/e6v2/le_bmc/keymaps/default/readme.md create mode 100644 keyboards/exclusive/e6v2/le_bmc/le_bmc.c create mode 100644 keyboards/exclusive/e6v2/le_bmc/le_bmc.h create mode 100644 keyboards/exclusive/e6v2/le_bmc/readme.md create mode 100644 keyboards/exclusive/e6v2/le_bmc/rules.mk create mode 100644 keyboards/exclusive/e6v2/le_bmc/usbconfig.h diff --git a/keyboards/exclusive/e6v2/le_bmc/config.h b/keyboards/exclusive/e6v2/le_bmc/config.h new file mode 100644 index 000000000..d0b976c1e --- /dev/null +++ b/keyboards/exclusive/e6v2/le_bmc/config.h @@ -0,0 +1,49 @@ +/* +Copyright 2019 MechMerlin + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER exclusive +#define PRODUCT e6v2 le bmc +#define DESCRIPTION A custom 60% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 11 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ + +// 0 1 2 3 4 5 6 7 8 9 A +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, C2, C3, C4, C5, D7 } +#define DIODE_DIRECTION COL2ROW + +#define RGBLED_NUM 6 +#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/exclusive/e6v2/le_bmc/info.json b/keyboards/exclusive/e6v2/le_bmc/info.json new file mode 100644 index 000000000..aa6d171ba --- /dev/null +++ b/keyboards/exclusive/e6v2/le_bmc/info.json @@ -0,0 +1,24 @@ +{ + "keyboard_name": "", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.26}, {"x":10.0, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_ansi": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":2.75}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_hhkb": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Delete", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Os", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Os", "x":12.5, "y":4}] + }, + + "LAYOUT_60_tsangan": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.5}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}, {"x":13.5, "y":4, "w":1.5}] + } + } +} \ No newline at end of file diff --git a/keyboards/exclusive/e6v2/le_bmc/keymaps/default/config.h b/keyboards/exclusive/e6v2/le_bmc/keymaps/default/config.h new file mode 100644 index 000000000..26c6d6ade --- /dev/null +++ b/keyboards/exclusive/e6v2/le_bmc/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/exclusive/e6v2/le_bmc/keymaps/default/keymap.c b/keyboards/exclusive/e6v2/le_bmc/keymaps/default/keymap.c new file mode 100644 index 000000000..730041917 --- /dev/null +++ b/keyboards/exclusive/e6v2/le_bmc/keymaps/default/keymap.c @@ -0,0 +1,74 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_60_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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, MO(1) + ), + +[1] = LAYOUT_60_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_TOGG, BL_INC, BL_DEC, BL_STEP, RESET, EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/exclusive/e6v2/le_bmc/keymaps/default/readme.md b/keyboards/exclusive/e6v2/le_bmc/keymaps/default/readme.md new file mode 100644 index 000000000..4a1b6efa6 --- /dev/null +++ b/keyboards/exclusive/e6v2/le_bmc/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for bmc diff --git a/keyboards/exclusive/e6v2/le_bmc/le_bmc.c b/keyboards/exclusive/e6v2/le_bmc/le_bmc.c new file mode 100644 index 000000000..5f7ef25b2 --- /dev/null +++ b/keyboards/exclusive/e6v2/le_bmc/le_bmc.c @@ -0,0 +1,88 @@ +/* Copyright 2018 amnesia0287 + * + * 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 . + */ +#include "rgblight.h" +#include "i2c_master.h" +#include "quantum.h" + +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; + +void rgblight_set(void) { + if (!rgblight_config.enable) { + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; + } + } + + i2c_init(); + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); +} +#endif + +void matrix_init_kb(void) { +#ifdef RGBLIGHT_ENABLE + if (rgblight_config.enable) { + i2c_init(); + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); + } +#endif + // call user level keymaps, if any + matrix_init_user(); +} + +void matrix_scan_kb(void) { +#ifdef RGBLIGHT_ENABLE + rgblight_task(); +#endif + matrix_scan_user(); + /* Nothing else for now. */ +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +void backlight_init_ports(void) { + // initialize pins D0, D1, D4 and D6 as output + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + // turn backlight LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); +} + +void backlight_set(uint8_t level) { + if (level == 0) { + // turn backlight LEDs off + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); + } else { + // turn backlight LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); + } +} \ No newline at end of file diff --git a/keyboards/exclusive/e6v2/le_bmc/le_bmc.h b/keyboards/exclusive/e6v2/le_bmc/le_bmc.h new file mode 100644 index 000000000..2328690ad --- /dev/null +++ b/keyboards/exclusive/e6v2/le_bmc/le_bmc.h @@ -0,0 +1,103 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +// LAYOUT_all ignores the key often coded as ~# to the left of Enter on ISO layouts. +// This is done as it shares the same row AND col as the pipe key. + +#define LAYOUT_all( \ + k50, k41, k42, k43, k44, k45, k61, k68, k78, k71, k49, k48, k47, k52, k4A, \ + k30, k31, k32, k33, k34, k35, k62, k67, k77, k72, k39, k38, k37, k36, \ + k20, k21, k22, k23, k24, k25, k63, k66, k76, k73, k29, k28, k26, \ + k10, k53, k11, k12, k13, k14, k15, k64, k6A, k7A, k74, k19, k18, k54, \ + k00, k01, k02, k65, k04, k08, k09, k05 \ +) \ +{ \ + { k00, k01, k02, KC_NO, k04, k05, KC_NO, KC_NO, k08, k09, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, KC_NO, KC_NO, k18, k19, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, KC_NO }, \ + { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4A }, \ + { k50, KC_NO, k52, k53, k54, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, k61, k62, k63, k64, k65, k66, k67, k68, KC_NO, k6A }, \ + { KC_NO, k71, k72, k73, k74, KC_NO, k76, k77, k78, KC_NO, k7A }, \ +} + + +#define LAYOUT_60_ansi( \ + k50, k41, k42, k43, k44, k45, k61, k68, k78, k71, k49, k48, k47, k4A, \ + k30, k31, k32, k33, k34, k35, k62, k67, k77, k72, k39, k38, k37, k36, \ + k20, k21, k22, k23, k24, k25, k63, k66, k76, k73, k29, k28, k26, \ + k10, k11, k12, k13, k14, k15, k64, k6A, k7A, k74, k19, k18, \ + k00, k01, k02, k65, k04, k08, k09, k05 \ +) \ +{ \ + { k00, k01, k02, KC_NO, k04, k05, KC_NO, KC_NO, k08, k09, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, KC_NO, KC_NO, k18, k19, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, KC_NO }, \ + { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4A }, \ + { k50, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, k61, k62, k63, k64, k65, k66, k67, k68, KC_NO, k6A }, \ + { KC_NO, k71, k72, k73, k74, KC_NO, k76, k77, k78, KC_NO, k7A }, \ +} + +#define LAYOUT_60_hhkb( \ + k50, k41, k42, k43, k44, k45, k61, k68, k78, k71, k49, k48, k47, k52, k4A, \ + k30, k31, k32, k33, k34, k35, k62, k67, k77, k72, k39, k38, k37, k36, \ + k20, k21, k22, k23, k24, k25, k63, k66, k76, k73, k29, k28, k26, \ + k10, k11, k12, k13, k14, k15, k64, k6A, k7A, k74, k19, k18, k54, \ + k01, k02, k65, k08, k09 \ +) \ +{ \ + { KC_NO, k01, k02, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k08, k09, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, KC_NO, KC_NO, k18, k19, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, KC_NO }, \ + { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4A }, \ + { k50, KC_NO, k52, KC_NO, k54, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, k61, k62, k63, k64, k65, k66, k67, k68, KC_NO, k6A }, \ + { KC_NO, k71, k72, k73, k74, KC_NO, k76, k77, k78, KC_NO, k7A }, \ +} + +#define LAYOUT_60_tsangan( \ + k50, k41, k42, k43, k44, k45, k61, k68, k78, k71, k49, k48, k47, k52, k4A, \ + k30, k31, k32, k33, k34, k35, k62, k67, k77, k72, k39, k38, k37, k36, \ + k20, k21, k22, k23, k24, k25, k63, k66, k76, k73, k29, k28, k26, \ + k10, k11, k12, k13, k14, k15, k64, k6A, k7A, k74, k19, k18, k54, \ + k00, k01, k02, k65, k08, k09, k05 \ +) \ +{ \ + { k00, k01, k02, KC_NO, KC_NO, k05, KC_NO, KC_NO, k08, k09, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, KC_NO, KC_NO, k18, k19, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, KC_NO }, \ + { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4A }, \ + { k50, KC_NO, k52, KC_NO, k54, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, k61, k62, k63, k64, k65, k66, k67, k68, KC_NO, k6A }, \ + { KC_NO, k71, k72, k73, k74, KC_NO, k76, k77, k78, KC_NO, k7A }, \ +} diff --git a/keyboards/exclusive/e6v2/le_bmc/readme.md b/keyboards/exclusive/e6v2/le_bmc/readme.md new file mode 100644 index 000000000..4dc8e6ef5 --- /dev/null +++ b/keyboards/exclusive/e6v2/le_bmc/readme.md @@ -0,0 +1,44 @@ +# E6-V2 Bootmapper Client (ps2avrgb) LE + +These docs are for the BMC version of the E6-V2 PCB sold during Round 2 which has an atmega32a microcontroller. Please do not flash this `.hex` file on your atmega32u4 equipped E6-V2 or your E6V2 BMC from Round 1. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: ps2avrgb E6-V2 with atmega32a microcontroller +Hardware Availability: [geekhack.org/index.php?topic=90787.0](https://geekhack.org/index.php?topic=90787.0) + +Make example for this keyboard (after setting up your build environment): + + make exclusive/e6v2/le_bmc:default + +Flashing + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +**Reset Key:** Hold down the key located at `K00`, commonly programmed as left control while plugging in the keyboard. + +Windows: +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset. +3. Press the `Find Device` button and ensure that your keyboard is found. +4. Press the `Open .hex File` button and locate the `.hex` file you created. +5. Press the `Flash Device` button and wait for the process to complete. + +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python3 + pip3 install pyusb + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + ``` +4. Place your keyboard into reset. +5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. + +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). diff --git a/keyboards/exclusive/e6v2/le_bmc/rules.mk b/keyboards/exclusive/e6v2/le_bmc/rules.mk new file mode 100644 index 000000000..a9156adeb --- /dev/null +++ b/keyboards/exclusive/e6v2/le_bmc/rules.mk @@ -0,0 +1,89 @@ +# MCU name +MCU = atmega32a +PROTOCOL = VUSB + +NO_UART = yes +NO_SUSPEND_POWER_DOWN = yes + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 12000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +# ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +# F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS = -DDEBUG_LEVEL=0 + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = bootloadHID + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +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 = yes # 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_CUSTOM_DRIVER = yes +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +SRC += i2c_master.c + +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/exclusive/e6v2/le_bmc/usbconfig.h b/keyboards/exclusive/e6v2/le_bmc/usbconfig.h new file mode 100644 index 000000000..f22f2b631 --- /dev/null +++ b/keyboards/exclusive/e6v2/le_bmc/usbconfig.h @@ -0,0 +1,393 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#pragma once + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_MAX_BUS_POWER 500 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'E', 'x', 'c', 'l', 'u', 's', 'i', 'v', 'e' +#define USB_CFG_VENDOR_NAME_LEN 9 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'E', '6', 'V', '2' +#define USB_CFG_DEVICE_NAME_LEN 4 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect From 2f7a57a6de1af48262702eabad39c2563c02f253 Mon Sep 17 00:00:00 2001 From: zvecr Date: Fri, 31 May 2019 00:53:49 +0100 Subject: [PATCH 142/341] Copy avr teensy flash logic to arm (#6016) --- tmk_core/chibios.mk | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index 44c00bdd1..11715cf34 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -260,6 +260,19 @@ dfu-util-wait: $(BUILD_DIR)/$(TARGET).bin cpfirmware sizeafter st-link-cli: $(BUILD_DIR)/$(TARGET).hex sizeafter $(ST_LINK_CLI) $(ST_LINK_ARGS) -q -c SWD -p $(BUILD_DIR)/$(TARGET).hex -Rst + +# Autodetect teensy loader +ifndef TEENSY_LOADER_CLI + ifneq (, $(shell which teensy-loader-cli 2>/dev/null)) + TEENSY_LOADER_CLI ?= teensy-loader-cli + else + TEENSY_LOADER_CLI ?= teensy_loader_cli + endif +endif + +teensy: $(BUILD_DIR)/$(TARGET).hex cpfirmware sizeafter + $(TEENSY_LOADER_CLI) -mmcu=$(MCU_LDSCRIPT) -w -v $(BUILD_DIR)/$(TARGET).hex + bin: $(BUILD_DIR)/$(TARGET).bin sizeafter if [ ! -z "$(DFU_SUFFIX_ARGS)" ]; then \ $(DFU_SUFFIX) $(DFU_SUFFIX_ARGS) -a $(BUILD_DIR)/$(TARGET).bin 1>/dev/null ;\ From 3ef425423a9b8399b02c8240b4f56c3713f984f6 Mon Sep 17 00:00:00 2001 From: Elliot Powell <32494740+e11i0t23@users.noreply.github.com> Date: Thu, 30 May 2019 16:53:43 +0100 Subject: [PATCH 143/341] Update feature_encoders.md Fix missing closing comment after second encoder --- docs/feature_encoders.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/feature_encoders.md b/docs/feature_encoders.md index dd12c91ce..9ac97a9a1 100644 --- a/docs/feature_encoders.md +++ b/docs/feature_encoders.md @@ -38,7 +38,7 @@ or `keymap.c`: } else { tap_code(KC_PGUP); } - } else if (index == 1) { /* Second encoder + } else if (index == 1) { /* Second encoder */ if (clockwise) { tap_code(KC_UP); } else { From 88966767ee6005c33600e97ef36c873d33cb1e15 Mon Sep 17 00:00:00 2001 From: Peter Tillemans Date: Fri, 31 May 2019 02:11:55 +0200 Subject: [PATCH 144/341] [Keyboard] Fix jc65 when RGB or BACKLIGHT disabled (#6022) --- keyboards/jc65/v32a/v32a.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/keyboards/jc65/v32a/v32a.c b/keyboards/jc65/v32a/v32a.c index 621789423..8176ade0a 100644 --- a/keyboards/jc65/v32a/v32a.c +++ b/keyboards/jc65/v32a/v32a.c @@ -29,6 +29,7 @@ along with this program. If not, see . #include "i2c.h" #include "quantum.h" +#ifdef RGBLIGHT_ENABLE extern rgblight_config_t rgblight_config; void rgblight_set(void) { @@ -43,12 +44,16 @@ void rgblight_set(void) { i2c_init(); i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); } +#endif __attribute__ ((weak)) void matrix_scan_user(void) { - rgblight_task(); +#ifdef RGBLIGHT_ENABLE + rgblight_task(); +#endif } +#ifdef BACKLIGHT_ENABLE void backlight_init_ports(void) { DDRD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); @@ -62,4 +67,5 @@ void backlight_set(uint8_t level) { // Turn on the lights PORTD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); } -} \ No newline at end of file +} +#endif From 3fd34daf14b0a9618d8c9c763f52a9b19aee96a5 Mon Sep 17 00:00:00 2001 From: Jason Dunsmore Date: Thu, 30 May 2019 19:13:29 -0500 Subject: [PATCH 145/341] [Keymap] Added keymap for user jasondunsmore (#6023) --- .../iris/keymaps/jasondunsmore/config.h | 27 ++++ .../iris/keymaps/jasondunsmore/keymap.c | 147 ++++++++++++++++++ .../iris/keymaps/jasondunsmore/readme.md | 7 + .../iris/keymaps/jasondunsmore/rules.mk | 2 + 4 files changed, 183 insertions(+) create mode 100644 keyboards/keebio/iris/keymaps/jasondunsmore/config.h create mode 100644 keyboards/keebio/iris/keymaps/jasondunsmore/keymap.c create mode 100644 keyboards/keebio/iris/keymaps/jasondunsmore/readme.md create mode 100644 keyboards/keebio/iris/keymaps/jasondunsmore/rules.mk diff --git a/keyboards/keebio/iris/keymaps/jasondunsmore/config.h b/keyboards/keebio/iris/keymaps/jasondunsmore/config.h new file mode 100644 index 000000000..8aa4be367 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/jasondunsmore/config.h @@ -0,0 +1,27 @@ +/* +Copyright 2017 Danny Nguyen + +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ +#define MASTER_LEFT + +#define TAPPING_TERM 200 diff --git a/keyboards/keebio/iris/keymaps/jasondunsmore/keymap.c b/keyboards/keebio/iris/keymaps/jasondunsmore/keymap.c new file mode 100644 index 000000000..5f9307663 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/jasondunsmore/keymap.c @@ -0,0 +1,147 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// Layers +#define _QWERTY 0 // Base layer +#define _NUMB 1 +#define _NAVI 2 + +// Keys +#define KC_NUMB MO(_NUMB) +#define KC_NAVI MO(_NAVI) +#define KC_AGRV LALT_T(KC_GRAVE) +#define KC_GUIE LGUI_T(KC_ESC) +#define KC_REST RESET +#define KC_DBUG DEBUG + +// Tap Dance Declarations +enum { + TD_LALT_GRV_BSLS = 0, + TD_LSFT_LBRC, + TD_RSFT_RBRC, +}; + +void alt_grave_backslash(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + if (!state->pressed) { + register_code(KC_GRAVE); + } else { + register_code(KC_LALT); + } + } else if (state->count == 2) { + register_code(KC_BSLASH); + } +} + +void alt_grave_backslash_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code(KC_GRAVE); + unregister_code(KC_LALT); + } else if (state->count == 2) { + unregister_code(KC_BSLASH); + } +} + +void left_brackets(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + if (!state->pressed) { + register_code(KC_LSFT); + register_code(KC_9); + } else { + register_code(KC_LSFT); + } + } else if (state->count == 2) { + register_code(KC_LBRC); + } +} + +void left_brackets_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code(KC_LSFT); + unregister_code(KC_9); + } else if (state->count == 2) { + unregister_code(KC_LBRC); + } +} + +void right_brackets(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + if (!state->pressed) { + register_code(KC_RSFT); + register_code(KC_0); + } else { + register_code(KC_RSFT); + } + } else if (state->count == 2) { + register_code(KC_RBRC); + } +} + +void right_brackets_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code(KC_RSFT); + unregister_code(KC_0); + } else if (state->count == 2) { + unregister_code(KC_RBRC); + } +} + + +// Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + // Tap once for KC_SLSH, twice for KC_BSLS + [TD_LALT_GRV_BSLS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, alt_grave_backslash, alt_grave_backslash_reset), + [TD_LSFT_LBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, left_brackets, left_brackets_reset), + [TD_RSFT_RBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, right_brackets, right_brackets_reset) +}; + +// Tap Dance Keys +#define KC_AGRB TD(TD_LALT_GRV_BSLS) +#define KC_LSBK TD(TD_LSFT_LBRC) +#define KC_RSBK TD(TD_RSFT_RBRC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc( +//,----+----+----+----+----+----. ,----+----+----+----+----+----. + GUIE, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, DEL, +//|----+----+----+----+----+----| |----+----+----+----+----+----| + TAB, Q, W, E, R, T, Y, U, I, O, P, BSPC, +//|----+----+----+----+----+----| |----+----+----+----+----+----| + AGRB, A, S, D, F, G, H, J, K, L, SCLN,QUOT, +//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + LSBK, Z, X, C, V, B, MINS, EQL, N, M, COMM,DOT, SLSH,RSBK, +//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + NUMB,LCTL,SPC, ENT, RCTL,NAVI +// `----+----+----' `----+----+----' + ), + + [_NUMB] = LAYOUT_kc( +//,----+----+----+----+----+----. ,----+----+----+----+----+----. + F12, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, +//|----+----+----+----+----+----| |----+----+----+----+----+----| + NO, F17, F18, F19, F20, NO, NO, 7, 8, 9, 0, TRNS, +//|----+----+----+----+----+----| |----+----+----+----+----+----| + TRNS,F13, F14, F15, F16, NO, ASTR, 4, 5, 6, PLUS,TRNS, +//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + TRNS,F21, F22, F23, F24, NO, TRNS, TRNS,SLSH, 1, 2, 3, MINS,TRNS, +//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + TRNS,TRNS,TRNS, TRNS,DOT, TRNS +// `----+----+----' `----+----+----' + ), + + [_NAVI] = LAYOUT_kc( +//,----+----+----+----+----+----. ,----+----+----+----+----+----. + PWR, MUTE,VOLD,VOLU,BRID,BRIU, REST,DBUG, NO, NO, NO, TRNS, +//|----+----+----+----+----+----| |----+----+----+----+----+----| + WAKE,HOME,PGUP, UP, PGDN,TRNS, NO, NO, NO, NO, NO, TRNS, +//|----+----+----+----+----+----| |----+----+----+----+----+----| + TRNS,END, LEFT,DOWN,RGHT,TRNS, PAUS,CAPS,PSCR,SLCK,INS, TRNS, +//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, NO, NO, NO, NO, NO, TRNS, +//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + TRNS,TRNS,TRNS, TRNS,TRNS,TRNS +// `----+----+----' `----+----+----' + ) +}; diff --git a/keyboards/keebio/iris/keymaps/jasondunsmore/readme.md b/keyboards/keebio/iris/keymaps/jasondunsmore/readme.md new file mode 100644 index 000000000..0817b5e9b --- /dev/null +++ b/keyboards/keebio/iris/keymaps/jasondunsmore/readme.md @@ -0,0 +1,7 @@ +# jasondunsmore's iris layout + +_QWERTY is the default layer, from which all letters, symbols and +numbers can be accessed. The _NUMB layer contains a numberpad, +operators, and function keys. The _NAVI layer contains navigation +keys, some hardware adjustment keys, lock keys, and RESET/DEBUG for +QMK. diff --git a/keyboards/keebio/iris/keymaps/jasondunsmore/rules.mk b/keyboards/keebio/iris/keymaps/jasondunsmore/rules.mk new file mode 100644 index 000000000..d58c21f2b --- /dev/null +++ b/keyboards/keebio/iris/keymaps/jasondunsmore/rules.mk @@ -0,0 +1,2 @@ +TAP_DANCE_ENABLE = yes +COMMAND_ENABLE = no From b877596096d56c4c5c3e4d34f8e6776e01ab4e8d Mon Sep 17 00:00:00 2001 From: Austin Hill Date: Thu, 30 May 2019 20:49:27 -0400 Subject: [PATCH 146/341] [Keymap] added hhkb layout for tada68 (#6027) --- keyboards/tada68/keymaps/hhkb68/README.md | 2 ++ keyboards/tada68/keymaps/hhkb68/keymap.c | 6 ++++++ keyboards/tada68/keymaps/hhkb68/layers.json | 1 + keyboards/tada68/keymaps/hhkb68/readme.md | 13 +++++++++++++ 4 files changed, 22 insertions(+) create mode 100644 keyboards/tada68/keymaps/hhkb68/README.md create mode 100644 keyboards/tada68/keymaps/hhkb68/keymap.c create mode 100644 keyboards/tada68/keymaps/hhkb68/layers.json create mode 100644 keyboards/tada68/keymaps/hhkb68/readme.md diff --git a/keyboards/tada68/keymaps/hhkb68/README.md b/keyboards/tada68/keymaps/hhkb68/README.md new file mode 100644 index 000000000..013b812fc --- /dev/null +++ b/keyboards/tada68/keymaps/hhkb68/README.md @@ -0,0 +1,2 @@ +# HHKB68 +Layout to closely match the primary and function layers of the HHKB. diff --git a/keyboards/tada68/keymaps/hhkb68/keymap.c b/keyboards/tada68/keymaps/hhkb68/keymap.c new file mode 100644 index 000000000..66372b6f6 --- /dev/null +++ b/keyboards/tada68/keymaps/hhkb68/keymap.c @@ -0,0 +1,6 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ansi(KC_ESC, 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_BSLS, KC_GRV, 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_BSPC, KC_DEL, 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, KC_PGUP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_PGDN, MO(1), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + [1] = LAYOUT_ansi(KC_TRNS, 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_TRNS, KC_INS, KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_DEL, KC_HOME, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_END, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; diff --git a/keyboards/tada68/keymaps/hhkb68/layers.json b/keyboards/tada68/keymaps/hhkb68/layers.json new file mode 100644 index 000000000..9553c3317 --- /dev/null +++ b/keyboards/tada68/keymaps/hhkb68/layers.json @@ -0,0 +1 @@ +[["KC_ESC", "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_BSLS", "KC_GRV", "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_BSPC", "KC_DEL", "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", "KC_PGUP", "KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_RSFT", "MO(1)", "KC_PGDN", "MO(1)", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "KC_RGUI", "KC_LEFT", "KC_DOWN", "KC_UP", "KC_RGHT"], ["KC_TRNS", "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_TRNS", "KC_INS", "KC_CAPS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PSCR", "KC_TRNS", "KC_TRNS", "KC_UP", "KC_TRNS", "KC_DEL", "KC_HOME", "KC_TRNS", "KC_VOLD", "KC_VOLU", "KC_MUTE", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_HOME", "KC_PGUP", "KC_LEFT", "KC_RGHT", "KC_TRNS", "KC_END", "KC_TRNS", "BL_DEC", "BL_TOGG", "BL_INC", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_END", "KC_PGDN", "KC_DOWN", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"]] \ No newline at end of file diff --git a/keyboards/tada68/keymaps/hhkb68/readme.md b/keyboards/tada68/keymaps/hhkb68/readme.md new file mode 100644 index 000000000..fd07b155f --- /dev/null +++ b/keyboards/tada68/keymaps/hhkb68/readme.md @@ -0,0 +1,13 @@ +# Generated Keymap Layout + +This layout was generated by the QMK API. You can find the JSON data used to +generate this keymap in the file layers.json. + +To make use of this file you will need follow the following steps: + +* Download or Clone QMK Firmware: +* Extract QMK Firmware to a location on your hard drive +* Copy this folder into %s +* You are now ready to compile or use your keymap with the source + +More information can be found in the QMK docs: \ No newline at end of file From 6241cf977efee660b17077e6e24ca1a2603c6e0f Mon Sep 17 00:00:00 2001 From: yiancar Date: Fri, 31 May 2019 01:50:10 +0100 Subject: [PATCH 147/341] [Keyboard] Fix json for NK65 (#6026) --- keyboards/nk65/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/nk65/info.json b/keyboards/nk65/info.json index ea227f71d..4edb13e8c 100755 --- a/keyboards/nk65/info.json +++ b/keyboards/nk65/info.json @@ -5,7 +5,7 @@ "width": 16, "height": 5, "layouts": { - "LAYOUT": { + "LAYOUT_65_ansi": { "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Home", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Page Up", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Page Down", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Fn", "x":11, "y":4}, {"label":"Ctrl", "x":12, "y":4}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] } } From 6693d16362a807c770d282a2622ab0287a588dfe Mon Sep 17 00:00:00 2001 From: Alex Speller Date: Fri, 31 May 2019 03:54:40 +0100 Subject: [PATCH 148/341] [Keyboard] Remove file with same name and different case (#6028) --- keyboards/tada68/keymaps/hhkb68/README.md | 2 -- keyboards/tada68/keymaps/hhkb68/readme.md | 15 ++------------- 2 files changed, 2 insertions(+), 15 deletions(-) delete mode 100644 keyboards/tada68/keymaps/hhkb68/README.md diff --git a/keyboards/tada68/keymaps/hhkb68/README.md b/keyboards/tada68/keymaps/hhkb68/README.md deleted file mode 100644 index 013b812fc..000000000 --- a/keyboards/tada68/keymaps/hhkb68/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# HHKB68 -Layout to closely match the primary and function layers of the HHKB. diff --git a/keyboards/tada68/keymaps/hhkb68/readme.md b/keyboards/tada68/keymaps/hhkb68/readme.md index fd07b155f..013b812fc 100644 --- a/keyboards/tada68/keymaps/hhkb68/readme.md +++ b/keyboards/tada68/keymaps/hhkb68/readme.md @@ -1,13 +1,2 @@ -# Generated Keymap Layout - -This layout was generated by the QMK API. You can find the JSON data used to -generate this keymap in the file layers.json. - -To make use of this file you will need follow the following steps: - -* Download or Clone QMK Firmware: -* Extract QMK Firmware to a location on your hard drive -* Copy this folder into %s -* You are now ready to compile or use your keymap with the source - -More information can be found in the QMK docs: \ No newline at end of file +# HHKB68 +Layout to closely match the primary and function layers of the HHKB. From ba6b3fc1b55df7bb3e34721d2622837b394862a5 Mon Sep 17 00:00:00 2001 From: zvecr Date: Thu, 17 Jan 2019 17:08:23 +0000 Subject: [PATCH 149/341] Use qmk docker image for travis CI builds --- .travis.yml | 24 +++++++----------------- Dockerfile | 5 +---- util/travis_build.sh | 7 +++++++ util/travis_test.sh | 7 +++++++ 4 files changed, 22 insertions(+), 21 deletions(-) diff --git a/.travis.yml b/.travis.yml index 796be6c04..b4a76765c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,31 +11,21 @@ env: global: - secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM= - MAKEFLAGS="-j3 --output-sync" +services: + - docker before_install: - - wget http://ww1.microchip.com/downloads/en/DeviceDoc/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz || wget http://qmk.fm/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz - # Need DFU > .5 for dfu-suffix - - sudo add-apt-repository --yes ppa:tormodvolden/ppa - - sudo apt-get update -qq + - docker build -t qmkfm/qmk_firmware . install: - - tar -zxf avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz - - export PATH="$PATH:$TRAVIS_BUILD_DIR/avr8-gnu-toolchain-linux_x86_64/bin" - npm install -g moxygen - - sudo apt-get -y --force-yes install dfu-util -before_script: - - avr-gcc --version script: -- git rev-parse --short HEAD -- bash util/travis_test.sh -- bash util/travis_build.sh -- bash util/travis_docs.sh + - git rev-parse --short HEAD + - bash util/travis_test.sh + - bash util/travis_build.sh + - bash util/travis_docs.sh addons: apt: packages: - - dfu-programmer - pandoc - - gcc-arm-none-eabi - - binutils-arm-none-eabi - - libnewlib-arm-none-eabi - diffutils - dos2unix - doxygen diff --git a/Dockerfile b/Dockerfile index 6bd5acb33..dc9d96ecd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,11 +19,8 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ zip \ && rm -rf /var/lib/apt/lists/* -ENV KEYBOARD=ergodox_ez -ENV KEYMAP=default - VOLUME /qmk_firmware WORKDIR /qmk_firmware COPY . . -CMD make $KEYBOARD:$KEYMAP +CMD make all:default diff --git a/util/travis_build.sh b/util/travis_build.sh index 2c6c62931..02a749e85 100755 --- a/util/travis_build.sh +++ b/util/travis_build.sh @@ -1,5 +1,12 @@ #!/bin/bash +# if docker is installed - call make within the qmk docker image +if command -v docker >/dev/null; then + function make() { + docker run --rm -e MAKEFLAGS="$MAKEFLAGS" -w /qmk_firmware/ -v "$PWD":/qmk_firmware qmkfm/qmk_firmware make "$@" + } +fi + # test force push #TRAVIS_COMMIT_RANGE="c287f1bfc5c8...81f62atc4c1d" diff --git a/util/travis_test.sh b/util/travis_test.sh index 6c48f898c..b6ec06f05 100644 --- a/util/travis_test.sh +++ b/util/travis_test.sh @@ -19,4 +19,11 @@ if [ "$BRANCH" != "master" ] && [ "$NUM_IMPACTING_CHANGES" == "0" ]; then exit 0 fi +# if docker is installed - call make within the qmk docker image +if command -v docker >/dev/null; then + function make() { + docker run --rm -e MAKEFLAGS="$MAKEFLAGS" -w /qmk_firmware/ -v "$PWD":/qmk_firmware qmkfm/qmk_firmware make "$@" + } +fi + make test:all From 9cc5841a91ff1bf95d6895254b43b097a0f365aa Mon Sep 17 00:00:00 2001 From: Elliot Powell <32494740+e11i0t23@users.noreply.github.com> Date: Fri, 31 May 2019 19:04:39 +0100 Subject: [PATCH 150/341] Update reference_configurator_support.md We no longer auto generate bootloader into info.json through the website therefore this can be removed --- docs/reference_configurator_support.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference_configurator_support.md b/docs/reference_configurator_support.md index a20a6c9ad..784c6d9f7 100644 --- a/docs/reference_configurator_support.md +++ b/docs/reference_configurator_support.md @@ -89,7 +89,7 @@ Once the layout is as desired, move to the Raw Data tab in KLE, and copy the con To convert this data into our JSON, go to the [QMK KLE-JSON Converter](https://qmk.fm/converter/), paste the Raw Data into the Input field, and click the Convert button. After a moment, our JSON data will appear in the Output field. Copy the contents to a new text document, and name the document `info.json`, saving it in the same folder that contains `numpad.h`. -Use the `keyboard_name` object to set the name of the keyboard. The `bootloader` object is deprecated, so it can be deleted. For instruction purposes, we will put each key's object on its own line. This is only to make the file more human-readable, and does not affect the Configurator's functionality. +Use the `keyboard_name` object to set the name of the keyboard. For instruction purposes, we will put each key's object on its own line. This is only to make the file more human-readable, and does not affect the Configurator's functionality. ```json { From 2a1f6389c27720ca20dbe7941a78245677e644e6 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 31 May 2019 11:57:07 -0700 Subject: [PATCH 151/341] [Keyboard] YMD96 refactor (#5472) * Remove JJ50 data from YMD96 JJ50 was actually added as its own keyboard when this was added in #2546. It should have been taken out then, but wasn't. * Update ymd96.h - use #pragma once include guard - remove redundant file includes * Update LAYOUT_iso macro to K notation * Update LAYOUT_custom macro to K notation * Update LAYOUT_default macro to K notation * Refactor default keymap * Rename readme file to lowercase * Rename layers enum and default layer - renamed layers enum to layer_names - proposed by fauxpark in Issue 5977, and I like the idea - https://github.com/qmk/qmk_firmware/issues/5977#issuecomment-495924338 - renamed the base layer to _DEFAULT - I think it looks nicer. --- keyboards/ymd96/keymaps/JJ50/keymap.c | 96 -------------------- keyboards/ymd96/keymaps/default/keymap.c | 74 ++++++++-------- keyboards/ymd96/{README.md => readme.md} | 0 keyboards/ymd96/ymd96.h | 106 +++++++++-------------- 4 files changed, 80 insertions(+), 196 deletions(-) delete mode 100644 keyboards/ymd96/keymaps/JJ50/keymap.c rename keyboards/ymd96/{README.md => readme.md} (100%) diff --git a/keyboards/ymd96/keymaps/JJ50/keymap.c b/keyboards/ymd96/keymaps/JJ50/keymap.c deleted file mode 100644 index b70433ee1..000000000 --- a/keyboards/ymd96/keymaps/JJ50/keymap.c +++ /dev/null @@ -1,96 +0,0 @@ -/* -Base Copyright 2017 Luiz Ribeiro -Modified 2017 Andrew Novak -Modified 2018 Wayne Jones (WarmCatUK) - -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 LicensezZZ -along with this program. If not, see . -*/ - -#include "ymd96.h" -#include "action_layer.h" -#include "rgblight.h" - -#define ______ KC_TRNS -#define _DEFLT 0 -#define _RAISE 1 -#define _LOWER 2 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* Qwerty - * ,-----------------------------------------------------------------------------------. - * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ - [_DEFLT] = LAYOUT_jj50( \ - 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ - KC_ESC, 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, SFT_T(KC_ENT),\ - _______, KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC,KC_SPC, MO(_RAISE),KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ - ), - - - /* Raise - * ,-----------------------------------------------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | [ | ] | \ | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | |ISO # |ISO / | PUP | PDN | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ - [_RAISE] = LAYOUT_jj50( \ - 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_BSLS, \ - _______, _______, _______, _______, _______, _______, _______, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ - ), - - - /* Lower - * ,-----------------------------------------------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | { | } | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | |ISO ~ |ISO | | HOM | END | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ - [_LOWER] = LAYOUT_jj50( \ - 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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, KC_PIPE, \ - _______, _______, _______, _______, _______, _______, _______,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ - ) - -}; diff --git a/keyboards/ymd96/keymaps/default/keymap.c b/keyboards/ymd96/keymaps/default/keymap.c index c540972f1..0b8b98157 100644 --- a/keyboards/ymd96/keymaps/default/keymap.c +++ b/keyboards/ymd96/keymaps/default/keymap.c @@ -18,45 +18,45 @@ along with this program. If not, see . #include QMK_KEYBOARD_H -#define ______ KC_TRNS -#define _DEFLT 0 -#define _RAISE 1 - -#define KEYMAP LAYOUT_default +enum layer_names { + _DEFAULT, + _RAISE, +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Layer 0, default layer - * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |Print | Home | End |Insert|Delete| PgUp | 19 keys - * | ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BkSpc |NumLck| / | * | PgDn | 18 keys - * | Tab | Q | W | E | R | T | Y | U | I | O | P | { | } | \ | 7 | 8 | 9 | - | 18 keys - * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Return | 4 | 5 | 6 | + | 17 keys - * | LShft | Z | X | C | V | B | N | M | , | . | / | RShft | 1 | 2 | 3 | En | 16 keys - * | Ctrl | Win | Alt | Space | Fn | Win | Left | Down | Up | Right| 0 | . | | 12 keys - */ + /* Layer 0, default layer + * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |Print | Home | End |Insert|Delete| PgUp | 19 keys + * | ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BkSpc |NumLck| / | * | PgDn | 18 keys + * | Tab | Q | W | E | R | T | Y | U | I | O | P | { | } | \ | 7 | 8 | 9 | - | 18 keys + * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Return | 4 | 5 | 6 | + | 17 keys + * | LShft | Z | X | C | V | B | N | M | , | . | / | RShft | 1 | 2 | 3 | En | 16 keys + * | Ctrl | Win | Alt | Space | Fn | Win | Left | Down | Up | Right| 0 | . | | 12 keys + */ + [_DEFAULT] = LAYOUT_default( + KC_ESC, 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_PSCR, KC_HOME, KC_END, KC_INS, KC_DEL, KC_PGUP, + KC_GRV, 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_NLCK, KC_PSLS, KC_PAST, KC_PGDN, + 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_P7, KC_P8, KC_P9, KC_PMNS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + 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_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_P0, KC_PDOT + ), + + /* Layer 1, raise layer + * | | | | | | | | | | | | | | | | | | | | + * | | | | | | | | | | | | | | | | | | | + * | | |rgb_up|rgb_dn|rgb_mo| | | | | | F22 | F23 | F24 | | | | | | + * | | | | | | | | | | | | | | | | | | + * | | | | | | | | | VolDn| VolUp| Mute | Play/Pause | | | | | + * | | | | | | |MPrev | | | MNext| | | | + */ + [_RAISE] = LAYOUT_default( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, _______, _______, KC_F22, KC_F23, KC_F24, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_MPRV, _______, _______, KC_MNXT, _______, _______ + ) - [_DEFLT] = KEYMAP( - KC_ESC, 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_PSCR, KC_HOME, KC_END, KC_INSERT, KC_DELETE, KC_PGUP, \ - KC_GRV, 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_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_PGDN, \ - 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_P7, KC_P8, KC_P9, KC_PMNS, \ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ - 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_P1, KC_P2, KC_P3, KC_PENT, \ - KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, MO(_RAISE), KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_P0, KC_PDOT \ - ), - /* Layer 1, raise layer - * | | | | | | | | | | | | | | | | | | | | - * | | | | | | | | | | | | | | | | | | | - * | | |rgb_up|rgb_dn|rgb_mo| | | | | | F22 | F23 | F24 | | | | | | - * | | | | | | | | | | | | | | | | | | - * | | | | | | | | | VolDn| VolUp| Mute | Play/Pause | | | | | - * | | | | | | |MPrev | | | MNext| | | | - */ - [_RAISE] = KEYMAP( - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ - ______, ______, RGB_VAI, RGB_VAD, RGB_MOD, ______, ______, ______, ______, ______, KC_F22, KC_F23, KC_F24, ______, ______, ______, ______, ______, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ - ______, ______, ______, ______, ______, ______, ______, ______, KC_VOLD,KC_VOLU, KC_MUTE, KC_MPLY, ______, ______, ______, ______, \ - ______, ______, ______, ______, ______, ______, KC_MPRV, ______, ______, KC_MNXT, ______, ______ \ - ) }; diff --git a/keyboards/ymd96/README.md b/keyboards/ymd96/readme.md similarity index 100% rename from keyboards/ymd96/README.md rename to keyboards/ymd96/readme.md diff --git a/keyboards/ymd96/ymd96.h b/keyboards/ymd96/ymd96.h index ebf01b1d6..a516297c1 100644 --- a/keyboards/ymd96/ymd96.h +++ b/keyboards/ymd96/ymd96.h @@ -16,82 +16,62 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef KEYMAP_COMMON_H -#define KEYMAP_COMMON_H +#pragma once #include "quantum.h" -#include "quantum_keycodes.h" -#include "keycode.h" -#include "action.h" void matrix_init_user(void); // TODO port this to other PS2AVRGB boards #define LAYOUT_default( \ - K500, K502, K503, K504, K505, K600, K610, K710, K700, K511, K512, K513, K514, K113, K214, K013, K706, K709, K708, \ - K400, K401, K402, K403, K404, K405, K601, K611, K711, K701, K410, K411, K412, K414, K406, K407, K408, K409, \ - K300, K301, K302, K303, K304, K305, K602, K612, K712, K702, K310, K311, K312, K313, K306, K307, K308, K309, \ - K200, K201, K202, K203, K204, K205, K603, K613, K713, K703, K210, K211, K213, K206, K207, K208, K209, \ - K100, K101, K102, K103, K104, K105, K604, K614, K714, K704, K110, K111, K106, K107, K108, K009, \ - K000, K001, K002, K605, K705, K010, K011, K606, K607, K609, K006, K008 \ + K50, K52, K53, K54, K55, K60, K6A, K7A, K70, K5B, K5C, K5D, K5E, K1D, K2E, K0D, K76, K79, K78, \ + K40, K41, K42, K43, K44, K45, K61, K6B, K7B, K71, K4A, K4B, K4C, K4E, K46, K47, K48, K49, \ + K30, K31, K32, K33, K34, K35, K62, K6C, K7C, K72, K3A, K3B, K3C, K3D, K36, K37, K38, K39, \ + K20, K21, K22, K23, K24, K25, K63, K6D, K7D, K73, K2A, K2B, K2D, K26, K27, K28, K29, \ + K10, K11, K12, K13, K14, K15, K64, K6E, K7E, K74, K1A, K1B, K16, K17, K18, K09, \ + K00, K01, K02, K65, K75, K0A, K0B, K66, K67, K69, K06, K08 \ ) { \ - { K000, K001, K002, KC_NO, KC_NO, KC_NO, K006, KC_NO, K008, K009, K010, K011, KC_NO, K013, KC_NO, }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, KC_NO, K110, K111, KC_NO, K113, KC_NO, }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, K214, }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, }, \ - { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO, K414, }, \ - { K500, KC_NO, K502, K503, K504, K505, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K511, K512, K513, K514, }, \ - { K600, K601, K602, K603, K604, K605, K606, K607, KC_NO, K609, K610, K611, K612, K613, K614, }, \ - { K700, K701, K702, K703, K704, K705, K706, KC_NO, K708, K709, K710, K711, K712, K713, K714 } \ + { K00, K01, K02, KC_NO, KC_NO, KC_NO, K06, KC_NO, K08, K09, K0A, K0B, KC_NO, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, KC_NO, K1A, K1B, KC_NO, K1D, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, KC_NO, K4E }, \ + { K50, KC_NO, K52, K53, K54, K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K5B, K5C, K5D, K5E }, \ + { K60, K61, K62, K63, K64, K65, K66, K67, KC_NO, K69, K6A, K6B, K6C, K6D, K6E }, \ + { K70, K71, K72, K73, K74, K75, K76, KC_NO, K78, K79, K7A, K7B, K7C, K7D, K7E } \ } #define LAYOUT_custom( \ - K500, K502, K503, K504, K505, K600, K610, K710, K700, K511, K512, K513, K514, K113, K214, K013, K706, K709, K708, \ - K400, K401, K402, K403, K404, K405, K601, K611, K711, K701, K410, K411, K412, K414, K406, K407, K408, K409, \ - K300, K301, K302, K303, K304, K305, K602, K612, K712, K702, K310, K311, K312, K313, K306, K307, K308, K309, \ - K200, K201, K202, K203, K204, K205, K603, K613, K713, K703, K210, K211, K213, K206, K207, K208, K209, \ - K100, K101, K102, K103, K104, K105, K604, K614, K714, K704, K110, K111, K608,K106, K107, K108, K009, \ - K000, K001, K002, K605, K705, K010, K011, K606, K607, K006, K008 \ + K50, K52, K53, K54, K55, K60, K6A, K7A, K70, K5B, K5C, K5D, K5E, K1D, K2E, K0D, K76, K79, K78, \ + K40, K41, K42, K43, K44, K45, K61, K6B, K7B, K71, K4A, K4B, K4C, K4E, K46, K47, K48, K49, \ + K30, K31, K32, K33, K34, K35, K62, K6C, K7C, K72, K3A, K3B, K3C, K3D, K36, K37, K38, K39, \ + K20, K21, K22, K23, K24, K25, K63, K6D, K7D, K73, K2A, K2B, K2D, K26, K27, K28, K29, \ + K10, K11, K12, K13, K14, K15, K64, K6E, K7E, K74, K1A, K1B, K68, K16, K17, K18, K09, \ + K00, K01, K02, K65, K75, K0A, K0B, K66, K67, K06, K08 \ ) { \ - { K000, K001, K002, KC_NO, KC_NO, KC_NO, K006, KC_NO, K008, K009, K010, K011, KC_NO, K013, KC_NO, }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, KC_NO, K110, K111, KC_NO, K113, KC_NO, }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, K214, }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, }, \ - { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO, K414, }, \ - { K500, KC_NO, K502, K503, K504, K505, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K511, K512, K513, K514, }, \ - { K600, K601, K602, K603, K604, K605, K606, K607, K608, KC_NO, K610, K611, K612, K613, K614, }, \ - { K700, K701, K702, K703, K704, K705, K706, KC_NO, K708, K709, K710, K711, K712, K713, K714 } \ -} - -#define LAYOUT_jj50( \ -K011, K010, K009, K008, K004, K005, K006, K007, K003, K002, K201, K000, \ -K111, K110, K109, K108, K104, K105, K106, K107, K103, K102, K001, K100, \ -K211, K210, K209, K208, K204, K205, K206, K207, K203, K202, K101, K200, \ -K311, K310, K309, K308, K304, K305, K306, K307, K303, K302, K301, K300, \ -K411, K410, K409, K408, K404, K405, K406, K407, K403, K402, K401, K400 \ -) { \ -{ K100, K001, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, }, \ -{ K200, K101, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, }, \ -{ K000, K201, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, }, \ -{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, }, \ -{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411 }, \ + { K00, K01, K02, KC_NO, KC_NO, KC_NO, K06, KC_NO, K08, K09, K0A, K0B, KC_NO, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, KC_NO, K1A, K1B, KC_NO, K1D, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, KC_NO, K4E }, \ + { K50, KC_NO, K52, K53, K54, K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K5B, K5C, K5D, K5E }, \ + { K60, K61, K62, K63, K64, K65, K66, K67, K68, KC_NO, K6A, K6B, K6C, K6D, K6E }, \ + { K70, K71, K72, K73, K74, K75, K76, KC_NO, K78, K79, K7A, K7B, K7C, K7D, K7E } \ } #define LAYOUT_iso( \ - K0500, K0502, K0503, K0504, K0505, K0600, K0610, K0710, K0700, K0511, K0512, K0513, K0514, K0113, K0214, K0013, K0706, K0709, K0708, \ - K0400, K0401, K0402, K0403, K0404, K0405, K0601, K0611, K0711, K0701, K0410, K0411, K0412, K0414, K0406, K0407, K0408, K0409, \ - K0300, K0301, K0302, K0303, K0304, K0305, K0602, K0612, K0712, K0702, K0310, K0311, K0312, K0213, K0306, K0307, K0308, K0309, \ - K0200, K0201, K0202, K0203, K0204, K0205, K0603, K0613, K0713, K0703, K0210, K0211, K0212, K0206, K0207, K0208, K0209, \ - K0100, K0003, K0101, K0102, K0103, K0104, K0105, K0604, K0614, K0714, K0704, K0110, K0111, K0608, K0106, K0107, K0108, K0009, \ - K0000, K0001, K0002, K0605, K0705, K0011, K0606, K0607, K0609, K0006, K0008 \ + K50, K52, K53, K54, K55, K60, K6A, K7A, K70, K5B, K5C, K5D, K5E, K1D, K2E, K0D, K76, K79, K78, \ + K40, K41, K42, K43, K44, K45, K61, K6B, K7B, K71, K4A, K4B, K4C, K4E, K46, K47, K48, K49, \ + K30, K31, K32, K33, K34, K35, K62, K6C, K7C, K72, K3A, K3B, K3C, K2D, K36, K37, K38, K39, \ + K20, K21, K22, K23, K24, K25, K63, K6D, K7D, K73, K2A, K2B, K2C, K26, K27, K28, K29, \ + K10, K03, K11, K12, K13, K14, K15, K64, K6E, K7E, K74, K1A, K1B, K68, K16, K17, K18, K09, \ + K00, K01, K02, K65, K75, K0B, K66, K67, K69, K06, K08 \ ) { \ - { K0000, K0001, K0002, K0003, KC_NO, KC_NO, K0006, KC_NO, K0008, K0009, KC_NO, K0011, KC_NO, K0013, KC_NO, }, \ - { K0100, K0101, K0102, K0103, K0104, K0105, K0106, K0107, K0108, KC_NO, K0110, K0111, KC_NO, K0113, KC_NO, }, \ - { K0200, K0201, K0202, K0203, K0204, K0205, K0206, K0207, K0208, K0209, K0210, K0211, K0212, K0213, K0214, }, \ - { K0300, K0301, K0302, K0303, K0304, K0305, K0306, K0307, K0308, K0309, K0310, K0311, K0312, KC_NO, KC_NO, }, \ - { K0400, K0401, K0402, K0403, K0404, K0405, K0406, K0407, K0408, K0409, K0410, K0411, K0412, KC_NO, K0414, }, \ - { K0500, KC_NO, K0502, K0503, K0504, K0505, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K0511, K0512, K0513, K0514, }, \ - { K0600, K0601, K0602, K0603, K0604, K0605, K0606, K0607, K0608, K0609, K0610, K0611, K0612, K0613, K0614, }, \ - { K0700, K0701, K0702, K0703, K0704, K0705, K0706, KC_NO, K0708, K0709, K0710, K0711, K0712, K0713, K0714 } \ + { K00, K01, K02, K03, KC_NO, KC_NO, K06, KC_NO, K08, K09, KC_NO, K0B, KC_NO, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, KC_NO, K1A, K1B, KC_NO, K1D, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, KC_NO, K4E }, \ + { K50, KC_NO, K52, K53, K54, K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K5B, K5C, K5D, K5E }, \ + { K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, K6C, K6D, K6E }, \ + { K70, K71, K72, K73, K74, K75, K76, KC_NO, K78, K79, K7A, K7B, K7C, K7D, K7E } \ } - -#endif From dabd73b769f6f0e08dd01d4bcd02d71bc5deaa8d Mon Sep 17 00:00:00 2001 From: zvecr Date: Fri, 31 May 2019 21:54:08 +0100 Subject: [PATCH 152/341] [Keyboard] Remove relative location of i2c master/slave as it causes the build to write to a folder outside of qmk_firmware (#6039) --- keyboards/dc01/arrow/rules.mk | 2 +- keyboards/dc01/left/rules.mk | 2 +- keyboards/dc01/numpad/rules.mk | 2 +- keyboards/dc01/right/rules.mk | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/dc01/arrow/rules.mk b/keyboards/dc01/arrow/rules.mk index c45789353..0bd090bab 100644 --- a/keyboards/dc01/arrow/rules.mk +++ b/keyboards/dc01/arrow/rules.mk @@ -1,5 +1,5 @@ SRC += matrix.c \ - ../../../drivers/avr/i2c_slave.c + i2c_slave.c # MCU name #MCU = at90usb1286 diff --git a/keyboards/dc01/left/rules.mk b/keyboards/dc01/left/rules.mk index 1ea1f275b..515b6b3dd 100644 --- a/keyboards/dc01/left/rules.mk +++ b/keyboards/dc01/left/rules.mk @@ -1,5 +1,5 @@ SRC += matrix.c \ - ../../../drivers/avr/i2c_master.c + i2c_master.c # MCU name #MCU = at90usb1286 diff --git a/keyboards/dc01/numpad/rules.mk b/keyboards/dc01/numpad/rules.mk index 39112ae92..9def53dd5 100644 --- a/keyboards/dc01/numpad/rules.mk +++ b/keyboards/dc01/numpad/rules.mk @@ -1,5 +1,5 @@ SRC += matrix.c \ - ../../../drivers/avr/i2c_slave.c + i2c_slave.c # MCU name #MCU = at90usb1286 diff --git a/keyboards/dc01/right/rules.mk b/keyboards/dc01/right/rules.mk index c45789353..0bd090bab 100644 --- a/keyboards/dc01/right/rules.mk +++ b/keyboards/dc01/right/rules.mk @@ -1,5 +1,5 @@ SRC += matrix.c \ - ../../../drivers/avr/i2c_slave.c + i2c_slave.c # MCU name #MCU = at90usb1286 From f9c0936cea630e078618bfd8ef3b686dacce2e76 Mon Sep 17 00:00:00 2001 From: zvecr Date: Fri, 31 May 2019 20:32:34 +0100 Subject: [PATCH 153/341] Initial attempt to fix docker creating files as root --- util/travis_build.sh | 2 +- util/travis_test.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/util/travis_build.sh b/util/travis_build.sh index 02a749e85..554ec8b68 100755 --- a/util/travis_build.sh +++ b/util/travis_build.sh @@ -3,7 +3,7 @@ # if docker is installed - call make within the qmk docker image if command -v docker >/dev/null; then function make() { - docker run --rm -e MAKEFLAGS="$MAKEFLAGS" -w /qmk_firmware/ -v "$PWD":/qmk_firmware qmkfm/qmk_firmware make "$@" + docker run --rm -e MAKEFLAGS="$MAKEFLAGS" -w /qmk_firmware/ -v "$PWD":/qmk_firmware --user $(id -u):$(id -g) qmkfm/qmk_firmware make "$@" } fi diff --git a/util/travis_test.sh b/util/travis_test.sh index b6ec06f05..3be4afff7 100644 --- a/util/travis_test.sh +++ b/util/travis_test.sh @@ -22,7 +22,7 @@ fi # if docker is installed - call make within the qmk docker image if command -v docker >/dev/null; then function make() { - docker run --rm -e MAKEFLAGS="$MAKEFLAGS" -w /qmk_firmware/ -v "$PWD":/qmk_firmware qmkfm/qmk_firmware make "$@" + docker run --rm -e MAKEFLAGS="$MAKEFLAGS" -w /qmk_firmware/ -v "$PWD":/qmk_firmware --user $(id -u):$(id -g) qmkfm/qmk_firmware make "$@" } fi From d3317a8a66e1a94de0dd795f5c9efe260e674475 Mon Sep 17 00:00:00 2001 From: Elliot Powell <32494740+e11i0t23@users.noreply.github.com> Date: Fri, 31 May 2019 22:44:27 +0100 Subject: [PATCH 154/341] [Docs] Update getting_started_introduction.md (#6037) * Update getting_started_introduction.md * Update docs/getting_started_introduction.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update docs/getting_started_introduction.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update docs/getting_started_introduction.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update docs/getting_started_introduction.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- docs/getting_started_introduction.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/getting_started_introduction.md b/docs/getting_started_introduction.md index 3b6a488ed..e183d77ee 100644 --- a/docs/getting_started_introduction.md +++ b/docs/getting_started_introduction.md @@ -12,11 +12,17 @@ Within the folder `users` is a directory for each user. This is a place for user ### Keyboard Project Structure -Within the folder `keyboards` and its subfolder `handwired` is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within it you'll find the following structure: +Within the folder `keyboards`, its subfolder `handwired` and its vendor and manufacture subdirectories e.g. `clueboard` is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard/2x1800`. Within it, you'll find the following structure: * `keymaps/`: Different keymaps that can be built * `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `rules.mk`. * `config.h`: The file that sets the default compile time options. Do not edit this file directly, instead use a keymap specific `config.h`. +* `info.json`: The file used for setting layout for QMK Configurator. See [Configurator Support](reference_configurator_support.md) for more information. +* `readme.md`: A brief overview of the keyboard. +* `.h`: This file is where the keyboard layout is defined against the keyboard's switch matrix. +* `.c`: This file is where you can find custom code for the keyboard. + +For more information on project structure, see [QMK Keyboard Guidelines](hardware_keyboard_guidelines.md). ### Keymap Structure From 9f5733b5951d3b8c59cd06ea89aa86784c025122 Mon Sep 17 00:00:00 2001 From: jotix <47826561+jotix@users.noreply.github.com> Date: Sat, 1 Jun 2019 17:22:41 -0300 Subject: [PATCH 155/341] [Keymap] jotix's ortho4x12 layout (#6045) * jotix ortho 4x12 layout tweaking * tapping toggle -> 2 * leds on/of on layer states * add JOTANCK_LED1&2 * set custom leds on layers * bug fix * bug fix * rearrange layers * leds on layers bug fixed * leds working --- layouts/community/ortho_4x12/jotix/config.h | 1 + layouts/community/ortho_4x12/jotix/keymap.c | 56 ++++++++++++++------- 2 files changed, 40 insertions(+), 17 deletions(-) create mode 100644 layouts/community/ortho_4x12/jotix/config.h diff --git a/layouts/community/ortho_4x12/jotix/config.h b/layouts/community/ortho_4x12/jotix/config.h new file mode 100644 index 000000000..9ec4fd1a9 --- /dev/null +++ b/layouts/community/ortho_4x12/jotix/config.h @@ -0,0 +1 @@ +#define TAPPING_TOGGLE 2 diff --git a/layouts/community/ortho_4x12/jotix/keymap.c b/layouts/community/ortho_4x12/jotix/keymap.c index cf8c9e9d5..b513272d3 100644 --- a/layouts/community/ortho_4x12/jotix/keymap.c +++ b/layouts/community/ortho_4x12/jotix/keymap.c @@ -9,14 +9,15 @@ enum layers { _ADJUST, }; -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) +#define LOWER TT(_LOWER) +#define RAISE TT(_RAISE) +#define TAB_ADJ LT(_ADJUST, KC_TAB) #define FN_LAYER LAYOUT_ortho_4x12 (\ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,\ - KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,\ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TILD, _______, _______, _______, _______,\ - _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END\ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,\ + KC_CAPS, KC_VOLD, KC_MUTE, KC_VOLU, KC_HOME, KC_PGUP, KC_LBRC, KC_RBRC, KC_BSLS, KC_QUOT, _______, _______,\ + _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_END, KC_PGDN, KC_MINS, KC_EQL, _______, _______, _______, _______,\ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______\ ), const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -25,18 +26,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * | esc | Q | W | E | R | T | Y | U | I | O | P | bksp | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | tab | A | S | D | F | G | H | J | K | L | ; | ' | + * |tab/adj | A | S | D | F | G | H | J | K | L | ; | enter | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | lshift | Z | X | C | V | B | N | M | , | . | / | enter | + * | lshift | Z | X | C | V | B | N | M | , | . | up | / | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | lctrl | lgui | lalt | ralt | lower | space | space | raise | left | down | up | right | + * | lctrl | lgui | lalt | ralt | lower | space | space | raise | del | right | down | right | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ */ [_QWERTY] = LAYOUT_ortho_4x12 ( 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_ENT, - KC_LCTL, KC_LGUI, KC_LALT, KC_RALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + TAB_ADJ, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH, + KC_LCTL, KC_LGUI, KC_LALT, KC_RALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT ), [_LOWER] = FN_LAYER @@ -47,15 +48,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * Adjust */ [_ADJUST] = LAYOUT_ortho_4x12 ( - _______, RESET, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, BL_STEP, BL_BRTG, _______, _______, _______, _______, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, _______, _______, _______, _______, RESET, + _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, _______, _______, _______, _______, _______, + _______, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), +), }; uint32_t layer_state_set_user(uint32_t state) { - return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + + #ifdef JOTANCK_LEDS + switch (biton32(state)) { + case _LOWER: + writePinHigh(JOTANCK_LED1); + writePinLow(JOTANCK_LED2); + break; + case _RAISE: + writePinLow(JOTANCK_LED1); + writePinHigh(JOTANCK_LED2); + break; + case _ADJUST: + writePinHigh(JOTANCK_LED1); + writePinHigh(JOTANCK_LED2); + break; + default: + writePinLow(JOTANCK_LED1); + writePinLow(JOTANCK_LED2); + break; + }; + #endif + return state; } void matrix_init_user(void) { From 016a258301e309973fcc9f4083b6b8591050cb6d Mon Sep 17 00:00:00 2001 From: jotix <47826561+jotix@users.noreply.github.com> Date: Sat, 1 Jun 2019 17:26:46 -0300 Subject: [PATCH 156/341] [Keymap] add 2 custom leds to handwired/jotanck (#6042) * add JOTANCK_LED1&2 * set BACKLIGHT_ENABLE = no * add 2 custom leds * swap custom led pins 1&2 * readme update * update default keymap --- keyboards/handwired/jotanck/config.h | 8 +++----- keyboards/handwired/jotanck/jotanck.c | 8 ++++++-- keyboards/handwired/jotanck/keymaps/default/keymap.c | 2 +- keyboards/handwired/jotanck/readme.md | 8 ++++---- keyboards/handwired/jotanck/rules.mk | 8 ++++---- 5 files changed, 18 insertions(+), 16 deletions(-) diff --git a/keyboards/handwired/jotanck/config.h b/keyboards/handwired/jotanck/config.h index 38b77586e..cbbd6ea96 100644 --- a/keyboards/handwired/jotanck/config.h +++ b/keyboards/handwired/jotanck/config.h @@ -20,11 +20,9 @@ #define UNUSED_PINS /* leds */ -#define QMK_LED B4 -#define BACKLIGHT_LEVELS 3 -#define BACKLIGHT_PIN B5 -#define BACKLIGHT_BREATHING -#define BREATHING_PERIOD 5 +#define JOTANCK_LEDS +#define JOTANCK_LED1 B5 +#define JOTANCK_LED2 B4 /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/jotanck/jotanck.c b/keyboards/handwired/jotanck/jotanck.c index 7744570b2..812781c3b 100644 --- a/keyboards/handwired/jotanck/jotanck.c +++ b/keyboards/handwired/jotanck/jotanck.c @@ -1,6 +1,10 @@ #include "jotanck.h" void matrix_init_kb(void) { - - matrix_init_user(); + matrix_init_user(); +} + +void keyboard_pre_init_user() { + setPinOutput(JOTANCK_LED1); + setPinOutput(JOTANCK_LED2); } diff --git a/keyboards/handwired/jotanck/keymaps/default/keymap.c b/keyboards/handwired/jotanck/keymaps/default/keymap.c index 2e9f4a39f..3eb01a658 100644 --- a/keyboards/handwired/jotanck/keymaps/default/keymap.c +++ b/keyboards/handwired/jotanck/keymaps/default/keymap.c @@ -78,7 +78,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_ortho_4x12 ( _______, RESET, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, BL_STEP, BL_BRTG, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; diff --git a/keyboards/handwired/jotanck/readme.md b/keyboards/handwired/jotanck/readme.md index 28bbab86b..4cf211adc 100644 --- a/keyboards/handwired/jotanck/readme.md +++ b/keyboards/handwired/jotanck/readme.md @@ -20,10 +20,10 @@ Hardware Availability: [Mercado Libre](https://articulo.mercadolibre.com.ar/MLA- | Arduino pin | A3 | A2 | A1 | A0 | 15 | 14 | TX0 | RXI | 2 | 3 | 4 | 5 | | QMK pin | F4 | F5 | F6 | F7 | B1 | B3 | D3 | D2 | D1 | D0 | D4 | C6 | -| | QMK led | Backlight | -|-------------|-----------|-----------| -| Arduino pin | 8 | 9 | -| QMK pin | B4 | B5 | +| | LED1 | LED2 | +|-------------|------|------| +| Arduino pin | 8 | 9 | +| QMK pin | B5 | B4 | ### Compiling the Firmware diff --git a/keyboards/handwired/jotanck/rules.mk b/keyboards/handwired/jotanck/rules.mk index 6b39b7cc1..fa2881413 100644 --- a/keyboards/handwired/jotanck/rules.mk +++ b/keyboards/handwired/jotanck/rules.mk @@ -50,10 +50,10 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT 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 # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode From 8eb5022af538b3cda1d0aefd37a0dfe792794cbd Mon Sep 17 00:00:00 2001 From: Austin Hill Date: Sat, 1 Jun 2019 16:30:24 -0400 Subject: [PATCH 157/341] [Keymap] fixed location of del on fn layer (#6040) --- keyboards/tada68/keymaps/hhkb68/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/tada68/keymaps/hhkb68/keymap.c b/keyboards/tada68/keymaps/hhkb68/keymap.c index 66372b6f6..abde68f88 100644 --- a/keyboards/tada68/keymaps/hhkb68/keymap.c +++ b/keyboards/tada68/keymaps/hhkb68/keymap.c @@ -2,5 +2,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_ansi(KC_ESC, 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_BSLS, KC_GRV, 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_BSPC, KC_DEL, 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, KC_PGUP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_PGDN, MO(1), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), - [1] = LAYOUT_ansi(KC_TRNS, 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_TRNS, KC_INS, KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_DEL, KC_HOME, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_END, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + [1] = LAYOUT_ansi(KC_TRNS, 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, KC_INS, KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_END, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) }; From c393d3afde05e883422770f5596475347f707c6c Mon Sep 17 00:00:00 2001 From: zvecr Date: Fri, 31 May 2019 15:50:34 +0100 Subject: [PATCH 158/341] Add additional pins for Teensy 3.x and LC --- quantum/config_common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/quantum/config_common.h b/quantum/config_common.h index c489e1407..bc4d9ec1a 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h @@ -204,6 +204,8 @@ #define B13 PAL_LINE(GPIOB, 13) #define B14 PAL_LINE(GPIOB, 14) #define B15 PAL_LINE(GPIOB, 15) + #define B16 PAL_LINE(GPIOB, 16) + #define B17 PAL_LINE(GPIOB, 17) #define C0 PAL_LINE(GPIOC, 0) #define C1 PAL_LINE(GPIOC, 1) #define C2 PAL_LINE(GPIOC, 2) From d9ebd5cde604199dc74938627652344222883d17 Mon Sep 17 00:00:00 2001 From: ai03 Date: Sat, 1 Jun 2019 13:45:33 -0700 Subject: [PATCH 159/341] [Keyboard] Add support for KBD8X MKII (#6033) * Begin work * Make things a tad easier to read * Fix spacing * Get things compiling * Build a variety of generic keymaps * Correct RGB pin * Add configurator json * Apply suggestions from code review Co-Authored-By: Elliot Powell <32494740+e11i0t23@users.noreply.github.com> Co-Authored-By: MechMerlin <30334081+mechmerlin@users.noreply.github.com> --- keyboards/kbdfans/kbd8x_mk2/config.h | 251 ++++++++++++++++++ keyboards/kbdfans/kbd8x_mk2/info.json | 103 +++++++ keyboards/kbdfans/kbd8x_mk2/kbd8x_mk2.c | 71 +++++ keyboards/kbdfans/kbd8x_mk2/kbd8x_mk2.h | 51 ++++ .../kbdfans/kbd8x_mk2/keymaps/ai03/keymap.c | 53 ++++ .../kbdfans/kbd8x_mk2/keymaps/ai03/readme.md | 4 + .../kbd8x_mk2/keymaps/ansi_625/keymap.c | 44 +++ .../kbd8x_mk2/keymaps/ansi_625/readme.md | 3 + .../kbdfans/kbd8x_mk2/keymaps/ansi_7/keymap.c | 44 +++ .../kbd8x_mk2/keymaps/ansi_7/readme.md | 3 + .../kbd8x_mk2/keymaps/default/keymap.c | 44 +++ .../kbd8x_mk2/keymaps/default/readme.md | 4 + .../kbd8x_mk2/keymaps/iso_625/keymap.c | 44 +++ .../kbd8x_mk2/keymaps/iso_625/readme.md | 3 + .../kbdfans/kbd8x_mk2/keymaps/iso_7/keymap.c | 44 +++ .../kbdfans/kbd8x_mk2/keymaps/iso_7/readme.md | 3 + .../kbdfans/kbd8x_mk2/keymaps/tester/keymap.c | 44 +++ .../kbd8x_mk2/keymaps/tester/readme.md | 18 ++ keyboards/kbdfans/kbd8x_mk2/readme.md | 15 ++ keyboards/kbdfans/kbd8x_mk2/rules.mk | 80 ++++++ 20 files changed, 926 insertions(+) create mode 100644 keyboards/kbdfans/kbd8x_mk2/config.h create mode 100644 keyboards/kbdfans/kbd8x_mk2/info.json create mode 100644 keyboards/kbdfans/kbd8x_mk2/kbd8x_mk2.c create mode 100644 keyboards/kbdfans/kbd8x_mk2/kbd8x_mk2.h create mode 100644 keyboards/kbdfans/kbd8x_mk2/keymaps/ai03/keymap.c create mode 100644 keyboards/kbdfans/kbd8x_mk2/keymaps/ai03/readme.md create mode 100644 keyboards/kbdfans/kbd8x_mk2/keymaps/ansi_625/keymap.c create mode 100644 keyboards/kbdfans/kbd8x_mk2/keymaps/ansi_625/readme.md create mode 100644 keyboards/kbdfans/kbd8x_mk2/keymaps/ansi_7/keymap.c create mode 100644 keyboards/kbdfans/kbd8x_mk2/keymaps/ansi_7/readme.md create mode 100644 keyboards/kbdfans/kbd8x_mk2/keymaps/default/keymap.c create mode 100644 keyboards/kbdfans/kbd8x_mk2/keymaps/default/readme.md create mode 100644 keyboards/kbdfans/kbd8x_mk2/keymaps/iso_625/keymap.c create mode 100644 keyboards/kbdfans/kbd8x_mk2/keymaps/iso_625/readme.md create mode 100644 keyboards/kbdfans/kbd8x_mk2/keymaps/iso_7/keymap.c create mode 100644 keyboards/kbdfans/kbd8x_mk2/keymaps/iso_7/readme.md create mode 100644 keyboards/kbdfans/kbd8x_mk2/keymaps/tester/keymap.c create mode 100644 keyboards/kbdfans/kbd8x_mk2/keymaps/tester/readme.md create mode 100644 keyboards/kbdfans/kbd8x_mk2/readme.md create mode 100644 keyboards/kbdfans/kbd8x_mk2/rules.mk diff --git a/keyboards/kbdfans/kbd8x_mk2/config.h b/keyboards/kbdfans/kbd8x_mk2/config.h new file mode 100644 index 000000000..4c6900b6c --- /dev/null +++ b/keyboards/kbdfans/kbd8x_mk2/config.h @@ -0,0 +1,251 @@ +/* +Copyright 2019 Ryota Goto + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xA103 +#define PRODUCT_ID 0x0005 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KBDfans +#define PRODUCT KBD8X-MKII +#define DESCRIPTION TKL Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 9 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, B0, B1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN B3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 20 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 200 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/kbdfans/kbd8x_mk2/info.json b/keyboards/kbdfans/kbd8x_mk2/info.json new file mode 100644 index 000000000..06d69efe8 --- /dev/null +++ b/keyboards/kbdfans/kbd8x_mk2/info.json @@ -0,0 +1,103 @@ +{ + "keyboard_name": "kbd8x_mk2", + "url": "https://kb.ai03.me/projects/kbd8x-mkii.html", + "maintainer": "ai03", + "width": 18.25, + "height": 6.25, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + {"label":"~", "x":0, "y":1.25}, + {"label":"!", "x":1, "y":1.25}, + {"label":"@", "x":2, "y":1.25}, + {"label":"#", "x":3, "y":1.25}, + {"label":"$", "x":4, "y":1.25}, + {"label":"%", "x":5, "y":1.25}, + {"label":"^", "x":6, "y":1.25}, + {"label":"&", "x":7, "y":1.25}, + {"label":"*", "x":8, "y":1.25}, + {"label":"(", "x":9, "y":1.25}, + {"label":")", "x":10, "y":1.25}, + {"label":"_", "x":11, "y":1.25}, + {"label":"+", "x":12, "y":1.25}, + {"label":"Back Space", "x":13, "y":1.25}, + {"label":"Delete", "x":14, "y":1.25}, + {"label":"Insert", "x":15.25, "y":1.25}, + {"label":"Home", "x":16.25, "y":1.25}, + {"label":"PgUp", "x":17.25, "y":1.25}, + {"label":"Tab", "x":0, "y":2.25, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.25}, + {"label":"W", "x":2.5, "y":2.25}, + {"label":"E", "x":3.5, "y":2.25}, + {"label":"R", "x":4.5, "y":2.25}, + {"label":"T", "x":5.5, "y":2.25}, + {"label":"Y", "x":6.5, "y":2.25}, + {"label":"U", "x":7.5, "y":2.25}, + {"label":"I", "x":8.5, "y":2.25}, + {"label":"O", "x":9.5, "y":2.25}, + {"label":"P", "x":10.5, "y":2.25}, + {"label":"{", "x":11.5, "y":2.25}, + {"label":"}", "x":12.5, "y":2.25}, + {"label":"|", "x":13.5, "y":2.25, "w":1.5}, + {"label":"Delete", "x":15.25, "y":2.25}, + {"label":"End", "x":16.25, "y":2.25}, + {"label":"PgDn", "x":17.25, "y":2.25}, + {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, + {"label":"A", "x":1.75, "y":3.25}, + {"label":"S", "x":2.75, "y":3.25}, + {"label":"D", "x":3.75, "y":3.25}, + {"label":"F", "x":4.75, "y":3.25}, + {"label":"G", "x":5.75, "y":3.25}, + {"label":"H", "x":6.75, "y":3.25}, + {"label":"J", "x":7.75, "y":3.25}, + {"label":"K", "x":8.75, "y":3.25}, + {"label":"L", "x":9.75, "y":3.25}, + {"label":":", "x":10.75, "y":3.25}, + {"label":"\"", "x":11.75, "y":3.25}, + {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, + {"label":"Shift", "x":0, "y":4.25, "w":1.25}, + {"label":"|", "x":1.25, "y":4.25}, + {"label":"Z", "x":2.25, "y":4.25}, + {"label":"X", "x":3.25, "y":4.25}, + {"label":"C", "x":4.25, "y":4.25}, + {"label":"V", "x":5.25, "y":4.25}, + {"label":"B", "x":6.25, "y":4.25}, + {"label":"N", "x":7.25, "y":4.25}, + {"label":"M", "x":8.25, "y":4.25}, + {"label":"<", "x":9.25, "y":4.25}, + {"label":">", "x":10.25, "y":4.25}, + {"label":"?", "x":11.25, "y":4.25}, + {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, + {"label":"Fn", "x":14, "y":4.25}, + {"label":"\u2191", "x":16.25, "y":4.25}, + {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, + {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, + {"x":3.75, "y":5.25, "w":6.25}, + {"label":"Alt", "x":10, "y":5.25, "w":1.25}, + {"label":"Win", "x":11.25, "y":5.25, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.25, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.25}, + {"label":"\u2190", "x":15.25, "y":5.25}, + {"label":"\u2193", "x":16.25, "y":5.25}, + {"label":"\u2192", "x":17.25, "y":5.25} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/kbdfans/kbd8x_mk2/kbd8x_mk2.c b/keyboards/kbdfans/kbd8x_mk2/kbd8x_mk2.c new file mode 100644 index 000000000..147270723 --- /dev/null +++ b/keyboards/kbdfans/kbd8x_mk2/kbd8x_mk2.c @@ -0,0 +1,71 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#include "kbd8x_mk2.h" + +void matrix_init_kb(void) { + + // Indicator pins + // B2 - Scroll Lock + // E6 - Caps Lock + // Sinking setup - 5V -> LED/Resistor -> Pin + + setPinOutput(B2); + setPinOutput(E6); + + matrix_init_user(); +} + +void led_set_kb(uint8_t usb_led) { + + // Toggle indicator LEDs + // Since they are a sinking setup, write HIGH to DISABLE, LOW to ENABLE + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(E6); + } else { + writePinHigh(E6); + } + + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinLow(B2); + } else { + writePinHigh(B2); + } + + led_set_user(usb_led); +} + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +*/ diff --git a/keyboards/kbdfans/kbd8x_mk2/kbd8x_mk2.h b/keyboards/kbdfans/kbd8x_mk2/kbd8x_mk2.h new file mode 100644 index 000000000..86d8b35ea --- /dev/null +++ b/keyboards/kbdfans/kbd8x_mk2/kbd8x_mk2.h @@ -0,0 +1,51 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K000, K001, K011, K002, K012, K003, K013, K004, K014, K005, K015, K006, K016, K007, K017, K008, \ + K020, K030, K021, K031, K022, K032, K023, K033, K024, K034, K025, K035, K026, K036, K066, K027, K037, K028, \ + K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K047, K057, K048, \ + K060, K070, K061, K071, K062, K072, K063, K073, K064, K074, K065, K075, K076, \ + K080, K090, K081, K091, K082, K092, K083, K093, K084, K094, K085, K095, K086, K096, K097, \ + K100, K110, K101, K103, K105, K115, K106, K116, K107, K117, K108 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008 }, \ + { KC_NO, K011, K012, K013, K014, K015, K016, K017, KC_NO }, \ + { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \ + { K030, K031, K032, K033, K034, K035, K036, K037, KC_NO }, \ + { K040, K041, K042, K043, K044, K045, K046, K047, K048 }, \ + { K050, K051, K052, K053, K054, K055, K056, K057, KC_NO }, \ + { K060, K061, K062, K063, K064, K065, K066, KC_NO, KC_NO }, \ + { K070, K071, K072, K073, K074, K075, K076, KC_NO, KC_NO }, \ + { K080, K081, K082, K083, K084, K085, K086, KC_NO, KC_NO }, \ + { K090, K091, K092, K093, K094, K095, K096, K097, KC_NO }, \ + { K100, K101, KC_NO, K103, KC_NO, K105, K106, K107, K108 }, \ + { K110, KC_NO, KC_NO, KC_NO, KC_NO, K115, K116, K117, KC_NO } \ +} + + diff --git a/keyboards/kbdfans/kbd8x_mk2/keymaps/ai03/keymap.c b/keyboards/kbdfans/kbd8x_mk2/keymaps/ai03/keymap.c new file mode 100644 index 000000000..f651f2f0b --- /dev/null +++ b/keyboards/kbdfans/kbd8x_mk2/keymaps/ai03/keymap.c @@ -0,0 +1,53 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, \ + KC_LGUI, 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_DEL, KC_INS, KC_HOME, 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_DEL, KC_END, KC_PGDN, \ + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_GRV, BL_TOGG, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [1] = LAYOUT( /* Base */ + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, 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, KC_BSPC, _______, _______, _______, \ + KC_CAPS, _______, KC_PGUP, _______, _______, _______, _______, _______, KC_UP, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, \ + _______, KC_HOME, KC_PGDN, KC_END, _______, KC_VOLD, KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, KC_PGUP, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/kbdfans/kbd8x_mk2/keymaps/ai03/readme.md b/keyboards/kbdfans/kbd8x_mk2/keymaps/ai03/readme.md new file mode 100644 index 000000000..d48343e70 --- /dev/null +++ b/keyboards/kbdfans/kbd8x_mk2/keymaps/ai03/readme.md @@ -0,0 +1,4 @@ +# The ai03 keymap for KBD8X MKII + +A strange layout that focuses functionality into the alphanumerics cluster. +Fn row and further keys effectively become nothing more than decoration. \ No newline at end of file diff --git a/keyboards/kbdfans/kbd8x_mk2/keymaps/ansi_625/keymap.c b/keyboards/kbdfans/kbd8x_mk2/keymaps/ansi_625/keymap.c new file mode 100644 index 000000000..69d04852c --- /dev/null +++ b/keyboards/kbdfans/kbd8x_mk2/keymaps/ansi_625/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, \ + KC_GRV, 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_DEL, KC_INS, KC_HOME, 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_DEL, KC_END, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/kbdfans/kbd8x_mk2/keymaps/ansi_625/readme.md b/keyboards/kbdfans/kbd8x_mk2/keymaps/ansi_625/readme.md new file mode 100644 index 000000000..87527897d --- /dev/null +++ b/keyboards/kbdfans/kbd8x_mk2/keymaps/ansi_625/readme.md @@ -0,0 +1,3 @@ +# The ANSI 6.25U keymap for KBD8X MKII + +A typical setup for the 1.25/6.25U bottom row. \ No newline at end of file diff --git a/keyboards/kbdfans/kbd8x_mk2/keymaps/ansi_7/keymap.c b/keyboards/kbdfans/kbd8x_mk2/keymaps/ansi_7/keymap.c new file mode 100644 index 000000000..99496e21f --- /dev/null +++ b/keyboards/kbdfans/kbd8x_mk2/keymaps/ansi_7/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, \ + KC_GRV, 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_DEL, KC_INS, KC_HOME, 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_DEL, KC_END, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/kbdfans/kbd8x_mk2/keymaps/ansi_7/readme.md b/keyboards/kbdfans/kbd8x_mk2/keymaps/ansi_7/readme.md new file mode 100644 index 000000000..c0f5b8629 --- /dev/null +++ b/keyboards/kbdfans/kbd8x_mk2/keymaps/ansi_7/readme.md @@ -0,0 +1,3 @@ +# The ANSI WKL keymap for KBD8X MKII + +A typical setup for the 1.5/7U bottom row. \ No newline at end of file diff --git a/keyboards/kbdfans/kbd8x_mk2/keymaps/default/keymap.c b/keyboards/kbdfans/kbd8x_mk2/keymaps/default/keymap.c new file mode 100644 index 000000000..1064c141d --- /dev/null +++ b/keyboards/kbdfans/kbd8x_mk2/keymaps/default/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, \ + KC_GRV, 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_DEL, KC_INS, KC_HOME, 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_DEL, KC_END, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/kbdfans/kbd8x_mk2/keymaps/default/readme.md b/keyboards/kbdfans/kbd8x_mk2/keymaps/default/readme.md new file mode 100644 index 000000000..287ee702a --- /dev/null +++ b/keyboards/kbdfans/kbd8x_mk2/keymaps/default/readme.md @@ -0,0 +1,4 @@ +# The default keymap for KBD8X MKII + +A typical setup. Nothing special. +A nice starting point for customizing. diff --git a/keyboards/kbdfans/kbd8x_mk2/keymaps/iso_625/keymap.c b/keyboards/kbdfans/kbd8x_mk2/keymaps/iso_625/keymap.c new file mode 100644 index 000000000..01c4a03af --- /dev/null +++ b/keyboards/kbdfans/kbd8x_mk2/keymaps/iso_625/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, \ + KC_GRV, 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_DEL, KC_INS, KC_HOME, 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_NUHS, KC_DEL, KC_END, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_ALGR, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/kbdfans/kbd8x_mk2/keymaps/iso_625/readme.md b/keyboards/kbdfans/kbd8x_mk2/keymaps/iso_625/readme.md new file mode 100644 index 000000000..38760b7ad --- /dev/null +++ b/keyboards/kbdfans/kbd8x_mk2/keymaps/iso_625/readme.md @@ -0,0 +1,3 @@ +# The ISO 6.25U keymap for KBD8X MKII + +A typical setup for an ISO layout using 1.25/6.25U bottom row. \ No newline at end of file diff --git a/keyboards/kbdfans/kbd8x_mk2/keymaps/iso_7/keymap.c b/keyboards/kbdfans/kbd8x_mk2/keymaps/iso_7/keymap.c new file mode 100644 index 000000000..4087b5984 --- /dev/null +++ b/keyboards/kbdfans/kbd8x_mk2/keymaps/iso_7/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, \ + KC_GRV, 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_DEL, KC_INS, KC_HOME, 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_NUHS, KC_DEL, KC_END, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, KC_ALGR, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/kbdfans/kbd8x_mk2/keymaps/iso_7/readme.md b/keyboards/kbdfans/kbd8x_mk2/keymaps/iso_7/readme.md new file mode 100644 index 000000000..2f0eb1961 --- /dev/null +++ b/keyboards/kbdfans/kbd8x_mk2/keymaps/iso_7/readme.md @@ -0,0 +1,3 @@ +# The ISO 7U keymap for KBD8X MKII + +A typical setup for an ISO layout using 1.5/7U bottom row. \ No newline at end of file diff --git a/keyboards/kbdfans/kbd8x_mk2/keymaps/tester/keymap.c b/keyboards/kbdfans/kbd8x_mk2/keymaps/tester/keymap.c new file mode 100644 index 000000000..dc742bcfa --- /dev/null +++ b/keyboards/kbdfans/kbd8x_mk2/keymaps/tester/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + + KC_ESC, KC_CAPS, KC_SLCK, BL_TOGG, BL_STEP, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_PSCR, KC_SLCK, KC_PAUS, \ + KC_GRV, 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_DEL, KC_INS, KC_HOME, 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_DEL, KC_END, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/kbdfans/kbd8x_mk2/keymaps/tester/readme.md b/keyboards/kbdfans/kbd8x_mk2/keymaps/tester/readme.md new file mode 100644 index 000000000..3de082bed --- /dev/null +++ b/keyboards/kbdfans/kbd8x_mk2/keymaps/tester/readme.md @@ -0,0 +1,18 @@ +# The tester keymap for KBD8X MKII + +Sets the fn row to LED toggling (caps lock, scroll lock, RGB underglow, backlight). + +F1 = Caps Lock +F2 = Scroll Lock +F3 = Backlight Toggle +F4 = Backlight Step + +F5 = RGB Toggle +F6 = RGB Mode Cycle +F7 = RGB Hue Increase +F8 = RGB Hue Decrease + +F9 = RGB Saturation Increase +F10 = RGB Saturation Decrease +F11 = RGB Value Increase +F12 = RGB Value Decrease \ No newline at end of file diff --git a/keyboards/kbdfans/kbd8x_mk2/readme.md b/keyboards/kbdfans/kbd8x_mk2/readme.md new file mode 100644 index 000000000..3655ac1c7 --- /dev/null +++ b/keyboards/kbdfans/kbd8x_mk2/readme.md @@ -0,0 +1,15 @@ +# KBD8X MKII + +![Photo](https://cdn.shopify.com/s/files/1/1473/3902/products/9_e4262f46-0d69-4c6c-9cc6-b88a3e2483d7_1800x1800.jpg) + +A fairly typical TKL + +Keyboard Maintainer: [ai03](https://github.com/ai03-2725) / [KBDfans](https://kbdfans.cn/) +Hardware Supported: KBD8X MKII PCB/case +Hardware Availability: [KBDfans](https://kbdfans.cn/collections/new-arrival/products/coming-soon-kbd8x-mkii-custom-mechanical-keyboard-kit) + +Make example for this keyboard (after setting up your build environment): + + make kbdfans/kbd8x_mk2:default + +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). diff --git a/keyboards/kbdfans/kbd8x_mk2/rules.mk b/keyboards/kbdfans/kbd8x_mk2/rules.mk new file mode 100644 index 000000000..43e0dcf40 --- /dev/null +++ b/keyboards/kbdfans/kbd8x_mk2/rules.mk @@ -0,0 +1,80 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # 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 = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) From 0874502757505850920e9f5782f482296e3f7f6c Mon Sep 17 00:00:00 2001 From: ai03 Date: Sat, 1 Jun 2019 13:55:37 -0700 Subject: [PATCH 160/341] [Keyboard] Add support for Soyuz numpad (#6030) * Generate project, fill in the details * Repair json * Separate keymaps to numpad and all-1U * Apply suggestions from code review Co-Authored-By: Elliot Powell <32494740+e11i0t23@users.noreply.github.com> Co-Authored-By: Drashna Jaelre --- keyboards/ai03/soyuz/config.h | 245 ++++++++++++++++++ keyboards/ai03/soyuz/info.json | 33 +++ keyboards/ai03/soyuz/keymaps/1U/keymap.c | 57 ++++ keyboards/ai03/soyuz/keymaps/1U/readme.md | 3 + keyboards/ai03/soyuz/keymaps/default/keymap.c | 42 +++ .../ai03/soyuz/keymaps/default/readme.md | 3 + keyboards/ai03/soyuz/readme.md | 15 ++ keyboards/ai03/soyuz/rules.mk | 82 ++++++ keyboards/ai03/soyuz/soyuz.c | 43 +++ keyboards/ai03/soyuz/soyuz.h | 41 +++ 10 files changed, 564 insertions(+) create mode 100644 keyboards/ai03/soyuz/config.h create mode 100644 keyboards/ai03/soyuz/info.json create mode 100644 keyboards/ai03/soyuz/keymaps/1U/keymap.c create mode 100644 keyboards/ai03/soyuz/keymaps/1U/readme.md create mode 100644 keyboards/ai03/soyuz/keymaps/default/keymap.c create mode 100644 keyboards/ai03/soyuz/keymaps/default/readme.md create mode 100644 keyboards/ai03/soyuz/readme.md create mode 100644 keyboards/ai03/soyuz/rules.mk create mode 100644 keyboards/ai03/soyuz/soyuz.c create mode 100644 keyboards/ai03/soyuz/soyuz.h diff --git a/keyboards/ai03/soyuz/config.h b/keyboards/ai03/soyuz/config.h new file mode 100644 index 000000000..299e5999d --- /dev/null +++ b/keyboards/ai03/soyuz/config.h @@ -0,0 +1,245 @@ +/* +Copyright 2019 Ryota Goto + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xA103 +#define PRODUCT_ID 0x0004 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ai03 Design Studio +#define PRODUCT Soyuz +#define DESCRIPTION Single-PCB Numpad Kit + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D4, C6, B6, E6, B4 } +#define MATRIX_COL_PINS { F4, B3, D7, B5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/ai03/soyuz/info.json b/keyboards/ai03/soyuz/info.json new file mode 100644 index 000000000..e4f8eb0aa --- /dev/null +++ b/keyboards/ai03/soyuz/info.json @@ -0,0 +1,33 @@ +{ + "keyboard_name": "Soyuz", + "url": "https://github.com/ai03-2725/soyuz", + "maintainer": "ai03", + "width": 4, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x4": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + {"x":3, "y":4} + ] + } + } +} diff --git a/keyboards/ai03/soyuz/keymaps/1U/keymap.c b/keyboards/ai03/soyuz/keymaps/1U/keymap.c new file mode 100644 index 000000000..aa8683c8a --- /dev/null +++ b/keyboards/ai03/soyuz/keymaps/1U/keymap.c @@ -0,0 +1,57 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + DBLZERO = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_5x4( /* Base */ + KC_NLCK, KC_PSLS, KC_PAST, KC_BSPC, \ + KC_P7, KC_P8, KC_P9, KC_MINS, \ + KC_P4, KC_P5, KC_P6, KC_PPLS, \ + KC_P1, KC_P2, KC_P3, KC_EQL, \ + DBLZERO, KC_P0, KC_PDOT, KC_PENT \ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DBLZERO: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("00"); + } else { + // when keycode QMKBEST is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/ai03/soyuz/keymaps/1U/readme.md b/keyboards/ai03/soyuz/keymaps/1U/readme.md new file mode 100644 index 000000000..f030f8c68 --- /dev/null +++ b/keyboards/ai03/soyuz/keymaps/1U/readme.md @@ -0,0 +1,3 @@ +# The 1U keymap for Soyuz + +A keymap that uses 1U keys everywhere for a 20-key numpad. \ No newline at end of file diff --git a/keyboards/ai03/soyuz/keymaps/default/keymap.c b/keyboards/ai03/soyuz/keymaps/default/keymap.c new file mode 100644 index 000000000..62bb5c228 --- /dev/null +++ b/keyboards/ai03/soyuz/keymaps/default/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_5x4( /* Base */ + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_P7, KC_P8, KC_P9, KC_PPLS, \ + KC_P4, KC_P5, KC_P6, KC_PPLS, \ + KC_P1, KC_P2, KC_P3, KC_PENT, \ + KC_P0, KC_P0, KC_PDOT, KC_PENT \ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/ai03/soyuz/keymaps/default/readme.md b/keyboards/ai03/soyuz/keymaps/default/readme.md new file mode 100644 index 000000000..f4954e8b3 --- /dev/null +++ b/keyboards/ai03/soyuz/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default keymap for Soyuz + +A very basic keymap for a "typical" numpad layout using 2U keys wherever applicable. \ No newline at end of file diff --git a/keyboards/ai03/soyuz/readme.md b/keyboards/ai03/soyuz/readme.md new file mode 100644 index 000000000..e88dfab43 --- /dev/null +++ b/keyboards/ai03/soyuz/readme.md @@ -0,0 +1,15 @@ +# Soyuz + +![soyuz](https://raw.githubusercontent.com/ai03-2725/Soyuz/master/Renders/Front.png) + +A single-PCB numpad kit + +Keyboard Maintainer: [ai03](https://github.com/ai03-2725) +Hardware Supported: [Soyuz PCB](https://github.com/ai03-2725/soyuz) +Hardware Availability: Various vendors - List will be maintained in the [PCB repo](https://github.com/ai03-2725/soyuz) + +Make example for this keyboard (after setting up your build environment): + + make ai03/soyuz:default + +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). diff --git a/keyboards/ai03/soyuz/rules.mk b/keyboards/ai03/soyuz/rules.mk new file mode 100644 index 000000000..5df789e58 --- /dev/null +++ b/keyboards/ai03/soyuz/rules.mk @@ -0,0 +1,82 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +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 = no # Console for debug(+400) +COMMAND_ENABLE = yes # 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 on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = ortho_5x4 diff --git a/keyboards/ai03/soyuz/soyuz.c b/keyboards/ai03/soyuz/soyuz.c new file mode 100644 index 000000000..dc73f196e --- /dev/null +++ b/keyboards/ai03/soyuz/soyuz.c @@ -0,0 +1,43 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#include "soyuz.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/ai03/soyuz/soyuz.h b/keyboards/ai03/soyuz/soyuz.h new file mode 100644 index 000000000..a379f8ede --- /dev/null +++ b/keyboards/ai03/soyuz/soyuz.h @@ -0,0 +1,41 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define LAYOUT_ortho_5x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33, \ + K40, K41, K42, K43 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 }, \ + { K40, K41, K42, K43 } \ +} From 67105b2a219f6d0e2d391706149152c24878a4e7 Mon Sep 17 00:00:00 2001 From: kakunpc <15257475+kakunpc@users.noreply.github.com> Date: Sun, 2 Jun 2019 06:09:42 +0900 Subject: [PATCH 161/341] [Keyboard] Add new keyboard BusinessCard (#6015) * add Business Card * remove helix code * Change rgblight use noeeprom * remove include * Update keyboards/business_card * Forgetting to erase --- keyboards/business_card/alpha/alpha.c | 51 ++++ keyboards/business_card/alpha/alpha.h | 35 +++ keyboards/business_card/alpha/config.h | 243 ++++++++++++++++++ .../alpha/keymaps/default/config.h | 22 ++ .../alpha/keymaps/default/keymap.c | 47 ++++ .../alpha/keymaps/default/readme.md | 1 + keyboards/business_card/alpha/rules.mk | 81 ++++++ keyboards/business_card/beta/beta.c | 51 ++++ keyboards/business_card/beta/beta.h | 37 +++ keyboards/business_card/beta/config.h | 243 ++++++++++++++++++ .../beta/keymaps/default/config.h | 23 ++ .../beta/keymaps/default/keymap.c | 50 ++++ .../beta/keymaps/default/readme.md | 1 + keyboards/business_card/beta/rules.mk | 81 ++++++ keyboards/business_card/business_card.c | 51 ++++ keyboards/business_card/business_card.h | 25 ++ keyboards/business_card/config.h | 0 keyboards/business_card/info.json | 0 keyboards/business_card/readme.md | 15 ++ keyboards/business_card/rules.mk | 83 ++++++ 20 files changed, 1140 insertions(+) create mode 100644 keyboards/business_card/alpha/alpha.c create mode 100644 keyboards/business_card/alpha/alpha.h create mode 100644 keyboards/business_card/alpha/config.h create mode 100644 keyboards/business_card/alpha/keymaps/default/config.h create mode 100644 keyboards/business_card/alpha/keymaps/default/keymap.c create mode 100644 keyboards/business_card/alpha/keymaps/default/readme.md create mode 100644 keyboards/business_card/alpha/rules.mk create mode 100644 keyboards/business_card/beta/beta.c create mode 100644 keyboards/business_card/beta/beta.h create mode 100644 keyboards/business_card/beta/config.h create mode 100644 keyboards/business_card/beta/keymaps/default/config.h create mode 100644 keyboards/business_card/beta/keymaps/default/keymap.c create mode 100644 keyboards/business_card/beta/keymaps/default/readme.md create mode 100644 keyboards/business_card/beta/rules.mk create mode 100644 keyboards/business_card/business_card.c create mode 100644 keyboards/business_card/business_card.h create mode 100644 keyboards/business_card/config.h create mode 100644 keyboards/business_card/info.json create mode 100644 keyboards/business_card/readme.md create mode 100644 keyboards/business_card/rules.mk diff --git a/keyboards/business_card/alpha/alpha.c b/keyboards/business_card/alpha/alpha.c new file mode 100644 index 000000000..3d2d1de77 --- /dev/null +++ b/keyboards/business_card/alpha/alpha.c @@ -0,0 +1,51 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#include "alpha.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/business_card/alpha/alpha.h b/keyboards/business_card/alpha/alpha.h new file mode 100644 index 000000000..980757689 --- /dev/null +++ b/keyboards/business_card/alpha/alpha.h @@ -0,0 +1,35 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k02, \ + k10, k11, k12 \ +) \ +{ \ + { k00, k01, k02 }, \ + { k10, k11, k12 }, \ +} diff --git a/keyboards/business_card/alpha/config.h b/keyboards/business_card/alpha/config.h new file mode 100644 index 000000000..e0324d654 --- /dev/null +++ b/keyboards/business_card/alpha/config.h @@ -0,0 +1,243 @@ +/* +Copyright 2019 kakunpc + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT business_card +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 3 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B2, B6 } +#define MATRIX_COL_PINS { E6, B4, B5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 6 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/business_card/alpha/keymaps/default/config.h b/keyboards/business_card/alpha/keymaps/default/config.h new file mode 100644 index 000000000..7c15789bd --- /dev/null +++ b/keyboards/business_card/alpha/keymaps/default/config.h @@ -0,0 +1,22 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ + +#pragma once + +// place overrides here +#ifdef RGB_DI_PIN + #define RGBLIGHT_ANIMATIONS +#endif diff --git a/keyboards/business_card/alpha/keymaps/default/keymap.c b/keyboards/business_card/alpha/keymaps/default/keymap.c new file mode 100644 index 000000000..4c7b4237c --- /dev/null +++ b/keyboards/business_card/alpha/keymaps/default/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user + +const uint16_t PROGMEM +keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = +LAYOUT(/* Base */ + KC_1, KC_2, KC_3, + KC_4, KC_5, KC_6 +), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } + +void led_set_user(uint8_t usb_led) {} + +void keyboard_post_init_user(void) { + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_MOOD); +} + +#ifdef OLED_DRIVER_ENABLE +static void render_logo(void) { + static const char PROGMEM qmk_logo[] = {0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0}; + + oled_write_P(qmk_logo, false); +} +void oled_task_user(void) { render_logo(); } +#endif diff --git a/keyboards/business_card/alpha/keymaps/default/readme.md b/keyboards/business_card/alpha/keymaps/default/readme.md new file mode 100644 index 000000000..22cc77eeb --- /dev/null +++ b/keyboards/business_card/alpha/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for business_card \ No newline at end of file diff --git a/keyboards/business_card/alpha/rules.mk b/keyboards/business_card/alpha/rules.mk new file mode 100644 index 000000000..8bb38a514 --- /dev/null +++ b/keyboards/business_card/alpha/rules.mk @@ -0,0 +1,81 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +OLED_DRIVER_ENABLE = yes diff --git a/keyboards/business_card/beta/beta.c b/keyboards/business_card/beta/beta.c new file mode 100644 index 000000000..c43be6c16 --- /dev/null +++ b/keyboards/business_card/beta/beta.c @@ -0,0 +1,51 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#include "beta.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/business_card/beta/beta.h b/keyboards/business_card/beta/beta.h new file mode 100644 index 000000000..21a334e8a --- /dev/null +++ b/keyboards/business_card/beta/beta.h @@ -0,0 +1,37 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, \ + k10, k11, \ + k20, k21 \ +) \ +{ \ + { k21, k20 }, \ + { k11, k10 }, \ + { k01, k00 }, \ +} diff --git a/keyboards/business_card/beta/config.h b/keyboards/business_card/beta/config.h new file mode 100644 index 000000000..fc6514982 --- /dev/null +++ b/keyboards/business_card/beta/config.h @@ -0,0 +1,243 @@ +/* +Copyright 2019 kakunpc + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT business_card +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 2 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B3, B2, B6 } +#define MATRIX_COL_PINS { B4, B5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 6 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/business_card/beta/keymaps/default/config.h b/keyboards/business_card/beta/keymaps/default/config.h new file mode 100644 index 000000000..e04ba7e4d --- /dev/null +++ b/keyboards/business_card/beta/keymaps/default/config.h @@ -0,0 +1,23 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ + +#pragma once + +// place overrides here + +#ifdef RGB_DI_PIN + #define RGBLIGHT_ANIMATIONS +#endif \ No newline at end of file diff --git a/keyboards/business_card/beta/keymaps/default/keymap.c b/keyboards/business_card/beta/keymaps/default/keymap.c new file mode 100644 index 000000000..c317a236c --- /dev/null +++ b/keyboards/business_card/beta/keymaps/default/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM +keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = +LAYOUT(/* Base */ + KC_1, KC_2, + KC_3, KC_4, + KC_5, KC_6 +), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } + +void matrix_init_user(void) { + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_MOOD); +} + +void matrix_scan_user(void) {} + +void led_set_user(uint8_t usb_led) {} + +void keyboard_post_init_user(void) {} + +#ifdef OLED_DRIVER_ENABLE +static void render_logo(void) { + static const char PROGMEM qmk_logo[] = {0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0}; + + oled_write_P(qmk_logo, false); +} +void oled_task_user(void) { render_logo(); } +#endif diff --git a/keyboards/business_card/beta/keymaps/default/readme.md b/keyboards/business_card/beta/keymaps/default/readme.md new file mode 100644 index 000000000..22cc77eeb --- /dev/null +++ b/keyboards/business_card/beta/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for business_card \ No newline at end of file diff --git a/keyboards/business_card/beta/rules.mk b/keyboards/business_card/beta/rules.mk new file mode 100644 index 000000000..8bb38a514 --- /dev/null +++ b/keyboards/business_card/beta/rules.mk @@ -0,0 +1,81 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +OLED_DRIVER_ENABLE = yes diff --git a/keyboards/business_card/business_card.c b/keyboards/business_card/business_card.c new file mode 100644 index 000000000..a57c00457 --- /dev/null +++ b/keyboards/business_card/business_card.c @@ -0,0 +1,51 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#include "business_card.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/business_card/business_card.h b/keyboards/business_card/business_card.h new file mode 100644 index 000000000..f330a0182 --- /dev/null +++ b/keyboards/business_card/business_card.h @@ -0,0 +1,25 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#pragma once + +#ifdef KEYBOARD_business_card_alpha + #include "alpha.h" +#endif +#ifdef KEYBOARD_business_card_beta + #include "beta.h" +#endif + +#include "quantum.h" diff --git a/keyboards/business_card/config.h b/keyboards/business_card/config.h new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/business_card/info.json b/keyboards/business_card/info.json new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/business_card/readme.md b/keyboards/business_card/readme.md new file mode 100644 index 000000000..c1bb32c9c --- /dev/null +++ b/keyboards/business_card/readme.md @@ -0,0 +1,15 @@ +# business_card + +![business_card](imgur.com image replace me!) + +A short description of the keyboard/project + +Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +Hardware Supported: The PCBs, controllers supported +Hardware Availability: links to where you can find this hardware + +Make example for this keyboard (after setting up your build environment): + + make business_card:default + +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). diff --git a/keyboards/business_card/rules.mk b/keyboards/business_card/rules.mk new file mode 100644 index 000000000..c12d659d0 --- /dev/null +++ b/keyboards/business_card/rules.mk @@ -0,0 +1,83 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +DEFAULT_FOLDER = business_card/beta From 912b6a591643990cca5d4b795bdcc2ad9f172b2f Mon Sep 17 00:00:00 2001 From: zunger-humu Date: Sat, 1 Jun 2019 14:35:52 -0700 Subject: [PATCH 162/341] [Keymap] "Cadet-style" keymap + improved LAYOUT macro for melody96 (#5985) * [melody96] "Cadet-style" keymap for melody96; LAYOUT macro for hotswap keyboard. * Rename macro. * Fix layer types. --- keyboards/melody96/keymaps/zunger/config.h | 22 ++ keyboards/melody96/keymaps/zunger/keymap.c | 250 ++++++++++++++++++++ keyboards/melody96/keymaps/zunger/readme.md | 78 ++++++ keyboards/melody96/keymaps/zunger/rules.mk | 2 + keyboards/melody96/melody96.h | 39 +++ 5 files changed, 391 insertions(+) create mode 100644 keyboards/melody96/keymaps/zunger/config.h create mode 100644 keyboards/melody96/keymaps/zunger/keymap.c create mode 100644 keyboards/melody96/keymaps/zunger/readme.md create mode 100644 keyboards/melody96/keymaps/zunger/rules.mk diff --git a/keyboards/melody96/keymaps/zunger/config.h b/keyboards/melody96/keymaps/zunger/config.h new file mode 100644 index 000000000..cc06440e0 --- /dev/null +++ b/keyboards/melody96/keymaps/zunger/config.h @@ -0,0 +1,22 @@ +/* Copyright 2018 MechMerlin + * + * 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 . + */ + +#pragma once + +// Enable cmd-option-escape on mac. +#define GRAVE_ESC_ALT_OVERRIDE + +// place overrides here diff --git a/keyboards/melody96/keymaps/zunger/keymap.c b/keyboards/melody96/keymaps/zunger/keymap.c new file mode 100644 index 000000000..9031447cd --- /dev/null +++ b/keyboards/melody96/keymaps/zunger/keymap.c @@ -0,0 +1,250 @@ +/* Copyright 2019 Yonatan Zunger + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum custom_keycodes { + // We provide special layer management keys: + // GREEK triggers the Greek (aka "Front") layer, or the SHIFTGREEK layer when shift is held. + // (Because we use Unicode, we need to implement shift-handling at the firmware level, + // rather than the OS level like we do in the QWERTY layer) + // CADET or GREEK+ALT triggers the Cadet (aka "Top") layer, or the SHIFTCADET layer when + // shift is held. + // LAYER_LOCK locks the "base" layer (i.e., QWERTY, GREEK, or CADET) to the value which is + // pressed at the moment that it is being released. When a layer lock is set, the + // analogous layer modifier key is reversed; e.g., if you lock the GREEK layer, then the + // GREEK button bounces you back to QWERTY. + // + // We also parse the shift, alt, and caps lock keys to provide management of those which is + // compatible with these various layers. + KC_GREEK = SAFE_RANGE, + KC_CADET, + KC_LAYER_LOCK, +}; + +enum layers_keymap { + _QWERTY = 0, + _FUNCTION, + + _GREEK, + _SHIFTGREEK, + _CADET, + _SHIFTCADET, +}; + +// This is so that H(xxxx) has the same width as _______, which makes the grids more legible. +#define H(x) UC(0x##x) +#define MO_FN MO(_FUNCTION) +#define KC_LLCK KC_LAYER_LOCK + +// TODO: To generalize this, we want some #defines that let us specify how each key on the base +// layer should map to the four special layers, and then use that plus the base layer definition to +// autogenerate the keymaps for the other layers. +// TODO: It would also be nice to be able to put the actual code points in here, rather than +// numbers. +// TODO: Also add checkmark and dengir. + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* The diagram below shows five rows for each key: from top to bottom, the QWERTY layer, the + * GREEK layer, the SHIFTGREEK layer, the CADET layer, and the SHIFTCADET layer. (The single + * diagram is to make it easier to see what goes where with this many layers!) + * + * ,---------------------------------------------------------------------------- + * | ` |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|HOM|END|PGU|PGD|MUT|BRK| QWERTY + * | ` | ¹ | ² | ³ | ⁴ | ⁵ | ⁶ | ⁷ | ⁸ | ⁹ | ⁰ | ⁻ | ⁺ | ⁽ | ⁾ | | | | | GREEK + * | ` | ₁ | ₂ | ₃ | ₄ | ₅ | ₆ | ₇ | ₈ | ₉ | ₀ | ₋ | ₊ | ₍ | ₎ | | | | | SHIFTGREEK + * | ¬ | | | | | | | | | | | | | | | | | | | CADET + * | ∅ | | | | | | | | | | | | | | | | | | | SHIFTCADET + * |---------------------------------------------------------------------------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + | BKSPC |LCK| / | * | - | + * | ` | | | | | | | | | | | ∝ | ∼ | BKSPC |LCK| ⊘ | ⊙ | ⊖ | + * | ` | | | | | | | | | | | | ≁ | BKSPC |LCK| | ⊗ | | + * | | | | | | | | | | | | | ± | BKSPC |LCK| | | | + * | | | | | | | | | | | | | ∓ | BKSPC |LCK| | | | + * |---------------------------------------------------------------------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | 7 | 8 | 9 | | + * | | θ | ω | ε | ρ | τ | ψ | υ | ι | ο | π | | | | | | | | + * | | Θ | Ω | Ε | Ρ | Τ | Ψ | Υ | Ι | Ο | Π | | | | | | | | + * | | ∧ | ∨ | ∩ | ∪ | ⊂ | ⊃ | ∀ | ∞ | ∃ | ∂ | ∈ | | | * | * | * | | [1] + * | | ℚ | | | ℝ | ⊆ | ⊇ | | ℵ | ∄ | | ∉ | | | * | * | * | | + * |-----------------------------------------------------------------------| + | + * | CTRL | A | S | D | F | G | H | J | K | L | ; | ' | RET | 4 | 5 | 6 | ⊕ | + * | CTRL | α | σ | δ | φ | γ | η | ϑ | κ | λ | ⋯ | ⋅ | RET | | | | | + * | CTRL | Α | Σ | Δ | Φ | Γ | Η | | Κ | Λ | … | ∴ | RET | | | | | + * | CTRL | ⟘ | ⊤ | ⊢ | ⊣ | ↑ | ↓ | ← | → | ↔ | | | RET | * | * | * | | [1] + * | CTRL | Å | | ∇ | | ⇑ | ⇓ | ⇐ | ⇒ | ⇔ | | | RET | * | * | * | | + * |-----------------------------------------------------------------------|---| + * | SHIFT | Z | X | C | V | B | N | M | , | . | / |SHFT | ↑ | 1 | 2 | 3 | | + * | SHIFT | ζ | ξ | χ | ς | β | ν | μ | ≪ | ≫ | ∫ |SHFT | | | | | | + * | SHIFT | Ζ | Ξ | Χ | ✔ | Β | Ν | Μ | ≲ | ≳ | |SHFT | | | | | | + * | SHIFT | | | ≠ | ≈ | ≡ | ≤ | ≥ | | | ÷ |SHFT | | * | * | * | | [1] + * | SHIFT | ℤ | | ℂ | ≉ | ≢ | ℕ | | | | |SHFT | | * | * | * | | + * |-----------------------------------------------------------------------|ENT| + * | CTL | ALT| CMD| SPACE | α | β | γ | ← | ↓ | → | 0 | . | | [2] + * | CTL | ALT| CMD| SPACE | α | β | γ | | | | | | | + * | CTL | ALT| CMD| SPACE | α | β | γ | | | | | | | + * | CTL | ALT| CMD| SPACE | α | β | γ | | | | | | | + * | CTL | ALT| CMD| SPACE | α | β | γ | | | | | | | + * `---------------------------------------------------------------------------' + * + * [1] CADET + numpad moves the mouse. SHIFT+CADET+NUMPAD moves it more quickly. CADET+5 + * clicks the mouse, and SHIFT+CADET+FIVE right-clicks. + * [2] The Greek letters in this row are the three modifier keys (GREEK, CADET, FN), + * not the Unicode Greek letters. + */ + // NB: Using GESC for escape in the QWERTY layer as a temporary hack because I messed up the + // switch on the KC_GRV key; change back to KC_ESC once this is fixed. + [_QWERTY] = LAYOUT_hotswap( + KC_GESC, 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_HOME, KC_END, KC_PGUP, KC_PGDN, KC_MPLY, KC_BRK, + KC_GRV, 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_LLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_P7, KC_P8, KC_P9, + 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, KC_P4, KC_P5, KC_P6, KC_PPLS, + 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_UP, KC_P1, KC_P2, KC_P3, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_GREEK,KC_CADET,MO_FN, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + [_GREEK] = LAYOUT_hotswap( + KC_GRV, H(00b9), H(00b2), H(00b3), H(2074), H(2075), H(2076), H(2077), H(2078), H(2079), H(2070), H(207b), H(207a), H(207d), H(207e), XXXXXXX, XXXXXXX, XXXXXXX, _______, + KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, H(221d), H(223c), _______, _______, H(2298), H(2299), H(2296), + _______, H(03b8), H(03c9), H(03b5), H(03c1), H(03c4), H(03c8), H(03c5), H(03b9), H(03bf), H(03c0), KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, + _______, H(03b1), H(03c3), H(03b4), H(03c6), H(03b3), H(03b7), H(03d1), H(03ba), H(03bb), H(22ef), H(22c5), _______, KC_P4, KC_P5, KC_P6, H(2295), + _______, H(03b6), H(03be), H(03c7), H(03c2), H(03b2), H(03bd), H(03bc), H(226a), H(226b), H(222b), _______, _______, KC_P1, KC_P2, KC_P3, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT), + [_SHIFTGREEK] = LAYOUT_hotswap( + KC_GRV, H(2081), H(2082), H(2083), H(2084), H(2085), H(2086), H(2087), H(2088), H(2089), H(2080), H(208b), H(208a), H(208d), H(208e), XXXXXXX, XXXXXXX, XXXXXXX, _______, + KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, H(2241), _______, _______, XXXXXXX, H(2297), XXXXXXX, + _______, H(0398), H(03a9), H(0395), H(03a1), H(03a4), H(03a8), H(03a5), H(0399), H(039f), H(03a0), KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, + _______, H(0391), H(03a3), H(0394), H(03a6), H(0393), H(0397), XXXXXXX, H(039a), H(039b), H(2026), H(2234), _______, KC_P4, KC_P5, KC_P6, H(2295), + _______, H(0396), H(039e), H(03a7), H(2714), H(0392), H(039d), H(039c), H(2272), H(2273), XXXXXXX, _______, _______, KC_P1, KC_P2, KC_P3, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT), + // TODO: Add mouse keys to keypad. + [_CADET] = LAYOUT_hotswap( + H(00AC), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + KC_GRV, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, H(00b1), _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, + _______, H(2227), H(2228), H(2229), H(222a), H(2282), H(2283), H(2200), H(221e), H(2203), H(2202), H(2208), XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, + _______, H(22a5), H(22a4), H(22a2), H(22a3), H(2191), H(2193), H(2190), H(2192), H(2194), XXXXXXX, XXXXXXX, _______, KC_P4, KC_P5, KC_P6, XXXXXXX, + _______, XXXXXXX, XXXXXXX, H(2260), H(2248), H(2261), H(2264), H(2265), XXXXXXX, XXXXXXX, H(00f7), _______, _______, KC_P1, KC_P2, KC_P3, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT), + [_SHIFTCADET] = LAYOUT_hotswap( + H(2205), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + KC_GRV, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, H(2213), _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, + _______, H(211a), XXXXXXX, XXXXXXX, H(211d), H(2286), H(2287), XXXXXXX, H(2135), H(2204), XXXXXXX, H(2209), XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, + _______, H(212b), XXXXXXX, H(2207), XXXXXXX, H(21d1), H(21d3), H(21d0), H(21d2), H(21d4), XXXXXXX, XXXXXXX, _______, KC_P4, KC_P5, KC_P6, XXXXXXX, + _______, H(2124), XXXXXXX, H(2102), H(2249), H(2262), H(2115), XXXXXXX, XXXXXXX, XXXXXXX, H(00f7), _______, _______, KC_P1, KC_P2, KC_P3, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT), + + // Function layer is mostly for keyboard meta-control operations. Lots of this is just from the + // default layout; TODO make it nicer, add Unicode mode switchers. + [_FUNCTION] = LAYOUT_hotswap( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, _______, _______, UC_M_OS, UC_M_LN, UC_M_WI, UC_M_BS, UC_M_WC, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; + +// Layer bitfields. +#define GREEK_LAYER (1UL << _GREEK) +#define SHIFTGREEK_LAYER (1UL << _SHIFTGREEK) +#define CADET_LAYER (1UL << _CADET) +#define SHIFTCADET_LAYER (1UL << _SHIFTCADET) +// The layers we don't touch. +#define LAYER_MASK ~(GREEK_LAYER|SHIFTGREEK_LAYER|CADET_LAYER|SHIFTCADET_LAYER) + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // We track these persistent globals and manage them on our own, rather than trying to rely on + // get_mods or the like, because this function is called *before* that's updated! + static bool shift_held = false; + static bool alt_held = false; + static bool greek_held = false; + static bool cadet_held = false; + + // These are where we remember the values of lock states. + static bool shift_lock = false; + static int layer_lock = _QWERTY; + + // Process any modifier key presses. + if (keycode == KC_LSHIFT || keycode == KC_RSHIFT) { + shift_held = record->event.pressed; + } else if (keycode == KC_LALT || keycode == KC_RALT) { + alt_held = record->event.pressed; + } else if (keycode == KC_GREEK) { + greek_held = record->event.pressed; + } else if (keycode == KC_CADET) { + cadet_held = record->event.pressed; + } + + // Now let's transform these into the "cadet request" and "greek request." + const bool greek_request = (greek_held && !alt_held); + const bool cadet_request = (cadet_held || (greek_held && alt_held)); + + // Now, handle the lock keys. We store next_layer_lock in a local variable so that we can + // determine the layer to pick right now before we update layer_lock. + int next_layer_lock = layer_lock; + if (keycode == KC_CAPS) { + // If we're in QWERTY mode, caps lock is already going to be managed by the host OS, but by + // tracking it ourselves we can also usefully apply it to the GREEK and CADET layers. + if (record->event.pressed) { + shift_lock = !shift_lock; + } + } else if (keycode == KC_LAYER_LOCK) { + if (record->event.pressed) { + if (cadet_request) { + next_layer_lock = _CADET; + } else if (greek_request) { + next_layer_lock = _GREEK; + } else { + next_layer_lock = _QWERTY; + } + } + } + + // OK! Now we know which buttons are being held, and the current and upcoming states of the locks. + // We can compute our new base layer. Remember that the CADET and GREEK keys act as their own + // antonyms if they match the layer lock -- e.g., if you have CADET locked, then CADET+X generates + // QWERTY-X. + int base_layer; + if (cadet_request) { + base_layer = (layer_lock == _CADET ? _QWERTY : _CADET); + } else if (greek_request) { + base_layer = (layer_lock == _GREEK ? _QWERTY : _GREEK); + } else { + base_layer = layer_lock; + } + + const bool shifted = (shift_held != shift_lock); + int actual_layer; + if (base_layer == _CADET) { + actual_layer = (shifted ? _SHIFTCADET : _CADET); + } else if (base_layer == _GREEK) { + actual_layer = (shifted ? _SHIFTGREEK : _GREEK); + } else { + // We don't do shifting for the QWERTY layer, since for that we emit USB HID codes and shifting + // is managed by the host OS. + actual_layer = _QWERTY; + } + + // And now we can update the layer lock and the actual firmware layer selector. + layer_lock = next_layer_lock; + layer_state_t new_layer_state = (layer_state & LAYER_MASK) | (1UL << actual_layer); + if (new_layer_state != layer_state) { + layer_state_set(new_layer_state); + } + + // TODO: We can update LED states based on shift_lock (caps), layer_lock (layer lock), and + // base_layer (base layer). + + return true; +} diff --git a/keyboards/melody96/keymaps/zunger/readme.md b/keyboards/melody96/keymaps/zunger/readme.md new file mode 100644 index 000000000..3eb64a2e7 --- /dev/null +++ b/keyboards/melody96/keymaps/zunger/readme.md @@ -0,0 +1,78 @@ +* The "Cadet-Style" keymap for the melody96. +* Author: Yonatan Zunger (zunger@gmail.com) + +This is an experimental keymap being used both for practical reasons (as my daily driver) and to +work out the ideas of a "space-cadet-style" keyboard which can type text and mathematical symbols +with equal ease. It's designed for anyone who frequently needs to do this outside of a LaTeX +environment, or for anyone who loves the old "Space Cadet" keyboard! And it works at its best when +you have actual Cadet keycaps (like SA Symbolics) installed, because those keycaps will actually +show what you get. + +The core idea of this keyboard is that, in addition to a QWERTY base layer and a function layer, it +supports two additional base layers -- the GREEK layer (the analogue of the Space Cadet "Greek," or +"Front," keys) and the CADET layer (the analogue of the Space Cadet "Top" keys). These layers use +Unicode to generate all of the mathematical symbols you can find on a traditional Space Cadet +layout, plus a bunch of extras. + +Because Unicode can't be encoded using the traditional USB HID protocol, QMK does some clever but +horrifying things to fool your OS. One consequence of this is that the shift key needs to be handled +by the keyboard firmware, not the host OS. To handle this, we have two additional layers -- +SHIFTGREEK and SHIFTCADET -- and handle the flipping between all of these layers here in the +firmware. + +*The simple bit: Using this layout on a Melody96* + +At the core of this layout are three special modifier keys and two special lock keys: + +* The GREEK key, to the right of the spacebar, activates the GREEK layer. GREEK+SHIFT activates + SHIFTGREEK. These keys generate Greek letters on the letter keys (thus the name), and a few + mathematical symbols on other keys. They correspond to the notations on the front of traditional + Space Cadet keys; if your capset doesn't include those (alas, most don't), they're the "pretty + obvious" mappings. +* The CADET key, to the right of GREEK, activates the CADET layer. These are the symbols above the + letters on a Space Cadet layout. CADET+SHIFT activates the SHIFTCADET layer, with even more + symbols. +* The FUNCTION key, to the right of CADET, activates the function layer. This is where you have a + reset mechanism, a selector for which Unicode input type you want, and so on. + +Additionally, GREEK+ALT is equivalent to CADET. This is handy for other keyboards where you don't +have room for this many modifiers. + +The lock keys are: + +* Caps lock, if you use it, will also act as a "shift lock" for the Greek and Cadet layers. Shift + lock is slightly different, in that while it is engaged shift will _dis_engage it; that's actually + pretty useful when typing math. +* An additional "layer lock" key, by default where "num lock" usually goes, will lock the choice of + base layer. To use it, hold down any invocation of the GREEK or CADET layers, or none at all, and + hit lock; it will then put you in that layer. The corresponding modifier key will then toggle you + back to the QWERTY layer. (So for example, if you hit GREEK+LAYER_LOCK and release them, you're + now typing in Greek; the GREEK modifier would cause you to type QWERTY momentarily. To go back to + ordinary QWERTY mode, you'd just hit LAYER_LOCK again with no modifiers held) + +To see the full layout, check out the big comment in keymap.c. + +*A less-simple bit: Adapting this to other keyboards* + +This is really a canary for generic Cadet implementations. Before this can be made generic, a few +things will have to happen: + +(1) Instead of a fixed keymap, this has to be refactored into some kind of array showing the +mappings of QWERTY-layer keys onto the appropriate code points in the GREEK and CADET layers, and +some preprocessor magic needs to auto-transform this plus a traditional keymap for the QWERTY layer +into keymaps for all five of the core layers. (Function layers would presumably be handled on a +per-keyboard basis) + +(2) The standard mapping of those should have some #define's to control things like whether there +are physical F-keys (you would probably want to move superscript and subscripts onto the numbers if +there weren't, and figure out what to do with the non-numeric super/sub keys), whether you actually +want to enable GREEK+ALT=CADET, and so on; + +(3) There should be support for controlling indicator LEDs based on the base layer selection, +caps/shift lock state, and layer lock state, as well as for triggering audio on transitions; + +(4) All the core fancy logic in process_record_user which implements the layer handling should be +factored out into its own function, so that keyboards can easily reuse that, too. + +This is a lovely TODO for future work, and could be particularly fun to go along with new releases +of SA Symbolics and the like. Anyone interested in such things, ping me! diff --git a/keyboards/melody96/keymaps/zunger/rules.mk b/keyboards/melody96/keymaps/zunger/rules.mk new file mode 100644 index 000000000..a61cfa33f --- /dev/null +++ b/keyboards/melody96/keymaps/zunger/rules.mk @@ -0,0 +1,2 @@ +# You need Unicode for this map. +UNICODE_ENABLE = yes # Unicode diff --git a/keyboards/melody96/melody96.h b/keyboards/melody96/melody96.h index f60f054ca..d846fa28d 100644 --- a/keyboards/melody96/melody96.h +++ b/keyboards/melody96/melody96.h @@ -25,4 +25,43 @@ { K110, K111, K112, K113, K114, K115, K116, K117, K118 } \ } +/* + * The layout macro for the layout of hotswap keyboards, with illustrative grid of a typical + * assignment. + * ,--------------------------------------------------------------------------- + * |ESC|F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|PSC|HOM|END|PGU|PGD|DEL| + * ,--------------------------------------------------------------------------| + * | ` |1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + | BKSPC |NLK| / | * | - | + * |--------------------------------------------------------------------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | 7 | 8 | 9 | | + * |----------------------------------------------------------------------| + | + * | CTRL | A | S | D | F | G | H | J | K | L | ; | ' | RET | 4 | 5 | 6 | | + * |----------------------------------------------------------------------|---| + * | LSHIFT | Z | X | C | V | B | N | M | , | . | / |RSHFT| ↑ | 1 | 2 | 3 | | + * |----------------------------------------------------------------------|ENT| + * |LCTL|LWIN|LALT| SPACE |CTL|ALT|FN | ← | ↓ | → | 0 | . | | + * `--------------------------------------------------------------------------- + */ +#define LAYOUT_hotswap( \ + K050, K051, K052, K053, K054, K055, K056, K057, K058, K118, K117, K115, K114, K113, K116, K112, K111, K110, K063, \ + K040, K041, K042, K043, K044, K045, K046, K047, K048, K108, K107, K105, K104, K106, K102, K101, K100, K064, \ + K030, K031, K032, K033, K034, K035, K036, K037, K038, K098, K097, K095, K094, K093, K096, K092, K091, \ + K020, K021, K022, K023, K024, K025, K026, K027, K028, K088, K087, K085, K084, K086, K082, K081, K080, \ + K010, K012, K013, K014, K015, K016, K017, K018, K078, K077, K075, K074, K073, K076, K072, K071, \ + K000, K001, K002, K006, K008, K007, K005, K004, K003, K066, K062, K061, K060 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008 }, \ + { K010, KC_NO, K012, K013, K014, K015, K016, K017, K018 }, \ + { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \ + { K030, K031, K032, K033, K034, K035, K036, K037, K038 }, \ + { K040, K041, K042, K043, K044, K045, K046, K047, K048 }, \ + { K050, K051, K052, K053, K054, K055, K056, K057, K058 }, \ + { K060, K061, K062, K063, K064, KC_NO, K066, KC_NO, KC_NO }, \ + { KC_NO, K071, K072, K073, K074, K075, K076, K077, K078 }, \ + { K080, K081, K082, KC_NO, K084, K085, K086, K087, K088 }, \ + { KC_NO, K091, K092, K093, K094, K095, K096, K097, K098 }, \ + { K100, K101, K102, KC_NO, K104, K105, K106, K107, K108 }, \ + { K110, K111, K112, K113, K114, K115, K116, K117, K118 } \ +} + #endif From 02b3fadbac6c68940e1bf141397d5d7cb87a6928 Mon Sep 17 00:00:00 2001 From: John M Daly Date: Sat, 1 Jun 2019 17:37:32 -0400 Subject: [PATCH 163/341] [Keyboard] Initial firmware and keymaps for the CO60 PCB (#5959) * Add: Initial firmware and keymaps for the CO60 PCB * Apply suggestions from code review Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Co-Authored-By: Drashna Jaelre Co-Authored-By: fauxpark * Update: Address reviewer comments * Apply suggestions from code review Co-Authored-By: Drashna Jaelre * Update: Reviewer changes --- keyboards/handwired/co60/info.json | 38 ++ .../handwired/co60/keymaps/all_keys/config.h | 20 + .../handwired/co60/keymaps/all_keys/keymap.c | 48 ++ .../handwired/co60/keymaps/all_keys/readme.md | 5 + .../handwired/co60/keymaps/default/config.h | 19 + .../handwired/co60/keymaps/default/keymap.c | 54 ++ .../handwired/co60/keymaps/default/readme.md | 1 + .../keymaps/jmdaly_hhkb_split_space/config.h | 21 + .../keymaps/jmdaly_hhkb_split_space/keymap.c | 137 +++++ .../keymaps/jmdaly_hhkb_split_space/readme.md | 6 + keyboards/handwired/co60/readme.md | 26 + keyboards/handwired/co60/rev1/config.h | 161 ++++++ keyboards/handwired/co60/rev1/rev1.c | 46 ++ keyboards/handwired/co60/rev1/rev1.h | 127 +++++ keyboards/handwired/co60/rev1/rules.mk | 70 +++ keyboards/handwired/co60/rev6/chconf.h | 520 ++++++++++++++++++ keyboards/handwired/co60/rev6/config.h | 60 ++ keyboards/handwired/co60/rev6/halconf.h | 388 +++++++++++++ keyboards/handwired/co60/rev6/led.c | 240 ++++++++ keyboards/handwired/co60/rev6/led_custom.h | 22 + keyboards/handwired/co60/rev6/mcuconf.h | 257 +++++++++ keyboards/handwired/co60/rev6/rev6.c | 39 ++ keyboards/handwired/co60/rev6/rev6.h | 146 +++++ keyboards/handwired/co60/rev6/rules.mk | 59 ++ keyboards/handwired/co60/rev7/chconf.h | 520 ++++++++++++++++++ keyboards/handwired/co60/rev7/config.h | 70 +++ keyboards/handwired/co60/rev7/halconf.h | 388 +++++++++++++ keyboards/handwired/co60/rev7/led.c | 242 ++++++++ keyboards/handwired/co60/rev7/led_custom.h | 22 + keyboards/handwired/co60/rev7/mcuconf.h | 257 +++++++++ keyboards/handwired/co60/rev7/rev7.c | 39 ++ keyboards/handwired/co60/rev7/rev7.h | 146 +++++ keyboards/handwired/co60/rev7/rules.mk | 59 ++ 33 files changed, 4253 insertions(+) create mode 100644 keyboards/handwired/co60/info.json create mode 100644 keyboards/handwired/co60/keymaps/all_keys/config.h create mode 100644 keyboards/handwired/co60/keymaps/all_keys/keymap.c create mode 100644 keyboards/handwired/co60/keymaps/all_keys/readme.md create mode 100644 keyboards/handwired/co60/keymaps/default/config.h create mode 100644 keyboards/handwired/co60/keymaps/default/keymap.c create mode 100644 keyboards/handwired/co60/keymaps/default/readme.md create mode 100644 keyboards/handwired/co60/keymaps/jmdaly_hhkb_split_space/config.h create mode 100644 keyboards/handwired/co60/keymaps/jmdaly_hhkb_split_space/keymap.c create mode 100644 keyboards/handwired/co60/keymaps/jmdaly_hhkb_split_space/readme.md create mode 100644 keyboards/handwired/co60/readme.md create mode 100644 keyboards/handwired/co60/rev1/config.h create mode 100644 keyboards/handwired/co60/rev1/rev1.c create mode 100644 keyboards/handwired/co60/rev1/rev1.h create mode 100644 keyboards/handwired/co60/rev1/rules.mk create mode 100644 keyboards/handwired/co60/rev6/chconf.h create mode 100644 keyboards/handwired/co60/rev6/config.h create mode 100644 keyboards/handwired/co60/rev6/halconf.h create mode 100644 keyboards/handwired/co60/rev6/led.c create mode 100644 keyboards/handwired/co60/rev6/led_custom.h create mode 100644 keyboards/handwired/co60/rev6/mcuconf.h create mode 100644 keyboards/handwired/co60/rev6/rev6.c create mode 100644 keyboards/handwired/co60/rev6/rev6.h create mode 100644 keyboards/handwired/co60/rev6/rules.mk create mode 100644 keyboards/handwired/co60/rev7/chconf.h create mode 100644 keyboards/handwired/co60/rev7/config.h create mode 100644 keyboards/handwired/co60/rev7/halconf.h create mode 100644 keyboards/handwired/co60/rev7/led.c create mode 100644 keyboards/handwired/co60/rev7/led_custom.h create mode 100644 keyboards/handwired/co60/rev7/mcuconf.h create mode 100644 keyboards/handwired/co60/rev7/rev7.c create mode 100644 keyboards/handwired/co60/rev7/rev7.h create mode 100644 keyboards/handwired/co60/rev7/rules.mk diff --git a/keyboards/handwired/co60/info.json b/keyboards/handwired/co60/info.json new file mode 100644 index 000000000..46f369f92 --- /dev/null +++ b/keyboards/handwired/co60/info.json @@ -0,0 +1,38 @@ +{ + "keyboard_name": "CO60", + "url": "https://github.com/jmdaly/CO60", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all": { + "key_count": 68, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"label":"LSpace", "x":3.75, "y":4, "w":2.25}, {"label":"Fn", "x":6, "y":4, "w":1.25}, {"label":"RSpace", "x":7.25, "y":4, "w":2.75}, {"label":"Alt", "x":10, "y":4, "w":1}, {"label":"Win", "x":11, "y":4, "w":1}, {"label":"Menu", "x":12, "y":4, "w":1}, {"label":"Ctrl", "x":13, "y":4, "w":1}, {"label":"Fn", "x":14, "y":4, "w":1}] + }, + "LAYOUT_60_ansi": { + "key_count": 61, + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_ansi_split_bs_rshift": { + "key_count": 63, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0, "w":1}, {"label":"Del", "x":14, "y":0, "w":1}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3, "w":1}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_iso": { + "key_count": 62, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"£", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"[", "x":11.5, "y":1}, {"label":"]", "x":12.5, "y":1}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_hhkb": { + "key_count": 60, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"[", "x":11.5, "y":1}, {"label":"]", "x":12.5, "y":1}, {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75},{"label":"Fn", "x":14, "y":3}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"label":"Space", "x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}] + }, + "LAYOUT_60_hhkb_split_space": { + "key_count": 62, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"[", "x":11.5, "y":1}, {"label":"]", "x":12.5, "y":1}, {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75},{"label":"Fn", "x":14, "y":3}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"label":"LSpace", "x":4, "y":4, "w":2.75}, {"label":"Fn", "x":6.75, "y":4, "w":1.5}, {"label":"RSpace", "x":8.25, "y":4, "w":2.75}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}] + }, + "LAYOUT_60_hhkb_split_625u_space": { + "key_count": 63, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"[", "x":11.5, "y":1}, {"label":"]", "x":12.5, "y":1}, {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75},{"label":"Fn", "x":14, "y":3}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"label":"LSpace", "x":3.75, "y":4, "w":2.25}, {"label":"Fn", "x":6, "y":4, "w":1.25}, {"label":"RSpace", "x":7.25, "y":4, "w":2.75}, {"label":"Menu", "x":10, "y":4, "w":1.25}, {"label":"Alt", "x":11.25, "y":4, "w":1.25}, {"label":"Win", "x":12.5, "y":4}] + } + } +} + diff --git a/keyboards/handwired/co60/keymaps/all_keys/config.h b/keyboards/handwired/co60/keymaps/all_keys/config.h new file mode 100644 index 000000000..a68c5c746 --- /dev/null +++ b/keyboards/handwired/co60/keymaps/all_keys/config.h @@ -0,0 +1,20 @@ +/* Copyright 2019 John M Daly + * + * 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 . + */ + +#pragma once + + +// place overrides here diff --git a/keyboards/handwired/co60/keymaps/all_keys/keymap.c b/keyboards/handwired/co60/keymaps/all_keys/keymap.c new file mode 100644 index 000000000..797b7ece3 --- /dev/null +++ b/keyboards/handwired/co60/keymaps/all_keys/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2019 John M Daly + * + * 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 . + */ +#include QMK_KEYBOARD_H + + +enum co60_layers { + _L1, + _L2 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_L1] = LAYOUT_all( /* Base */ + KC_ESC, 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_GRV, KC_DEL, + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_ENT, KC_HOME, KC_END, KC_INS, KC_RALT, KC_RGUI, KC_RIGHT, KC_RCTL + ) +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/handwired/co60/keymaps/all_keys/readme.md b/keyboards/handwired/co60/keymaps/all_keys/readme.md new file mode 100644 index 000000000..0e472f235 --- /dev/null +++ b/keyboards/handwired/co60/keymaps/all_keys/readme.md @@ -0,0 +1,5 @@ +# Keymap that uses all possible switches + +This is in part to test all of the switches, +but also it may be useful if anyone ever makes a +layout that requires all switch positions. diff --git a/keyboards/handwired/co60/keymaps/default/config.h b/keyboards/handwired/co60/keymaps/default/config.h new file mode 100644 index 000000000..124091cc5 --- /dev/null +++ b/keyboards/handwired/co60/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 John M Daly + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/handwired/co60/keymaps/default/keymap.c b/keyboards/handwired/co60/keymaps/default/keymap.c new file mode 100644 index 000000000..35151c421 --- /dev/null +++ b/keyboards/handwired/co60/keymaps/default/keymap.c @@ -0,0 +1,54 @@ +/* Copyright 2019 John M Daly + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum co60_layers { + _L1, + _L2 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_L1] = LAYOUT_60_ansi( /* Base */ + KC_ESC, 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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_L2), KC_RCTL + ), + [_L2] = LAYOUT_60_ansi( /* Base */ + RESET, 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_GRV, + _______, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, KC_INSERT, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_HOME, KC_END, _______, + _______, BL_DEC, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDOWN, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/handwired/co60/keymaps/default/readme.md b/keyboards/handwired/co60/keymaps/default/readme.md new file mode 100644 index 000000000..eb8ba49e3 --- /dev/null +++ b/keyboards/handwired/co60/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for co60 \ No newline at end of file diff --git a/keyboards/handwired/co60/keymaps/jmdaly_hhkb_split_space/config.h b/keyboards/handwired/co60/keymaps/jmdaly_hhkb_split_space/config.h new file mode 100644 index 000000000..c88fbc29d --- /dev/null +++ b/keyboards/handwired/co60/keymaps/jmdaly_hhkb_split_space/config.h @@ -0,0 +1,21 @@ +/* Copyright 2019 John M Daly + * + * 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 . + */ + +#pragma once + +#define LEADER_TIMEOUT 300 + +// place overrides here diff --git a/keyboards/handwired/co60/keymaps/jmdaly_hhkb_split_space/keymap.c b/keyboards/handwired/co60/keymaps/jmdaly_hhkb_split_space/keymap.c new file mode 100644 index 000000000..0f19f9fbe --- /dev/null +++ b/keyboards/handwired/co60/keymaps/jmdaly_hhkb_split_space/keymap.c @@ -0,0 +1,137 @@ +/* Copyright 2019 John M Daly + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum co60_layers { + _L1, + _L2, + _L3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Default base layer. Except for the bottom row, this + // is close to a standard HHKB layout. + [_L1] = LAYOUT_60_hhkb_split_625u_space( /* Base */ + KC_ESC, 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_BSLS, KC_GRV, + 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_BSPC, + CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, MO(_L3), + KC_LALT, KC_LGUI, KC_ENT, MO(_L3), KC_SPC, KC_LEAD, KC_RGUI, KC_RALT + ), + // My preferred base layout. This doesn't match the caps + // on my boards, so I don't make it default. + [_L2] = LAYOUT_60_hhkb_split_625u_space( /* Base */ + KC_GRV, 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_BSLS, KC_DEL, + 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_BSPC, + CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, MO(_L3), + KC_LALT, KC_LGUI, KC_ENT, MO(_L3), KC_SPC, KC_LEAD, KC_RGUI, KC_RALT + ), + [_L3] = LAYOUT_60_hhkb_split_625u_space( /* Function */ + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + BL_BRTG, BL_TOGG, BL_INC, BL_DEC, BL_ON, BL_OFF, _______, _______, _______, _______, _______, KC_PGUP, KC_INSERT, KC_DEL, + _______, RGB_TOG, RGB_MOD, RGB_RMOD, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_HOME, KC_END, _______, + _______, BL_DEC, _______, _______, _______, _______, _______, DF(_L1), DF(_L2), _______, KC_PGDOWN, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +void matrix_init_user(void) { + +} + +LEADER_EXTERNS(); + +void matrix_scan_user(void) { + + LEADER_DICTIONARY() { + leading = false; + leader_end(); + + // Close a program in i3wm + SEQ_ONE_KEY(KC_Q) { + register_code(KC_LGUI); + register_code(KC_LSHIFT); + register_code(KC_Q); + unregister_code(KC_Q); + unregister_code(KC_LSHIFT); + unregister_code(KC_LGUI); + } + // Exit i3wm + SEQ_ONE_KEY(KC_E) { + register_code(KC_LGUI); + register_code(KC_LSHIFT); + register_code(KC_E); + unregister_code(KC_E); + unregister_code(KC_LSHIFT); + unregister_code(KC_LGUI); + } + // Copy selected text in suckless terminal + SEQ_ONE_KEY(KC_C) { + register_code(KC_LCTL); + register_code(KC_LSHIFT); + register_code(KC_C); + unregister_code(KC_C); + unregister_code(KC_LSHIFT); + unregister_code(KC_LCTL); + } + // Paste text in suckless terminal + SEQ_ONE_KEY(KC_V) { + register_code(KC_LCTL); + register_code(KC_LSHIFT); + register_code(KC_V); + unregister_code(KC_V); + unregister_code(KC_LSHIFT); + unregister_code(KC_LCTL); + } + // FZF shortcut to fuzzy switch directories + SEQ_ONE_KEY(KC_D) { + register_code(KC_LALT); + register_code(KC_C); + unregister_code(KC_C); + unregister_code(KC_LALT); + } + // Send keys to bring up fuzzy process kill + SEQ_ONE_KEY(KC_K) { + SEND_STRING("kill " SS_TAP(X_TAB)); + } + // Send keys to start neovim and fuzzy search for filename + SEQ_ONE_KEY(KC_T) { + SEND_STRING("nvim "); + register_code(KC_LCTL); + register_code(KC_T); + unregister_code(KC_T); + unregister_code(KC_LCTL); + } + // Switch between windows in tmux + SEQ_ONE_KEY(KC_L) { + register_code(KC_LCTL); + register_code(KC_B); + unregister_code(KC_B); + unregister_code(KC_LCTL); + register_code(KC_L); + unregister_code(KC_L); + } + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/handwired/co60/keymaps/jmdaly_hhkb_split_space/readme.md b/keyboards/handwired/co60/keymaps/jmdaly_hhkb_split_space/readme.md new file mode 100644 index 000000000..032fc85f9 --- /dev/null +++ b/keyboards/handwired/co60/keymaps/jmdaly_hhkb_split_space/readme.md @@ -0,0 +1,6 @@ +# The split-space HHKB keymap for co60 + +This keymap implements a modified MX HHKB layout, but in addition to 7u space, +this layout supports a number of split spacebar bottom rows. The full set of +layout options is found +[here](http://www.keyboard-layout-editor.com/#/gists/b488496b3a71c8192113c07e298be340). diff --git a/keyboards/handwired/co60/readme.md b/keyboards/handwired/co60/readme.md new file mode 100644 index 000000000..2a649ea9b --- /dev/null +++ b/keyboards/handwired/co60/readme.md @@ -0,0 +1,26 @@ +# co60 + +The CO60 is a 60% PCB that aims to meet the following goals: + +* Switches oriented such that the LEDs are South-facing, for + compatibility with Cherry profile keycaps. +* USB Type-C support in both A to C and C to C configurations. +* QMK support. +* A variety of split spacebar configurations, including split 6.25U + space and split 7U space. +* ESD protection circuitry, including data line protection and a + polyfuse on the VCC line. +* Support for per-switch LED backlighting. +* Fits in standard 60% keyboard cases. + +More info on the project, including all of the design files, can be found [here](https://github.com/jmdaly/CO60). + +Keyboard Maintainer: [jmdaly](https://github.com/jmdaly) +Hardware Supported: Supports the CO60 PCB rev1, rev6, rev7 +Hardware Availability: Through group buys. + +Make example for this keyboard (after setting up your build environment): + + make handwired/co60/rev7:default + +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). diff --git a/keyboards/handwired/co60/rev1/config.h b/keyboards/handwired/co60/rev1/config.h new file mode 100644 index 000000000..4d5140daf --- /dev/null +++ b/keyboards/handwired/co60/rev1/config.h @@ -0,0 +1,161 @@ +/* +Copyright 2018 John M Daly + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER John M Daly +#define PRODUCT CO60 +#define DESCRIPTION An open hardware sixty percent PCB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B2, B5, B4, D7, D6, B3, B0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +#ifdef __AVR__ +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#endif +#define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +// #define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION diff --git a/keyboards/handwired/co60/rev1/rev1.c b/keyboards/handwired/co60/rev1/rev1.c new file mode 100644 index 000000000..abdfa884d --- /dev/null +++ b/keyboards/handwired/co60/rev1/rev1.c @@ -0,0 +1,46 @@ +/* Copyright 2018 John M Daly + * + * 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 . + */ +#include "rev1.h" + +__attribute__ ((weak)) +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +__attribute__ ((weak)) +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/handwired/co60/rev1/rev1.h b/keyboards/handwired/co60/rev1/rev1.h new file mode 100644 index 000000000..3cf6a853f --- /dev/null +++ b/keyboards/handwired/co60/rev1/rev1.h @@ -0,0 +1,127 @@ +/* Copyright 2018 John M Daly + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The following is a layout that uses all available switch positions. +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K400, K401, K402, K404, K406, K408, K410, K411, K412, K413, K414 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { K400, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 }, \ +} + +#define LAYOUT_60_ansi( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ + K400, K401, K402, K406, K410, K411, K413, K414 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413, K414 }, \ +} + +#define LAYOUT_60_ansi_split_bs_rshift( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K400, K401, K402, K406, K410, K411, K413, K414 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413, K414 }, \ +} + +#define LAYOUT_60_iso( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ + K400, K401, K402, K406, K410, K411, K413, K414 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413, K414 }, \ +} + +#define LAYOUT_60_hhkb( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K401, K402, K406, K411, K413 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { KC_NO, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, KC_NO, K413, KC_NO }, \ +} + +#define LAYOUT_60_hhkb_split_space( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K401, K402, K404, K406, K408, K411, K413 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { KC_NO, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, KC_NO, K411, KC_NO, K413, KC_NO }, \ +} + +#define LAYOUT_60_hhkb_split_625u_space( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K401, K402, K404, K406, K408, K410, K411, K413 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { KC_NO, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, KC_NO, K413, KC_NO }, \ +} diff --git a/keyboards/handwired/co60/rev1/rules.mk b/keyboards/handwired/co60/rev1/rules.mk new file mode 100644 index 000000000..31ce6cbe4 --- /dev/null +++ b/keyboards/handwired/co60/rev1/rules.mk @@ -0,0 +1,70 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +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 = no # Console for debug(+400) +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 = yes # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +LEADER_ENABLE = yes # Turn on leader support + +# Layouts supported by this PCB: +LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift 60_hhkb diff --git a/keyboards/handwired/co60/rev6/chconf.h b/keyboards/handwired/co60/rev6/chconf.h new file mode 100644 index 000000000..1d9f12ff1 --- /dev/null +++ b/keyboards/handwired/co60/rev6/chconf.h @@ -0,0 +1,520 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 100000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM TRUE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY TRUE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE TRUE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP TRUE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS TRUE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK TRUE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/handwired/co60/rev6/config.h b/keyboards/handwired/co60/rev6/config.h new file mode 100644 index 000000000..b1ab99fd9 --- /dev/null +++ b/keyboards/handwired/co60/rev6/config.h @@ -0,0 +1,60 @@ +/* + * Copyright 2019 John M Daly + * + * 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 . + */ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER John M Daly +#define PRODUCT CO60 rev6 +#define DESCRIPTION An open hardware sixty percent PCB + +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here: + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFD800 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* ROWS: Top to bottom, COLS: Left to right +*/ +#define MATRIX_ROW_PINS { B0, B1, B2, A15, A10 } +#define MATRIX_COL_PINS { A2, A3, A6, B14, B15, A8, A9, A7, B3, B4, C14, C15, C13, B5, B6 } + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* Backlight configuration + * Backlight LEDs on B8 + */ +#define BACKLIGHT_LEVELS 24 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 diff --git a/keyboards/handwired/co60/rev6/halconf.h b/keyboards/handwired/co60/rev6/halconf.h new file mode 100644 index 000000000..5e5d70219 --- /dev/null +++ b/keyboards/handwired/co60/rev6/halconf.h @@ -0,0 +1,388 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC TRUE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT TRUE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the QSPI subsystem. + */ +#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__) +#define HAL_USE_QSPI FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB TRUE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 16 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/keyboards/handwired/co60/rev6/led.c b/keyboards/handwired/co60/rev6/led.c new file mode 100644 index 000000000..fe28ce2e8 --- /dev/null +++ b/keyboards/handwired/co60/rev6/led.c @@ -0,0 +1,240 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#include "hal.h" +#include "led_custom.h" +#include "rev6.h" +#include "printf.h" + +static void breathing_callback(PWMDriver *pwmp); + +static PWMConfig pwmCFG = { + 0xFFFF, /* PWM clock frequency */ + 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ + NULL, /* No Callback */ + { + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 3 */ + {PWM_OUTPUT_DISABLED, NULL} + }, + 0, /* HW dependent part.*/ + 0 +}; + +static PWMConfig pwmCFG_breathing = { + 0xFFFF, /* 10kHz PWM clock frequency */ + 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ + breathing_callback, /* Breathing Callback */ + { + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 3 */ + {PWM_OUTPUT_DISABLED, NULL} + }, + 0, /* HW dependent part.*/ + 0 +}; + +// See http://jared.geek.nz/2013/feb/linear-led-pwm +static uint16_t cie_lightness(uint16_t v) { + if (v <= 5243) // if below 8% of max + return v / 9; // same as dividing by 900% + else { + uint32_t y = (((uint32_t)v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare + // to get a useful result with integer division, we shift left in the expression above + // and revert what we've done again after squaring. + y = y * y * y >> 8; + if (y > 0xFFFFUL) // prevent overflow + return 0xFFFFU; + else + return (uint16_t)y; + } +} + +void backlight_init_ports(void) { + palSetPadMode(GPIOB, 8, PAL_MODE_ALTERNATE(2)); + pwmStart(&PWMD4, &pwmCFG); + if (kb_backlight_config.enable) { + if (kb_backlight_config.breathing) { + breathing_enable(); + } else { + backlight_set(kb_backlight_config.level); + } + } else { + backlight_set(0); + } +} + +void backlight_set(uint8_t level) { + uint32_t duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t)level / BACKLIGHT_LEVELS)); + if (level == 0) { + // Turn backlight off + // Disable channel 3 on PWM4 + pwmDisableChannel(&PWMD4, 2); + } else { + // Turn backlight on + if (!is_breathing()) { + // Enable channel 3 on PWM4 + pwmEnableChannel(&PWMD4, 2, PWM_FRACTION_TO_WIDTH(&PWMD4, 0xFFFF, duty)); + } + } +} + +uint8_t backlight_tick = 0; + +void backlight_task(void) { +} + +#define BREATHING_NO_HALT 0 +#define BREATHING_HALT_OFF 1 +#define BREATHING_HALT_ON 2 +#define BREATHING_STEPS 128 + +static uint8_t breathing_period = BREATHING_PERIOD; +static uint8_t breathing_halt = BREATHING_NO_HALT; +static uint16_t breathing_counter = 0; + +bool is_breathing(void) { + return PWMD4.config == &pwmCFG_breathing; +} + +#define breathing_min() do {breathing_counter = 0;} while (0) +#define breathing_max() do {breathing_counter = breathing_period * 256 / 2;} while (0) + + +void breathing_interrupt_enable(void){ + pwmStop(&PWMD4); + pwmStart(&PWMD4, &pwmCFG_breathing); + chSysLockFromISR(); + pwmEnablePeriodicNotification(&PWMD4); + pwmEnableChannelI( + &PWMD4, + 2, + PWM_FRACTION_TO_WIDTH( + &PWMD4, + 0xFFFF, + 0xFFFF + ) + ); + chSysUnlockFromISR(); +} + +void breathing_interrupt_disable(void){ + pwmStop(&PWMD4); + pwmStart(&PWMD4, &pwmCFG); +} + +void breathing_enable(void) +{ + breathing_counter = 0; + breathing_halt = BREATHING_NO_HALT; + breathing_interrupt_enable(); +} + +void breathing_pulse(void) +{ + if (kb_backlight_config.level == 0) + breathing_min(); + else + breathing_max(); + breathing_halt = BREATHING_HALT_ON; + breathing_interrupt_enable(); +} + +void breathing_disable(void) +{ + breathing_interrupt_disable(); + // Restore backlight level + backlight_set(kb_backlight_config.level); +} + +void breathing_self_disable(void) +{ + if (kb_backlight_config.level == 0) + breathing_halt = BREATHING_HALT_OFF; + else + breathing_halt = BREATHING_HALT_ON; +} + +void breathing_toggle(void) { + if (is_breathing()){ + breathing_disable(); + } else { + breathing_enable(); + } +} + +void breathing_period_set(uint8_t value) +{ + if (!value) + value = 1; + breathing_period = value; +} + +void breathing_period_default(void) { + breathing_period_set(BREATHING_PERIOD); +} + +void breathing_period_inc(void) +{ + breathing_period_set(breathing_period+1); +} + +void breathing_period_dec(void) +{ + breathing_period_set(breathing_period-1); +} + +/* To generate breathing curve in python: + * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] + */ +static const uint8_t breathing_table[BREATHING_STEPS] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +// Use this before the cie_lightness function. +static inline uint16_t scale_backlight(uint16_t v) { + return v / BACKLIGHT_LEVELS * kb_backlight_config.level; +} + +static void breathing_callback(PWMDriver *pwmp) +{ + (void)pwmp; + uint16_t interval = (uint16_t) breathing_period * 256 / BREATHING_STEPS; + // resetting after one period to prevent ugly reset at overflow. + breathing_counter = (breathing_counter + 1) % (breathing_period * 256); + uint8_t index = breathing_counter / interval % BREATHING_STEPS; + + if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || + ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) + { + breathing_interrupt_disable(); + } + + uint32_t duty = cie_lightness(scale_backlight(breathing_table[index] * 256)); + + chSysLockFromISR(); + pwmEnableChannelI( + &PWMD4, + 2, + PWM_FRACTION_TO_WIDTH( + &PWMD4, + 0xFFFF, + duty + ) + ); + chSysUnlockFromISR(); +} diff --git a/keyboards/handwired/co60/rev6/led_custom.h b/keyboards/handwired/co60/rev6/led_custom.h new file mode 100644 index 000000000..96c4d0c2b --- /dev/null +++ b/keyboards/handwired/co60/rev6/led_custom.h @@ -0,0 +1,22 @@ +/* + * Copyright 2019 John M Daly + * + * 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 . + */ + +#pragma once + +void backlight_task(void); +void breathing_interrupt_disable(void); +void breathing_interrupt_enable(void); diff --git a/keyboards/handwired/co60/rev6/mcuconf.h b/keyboards/handwired/co60/rev6/mcuconf.h new file mode 100644 index 000000000..69bf9185d --- /dev/null +++ b/keyboards/handwired/co60/rev6/mcuconf.h @@ -0,0 +1,257 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +/* + * STM32F3xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F3xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADC12PRES STM32_ADC12PRES_DIV1 +#define STM32_ADC34PRES STM32_ADC34PRES_DIV1 +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_USART2SW STM32_USART2SW_PCLK +#define STM32_USART3SW STM32_USART3SW_PCLK +#define STM32_UART4SW STM32_UART4SW_PCLK +#define STM32_UART5SW STM32_UART5SW_PCLK +#define STM32_I2C1SW STM32_I2C1SW_SYSCLK +#define STM32_I2C2SW STM32_I2C2SW_SYSCLK +#define STM32_TIM1SW STM32_TIM1SW_PCLK2 +#define STM32_TIM8SW STM32_TIM8SW_PCLK2 +#define STM32_RTCSEL STM32_RTCSEL_LSI +#define STM32_USB_CLOCK_REQUIRED TRUE +#define STM32_USBPRE STM32_USBPRE_DIV1P5 + +#undef STM32_HSE_BYPASS +// #error "oh no" +// #endif + +/* + * ADC driver system settings. + */ +#define STM32_ADC_DUAL_MODE FALSE +#define STM32_ADC_COMPACT_SAMPLES FALSE +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_USE_ADC2 FALSE +#define STM32_ADC_USE_ADC3 FALSE +#define STM32_ADC_USE_ADC4 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) +#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 1) +#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) +#define STM32_ADC_ADC4_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC2_DMA_PRIORITY 2 +#define STM32_ADC_ADC3_DMA_PRIORITY 2 +#define STM32_ADC_ADC4_DMA_PRIORITY 2 +#define STM32_ADC_ADC12_IRQ_PRIORITY 5 +#define STM32_ADC_ADC3_IRQ_PRIORITY 5 +#define STM32_ADC_ADC4_IRQ_PRIORITY 5 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC4_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC12_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 +#define STM32_ADC_ADC34_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * DAC driver system settings. + */ +#define STM32_DAC_DUAL_MODE FALSE +#define STM32_DAC_USE_DAC1_CH1 TRUE +#define STM32_DAC_USE_DAC1_CH2 TRUE +#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 +#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI20_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI33_IRQ_PRIORITY 6 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM4 FALSE +#define STM32_GPT_USE_TIM6 TRUE +#define STM32_GPT_USE_TIM7 TRUE +#define STM32_GPT_USE_TIM8 TRUE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM6_IRQ_PRIORITY 7 +#define STM32_GPT_TIM7_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 10 +#define STM32_I2C_I2C2_IRQ_PRIORITY 10 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_USE_TIM4 TRUE +#define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 7 +#define STM32_PWM_TIM2_IRQ_PRIORITY 7 +#define STM32_PWM_TIM3_IRQ_PRIORITY 7 +#define STM32_PWM_TIM4_IRQ_PRIORITY 7 +#define STM32_PWM_TIM8_IRQ_PRIORITY 7 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 TRUE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USE_USART3 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_HP_IRQ_PRIORITY 13 +#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +#endif /* MCUCONF_H */ diff --git a/keyboards/handwired/co60/rev6/rev6.c b/keyboards/handwired/co60/rev6/rev6.c new file mode 100644 index 000000000..f597513b1 --- /dev/null +++ b/keyboards/handwired/co60/rev6/rev6.c @@ -0,0 +1,39 @@ +/* Copyright 2019 John M Daly + * + * 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 . + */ +#include "rev6.h" + +#include "backlight.h" +#include "led.h" +#include "printf.h" + +backlight_levels_config_t kb_backlight_config = { + .enable = true, + .breathing = true, + .level = BACKLIGHT_LEVELS +}; + +uint8_t *o_fb; + +uint16_t counterst = 0; + +void matrix_init_kb(void) { + matrix_init_user(); + backlight_init_ports(); +} + +void matrix_scan_kb(void) { + matrix_scan_user(); +} diff --git a/keyboards/handwired/co60/rev6/rev6.h b/keyboards/handwired/co60/rev6/rev6.h new file mode 100644 index 000000000..7d11f19d3 --- /dev/null +++ b/keyboards/handwired/co60/rev6/rev6.h @@ -0,0 +1,146 @@ +/* Copyright 2019 John M Daly + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The following is a layout that uses all available switch positions. +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K400, K401, K402, K404, K406, K408, K410, K411, K412, K413, K414 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { K400, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 }, \ +} + +#define LAYOUT_60_ansi( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ + K400, K401, K402, K406, K410, K411, K413, K414 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413, K414 }, \ +} + +#define LAYOUT_60_ansi_split_bs_rshift( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K400, K401, K402, K406, K410, K411, K413, K414 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413, K414 }, \ +} + +#define LAYOUT_60_iso( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ + K400, K401, K402, K406, K410, K411, K413, K414 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413, K414 }, \ +} + +#define LAYOUT_60_hhkb( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K401, K402, K406, K411, K413 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { KC_NO, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, KC_NO, K413, KC_NO }, \ +} + +#define LAYOUT_60_hhkb_split_space( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K401, K402, K404, K406, K408, K411, K413 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { KC_NO, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, KC_NO, K411, KC_NO, K413, KC_NO }, \ +} + +#define LAYOUT_60_hhkb_split_625u_space( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K401, K402, K404, K406, K408, K410, K411, K413 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { KC_NO, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, KC_NO, K413, KC_NO }, \ +} + +// Backlighting +typedef union { + uint8_t raw; + struct { + bool enable :1; + bool breathing : 1; + uint8_t level :6; + }; +} backlight_levels_config_t; + +extern backlight_levels_config_t kb_backlight_config; +extern bool kb_backlight_breathing; + +void backlight_init_ports(void); +void backlight_set(uint8_t level); +bool is_breathing(void); +void breathing_enable(void); +void breathing_disable(void); diff --git a/keyboards/handwired/co60/rev6/rules.mk b/keyboards/handwired/co60/rev6/rules.mk new file mode 100644 index 000000000..dba41e12b --- /dev/null +++ b/keyboards/handwired/co60/rev6/rules.mk @@ -0,0 +1,59 @@ +# project specific files + +## chip/board settings +# - the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F3xx + +# Linker script to use +# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F303xC + +# Startup code to use +# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f3xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = GENERIC_STM32_F303XC + +# Cortex version +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 + +USE_FPU = yes + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -v 0483 -p df11 + +# Code for backlight breathing: +SRC += led.c + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = yes +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 = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 = no # Enable keyboard underlight functionality +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +LEADER_ENABLE = yes + +LAYOUTS += 60_ansi 60_ansi_split_bs_rshift 60_iso 60_hhkb diff --git a/keyboards/handwired/co60/rev7/chconf.h b/keyboards/handwired/co60/rev7/chconf.h new file mode 100644 index 000000000..1d9f12ff1 --- /dev/null +++ b/keyboards/handwired/co60/rev7/chconf.h @@ -0,0 +1,520 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 100000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM TRUE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY TRUE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE TRUE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP TRUE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS TRUE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK TRUE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/handwired/co60/rev7/config.h b/keyboards/handwired/co60/rev7/config.h new file mode 100644 index 000000000..1ccc12ad4 --- /dev/null +++ b/keyboards/handwired/co60/rev7/config.h @@ -0,0 +1,70 @@ +/* +Copyright 2019 John M Daly + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER John M Daly +#define PRODUCT CO60 rev7 +#define DESCRIPTION An open hardware sixty percent PCB + +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here: + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFD800 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* ROWS: Top to bottom, COLS: Left to right +*/ +#define MATRIX_ROW_PINS { A8, A2, B13, B2, B10 } +#define MATRIX_COL_PINS { A10, A9, A3, A4, A5, A6, B0, B1, A15, B3, B4, B5, C13, C14, C15 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* Backlight configuration + * Backlight LEDs on B8 + */ +#define BACKLIGHT_LEVELS 24 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 + +#define RGBLIGHT_ANIMATIONS + +#define RGBLED_NUM 16 +#define RGB_DI_PIN A7 +#define DRIVER_LED_TOTAL RGBLED_NUM + +#define RGB_MATRIX_KEYPRESSES diff --git a/keyboards/handwired/co60/rev7/halconf.h b/keyboards/handwired/co60/rev7/halconf.h new file mode 100644 index 000000000..5e5d70219 --- /dev/null +++ b/keyboards/handwired/co60/rev7/halconf.h @@ -0,0 +1,388 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC TRUE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT TRUE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the QSPI subsystem. + */ +#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__) +#define HAL_USE_QSPI FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB TRUE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 16 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/keyboards/handwired/co60/rev7/led.c b/keyboards/handwired/co60/rev7/led.c new file mode 100644 index 000000000..13f8d9860 --- /dev/null +++ b/keyboards/handwired/co60/rev7/led.c @@ -0,0 +1,242 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#include "hal.h" +#include "led_custom.h" +#include "rev7.h" +#include "printf.h" + +static void breathing_callback(PWMDriver *pwmp); + +static PWMConfig pwmCFG = { + 0xFFFF, /* PWM clock frequency */ + 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ + NULL, /* No Callback */ + { + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 3 */ + {PWM_OUTPUT_DISABLED, NULL} + }, + 0, /* HW dependent part.*/ + 0 +}; + +static PWMConfig pwmCFG_breathing = { + 0xFFFF, /* 10kHz PWM clock frequency */ + 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ + breathing_callback, /* Breathing Callback */ + { + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 3 */ + {PWM_OUTPUT_DISABLED, NULL} + }, + 0, /* HW dependent part.*/ + 0 +}; + +// See http://jared.geek.nz/2013/feb/linear-led-pwm +static uint16_t cie_lightness(uint16_t v) { + if (v <= 5243) // if below 8% of max + return v / 9; // same as dividing by 900% + else { + uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare + // to get a useful result with integer division, we shift left in the expression above + // and revert what we've done again after squaring. + y = y * y * y >> 8; + if (y > 0xFFFFUL) // prevent overflow + return 0xFFFFU; + else + return (uint16_t) y; + } +} + + +void backlight_init_ports(void) { + palSetPadMode(GPIOB, 8, PAL_MODE_ALTERNATE(2)); + pwmStart(&PWMD4, &pwmCFG); + if(kb_backlight_config.enable){ + if(kb_backlight_config.breathing){ + breathing_enable(); + } else{ + backlight_set(kb_backlight_config.level); + } + } else { + backlight_set(0); + } +} + +void backlight_set(uint8_t level) { + uint32_t duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t) level / BACKLIGHT_LEVELS)); + if (level == 0) { + // Turn backlight off + // Disable channel 3 on PWM4 + pwmDisableChannel(&PWMD4, 2); + } else { + // Turn backlight on + if(!is_breathing()){ + // Enable channel 3 on PWM4 + pwmEnableChannel(&PWMD4, 2, PWM_FRACTION_TO_WIDTH(&PWMD4,0xFFFF,duty)); + } + } +} + + +uint8_t backlight_tick = 0; + +void backlight_task(void) { +} + +#define BREATHING_NO_HALT 0 +#define BREATHING_HALT_OFF 1 +#define BREATHING_HALT_ON 2 +#define BREATHING_STEPS 128 + +static uint8_t breathing_period = BREATHING_PERIOD; +static uint8_t breathing_halt = BREATHING_NO_HALT; +static uint16_t breathing_counter = 0; + +bool is_breathing(void) { + return PWMD4.config == &pwmCFG_breathing; +} + +#define breathing_min() do {breathing_counter = 0;} while (0) +#define breathing_max() do {breathing_counter = breathing_period * 256 / 2;} while (0) + + +void breathing_interrupt_enable(void){ + pwmStop(&PWMD4); + pwmStart(&PWMD4, &pwmCFG_breathing); + chSysLockFromISR(); + pwmEnablePeriodicNotification(&PWMD4); + pwmEnableChannelI( + &PWMD4, + 2, + PWM_FRACTION_TO_WIDTH( + &PWMD4, + 0xFFFF, + 0xFFFF + ) + ); + chSysUnlockFromISR(); +} + +void breathing_interrupt_disable(void){ + pwmStop(&PWMD4); + pwmStart(&PWMD4, &pwmCFG); +} + +void breathing_enable(void) +{ + breathing_counter = 0; + breathing_halt = BREATHING_NO_HALT; + breathing_interrupt_enable(); +} + +void breathing_pulse(void) +{ + if (kb_backlight_config.level == 0) + breathing_min(); + else + breathing_max(); + breathing_halt = BREATHING_HALT_ON; + breathing_interrupt_enable(); +} + +void breathing_disable(void) +{ + breathing_interrupt_disable(); + // Restore backlight level + backlight_set(kb_backlight_config.level); +} + +void breathing_self_disable(void) +{ + if (kb_backlight_config.level == 0) + breathing_halt = BREATHING_HALT_OFF; + else + breathing_halt = BREATHING_HALT_ON; +} + +void breathing_toggle(void) { + if (is_breathing()){ + breathing_disable(); + } else { + breathing_enable(); + } +} + +void breathing_period_set(uint8_t value) +{ + if (!value) + value = 1; + breathing_period = value; +} + +void breathing_period_default(void) { + breathing_period_set(BREATHING_PERIOD); +} + +void breathing_period_inc(void) +{ + breathing_period_set(breathing_period+1); +} + +void breathing_period_dec(void) +{ + breathing_period_set(breathing_period-1); +} + +/* To generate breathing curve in python: + * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] + */ +static const uint8_t breathing_table[BREATHING_STEPS] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +// Use this before the cie_lightness function. +static inline uint16_t scale_backlight(uint16_t v) { + return v / BACKLIGHT_LEVELS * kb_backlight_config.level; +} + +static void breathing_callback(PWMDriver *pwmp) +{ + (void)pwmp; + uint16_t interval = (uint16_t) breathing_period * 256 / BREATHING_STEPS; + // resetting after one period to prevent ugly reset at overflow. + breathing_counter = (breathing_counter + 1) % (breathing_period * 256); + uint8_t index = breathing_counter / interval % BREATHING_STEPS; + + if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || + ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) + { + breathing_interrupt_disable(); + } + + uint32_t duty = cie_lightness(scale_backlight(breathing_table[index] * 256)); + + chSysLockFromISR(); + pwmEnableChannelI( + &PWMD4, + 2, + PWM_FRACTION_TO_WIDTH( + &PWMD4, + 0xFFFF, + duty + ) + ); + chSysUnlockFromISR(); +} diff --git a/keyboards/handwired/co60/rev7/led_custom.h b/keyboards/handwired/co60/rev7/led_custom.h new file mode 100644 index 000000000..56e723db8 --- /dev/null +++ b/keyboards/handwired/co60/rev7/led_custom.h @@ -0,0 +1,22 @@ +/* +Copyright 2019 John M Daly + +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 . +*/ + +#pragma once + +void backlight_task(void); +void breathing_interrupt_disable(void); +void breathing_interrupt_enable(void); diff --git a/keyboards/handwired/co60/rev7/mcuconf.h b/keyboards/handwired/co60/rev7/mcuconf.h new file mode 100644 index 000000000..69bf9185d --- /dev/null +++ b/keyboards/handwired/co60/rev7/mcuconf.h @@ -0,0 +1,257 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +/* + * STM32F3xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F3xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADC12PRES STM32_ADC12PRES_DIV1 +#define STM32_ADC34PRES STM32_ADC34PRES_DIV1 +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_USART2SW STM32_USART2SW_PCLK +#define STM32_USART3SW STM32_USART3SW_PCLK +#define STM32_UART4SW STM32_UART4SW_PCLK +#define STM32_UART5SW STM32_UART5SW_PCLK +#define STM32_I2C1SW STM32_I2C1SW_SYSCLK +#define STM32_I2C2SW STM32_I2C2SW_SYSCLK +#define STM32_TIM1SW STM32_TIM1SW_PCLK2 +#define STM32_TIM8SW STM32_TIM8SW_PCLK2 +#define STM32_RTCSEL STM32_RTCSEL_LSI +#define STM32_USB_CLOCK_REQUIRED TRUE +#define STM32_USBPRE STM32_USBPRE_DIV1P5 + +#undef STM32_HSE_BYPASS +// #error "oh no" +// #endif + +/* + * ADC driver system settings. + */ +#define STM32_ADC_DUAL_MODE FALSE +#define STM32_ADC_COMPACT_SAMPLES FALSE +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_USE_ADC2 FALSE +#define STM32_ADC_USE_ADC3 FALSE +#define STM32_ADC_USE_ADC4 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) +#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 1) +#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) +#define STM32_ADC_ADC4_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC2_DMA_PRIORITY 2 +#define STM32_ADC_ADC3_DMA_PRIORITY 2 +#define STM32_ADC_ADC4_DMA_PRIORITY 2 +#define STM32_ADC_ADC12_IRQ_PRIORITY 5 +#define STM32_ADC_ADC3_IRQ_PRIORITY 5 +#define STM32_ADC_ADC4_IRQ_PRIORITY 5 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC4_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC12_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 +#define STM32_ADC_ADC34_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * DAC driver system settings. + */ +#define STM32_DAC_DUAL_MODE FALSE +#define STM32_DAC_USE_DAC1_CH1 TRUE +#define STM32_DAC_USE_DAC1_CH2 TRUE +#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 +#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI20_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI33_IRQ_PRIORITY 6 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM4 FALSE +#define STM32_GPT_USE_TIM6 TRUE +#define STM32_GPT_USE_TIM7 TRUE +#define STM32_GPT_USE_TIM8 TRUE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM6_IRQ_PRIORITY 7 +#define STM32_GPT_TIM7_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 10 +#define STM32_I2C_I2C2_IRQ_PRIORITY 10 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_USE_TIM4 TRUE +#define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 7 +#define STM32_PWM_TIM2_IRQ_PRIORITY 7 +#define STM32_PWM_TIM3_IRQ_PRIORITY 7 +#define STM32_PWM_TIM4_IRQ_PRIORITY 7 +#define STM32_PWM_TIM8_IRQ_PRIORITY 7 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 TRUE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USE_USART3 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_HP_IRQ_PRIORITY 13 +#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +#endif /* MCUCONF_H */ diff --git a/keyboards/handwired/co60/rev7/rev7.c b/keyboards/handwired/co60/rev7/rev7.c new file mode 100644 index 000000000..3d0964d89 --- /dev/null +++ b/keyboards/handwired/co60/rev7/rev7.c @@ -0,0 +1,39 @@ +/* Copyright 2019 John M Daly + * + * 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 . + */ +#include "rev7.h" + +#include "backlight.h" +#include "led.h" +#include "printf.h" + +backlight_levels_config_t kb_backlight_config = { + .enable = true, + .breathing = true, + .level = BACKLIGHT_LEVELS +}; + +uint8_t *o_fb; + +uint16_t counterst = 0; + +void matrix_init_kb(void) { + matrix_init_user(); + backlight_init_ports(); +} + +void matrix_scan_kb(void) { + matrix_scan_user(); +} diff --git a/keyboards/handwired/co60/rev7/rev7.h b/keyboards/handwired/co60/rev7/rev7.h new file mode 100644 index 000000000..4ab2b8d72 --- /dev/null +++ b/keyboards/handwired/co60/rev7/rev7.h @@ -0,0 +1,146 @@ +/* Copyright 2019 Jack Humbert + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The following is a layout that uses all available switch positions. +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K400, K401, K402, K404, K406, K408, K410, K411, K412, K413, K414 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { K400, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 }, \ +} + +#define LAYOUT_60_ansi( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ + K400, K401, K402, K406, K410, K411, K413, K414 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413, K414 }, \ +} + +#define LAYOUT_60_ansi_split_bs_rshift( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K400, K401, K402, K406, K410, K411, K413, K414 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413, K414 }, \ +} + +#define LAYOUT_60_iso( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ + K400, K401, K402, K406, K410, K411, K413, K414 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413, K414 }, \ +} + +#define LAYOUT_60_hhkb( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K401, K402, K406, K411, K413 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { KC_NO, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, KC_NO, K413, KC_NO }, \ +} + +#define LAYOUT_60_hhkb_split_space( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K401, K402, K404, K406, K408, K411, K413 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { KC_NO, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, KC_NO, K411, KC_NO, K413, KC_NO }, \ +} + +#define LAYOUT_60_hhkb_split_625u_space( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K401, K402, K404, K406, K408, K410, K411, K413 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { KC_NO, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, KC_NO, K413, KC_NO }, \ +} + +// Backlighting +typedef union { + uint8_t raw; + struct { + bool enable :1; + bool breathing : 1; + uint8_t level :6; + }; +} backlight_levels_config_t; + +extern backlight_levels_config_t kb_backlight_config; +extern bool kb_backlight_breathing; + +void backlight_init_ports(void); +void backlight_set(uint8_t level); +bool is_breathing(void); +void breathing_enable(void); +void breathing_disable(void); diff --git a/keyboards/handwired/co60/rev7/rules.mk b/keyboards/handwired/co60/rev7/rules.mk new file mode 100644 index 000000000..6e0b3856a --- /dev/null +++ b/keyboards/handwired/co60/rev7/rules.mk @@ -0,0 +1,59 @@ +# project specific files + +## chip/board settings +# - the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F3xx + +# Linker script to use +# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F303xC + +# Startup code to use +# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f3xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = GENERIC_STM32_F303XC + +# Cortex version +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 + +USE_FPU = yes + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -v 0483 -p df11 + +# Code for backlight breathing: +SRC += led.c + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = yes +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 = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 = no # Enable keyboard underlight functionality +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +LEADER_ENABLE = yes + +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso 60_hhkb From 4f788c2ae90583f64e0cec6545a3da75a5aff0f8 Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Sat, 1 Jun 2019 16:39:31 -0500 Subject: [PATCH 164/341] [Keymap] Xulkal user changes (#6044) * Xulkal user changes Xulkal user changes * Reduce code duplication * Massive user code refactor --- .../massdrop/ctrl/keymaps/xulkal/keymap.c | 76 +++++++-------- keyboards/rgbkb/sol/keymaps/xulkal/keymap.c | 93 +----------------- .../rgbkb/zygomorph/keymaps/xulkal/config.h | 25 ----- .../rgbkb/zygomorph/keymaps/xulkal/keymap.c | 18 ---- users/xulkal/custom_encoder.c | 13 +++ users/xulkal/custom_encoder.h | 2 + users/xulkal/custom_keycodes.h | 28 ++++++ users/xulkal/custom_oled.c | 96 +++++++++++++++++++ users/xulkal/custom_oled.h | 2 + users/xulkal/custom_tap_dance.c | 61 ++++++++++++ users/xulkal/custom_tap_dance.h | 26 +++++ users/xulkal/layouts.h | 4 +- users/xulkal/process_records.c | 78 +++++++-------- users/xulkal/process_records.h | 44 +-------- users/xulkal/rules.mk | 7 +- users/xulkal/timer_utils.c | 12 +++ users/xulkal/timer_utils.h | 6 ++ users/xulkal/xulkal.h | 3 + 18 files changed, 334 insertions(+), 260 deletions(-) delete mode 100644 keyboards/rgbkb/zygomorph/keymaps/xulkal/config.h create mode 100644 users/xulkal/custom_encoder.c create mode 100644 users/xulkal/custom_encoder.h create mode 100644 users/xulkal/custom_keycodes.h create mode 100644 users/xulkal/custom_oled.c create mode 100644 users/xulkal/custom_oled.h create mode 100644 users/xulkal/custom_tap_dance.c create mode 100644 users/xulkal/custom_tap_dance.h create mode 100644 users/xulkal/timer_utils.c create mode 100644 users/xulkal/timer_utils.h diff --git a/keyboards/massdrop/ctrl/keymaps/xulkal/keymap.c b/keyboards/massdrop/ctrl/keymaps/xulkal/keymap.c index 1e50b4a53..8b45b53ec 100644 --- a/keyboards/massdrop/ctrl/keymaps/xulkal/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/xulkal/keymap.c @@ -13,23 +13,35 @@ enum ctrl_keycodes { #define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode -keymap_config_t keymap_config; +#define EXPAND_LAYOUT(...) LAYOUT(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, \ + [_QWERTY] = LAYOUT( + KC_GESC, 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_PSCR, KC_SLCK, KC_PAUS, \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, TD_BSPC, KC_INS, KC_HOME, 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, TD_DEL, KC_END, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, TD_COMM, TD_DOT, KC_SLSH, KC_RSPC, KC_UP, \ + KC_LCPO, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LOWER, KC_APP, KC_RCPC, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + +#ifndef GAMELAYER_DISABLE + [_GAME] = LAYOUT( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, \ + KC_GRV, 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_INS, KC_HOME, 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_DEL, KC_END, KC_PGDN, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, TD_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, \ - KC_LCPO, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCPC, KC_LEFT, KC_DOWN, KC_RGHT \ + 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_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LOWER, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ ), - [1] = LAYOUT( +#endif + + [_LOWER] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \ - _______, RGB_RMOD, RGB_MOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \ - RGB_SPI, RGB_SAI, RGB_VAI, RGB_HUI, MD_BOOT, _______, _______, U_T_AUTO,U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ - RGB_SPD, RGB_SAD, RGB_VAD, RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, RGB_TOG, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \ + _______, RGB_RMOD,RGB_MOD, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \ + RGB_SPI, RGB_SAI, RGB_VAI, RGB_HUI, MD_BOOT, QWERTY, _______, U_T_AUTO,U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ + RGB_SPD, RGB_SAD, RGB_VAD, RGB_HUD, RGBRST, GAME, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), /* @@ -44,62 +56,46 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { -}; - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { -}; - #define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) #define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) #define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - static uint32_t key_timer; +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) +{ + static uint16_t reset_timer; switch (keycode) { case U_T_AUTO: - if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode"); - } return false; case U_T_AGCR: - if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); - } return false; case DBG_TOG: - if (record->event.pressed) { + if (record->event.pressed) TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); - } return false; case DBG_MTRX: - if (record->event.pressed) { + if (record->event.pressed) TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix"); - } return false; case DBG_KBD: - if (record->event.pressed) { + if (record->event.pressed) TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard"); - } return false; case DBG_MOU: - if (record->event.pressed) { + if (record->event.pressed) TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse"); - } return false; case MD_BOOT: - if (record->event.pressed) { - key_timer = timer_read32(); - } else { - if (timer_elapsed32(key_timer) >= 500) { + if (record->event.pressed) + reset_timer = timer_read() + 500; + else if (timer_expired(reset_timer)) reset_keyboard(); - } - } return false; - default: - return true; //Process all other keycodes normally } + + return true; } diff --git a/keyboards/rgbkb/sol/keymaps/xulkal/keymap.c b/keyboards/rgbkb/sol/keymaps/xulkal/keymap.c index 5c560abad..09c27428e 100644 --- a/keyboards/rgbkb/sol/keymaps/xulkal/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/xulkal/keymap.c @@ -6,10 +6,6 @@ #include "split_util.h" #endif -#ifdef OLED_DRIVER_ENABLE - #include "oled_driver.h" -#endif - #define EXPAND_LAYOUT(...) LAYOUT(__VA_ARGS__) // Define your non-alpha grouping in this define's LAYOUT, and all your BASE_LAYERS will share the same mod/macro columns @@ -36,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _________________QWERTY_L3_________________, KC_GRV, KC_QUOT, _________________QWERTY_R3_________________, \ _________________QWERTY_L4_________________, RGB_TOG, RGBRST, _________________QWERTY_R4_________________, \ _________________QWERTY_L5_________________, RGB_RMOD, RGB_MOD, _________________QWERTY_R5_________________, \ - KC_SPC, KC_DEL, KC_ENT, KC_SPC \ + KC_SPC, TD_DEL, KC_ENT, KC_SPC \ ), #ifndef GAMELAYER_DISABLE @@ -79,90 +75,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), #endif }; - -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef OLED_DRIVER_ENABLE - -static void render_logo(void) { - static const char PROGMEM sol_logo[] = { - 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, - 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, - 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; - - oled_write_P(sol_logo, false); -} - - -static void render_status(void) { - // Render to mode icon - static const char PROGMEM mode_logo[2][3] = { - {0x97,0x98,0}, - {0xb7,0xb8,0} }; - - oled_write_P(mode_logo[0], false); - -#if defined(RGB_MATRIX_ENABLE) - static char buffer[20] = {0}; - snprintf(buffer, sizeof(buffer), " h%3d s%3d v%3d\n", rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val); - oled_write(buffer, false); -#endif - - oled_write_P(mode_logo[1], false); - -#if defined(RGB_MATRIX_ENABLE) - snprintf(buffer, sizeof(buffer), " s%3d m%3d\n", rgb_matrix_config.speed, rgb_matrix_config.mode); - oled_write(buffer, false); -#endif - - // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below - oled_write_P(PSTR("Layer: "), false); - switch (biton32(layer_state)) { - case _QWERTY: -#ifndef GAMELAYER_DISABLE - switch (biton32(default_layer_state)) { - case _QWERTY: - oled_write_P(PSTR("Default\n"), false); - break; - case _GAME: - oled_write_P(PSTR("Game\n"), false); - break; - default: - oled_write_P(PSTR("Undefined\n"), false); - break; - } -#else - oled_write_P(PSTR("Default\n"), false); -#endif - break; - case _LOWER: - oled_write_P(PSTR("Lower\n"), false); - break; - case _RAISE: - oled_write_P(PSTR("Raise\n"), false); - break; -#ifdef TRILAYER_ENABLED - case _ADJUST: - oled_write_P(PSTR("Adjust\n"), false); - break; -#endif - default: - oled_write_P(PSTR("Undefined\n"), false); - } - - // Host Keyboard LED Status - uint8_t led_usb_state = host_keyboard_leds(); - oled_write_P(led_usb_state & (1< -Copyright 2015 Jack Humbert - -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 . -*/ - -#pragma once - - -// place overrides here - diff --git a/keyboards/rgbkb/zygomorph/keymaps/xulkal/keymap.c b/keyboards/rgbkb/zygomorph/keymaps/xulkal/keymap.c index f886cb454..70155e1cd 100644 --- a/keyboards/rgbkb/zygomorph/keymaps/xulkal/keymap.c +++ b/keyboards/rgbkb/zygomorph/keymaps/xulkal/keymap.c @@ -67,21 +67,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), #endif }; - -#ifdef ENCODER_ENABLE -void encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { /* First encoder */ - if (clockwise) { - tap_code(KC_PGDN); - } else { - tap_code(KC_PGUP); - } - } else if (index == 1) { /* Second encoder from slave */ - if (clockwise) { - tap_code(KC_UP); - } else { - tap_code(KC_DOWN); - } - } -} -#endif diff --git a/users/xulkal/custom_encoder.c b/users/xulkal/custom_encoder.c new file mode 100644 index 000000000..09f1cda0d --- /dev/null +++ b/users/xulkal/custom_encoder.c @@ -0,0 +1,13 @@ +#include "custom_encoder.h" + +#ifdef ENCODER_ENABLE +const uint16_t PROGMEM encoders[][2] = { + { KC_PGUP, KC_PGDN }, + { KC_DOWN, KC_UP } +} + +void encoder_update_user(uint8_t index, bool clockwise) +{ + tap_code16(pgm_read_word(&encoders[index][clockwise])); +} +#endif diff --git a/users/xulkal/custom_encoder.h b/users/xulkal/custom_encoder.h new file mode 100644 index 000000000..010d4b138 --- /dev/null +++ b/users/xulkal/custom_encoder.h @@ -0,0 +1,2 @@ +#pragma once +#include "quantum.h" diff --git a/users/xulkal/custom_keycodes.h b/users/xulkal/custom_keycodes.h new file mode 100644 index 000000000..d4ae0bd47 --- /dev/null +++ b/users/xulkal/custom_keycodes.h @@ -0,0 +1,28 @@ +#pragma once + +enum custom_keycodes { + RGBRST = SAFE_RANGE, +#ifndef TAP_DANCE_ENABLE + TD_MIN, + TD_COMM = TD_MIN, + TD_BSPC, + TD_DEL, + TD_DOT, + TD_MAX, +#endif + KEYMAP_SAFE_RANGE +}; + +#define RIS_ESC LT(_RAISE, KC_ESC) +#define RIS_CAPS LT(_RAISE, KC_CAPS) + +#define QWERTY DF(_QWERTY) + +#ifndef GAMELAYER_DISABLE +#define GAME DF(_GAME) +#else +#define GAME KC_TRANSPARENT +#endif + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) diff --git a/users/xulkal/custom_oled.c b/users/xulkal/custom_oled.c new file mode 100644 index 000000000..77e580b95 --- /dev/null +++ b/users/xulkal/custom_oled.c @@ -0,0 +1,96 @@ +#include "custom_oled.h" +#include "process_records.h" + +#include + +#ifdef OLED_DRIVER_ENABLE + +static void render_logo(void) +{ + static const char PROGMEM sol_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + oled_write_P(sol_logo, false); +} + +static void render_status(void) +{ + // Render to mode icon + static const char PROGMEM mode_logo[2][3] = { + {0x97,0x98,0}, + {0xb7,0xb8,0} + }; + + oled_write_P(mode_logo[0], false); + +#if defined(RGB_MATRIX_ENABLE) + static char buffer[20] = {0}; + snprintf(buffer, sizeof(buffer), " h%3d s%3d v%3d\n", rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val); + oled_write(buffer, false); +#endif + + oled_write_P(mode_logo[1], false); + +#if defined(RGB_MATRIX_ENABLE) + snprintf(buffer, sizeof(buffer), " s%3d m%3d\n", rgb_matrix_config.speed, rgb_matrix_config.mode); + oled_write(buffer, false); +#endif + + // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below + oled_write_P(PSTR("Layer: "), false); + switch (biton32(layer_state)) + { + case _QWERTY: +#ifndef GAMELAYER_DISABLE + switch (biton32(default_layer_state)) + { + case _QWERTY: + oled_write_P(PSTR("Default\n"), false); + break; + case _GAME: + oled_write_P(PSTR("Game\n"), false); + break; + default: + oled_write_P(PSTR("Undefined\n"), false); + break; + } +#else + oled_write_P(PSTR("Default\n"), false); +#endif + break; + case _LOWER: + oled_write_P(PSTR("Lower\n"), false); + break; + case _RAISE: + oled_write_P(PSTR("Raise\n"), false); + break; +#ifdef TRILAYER_ENABLED + case _ADJUST: + oled_write_P(PSTR("Adjust\n"), false); + break; +#endif + default: + oled_write_P(PSTR("Undefined\n"), false); + break; + } + + // Host Keyboard LED Status + uint8_t led_usb_state = host_keyboard_leds(); + oled_write_P(led_usb_state & (1<event.pressed) + { + if (td_keycode != keycode || timer_expired(td_timer)) + { + td_keycode = keycode; + td_timer = timer_read() + TAPPING_TERM; + } + else + run_tap_dance_double(1); + } + return false; + } + + if (td_keycode != KC_TRANSPARENT) + run_tap_dance_double(0); + return true; +} + +void matrix_scan_user(void) +{ + if (td_keycode != KC_TRANSPARENT && timer_expired(td_timer)) + run_tap_dance_double(0); +} + +#endif diff --git a/users/xulkal/custom_tap_dance.h b/users/xulkal/custom_tap_dance.h new file mode 100644 index 000000000..33398808d --- /dev/null +++ b/users/xulkal/custom_tap_dance.h @@ -0,0 +1,26 @@ +#pragma once +#include "quantum.h" + +#ifdef TAP_DANCE_ENABLE + +#include "process_tap_dance.h" + +//Tap Dance Declarations +enum { + COMM_QUOT = 0, + BACKSPACE, + DELETE, + DOT +}; + +#define TD_COMM TD(COMM_QUOT) +#define TD_BSPC TD(BACKSPACE) +#define TD_DEL TD(DELETE) +#define TD_DOT TD(DOT) + +#else + +void run_tap_dance_double(uint8_t i); +bool process_tap_dance_double(uint16_t keycode, keyrecord_t *record); + +#endif diff --git a/users/xulkal/layouts.h b/users/xulkal/layouts.h index 5180992a8..65dad8c63 100644 --- a/users/xulkal/layouts.h +++ b/users/xulkal/layouts.h @@ -15,7 +15,7 @@ */ #define _________________QWERTY_L1_________________ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5 -#define _________________QWERTY_L2_________________ TD_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T +#define _________________QWERTY_L2_________________ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T #define _________________QWERTY_L3_________________ RIS_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G #define _________________QWERTY_L4_________________ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B #define _________________QWERTY_L5_________________ KC_LCPO, KC_LGUI, LOWER, RAISE, KC_LALT, KC_SPC @@ -23,7 +23,7 @@ #define _________________QWERTY_R1_________________ KC_6, KC_7, KC_8, KC_9, KC_0, TD_BSPC #define _________________QWERTY_R2_________________ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS #define _________________QWERTY_R3_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT -#define _________________QWERTY_R4_________________ KC_N, KC_M, TD_COMM, KC_DOT, KC_SLASH, KC_RSPC +#define _________________QWERTY_R4_________________ KC_N, KC_M, TD_COMM, TD_DOT, KC_SLASH, KC_RSPC #define _________________QWERTY_R5_________________ KC_SPC, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, KC_RCPC diff --git a/users/xulkal/process_records.c b/users/xulkal/process_records.c index 5ba59965f..115623caa 100644 --- a/users/xulkal/process_records.c +++ b/users/xulkal/process_records.c @@ -1,56 +1,58 @@ #include "process_records.h" - -#ifdef TAP_DANCE_ENABLE -//Tap Dance Definitions -qk_tap_dance_action_t tap_dance_actions[] = { - [COMM_QUOT] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_QUOT), - [BACKSPACE] = ACTION_TAP_DANCE_DOUBLE (KC_BSPACE, LCTL(KC_BSPACE)), - [TAP_TAB] = ACTION_TAP_DANCE_DOUBLE (KC_TAB, LSFT(KC_TAB)), - [CTRL_MINUS] = ACTION_TAP_DANCE_DOUBLE (KC_LCTL, KC_MINS), - [CTRL_PLUS] = ACTION_TAP_DANCE_DOUBLE (KC_RCTL, KC_EQL) -}; -#endif +#include "custom_keycodes.h" +#include "timer_utils.h" #if defined(RGB_MATRIX_ENABLE) extern void eeconfig_update_rgb_matrix_default(void); #endif #ifdef TRILAYER_ENABLED -uint32_t layer_state_set_user(uint32_t state) { - return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +uint32_t layer_state_set_user(uint32_t state) +{ + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } #endif -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - static uint16_t reset_timer; - switch (keycode) { - case RGBRST: -#if defined(RGBLIGHT_ENABLE) - if (record->event.pressed) { - eeconfig_update_rgblight_default(); - rgblight_enable(); - } -#elif defined(RGB_MATRIX_ENABLE) - if (record->event.pressed) { - eeconfig_update_rgb_matrix_default(); - } +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + static uint16_t reset_timer; + +#ifndef TAP_DANCE_ENABLE + if (!process_tap_dance_double(keycode, record)) + return false; #endif - return false; - case RESET: - if (record->event.pressed) { - reset_timer = timer_read(); - } else { - if (timer_elapsed(reset_timer) >= 500) { - reset_keyboard(); - } - } - return false; + + switch (keycode) + { + case RGBRST: + { +#if defined(RGBLIGHT_ENABLE) + if (record->event.pressed) + { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } +#elif defined(RGB_MATRIX_ENABLE) + if (record->event.pressed) + eeconfig_update_rgb_matrix_default(); +#endif + } + return false; + case RESET: + { + if (record->event.pressed) + reset_timer = timer_read() + 500; + else if (timer_expired(reset_timer)) + reset_keyboard(); + } + return false; } return process_record_keymap(keycode, record); } __attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) +{ + return true; } diff --git a/users/xulkal/process_records.h b/users/xulkal/process_records.h index 8a195df5c..701ef7e74 100644 --- a/users/xulkal/process_records.h +++ b/users/xulkal/process_records.h @@ -1,44 +1,6 @@ #pragma once #include "quantum.h" - -#define RIS_ESC LT(_RAISE, KC_ESC) -#define RIS_CAPS LT(_RAISE, KC_CAPS) - -#define QWERTY DF(_QWERTY) - -#ifndef GAMELAYER_DISABLE -#define GAME DF(_GAME) -#else -#define GAME KC_TRANSPARENT -#endif - -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) - -#ifdef TAP_DANCE_ENABLE -#include "process_tap_dance.h" - -//Tap Dance Declarations -enum { - COMM_QUOT = 0, - BACKSPACE, - TAP_TAB, - CTRL_MINUS, - CTRL_PLUS -}; - -#define TD_COMM TD(COMM_QUOT) -#define TD_BSPC TD(BACKSPACE) -#define TD_TAB TD(TAP_TAB) -#define TD_LCTL TD(CTRL_MINUS) -#define TD_RCTL TD(CTRL_PLUS) -#else -#define TD_COMM KC_COMM -#define TD_BSPC KC_BSPACE -#define TD_TAB KC_TAB -#define TD_LCTL KC_LCTL -#define TD_RCTL KC_RCTL -#endif +#include "custom_tap_dance.h" enum layer_number { _QWERTY = 0, @@ -52,8 +14,4 @@ enum layer_number { #endif }; -enum custom_keycodes { - RGBRST = SAFE_RANGE -}; - bool process_record_keymap(uint16_t keycode, keyrecord_t *record); diff --git a/users/xulkal/rules.mk b/users/xulkal/rules.mk index 6758f52f5..50dc75d61 100644 --- a/users/xulkal/rules.mk +++ b/users/xulkal/rules.mk @@ -1,10 +1,13 @@ SRC += xulkal.c \ - process_records.c + process_records.c \ + custom_tap_dance.c \ + custom_encoder.c \ + custom_oled.c \ + timer_utils.c # Some usual defaults MOUSEKEY_ENABLE = no # Mouse keys (+4700) EXTRAKEY_ENABLE = yes # Audio control and System control (+450) -TAP_DANCE_ENABLE = yes # Enable the tap dance feature. (+1100) ifneq ($(strip $(DISABLE_LTO)), yes) EXTRAFLAGS += -flto diff --git a/users/xulkal/timer_utils.c b/users/xulkal/timer_utils.c new file mode 100644 index 000000000..5f5d9a1eb --- /dev/null +++ b/users/xulkal/timer_utils.c @@ -0,0 +1,12 @@ +#include "timer_utils.h" + +bool timer_expired(uint16_t last) +{ + return timer_read() - last < 0x8000; +} + +bool timer_expired32(uint32_t last) +{ + return timer_read32() - last < 0x80000000; +} + diff --git a/users/xulkal/timer_utils.h b/users/xulkal/timer_utils.h new file mode 100644 index 000000000..7e2a0b74d --- /dev/null +++ b/users/xulkal/timer_utils.h @@ -0,0 +1,6 @@ +#pragma once +#include "timer.h" +#include + +bool timer_expired(uint16_t last); +bool timer_expired32(uint32_t last); diff --git a/users/xulkal/xulkal.h b/users/xulkal/xulkal.h index ae7359923..9bc83b7de 100644 --- a/users/xulkal/xulkal.h +++ b/users/xulkal/xulkal.h @@ -2,3 +2,6 @@ #include "process_records.h" #include "layouts.h" +#include "timer_utils.h" +#include "custom_keycodes.h" +#include "custom_tap_dance.h" From 155be34a1d2b782a73318cc507315b33cc86cc49 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sun, 2 Jun 2019 09:04:09 +1000 Subject: [PATCH 165/341] Parameterise STM32 I2C pin modes and timing parameters. (#5671) I2C timing parameters were seemingly set up for an STM32F303 target MCU, at a specific clock speed. This commit allows specifying the timing parameters via config.h, allowing other STM32 MCUs to be targeted, potentially at different clock frequencies. Alternate function modes for the I2C pins are now also configurable, allowing for remapping to other pins. --- docs/i2c_driver.md | 29 ++++++++++++++++++++++++----- drivers/arm/i2c_master.c | 16 +++++++--------- drivers/arm/i2c_master.h | 40 ++++++++++++++++++++++++++++++++++++++-- 3 files changed, 69 insertions(+), 16 deletions(-) diff --git a/docs/i2c_driver.md b/docs/i2c_driver.md index bb1a2d74f..4a47a92b1 100644 --- a/docs/i2c_driver.md +++ b/docs/i2c_driver.md @@ -65,11 +65,30 @@ By default the I2C1 hardware driver is assumed to be used. If another hardware d STM32 MCUs allows a variety of pins to be configured as I2C pins depending on the hardware driver used. By default B6 and B7 are set to I2C. You can use these defines to set your i2c pins: -| Variable | Description | Default | -|-------------|----------------------------------------------|---------| -| `I2C1_BANK` | The bank of pins (`GPIOA`, `GPIOB`, `GPIOC`) | `GPIOB` | -| `I2C1_SCL` | The pin number for the SCL pin (0-9) | `6` | -| `I2C1_SDA` | The pin number for the SDA pin (0-9) | `7` | +| Variable | Description | Default | +|--------------------------|----------------------------------------------------------------------------------------------|---------| +| `I2C1_SCL_BANK` | The bank of pins (`GPIOA`, `GPIOB`, `GPIOC`) to use for SCL | `GPIOB` | +| `I2C1_SDA_BANK` | The bank of pins (`GPIOA`, `GPIOB`, `GPIOC`) to use for SDA | `GPIOB` | +| `I2C1_SCL` | The pin number for the SCL pin (0-9) | `6` | +| `I2C1_SDA` | The pin number for the SDA pin (0-9) | `7` | +| `I2C1_BANK` (deprecated) | The bank of pins (`GPIOA`, `GPIOB`, `GPIOC`), superceded by `I2C1_SCL_BANK`, `I2C1_SDA_BANK` | `GPIOB` | + +STM32 MCUs allow for different timing parameters when configuring I2C. These can be modified using the following parameters, using https://www.st.com/en/embedded-software/stsw-stm32126.html as a reference: + +| Variable | Default | +|-----------------------|---------| +| `I2C1_TIMINGR_PRESC` | `15U` | +| `I2C1_TIMINGR_SCLDEL` | `4U` | +| `I2C1_TIMINGR_SDADEL` | `2U` | +| `I2C1_TIMINGR_SCLH` | `15U` | +| `I2C1_TIMINGR_SCLL` | `21U` | + +STM32 MCUs allow for different "alternate function" modes when configuring GPIO pins. These are required to switch the pins used to I2C mode. See the respective datasheet for the appropriate values for your MCU. + +| Variable | Default | +|---------------------|---------| +| `I2C1_SCL_PAL_MODE` | `4` | +| `I2C1_SDA_PAL_MODE` | `4` | You can also overload the `void i2c_init(void)` function, which has a weak attribute. If you do this the configuration variables above will not be used. Please consult the datasheet of your MCU for the available GPIO configurations. The following is an example initialization function: diff --git a/drivers/arm/i2c_master.c b/drivers/arm/i2c_master.c index 7369398cc..5814375f3 100644 --- a/drivers/arm/i2c_master.c +++ b/drivers/arm/i2c_master.c @@ -32,12 +32,10 @@ static uint8_t i2c_address; -// This configures the I2C clock to 400khz assuming a 72Mhz clock -// For more info : https://www.st.com/en/embedded-software/stsw-stm32126.html static const I2CConfig i2cconfig = { - STM32_TIMINGR_PRESC(15U) | - STM32_TIMINGR_SCLDEL(4U) | STM32_TIMINGR_SDADEL(2U) | - STM32_TIMINGR_SCLH(15U) | STM32_TIMINGR_SCLL(21U), + STM32_TIMINGR_PRESC(I2C1_TIMINGR_PRESC) | + STM32_TIMINGR_SCLDEL(I2C1_TIMINGR_SCLDEL) | STM32_TIMINGR_SDADEL(I2C1_TIMINGR_SDADEL) | + STM32_TIMINGR_SCLH(I2C1_TIMINGR_SCLH) | STM32_TIMINGR_SCLL(I2C1_TIMINGR_SCLL), 0, 0 }; @@ -58,13 +56,13 @@ __attribute__ ((weak)) void i2c_init(void) { // Try releasing special pins for a short time - palSetPadMode(I2C1_BANK, I2C1_SCL, PAL_MODE_INPUT); - palSetPadMode(I2C1_BANK, I2C1_SDA, PAL_MODE_INPUT); + palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_INPUT); + palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_INPUT); chThdSleepMilliseconds(10); - palSetPadMode(I2C1_BANK, I2C1_SCL, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN); - palSetPadMode(I2C1_BANK, I2C1_SDA, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN); + palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); + palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); //i2cInit(); //This is invoked by halInit() so no need to redo it. } diff --git a/drivers/arm/i2c_master.h b/drivers/arm/i2c_master.h index a15f1702d..1bb74c800 100644 --- a/drivers/arm/i2c_master.h +++ b/drivers/arm/i2c_master.h @@ -26,9 +26,19 @@ #include "ch.h" #include -#ifndef I2C1_BANK - #define I2C1_BANK GPIOB +#ifdef I2C1_BANK + #define I2C1_SCL_BANK I2C1_BANK + #define I2C1_SDA_BANK I2C1_BANK #endif + +#ifndef I2C1_SCL_BANK + #define I2C1_SCL_BANK GPIOB +#endif + +#ifndef I2C1_SDA_BANK + #define I2C1_SDA_BANK GPIOB +#endif + #ifndef I2C1_SCL #define I2C1_SCL 6 #endif @@ -36,6 +46,32 @@ #define I2C1_SDA 7 #endif +// The default PAL alternate modes are used to signal that the pins are used for I2C +#ifndef I2C1_SCL_PAL_MODE + #define I2C1_SCL_PAL_MODE 4 +#endif +#ifndef I2C1_SDA_PAL_MODE + #define I2C1_SDA_PAL_MODE 4 +#endif + +// The default timing values below configures the I2C clock to 400khz assuming a 72Mhz clock +// For more info : https://www.st.com/en/embedded-software/stsw-stm32126.html +#ifndef I2C1_TIMINGR_PRESC + #define I2C1_TIMINGR_PRESC 15U +#endif +#ifndef I2C1_TIMINGR_SCLDEL + #define I2C1_TIMINGR_SCLDEL 4U +#endif +#ifndef I2C1_TIMINGR_SDADEL + #define I2C1_TIMINGR_SDADEL 2U +#endif +#ifndef I2C1_TIMINGR_SCLH + #define I2C1_TIMINGR_SCLH 15U +#endif +#ifndef I2C1_TIMINGR_SCLL + #define I2C1_TIMINGR_SCLL 21U +#endif + #ifndef I2C_DRIVER #define I2C_DRIVER I2CD1 #endif From 3449000f425ba2dfe2fa1119435b3f61bc22be76 Mon Sep 17 00:00:00 2001 From: ai03 Date: Sat, 1 Jun 2019 22:02:33 -0700 Subject: [PATCH 166/341] [Keyboard] Add support for KBDPAD MKII (#6034) * Build some testing keymaps * Match naming convention to 8x * Add configurator json * Forgot to build the readme * Apply suggestions from code review Co-Authored-By: Elliot Powell <32494740+e11i0t23@users.noreply.github.com> Co-Authored-By: Drashna Jaelre * Update keyboards/kbdfans/kbdpad_mk2/rules.mk Co-Authored-By: Drashna Jaelre --- keyboards/kbdfans/kbdpad_mk2/config.h | 251 ++++++++++++++++++ keyboards/kbdfans/kbdpad_mk2/info.json | 37 +++ keyboards/kbdfans/kbdpad_mk2/kbdpad_mk2.c | 61 +++++ keyboards/kbdfans/kbdpad_mk2/kbdpad_mk2.h | 43 +++ .../kbdpad_mk2/keymaps/default/keymap.c | 44 +++ .../kbdpad_mk2/keymaps/default/readme.md | 3 + .../kbdpad_mk2/keymaps/tester/keymap.c | 44 +++ .../kbdpad_mk2/keymaps/tester/readme.md | 9 + keyboards/kbdfans/kbdpad_mk2/readme.md | 15 ++ keyboards/kbdfans/kbdpad_mk2/rules.mk | 82 ++++++ 10 files changed, 589 insertions(+) create mode 100644 keyboards/kbdfans/kbdpad_mk2/config.h create mode 100644 keyboards/kbdfans/kbdpad_mk2/info.json create mode 100644 keyboards/kbdfans/kbdpad_mk2/kbdpad_mk2.c create mode 100644 keyboards/kbdfans/kbdpad_mk2/kbdpad_mk2.h create mode 100644 keyboards/kbdfans/kbdpad_mk2/keymaps/default/keymap.c create mode 100644 keyboards/kbdfans/kbdpad_mk2/keymaps/default/readme.md create mode 100644 keyboards/kbdfans/kbdpad_mk2/keymaps/tester/keymap.c create mode 100644 keyboards/kbdfans/kbdpad_mk2/keymaps/tester/readme.md create mode 100644 keyboards/kbdfans/kbdpad_mk2/readme.md create mode 100644 keyboards/kbdfans/kbdpad_mk2/rules.mk diff --git a/keyboards/kbdfans/kbdpad_mk2/config.h b/keyboards/kbdfans/kbdpad_mk2/config.h new file mode 100644 index 000000000..e3b91e1a1 --- /dev/null +++ b/keyboards/kbdfans/kbdpad_mk2/config.h @@ -0,0 +1,251 @@ +/* +Copyright 2019 Ryota Goto + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xA103 +#define PRODUCT_ID 0x0006 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KBDfans +#define PRODUCT KBDPAD-MKII +#define DESCRIPTION Numpad + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D3, D1, D2, C6, C7, B6 } +#define MATRIX_COL_PINS { C4, C5, B3, B2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 + +#define RGB_DI_PIN B5 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 16 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/kbdfans/kbdpad_mk2/info.json b/keyboards/kbdfans/kbdpad_mk2/info.json new file mode 100644 index 000000000..50cfc871d --- /dev/null +++ b/keyboards/kbdfans/kbdpad_mk2/info.json @@ -0,0 +1,37 @@ +{ + "keyboard_name": "kbdpad_mk2", + "url": "https://kb.ai03.me/projects/kbdpad-mkii.html", + "maintainer": "ai03", + "width": 4, + "height": 6.25, + "layouts": { + "LAYOUT_ortho_6x4": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":0, "y":1.25}, + {"x":1, "y":1.25}, + {"x":2, "y":1.25}, + {"x":3, "y":1.25}, + {"x":0, "y":2.25}, + {"x":1, "y":2.25}, + {"x":2, "y":2.25}, + {"x":3, "y":2.25}, + {"x":0, "y":3.25}, + {"x":1, "y":3.25}, + {"x":2, "y":3.25}, + {"x":3, "y":3.25}, + {"x":0, "y":4.25}, + {"x":1, "y":4.25}, + {"x":2, "y":4.25}, + {"x":3, "y":4.25}, + {"x":0, "y":5.25}, + {"x":1, "y":5.25}, + {"x":2, "y":5.25}, + {"x":3, "y":5.25} + ] + } + } +} diff --git a/keyboards/kbdfans/kbdpad_mk2/kbdpad_mk2.c b/keyboards/kbdfans/kbdpad_mk2/kbdpad_mk2.c new file mode 100644 index 000000000..3ca8e0c73 --- /dev/null +++ b/keyboards/kbdfans/kbdpad_mk2/kbdpad_mk2.c @@ -0,0 +1,61 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#include "kbdpad_mk2.h" + +void matrix_init_kb(void) { + + // Num Lock LED = B4 + // Sinking setup (5V -> LED/Res -> Pin) + + setPinOutput(B4); + + matrix_init_user(); +} + +void led_set_kb(uint8_t usb_led) { + + // Sinking setup. Write HIGH to turn OFF, LOW to turn ON. + + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(B4); + } else { + writePinHigh(B4); + } + + led_set_user(usb_led); +} + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +*/ diff --git a/keyboards/kbdfans/kbdpad_mk2/kbdpad_mk2.h b/keyboards/kbdfans/kbdpad_mk2/kbdpad_mk2.h new file mode 100644 index 000000000..328aeaac9 --- /dev/null +++ b/keyboards/kbdfans/kbdpad_mk2/kbdpad_mk2.h @@ -0,0 +1,43 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_ortho_6x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33, \ + K40, K41, K42, K43, \ + K50, K51, K52, K53 \ +) \ +{ \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 }, \ + { K40, K41, K42, K43 }, \ + { K50, K51, K52, K53 } \ +} diff --git a/keyboards/kbdfans/kbdpad_mk2/keymaps/default/keymap.c b/keyboards/kbdfans/kbdpad_mk2/keymaps/default/keymap.c new file mode 100644 index 000000000..841db90ca --- /dev/null +++ b/keyboards/kbdfans/kbdpad_mk2/keymaps/default/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_6x4( /* Base */ + KC_ESC, KC_LCTL, KC_LALT, KC_BSPC, \ + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_P7, KC_P8, KC_P9, KC_PPLS, \ + KC_P4, KC_P5, KC_P6, KC_PPLS, \ + KC_P1, KC_P2, KC_P3, KC_PENT, \ + KC_P0, KC_P0, KC_PDOT, KC_PENT \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/kbdfans/kbdpad_mk2/keymaps/default/readme.md b/keyboards/kbdfans/kbdpad_mk2/keymaps/default/readme.md new file mode 100644 index 000000000..71ff8e002 --- /dev/null +++ b/keyboards/kbdfans/kbdpad_mk2/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default keymap for KBDPAD MKII + +Just a numpad. Top row from Cherry G80-3700 \ No newline at end of file diff --git a/keyboards/kbdfans/kbdpad_mk2/keymaps/tester/keymap.c b/keyboards/kbdfans/kbdpad_mk2/keymaps/tester/keymap.c new file mode 100644 index 000000000..04c301fee --- /dev/null +++ b/keyboards/kbdfans/kbdpad_mk2/keymaps/tester/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_6x4( /* Base */ + BL_TOGG, BL_STEP, RGB_TOG, RGB_MOD, \ + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_P7, KC_P8, KC_P9, KC_PPLS, \ + KC_P4, KC_P5, KC_P6, KC_PPLS, \ + KC_P1, KC_P2, KC_P3, KC_PENT, \ + KC_P0, KC_P0, KC_PDOT, KC_PENT \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/kbdfans/kbdpad_mk2/keymaps/tester/readme.md b/keyboards/kbdfans/kbdpad_mk2/keymaps/tester/readme.md new file mode 100644 index 000000000..3cd1e9b67 --- /dev/null +++ b/keyboards/kbdfans/kbdpad_mk2/keymaps/tester/readme.md @@ -0,0 +1,9 @@ +# The testing keymap for KBDPAD MKII + +Turns top row into LED tester. + +From left to right: +Backlight Toggle +Backlight Step +RGB Toggle +RGB Mode Cycle \ No newline at end of file diff --git a/keyboards/kbdfans/kbdpad_mk2/readme.md b/keyboards/kbdfans/kbdpad_mk2/readme.md new file mode 100644 index 000000000..7736019bb --- /dev/null +++ b/keyboards/kbdfans/kbdpad_mk2/readme.md @@ -0,0 +1,15 @@ +# KBDPAD MKII + +![kbdpad_mk2](https://cdn.shopify.com/s/files/1/1473/3902/files/1_17ddc70a-87f6-406d-8a32-d63615c70773.jpg?v=1552119175) + +A simple numpad + +Keyboard Maintainer: [ai03](https://github.com/ai03-2725)/[KBDfans](https://kbdfans.cn/) +Hardware Supported: The KBDPAD MKII PCB/case +Hardware Availability: [KBDfans](https://kbdfans.cn/products/gb-kbdpad-mkii-mechanical-keyboard-kit) + +Make example for this keyboard (after setting up your build environment): + + make kbdfans/kbdpad_mk2:default + +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). diff --git a/keyboards/kbdfans/kbdpad_mk2/rules.mk b/keyboards/kbdfans/kbdpad_mk2/rules.mk new file mode 100644 index 000000000..90614e940 --- /dev/null +++ b/keyboards/kbdfans/kbdpad_mk2/rules.mk @@ -0,0 +1,82 @@ +# MCU name +MCU = atmega32u2 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # 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 = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = ortho_6x4 From 0744af97af68da4b4ed6e4eca3c61facb39e7971 Mon Sep 17 00:00:00 2001 From: Danny Date: Sun, 2 Jun 2019 01:36:30 -0400 Subject: [PATCH 167/341] [Keyboard] Update Iris Rev 3 QMK-DFU settings (#6050) * Set the correct pinout for Iris Rev 3 QMK-DFU * Set bootloader to QMK-DFU --- keyboards/keebio/iris/rev3/config.h | 4 ++-- keyboards/keebio/iris/rules.mk | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/keebio/iris/rev3/config.h b/keyboards/keebio/iris/rev3/config.h index ff0d28c73..5a99f787b 100644 --- a/keyboards/keebio/iris/rev3/config.h +++ b/keyboards/keebio/iris/rev3/config.h @@ -36,8 +36,8 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { D2, D3, D5, D7, D6 } #define MATRIX_COL_PINS { F1, F4, F5, F6, D4, B4 } #define SPLIT_HAND_PIN F0 -#define QMK_ESC_OUTPUT D2 -#define QMK_ESC_INPUT F1 +#define QMK_ESC_OUTPUT F1 +#define QMK_ESC_INPUT D2 #define QMK_LED B0 #define QMK_SPEAKER C6 diff --git a/keyboards/keebio/iris/rules.mk b/keyboards/keebio/iris/rules.mk index 9745d5e3c..18d1d6550 100644 --- a/keyboards/keebio/iris/rules.mk +++ b/keyboards/keebio/iris/rules.mk @@ -8,7 +8,7 @@ F_USB = $(F_CPU) # different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. ifeq ($(strip $(KEYBOARD)), iris/rev3) - BOOTLOADER = dfu + BOOTLOADER = qmk-dfu else BOOTLOADER = caterina endif From 6766c5315eb89eeafaf60c089ad028a963c48ab1 Mon Sep 17 00:00:00 2001 From: gorbachev Date: Sun, 2 Jun 2019 01:43:00 -0400 Subject: [PATCH 168/341] [Keyboard] 8 pack (#6031) * 8-Pack Macropad * Added MANUFACTUTER to config.h * Fix the mirrored keymaps by creating rev1.1 and rev1.2 layouts, then using them in the keymaps * fixes from code review comments * Use revisions to manage the different layouts for rev1.1 and rev1.2 * Add DEFAULT_FOLDER to fix default build failures * code review comments fixes * code review comments fixes --- keyboards/8pack/8pack.c | 1 + keyboards/8pack/8pack.h | 11 +++++ keyboards/8pack/config.h | 39 +++++++++++++++ keyboards/8pack/info.json | 21 ++++++++ keyboards/8pack/keymaps/default/keymap.c | 12 +++++ keyboards/8pack/readme.md | 13 +++++ keyboards/8pack/rev11/config.h | 3 ++ keyboards/8pack/rev11/rev11.c | 1 + keyboards/8pack/rev11/rev11.h | 11 +++++ keyboards/8pack/rev11/rules.mk | 0 keyboards/8pack/rev12/config.h | 3 ++ keyboards/8pack/rev12/rev12.c | 1 + keyboards/8pack/rev12/rev12.h | 11 +++++ keyboards/8pack/rev12/rules.mk | 0 keyboards/8pack/rules.mk | 63 ++++++++++++++++++++++++ 15 files changed, 190 insertions(+) create mode 100644 keyboards/8pack/8pack.c create mode 100644 keyboards/8pack/8pack.h create mode 100644 keyboards/8pack/config.h create mode 100644 keyboards/8pack/info.json create mode 100644 keyboards/8pack/keymaps/default/keymap.c create mode 100644 keyboards/8pack/readme.md create mode 100644 keyboards/8pack/rev11/config.h create mode 100644 keyboards/8pack/rev11/rev11.c create mode 100644 keyboards/8pack/rev11/rev11.h create mode 100644 keyboards/8pack/rev11/rules.mk create mode 100644 keyboards/8pack/rev12/config.h create mode 100644 keyboards/8pack/rev12/rev12.c create mode 100644 keyboards/8pack/rev12/rev12.h create mode 100644 keyboards/8pack/rev12/rules.mk create mode 100644 keyboards/8pack/rules.mk diff --git a/keyboards/8pack/8pack.c b/keyboards/8pack/8pack.c new file mode 100644 index 000000000..e89d7281d --- /dev/null +++ b/keyboards/8pack/8pack.c @@ -0,0 +1 @@ +#include "8pack.h" diff --git a/keyboards/8pack/8pack.h b/keyboards/8pack/8pack.h new file mode 100644 index 000000000..1c4ffb55b --- /dev/null +++ b/keyboards/8pack/8pack.h @@ -0,0 +1,11 @@ +#pragma once + +#include "quantum.h" + +#ifdef KEYBOARD_8pack_rev11 + #include "rev11.h" +#endif + +#ifdef KEYBOARD_8pack_rev12 + #include "rev12.h" +#endif \ No newline at end of file diff --git a/keyboards/8pack/config.h b/keyboards/8pack/config.h new file mode 100644 index 000000000..88bd1f351 --- /dev/null +++ b/keyboards/8pack/config.h @@ -0,0 +1,39 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x2171 +#define MANUFACTURER Charles Garcia +#define PRODUCT 8-Pack + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 4 + +/* key matrix pins */ + +#define DIRECT_PINS { { F4, F5, F6, F7 }, { B1, B3, B2, B6 } } + +#define BACKLIGHT_LED_COUNT 8 +#undef BACKLIGHT_PIN +#define BACKLIGHT_PINS { D1, D0, D4, C6, D7, E6, B4, B5 } +#define BACKLIGHT_LEVELS 8 + +// ws2812 options +#define RGB_DI_PIN D2 // pin the DI on the ws2812 is hooked-up to +#define RGBLED_NUM 8 // number of LEDs +#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/8pack/info.json b/keyboards/8pack/info.json new file mode 100644 index 000000000..82122b8f7 --- /dev/null +++ b/keyboards/8pack/info.json @@ -0,0 +1,21 @@ +{ + "keyboard_name": "8-Pack", + "url": "https://github.com/cgarcia2097/8-Pack", + "maintainer": "Charles Garcia", + "width": 4, + "height": 2, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/8pack/keymaps/default/keymap.c b/keyboards/8pack/keymaps/default/keymap.c new file mode 100644 index 000000000..aa1aa9170 --- /dev/null +++ b/keyboards/8pack/keymaps/default/keymap.c @@ -0,0 +1,12 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_V, KC_C, KC_X, MO(1), + KC_A, KC_S, KC_D, KC_F + ), + [1] = LAYOUT( + RGB_TOG, RGB_RMOD, RGB_MOD, KC_NO, + RESET, BL_DEC, BL_INC, BL_TOGG + ) +}; diff --git a/keyboards/8pack/readme.md b/keyboards/8pack/readme.md new file mode 100644 index 000000000..ad5df536a --- /dev/null +++ b/keyboards/8pack/readme.md @@ -0,0 +1,13 @@ +# 8-Pack Macropad + +An open source 2x4 macropad designed by Charles Garcia. + +Keyboard Maintainer: [Charles Garcia](https://github.com/cgarcia2097) +Hardware Supported: 8-Pack Macropad PCB +Hardware Availability: [8-Pack Github](https://github.com/cgarcia2097/8-Pack) + +Make example for this keyboard (after setting up your build environment): + + make 8pack:default + +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). \ No newline at end of file diff --git a/keyboards/8pack/rev11/config.h b/keyboards/8pack/rev11/config.h new file mode 100644 index 000000000..83ad51ada --- /dev/null +++ b/keyboards/8pack/rev11/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define DEVICE_VER 0x0001 diff --git a/keyboards/8pack/rev11/rev11.c b/keyboards/8pack/rev11/rev11.c new file mode 100644 index 000000000..c54ecbe87 --- /dev/null +++ b/keyboards/8pack/rev11/rev11.c @@ -0,0 +1 @@ +#include "rev11.h" diff --git a/keyboards/8pack/rev11/rev11.h b/keyboards/8pack/rev11/rev11.h new file mode 100644 index 000000000..ebf8529ad --- /dev/null +++ b/keyboards/8pack/rev11/rev11.h @@ -0,0 +1,11 @@ +#pragma once + +#include "8pack.h" + +#define LAYOUT( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13 \ +) { \ + { K13, K12, K11, K10 }, \ + { K03, K02, K01, K00 } \ +} diff --git a/keyboards/8pack/rev11/rules.mk b/keyboards/8pack/rev11/rules.mk new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/8pack/rev12/config.h b/keyboards/8pack/rev12/config.h new file mode 100644 index 000000000..9a527501a --- /dev/null +++ b/keyboards/8pack/rev12/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define DEVICE_VER 0x0002 diff --git a/keyboards/8pack/rev12/rev12.c b/keyboards/8pack/rev12/rev12.c new file mode 100644 index 000000000..b2d091af4 --- /dev/null +++ b/keyboards/8pack/rev12/rev12.c @@ -0,0 +1 @@ +#include "rev12.h" diff --git a/keyboards/8pack/rev12/rev12.h b/keyboards/8pack/rev12/rev12.h new file mode 100644 index 000000000..3efeb06de --- /dev/null +++ b/keyboards/8pack/rev12/rev12.h @@ -0,0 +1,11 @@ +#pragma once + +#include "8pack.h" + +#define LAYOUT( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13 \ +) { \ + { K03, K02, K01, K00 }, \ + { K13, K12, K11, K10 } \ +} diff --git a/keyboards/8pack/rev12/rules.mk b/keyboards/8pack/rev12/rules.mk new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/8pack/rules.mk b/keyboards/8pack/rules.mk new file mode 100644 index 000000000..97496c8f2 --- /dev/null +++ b/keyboards/8pack/rules.mk @@ -0,0 +1,63 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = no # 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 keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes +OLED_DRIVER_ENABLE = no + +DEFAULT_FOLDER = 8pack/rev12 From 5971b663cb8dc55b02d2987e946691fb9aa44e97 Mon Sep 17 00:00:00 2001 From: holtenc Date: Sun, 2 Jun 2019 16:19:31 -0500 Subject: [PATCH 169/341] Enable extrakey in rules (#6055) * correct indicator light states. function of indicator lights was inverted. these changes correct that. * flesh out keymaps pre production * Enable extrakey in rules --- keyboards/primekb/prime_e/keymaps/via/rules.mk | 2 +- keyboards/primekb/prime_e/rules.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/primekb/prime_e/keymaps/via/rules.mk b/keyboards/primekb/prime_e/keymaps/via/rules.mk index 93b2e70e7..c981a2f26 100644 --- a/keyboards/primekb/prime_e/keymaps/via/rules.mk +++ b/keyboards/primekb/prime_e/keymaps/via/rules.mk @@ -63,7 +63,7 @@ BOOTLOADER = atmel-dfu # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/primekb/prime_e/rules.mk b/keyboards/primekb/prime_e/rules.mk index 313bf3b3e..579ddd11e 100644 --- a/keyboards/primekb/prime_e/rules.mk +++ b/keyboards/primekb/prime_e/rules.mk @@ -63,7 +63,7 @@ BOOTLOADER = atmel-dfu # BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE From 2c8149aa55641c3ebcb7c75b4f8f1c7216e9662d Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Sun, 2 Jun 2019 23:29:51 -0400 Subject: [PATCH 170/341] Fix compilation error when I2C and encoder is enabled for split code --- quantum/split_common/transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c index a3539576f..b32d48eb8 100644 --- a/quantum/split_common/transport.c +++ b/quantum/split_common/transport.c @@ -74,7 +74,7 @@ bool transport_master(matrix_row_t matrix[]) { # endif # ifdef ENCODER_ENABLE - i2c_readReg(SLAVE_I2C_ADDRESS, I2C_ENCODER_START, (void *)i2c_buffer->encoder_state, sizeof(I2C_slave_buffer_t.encoder_state), TIMEOUT); + i2c_readReg(SLAVE_I2C_ADDRESS, I2C_ENCODER_START, (void *)i2c_buffer->encoder_state, sizeof(i2c_buffer->encoder_state), TIMEOUT); encoder_update_raw(i2c_buffer->encoder_state); # endif From 4a8e62d30ec83921385a502a7cee3c6634e95988 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Sun, 2 Jun 2019 23:31:43 -0400 Subject: [PATCH 171/341] Have hexwire Iris keymap use I2C --- keyboards/keebio/iris/keymaps/hexwire/config.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/keyboards/keebio/iris/keymaps/hexwire/config.h b/keyboards/keebio/iris/keymaps/hexwire/config.h index 53b00d24f..8166822d9 100644 --- a/keyboards/keebio/iris/keymaps/hexwire/config.h +++ b/keyboards/keebio/iris/keymaps/hexwire/config.h @@ -20,14 +20,9 @@ along with this program. If not, see . #include "config_common.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C +#define USE_I2C /* Select hand configuration */ - -#define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS From 1a9173cafc88bfb2fa30b14f38a3371e87e53193 Mon Sep 17 00:00:00 2001 From: Wilba Date: Mon, 3 Jun 2019 17:46:00 +1000 Subject: [PATCH 172/341] [Keyboard] Added WT65-B, WT75-B, minor fixes (#5991) * Added WT65-B, WT75-B, minor fixes * Update keyboards/wilba_tech/wt65_b/config.h Co-Authored-By: Drashna Jaelre * Update keyboards/wilba_tech/wt65_b/readme.md Co-Authored-By: fauxpark * Update keyboards/wilba_tech/wt75_b/config.h Co-Authored-By: Drashna Jaelre * Change DEBOUNCING_DELAY to DEBOUNCE * Change DEBOUNCING_DELAY to DEBOUNCE --- keyboards/wilba_tech/wt60_a/config.h | 2 +- keyboards/wilba_tech/wt60_a/readme.md | 6 +- keyboards/wilba_tech/wt65_a/config.h | 2 +- keyboards/wilba_tech/wt65_a/readme.md | 6 +- keyboards/wilba_tech/wt65_b/config.h | 202 ++++++++++++++++++ keyboards/wilba_tech/wt65_b/info.json | 13 ++ .../wt65_b/keymaps/default/keymap.c | 37 ++++ .../wilba_tech/wt65_b/keymaps/via/keymap.c | 37 ++++ .../wilba_tech/wt65_b/keymaps/via/rules.mk | 71 ++++++ keyboards/wilba_tech/wt65_b/readme.md | 13 ++ keyboards/wilba_tech/wt65_b/rules.mk | 68 ++++++ keyboards/wilba_tech/wt65_b/wt65_b.c | 17 ++ keyboards/wilba_tech/wt65_b/wt65_b.h | 41 ++++ keyboards/wilba_tech/wt69_a/config.h | 2 +- keyboards/wilba_tech/wt69_a/readme.md | 6 +- keyboards/wilba_tech/wt75_a/config.h | 8 +- keyboards/wilba_tech/wt75_a/readme.md | 6 +- keyboards/wilba_tech/wt75_b/config.h | 202 ++++++++++++++++++ keyboards/wilba_tech/wt75_b/info.json | 14 ++ .../wt75_b/keymaps/default/keymap.c | 41 ++++ .../wilba_tech/wt75_b/keymaps/via/keymap.c | 41 ++++ .../wilba_tech/wt75_b/keymaps/via/rules.mk | 71 ++++++ keyboards/wilba_tech/wt75_b/readme.md | 13 ++ keyboards/wilba_tech/wt75_b/rules.mk | 68 ++++++ keyboards/wilba_tech/wt75_b/wt75_b.c | 17 ++ keyboards/wilba_tech/wt75_b/wt75_b.h | 37 ++++ keyboards/wilba_tech/wt80_a/config.h | 2 +- keyboards/wilba_tech/wt80_a/readme.md | 6 +- keyboards/wilba_tech/wt8_a/config.h | 2 +- keyboards/wilba_tech/wt8_a/readme.md | 6 +- keyboards/wilba_tech/wt_main.c | 4 +- 31 files changed, 1029 insertions(+), 32 deletions(-) create mode 100644 keyboards/wilba_tech/wt65_b/config.h create mode 100644 keyboards/wilba_tech/wt65_b/info.json create mode 100644 keyboards/wilba_tech/wt65_b/keymaps/default/keymap.c create mode 100644 keyboards/wilba_tech/wt65_b/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/wt65_b/readme.md create mode 100644 keyboards/wilba_tech/wt65_b/rules.mk create mode 100644 keyboards/wilba_tech/wt65_b/wt65_b.c create mode 100644 keyboards/wilba_tech/wt65_b/wt65_b.h create mode 100644 keyboards/wilba_tech/wt75_b/config.h create mode 100644 keyboards/wilba_tech/wt75_b/info.json create mode 100644 keyboards/wilba_tech/wt75_b/keymaps/default/keymap.c create mode 100644 keyboards/wilba_tech/wt75_b/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/wt75_b/readme.md create mode 100644 keyboards/wilba_tech/wt75_b/rules.mk create mode 100644 keyboards/wilba_tech/wt75_b/wt75_b.c create mode 100644 keyboards/wilba_tech/wt75_b/wt75_b.h diff --git a/keyboards/wilba_tech/wt60_a/config.h b/keyboards/wilba_tech/wt60_a/config.h index 405685093..f492074e3 100644 --- a/keyboards/wilba_tech/wt60_a/config.h +++ b/keyboards/wilba_tech/wt60_a/config.h @@ -52,7 +52,7 @@ // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/wilba_tech/wt60_a/readme.md b/keyboards/wilba_tech/wt60_a/readme.md index bf9da9ada..91cc5c8ce 100644 --- a/keyboards/wilba_tech/wt60_a/readme.md +++ b/keyboards/wilba_tech/wt60_a/readme.md @@ -1,11 +1,11 @@ -# WILBA.TECH WT60-A +# wilba.tech WT60-A -![WILBA.TECH WT60-A](https://cdn.shopify.com/s/files/1/0015/5084/3975/products/no.160_PCB_1_of_1_2d7414ed-7cc5-46a5-b245-6fb7a197232d_720x.jpg?v=1546475122) +![wilba.tech WT60-A](https://cdn.shopify.com/s/files/1/0015/5084/3975/products/no.160_PCB_1_of_1_2d7414ed-7cc5-46a5-b245-6fb7a197232d_720x.jpg?v=1546475122) WT60-A is a keyboard PCB supporting 60% layout. [More info at wilba.tech](https://wilba.tech/) Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) -Hardware Supported: WILBA.TECH WT65-A +Hardware Supported: wilba.tech WT65-A Hardware Availability: Custom keyboard group buys Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/wilba_tech/wt65_a/config.h b/keyboards/wilba_tech/wt65_a/config.h index a9da35eaa..ec488fb50 100644 --- a/keyboards/wilba_tech/wt65_a/config.h +++ b/keyboards/wilba_tech/wt65_a/config.h @@ -52,7 +52,7 @@ // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/wilba_tech/wt65_a/readme.md b/keyboards/wilba_tech/wt65_a/readme.md index 9e0c630c0..964b6a097 100644 --- a/keyboards/wilba_tech/wt65_a/readme.md +++ b/keyboards/wilba_tech/wt65_a/readme.md @@ -1,11 +1,11 @@ -# WILBA.TECH WT65-A +# wilba.tech WT65-A -![WILBA.TECH WT65-A](https://cdn.shopify.com/s/files/1/0015/5084/3975/products/no.165_PCB_1_of_1_a85e9af1-174f-497a-aadb-bb53ce74ef8c_720x.jpg?v=1546475185) +![wilba.tech WT65-A](https://cdn.shopify.com/s/files/1/0015/5084/3975/products/no.165_PCB_1_of_1_a85e9af1-174f-497a-aadb-bb53ce74ef8c_720x.jpg?v=1546475185) WT65-A is a keyboard PCB supporting 65% layout with 0.5U blocker. [More info at wilba.tech](https://wilba.tech/) Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) -Hardware Supported: WILBA.TECH WT65-A +Hardware Supported: wilba.tech WT65-A Hardware Availability: Custom keyboard group buys Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/wilba_tech/wt65_b/config.h b/keyboards/wilba_tech/wt65_b/config.h new file mode 100644 index 000000000..086168987 --- /dev/null +++ b/keyboards/wilba_tech/wt65_b/config.h @@ -0,0 +1,202 @@ +/* Copyright 2019 Jason Williams (Wilba) + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6582 // wilba.tech +#define PRODUCT_ID 0x065B // 65-B +#define DEVICE_VER 0x0001 +#define MANUFACTURER wilba.tech +#define PRODUCT wilba.tech WT65-B +#define DESCRIPTION wilba.tech WT65-B + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F0, E6, F4, F6, F7 } +#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +#define WT_MONO_BACKLIGHT + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 32 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 34 + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 +// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 635 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 389 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt65_b/info.json b/keyboards/wilba_tech/wt65_b/info.json new file mode 100644 index 000000000..dd6fe1af3 --- /dev/null +++ b/keyboards/wilba_tech/wt65_b/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "wilba.tech WT65-B", + "url": "https://wilba.tech", + "maintainer": "Wilba", + "bootloader": "atmel-dfu", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Home", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"End", "x":15, "y":1}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"PgUp", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Up", "x":14, "y":3}, {"label":"PgDn", "x":15, "y":3}, {"label":"Win", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":2.25, "y":4, "w":1.5}, {"x":3.75, "y":4, "w":7}, {"label":"Fn", "x":10.75, "y":4, "w":1.5}, {"label":"Left", "x":13, "y":4}, {"label":"Down", "x":14, "y":4}, {"label":"Right", "x":15, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/wilba_tech/wt65_b/keymaps/default/keymap.c b/keyboards/wilba_tech/wt65_b/keymaps/default/keymap.c new file mode 100644 index 000000000..41e5cb8be --- /dev/null +++ b/keyboards/wilba_tech/wt65_b/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_ESC, 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_BSLS, KC_DEL, KC_HOME, + 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_BSPC, KC_PGUP, + 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, KC_PGDN, + 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_UP, KC_END, + KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + 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_INS, KC_DEL, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn2 Layer + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + diff --git a/keyboards/wilba_tech/wt65_b/keymaps/via/keymap.c b/keyboards/wilba_tech/wt65_b/keymaps/via/keymap.c new file mode 100644 index 000000000..41e5cb8be --- /dev/null +++ b/keyboards/wilba_tech/wt65_b/keymaps/via/keymap.c @@ -0,0 +1,37 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_ESC, 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_BSLS, KC_DEL, KC_HOME, + 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_BSPC, KC_PGUP, + 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, KC_PGDN, + 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_UP, KC_END, + KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + 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_INS, KC_DEL, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn2 Layer + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + diff --git a/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk b/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk new file mode 100644 index 000000000..76a07d7a4 --- /dev/null +++ b/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk @@ -0,0 +1,71 @@ +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +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 = no # Console for debug(+400) +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 on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt65_b/readme.md b/keyboards/wilba_tech/wt65_b/readme.md new file mode 100644 index 000000000..e90b44770 --- /dev/null +++ b/keyboards/wilba_tech/wt65_b/readme.md @@ -0,0 +1,13 @@ +# wilba.tech WT65-B + +WT65-B is a keyboard PCB supporting 65% layout with two bottom row blockers, designed for the Dixie Mech Bauer. [More info at wilba.tech](https://wilba.tech/) + +Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +Hardware Supported: wilba.tech WT65-B +Hardware Availability: Dixie Mech + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/wt65_b:default + +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). diff --git a/keyboards/wilba_tech/wt65_b/rules.mk b/keyboards/wilba_tech/wt65_b/rules.mk new file mode 100644 index 000000000..e41f2186b --- /dev/null +++ b/keyboards/wilba_tech/wt65_b/rules.mk @@ -0,0 +1,68 @@ +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +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 = no # Console for debug(+400) +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 on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/wilba_tech/wt65_b/wt65_b.c b/keyboards/wilba_tech/wt65_b/wt65_b.c new file mode 100644 index 000000000..365f2e886 --- /dev/null +++ b/keyboards/wilba_tech/wt65_b/wt65_b.c @@ -0,0 +1,17 @@ +/* Copyright 2019 Jason Williams (Wilba) + * + * 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 . + */ + +// Nothing to see here, move along... ;-) diff --git a/keyboards/wilba_tech/wt65_b/wt65_b.h b/keyboards/wilba_tech/wt65_b/wt65_b.h new file mode 100644 index 000000000..daad7e922 --- /dev/null +++ b/keyboards/wilba_tech/wt65_b/wt65_b.h @@ -0,0 +1,41 @@ +/* Copyright 2019 Jason Williams (Wilba) + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define ____ KC_NO + +// Right switch of split backspace is at 2,13 and is the only switch +// whose physical position doesn't match switch matrix position :-( +// However, it also makes no sense to view the physical as 16 columns, +// so the numbering goes 00 to 14. Deal with it. + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K213, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K400, K402, K406, K411, K412, K413, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K300, ____, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { K400, ____, K402, ____, ____, ____, K406, ____, ____, ____, ____, K411, K412, K413, K414 } \ +} + diff --git a/keyboards/wilba_tech/wt69_a/config.h b/keyboards/wilba_tech/wt69_a/config.h index 69425e8e4..653e90d47 100644 --- a/keyboards/wilba_tech/wt69_a/config.h +++ b/keyboards/wilba_tech/wt69_a/config.h @@ -52,7 +52,7 @@ // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/wilba_tech/wt69_a/readme.md b/keyboards/wilba_tech/wt69_a/readme.md index 03ab90d09..90afa2533 100644 --- a/keyboards/wilba_tech/wt69_a/readme.md +++ b/keyboards/wilba_tech/wt69_a/readme.md @@ -1,11 +1,11 @@ -# WILBA.TECH WT69-A +# wilba.tech WT69-A -![WILBA.TECH WT69-A](https://images.squarespace-cdn.com/content/5b267e429772ae4372e3b65f/1556352502542-AKHBF9R6CP5HVHOZYJHM/i69_g.png?content-type=image%2Fpng) +![wilba.tech WT69-A](https://images.squarespace-cdn.com/content/5b267e429772ae4372e3b65f/1556352502542-AKHBF9R6CP5HVHOZYJHM/i69_g.png?content-type=image%2Fpng) WT69-A is a keyboard PCB supporting 65% layout with 0.5U blocker and left side function keys. [More info at wilba.tech](https://wilba.tech/) Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) -Hardware Supported: WILBA.TECH WT69-A +Hardware Supported: wilba.tech WT69-A Hardware Availability: Custom keyboard group buys Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/wilba_tech/wt75_a/config.h b/keyboards/wilba_tech/wt75_a/config.h index 8400447f0..8d7025a60 100644 --- a/keyboards/wilba_tech/wt75_a/config.h +++ b/keyboards/wilba_tech/wt75_a/config.h @@ -52,7 +52,7 @@ // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST @@ -196,7 +196,7 @@ // Dynamic keymap starts after EEPROM version #define DYNAMIC_KEYMAP_EEPROM_ADDR 35 -// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 635 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 389 +// Dynamic macro starts after dynamic keymaps (35+(4*6*15*2)) = (35+720) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 755 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 269 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt75_a/readme.md b/keyboards/wilba_tech/wt75_a/readme.md index 027081360..73589fefc 100644 --- a/keyboards/wilba_tech/wt75_a/readme.md +++ b/keyboards/wilba_tech/wt75_a/readme.md @@ -1,11 +1,9 @@ -# WILBA.TECH WT75-A - -![WILBA.TECH WT75-A](https://wilba.tech) +# wilba.tech WT75-A WT75-A is a keyboard PCB supporting 75% layout with 0.25U blocker. [More info at wilba.tech](https://wilba.tech/) Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) -Hardware Supported: WILBA.TECH WT75-A +Hardware Supported: wilba.tech WT75-A Hardware Availability: Custom keyboard group buys Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/wilba_tech/wt75_b/config.h b/keyboards/wilba_tech/wt75_b/config.h new file mode 100644 index 000000000..c9b37755f --- /dev/null +++ b/keyboards/wilba_tech/wt75_b/config.h @@ -0,0 +1,202 @@ +/* Copyright 2019 Jason Williams (Wilba) + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6582 // wilba.tech +#define PRODUCT_ID 0x075B // 75-B +#define DEVICE_VER 0x0001 +#define MANUFACTURER wilba.tech +#define PRODUCT wilba.tech WT75-B +#define DESCRIPTION wilba.tech WT75-B + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F1, F0, E6, F4, F6, F7 } +#define MATRIX_COL_PINS { F5, D5, B1, B7, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, B2, D4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +#define WT_MONO_BACKLIGHT + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 32 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 34 + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 +// Dynamic macro starts after dynamic keymaps (35+(4*6*16*2)) = (35+768) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 803 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 221 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt75_b/info.json b/keyboards/wilba_tech/wt75_b/info.json new file mode 100644 index 000000000..92947cf87 --- /dev/null +++ b/keyboards/wilba_tech/wt75_b/info.json @@ -0,0 +1,14 @@ +{ + "keyboard_name": "wilba.tech WT75-B", + "url": "https://wilba.tech", + "maintainer": "Wilba", + "bootloader": "atmel-dfu", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":6.5, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2, "w":1.5}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.75}, {"x":1.75, "y":3}, {"x":2.75, "y":3}, {"x":3.75, "y":3}, {"x":4.75, "y":3}, {"x":5.75, "y":3}, {"x":6.75, "y":3}, {"x":7.75, "y":3}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3}, {"x":12.75, "y":3, "w":2.25}, {"x":15, "y":3}, {"x":0, "y":4, "w":2.25}, {"x":2.25, "y":4}, {"x":3.25, "y":4}, {"x":4.25, "y":4}, {"x":5.25, "y":4}, {"x":6.25, "y":4}, {"x":7.25, "y":4}, {"x":8.25, "y":4}, {"x":9.25, "y":4}, {"x":10.25, "y":4}, {"x":11.25, "y":4}, {"x":12.25, "y":4, "w":1.75}, {"x":14, "y":4}, {"x":15, "y":4}, {"x":0, "y":5, "w":1.25}, {"x":1.25, "y":5, "w":1.25}, {"x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"x":10, "y":5, "w":1.25}, {"x":11.25, "y":5, "w":1.25}, {"x":13, "y":5}, {"x":14, "y":5}, {"x":15, "y":5}] + } + } +} + diff --git a/keyboards/wilba_tech/wt75_b/keymaps/default/keymap.c b/keyboards/wilba_tech/wt75_b/keymaps/default/keymap.c new file mode 100644 index 000000000..41d3734db --- /dev/null +++ b/keyboards/wilba_tech/wt75_b/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_ESC, 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_PSCR, KC_PAUS, KC_DEL, + KC_GRV, 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_BSPC, KC_HOME, + 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_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + 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_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn2 Layer + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + diff --git a/keyboards/wilba_tech/wt75_b/keymaps/via/keymap.c b/keyboards/wilba_tech/wt75_b/keymaps/via/keymap.c new file mode 100644 index 000000000..41d3734db --- /dev/null +++ b/keyboards/wilba_tech/wt75_b/keymaps/via/keymap.c @@ -0,0 +1,41 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_ESC, 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_PSCR, KC_PAUS, KC_DEL, + KC_GRV, 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_BSPC, KC_HOME, + 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_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + 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_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn2 Layer + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + diff --git a/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk b/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk new file mode 100644 index 000000000..76a07d7a4 --- /dev/null +++ b/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk @@ -0,0 +1,71 @@ +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +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 = no # Console for debug(+400) +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 on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt75_b/readme.md b/keyboards/wilba_tech/wt75_b/readme.md new file mode 100644 index 000000000..bfaadbce6 --- /dev/null +++ b/keyboards/wilba_tech/wt75_b/readme.md @@ -0,0 +1,13 @@ +# wilba.tech WT75-B + +WT75-B is a keyboard PCB supporting 75% layout with 0.25U blocker, designed for the Singa R3. [More info at wilba.tech](https://wilba.tech/) + +Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +Hardware Supported: wilba.tech WT75-B +Hardware Availability: Singa Keyboards + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/wt75_b:default + +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). \ No newline at end of file diff --git a/keyboards/wilba_tech/wt75_b/rules.mk b/keyboards/wilba_tech/wt75_b/rules.mk new file mode 100644 index 000000000..e41f2186b --- /dev/null +++ b/keyboards/wilba_tech/wt75_b/rules.mk @@ -0,0 +1,68 @@ +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +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 = no # Console for debug(+400) +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 on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/wilba_tech/wt75_b/wt75_b.c b/keyboards/wilba_tech/wt75_b/wt75_b.c new file mode 100644 index 000000000..ccff6d62c --- /dev/null +++ b/keyboards/wilba_tech/wt75_b/wt75_b.c @@ -0,0 +1,17 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +// Nothing to see here, move along... ;-) diff --git a/keyboards/wilba_tech/wt75_b/wt75_b.h b/keyboards/wilba_tech/wt75_b/wt75_b.h new file mode 100644 index 000000000..bdac6bccf --- /dev/null +++ b/keyboards/wilba_tech/wt75_b/wt75_b.h @@ -0,0 +1,37 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define ____ KC_NO + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K315, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \ + K500, K501, K502, K506, K510, K511, K512, K513, K515 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, ____, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, ____, ____, K315 }, \ + { K400, ____, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, ____, K415 }, \ + { K500, K501, K502, ____, ____, ____, K506, ____, ____, ____, K510, K511, K512, K513, ____, K515 } \ +} diff --git a/keyboards/wilba_tech/wt80_a/config.h b/keyboards/wilba_tech/wt80_a/config.h index 7bdcf7f70..5a825c3f7 100644 --- a/keyboards/wilba_tech/wt80_a/config.h +++ b/keyboards/wilba_tech/wt80_a/config.h @@ -52,7 +52,7 @@ // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/wilba_tech/wt80_a/readme.md b/keyboards/wilba_tech/wt80_a/readme.md index 011805748..8bddecade 100644 --- a/keyboards/wilba_tech/wt80_a/readme.md +++ b/keyboards/wilba_tech/wt80_a/readme.md @@ -1,11 +1,9 @@ -# WILBA.TECH WT80-A - -![WILBA.TECH WT80-A](https://wilba./tech) +# wilba.tech WT80-A WT80-A is a keyboard PCB supporting TKL layout with 0.25U gaps. [More info at wilba.tech](https://wilba.tech/) Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) -Hardware Supported: WILBA.TECH WT80-A +Hardware Supported: wilba.tech WT80-A Hardware Availability: Custom keyboard group buys Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/wilba_tech/wt8_a/config.h b/keyboards/wilba_tech/wt8_a/config.h index c4d189183..43f692e0f 100644 --- a/keyboards/wilba_tech/wt8_a/config.h +++ b/keyboards/wilba_tech/wt8_a/config.h @@ -53,7 +53,7 @@ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/wilba_tech/wt8_a/readme.md b/keyboards/wilba_tech/wt8_a/readme.md index ab3cfdc55..4998e9129 100644 --- a/keyboards/wilba_tech/wt8_a/readme.md +++ b/keyboards/wilba_tech/wt8_a/readme.md @@ -1,11 +1,9 @@ -# WILBA.TECH WT8-A - -![WILBA.TECH WT8-A](https://wilba.tech) +# wilba.tech WT8-A WT8-A is an 8-key macropad PCB, designed for the Singa Ocelot. [More info at wilba.tech](https://wilba.tech/) Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) -Hardware Supported: WILBA.TECH WT8-A +Hardware Supported: wilba.tech WT8-A Hardware Availability: Singa Keyboards Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/wilba_tech/wt_main.c b/keyboards/wilba_tech/wt_main.c index 7a63ab5b7..f8056839a 100644 --- a/keyboards/wilba_tech/wt_main.c +++ b/keyboards/wilba_tech/wt_main.c @@ -213,8 +213,8 @@ void bootmagic_lite(void) // We need multiple scans because debouncing can't be turned off. matrix_scan(); - wait_ms(DEBOUNCING_DELAY); - wait_ms(DEBOUNCING_DELAY); + wait_ms(DEBOUNCE); + wait_ms(DEBOUNCE); matrix_scan(); // If the Esc (matrix 0,0) is held down on power up, From 28539fd67fa684db2a645909b8a4f0225481b6ac Mon Sep 17 00:00:00 2001 From: Boy_314 <32818287+Boy-314@users.noreply.github.com> Date: Mon, 3 Jun 2019 15:01:49 -0400 Subject: [PATCH 173/341] [Keymap] Create Boy_314's Canoe layout, small update on xd75 layout (#6060) * create canoe layout, update caps lock on xd75 layout * added readme * fixed copyright comments --- keyboards/canoe/keymaps/boy_314/keymap.c | 56 +++++++++++++++++++++++ keyboards/canoe/keymaps/boy_314/readme.md | 5 ++ keyboards/xd75/keymaps/boy_314/keymap.c | 2 +- 3 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 keyboards/canoe/keymaps/boy_314/keymap.c create mode 100644 keyboards/canoe/keymaps/boy_314/readme.md diff --git a/keyboards/canoe/keymaps/boy_314/keymap.c b/keyboards/canoe/keymaps/boy_314/keymap.c new file mode 100644 index 000000000..e3b4c88d2 --- /dev/null +++ b/keyboards/canoe/keymaps/boy_314/keymap.c @@ -0,0 +1,56 @@ +/* +Copyright 2019 Boy_314 + +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 . +*/ + +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _F1 1 +#define _F2 2 + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BL] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_DEL, \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_PGUP, \ + CTL_T(KC_CAPS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_PGDN, \ + KC_LSPO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSPC, KC_UP, MO(_F2), \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_F1), KC_LEFT, KC_DOWN, KC_RIGHT), + + [_F1] = LAYOUT( + 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, KC_TRNS, \ + KC_TRNS, KC_NO, KC_UP, KC_NO, RGB_TOG,RGB_VAI,RGB_HUI,RGB_SAI,KC_INS, RESET, KC_PSCR, KC_TRNS, KC_PAUS, KC_BSLS, KC_TRNS, \ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,RGB_MOD,RGB_VAD,RGB_HUD,RGB_SAD,KC_NO, KC_NO, KC_F14, KC_F15, KC_INS, KC_HOME, \ + KC_LSPO, KC_MPRV, KC_MPLY, KC_MNXT,KC_NO, KC_NO, KC_NO, KC_MUTE,KC_VOLD, KC_VOLU, KC_NO, KC_RSPC, KC_VOLU, KC_TRNS, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_MPLY, KC_VOLD, KC_MNXT), + + [_F2] = LAYOUT( + 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, KC_PAUS, \ + KC_TRNS, KC_NO, KC_UP, KC_NO, RGB_TOG,RGB_VAI,RGB_HUI,RGB_SAI,KC_INS, RESET, KC_PSCR, KC_SLCK, KC_PAUS, KC_BSLS, KC_SLCK, \ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,RGB_MOD,RGB_VAD,RGB_HUD,RGB_SAD,KC_NO, KC_NO, KC_F14, KC_F15, KC_INS, KC_HOME, \ + KC_LSPO, KC_MPRV, KC_MPLY, KC_MNXT,KC_NO, KC_NO, KC_NO, KC_MUTE,KC_VOLD, KC_VOLU, KC_NO, KC_RSPC, KC_PGUP, KC_TRNS, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_HOME, KC_PGDOWN,KC_END) + +}; + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1< Date: Mon, 3 Jun 2019 21:09:01 +0200 Subject: [PATCH 174/341] Pti keymaps (#6025) * created new folder to port my old layout * removed Colemak, enabled backlight. * fixed backlight support * added Ctrl/Esc + Shift/Enter double function keys * made planck compatible with Atreus board, including docs * enable backlight control * make planck more compatible with atreus layout * migrate to qwerty and separate alt-space * adding ok64 and redox layouts * fix dot in numerical pad * fix dot in dvorak layout * added redox and pro micro version of snampad * add arrows on right mod keys and map PrtScr on Fn P * add keys to swap between mac and windows * added escape to redox layout * added printscreen key * moved layout closer to what I am used to. * swap spc and bspc, add ctrl to quot * qwertified atreus layout * fix for compile errors when RGB or BACKLIGHT disabled * add customized keymap for the m65a * Reverted unintended change in default keymap. * Remove unused code in my keymap and modernized tap hold keys * Update keyboards/snampad/config.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/snampad/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/snampad/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/snampad/snampad.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/snampad/config.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/snampad/keymaps/default/config.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/snampad/snampad.h Co-Authored-By: Drashna Jaelre * Update keyboards/snampad/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/snampad/keymaps/default/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/snampad/snampad.h Co-Authored-By: Drashna Jaelre * Update keyboards/snampad/snampad.h Co-Authored-By: Drashna Jaelre * Update keyboards/snampad/snampad.h Co-Authored-By: Drashna Jaelre * Update keyboards/snampad/rules.mk Co-Authored-By: Drashna Jaelre * Update keyboards/planck/keymaps/ptillemans/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/jc65/v32a/keymaps/ptillemans/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/snampad/snampad.h Co-Authored-By: Drashna Jaelre * cleanup snampad layout * Update keyboards/snampad/snampad.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * further mmended cleaning - removed obsolete Backspace handling in jc65 keymap - improved shift detection - modernized planck keymap - added details to snampad readme - other recommended refactors in snampad --- keyboards/atreus/keymaps/ptillemans/keymap.c | 49 +++ .../jc65/v32a/keymaps/ptillemans/keymap.c | 54 +++ .../jc65/v32a/keymaps/ptillemans/readme.md | 10 + .../jc65/v32a/keymaps/ptillemans/rules.mk | 2 + keyboards/ok60/keymaps/ptillemans/keymap.c | 20 ++ keyboards/planck/keymaps/ptillemans/config.h | 43 +++ keyboards/planck/keymaps/ptillemans/keymap.c | 322 ++++++++++++++++++ keyboards/planck/keymaps/ptillemans/readme.md | 2 + keyboards/planck/keymaps/ptillemans/rules.mk | 2 + keyboards/redox/keymaps/ptillemans/config.h | 34 ++ keyboards/redox/keymaps/ptillemans/keymap.c | 97 ++++++ keyboards/redox/keymaps/ptillemans/readme.md | 1 + keyboards/redox/keymaps/ptillemans/rules.mk | 2 + keyboards/snampad/config.h | 245 +++++++++++++ keyboards/snampad/info.json | 0 keyboards/snampad/keymaps/default/config.h | 19 ++ keyboards/snampad/keymaps/default/keymap.c | 40 +++ keyboards/snampad/keymaps/default/readme.md | 1 + keyboards/snampad/readme.md | 23 ++ keyboards/snampad/rules.mk | 82 +++++ keyboards/snampad/snampad.c | 43 +++ keyboards/snampad/snampad.h | 43 +++ 22 files changed, 1134 insertions(+) create mode 100644 keyboards/atreus/keymaps/ptillemans/keymap.c create mode 100644 keyboards/jc65/v32a/keymaps/ptillemans/keymap.c create mode 100644 keyboards/jc65/v32a/keymaps/ptillemans/readme.md create mode 100644 keyboards/jc65/v32a/keymaps/ptillemans/rules.mk create mode 100644 keyboards/ok60/keymaps/ptillemans/keymap.c create mode 100644 keyboards/planck/keymaps/ptillemans/config.h create mode 100644 keyboards/planck/keymaps/ptillemans/keymap.c create mode 100644 keyboards/planck/keymaps/ptillemans/readme.md create mode 100644 keyboards/planck/keymaps/ptillemans/rules.mk create mode 100644 keyboards/redox/keymaps/ptillemans/config.h create mode 100644 keyboards/redox/keymaps/ptillemans/keymap.c create mode 100644 keyboards/redox/keymaps/ptillemans/readme.md create mode 100644 keyboards/redox/keymaps/ptillemans/rules.mk create mode 100644 keyboards/snampad/config.h create mode 100644 keyboards/snampad/info.json create mode 100644 keyboards/snampad/keymaps/default/config.h create mode 100644 keyboards/snampad/keymaps/default/keymap.c create mode 100644 keyboards/snampad/keymaps/default/readme.md create mode 100644 keyboards/snampad/readme.md create mode 100644 keyboards/snampad/rules.mk create mode 100644 keyboards/snampad/snampad.c create mode 100644 keyboards/snampad/snampad.h diff --git a/keyboards/atreus/keymaps/ptillemans/keymap.c b/keyboards/atreus/keymaps/ptillemans/keymap.c new file mode 100644 index 000000000..9019e9a8c --- /dev/null +++ b/keyboards/atreus/keymaps/ptillemans/keymap.c @@ -0,0 +1,49 @@ +// this is the style you want to emulate. +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, + +#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 _QW 0 +#define _RS 1 +#define _LW 2 + +#define MY_SHEN MT(MOD_LSFT, KC_ENT) +#define MY_CTES MT(MOD_LCTL, KC_ESC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = LAYOUT( /* Qwerty */ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P , + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN , + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH , + TT(_LW), KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, MY_CTES, KC_LALT, KC_SPC, TT(_RS), KC_MINS, KC_QUOT, MY_SHEN + ), + + /* + * ! @ up { } || pgup 7 8 9 * + * # left down right $ || pgdn 4 5 6 + + * [ ] ( ) & || ` 1 2 3 \ + * lower insert super shift bksp ctrl || alt space fn . 0 = + */ + [_RS] = LAYOUT( /* [> RAISE <] */ + KC_EXLM, KC_AT, KC_UP, KC_UNDS, KC_PLUS, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR , + KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DLR, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS , + KC_RBRC, KC_LBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS , + TT(_LW), _______, _______, _______, _______, _______, _______, _______, TO(_QW), KC_DOT, KC_0, KC_EQL + ), + /* + * insert home up end pgup || up F7 F8 F9 F10 + * del left down right pgdn || down F4 F5 F6 F11 + * volup reset || F1 F2 F3 F12 + * voldn super shift next ctrl || alt space L0 prtsc scroll pause + */ + [_LW] = LAYOUT( /* [> LOWER <] */ + KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 , + KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , + KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_TILD, KC_F1, KC_F2, KC_F3, KC_F12 , + KC_NO, KC_VOLD, _______, _______, KC_MNXT, _______, _______, _______, TO(_QW), KC_PSCR, KC_SLCK, KC_MPLY + ) +}; diff --git a/keyboards/jc65/v32a/keymaps/ptillemans/keymap.c b/keyboards/jc65/v32a/keymaps/ptillemans/keymap.c new file mode 100644 index 000000000..c384d36d3 --- /dev/null +++ b/keyboards/jc65/v32a/keymaps/ptillemans/keymap.c @@ -0,0 +1,54 @@ +#include QMK_KEYBOARD_H + + +#define _QWERTY 0 +#define _RAISE 1 + +#define KC_CTES LCTL_T(KC_ESC) +#define KC_RAIS MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + 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_BSLS,KC_BSPC, KC_INS, + 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_HASH,KC_PGUP, + KC_CTES, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT,KC_HASH, KC_ENT,KC_PGDN, + KC_LSFT,KC_BSLS, 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_END, + KC_RAIS,KC_LGUI,KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT,KC_RGUI,KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT + ), + [_RAISE] = LAYOUT( + 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_BSLS,KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O,KC_PSCR,KC_LBRC,KC_RBRC, RESET,KC_PGUP, + KC_CTES, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, RESET, KC_ENT,KC_PGDN, + KC_LSFT,KC_NUBS, 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_HOME, + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT,KC_RGUI,KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT + ), +}; + +bool shift_pressed(void) { + return get_mods() & MOD_MASK_SHIFT; +} + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + static bool tilde_pressed = false; + + switch (keycode) { + case KC_HASH: + if (shift_pressed()) { + if (record->event.pressed) { + tilde_pressed = true; + register_code(KC_GRV); + return false; + } + else if (tilde_pressed) { + unregister_code(KC_GRV); + tilde_pressed = false; + return false; + } + } + return true; + default: + return true; // Process all other keycodes normally + } +} diff --git a/keyboards/jc65/v32a/keymaps/ptillemans/readme.md b/keyboards/jc65/v32a/keymaps/ptillemans/readme.md new file mode 100644 index 000000000..61e55f3ce --- /dev/null +++ b/keyboards/jc65/v32a/keymaps/ptillemans/readme.md @@ -0,0 +1,10 @@ +Default Keymap +======= + +Default plain keymap with only a base layer. + +Keymap Maintainer: [Jason Barnachea](https://github.com/nautxx) + +Difference from base layout: None. + +Intended usage: Reference layout. diff --git a/keyboards/jc65/v32a/keymaps/ptillemans/rules.mk b/keyboards/jc65/v32a/keymaps/ptillemans/rules.mk new file mode 100644 index 000000000..1d2d9e5a9 --- /dev/null +++ b/keyboards/jc65/v32a/keymaps/ptillemans/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = no +BACKLIGHT_ENABLE = no diff --git a/keyboards/ok60/keymaps/ptillemans/keymap.c b/keyboards/ok60/keymaps/ptillemans/keymap.c new file mode 100644 index 000000000..ff777847f --- /dev/null +++ b/keyboards/ok60/keymaps/ptillemans/keymap.c @@ -0,0 +1,20 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_60_iso( + KC_ESC, 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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, + KC_LSFT, KC_GRAVE, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT,KC_UP), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), MT(MOD_RALT,KC_LEFT), MT(MOD_RGUI,KC_DOWN), MT(MOD_RCTL,KC_RGHT) + ), + + [1] = LAYOUT_60_iso( + RESET, 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, + _______, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_PSCR, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, AG_NORM, AG_SWAP, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/planck/keymaps/ptillemans/config.h b/keyboards/planck/keymaps/ptillemans/config.h new file mode 100644 index 000000000..d9be4c017 --- /dev/null +++ b/keyboards/planck/keymaps/ptillemans/config.h @@ -0,0 +1,43 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 + + +// setup double tapping to lock layers +#define TAPPING_TERM 175 +#define TAPPING_TOGGLE 2 diff --git a/keyboards/planck/keymaps/ptillemans/keymap.c b/keyboards/planck/keymaps/ptillemans/keymap.c new file mode 100644 index 000000000..c1f847e2f --- /dev/null +++ b/keyboards/planck/keymaps/ptillemans/keymap.c @@ -0,0 +1,322 @@ +/* Copyright 2015-2017 Jack Humbert + * + * 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 . + */ + +#include QMK_KEYBOARD_H +#include "muse.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + DVORAK, + PLOVER, + BACKLIT, + EXT_PLV +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +#define MY_SHEN MT(MOD_LSFT, KC_ENT) +#define MY_CTES MT(MOD_LCTL, KC_ESC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Q | W | E | R | T | PgUp | Up | Y | U | I | O | P | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | A | S | D | F | G | PgDn | Down | H | J | K | L | ; | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Z | X | C | V | B | Home | End | N | M | , | . | / | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Raise| Tab | super| Alt | BS | Ctrl/Esc |Spc/Alt| Lower| ' | \ |Sh/Ent| + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_grid( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_PGUP, KC_UP, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_PGDN, KC_DOWN, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_HOME, KC_END, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + LOWER, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, MY_CTES, MY_CTES, KC_SPC, RAISE, KC_QUOT,KC_MINUS, MY_SHEN +), +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_planck_grid( + KC_TAB , KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + MY_CTES, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MY_SHEN , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | Ins | Home | Up | End | PgUp | | | | F7 | F8 | F9 | F10 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | Left | Down |Right | PgDn | | | | F4 | F5 | F6 | F11 | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | Vol+ | | | | | | | F1 | F2 | F3 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Vol- | | | Next | | | |PrtScr| Lock | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_planck_grid( + KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PERC, KC_CIRC, KC_AMPR, KC_F7, KC_F8, KC_F9, KC_F10, + KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, KC_F4, KC_F5, KC_F6, KC_F11, + _______, KC_VOLU, _______, _______, _______, _______, _______, KC_TILD, KC_F1, KC_F2, KC_F3, KC_F12, + _______, KC_VOLD, _______, _______, KC_MNXT, _______, _______, _______, TO(_QWERTY), KC_PSCR, KC_SLCK, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ! | @ | Up | _ | + | | | PgUp | 7 | 8 | 9 | * | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | # | Left | Down |Right | $ | | | PgDn | 4 | 5 | 6 | + +| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | [ | ] | ( | ) | & | | | ` | 1 | 2 | 3 | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | . | 0 | = | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_planck_grid( + KC_EXLM, KC_AT, KC_UP, KC_UNDS, KC_PLUS, _______, _______, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR, + KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DLR, _______, _______, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS, + KC_MINS, KC_EQL, KC_LPRN, KC_RPRN, KC_AMPR, _______, _______, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, TO(_QWERTY), KC_DOT, KC_0, KC_RBRC +), + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | E | U | | | | + * `-----------------------------------------------------------------------------------' + */ +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap| |Qwerty|Dvorak|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, QWERTY, DVORAK, PLOVER, _______, + BACKLIT, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + #ifdef KEYBOARD_planck_rev5 + PORTE &= ~(1<<6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef KEYBOARD_planck_rev5 + PORTE |= (1<<6); + #endif + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_song); + #endif + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_PLOVER); + } + return false; + break; + } + return true; +} + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update(bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + #ifdef MOUSEKEY_ENABLE + register_code(KC_MS_WH_DOWN); + unregister_code(KC_MS_WH_DOWN); + #else + register_code(KC_PGDN); + unregister_code(KC_PGDN); + #endif + } else { + #ifdef MOUSEKEY_ENABLE + register_code(KC_MS_WH_UP); + unregister_code(KC_MS_WH_UP); + #else + register_code(KC_PGUP); + unregister_code(KC_PGUP); + #endif + } + } +} + +void dip_update(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_song); + #endif + layer_on(_ADJUST); + } else { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + #ifdef AUDIO_ENABLE + stop_all_notes(); + #endif + } + } +} + +void matrix_scan_user(void) { + #ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } + #endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/planck/keymaps/ptillemans/readme.md b/keyboards/planck/keymaps/ptillemans/readme.md new file mode 100644 index 000000000..de9680b49 --- /dev/null +++ b/keyboards/planck/keymaps/ptillemans/readme.md @@ -0,0 +1,2 @@ +# The Default Planck Layout + diff --git a/keyboards/planck/keymaps/ptillemans/rules.mk b/keyboards/planck/keymaps/ptillemans/rules.mk new file mode 100644 index 000000000..c329d16ff --- /dev/null +++ b/keyboards/planck/keymaps/ptillemans/rules.mk @@ -0,0 +1,2 @@ +SRC += muse.c +BACKLIGHT_ENABLE = yes diff --git a/keyboards/redox/keymaps/ptillemans/config.h b/keyboards/redox/keymaps/ptillemans/config.h new file mode 100644 index 000000000..a3ef209a0 --- /dev/null +++ b/keyboards/redox/keymaps/ptillemans/config.h @@ -0,0 +1,34 @@ +/* +Copyright 2018 Mattia Dal Ben + +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/redox/keymaps/ptillemans/keymap.c b/keyboards/redox/keymaps/ptillemans/keymap.c new file mode 100644 index 000000000..3d9b90be5 --- /dev/null +++ b/keyboards/redox/keymaps/ptillemans/keymap.c @@ -0,0 +1,97 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// 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 _QWERTY 0 +#define _SYMB 1 +#define _NAV 2 +#define _ADJUST 3 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + SYMB, + NAV, + ADJUST, +}; + +// Shortcut to make keymap more readable +#define KC_BKSL KC_BSLASH +#define SYM_L MO(_SYMB) + +#define KC_ALAS LALT_T(KC_PAST) +#define KC_CTES LCTL_T(KC_ESC) + +#define KC_NAGR LT(_NAV, KC_GRV) +#define KC_NAMI LT(_NAV, KC_MINS) + +#define KC_ADEN LT(_ADJUST, KC_END) +#define KC_ADPU LT(_ADJUST, KC_PGUP) + +#define KC_LBRS LT(_SYMB, KC_LBRC) +#define KC_RBRS LT(_SYMB, KC_RBRC) +#define KC_RSEN RSFT_T(KC_ENT) +#define KC_RCQU RCTL_T(KC_QUOT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_NAGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_NAMI , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_PSCR , KC_EQL ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BKSL , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_CTES ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_LBRC , KC_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_RCQU , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSEN , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + KC_LGUI ,KC_PPLS ,KC_PMNS ,KC_ALAS , KC_LGUI , KC_BSPC , KC_SPC , KC_SPC ,KC_ENT , KC_RALT , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_SYMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE ,_______ , _______ ,XXXXXXX ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_KP_0 , KC_KP_0 ,KC_PDOT ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_NAV] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,KC_MS_U ,XXXXXXX ,KC_WH_U ,XXXXXXX ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_WH_D ,XXXXXXX ,_______ , _______ ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RIGHT,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_BTN1 , KC_BTN2 ,_______ , _______ ,_______ , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_ADJUST] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + XXXXXXX ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,RESET ,RGB_M_P ,RGB_TOG ,RGB_MOD ,RGB_HUD ,RGB_HUI , RGB_SAD ,RGB_SAI ,RGB_VAD ,RGB_VAI ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,XXXXXXX , XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ) + +}; diff --git a/keyboards/redox/keymaps/ptillemans/readme.md b/keyboards/redox/keymaps/ptillemans/readme.md new file mode 100644 index 000000000..8fa8ddf5c --- /dev/null +++ b/keyboards/redox/keymaps/ptillemans/readme.md @@ -0,0 +1 @@ +# The default keymap for Redox diff --git a/keyboards/redox/keymaps/ptillemans/rules.mk b/keyboards/redox/keymaps/ptillemans/rules.mk new file mode 100644 index 000000000..a81250cdf --- /dev/null +++ b/keyboards/redox/keymaps/ptillemans/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = yes + diff --git a/keyboards/snampad/config.h b/keyboards/snampad/config.h new file mode 100644 index 000000000..a2dc3c6dd --- /dev/null +++ b/keyboards/snampad/config.h @@ -0,0 +1,245 @@ +/* +Copyright 2019 Peter Tillemans + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Snamellit +#define PRODUCT snampad +#define DESCRIPTION A custom numerical keypad handwired in a 3D printed case. + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3 } +#define MATRIX_COL_PINS { D0, D1, D2, D3 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION ROW2COL + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/snampad/info.json b/keyboards/snampad/info.json new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/snampad/keymaps/default/config.h b/keyboards/snampad/keymaps/default/config.h new file mode 100644 index 000000000..d97bb38dd --- /dev/null +++ b/keyboards/snampad/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Peter Tillemans + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/snampad/keymaps/default/keymap.c b/keyboards/snampad/keymaps/default/keymap.c new file mode 100644 index 000000000..6e887e52f --- /dev/null +++ b/keyboards/snampad/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2019 Peter Tillemans + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_numpad_6x4( /* Base */ + KC_F1 , KC_F2 , KC_F3, KC_F4, + KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK , KC_KP_MINUS, + KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, + KC_KP_4, KC_KP_5, KC_KP_6, + KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, + KC_KP_0, KC_KP_DOT + + ), +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/snampad/keymaps/default/readme.md b/keyboards/snampad/keymaps/default/readme.md new file mode 100644 index 000000000..05eef58d4 --- /dev/null +++ b/keyboards/snampad/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for snampad \ No newline at end of file diff --git a/keyboards/snampad/readme.md b/keyboards/snampad/readme.md new file mode 100644 index 000000000..dd9d9b030 --- /dev/null +++ b/keyboards/snampad/readme.md @@ -0,0 +1,23 @@ +# snampad + +![snampad](https://imgur.com/gallery/tPDHeB9?s=fbm) + +A small weekend project to create a numeric keypad for the few times I need such a thing. +I created the schematics in Kicad, 3D printed the case, handwired the prototype, used some +spare Zealios, Box Royals and SA keycaps. + +When I get some time I'd like to make a PCB for it. + +It uses a promicro controller and the reset button has been made availabe through a hole in the backplate. + + +Keyboard Maintainer: [Peter Tillemans](https://github.com/ptillemans) +Hardware Supported: Promicros are ubiquitous. +Hardware Availability: This uses essentially spares from other projects + + +Make example for this keyboard (after setting up your build environment): + + make snampad:default + +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). diff --git a/keyboards/snampad/rules.mk b/keyboards/snampad/rules.mk new file mode 100644 index 000000000..ec3208fd0 --- /dev/null +++ b/keyboards/snampad/rules.mk @@ -0,0 +1,82 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = numpad_6x4 diff --git a/keyboards/snampad/snampad.c b/keyboards/snampad/snampad.c new file mode 100644 index 000000000..c7a94245c --- /dev/null +++ b/keyboards/snampad/snampad.c @@ -0,0 +1,43 @@ +/* Copyright 2019 Peter Tillemans + * + * 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 . + */ +#include "snampad.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/snampad/snampad.h b/keyboards/snampad/snampad.h new file mode 100644 index 000000000..ec7a779a4 --- /dev/null +++ b/keyboards/snampad/snampad.h @@ -0,0 +1,43 @@ +/* Copyright 2019 Peter Tillemans + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_numpad_6x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, k23, \ + k40, k41, k42, \ + k51, k52, k43 \ +) \ +{ \ + { KC_NO, k51, k52 , KC_NO}, \ + { k40, k41, k42 , k43}, \ + { k30, k31, k32 , KC_NO}, \ + { k20, k21, k22 , k23}, \ + { k10, k11, k12 , k13}, \ + { k00, k01, k02 , k03} \ +} From a678f4a206f88cb2dc99be260da4d5030b1adeaa Mon Sep 17 00:00:00 2001 From: Erovia Date: Mon, 3 Jun 2019 21:09:46 +0200 Subject: [PATCH 175/341] [Keyboard] Dimple: fix unintended LED behaviour (#6046) * Dimple: fix unintended LED behaviour The LED was always-on if the custom keymap did not call dimple_led_off() at least once. * Dimple: LED code fixup --- keyboards/lazydesigners/dimple/dimple.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/keyboards/lazydesigners/dimple/dimple.c b/keyboards/lazydesigners/dimple/dimple.c index 5f9571651..69fb2253f 100644 --- a/keyboards/lazydesigners/dimple/dimple.c +++ b/keyboards/lazydesigners/dimple/dimple.c @@ -16,9 +16,15 @@ #include "dimple.h" void dimple_led_on() { - DDRE |= (1 << 6); PORTE &= ~(1 << 6); + writePinHigh(E6); } void dimple_led_off() { - DDRE &= ~(1 << 6); PORTE &= ~(1 << 6); + writePinLow(E6); +} + +void keyboard_pre_init_kb(void) { + // Initialize Caps Lock LED + setPinOutput(E6); + keyboard_pre_init_user(); } From 7ddf3c28f46f8582c897ad118c28734cd9332841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20Dos=C3=A9?= Date: Sun, 2 Jun 2019 13:34:17 -0700 Subject: [PATCH 176/341] Fixes compile errors for massdrop keyboards --- tmk_core/protocol/arm_atsam/md_bootloader.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tmk_core/protocol/arm_atsam/md_bootloader.h b/tmk_core/protocol/arm_atsam/md_bootloader.h index 956145c31..6b80ef492 100644 --- a/tmk_core/protocol/arm_atsam/md_bootloader.h +++ b/tmk_core/protocol/arm_atsam/md_bootloader.h @@ -11,7 +11,7 @@ extern uint32_t _erom; //WARNING: These are only for CTRL bootloader release "v2.18Jun 22 2018 17:28:08" for bootloader_jump support extern uint32_t _eram; #define BOOTLOADER_MAGIC 0x3B9ACA00 -#define MAGIC_ADDR (uint32_t *)(&_eram - 4) +#define MAGIC_ADDR (uint32_t *)((intptr_t)(&_eram) - 4) #endif #ifdef MD_BOOTLOADER @@ -22,4 +22,3 @@ extern uint32_t _eram; #endif //MD_BOOTLOADER #endif //_MD_BOOTLOADER_H_ - From a8958c5e5324dc5d30edde5ab5f682eb2f53f8fb Mon Sep 17 00:00:00 2001 From: Danny Date: Mon, 3 Jun 2019 15:15:18 -0400 Subject: [PATCH 177/341] [Keyboard] Updates to iris (#6063) * Swap LSFT/LCTL in default Iris keymaps * Migrate to new DEBOUNCE setting --- keyboards/keebio/iris/keymaps/default/keymap.c | 4 ++-- keyboards/keebio/iris/keymaps/via/keymap.c | 4 ++-- keyboards/keebio/iris/rev1/config.h | 2 +- keyboards/keebio/iris/rev1_led/config.h | 2 +- keyboards/keebio/iris/rev2/config.h | 2 +- keyboards/keebio/iris/rev3/config.h | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/keyboards/keebio/iris/keymaps/default/keymap.c b/keyboards/keebio/iris/keymaps/default/keymap.c index f0e4d6f15..758b842f7 100644 --- a/keyboards/keebio/iris/keymaps/default/keymap.c +++ b/keyboards/keebio/iris/keymaps/default/keymap.c @@ -22,9 +22,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + 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_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_DEL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_DEL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ KC_LGUI, LOWER, KC_ENT, KC_SPC, RAISE, KC_RALT // └────────┴────────┴────────┘ └────────┴────────┴────────┘ diff --git a/keyboards/keebio/iris/keymaps/via/keymap.c b/keyboards/keebio/iris/keymaps/via/keymap.c index f67b71fc1..c861ae845 100644 --- a/keyboards/keebio/iris/keymaps/via/keymap.c +++ b/keyboards/keebio/iris/keymaps/via/keymap.c @@ -15,9 +15,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + 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_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_HOME, KC_END, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_HOME, KC_END, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ KC_LGUI, FN_MO13, KC_ENT, KC_SPC, FN_MO23, KC_LALT // └────────┴────────┴────────┘ └────────┴────────┴────────┘ diff --git a/keyboards/keebio/iris/rev1/config.h b/keyboards/keebio/iris/rev1/config.h index 13302c60c..2a21861a1 100644 --- a/keyboards/keebio/iris/rev1/config.h +++ b/keyboards/keebio/iris/rev1/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/keebio/iris/rev1_led/config.h b/keyboards/keebio/iris/rev1_led/config.h index 5fb8be674..b3629354e 100644 --- a/keyboards/keebio/iris/rev1_led/config.h +++ b/keyboards/keebio/iris/rev1_led/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/keebio/iris/rev2/config.h b/keyboards/keebio/iris/rev2/config.h index 235c5710f..a46328b94 100644 --- a/keyboards/keebio/iris/rev2/config.h +++ b/keyboards/keebio/iris/rev2/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/keebio/iris/rev3/config.h b/keyboards/keebio/iris/rev3/config.h index 5a99f787b..720695b60 100644 --- a/keyboards/keebio/iris/rev3/config.h +++ b/keyboards/keebio/iris/rev3/config.h @@ -55,7 +55,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 From 91849853ba231f663731010ad073cdc85d23ae9b Mon Sep 17 00:00:00 2001 From: zvecr Date: Sat, 1 Jun 2019 03:36:01 +0100 Subject: [PATCH 178/341] upgrade gcc-arm-none-eabi from the default 5.4.1 to 6.3.1 due to ARM runtime issues --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index dc9d96ecd..f15eb2ee3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,6 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ dfu-programmer \ dfu-util \ gcc \ - gcc-arm-none-eabi \ gcc-avr \ git \ libnewlib-arm-none-eabi \ @@ -19,6 +18,10 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ zip \ && rm -rf /var/lib/apt/lists/* +# upgrade gcc-arm-none-eabi from the default 5.4.1 to 6.3.1 due to ARM runtime issues +RUN wget -q https://developer.arm.com/-/media/Files/downloads/gnu-rm/6-2017q2/gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2 -O - | \ + tar xj --strip-components=1 -C / + VOLUME /qmk_firmware WORKDIR /qmk_firmware COPY . . From 0dc0be7302757c9f9162958007f926b21c4428ef Mon Sep 17 00:00:00 2001 From: Danny Date: Tue, 4 Jun 2019 02:26:34 -0400 Subject: [PATCH 179/341] [Keyboard] Add Levinson Rev 3 (#6064) * Add Levinson Rev 3 * Update keyboards/keebio/levinson/rev3/config.h Co-Authored-By: Drashna Jaelre * Update keyboards/keebio/levinson/rev3/config.h Co-Authored-By: Drashna Jaelre --- keyboards/keebio/levinson/levinson.h | 4 +- keyboards/keebio/levinson/rev3/config.h | 61 +++++++++++++++++++++++++ keyboards/keebio/levinson/rev3/rev3.c | 22 +++++++++ keyboards/keebio/levinson/rev3/rev3.h | 34 ++++++++++++++ keyboards/keebio/levinson/rev3/rules.mk | 1 + 5 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 keyboards/keebio/levinson/rev3/config.h create mode 100644 keyboards/keebio/levinson/rev3/rev3.c create mode 100644 keyboards/keebio/levinson/rev3/rev3.h create mode 100644 keyboards/keebio/levinson/rev3/rules.mk diff --git a/keyboards/keebio/levinson/levinson.h b/keyboards/keebio/levinson/levinson.h index 88c2361ad..503b1f0fd 100644 --- a/keyboards/keebio/levinson/levinson.h +++ b/keyboards/keebio/levinson/levinson.h @@ -4,8 +4,10 @@ #ifdef KEYBOARD_keebio_levinson_rev1 #include "rev1.h" -#else +#elif KEYBOARD_keebio_levinson_rev2 #include "rev2.h" +#elif KEYBOARD_keebio_levinson_rev3 + #include "rev3.h" #endif // Used to create a keymap using only KC_ prefixed keys diff --git a/keyboards/keebio/levinson/rev3/config.h b/keyboards/keebio/levinson/rev3/config.h new file mode 100644 index 000000000..3e45b9d42 --- /dev/null +++ b/keyboards/keebio/levinson/rev3/config.h @@ -0,0 +1,61 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2018 Danny Nguyen + +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 . +*/ + +#pragma once + + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCB10 +#define PRODUCT_ID 0x1146 +#define DEVICE_VER 0x0300 +#define MANUFACTURER Keebio +#define PRODUCT Levinson +#define DESCRIPTION Split 40 percent ortholinear keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, E6, B4, B5 } +#define MATRIX_COL_PINS { D3, F4, F7, B1, B3, B2 } +#define MATRIX_ROW_PINS_RIGHT { D4, B2, B3, B1 } +#define MATRIX_COL_PINS_RIGHT { F4, F7, D3, B5, B4, E6 } +#define SPLIT_HAND_PIN D2 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D0 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D7 +#define RGBLED_NUM 12 // Number of LEDs +#define RGBLED_SPLIT { 6, 6 } + +/* Backlight LEDs */ +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_LEVELS 7 diff --git a/keyboards/keebio/levinson/rev3/rev3.c b/keyboards/keebio/levinson/rev3/rev3.c new file mode 100644 index 000000000..573fa787b --- /dev/null +++ b/keyboards/keebio/levinson/rev3/rev3.c @@ -0,0 +1,22 @@ +#include "levinson.h" + +#ifdef SSD1306OLED +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + led_set_user(usb_led); +} +#endif + +void matrix_init_kb(void) { + + // // green led on + // DDRD |= (1<<5); + // PORTD &= ~(1<<5); + + // // orange led on + // DDRB |= (1<<0); + // PORTB &= ~(1<<0); + + matrix_init_user(); +}; + diff --git a/keyboards/keebio/levinson/rev3/rev3.h b/keyboards/keebio/levinson/rev3/rev3.h new file mode 100644 index 000000000..a31bfd15c --- /dev/null +++ b/keyboards/keebio/levinson/rev3/rev3.h @@ -0,0 +1,34 @@ +#pragma once + +#include "levinson.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30 } \ + } + +#define LAYOUT_ortho_4x12 LAYOUT diff --git a/keyboards/keebio/levinson/rev3/rules.mk b/keyboards/keebio/levinson/rev3/rules.mk new file mode 100644 index 000000000..bd518d8f2 --- /dev/null +++ b/keyboards/keebio/levinson/rev3/rules.mk @@ -0,0 +1 @@ +BACKLIGHT_ENABLE = yes From e7711b3b665c7df0a2a1d7272580cc01be28590d Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Tue, 4 Jun 2019 13:04:30 -0500 Subject: [PATCH 180/341] Moving rgb typedefs into a single location (#5978) Because someone named the define poorly Using full relative path as handwired/promethium has a color.h file --- drivers/avr/apa102.h | 2 +- drivers/avr/ws2812.h | 2 +- keyboards/cannonkeys/bluepill/ws2812.h | 2 +- keyboards/cannonkeys/stm32f072/ws2812.h | 3 +- keyboards/handwired/promethium/rgbsps.c | 2 +- keyboards/mxss/rgblight.h | 2 +- quantum/color.h | 24 +++++++++++-- quantum/rgblight.h | 2 +- quantum/rgblight_types.h | 47 ------------------------- 9 files changed, 28 insertions(+), 58 deletions(-) delete mode 100644 quantum/rgblight_types.h diff --git a/drivers/avr/apa102.h b/drivers/avr/apa102.h index e7d7c3684..5d852e067 100755 --- a/drivers/avr/apa102.h +++ b/drivers/avr/apa102.h @@ -25,7 +25,7 @@ #include #include -#include "rgblight_types.h" +#include "color.h" /* User Interface diff --git a/drivers/avr/ws2812.h b/drivers/avr/ws2812.h index ecb1dc4d1..95f540b18 100644 --- a/drivers/avr/ws2812.h +++ b/drivers/avr/ws2812.h @@ -28,7 +28,7 @@ //#include "ws2812_config.h" //#include "i2cmaster.h" -#include "rgblight_types.h" +#include "quantum/color.h" /* User Interface * diff --git a/keyboards/cannonkeys/bluepill/ws2812.h b/keyboards/cannonkeys/bluepill/ws2812.h index 3b61ddcfa..be37df766 100644 --- a/keyboards/cannonkeys/bluepill/ws2812.h +++ b/keyboards/cannonkeys/bluepill/ws2812.h @@ -1,7 +1,7 @@ #pragma once #include "hal.h" -#include "rgblight_types.h" +#include "color.h" void set_leds_color_rgb(LED_TYPE color); diff --git a/keyboards/cannonkeys/stm32f072/ws2812.h b/keyboards/cannonkeys/stm32f072/ws2812.h index 3b61ddcfa..9b545fcd5 100644 --- a/keyboards/cannonkeys/stm32f072/ws2812.h +++ b/keyboards/cannonkeys/stm32f072/ws2812.h @@ -1,8 +1,7 @@ #pragma once #include "hal.h" -#include "rgblight_types.h" - +#include "color.h" void set_leds_color_rgb(LED_TYPE color); void set_led_color_rgb(LED_TYPE color, int pos); diff --git a/keyboards/handwired/promethium/rgbsps.c b/keyboards/handwired/promethium/rgbsps.c index 84fac1ae1..f43987691 100644 --- a/keyboards/handwired/promethium/rgbsps.c +++ b/keyboards/handwired/promethium/rgbsps.c @@ -1,7 +1,7 @@ #include "ws2812.h" #include "rgbsps.h" -struct cRGB led[RGBSPS_NUM]; +cRGB led[RGBSPS_NUM]; void rgbsps_set(uint8_t index, uint8_t r, uint8_t g, uint8_t b) { led[index].r = r; diff --git a/keyboards/mxss/rgblight.h b/keyboards/mxss/rgblight.h index 5205974f9..0013a3438 100644 --- a/keyboards/mxss/rgblight.h +++ b/keyboards/mxss/rgblight.h @@ -73,7 +73,7 @@ #ifndef RGBLIGHT_CUSTOM_DRIVER #include "ws2812.h" #endif -#include "rgblight_types.h" +#include "color.h" #include "rgblight_list.h" extern LED_TYPE led[RGBLED_NUM]; diff --git a/quantum/color.h b/quantum/color.h index 9d51d45ad..22bb08351 100644 --- a/quantum/color.h +++ b/quantum/color.h @@ -32,12 +32,30 @@ #pragma pack( push, 1 ) #endif +#ifdef RGBW + #define LED_TYPE cRGBW +#else + #define LED_TYPE RGB +#endif + +// WS2812 specific layout typedef struct PACKED { - uint8_t r; uint8_t g; + uint8_t r; uint8_t b; -} RGB; +} cRGB; + +typedef cRGB RGB; + +// WS2812 specific layout +typedef struct PACKED +{ + uint8_t g; + uint8_t r; + uint8_t b; + uint8_t w; +} cRGBW; typedef struct PACKED { @@ -50,6 +68,6 @@ typedef struct PACKED #pragma pack( pop ) #endif -RGB hsv_to_rgb( HSV hsv ); +RGB hsv_to_rgb(HSV hsv); #endif // COLOR_H diff --git a/quantum/rgblight.h b/quantum/rgblight.h index 064522a2b..cba18ae72 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -132,7 +132,7 @@ enum RGBLIGHT_EFFECT_MODE { #ifndef RGBLIGHT_CUSTOM_DRIVER #include "ws2812.h" #endif -#include "rgblight_types.h" +#include "color.h" #include "rgblight_list.h" #if defined(__AVR__) diff --git a/quantum/rgblight_types.h b/quantum/rgblight_types.h deleted file mode 100644 index 49ef5c8ea..000000000 --- a/quantum/rgblight_types.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * light weight WS2812 lib include - * - * Version 2.3 - Nev 29th 2015 - * Author: Tim (cpldcpu@gmail.com) - * - * Please do not change this file! All configuration is handled in "ws2812_config.h" - * - * 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 . - */ - -#ifndef RGBLIGHT_TYPES -#define RGBLIGHT_TYPES - -#ifdef __AVR__ - #include -#endif - -#ifdef RGBW - #define LED_TYPE struct cRGBW -#else - #define LED_TYPE struct cRGB -#endif - - -/* - * Structure of the LED array - * - * cRGB: RGB for WS2812S/B/C/D, SK6812, SK6812Mini, SK6812WWA, APA104, APA106 - * cRGBW: RGBW for SK6812RGBW - */ - -struct cRGB { uint8_t g; uint8_t r; uint8_t b; }; -struct cRGBW { uint8_t g; uint8_t r; uint8_t b; uint8_t w;}; - -#endif From e0a0d80bd329b4a289e3c4f817c96857c25b0f16 Mon Sep 17 00:00:00 2001 From: ymzcdg <49898694+ymzcdg@users.noreply.github.com> Date: Wed, 5 Jun 2019 02:06:17 +0800 Subject: [PATCH 181/341] docs to Mandarin Chinese (#5960) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * faq_general.md to Chinese faq_general.md to Chinese faq finished * custom_quantum_functions.md to Chinese custom_quantum_functions.md to Chinese * custom_quantum_functions.md fix custom_quantum_functions.md fix * custom_quantum_functions.md fix translate custom_quantum_functions.md fix translate * !ver.English! _summary.md bug fix _summary.md bug fix of English doc. add".md" behind "feature_combo" * !ver.English! custom_quantum_functions.md fix#5869 custom_quantum_functions.md in English : delete redundant "is" . issue#5869 * !ver.English! how_keyboards_work.md link fix change https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_code_input to https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_input "#Hexadecimal_code_input" not exist * !English! how_keyboards_work.md add missing "t" Tied to a specific OS a a time (need recompilation when changing OS); change to Tied to a specific OS at a time (need recompilation when changing OS); * _summary.md improve translation _summary.md improve translation * reference_glossary.md into Chinese reference_glossary.md into Chinese 术语表翻译,这个术语表英文版似乎不太全,应该补充英文版,并在中文版添加其他具有中国特色的术语。 --- docs/custom_quantum_functions.md | 2 +- docs/how_keyboards_work.md | 4 +- docs/zh-cn/_summary.md | 66 ++-- docs/zh-cn/custom_quantum_functions.md | 490 +++++++++++++++++++++++++ docs/zh-cn/faq_general.md | 19 + docs/zh-cn/reference_glossary.md | 170 +++++++++ 6 files changed, 715 insertions(+), 36 deletions(-) create mode 100644 docs/zh-cn/custom_quantum_functions.md create mode 100644 docs/zh-cn/faq_general.md create mode 100644 docs/zh-cn/reference_glossary.md diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index 6287b9530..7be82c650 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -267,7 +267,7 @@ You should use this function if you need custom matrix scanning code. It can als If the board supports it, it can be "idled", by stopping a number of functions. A good example of this is RGB lights or backlights. This can save on power consumption, or may be better behavior for your keyboard. -This is controlled by two functions: `suspend_power_down_*` and `suspend_wakeup_init_*`, which are called when the system is board is idled and when it wakes up, respectively. +This is controlled by two functions: `suspend_power_down_*` and `suspend_wakeup_init_*`, which are called when the system board is idled and when it wakes up, respectively. ### Example suspend_power_down_user() and suspend_wakeup_init_user() Implementation diff --git a/docs/how_keyboards_work.md b/docs/how_keyboards_work.md index 0772f055d..5697a2187 100644 --- a/docs/how_keyboards_work.md +++ b/docs/how_keyboards_work.md @@ -63,10 +63,10 @@ You may wonder why a keyboard layout containing all of Unicode is not devised th ## How to (Maybe) Enter Unicode Characters -You can have the firmware send *sequences of keys* to use the [software Unicode Input Method](https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_code_input) of the target operating system, thus effectively entering characters independently of the layout defined in the OS. +You can have the firmware send *sequences of keys* to use the [software Unicode Input Method](https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_input) of the target operating system, thus effectively entering characters independently of the layout defined in the OS. Yet, it does come with multiple disadvantages: - - Tied to a specific OS a a time (need recompilation when changing OS); + - Tied to a specific OS at a time (need recompilation when changing OS); - Within a given OS, does not work in all software; - Limited to a subset of Unicode on some systems. diff --git a/docs/zh-cn/_summary.md b/docs/zh-cn/_summary.md index df25a3ccd..b0d9f1c06 100644 --- a/docs/zh-cn/_summary.md +++ b/docs/zh-cn/_summary.md @@ -7,27 +7,27 @@ * [学习资源](newbs_learn_more_resources.md) * [QMK基础](README.md) - * [QMK 简介](getting_started_introduction.md) - * [贡献 QMK](contributing.md) + * [QMK简介](getting_started_introduction.md) + * [向QMK贡献](contributing.md) * [如何使用Github](getting_started_github.md) * [获得帮助](getting_started_getting_help.md) * [问题解答](faq.md) * [一般问题](faq_general.md) - * [构建/编译QMK](faq_build.md) - * [调试/故障排除 QMK](faq_debug.md) - * [键盘布局](faq_keymap.md) + * [构建/编译](faq_build.md) + * [调试/故障排除](faq_debug.md) + * [键盘映射](faq_keymap.md) * 详细指南 * [安装构建工具](getting_started_build_tools.md) - * [流浪者指南](getting_started_vagrant.md) + * [vagrant指南](getting_started_vagrant.md) * [构建/编译指令](getting_started_make_guide.md) * [刷新固件](flashing.md) * [定制功能](custom_quantum_functions.md) - * [布局概述](keymap.md) + * [映射概述](keymap.md) * [硬件](hardware.md) - * [AVR 处理器](hardware_avr.md) + * [AVR处理器](hardware_avr.md) * [驱动](hardware_drivers.md) * 参考 @@ -35,8 +35,8 @@ * [配置选项](config_options.md) * [键码](keycodes.md) * [记录最佳实践](documentation_best_practices.md) - * [文档指南](documentation_templates.md) - * [词汇表](reference_glossary.md) + * [文档模板](documentation_templates.md) + * [术语表](reference_glossary.md) * [单元测试](unit_testing.md) * [有用的功能](ref_functions.md) * [配置器支持](reference_configurator_support.md) @@ -44,35 +44,35 @@ * [特性](features.md) * [基本键码](keycodes_basic.md) - * [US ANSI 控制键](keycodes_us_ansi_shifted.md) + * [US ANSI控制码](keycodes_us_ansi_shifted.md) * [量子键码](quantum_keycodes.md) * [高级键码](feature_advanced_keycodes.md) * [音频](feature_audio.md) - * [自动控制](feature_auto_shift.md) + * [自动shift](feature_auto_shift.md) * [背光](feature_backlight.md) * [蓝牙](feature_bluetooth.md) - * [Bootmagic](feature_bootmagic.md) + * [热改键](feature_bootmagic.md) * [组合](feature_combo) * [命令](feature_command.md) * [动态宏指令](feature_dynamic_macros.md) * [编码器](feature_encoders.md) - * [Grave Escape](feature_grave_esc.md) - * [键锁](feature_key_lock.md) - * [层](feature_layouts.md) - * [引导键](feature_leader_key.md) - * [LED 阵列](feature_led_matrix.md) + * [重音号Esc复合键](feature_grave_esc.md) + * [自锁键](feature_key_lock.md) + * [布局](feature_layouts.md) + * [前导键](feature_leader_key.md) + * [LED阵列](feature_led_matrix.md) * [宏指令](feature_macros.md) * [鼠标键](feature_mouse_keys.md) * [一键功能](feature_advanced_keycodes.md#one-shot-keys) * [指针设备](feature_pointing_device.md) - * [PS/2 鼠标](feature_ps2_mouse.md) - * [RGB 光](feature_rgblight.md) - * [RGB 矩阵](feature_rgb_matrix.md) + * [PS/2鼠标](feature_ps2_mouse.md) + * [RGB灯光](feature_rgblight.md) + * [RGB矩阵](feature_rgb_matrix.md) * [空格候补换挡](feature_space_cadet_shift.md) * [空格候补换挡回车](feature_space_cadet_shift_enter.md) * [速录机](feature_stenography.md) * [换手](feature_swap_hands.md) - * [踢踏舞](feature_tap_dance.md) + * [多击键](feature_tap_dance.md) * [终端](feature_terminal.md) * [热敏打印机](feature_thermal_printer.md) * [Unicode](feature_unicode.md) @@ -80,16 +80,16 @@ * [速度键](feature_velocikey.md) * 针对制造者和定制者 - * [飞线指南](hand_wire.md) - * [ISP 刷新指南](isp_flashing_guide.md) - * [ARM 调试指南](arm_debugging.md) - * [I2C 驱动](i2c_driver.md) - * [GPIO 控制器](internals_gpio_control.md) - * [Proton C 转换](proton_c_conversion.md) + * [手工连线指南](hand_wire.md) + * [ISP刷新指南](isp_flashing_guide.md) + * [ARM调试指南](arm_debugging.md) + * [I2C驱动](i2c_driver.md) + * [GPIO控制器](internals_gpio_control.md) + * [Proton C转换](proton_c_conversion.md) * 深入了解 * [键盘如何工作](how_keyboards_work.md) - * [理解 QMK](understanding_qmk.md) + * [理解QMK](understanding_qmk.md) * 其他话题 * [使用Eclipse开发QMK](other_eclipse.md) @@ -99,8 +99,8 @@ * QMK 内构 (正在编写) * [定义](internals_defines.md) * [输入回调寄存器](internals_input_callback_reg.md) - * [Midi 设备](internals_midi_device.md) - * [Midi 设备设置过程](internals_midi_device_setup_process.md) - * [Midi 工具库](internals_midi_util.md) + * [Midi设备](internals_midi_device.md) + * [Midi设备设置过程](internals_midi_device_setup_process.md) + * [Midi工具库](internals_midi_util.md) * [发送函数](internals_send_functions.md) - * [Sysex 工具](internals_sysex_tools.md) + * [Sysex工具](internals_sysex_tools.md) diff --git a/docs/zh-cn/custom_quantum_functions.md b/docs/zh-cn/custom_quantum_functions.md new file mode 100644 index 000000000..42ceba9ca --- /dev/null +++ b/docs/zh-cn/custom_quantum_functions.md @@ -0,0 +1,490 @@ +# ζ̵Ĺ + +ںܶ˵ƻ̿ɲֻĵԷ㰴Ǹô򵥡϶ʵֱȼ򵥰ͺӵĹܡQMKעĹ, ǹ, ⣬ԶڲͬµΪ + +ҳٶκQMK֪ʶĶ[QMK](understanding_qmk.md)ڸIJⷢʲô + +## A Word on Core vs vs + +ǰqmk֯һνṹ + +* Core (`_quantum`) + * Keyboard/Revision (`_kb`) + * Keymap (`_user`) + +ÿһڶϼһ`_kb()` `_user()` ׺ ڼ/޶ʹ`_kb()`׺ڲֲʹ`_user()`׺ + +ڼ/޶㶨庯ʱ`_kb()`ִκδǰȵ`_user()`DZҪģȻֲ㺯ͲҪá + +# Զ + +ĿǰΪֹǸмΪ򴴽µļ롣ӴǶЩơ + +## һ¼ + +һöٳȫҲǸֲΨһֵQMKûֱֵСṩһ`SAFE_RANGE`ꡣöʱ`SAFE_RANGE`֤ȡΨһļֵ + + +öӡӵ`keymap.c`Ļڲ`FOO``BAR`ˡ + +```c +enum my_keycodes { + FOO = SAFE_RANGE, + BAR +}; +``` + +## ΪΪ + +㸲һѴڰΪʱΪ¼ʱҪ`process_record_kb()``process_record_user()`ڼʵ¼ǰQMKá`true`QMKķʽ롣ԺܷչĹܶ滻`false` QMKȻͼ̧ǰ¼ˡ + +ij»ͷʱᱻá + +### process_record_user()`ʾʵ + +¡Զһ`FOO`ļΪڰ»سʱ + +```c +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case FOO: + if (record->event.pressed) { + // ʱЩʲô + } else { + // ͷʱЩʲô + } + return false; // ˼нһ + case KC_ENTER: + // »سʱ + if (record->event.pressed) { + PLAY_NOTE_ARRAY(tone_qwerty); + } + return true; // QMKس/ͷ¼ + default: + return true; // + } +} +``` + +### `process_record_*` ĵ + +* /޶: `bool process_record_kb(uint16_t keycode, keyrecord_t *record)` +* : `bool process_record_user(uint16_t keycode, keyrecord_t *record)` + +`keycode()`ڲ϶ģ`MO(1)`, `KC_L`, ȵȡ Ҫ `switch...case` Щ¼ + +`record`ʵʰϢ + +```c +keyrecord_t record { + keyevent_t event { + keypos_t key { + uint8_t col + uint8_t row + } + bool pressed + uint16_t time + } +} +``` + +# LED + +qmkṩ˶ȡHID淶5LEDķ: + +* `USB_LED_NUM_LOCK` +* `USB_LED_CAPS_LOCK` +* `USB_LED_SCROLL_LOCK` +* `USB_LED_COMPOSE` +* `USB_LED_KANA` + +ӦLED״̬λλ +ַԻLED״̬ + +* ִͨ `led_set_user()` +* ͨ `host_keyboard_leds()` + +## `led_set_user()` + +5LEDκһ״̬Ҫıʱ˺á˺ͨLED +ʹ`IS_LED_ON(usb_led, led_name)``IS_LED_OFF(usb_led, led_name)`LED״̬ + +!> `host_keyboard_leds()`ܻ`led_set_user()`ǰֵ + +### `led_set_user()`ʾʵ + +```c +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(B0); + } else { + writePinHigh(B0); + } + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B1); + } else { + writePinHigh(B1); + } + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinLow(B2); + } else { + writePinHigh(B2); + } + if (IS_LED_ON(usb_led, USB_LED_COMPOSE)) { + writePinLow(B3); + } else { + writePinHigh(B3); + } + if (IS_LED_ON(usb_led, USB_LED_KANA)) { + writePinLow(B4); + } else { + writePinHigh(B4); + } +} +``` + +### `led_set_*`ĵ + +* /޶: `void led_set_kb(uint8_t usb_led)` +* : `void led_set_user(uint8_t usb_led)` + +## `host_keyboard_leds()` + +᷵յLED״̬`led_set_*`֮ȡLED״̬ʱã[`matrix_scan_user()`](#ɨ). +Ϊ˱ݣ`IS_HOST_LED_ON(led_name)``IS_HOST_LED_OFF(led_name)` ֱ꣬ӵúͼ`host_keyboard_leds()` + +## LED״̬ + +һЩʵΪLED״̬ṩ˷ķ + +### Ergodox Boards + +Ergodoxʵṩ`ergodox_right_led_1`/`2`/`3_on`/`off()`ÿLED, Ҳ `ergodox_right_led_on`/`off(uint8_t led)` 򿪻رǡ + +⣬ʹ`ergodox_led_all_set(uint8_t n)`ָLEDȼÿLED`ergodox_right_led_1`/`2`/`3_set(uint8_t n)`ʹĻ`ergodox_right_led_set(uint8_t led, uint8_t n)` + +Ergodox boards ͬʱȼ`LED_BRIGHTNESS_LO`ȼ`LED_BRIGHTNESS_HI`(Ĭ). + +# ̳ʼ + +̳ʼм衣ǸȡҪʲô + +Ҫʼ˳г + +* `keyboard_pre_init_*` - ڴǰСЩҪǰеӲʼ +* `matrix_init_*` - ڹ̼м䱻áʱӲѳʼδʼ +* `keyboard_post_init_*` - ڹ̼󱻵á£ġƻ붼Է + +!> ڴ˵`keyboard_post_init_user`Ҫõĺ, ʱRGBƷ⡣ + +## Ԥʼ + +뼫УUSBʼǰС + +֮󲻾þͱʼˡ + +ڴû˵,òΪҪӲijʼ + +ӲʼĻٺò(ʼLEDһ). + +### `keyboard_pre_init_user()`ʾʵ + +ڼ̼趨 B0, B1, B2, B3, B4 LEDš + +```c +void keyboard_pre_init_user(void) { + // üԤʼ + + // LEDΪģʽ + setPinOutput(B0); + setPinOutput(B1); + setPinOutput(B2); + setPinOutput(B3); + setPinOutput(B4); +} +``` + +### `keyboard_pre_init_*` ĵ + +* /޶: `void keyboard_pre_init_kb(void)` +* : `void keyboard_pre_init_user(void)` + +## ʼ + +⽫ھʼʱãijЩӲúú󣬵һЩܱʼǰ + +طõĶʱãӲ޹أҲλá + + +### `matrix_init_*`ĵ + +* /޶: `void matrix_init_kb(void)` +* : `void matrix_init_user(void)` + + +## ̺ʼ + +Ǽ̳ʼеһijЩԣãΪʱӦöǽгʼ + + +### `keyboard_post_init_user()`ʾʵ + +ʾгʼɺУRGBơ + +```c +void keyboard_post_init_user(void) { + // úʼ + rgblight_enable_noeeprom(); // ʹRgb + rgblight_sethsv_noeeprom(180, 255, 255); // ɫõɫ(ɫ) + rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); // ÿٺģʽ +} +``` + +### `keyboard_post_init_*` ĵ + +* /޶: `void keyboard_post_init_kb(void)` +* : `void keyboard_post_init_user(void)` + +# ɨ + +ܵĻҪ`process_record_*()`Զַ̣ʽӵ¼Уȷ벻Լ̲Ӱ졣Ȼڼ£бҪоɨ衣ЩҪرעܣΪÿٱ10Ρ + +### `matrix_scan_*`ʾʵ + +ӱʡˡhookһܼе֮ǰӦ㹻˽qmkڲṹԱûʾ±дҪ[һissue](https://github.com/qmk/qmk_firmware/issues/new)[Discordǽ](https://discord.gg/Uq7gcHh). + +### `matrix_scan_*` ĵ + +* /޶: `void matrix_scan_kb(void)` +* : `void matrix_scan_user(void)` + +úÿξɨʱãMCUͬдҪΪкܶΡ + +ԶɨʱõҲԶ״̬(LEDƻĻ)ûҲ붨еĹܡ + + +# / + +֧־ͿֹͨͣһƱﵽ""RGBƺͱǺܺõӡԽԼܺģҲ̷ζѡ + +: `suspend_power_down_*``suspend_wakeup_init_*`, ֱϵͳкͻʱá + + +### suspend_power_down_user()suspend_wakeup_init_user()ʾʵ + + +```c +void suspend_power_down_user(void) { + rgb_matrix_set_suspend_state(true); +} + +void suspend_wakeup_init_user(void) { + rgb_matrix_set_suspend_state(false); +} +``` + +### / ĵ + +* /޶: `void suspend_power_down_kb(void)` `void suspend_wakeup_init_user(void)` +* : `void suspend_power_down_kb(void)` `void suspend_wakeup_init_user(void)` + +# ı + +ÿıд롣ڲָʾԶ㴦á + +### `layer_state_set_*` ʾʵ + +ʹPlanckʾ [RGB](feature_rgblight.md)ʹ֮Ӧ + +```c +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case _RAISE: + rgblight_setrgb (0x00, 0x00, 0xFF); + break; + case _LOWER: + rgblight_setrgb (0xFF, 0x00, 0x00); + break; + case _PLOVER: + rgblight_setrgb (0x00, 0xFF, 0x00); + break; + case _ADJUST: + rgblight_setrgb (0x7A, 0x00, 0xFF); + break; + default: // for any other layers, or the default layer + rgblight_setrgb (0x00, 0xFF, 0xFF); + break; + } + return state; +} +``` +### `layer_state_set_*` ĵ + +* /޶: `uint32_t layer_state_set_kb(uint32_t state)` +* : `uint32_t layer_state_set_user(uint32_t state)` + + +`״̬`ǻbitmask, [ָ](keymap.md#ֵIJ״̬) + + +# 籣 (EEPROM) + +óڵıڼСЩñصEEPROM粻ʧ ÿ`eeconfig_read_kb``eeconfig_read_user`ȡ`eeconfig_update_kb``eeconfig_update_user`д롣ϣܹлĹܺ(лRGBָʾ⣬`eeconfig_init_kb``eeconfig_init_user`EEPROMĬֵ + +ӵIJֿǣкܶ෽ͨEEPROM洢ͷݣҲûַǡȷġÿֻһ˫(ֽ)ռ䡣 + +סEEPROMдġдܸߣDzֻдEEPROMСдƵMCU̡ + +* ӣôϣʹԣΪ൱ӡ + +### ʾʵ + +ãҶдʹû֡һӵĺкܶҪʵϣʹ˺ܶ + + +keymap.cļУ´: +```c +typedef union { + uint32_t raw; + struct { + bool rgb_layer_change :1; + }; +} user_config_t; + +user_config_t user_config; +``` + +ϴ뽨һṹ壬ýṹԴ洢òдEEPROM㽫趨ΪڽṹȻ塣Ҫס`bool` ()ֵʹ1λ, `uint8_t`ʹ8λ, `uint16_t`ʹ16λԻϴʹã˳Ǵܻ鷳Ϊǻıддֵ + + `layer_state_set_*`ʹ`rgb_layer_change`ʹ`keyboard_post_init_user``process_record_user`һС + +Ҫʹ`keyboard_post_init_userҪ`eeconfig_read_user()`ոմĽṹ塣ȻʹṹIJеĹܡ +```c +void keyboard_post_init_user(void) { + // òּľʼ + + // EEPROMû + user_config.raw = eeconfig_read_user(); + + // ʹܣĬϲ + if (user_config.rgb_layer_change) { + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom_cyan(); + rgblight_mode_noeeprom(1); + } +} +``` +ϺڶEEPROMúʹøĬϲRGBɫ"raw"ֵǴ"union"Ľṹתġ + +```c +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case _RAISE: + if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_magenta(); rgblight_mode_noeeprom(1); } + break; + case _LOWER: + if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_red(); rgblight_mode_noeeprom(1); } + break; + case _PLOVER: + if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_green(); rgblight_mode_noeeprom(1); } + break; + case _ADJUST: + if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_white(); rgblight_mode_noeeprom(1); } + break; + default: // Ĭϲ + if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_cyan(); rgblight_mode_noeeprom(1); } + break; + } + return state; +} +``` +ֵʹʱıRGBơֵ, Ϊ`process_record_user`һ¼`RGB_LYR`ҪȷʹRGB룬ʹʾرգ뽫Ϊ +```c + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case FOO: + if (record->event.pressed) { + // ʱʲô + } else { + // ͷʱʲô + } + return false; // ˼Ľһ + case KC_ENTER: + // ڰ»سʱ + if (record->event.pressed) { + PLAY_NOTE_ARRAY(tone_qwerty); + } + return true; // QMKس/ͷ¼ + case RGB_LYR: // underglowΪָʾʹá + if (record->event.pressed) { + user_config.rgb_layer_change ^= 1; // л״̬ + eeconfig_update_user(user_config.raw); // EEPROMд״̬ + if (user_config.rgb_layer_change) { // ״̬ʹ + layer_state_set(layer_state); // ô̸²ɫ + } + } + return false; break; + case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // еRGB (see quantum_keycodes.h, L400 Բο) + if (record->event.pressed) { //ʧָܲʾıҪ + if (user_config.rgb_layer_change) { // ʹʱ + user_config.rgb_layer_change = false; // ʧܣȻ + eeconfig_update_user(user_config.raw); // EEPROMд + } + } + return true; break; + default: + return true; // + } +} +``` +Ҫ`eeconfig_init_user`ԵEEPROMʱָĬֵ, ԶǿEEPROM`EEP_RST`[Bootmagic](feature_bootmagic.md)磬ҪĬRGBָʾĬֵ + +```c +void eeconfig_init_user(void) { // EEPROM + user_config.raw = 0; + user_config.rgb_layer_change = true; // ҪĬʹ + eeconfig_update_user(user_config.raw); // EEPROMдĬֵ + + // use the non noeeprom versions, ҪEEPROMдЩֵ + rgblight_enable(); // ĬʹRGB + rgblight_sethsv_cyan(); // Ĭɫ + rgblight_mode(1); // Ĭó +} +``` + +ȻˡRGBָʾʱûһֱ棬¼̡ʹRGB룬ָʾʧܣˡ + +### 'EECONFIG' ĵ + +* /޶: `void eeconfig_init_kb(void)`, `uint32_t eeconfig_read_kb(void)``void eeconfig_update_kb(uint32_t val)` +* : `void eeconfig_init_user(void)`, `uint32_t eeconfig_read_user(void)``void eeconfig_update_user(uint32_t val)` + +`val` дEEPROMֵ`eeconfig_read_*`EEPROMһ32λ(˫)ֵ + +# Զ-ٽֵ(TAPPING_TERM) +Ĭ,-ٽֵȫͳһģҲͨáڴû˵ܺáЩ£`LT`˵ʱ˫ܼ󣬿ΪЩļװסΪ˲ÿԶ룬ܿΪÿ`TAPPING_TERM` + +ʹܵĻ, Ҫ`config.h``#define TAPPING_TERM_PER_KEY` + + +## `get_tapping_term`ʾʵ + +Ҫ޸Ļڼ`TAPPING TERM`,Ҫ`keymap.c`ļ´: + +```c +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case SFT_T(KC_SPC): + return TAPPING_TERM + 1250; + case LT(1, KC_GRV): + return 130; + default: + return TAPPING_TERM; + } +} +``` + +### `get_tapping_term` ĵ + +ƪ,Ҫquantum߼̼ĺֻҪûɡ diff --git a/docs/zh-cn/faq_general.md b/docs/zh-cn/faq_general.md new file mode 100644 index 000000000..4949acb8c --- /dev/null +++ b/docs/zh-cn/faq_general.md @@ -0,0 +1,19 @@ +# + +## QMKʲô? + +[QMK](https://github.com/qmk), ӻе(Quantum Mechanical Keyboard)дһȺԴΪƼ̿ĹߡǴ[QMK̼](https://github.com/qmk/qmk_firmware)ʼ[TMK](https://github.com/tmk/tmk_keyboard)ħķֲ档 + +### Ϊʲô(Quantum)? + + + +## QMKTMKʲô? + +TMK[Jun Wako](https://github.com/tmk)ƺִСQMKʼ[Jack Humbert](https://github.com/jackhumbert)ΪPlanck̴TMKֲ档һʱJackķֲͺTMKȥԶˣ2015꣬JackQMK + +Ӽ۵QMKTMKһЩ¹ܶɵġQMKչ˿õļ룬ʹ߼ܽһḻ `S()`, `LCTL()`, `MO()`ȫ[](keycodes.md). + +ӹ̵TMKԼάйٷֵ֧ļֻ̣кСһ֧֡άѴڷֲΪ̴ķֲ档Ĭֺ֧ٵļ룬ûͨ˷֡QMKͨйֺֿͼ̣ǻз׼PRͼı֤άͬʱQMKСҲڱҪʱ + +ַŵȱ㣬ҴʱTMKQMK֮ diff --git a/docs/zh-cn/reference_glossary.md b/docs/zh-cn/reference_glossary.md new file mode 100644 index 000000000..7b9adcc2a --- /dev/null +++ b/docs/zh-cn/reference_glossary.md @@ -0,0 +1,170 @@ +# QMK术语表 + +## ARM +多家公司生产的32位单片机系列,例如Atmel, Cypress, Kinetis, NXP, ST, 和 TI等公司。 + +## AVR +[Atmel](http://www.microchip.com/)公司的单片机系列。 AVR是TMK的初始支持平台。 + +## AZERTY +Français (法国)标准键盘布局。用键盘的前六个字母命名。 + +## Backlight(背光) +键盘上照明的通称。背光通常是一组LED灯,通过键帽或者按轴发光,但也不总是这样。 + +## Bluetooth(蓝牙) +一种短距离点对点无线协议。许多多无线键盘使用此协议。 + +## Bootloader(引导加载程序) +一种写到你单片机的保护区的特殊的程序,该程序可以使单片机升级自己的固件,通常是通过USB来升级。 + +## Bootmagic(热改键) +允许各种键盘行为动态变化的功能,如交换或禁用常用键。 + +## C +一种适用于系统代码的低级编程语言。大多数qmk代码是用C编写的。 + +## Colemak +一种流行的键盘布局。 + +## Compile(编译) +把人可读的代码转换成你的单片机可以运行的机器代码的过程。 + +## Dvorak +一个由August Dvorak博士在20世纪30年代创建的布局。Dvorak简化键盘(Dvorak Simplified Keyboard)的缩写。 + +## Dynamic Macro(动态宏) +一种记录在键盘上的宏,当键盘拔出或计算机重新启动时,宏将丢失。 + +* [动态宏文档](feature_dynamic_macros.md) + +## Eclipse +是一种受C语言开发者追捧的集成开发环境(IDE)。 + +* [Eclipse安装说明](eclipse.md) + +## Firmware(固件) +用来控制单片机的软件。 + +## FLIP +爱特梅尔(Atmel)提供的AVR器件刷写软件。我们一般推荐 [QMK刷写工具](https://github.com/qmk/qmk_flasher),但是对于一些高级用例,需要FLIP。 + +## git +命令行版本控制软件 + +## GitHub +负责大多数QMK项目的网站。它是Git、问题跟踪和其他帮助我们运行qmk的功能的集成平台。 + +## ISP(在系统编程) +在系统编程(In-system programming), 使用外部硬件和JTAG管脚对AVR芯片进行编程的一种方法。 + +## hid_listen +从键盘接收调试消息的接口。 您可以使用[QMK Flasher](https://github.com/qmk/qmk_flasher)或[PJRC's hid_listen](https://www.pjrc.com/teensy/hid_listen.html)查看这些消息 + +## Keycode(键码) +表示特定键的2字节数据。`0x00`-`0xFF`用于[基本键码](keycodes_basic.md)而`0x100`-`0xFFFF`用于[量子键码](quantum_keycodes.md). + +## Key Down +一个键按下尚未抬起时触发的事件。 + +## Key Up +一个键抬起时触发的事件。 + +## Keymap(键映射) +映射到物理键盘布局的一组键码,在按键和按键释放时进行处理。有时翻译为布局,意为软件上表示的布局,即映射。 + +## Layer(层) +为了让一个键实现多个功能的抽象结构。最高活动层有限。 + +## Leader Key(前导键、设置菜单键) +本功能允许您点击前导键,然后按顺序按1-3个键子来激活按键或其他量子功能。 + +* [前导键文档](feature_leader_key.md) + +## LED +发光二极管,键盘上最常用的指示灯装置。 + +## Make +用于编译所有源文件的软件包。可以使用`make`命令和其他参数来编译你的固件。 + +## Matrix(矩阵) +一种由列和行组成的接线模式,使单片机能够用较少的引脚检测按键。矩阵通常包含二极管,以达到全键无冲。 + +## Macro(宏) +本功能可以在敲击单个键后发送多个按键事件(hid报告)。 + +* [宏文档](feature_macros.md) + +## MCU(单片机、微控制单元) +微控制单元,键盘的处理器。 + +## Modifier(修改键、修饰键、功能键) +按住该键将会改变其他键的功能,修饰键包括 Ctrl, Alt, 和 Shift。 + +## Mousekeys(鼠标键) +本功能在您敲击键盘时会控制鼠标光标。 + +* [鼠标键文档](feature_mouse_keys.md) + +## N-Key Rollover (NKRO、全键无冲) +一种术语,适用于能够同时报告任意数量按键的键盘。 + +## Oneshot Modifier(粘滞键) +一种能让你的功能键一直保持按下,直到你按下其他键的功能。它叫做粘滞键或叫做粘连键,该功能由软件实现而非机械结构。 + +## ProMicro +一种低成本AVR开发板。这种板子很容易在购物网站找到(价格不到20RMB),但是据说刷写pro micro有点令人抓狂。 + +## Pull Request(拉请求、PR) +向QMK请求提交代码。我们鼓励所有用户提交你们自己的键盘的代码。 + +## QWERTY +标准英文键盘,通常也用于其他语言,例如中文。是用键盘前6个字母命名的。 + +## QWERTZ +标准Deutsche(德语)键盘布局。使用前6个字母明名。 + +## Rollover(允许翻转、无冲形式) +该术语表示在一个键已按下时按下另一个键。形式包括2KRO(双键无冲),6KRO(6键无冲),和NKRO(全键无冲),无冲表示可同时按下而不产生冲突的键的数量。 + +## Scancode(扫描码) +HID报告中的一个1字节的数字,表示一个键子。这些数字在下列文档中[HID Usage Tables](https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf)该文档发布于[USB-IF](http://www.usb.org/)。 + +## Space Cadet键盘的shift键 +一种特使的shift设置,能让你通过敲击左或右shift一次或多次键入不同的括号。 + +* [Space Cadet键盘文档](feature_space_cadet.md) + +## Tap(敲击、单击) +按下并释放一个键。在某些情况下您需要区分键按下和键抬起,但是单击把两个事件都包括了。 + +## Tap Dance(多击键) +本功能允许向同一个键子分配多个键码,并根据按键次数区分。 + +* [多击键文档](feature_tap_dance.md) + +## Teensy +一种低成本AVR开发板,通常用于手工连线键盘。这个teensy是有点小贵但是halfkay bootloader会让它刷写十分简单,所以也很常用。 + +## Underlight(背光) +用于照亮电路板底面的LED的总称。这些LED通常从印刷电路板的底部向键盘所在的表面发光。 + +## Unicode +在较大的计算机世界中,Unicode是一组编码方案,用于表示任何语言中的字符。 与qmk相关的是,它意味着使用各种操作系统方案来发送Unicode代码点,而不是扫描码。 + +* [Unicode文档](feature_unicode.md) + +## Unit Testing(单元测试) +针对qmk的自动运行测试框架。单元测试帮助我们确信我们的更改不会破坏任何东西。 + +* [单元测试文档](unit_testing.md) + +## USB +通用串行总线,键盘最常见的有线接口。 + +## USB 主机 (或简易主机) +USB诸暨市你的电脑,或者你的键盘所插的任何设备。 + +# 并没有找到你想找到的术语? + +[建立一个issue](https://github.com/qmk/qmk_firmware/issues) ,想好你的问题,或许你所问的术语就会添加到这里。创建一个PR帮我们添加需要添加的术语当然坠吼了:) From a63e2abc9c1fc945997380db926ec2cdd0fd1034 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Tue, 4 Jun 2019 20:29:05 -0700 Subject: [PATCH 182/341] [Keyboard] Fix Configurator support for Mulletpad (#6074) - correct layout macro name - correct JSON object ordering --- keyboards/coseyfannitutti/mulletpad/info.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/coseyfannitutti/mulletpad/info.json b/keyboards/coseyfannitutti/mulletpad/info.json index 1cfade20d..7115bc751 100644 --- a/keyboards/coseyfannitutti/mulletpad/info.json +++ b/keyboards/coseyfannitutti/mulletpad/info.json @@ -5,8 +5,8 @@ "width": 4, "height": 5, "layouts": { - "LAYOUT": { - "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":"+", "x":3, "y":1, "h":2}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"Enter", "x":3, "y":3, "h":2}, {"label":"0", "x":0, "y":4, "w":2}, {"label":".", "x":2, "y":4}] + "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}] } } } From b2f7915994eb514a0348fdb864ead04c54c509c7 Mon Sep 17 00:00:00 2001 From: Alex Mayer Date: Wed, 5 Jun 2019 14:18:20 -0400 Subject: [PATCH 183/341] [Docs] Make Code Examples Consistent On Combo Page (#6078) --- docs/feature_combo.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/feature_combo.md b/docs/feature_combo.md index 680adce2d..4cb1bcda0 100644 --- a/docs/feature_combo.md +++ b/docs/feature_combo.md @@ -29,6 +29,7 @@ enum combos { AB_ESC, JK_TAB }; + const uint16_t PROGMEM ab_combo[] = {KC_A, KC_B, COMBO_END}; const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END}; @@ -44,7 +45,7 @@ For a more complicated implementation, you can use the `process_combo_event` fun enum combo_events { ZC_COPY, XV_PASTE - }; +}; const uint16_t PROGMEM copy_combo[] = {KC_Z, KC_C, COMBO_END}; const uint16_t PROGMEM paste_combo[] = {KC_X, KC_V, COMBO_END}; From de968eb310b82dbba7c69971ad0d1280aaac7b27 Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Wed, 5 Jun 2019 18:14:35 -0500 Subject: [PATCH 184/341] [Keymap] Xulkal changes (#6075) --- keyboards/helix/rev2/keymaps/xulkal/keymap.c | 69 ++++++++ keyboards/helix/rev2/keymaps/xulkal/rules.mk | 11 ++ keyboards/rgbkb/sol/keymaps/xulkal/keymap.c | 3 +- users/xulkal/custom_oled.c | 170 ++++++++++++++----- users/xulkal/custom_tap_dance.c | 3 +- users/xulkal/rules.mk | 1 + 6 files changed, 217 insertions(+), 40 deletions(-) create mode 100644 keyboards/helix/rev2/keymaps/xulkal/keymap.c create mode 100644 keyboards/helix/rev2/keymaps/xulkal/rules.mk diff --git a/keyboards/helix/rev2/keymaps/xulkal/keymap.c b/keyboards/helix/rev2/keymaps/xulkal/keymap.c new file mode 100644 index 000000000..3fad64dea --- /dev/null +++ b/keyboards/helix/rev2/keymaps/xulkal/keymap.c @@ -0,0 +1,69 @@ +#include QMK_KEYBOARD_H +#include "xulkal.h" + +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif + +#define EXPAND_LAYOUT(...) LAYOUT(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BkSp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |FN(CAPS)| A | S | D | F | G | | H | J | K | L | ; | Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Sft[ | Z | X | C | V | B |RGBTOG|RGBRST| N | M | , | . | / | Sft] | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctl- | Win | LOWER| RAISE| Alt | Space|RGBRMOD|RGBMOD|Space| Left | Up | Down | Right| Ctl= | + * `-------------------------------------------------------------------------------------------------' + */ + [_QWERTY] = EXPAND_LAYOUT( \ + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, \ + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, \ + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, \ + _________________QWERTY_L4_________________, RGB_TOG, RGBRST, _________________QWERTY_R4_________________, \ + _________________QWERTY_L5_________________, RGB_RMOD, RGB_MOD, _________________QWERTY_R5_________________ \ + ), + +#ifndef GAMELAYER_DISABLE + [_GAME] = EXPAND_LAYOUT( \ + ___________________GAME_L1_________________, ___________________GAME_R1_________________, \ + ___________________GAME_L2_________________, ___________________GAME_R2_________________, \ + ___________________GAME_L3_________________, ___________________GAME_R3_________________, \ + ___________________GAME_L4_________________, RGB_TOG, RGBRST, ___________________GAME_R4_________________, \ + ___________________GAME_L5_________________, RGB_RMOD, RGB_MOD, ___________________GAME_R5_________________ \ + ), +#endif + + [_LOWER] = EXPAND_LAYOUT( \ + __________________LOWER_L1_________________, __________________LOWER_R1_________________, \ + __________________LOWER_L2_________________, __________________LOWER_R2_________________, \ + __________________LOWER_L3_________________, __________________LOWER_R3_________________, \ + __________________LOWER_L4_________________, _______, _______, __________________LOWER_R4_________________, \ + __________________LOWER_L5_________________, _______, _______, __________________LOWER_R5_________________ \ + ), + + [_RAISE] = EXPAND_LAYOUT( \ + __________________RAISE_L1_________________, __________________RAISE_R1_________________, \ + __________________RAISE_L2_________________, __________________RAISE_R2_________________, \ + __________________RAISE_L3_________________, __________________RAISE_R3_________________, \ + __________________RAISE_L4_________________, _______, _______, __________________RAISE_R4_________________, \ + __________________RAISE_L5_________________, _______, _______, __________________RAISE_R5_________________ \ + ), + +#ifdef TRILAYER_ENABLED + [_ADJUST] = EXPAND_LAYOUT( \ + _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, \ + _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, \ + _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, \ + _________________ADJUST_L4_________________, _______, _______, _________________ADJUST_R4_________________, \ + _________________ADJUST_L5_________________, _______, _______, _________________ADJUST_R5_________________ \ + ), +#endif +}; diff --git a/keyboards/helix/rev2/keymaps/xulkal/rules.mk b/keyboards/helix/rev2/keymaps/xulkal/rules.mk new file mode 100644 index 000000000..a636b2a61 --- /dev/null +++ b/keyboards/helix/rev2/keymaps/xulkal/rules.mk @@ -0,0 +1,11 @@ +RGBLIGHT_ENABLE = yes +# Enable RGBLIGHT Animations +OPT_DEFS += -DRGBLIGHT_ANIMATIONS +# Helix specific define for correct RGBLED_NUM +OPT_DEFS += -DRGBLED_BACK + +OLED_DRIVER_ENABLE = yes +# Helix specific font file +OPT_DEFS += -DOLED_FONT_H=\"common/glcdfont.c\" +# Xulkal specific oled define +OPT_DEFS += -DOLED_90ROTATION diff --git a/keyboards/rgbkb/sol/keymaps/xulkal/keymap.c b/keyboards/rgbkb/sol/keymaps/xulkal/keymap.c index 09c27428e..e51edd907 100644 --- a/keyboards/rgbkb/sol/keymaps/xulkal/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/xulkal/keymap.c @@ -65,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), #ifdef TRILAYER_ENABLED - [_RAISE] = EXPAND_LAYOUT( \ + [_ADJUST] = EXPAND_LAYOUT( \ _________________ADJUST_L1_________________, _______, _______, _________________ADJUST_R1_________________, \ _________________ADJUST_L2_________________, _______, _______, _________________ADJUST_R2_________________, \ _________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, \ @@ -75,3 +75,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), #endif }; + diff --git a/users/xulkal/custom_oled.c b/users/xulkal/custom_oled.c index 77e580b95..d871e96f0 100644 --- a/users/xulkal/custom_oled.c +++ b/users/xulkal/custom_oled.c @@ -5,13 +5,124 @@ #ifdef OLED_DRIVER_ENABLE +#ifdef RGBLIGHT_ENABLE +rgblight_config_t rgblight_config; +#endif + static void render_logo(void) { - static const char PROGMEM sol_logo[] = { + static const char PROGMEM font_logo[] = { 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; - oled_write_P(sol_logo, false); + oled_write_P(font_logo, false); +} + +#if defined(OLED_90ROTATION) + +// TODO: Need to define this function / extern only for helix based split common keyboards +extern uint8_t is_master; +bool is_keyboard_master(void) +{ + return is_master; +} + +static void render_layer(uint8_t layer) +{ + switch (layer) + { + case _QWERTY: + oled_write_P(PSTR("DFLT "), false); + break; +#ifndef GAMELAYER_DISABLE + case _GAME: + oled_write_P(PSTR("GAME "), false); + break; +#endif + case _LOWER: + oled_write_P(PSTR("LOWER"), false); + break; + case _RAISE: + oled_write_P(PSTR("RAISE"), false); + break; +#ifdef TRILAYER_ENABLED + case _ADJUST: + oled_write_P(PSTR("ADJST"), false); + break; +#endif + } +} + +static void render_status(void) +{ + // Render to mode icon + static const char PROGMEM mode_logo[2][4] = { + {0x97,0x98,0x0a,0}, + {0xb7,0xb8,0x0a,0} }; + + oled_write_P(mode_logo[0], false); + oled_write_P(mode_logo[1], false); + + oled_write_P(PSTR("Layer"), false); + uint8_t layer = biton(layer_state); + if (layer != _QWERTY) + render_layer(layer); + else + render_layer(biton32(default_layer_state)); + + // Host Keyboard LED Status + uint8_t led_usb_state = host_keyboard_leds(); + oled_write_P(led_usb_state & (1< Date: Wed, 5 Jun 2019 13:53:11 -0400 Subject: [PATCH 185/341] Change from avr-gcc@7 to @8 for Mac --- docs/faq_build.md | 4 ++-- docs/getting_started_build_tools.md | 6 +++--- docs/zh-cn/faq_build.md | 4 ++-- util/macos_install.sh | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/faq_build.md b/docs/faq_build.md index 0c1bedd71..23d6a6702 100644 --- a/docs/faq_build.md +++ b/docs/faq_build.md @@ -140,8 +140,8 @@ For now, you need to rollback avr-gcc to 7 in brew. ``` brew uninstall --force avr-gcc -brew install avr-gcc@7 -brew link --force avr-gcc@7 +brew install avr-gcc@8 +brew link --force avr-gcc@8 ``` ### I just flashed my keyboard and it does nothing/keypresses don't register - it's also ARM (rev6 planck, clueboard 60, hs60v2, etc...) (Feb 2019) diff --git a/docs/getting_started_build_tools.md b/docs/getting_started_build_tools.md index 0e1acca66..268cc94c3 100644 --- a/docs/getting_started_build_tools.md +++ b/docs/getting_started_build_tools.md @@ -62,14 +62,14 @@ If you're using [homebrew,](http://brew.sh/) you can use the following commands: brew tap osx-cross/avr brew tap PX4/homebrew-px4 brew update - brew install avr-gcc@7 - brew link --force avr-gcc@7 + brew install avr-gcc@8 + brew link --force avr-gcc@8 brew install dfu-programmer brew install dfu-util brew install gcc-arm-none-eabi brew install avrdude -This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. Note that the `make` and `make install` portion during the homebrew installation of `avr-gcc@7` can take over 20 minutes and exhibit high CPU usage. +This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. Note that the `make` and `make install` portion during the homebrew installation of `avr-gcc@8` can take over 20 minutes and exhibit high CPU usage. ## Windows with msys2 (recommended) diff --git a/docs/zh-cn/faq_build.md b/docs/zh-cn/faq_build.md index 60d902007..8fb449db3 100644 --- a/docs/zh-cn/faq_build.md +++ b/docs/zh-cn/faq_build.md @@ -137,8 +137,8 @@ brew install avrdude ``` brew uninstall --force avr-gcc -brew install avr-gcc@7 -brew link --force avr-gcc@7 +brew install avr-gcc@8 +brew link --force avr-gcc@8 ``` ### 我刷新了我的键盘但是键盘不工作/按键没有注册 - 而且还是ARM的 (rev6 planck, clueboard 60, hs60v2, etc...) (Feb 2019) diff --git a/util/macos_install.sh b/util/macos_install.sh index 93f3ed0b9..915ff3143 100755 --- a/util/macos_install.sh +++ b/util/macos_install.sh @@ -22,5 +22,5 @@ fi brew tap osx-cross/avr brew tap PX4/homebrew-px4 brew update -brew install avr-gcc@7 gcc-arm-none-eabi dfu-programmer avrdude dfu-util python3 -brew link --force avr-gcc@7 +brew install avr-gcc@8 gcc-arm-none-eabi dfu-programmer avrdude dfu-util python3 +brew link --force avr-gcc@8 From 91b0c75045c38a9c770f7835b928b3b298a1ff8f Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 6 Jun 2019 01:01:24 -0400 Subject: [PATCH 186/341] Add meta tags for docs --- docs/index.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/index.html b/docs/index.html index d6fdbdbcc..995d6b8f8 100644 --- a/docs/index.html +++ b/docs/index.html @@ -5,7 +5,11 @@ QMK Firmware - + + + + + From 834a8d1da18688eefe3e9e01f75f3e936f156e10 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 6 Jun 2019 01:07:54 -0400 Subject: [PATCH 187/341] add type:object to docs meta info (github uses it) --- docs/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/index.html b/docs/index.html index 995d6b8f8..77a8085bf 100644 --- a/docs/index.html +++ b/docs/index.html @@ -7,7 +7,8 @@ - + + From fe6b8edd581c334a92a97c15faced95a12d5e882 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 6 Jun 2019 01:23:18 -0400 Subject: [PATCH 188/341] use twitter card large setting for larger previews --- docs/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/index.html b/docs/index.html index 77a8085bf..819045072 100644 --- a/docs/index.html +++ b/docs/index.html @@ -7,10 +7,11 @@ - + + From faaaa134fd436be400aa2c7841b38907899d49a6 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Thu, 6 Jun 2019 12:09:56 -0700 Subject: [PATCH 189/341] Replace DEBOUNCING_DELAY (deprecated) with DEBOUNCE (#5997) --- docs/config_options.md | 2 +- docs/feature_bootmagic.md | 2 +- keyboards/1upkeyboards/1up60hse/config.h | 2 +- keyboards/1upkeyboards/1up60hte/config.h | 4 ++-- keyboards/1upkeyboards/1up60rgb/config.h | 2 +- keyboards/1upkeyboards/super16/config.h | 2 +- keyboards/1upkeyboards/sweet16/config.h | 3 +-- keyboards/40percentclub/25/config.h | 2 +- keyboards/40percentclub/4x4/config.h | 2 +- keyboards/40percentclub/5x5/config.h | 2 +- keyboards/40percentclub/6lit/config.h | 2 +- keyboards/40percentclub/foobar/config.h | 2 +- keyboards/40percentclub/gherkin/config.h | 2 +- keyboards/40percentclub/half_n_half/config.h | 2 +- keyboards/40percentclub/i75/config.h | 2 +- keyboards/40percentclub/luddite/config.h | 2 +- keyboards/40percentclub/mf68/config.h | 2 +- keyboards/40percentclub/nein/config.h | 2 +- keyboards/40percentclub/nori/config.h | 2 +- keyboards/40percentclub/tomato/config.h | 2 +- keyboards/40percentclub/ut47/config.h | 2 +- keyboards/abstract/ellipse/rev1/config.h | 2 +- keyboards/acr60/config.h | 2 +- keyboards/adkb96/rev1/config.h | 5 ++--- keyboards/aeboards/aegis/config.h | 3 +-- keyboards/ai03/lunar/config.h | 4 ++-- keyboards/ai03/orbit/config.h | 2 +- keyboards/al1/config.h | 2 +- keyboards/al1/matrix.c | 8 ++++---- keyboards/alf/dc60/config.h | 2 +- keyboards/alf/x11/config.h | 2 +- keyboards/alf/x2/config.h | 2 +- keyboards/alpha/config.h | 2 +- keyboards/alu84/config.h | 2 +- keyboards/amj40/config.h | 2 +- keyboards/amj60/config.h | 2 +- keyboards/amj96/config.h | 2 +- keyboards/amjpad/config.h | 2 +- keyboards/ares/config.h | 4 ++-- keyboards/at101_blackheart/config.h | 2 +- keyboards/atom47/rev2/config.h | 2 +- keyboards/atom47/rev3/config.h | 2 +- keyboards/atomic/config.h | 2 +- keyboards/atomic/keymaps/pvc/config.h | 2 +- keyboards/atreus/config.h | 2 +- keyboards/atreus/keymaps/alphadox/config.h | 2 +- keyboards/atreus/keymaps/dvorak_42_key/config.h | 2 +- keyboards/atreus/keymaps/erlandsona/config.h | 2 +- keyboards/atreus62/config.h | 2 +- keyboards/baguette/baguette.c | 2 +- keyboards/baguette/config.h | 2 +- keyboards/bantam44/config.h | 2 +- keyboards/bfake/config.h | 2 +- keyboards/bigseries/1key/config.h | 2 +- keyboards/bigseries/2key/config.h | 2 +- keyboards/bigseries/3key/config.h | 2 +- keyboards/bigseries/4key/config.h | 2 +- keyboards/bigswitch/config.h | 2 +- keyboards/bigswitch/keymaps/wanleg/config.h | 4 ++-- keyboards/blockey/config.h | 2 +- keyboards/bm16a/config.h | 2 +- keyboards/bm16s/config.h | 2 +- keyboards/boardwalk/config.h | 2 +- keyboards/bpiphany/frosty_flake/config.h | 2 +- keyboards/bpiphany/frosty_flake/matrix.c | 8 ++++---- keyboards/bpiphany/kitten_paw/config.h | 2 +- keyboards/bpiphany/kitten_paw/matrix.c | 8 ++++---- keyboards/bpiphany/pegasushoof/config.h | 2 +- keyboards/bpiphany/pegasushoof/matrix.c | 4 ++-- keyboards/bpiphany/sixshooter/config.h | 2 +- keyboards/bpiphany/tiger_lily/config.h | 2 +- keyboards/bpiphany/tiger_lily/matrix.c | 8 ++++---- keyboards/bpiphany/unloved_bastard/config.h | 2 +- keyboards/bpiphany/unloved_bastard/matrix.c | 8 ++++---- keyboards/bthlabs/geekpad/config.h | 2 +- keyboards/butterstick/config.h | 3 +-- keyboards/canoe/config.h | 2 +- keyboards/catch22/config.h | 2 +- keyboards/christmas_tree/config.h | 2 +- keyboards/ckeys/handwire_101/config.h | 2 +- keyboards/ckeys/nakey/config.h | 2 +- keyboards/ckeys/obelus/config.h | 2 +- keyboards/claw44/rev1/config.h | 2 +- keyboards/clueboard/17/config.h | 2 +- keyboards/clueboard/2x1800/config.h | 2 +- keyboards/clueboard/66/rev1/config.h | 2 +- keyboards/clueboard/66/rev2/config.h | 2 +- keyboards/clueboard/66/rev3/config.h | 2 +- keyboards/clueboard/66/rev4/config.h | 2 +- keyboards/clueboard/66_hotswap/config.h | 2 +- keyboards/clueboard/card/config.h | 2 +- keyboards/contra/config.h | 2 +- keyboards/converter/hp_46010a/config.h | 4 +--- keyboards/converter/hp_46010a/matrix.c | 14 +++++++------- keyboards/converter/ibm_5291/config.h | 4 +--- keyboards/converter/ibm_5291/matrix.c | 16 ++++++++-------- keyboards/converter/modelm101/config.h | 4 ++-- keyboards/converter/numeric_keypad_IIe/config.h | 6 +++--- keyboards/coseyfannitutti/mullet/config.h | 3 +-- keyboards/coseyfannitutti/mulletpad/config.h | 3 +-- keyboards/cospad/config.h | 2 +- keyboards/crawlpad/config.h | 3 +-- keyboards/crkbd/rev1/config.h | 2 +- keyboards/cu24/config.h | 4 ++-- keyboards/cu75/config.h | 2 +- keyboards/daisy/config.h | 4 ++-- keyboards/dc01/arrow/config.h | 2 +- keyboards/dc01/arrow/matrix.c | 16 ++++++++-------- keyboards/dc01/left/config.h | 2 +- keyboards/dc01/left/matrix.c | 16 ++++++++-------- keyboards/dc01/numpad/config.h | 2 +- keyboards/dc01/numpad/matrix.c | 16 ++++++++-------- keyboards/dc01/right/config.h | 2 +- keyboards/dc01/right/matrix.c | 16 ++++++++-------- keyboards/deltasplit75/matrix.c | 14 +++++++------- keyboards/deltasplit75/v2/config.h | 2 +- keyboards/diverge3/config.h | 2 +- keyboards/divergetm2/config.h | 2 +- keyboards/dk60/config.h | 2 +- keyboards/do60/config.h | 2 +- keyboards/donutcables/budget96/config.h | 2 +- keyboards/donutcables/scrabblepad/config.h | 2 +- keyboards/doro67/rgb/config.h | 4 ++-- keyboards/dozen0/config.h | 2 +- keyboards/duck/eagle_viper/v2/config.h | 3 +-- keyboards/duck/eagle_viper/v2/matrix.c | 4 ++-- keyboards/duck/jetfire/config.h | 2 +- keyboards/duck/jetfire/matrix.c | 4 ++-- keyboards/duck/lightsaver/config.h | 3 +-- keyboards/duck/lightsaver/matrix.c | 4 ++-- keyboards/duck/octagon/v1/config.h | 2 +- keyboards/duck/octagon/v1/matrix.c | 4 ++-- keyboards/duck/octagon/v2/config.h | 3 +-- keyboards/duck/octagon/v2/matrix.c | 4 ++-- keyboards/dz60/config.h | 2 +- keyboards/dz60/keymaps/LEdiodes/config.h | 2 +- keyboards/eco/config.h | 2 +- keyboards/ep/40/config.h | 2 +- keyboards/ep/96/config.h | 2 +- keyboards/ergo42/matrix.c | 14 +++++++------- keyboards/ergo42/rev1/config.h | 2 +- keyboards/ergodash/mini/config.h | 2 +- keyboards/ergodash/rev1/config.h | 2 +- keyboards/ergoinu/config.h | 2 +- keyboards/ergotravel/rev1/config.h | 2 +- keyboards/espectro/config.h | 2 +- keyboards/evil80/config.h | 2 +- keyboards/exclusive/e6v2/le/config.h | 2 +- keyboards/exclusive/e6v2/oe/config.h | 2 +- keyboards/exclusive/e7v1/config.h | 2 +- keyboards/facew/config.h | 2 +- keyboards/fc660c/config.h | 2 +- keyboards/fc980c/config.h | 2 +- keyboards/felix/config.h | 2 +- keyboards/fleuron/config.h | 2 +- keyboards/fortitude60/matrix.c | 14 +++++++------- keyboards/fortitude60/rev1/config.h | 2 +- keyboards/four_banger/config.h | 2 +- keyboards/foxlab/leaf60/hotswap/config.h | 2 +- keyboards/foxlab/leaf60/universal/config.h | 2 +- keyboards/fractal/config.h | 2 +- keyboards/ft/mars80/config.h | 3 +-- keyboards/gh60/config.h | 2 +- keyboards/gh60/keymaps/dbroqua/config.h | 2 +- keyboards/gh60/keymaps/robotmaxtron/config.h | 2 +- keyboards/gh80_3000/config.h | 2 +- keyboards/gonnerd/config.h | 2 +- keyboards/gray_studio/cod67/config.h | 2 +- keyboards/gray_studio/space65/config.h | 2 +- keyboards/gskt00/config.h | 2 +- keyboards/hadron/config.h | 2 +- keyboards/halberd/config.h | 4 +--- keyboards/handwired/108key_trackpoint/config.h | 2 +- keyboards/handwired/412_64/config.h | 2 +- keyboards/handwired/arrow_pad/config.h | 2 +- .../handwired/arrow_pad/keymaps/pad_21/config.h | 2 +- .../handwired/arrow_pad/keymaps/pad_24/config.h | 2 +- keyboards/handwired/atreus50/config.h | 2 +- keyboards/handwired/cmd60/config.h | 2 +- keyboards/handwired/dactyl/matrix.c | 16 ++++++++-------- keyboards/handwired/dactyl_manuform/config.h | 2 +- keyboards/handwired/dactyl_promicro/config.h | 2 +- keyboards/handwired/daishi/config.h | 2 +- keyboards/handwired/datahand/config.h | 2 +- keyboards/handwired/downbubble/config.h | 2 +- keyboards/handwired/fivethirteen/config.h | 2 +- keyboards/handwired/gamenum/config.h | 2 +- keyboards/handwired/hacked_motospeed/config.h | 2 +- keyboards/handwired/hexon38/config.h | 2 +- keyboards/handwired/ibm122m/config.h | 2 +- keyboards/handwired/jn68m/config.h | 2 +- keyboards/handwired/jot50/config.h | 2 +- keyboards/handwired/jotanck/config.h | 2 +- keyboards/handwired/jotpad16/config.h | 3 +-- keyboards/handwired/kbod/config.h | 2 +- keyboards/handwired/maartenwut/config.h | 2 +- keyboards/handwired/magicforce61/config.h | 2 +- keyboards/handwired/magicforce68/config.h | 2 +- keyboards/handwired/mechboards_micropad/config.h | 2 +- keyboards/handwired/minorca/config.h | 2 +- keyboards/handwired/ms_sculpt_mobile/config.h | 2 +- keyboards/handwired/not_so_minidox/config.h | 2 +- keyboards/handwired/numbrero/config.h | 2 +- keyboards/handwired/numpad20/config.h | 2 +- keyboards/handwired/ortho5x13/config.h | 2 +- keyboards/handwired/pilcrow/config.h | 2 +- keyboards/handwired/prime_exl/config.h | 2 +- keyboards/handwired/promethium/config.h | 2 +- keyboards/handwired/promethium/matrix.c | 15 +++++++-------- keyboards/handwired/pteron/config.h | 2 +- keyboards/handwired/qc60/config.h | 2 +- keyboards/handwired/reddot/config.h | 2 +- keyboards/handwired/retro_refit/config.h | 2 +- keyboards/handwired/space_oddity/config.h | 2 +- keyboards/handwired/splittest/config.h | 2 +- keyboards/handwired/tennie/config.h | 2 +- keyboards/handwired/terminus_mini/config.h | 2 +- keyboards/handwired/trackpoint/config.h | 2 +- keyboards/handwired/tradestation/config.h | 2 +- keyboards/handwired/traveller/config.h | 2 +- keyboards/handwired/woodpad/config.h | 2 +- keyboards/handwired/xealous/rev1/config.h | 2 +- keyboards/hecomi/alpha/config.h | 2 +- keyboards/helix/pico/config.h | 2 +- keyboards/helix/rev1/config.h | 2 +- keyboards/helix/rev2/config.h | 2 +- keyboards/hid_liber/config.h | 2 +- keyboards/hifumi/config.h | 2 +- keyboards/hineybush/h87a/config.h | 2 +- keyboards/hineybush/hineyg80/config.h | 3 +-- keyboards/hs60/v1/config.h | 2 +- keyboards/hs60/v1/v1.c | 2 +- keyboards/hs60/v2/config.h | 2 +- keyboards/idobo/config.h | 2 +- keyboards/jc65/v32u4/config.h | 2 +- keyboards/jd40/config.h | 2 +- keyboards/jd45/config.h | 2 +- keyboards/jd45/keymaps/mjt/config.h | 2 +- keyboards/jj40/config.h | 2 +- keyboards/jj4x4/config.h | 2 +- keyboards/kagamidget/config.h | 2 +- keyboards/katana60/config.h | 2 +- keyboards/kbdfans/kbd19x/config.h | 2 +- keyboards/kbdfans/kbd4x/config.h | 2 +- keyboards/kbdfans/kbd66/config.h | 3 +-- keyboards/kbdfans/kbd67/hotswap/config.h | 2 +- keyboards/kbdfans/kbd67/rev1/config.h | 2 +- keyboards/kbdfans/kbd67/rev2/config.h | 2 +- keyboards/kbdfans/kbd6x/config.h | 2 +- keyboards/kbdfans/kbd75/config.h | 2 +- keyboards/kbdfans/kbd8x/config.h | 2 +- keyboards/kc60/config.h | 2 +- keyboards/kc60se/config.h | 2 +- keyboards/keebio/bdn9/config.h | 2 +- keyboards/keebio/bfo9000/config.h | 2 +- keyboards/keebio/chocopad/config.h | 2 +- keyboards/keebio/dilly/config.h | 2 +- keyboards/keebio/fourier/config.h | 2 +- keyboards/keebio/levinson/rev1/config.h | 2 +- keyboards/keebio/levinson/rev2/config.h | 2 +- keyboards/keebio/nyquist/rev1/config.h | 2 +- keyboards/keebio/nyquist/rev2/config.h | 2 +- keyboards/keebio/nyquist/rev3/config.h | 2 +- keyboards/keebio/quefrency/rev1/config.h | 2 +- keyboards/keebio/rorschach/rev1/config.h | 2 +- keyboards/keebio/tragicforce68/config.h | 2 +- keyboards/keebio/viterbi/rev1/config.h | 2 +- keyboards/keebio/viterbi/rev2/config.h | 2 +- keyboards/keebio/wavelet/config.h | 2 +- keyboards/keycapsss/o4l_5x12/config.h | 2 +- keyboards/kinesis/config.h | 2 +- keyboards/kinesis/stapelberg/config.h | 2 +- keyboards/kira75/config.h | 2 +- keyboards/kmac/config.h | 2 +- keyboards/kmac/matrix.c | 6 +++--- keyboards/kmini/config.h | 2 +- keyboards/kmini/matrix.c | 6 +++--- keyboards/knops/mini/config.h | 2 +- keyboards/kona_classic/config.h | 2 +- keyboards/laptreus/config.h | 2 +- keyboards/launchpad/config.h | 2 +- keyboards/lazydesigners/dimple/config.h | 2 +- keyboards/lazydesigners/the50/config.h | 2 +- keyboards/lazydesigners/the60/config.h | 2 +- keyboards/lets_split/rev1/config.h | 2 +- keyboards/lets_split/rev2/config.h | 2 +- keyboards/lets_split/sockets/config.h | 2 +- keyboards/lets_split_eh/config.h | 2 +- keyboards/lfkeyboards/lfk65_hs/config.h | 2 +- keyboards/lfkeyboards/lfk78/config.h | 2 +- keyboards/lfkeyboards/lfk87/config.h | 2 +- keyboards/lfkeyboards/lfkpad/config.h | 2 +- keyboards/lfkeyboards/mini1800/config.h | 2 +- keyboards/lfkeyboards/smk65/config.h | 2 +- keyboards/lily58/matrix.c | 14 +++++++------- keyboards/lily58/rev1/config.h | 2 +- keyboards/m0lly/config.h | 2 +- keyboards/m10a/config.h | 2 +- keyboards/massdrop/alt/config.h | 2 +- keyboards/massdrop/alt/matrix.c | 2 +- keyboards/massdrop/ctrl/config.h | 2 +- keyboards/massdrop/ctrl/matrix.c | 2 +- keyboards/maxipad/config.h | 2 +- keyboards/mechkeys/mk60/config.h | 2 +- keyboards/mechmini/v2/config.h | 2 +- keyboards/meira/featherble/config.h | 2 +- keyboards/meira/matrix.c | 14 ++++++-------- keyboards/meira/promicro/config.h | 2 +- keyboards/meishi/config.h | 3 +-- keyboards/melody96/config.h | 2 +- keyboards/meme/config.h | 2 +- keyboards/miniaxe/config.h | 2 +- keyboards/minidox/config.h | 2 +- keyboards/mint60/config.h | 2 +- keyboards/miuni32/config.h | 2 +- keyboards/model01/config.h | 2 +- keyboards/mt40/config.h | 2 +- keyboards/mt980/config.h | 2 +- keyboards/mxss/config.h | 2 +- keyboards/namecard2x4/rev1/config.h | 2 +- keyboards/namecard2x4/rev2/config.h | 2 +- keyboards/nek_type_a/config.h | 4 +--- keyboards/nek_type_a/matrix.c | 16 ++++++++-------- keyboards/niu_mini/config.h | 2 +- keyboards/nk65/config.h | 2 +- keyboards/novelpad/config.h | 2 +- keyboards/noxary/220/config.h | 2 +- keyboards/noxary/260/config.h | 2 +- keyboards/noxary/268/config.h | 2 +- keyboards/noxary/268_2/config.h | 2 +- keyboards/noxary/280/config.h | 2 +- keyboards/noxary/x268/config.h | 2 +- keyboards/ok60/config.h | 2 +- keyboards/omnikey_blackheart/config.h | 2 +- keyboards/orange75/config.h | 2 +- keyboards/org60/config.h | 2 +- keyboards/orthodox/rev1/config.h | 2 +- keyboards/orthodox/rev3/config.h | 2 +- keyboards/orthodox/rev3_teensy/config.h | 2 +- keyboards/paladin64/config.h | 2 +- keyboards/panc60/config.h | 2 +- keyboards/pearl/config.h | 2 +- keyboards/phantom/config.h | 2 +- keyboards/pinky/3/config.h | 2 +- keyboards/pinky/4/config.h | 2 +- keyboards/plaid/config.h | 2 +- keyboards/plain60/config.h | 2 +- keyboards/planck/config.h | 2 +- keyboards/planck/keymaps/dodger/config.h | 2 +- keyboards/playkbtw/ca66/ca66.c | 2 +- keyboards/playkbtw/ca66/config.h | 2 +- keyboards/playkbtw/pk60/config.h | 2 +- keyboards/preonic/config.h | 2 +- keyboards/preonic/keymaps/kinesis/config.h | 2 +- keyboards/preonic/keymaps/zach/config.h | 2 +- keyboards/primekb/prime_e/config.h | 2 +- keyboards/primekb/prime_l/config.h | 2 +- keyboards/primekb/prime_m/config.h | 2 +- keyboards/primekb/prime_o/config.h | 2 +- keyboards/primekb/prime_r/config.h | 2 +- keyboards/puck/config.h | 2 +- keyboards/quantrik/kyuu/config.h | 2 +- keyboards/qwertyydox/config.h | 2 +- keyboards/qwertyydox/rev1/config.h | 2 +- keyboards/rama/koyu/config.h | 2 +- keyboards/rama/m10_b/config.h | 2 +- keyboards/rama/m60_a/config.h | 2 +- keyboards/rama/m6_a/config.h | 2 +- keyboards/rama/m6_b/config.h | 2 +- keyboards/rama/u80_a/config.h | 2 +- keyboards/redox/rev1/config.h | 2 +- keyboards/rgbkb/sol/config.h | 2 +- keyboards/rgbkb/zen/rev1/config.h | 2 +- keyboards/rgbkb/zen/rev2/config.h | 2 +- keyboards/rgbkb/zygomorph/rev1/config.h | 2 +- keyboards/romac/config.h | 2 +- keyboards/s7_elephant/config.h | 2 +- keyboards/satan/config.h | 2 +- keyboards/satan/keymaps/admiralStrokers/config.h | 2 +- keyboards/satan/keymaps/fakb/config.h | 2 +- keyboards/scarletbandana/config.h | 2 +- keyboards/scythe/config.h | 3 +-- keyboards/sentraq/number_pad/config.h | 2 +- keyboards/sentraq/s60_x/default/config.h | 3 +-- .../sentraq/s60_x/keymaps/bluebear/config.h | 2 +- keyboards/sentraq/s60_x/rgb/config.h | 3 +-- keyboards/sentraq/s65_plus/config.h | 2 +- keyboards/sentraq/s65_x/config.h | 2 +- keyboards/signum/3_0/elitec/config.h | 2 +- keyboards/singa/config.h | 2 +- keyboards/sixkeyboard/config.h | 2 +- keyboards/snagpad/config.h | 2 +- keyboards/southpole/config.h | 2 +- keyboards/speedo/config.h | 2 +- keyboards/standaside/config.h | 3 +-- keyboards/staryu/config.h | 2 +- keyboards/subatomic/config.h | 2 +- keyboards/sx60/config.h | 2 +- keyboards/sx60/matrix.c | 14 +++++++------- keyboards/tada68/config.h | 2 +- keyboards/tetris/config.h | 3 +-- keyboards/the_ruler/config.h | 2 +- keyboards/thevankeyboards/bananasplit/config.h | 2 +- keyboards/thevankeyboards/minivan/config.h | 2 +- .../minivan/keymaps/budi/config.h | 6 +++--- keyboards/thevankeyboards/roadkit/config.h | 2 +- keyboards/tkc1800/config.h | 2 +- keyboards/tmo50/config.h | 2 +- keyboards/toad/config.h | 2 +- keyboards/tokyo60/config.h | 2 +- keyboards/touchpad/config.h | 2 +- keyboards/treadstone32/config.h | 2 +- keyboards/treadstone48/rev1/config.h | 2 +- keyboards/treasure/type9/config.h | 2 +- keyboards/uk78/config.h | 2 +- keyboards/ut472/config.h | 2 +- keyboards/v60_type_r/config.h | 2 +- keyboards/vision_division/config.h | 2 +- keyboards/vitamins_included/matrix.c | 14 +++++++------- keyboards/vitamins_included/rev1/config.h | 2 +- keyboards/waldo/config.h | 2 +- keyboards/wasdat/config.h | 2 +- keyboards/westfoxtrot/aanzee/config.h | 2 +- keyboards/westfoxtrot/cyclops/config.h | 4 ++-- keyboards/westfoxtrot/cypher/config.h | 2 +- keyboards/wilba_tech/wt60_a/config.h | 2 +- keyboards/wilba_tech/wt65_a/config.h | 2 +- keyboards/wilba_tech/wt69_a/config.h | 2 +- keyboards/wilba_tech/wt75_a/config.h | 2 +- keyboards/wilba_tech/wt80_a/config.h | 2 +- keyboards/wilba_tech/wt8_a/config.h | 2 +- keyboards/xd60/rev2/config.h | 2 +- keyboards/xd60/rev3/config.h | 2 +- keyboards/xd75/config.h | 4 ++-- keyboards/xd84/config.h | 2 +- keyboards/xd87/config.h | 2 +- keyboards/xd96/config.h | 2 +- keyboards/xmmx/config.h | 2 +- keyboards/yd60mq/config.h | 3 +-- keyboards/yd68/config.h | 2 +- keyboards/yosino58/rev1/config.h | 4 ++-- keyboards/z150_blackheart/config.h | 2 +- keyboards/zeal60/config.h | 2 +- keyboards/zeal60/zeal60.c | 5 ++--- keyboards/zeal65/config.h | 2 +- keyboards/zinc/rev1/config.h | 4 ++-- keyboards/zinc/reva/config.h | 4 ++-- keyboards/zlant/config.h | 2 +- 448 files changed, 594 insertions(+), 627 deletions(-) diff --git a/docs/config_options.md b/docs/config_options.md index cab3c0747..f4035809a 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -83,7 +83,7 @@ This is a C header file that is one of the first things included, and will persi * enables backlight breathing (only works with backlight pins B5, B6 and B7) * `#define BREATHING_PERIOD 6` * the length of one backlight "breath" in seconds -* `#define DEBOUNCING_DELAY 5` +* `#define DEBOUNCE 5` * the delay when reading the value of the pin (5 is default) * `#define LOCKING_SUPPORT_ENABLE` * mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap diff --git a/docs/feature_bootmagic.md b/docs/feature_bootmagic.md index 39e4e47f4..225189ccb 100644 --- a/docs/feature_bootmagic.md +++ b/docs/feature_bootmagic.md @@ -140,7 +140,7 @@ To replace the function, all you need to do is add something like this to your c ```c void bootmagic_lite(void) { matrix_scan(); - wait_ms(DEBOUNCING_DELAY * 2); + wait_ms(DEBOUNCE * 2); matrix_scan(); if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) { diff --git a/keyboards/1upkeyboards/1up60hse/config.h b/keyboards/1upkeyboards/1up60hse/config.h index 188603622..3781d7bcf 100644 --- a/keyboards/1upkeyboards/1up60hse/config.h +++ b/keyboards/1upkeyboards/1up60hse/config.h @@ -62,7 +62,7 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/1upkeyboards/1up60hte/config.h b/keyboards/1upkeyboards/1up60hte/config.h index 892a8b9fe..bcf6329f7 100644 --- a/keyboards/1upkeyboards/1up60hte/config.h +++ b/keyboards/1upkeyboards/1up60hte/config.h @@ -47,7 +47,7 @@ along with this program. If not, see . #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE @@ -62,4 +62,4 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 -#endif \ No newline at end of file +#endif diff --git a/keyboards/1upkeyboards/1up60rgb/config.h b/keyboards/1upkeyboards/1up60rgb/config.h index fbafe0c44..6cf5b6904 100644 --- a/keyboards/1upkeyboards/1up60rgb/config.h +++ b/keyboards/1upkeyboards/1up60rgb/config.h @@ -29,7 +29,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/1upkeyboards/super16/config.h b/keyboards/1upkeyboards/super16/config.h index 4af4dda63..a50821637 100644 --- a/keyboards/1upkeyboards/super16/config.h +++ b/keyboards/1upkeyboards/super16/config.h @@ -80,7 +80,7 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/1upkeyboards/sweet16/config.h b/keyboards/1upkeyboards/sweet16/config.h index b05b57740..23b590c2c 100644 --- a/keyboards/1upkeyboards/sweet16/config.h +++ b/keyboards/1upkeyboards/sweet16/config.h @@ -29,7 +29,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE @@ -45,4 +45,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - diff --git a/keyboards/40percentclub/25/config.h b/keyboards/40percentclub/25/config.h index 7381a76d9..c9c02b47e 100644 --- a/keyboards/40percentclub/25/config.h +++ b/keyboards/40percentclub/25/config.h @@ -71,7 +71,7 @@ // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/40percentclub/4x4/config.h b/keyboards/40percentclub/4x4/config.h index 3b41e501d..09ec5a4ec 100644 --- a/keyboards/40percentclub/4x4/config.h +++ b/keyboards/40percentclub/4x4/config.h @@ -38,7 +38,7 @@ // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/40percentclub/5x5/config.h b/keyboards/40percentclub/5x5/config.h index f1c348a48..a9d294bc9 100644 --- a/keyboards/40percentclub/5x5/config.h +++ b/keyboards/40percentclub/5x5/config.h @@ -47,7 +47,7 @@ // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/40percentclub/6lit/config.h b/keyboards/40percentclub/6lit/config.h index c6beafa41..110362a62 100644 --- a/keyboards/40percentclub/6lit/config.h +++ b/keyboards/40percentclub/6lit/config.h @@ -72,7 +72,7 @@ // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/40percentclub/foobar/config.h b/keyboards/40percentclub/foobar/config.h index 1443c1ca1..15af4ad5b 100644 --- a/keyboards/40percentclub/foobar/config.h +++ b/keyboards/40percentclub/foobar/config.h @@ -72,7 +72,7 @@ // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/40percentclub/gherkin/config.h b/keyboards/40percentclub/gherkin/config.h index d0c2be35b..4dc794e34 100644 --- a/keyboards/40percentclub/gherkin/config.h +++ b/keyboards/40percentclub/gherkin/config.h @@ -29,7 +29,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/40percentclub/half_n_half/config.h b/keyboards/40percentclub/half_n_half/config.h index c74fcacbb..cd7515f0b 100644 --- a/keyboards/40percentclub/half_n_half/config.h +++ b/keyboards/40percentclub/half_n_half/config.h @@ -81,7 +81,7 @@ along with this program. If not, see . // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/40percentclub/i75/config.h b/keyboards/40percentclub/i75/config.h index 611ae62b3..f9b5d57dd 100644 --- a/keyboards/40percentclub/i75/config.h +++ b/keyboards/40percentclub/i75/config.h @@ -27,7 +27,7 @@ #define DESCRIPTION i75 15x5 ortholinear keyboard /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/40percentclub/luddite/config.h b/keyboards/40percentclub/luddite/config.h index 5a6f2c799..36bda0614 100644 --- a/keyboards/40percentclub/luddite/config.h +++ b/keyboards/40percentclub/luddite/config.h @@ -26,7 +26,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/40percentclub/mf68/config.h b/keyboards/40percentclub/mf68/config.h index 25252d160..5bda9bb78 100644 --- a/keyboards/40percentclub/mf68/config.h +++ b/keyboards/40percentclub/mf68/config.h @@ -75,7 +75,7 @@ along with this program. If not, see . // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/40percentclub/nein/config.h b/keyboards/40percentclub/nein/config.h index 05fd93d24..da1bc91dd 100644 --- a/keyboards/40percentclub/nein/config.h +++ b/keyboards/40percentclub/nein/config.h @@ -76,7 +76,7 @@ // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/40percentclub/nori/config.h b/keyboards/40percentclub/nori/config.h index a3366de62..ecaa68ada 100644 --- a/keyboards/40percentclub/nori/config.h +++ b/keyboards/40percentclub/nori/config.h @@ -60,7 +60,7 @@ #define RGBLIGHT_VAL_STEP 8 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/40percentclub/tomato/config.h b/keyboards/40percentclub/tomato/config.h index db90d8042..e131ce5c2 100644 --- a/keyboards/40percentclub/tomato/config.h +++ b/keyboards/40percentclub/tomato/config.h @@ -23,7 +23,7 @@ #define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE diff --git a/keyboards/40percentclub/ut47/config.h b/keyboards/40percentclub/ut47/config.h index 87f2bedd7..25ef4271f 100644 --- a/keyboards/40percentclub/ut47/config.h +++ b/keyboards/40percentclub/ut47/config.h @@ -43,7 +43,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/abstract/ellipse/rev1/config.h b/keyboards/abstract/ellipse/rev1/config.h index 4fcf96eb3..a56bfba2f 100644 --- a/keyboards/abstract/ellipse/rev1/config.h +++ b/keyboards/abstract/ellipse/rev1/config.h @@ -75,7 +75,7 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/acr60/config.h b/keyboards/acr60/config.h index ab5a1932b..9b2b2a2f0 100644 --- a/keyboards/acr60/config.h +++ b/keyboards/acr60/config.h @@ -28,7 +28,7 @@ #define BACKLIGHT_LEVELS 5 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/adkb96/rev1/config.h b/keyboards/adkb96/rev1/config.h index 8bdacb4cb..cff135c26 100644 --- a/keyboards/adkb96/rev1/config.h +++ b/keyboards/adkb96/rev1/config.h @@ -22,7 +22,7 @@ along with this program. If not, see . #define DEVICE_VER 0x0001 #define MANUFACTURER Bit Trade One #define PRODUCT ADKB96 -#define DESCRIPTION +#define DESCRIPTION /* key matrix size */ // Rows are doubled-up @@ -45,7 +45,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE @@ -75,4 +75,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - diff --git a/keyboards/aeboards/aegis/config.h b/keyboards/aeboards/aegis/config.h index 787c0f485..8db31b254 100644 --- a/keyboards/aeboards/aegis/config.h +++ b/keyboards/aeboards/aegis/config.h @@ -39,7 +39,7 @@ #define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE @@ -68,4 +68,3 @@ #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 899 #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 125 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 - diff --git a/keyboards/ai03/lunar/config.h b/keyboards/ai03/lunar/config.h index 2fe66d4bc..a9d192554 100644 --- a/keyboards/ai03/lunar/config.h +++ b/keyboards/ai03/lunar/config.h @@ -80,7 +80,7 @@ along with this program. If not, see . // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST @@ -262,5 +262,5 @@ along with this program. If not, see . // DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR = DYNAMIC_KEYMAP_EEPROM_ADDR + (DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2) #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 635 // DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE = 1024 - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 389 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 389 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/ai03/orbit/config.h b/keyboards/ai03/orbit/config.h index f4dc4fd63..00945ac79 100644 --- a/keyboards/ai03/orbit/config.h +++ b/keyboards/ai03/orbit/config.h @@ -89,7 +89,7 @@ along with this program. If not, see . // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/al1/config.h b/keyboards/al1/config.h index 838d56963..f4ded4346 100644 --- a/keyboards/al1/config.h +++ b/keyboards/al1/config.h @@ -51,7 +51,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/al1/matrix.c b/keyboards/al1/matrix.c index 0b7ec2c8a..f6e951087 100644 --- a/keyboards/al1/matrix.c +++ b/keyboards/al1/matrix.c @@ -7,10 +7,10 @@ #include "util.h" #include "matrix.h" -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 +#ifndef DEBOUNCE +# define DEBOUNCE 5 #endif -static uint8_t debouncing = DEBOUNCING_DELAY; +static uint8_t debouncing = DEBOUNCE; static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; @@ -69,7 +69,7 @@ uint8_t matrix_scan(void) { bool curr_bit = rows & (1<. #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/alf/x11/config.h b/keyboards/alf/x11/config.h index 14c97247b..587e97cd8 100644 --- a/keyboards/alf/x11/config.h +++ b/keyboards/alf/x11/config.h @@ -80,7 +80,7 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/alf/x2/config.h b/keyboards/alf/x2/config.h index 21d919983..205fa358f 100644 --- a/keyboards/alf/x2/config.h +++ b/keyboards/alf/x2/config.h @@ -30,7 +30,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/alpha/config.h b/keyboards/alpha/config.h index b177c8a4b..b7348bef1 100755 --- a/keyboards/alpha/config.h +++ b/keyboards/alpha/config.h @@ -30,7 +30,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/alu84/config.h b/keyboards/alu84/config.h index 257c22e53..130e2f1b4 100755 --- a/keyboards/alu84/config.h +++ b/keyboards/alu84/config.h @@ -46,7 +46,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/amj40/config.h b/keyboards/amj40/config.h index 4d5e4889c..f9a3c1ac6 100755 --- a/keyboards/amj40/config.h +++ b/keyboards/amj40/config.h @@ -47,7 +47,7 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/amj60/config.h b/keyboards/amj60/config.h index 165f20cd4..81b70111b 100644 --- a/keyboards/amj60/config.h +++ b/keyboards/amj60/config.h @@ -47,7 +47,7 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/amj96/config.h b/keyboards/amj96/config.h index 866bcd526..1f1be03ce 100644 --- a/keyboards/amj96/config.h +++ b/keyboards/amj96/config.h @@ -64,7 +64,7 @@ along with this program. If not, see . #define BACKLIGHT_CUSTOM /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/amjpad/config.h b/keyboards/amjpad/config.h index f568d82f0..bbb48624f 100644 --- a/keyboards/amjpad/config.h +++ b/keyboards/amjpad/config.h @@ -47,7 +47,7 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/ares/config.h b/keyboards/ares/config.h index f278c6fdc..cca26aab3 100644 --- a/keyboards/ares/config.h +++ b/keyboards/ares/config.h @@ -34,7 +34,7 @@ along with this program. If not, see . #define UNUSED_PINS {} #define DIODE_DIRECTION COL2ROW -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #define NO_BACKLIGHT_CLOCK #define BACKLIGHT_LEVELS 1 @@ -48,4 +48,4 @@ along with this program. If not, see . /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 -// #define BOOTMAGIC_LITE_COLUMN 0 \ No newline at end of file +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/at101_blackheart/config.h b/keyboards/at101_blackheart/config.h index af4be3d71..83814c648 100644 --- a/keyboards/at101_blackheart/config.h +++ b/keyboards/at101_blackheart/config.h @@ -23,7 +23,7 @@ #define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/atom47/rev2/config.h b/keyboards/atom47/rev2/config.h index 7a044620b..c38cd450e 100644 --- a/keyboards/atom47/rev2/config.h +++ b/keyboards/atom47/rev2/config.h @@ -47,7 +47,7 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/atom47/rev3/config.h b/keyboards/atom47/rev3/config.h index e14800b0f..5a302abff 100644 --- a/keyboards/atom47/rev3/config.h +++ b/keyboards/atom47/rev3/config.h @@ -47,7 +47,7 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Backlight configuration */ diff --git a/keyboards/atomic/config.h b/keyboards/atomic/config.h index 8af23ffeb..045f86727 100644 --- a/keyboards/atomic/config.h +++ b/keyboards/atomic/config.h @@ -52,7 +52,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/atomic/keymaps/pvc/config.h b/keyboards/atomic/keymaps/pvc/config.h index 50afa7688..3803a2ccd 100644 --- a/keyboards/atomic/keymaps/pvc/config.h +++ b/keyboards/atomic/keymaps/pvc/config.h @@ -37,7 +37,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/atreus/config.h b/keyboards/atreus/config.h index 18c66c4e2..b1559a29d 100644 --- a/keyboards/atreus/config.h +++ b/keyboards/atreus/config.h @@ -59,7 +59,7 @@ along with this program. If not, see . //#define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/atreus/keymaps/alphadox/config.h b/keyboards/atreus/keymaps/alphadox/config.h index e81029a03..e998e5edc 100644 --- a/keyboards/atreus/keymaps/alphadox/config.h +++ b/keyboards/atreus/keymaps/alphadox/config.h @@ -47,7 +47,7 @@ along with this program. If not, see . //#define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/atreus/keymaps/dvorak_42_key/config.h b/keyboards/atreus/keymaps/dvorak_42_key/config.h index 953178ee4..12a221d7f 100644 --- a/keyboards/atreus/keymaps/dvorak_42_key/config.h +++ b/keyboards/atreus/keymaps/dvorak_42_key/config.h @@ -71,7 +71,7 @@ along with this program. If not, see . //#define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/atreus/keymaps/erlandsona/config.h b/keyboards/atreus/keymaps/erlandsona/config.h index 5af7e6e6c..4a7ade96a 100644 --- a/keyboards/atreus/keymaps/erlandsona/config.h +++ b/keyboards/atreus/keymaps/erlandsona/config.h @@ -62,7 +62,7 @@ along with this program. If not, see . //#define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/atreus62/config.h b/keyboards/atreus62/config.h index 67b5f9cb2..a7fe5f354 100644 --- a/keyboards/atreus62/config.h +++ b/keyboards/atreus62/config.h @@ -48,7 +48,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/baguette/baguette.c b/keyboards/baguette/baguette.c index 6a8df873a..751a31725 100644 --- a/keyboards/baguette/baguette.c +++ b/keyboards/baguette/baguette.c @@ -23,7 +23,7 @@ void bootmagic_lite(void) // We need multiple scans because debouncing can't be turned off. matrix_scan(); - wait_ms(DEBOUNCING_DELAY); + wait_ms(DEBOUNCE); matrix_scan(); // If the Esc and space bar are held down on power up, diff --git a/keyboards/baguette/config.h b/keyboards/baguette/config.h index 1259d7055..9aa525cfd 100644 --- a/keyboards/baguette/config.h +++ b/keyboards/baguette/config.h @@ -62,7 +62,7 @@ along with this program. If not, see . // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/bantam44/config.h b/keyboards/bantam44/config.h index 323852850..5b1885d83 100644 --- a/keyboards/bantam44/config.h +++ b/keyboards/bantam44/config.h @@ -49,7 +49,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/bfake/config.h b/keyboards/bfake/config.h index 01fd4dff3..235181d09 100644 --- a/keyboards/bfake/config.h +++ b/keyboards/bfake/config.h @@ -35,7 +35,7 @@ along with this program. If not, see . #define UNUSED_PINS #define DIODE_DIRECTION COL2ROW -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #define NO_BACKLIGHT_CLOCK #define BACKLIGHT_LEVELS 1 diff --git a/keyboards/bigseries/1key/config.h b/keyboards/bigseries/1key/config.h index 966f2062c..66a012472 100755 --- a/keyboards/bigseries/1key/config.h +++ b/keyboards/bigseries/1key/config.h @@ -40,7 +40,7 @@ along with this program. If not, see . #define DIODE_DIRECTION ROW2COL /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 50 +#define DEBOUNCE 50 /* key combination for command */ #define IS_COMMAND() ( \ diff --git a/keyboards/bigseries/2key/config.h b/keyboards/bigseries/2key/config.h index 79b9ed378..535be27e7 100755 --- a/keyboards/bigseries/2key/config.h +++ b/keyboards/bigseries/2key/config.h @@ -40,7 +40,7 @@ along with this program. If not, see . #define DIODE_DIRECTION ROW2COL /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 50 +#define DEBOUNCE 50 /* key combination for command */ #define IS_COMMAND() ( \ diff --git a/keyboards/bigseries/3key/config.h b/keyboards/bigseries/3key/config.h index 9963a8219..faf166725 100755 --- a/keyboards/bigseries/3key/config.h +++ b/keyboards/bigseries/3key/config.h @@ -40,7 +40,7 @@ along with this program. If not, see . #define DIODE_DIRECTION ROW2COL /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 50 +#define DEBOUNCE 50 /* key combination for command */ #define IS_COMMAND() ( \ diff --git a/keyboards/bigseries/4key/config.h b/keyboards/bigseries/4key/config.h index a222512d3..79fdeb6ed 100755 --- a/keyboards/bigseries/4key/config.h +++ b/keyboards/bigseries/4key/config.h @@ -40,7 +40,7 @@ along with this program. If not, see . #define DIODE_DIRECTION ROW2COL /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 50 +#define DEBOUNCE 50 /* key combination for command */ #define IS_COMMAND() ( \ diff --git a/keyboards/bigswitch/config.h b/keyboards/bigswitch/config.h index a0ef6b555..220f2591b 100755 --- a/keyboards/bigswitch/config.h +++ b/keyboards/bigswitch/config.h @@ -40,7 +40,7 @@ along with this program. If not, see . #define DIODE_DIRECTION ROW2COL /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 50 +#define DEBOUNCE 50 /* key combination for command */ #define IS_COMMAND() ( \ diff --git a/keyboards/bigswitch/keymaps/wanleg/config.h b/keyboards/bigswitch/keymaps/wanleg/config.h index 0c6790618..54abb9a6c 100644 --- a/keyboards/bigswitch/keymaps/wanleg/config.h +++ b/keyboards/bigswitch/keymaps/wanleg/config.h @@ -32,8 +32,8 @@ #define BREATHING_PERIOD 5 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#undef DEBOUNCING_DELAY -#define DEBOUNCING_DELAY 5 +#undef DEBOUNCE +#define DEBOUNCE 5 // set flashing LED with QMK DFU #define QMK_LED B0 diff --git a/keyboards/blockey/config.h b/keyboards/blockey/config.h index 9bf64ef00..8934fd63a 100644 --- a/keyboards/blockey/config.h +++ b/keyboards/blockey/config.h @@ -59,7 +59,7 @@ along with this program. If not, see . #define RGBLIGHT_ANIMATIONS /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/bm16a/config.h b/keyboards/bm16a/config.h index c6b460a11..fc0405475 100644 --- a/keyboards/bm16a/config.h +++ b/keyboards/bm16a/config.h @@ -81,7 +81,7 @@ // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/bm16s/config.h b/keyboards/bm16s/config.h index 568e80b39..379e59bd9 100755 --- a/keyboards/bm16s/config.h +++ b/keyboards/bm16s/config.h @@ -28,7 +28,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/boardwalk/config.h b/keyboards/boardwalk/config.h index 67352b80d..774750208 100644 --- a/keyboards/boardwalk/config.h +++ b/keyboards/boardwalk/config.h @@ -50,7 +50,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 6 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/bpiphany/frosty_flake/config.h b/keyboards/bpiphany/frosty_flake/config.h index a797fef42..250a1b775 100644 --- a/keyboards/bpiphany/frosty_flake/config.h +++ b/keyboards/bpiphany/frosty_flake/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define UNUSED_PINS { B0, C4, D3 } /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/bpiphany/frosty_flake/matrix.c b/keyboards/bpiphany/frosty_flake/matrix.c index 480e3455b..3c49e9c00 100644 --- a/keyboards/bpiphany/frosty_flake/matrix.c +++ b/keyboards/bpiphany/frosty_flake/matrix.c @@ -24,10 +24,10 @@ #include "util.h" #include "matrix.h" -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 +#ifndef DEBOUNCE +# define DEBOUNCE 5 #endif -static uint8_t debouncing = DEBOUNCING_DELAY; +static uint8_t debouncing = DEBOUNCE; static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; @@ -111,7 +111,7 @@ uint8_t matrix_scan(void) { bool curr_bit = col_scan & (1<. // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/bpiphany/kitten_paw/matrix.c b/keyboards/bpiphany/kitten_paw/matrix.c index 6fdbfffd6..b59089cdf 100644 --- a/keyboards/bpiphany/kitten_paw/matrix.c +++ b/keyboards/bpiphany/kitten_paw/matrix.c @@ -24,10 +24,10 @@ #include "util.h" #include "matrix.h" -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 +#ifndef DEBOUNCE +# define DEBOUNCE 5 #endif -static uint8_t debouncing = DEBOUNCING_DELAY; +static uint8_t debouncing = DEBOUNCE; static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; @@ -98,7 +98,7 @@ uint8_t matrix_scan(void) { bool curr_bit = rows & (1<. #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #endif diff --git a/keyboards/bpiphany/pegasushoof/matrix.c b/keyboards/bpiphany/pegasushoof/matrix.c index 127433875..a670d5382 100644 --- a/keyboards/bpiphany/pegasushoof/matrix.c +++ b/keyboards/bpiphany/pegasushoof/matrix.c @@ -26,7 +26,7 @@ along with this program. If not, see . #include "util.h" #include "matrix.h" -static uint8_t debouncing = DEBOUNCING_DELAY; +static uint8_t debouncing = DEBOUNCE; static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; @@ -90,7 +90,7 @@ uint8_t matrix_scan(void) bool curr_bit = rows & (1<. #define UNUSED_PINS { B0, C4, D3 } /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/bpiphany/tiger_lily/matrix.c b/keyboards/bpiphany/tiger_lily/matrix.c index 3b48f6b36..47a92268c 100644 --- a/keyboards/bpiphany/tiger_lily/matrix.c +++ b/keyboards/bpiphany/tiger_lily/matrix.c @@ -24,10 +24,10 @@ #include "util.h" #include "matrix.h" -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 +#ifndef DEBOUNCE +# define DEBOUNCE 5 #endif -static uint8_t debouncing = DEBOUNCING_DELAY; +static uint8_t debouncing = DEBOUNCE; static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; @@ -111,7 +111,7 @@ uint8_t matrix_scan(void) { bool curr_bit = col_scan & (1<. #define MATRIX_COLS 18 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/bpiphany/unloved_bastard/matrix.c b/keyboards/bpiphany/unloved_bastard/matrix.c index bb6de8613..328d9015c 100644 --- a/keyboards/bpiphany/unloved_bastard/matrix.c +++ b/keyboards/bpiphany/unloved_bastard/matrix.c @@ -43,10 +43,10 @@ __attribute__ ((weak)) void matrix_scan_user(void) { } -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 +#ifndef DEBOUNCE +# define DEBOUNCE 5 #endif -static uint8_t debouncing = DEBOUNCING_DELAY; +static uint8_t debouncing = DEBOUNCE; static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; @@ -112,7 +112,7 @@ uint8_t matrix_scan(void) { bool curr_bit = col_scan & (1<. // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/butterstick/config.h b/keyboards/butterstick/config.h index 4c104deb2..90875d2ee 100644 --- a/keyboards/butterstick/config.h +++ b/keyboards/butterstick/config.h @@ -11,7 +11,7 @@ #define DESCRIPTION Its a stick of butter #define VERSION "Paula Deen" -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #define FORCE_NKRO /* key matrix size */ @@ -23,4 +23,3 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL - diff --git a/keyboards/canoe/config.h b/keyboards/canoe/config.h index d552fee5b..cddb749dc 100644 --- a/keyboards/canoe/config.h +++ b/keyboards/canoe/config.h @@ -35,7 +35,7 @@ along with this program. If not, see . #define UNUSED_PINS #define DIODE_DIRECTION COL2ROW -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #define NO_BACKLIGHT_CLOCK #define BACKLIGHT_LEVELS 1 diff --git a/keyboards/catch22/config.h b/keyboards/catch22/config.h index c5cf8233d..05c336a3f 100644 --- a/keyboards/catch22/config.h +++ b/keyboards/catch22/config.h @@ -39,7 +39,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ -// #define DEBOUNCING_DELAY 0 +// #define DEBOUNCE 0 /* key combination for command */ #define IS_COMMAND() ( \ diff --git a/keyboards/christmas_tree/config.h b/keyboards/christmas_tree/config.h index 769a9e98b..66fccebdb 100644 --- a/keyboards/christmas_tree/config.h +++ b/keyboards/christmas_tree/config.h @@ -48,7 +48,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/ckeys/handwire_101/config.h b/keyboards/ckeys/handwire_101/config.h index 40faec066..3dc99319e 100755 --- a/keyboards/ckeys/handwire_101/config.h +++ b/keyboards/ckeys/handwire_101/config.h @@ -53,7 +53,7 @@ along with this program. If not, see . /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/ckeys/nakey/config.h b/keyboards/ckeys/nakey/config.h index cd8b1aa32..add3a3522 100644 --- a/keyboards/ckeys/nakey/config.h +++ b/keyboards/ckeys/nakey/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/ckeys/obelus/config.h b/keyboards/ckeys/obelus/config.h index 8d3bfa3b6..4d7afc4f5 100644 --- a/keyboards/ckeys/obelus/config.h +++ b/keyboards/ckeys/obelus/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/claw44/rev1/config.h b/keyboards/claw44/rev1/config.h index ba2ed4559..f3406fee5 100644 --- a/keyboards/claw44/rev1/config.h +++ b/keyboards/claw44/rev1/config.h @@ -43,7 +43,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/clueboard/17/config.h b/keyboards/clueboard/17/config.h index 21728348d..b7e28cbb9 100644 --- a/keyboards/clueboard/17/config.h +++ b/keyboards/clueboard/17/config.h @@ -52,7 +52,7 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Number of backlighting levels */ #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/clueboard/2x1800/config.h b/keyboards/clueboard/2x1800/config.h index 62821f766..e343011f9 100644 --- a/keyboards/clueboard/2x1800/config.h +++ b/keyboards/clueboard/2x1800/config.h @@ -50,7 +50,7 @@ along with this program. If not, see . #define DIODE_DIRECTION ROW2COL /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/clueboard/66/rev1/config.h b/keyboards/clueboard/66/rev1/config.h index f8fb4bd35..9db64fbd4 100644 --- a/keyboards/clueboard/66/rev1/config.h +++ b/keyboards/clueboard/66/rev1/config.h @@ -25,7 +25,7 @@ #define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/clueboard/66/rev2/config.h b/keyboards/clueboard/66/rev2/config.h index 9227cd2df..f11cfe82f 100644 --- a/keyboards/clueboard/66/rev2/config.h +++ b/keyboards/clueboard/66/rev2/config.h @@ -24,7 +24,7 @@ #define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/clueboard/66/rev3/config.h b/keyboards/clueboard/66/rev3/config.h index ba646f157..bbbd82a1c 100644 --- a/keyboards/clueboard/66/rev3/config.h +++ b/keyboards/clueboard/66/rev3/config.h @@ -24,7 +24,7 @@ #define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/clueboard/66/rev4/config.h b/keyboards/clueboard/66/rev4/config.h index 540b38722..8ed140478 100644 --- a/keyboards/clueboard/66/rev4/config.h +++ b/keyboards/clueboard/66/rev4/config.h @@ -30,7 +30,7 @@ #define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/clueboard/66_hotswap/config.h b/keyboards/clueboard/66_hotswap/config.h index 2c265c947..b25686fa1 100644 --- a/keyboards/clueboard/66_hotswap/config.h +++ b/keyboards/clueboard/66_hotswap/config.h @@ -28,7 +28,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/clueboard/card/config.h b/keyboards/clueboard/card/config.h index 9520c31a6..9bf07f578 100644 --- a/keyboards/clueboard/card/config.h +++ b/keyboards/clueboard/card/config.h @@ -41,7 +41,7 @@ along with this program. If not, see . #define DIODE_DIRECTION ROW2COL /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 20 +#define DEBOUNCE 20 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/contra/config.h b/keyboards/contra/config.h index 8e1369f12..b32d86865 100755 --- a/keyboards/contra/config.h +++ b/keyboards/contra/config.h @@ -30,7 +30,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/converter/hp_46010a/config.h b/keyboards/converter/hp_46010a/config.h index f77ed4115..b7297ab88 100644 --- a/keyboards/converter/hp_46010a/config.h +++ b/keyboards/converter/hp_46010a/config.h @@ -30,6 +30,4 @@ along with this program. If not, see . #define MATRIX_COLS 8 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 - - +#define DEBOUNCE 5 diff --git a/keyboards/converter/hp_46010a/matrix.c b/keyboards/converter/hp_46010a/matrix.c index 2ca7d0357..ac9224087 100644 --- a/keyboards/converter/hp_46010a/matrix.c +++ b/keyboards/converter/hp_46010a/matrix.c @@ -34,18 +34,18 @@ along with this program. If not, see . #include "config.h" -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 +#ifndef DEBOUNCE +# define DEBOUNCE 5 #endif -#if ( DEBOUNCING_DELAY > 0 ) +#if ( DEBOUNCE > 0 ) static uint16_t debouncing_time ; static bool debouncing = false ; #endif static uint8_t matrix [MATRIX_ROWS] = {0}; -#if ( DEBOUNCING_DELAY > 0 ) +#if ( DEBOUNCE > 0 ) static uint8_t matrix_debounce_old [MATRIX_ROWS] = {0}; static uint8_t matrix_debounce_new [MATRIX_ROWS] = {0}; #endif @@ -172,7 +172,7 @@ uint8_t matrix_scan(void) { // the first byte of the keyboard's output data can be ignored Matrix_ThrowByte(); -#if ( DEBOUNCING_DELAY > 0 ) +#if ( DEBOUNCE > 0 ) for ( uint8_t row = 0 ; row < MATRIX_ROWS ; ++row ) { //transfer old debouncing values @@ -194,8 +194,8 @@ uint8_t matrix_scan(void) { #endif -#if ( DEBOUNCING_DELAY > 0 ) - if ( debouncing && ( timer_elapsed( debouncing_time ) > DEBOUNCING_DELAY ) ) { +#if ( DEBOUNCE > 0 ) + if ( debouncing && ( timer_elapsed( debouncing_time ) > DEBOUNCE ) ) { for ( uint8_t row = 0 ; row < MATRIX_ROWS ; ++row ) { matrix[row] = matrix_debounce_new[row] ; diff --git a/keyboards/converter/ibm_5291/config.h b/keyboards/converter/ibm_5291/config.h index 5c9ca1e4a..9701bdfe9 100644 --- a/keyboards/converter/ibm_5291/config.h +++ b/keyboards/converter/ibm_5291/config.h @@ -37,6 +37,4 @@ along with this program. If not, see . /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 0 - - +#define DEBOUNCE 0 diff --git a/keyboards/converter/ibm_5291/matrix.c b/keyboards/converter/ibm_5291/matrix.c index 58f6e37b6..8b2dba7ab 100644 --- a/keyboards/converter/ibm_5291/matrix.c +++ b/keyboards/converter/ibm_5291/matrix.c @@ -33,8 +33,8 @@ along with this program. If not, see . #include "config.h" -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 +#ifndef DEBOUNCE +# define DEBOUNCE 5 #endif #define print_matrix_header() print("\nr/c 01234567\n") @@ -49,14 +49,14 @@ along with this program. If not, see . static const uint8_t row_pins [NUM_ROW_PINS] = MATRIX_ROW_PINS ; static const uint8_t col_pins [NUM_ROW_PINS] = MATRIX_COL_PINS ; -#if ( DEBOUNCING_DELAY > 0 ) +#if ( DEBOUNCE > 0 ) static uint16_t debouncing_time ; static bool debouncing = false ; #endif static uint8_t matrix [MATRIX_ROWS] = {0}; -#if ( DEBOUNCING_DELAY > 0 ) +#if ( DEBOUNCE > 0 ) static uint8_t matrix_debounce [MATRIX_ROWS] = {0}; #endif @@ -237,7 +237,7 @@ void matrix_init(void) { // initialize matrix state: all keys off for (uint8_t i = 0; i < MATRIX_ROWS; i++) { matrix[i] = 0; -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) matrix_debounce [i] = 0; # endif } @@ -247,7 +247,7 @@ void matrix_init(void) { uint8_t matrix_scan(void) { for ( uint8_t current_row = 0; current_row < MATRIX_ROWS; ++current_row ) { -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) bool matrix_changed = matrix_read(matrix_debounce, current_row); if (matrix_changed) { @@ -260,8 +260,8 @@ uint8_t matrix_scan(void) { # endif } -# if (DEBOUNCING_DELAY > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { +# if (DEBOUNCE > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { for (uint8_t i = 0; i < MATRIX_ROWS; i++) { matrix[i] = matrix_debounce[i]; } diff --git a/keyboards/converter/modelm101/config.h b/keyboards/converter/modelm101/config.h index 97b78614c..958b29b74 100644 --- a/keyboards/converter/modelm101/config.h +++ b/keyboards/converter/modelm101/config.h @@ -49,7 +49,7 @@ along with this program. If not, see . #define DIODE_DIRECTION ROW2COL /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed (5 is default) */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* * Magic Key Options @@ -120,4 +120,4 @@ along with this program. If not, see . //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION \ No newline at end of file +//#define NO_ACTION_FUNCTION diff --git a/keyboards/converter/numeric_keypad_IIe/config.h b/keyboards/converter/numeric_keypad_IIe/config.h index 8cf0eaa40..a129e1210 100644 --- a/keyboards/converter/numeric_keypad_IIe/config.h +++ b/keyboards/converter/numeric_keypad_IIe/config.h @@ -52,10 +52,10 @@ Header Pins Header / Matrix --------------- -Pin Name Description +Pin Name Description -------------------------------------------------------------- 1,2,5,3,4,6 Y0-Y5 Y-direction key-matrix connections -7 NC +7 NC 9,11,10,8 X4-X7 X-direction key-matrix connections @@ -98,4 +98,4 @@ http://wiki.apple2.org/index.php?title=Pinouts#Apple_.2F.2Fe_Numeric_Keypad_conn #define UNUSED_PINS #define DIODE_DIRECTION COL2ROW #define SOFT_SERIAL_PIN D0 -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 diff --git a/keyboards/coseyfannitutti/mullet/config.h b/keyboards/coseyfannitutti/mullet/config.h index 527294e51..2025cb433 100644 --- a/keyboards/coseyfannitutti/mullet/config.h +++ b/keyboards/coseyfannitutti/mullet/config.h @@ -63,7 +63,7 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST @@ -169,4 +169,3 @@ along with this program. If not, see . #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/coseyfannitutti/mulletpad/config.h b/keyboards/coseyfannitutti/mulletpad/config.h index ad5941055..2174d6492 100644 --- a/keyboards/coseyfannitutti/mulletpad/config.h +++ b/keyboards/coseyfannitutti/mulletpad/config.h @@ -63,7 +63,7 @@ along with this program. If not, see . //#endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST @@ -169,4 +169,3 @@ along with this program. If not, see . #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/cospad/config.h b/keyboards/cospad/config.h index b7e7ec384..9844f2724 100644 --- a/keyboards/cospad/config.h +++ b/keyboards/cospad/config.h @@ -58,7 +58,7 @@ along with this program. If not, see . #define RGBLIGHT_ANIMATIONS /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/crawlpad/config.h b/keyboards/crawlpad/config.h index a6d7ac214..d51ad1744 100755 --- a/keyboards/crawlpad/config.h +++ b/keyboards/crawlpad/config.h @@ -26,7 +26,7 @@ #define DIODE_DIRECTION ROW2COL /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE @@ -44,4 +44,3 @@ #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 3 #endif - diff --git a/keyboards/crkbd/rev1/config.h b/keyboards/crkbd/rev1/config.h index 6564c8503..4ea8ff38c 100644 --- a/keyboards/crkbd/rev1/config.h +++ b/keyboards/crkbd/rev1/config.h @@ -43,7 +43,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/cu24/config.h b/keyboards/cu24/config.h index 1de9d33cb..7bb49816b 100644 --- a/keyboards/cu24/config.h +++ b/keyboards/cu24/config.h @@ -47,7 +47,7 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL - + /* Backlight */ #define BACKLIGHT_PIN B5 #define BACKLIGHT_BREATHING @@ -59,7 +59,7 @@ #define RGBLIGHT_ANIMATIONS /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/cu75/config.h b/keyboards/cu75/config.h index baaed33e6..e01f947a0 100644 --- a/keyboards/cu75/config.h +++ b/keyboards/cu75/config.h @@ -42,7 +42,7 @@ along with this program. If not, see . #define RGBLIGHT_VAL_STEP 17 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/daisy/config.h b/keyboards/daisy/config.h index f397d28da..567a215a6 100644 --- a/keyboards/daisy/config.h +++ b/keyboards/daisy/config.h @@ -31,12 +31,12 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW - + #define BACKLIGHT_PIN D0 #define BACKLIGHT_LEVELS 6 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/dc01/arrow/config.h b/keyboards/dc01/arrow/config.h index e58967ac0..801dbb54d 100644 --- a/keyboards/dc01/arrow/config.h +++ b/keyboards/dc01/arrow/config.h @@ -53,7 +53,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/dc01/arrow/matrix.c b/keyboards/dc01/arrow/matrix.c index dd5e2ee9c..1823138c3 100644 --- a/keyboards/dc01/arrow/matrix.c +++ b/keyboards/dc01/arrow/matrix.c @@ -36,11 +36,11 @@ along with this program. If not, see . /* Set 0 if debouncing isn't needed */ -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 +#ifndef DEBOUNCE +# define DEBOUNCE 5 #endif -#if (DEBOUNCING_DELAY > 0) +#if (DEBOUNCE > 0) static uint16_t debouncing_time; static bool debouncing = false; #endif @@ -155,7 +155,7 @@ uint8_t matrix_scan(void) // Set row, read cols for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row); if (matrix_changed) { @@ -173,7 +173,7 @@ uint8_t matrix_scan(void) // Set col, read rows for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col); if (matrix_changed) { debouncing = true; @@ -187,8 +187,8 @@ uint8_t matrix_scan(void) #endif -# if (DEBOUNCING_DELAY > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { +# if (DEBOUNCE > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { for (uint8_t i = 0; i < MATRIX_ROWS; i++) { matrix[i] = matrix_debouncing[i]; } @@ -209,7 +209,7 @@ uint8_t matrix_scan(void) bool matrix_is_modified(void) { -#if (DEBOUNCING_DELAY > 0) +#if (DEBOUNCE > 0) if (debouncing) return false; #endif return true; diff --git a/keyboards/dc01/left/config.h b/keyboards/dc01/left/config.h index 3f5137312..26ad41a05 100644 --- a/keyboards/dc01/left/config.h +++ b/keyboards/dc01/left/config.h @@ -56,7 +56,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/dc01/left/matrix.c b/keyboards/dc01/left/matrix.c index a3db220e4..0e7b591f8 100644 --- a/keyboards/dc01/left/matrix.c +++ b/keyboards/dc01/left/matrix.c @@ -42,11 +42,11 @@ static uint8_t error_count_arrow = 0; /* Set 0 if debouncing isn't needed */ -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 +#ifndef DEBOUNCE +# define DEBOUNCE 5 #endif -#if (DEBOUNCING_DELAY > 0) +#if (DEBOUNCE > 0) static uint16_t debouncing_time; static bool debouncing = false; #endif @@ -169,7 +169,7 @@ uint8_t matrix_scan(void) // Set row, read cols for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row); if (matrix_changed) { @@ -187,7 +187,7 @@ uint8_t matrix_scan(void) // Set col, read rows for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col); if (matrix_changed) { debouncing = true; @@ -201,8 +201,8 @@ uint8_t matrix_scan(void) #endif -# if (DEBOUNCING_DELAY > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { +# if (DEBOUNCE > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { for (uint8_t i = 0; i < MATRIX_ROWS; i++) { matrix[i] = matrix_debouncing[i]; } @@ -249,7 +249,7 @@ uint8_t matrix_scan(void) bool matrix_is_modified(void) { -#if (DEBOUNCING_DELAY > 0) +#if (DEBOUNCE > 0) if (debouncing) return false; #endif return true; diff --git a/keyboards/dc01/numpad/config.h b/keyboards/dc01/numpad/config.h index a8a244554..2e91cfdd9 100644 --- a/keyboards/dc01/numpad/config.h +++ b/keyboards/dc01/numpad/config.h @@ -53,7 +53,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/dc01/numpad/matrix.c b/keyboards/dc01/numpad/matrix.c index 5a13f3ff2..f8b725adc 100644 --- a/keyboards/dc01/numpad/matrix.c +++ b/keyboards/dc01/numpad/matrix.c @@ -36,11 +36,11 @@ along with this program. If not, see . /* Set 0 if debouncing isn't needed */ -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 +#ifndef DEBOUNCE +# define DEBOUNCE 5 #endif -#if (DEBOUNCING_DELAY > 0) +#if (DEBOUNCE > 0) static uint16_t debouncing_time; static bool debouncing = false; #endif @@ -155,7 +155,7 @@ uint8_t matrix_scan(void) // Set row, read cols for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row); if (matrix_changed) { @@ -173,7 +173,7 @@ uint8_t matrix_scan(void) // Set col, read rows for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col); if (matrix_changed) { debouncing = true; @@ -187,8 +187,8 @@ uint8_t matrix_scan(void) #endif -# if (DEBOUNCING_DELAY > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { +# if (DEBOUNCE > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { for (uint8_t i = 0; i < MATRIX_ROWS; i++) { matrix[i] = matrix_debouncing[i]; } @@ -209,7 +209,7 @@ uint8_t matrix_scan(void) bool matrix_is_modified(void) { -#if (DEBOUNCING_DELAY > 0) +#if (DEBOUNCE > 0) if (debouncing) return false; #endif return true; diff --git a/keyboards/dc01/right/config.h b/keyboards/dc01/right/config.h index 4933f5829..bbffb7814 100644 --- a/keyboards/dc01/right/config.h +++ b/keyboards/dc01/right/config.h @@ -53,7 +53,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/dc01/right/matrix.c b/keyboards/dc01/right/matrix.c index 6d981797c..6ec3a3b72 100644 --- a/keyboards/dc01/right/matrix.c +++ b/keyboards/dc01/right/matrix.c @@ -36,11 +36,11 @@ along with this program. If not, see . /* Set 0 if debouncing isn't needed */ -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 +#ifndef DEBOUNCE +# define DEBOUNCE 5 #endif -#if (DEBOUNCING_DELAY > 0) +#if (DEBOUNCE > 0) static uint16_t debouncing_time; static bool debouncing = false; #endif @@ -155,7 +155,7 @@ uint8_t matrix_scan(void) // Set row, read cols for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row); if (matrix_changed) { @@ -173,7 +173,7 @@ uint8_t matrix_scan(void) // Set col, read rows for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col); if (matrix_changed) { debouncing = true; @@ -187,8 +187,8 @@ uint8_t matrix_scan(void) #endif -# if (DEBOUNCING_DELAY > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { +# if (DEBOUNCE > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { for (uint8_t i = 0; i < MATRIX_ROWS; i++) { matrix[i] = matrix_debouncing[i]; } @@ -209,7 +209,7 @@ uint8_t matrix_scan(void) bool matrix_is_modified(void) { -#if (DEBOUNCING_DELAY > 0) +#if (DEBOUNCE > 0) if (debouncing) return false; #endif return true; diff --git a/keyboards/deltasplit75/matrix.c b/keyboards/deltasplit75/matrix.c index 1ac5c5039..28198d89b 100644 --- a/keyboards/deltasplit75/matrix.c +++ b/keyboards/deltasplit75/matrix.c @@ -37,11 +37,11 @@ along with this program. If not, see . # include "serial.h" #endif -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 +#ifndef DEBOUNCE +# define DEBOUNCE 5 #endif -#if (DEBOUNCING_DELAY > 0) +#if (DEBOUNCE > 0) static uint16_t debouncing_time; static bool debouncing = false; #endif @@ -140,7 +140,7 @@ uint8_t _matrix_scan(void) #if (DIODE_DIRECTION == COL2ROW) // Set row, read cols for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); if (matrix_changed) { @@ -157,7 +157,7 @@ uint8_t _matrix_scan(void) #elif (DIODE_DIRECTION == ROW2COL) // Set col, read rows for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); if (matrix_changed) { debouncing = true; @@ -170,8 +170,8 @@ uint8_t _matrix_scan(void) } #endif -# if (DEBOUNCING_DELAY > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { +# if (DEBOUNCE > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { matrix[i+offset] = matrix_debouncing[i+offset]; } diff --git a/keyboards/deltasplit75/v2/config.h b/keyboards/deltasplit75/v2/config.h index fc85f9125..6a2e48f4f 100644 --- a/keyboards/deltasplit75/v2/config.h +++ b/keyboards/deltasplit75/v2/config.h @@ -47,7 +47,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/diverge3/config.h b/keyboards/diverge3/config.h index aa9f52fcb..a593bca9d 100644 --- a/keyboards/diverge3/config.h +++ b/keyboards/diverge3/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 5 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/divergetm2/config.h b/keyboards/divergetm2/config.h index 2cdc315de..8ad948676 100644 --- a/keyboards/divergetm2/config.h +++ b/keyboards/divergetm2/config.h @@ -49,7 +49,7 @@ #define DIODE_DIRECTION ROW2COL /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* number of backlight levels */ diff --git a/keyboards/dk60/config.h b/keyboards/dk60/config.h index 9df384740..6a69516cb 100644 --- a/keyboards/dk60/config.h +++ b/keyboards/dk60/config.h @@ -41,7 +41,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ - #define DEBOUNCING_DELAY 5 + #define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/do60/config.h b/keyboards/do60/config.h index 74d27de39..82e818328 100644 --- a/keyboards/do60/config.h +++ b/keyboards/do60/config.h @@ -55,7 +55,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* RGB Underglow * F5 PIN for DO60's pre-soldered WS2812 LEDs diff --git a/keyboards/donutcables/budget96/config.h b/keyboards/donutcables/budget96/config.h index 74661d828..75aacb4d4 100644 --- a/keyboards/donutcables/budget96/config.h +++ b/keyboards/donutcables/budget96/config.h @@ -34,7 +34,7 @@ along with this program. If not, see . #define UNUSED_PINS #define DIODE_DIRECTION COL2ROW -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #define NO_BACKLIGHT_CLOCK #define BACKLIGHT_LEVELS 1 diff --git a/keyboards/donutcables/scrabblepad/config.h b/keyboards/donutcables/scrabblepad/config.h index bf3d3db72..d6490349e 100644 --- a/keyboards/donutcables/scrabblepad/config.h +++ b/keyboards/donutcables/scrabblepad/config.h @@ -61,7 +61,7 @@ along with this program. If not, see . //#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness) /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/doro67/rgb/config.h b/keyboards/doro67/rgb/config.h index 87a30e084..16dc4fc0a 100644 --- a/keyboards/doro67/rgb/config.h +++ b/keyboards/doro67/rgb/config.h @@ -53,7 +53,7 @@ along with this program. If not, see . // The number of LEDs connected #define DRIVER_LED_TOTAL 67 -#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_KEYPRESSES /* * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. @@ -63,7 +63,7 @@ along with this program. If not, see . #define RGBLED_NUM 67 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/dozen0/config.h b/keyboards/dozen0/config.h index 6b0f8525a..9ea2c1795 100644 --- a/keyboards/dozen0/config.h +++ b/keyboards/dozen0/config.h @@ -62,7 +62,7 @@ along with this program. If not, see . // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/duck/eagle_viper/v2/config.h b/keyboards/duck/eagle_viper/v2/config.h index a0ce866cc..e328b1ee2 100644 --- a/keyboards/duck/eagle_viper/v2/config.h +++ b/keyboards/duck/eagle_viper/v2/config.h @@ -34,7 +34,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* number of backlight levels */ #define BACKLIGHT_LEVELS 3 @@ -48,4 +48,3 @@ along with this program. If not, see . #define BOOTMAGIC_LITE_COLUMN 10 #define TAPPING_TERM 200 - diff --git a/keyboards/duck/eagle_viper/v2/matrix.c b/keyboards/duck/eagle_viper/v2/matrix.c index b705ae49f..0964493ac 100644 --- a/keyboards/duck/eagle_viper/v2/matrix.c +++ b/keyboards/duck/eagle_viper/v2/matrix.c @@ -22,7 +22,7 @@ along with this program. If not, see . #include "print.h" #include "debug.h" -static uint8_t debouncing = DEBOUNCING_DELAY; +static uint8_t debouncing = DEBOUNCE; /* matrix state(1:on, 0:off) */ static matrix_row_t matrix[MATRIX_ROWS]; @@ -92,7 +92,7 @@ uint8_t matrix_scan(void) { if (debouncing) { dprint("bounce!: "); dprintf("%02X", debouncing); dprintln(); } - debouncing = DEBOUNCING_DELAY; + debouncing = DEBOUNCE; } } unselect_cols(); diff --git a/keyboards/duck/jetfire/config.h b/keyboards/duck/jetfire/config.h index 774e28491..f616bc238 100644 --- a/keyboards/duck/jetfire/config.h +++ b/keyboards/duck/jetfire/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Set to top left most key */ #define BOOTMAGIC_LITE_ROW 5 diff --git a/keyboards/duck/jetfire/matrix.c b/keyboards/duck/jetfire/matrix.c index 51202aeb6..2dd94a72a 100644 --- a/keyboards/duck/jetfire/matrix.c +++ b/keyboards/duck/jetfire/matrix.c @@ -21,7 +21,7 @@ along with this program. If not, see . #include "util.h" #include "matrix.h" -static uint8_t debouncing = DEBOUNCING_DELAY; +static uint8_t debouncing = DEBOUNCE; /* matrix state(1:on, 0:off) */ static matrix_row_t matrix[MATRIX_ROWS]; @@ -97,7 +97,7 @@ uint8_t matrix_scan(void) if (debouncing) { dprint("bounce!: "); dprintf("%02X", debouncing); dprintln(); } - debouncing = DEBOUNCING_DELAY; + debouncing = DEBOUNCE; } } unselect_cols(); diff --git a/keyboards/duck/lightsaver/config.h b/keyboards/duck/lightsaver/config.h index d302fb395..5bb4e6faf 100644 --- a/keyboards/duck/lightsaver/config.h +++ b/keyboards/duck/lightsaver/config.h @@ -34,7 +34,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* number of backlight levels */ #define BACKLIGHT_LEVELS 1 @@ -48,4 +48,3 @@ along with this program. If not, see . #define BOOTMAGIC_LITE_COLUMN 10 #define TAPPING_TERM 200 - diff --git a/keyboards/duck/lightsaver/matrix.c b/keyboards/duck/lightsaver/matrix.c index 543205c0b..066452724 100644 --- a/keyboards/duck/lightsaver/matrix.c +++ b/keyboards/duck/lightsaver/matrix.c @@ -22,7 +22,7 @@ along with this program. If not, see . #include "print.h" #include "debug.h" -static uint8_t debouncing = DEBOUNCING_DELAY; +static uint8_t debouncing = DEBOUNCE; /* matrix state(1:on, 0:off) */ static matrix_row_t matrix[MATRIX_ROWS]; @@ -90,7 +90,7 @@ uint8_t matrix_scan(void) { if (debouncing) { dprint("bounce!: "); dprintf("%02X", debouncing); dprintln(); } - debouncing = DEBOUNCING_DELAY; + debouncing = DEBOUNCE; } } unselect_cols(); diff --git a/keyboards/duck/octagon/v1/config.h b/keyboards/duck/octagon/v1/config.h index d818cb622..45e87de4b 100644 --- a/keyboards/duck/octagon/v1/config.h +++ b/keyboards/duck/octagon/v1/config.h @@ -34,7 +34,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* number of backlight levels */ #define BACKLIGHT_LEVELS 1 diff --git a/keyboards/duck/octagon/v1/matrix.c b/keyboards/duck/octagon/v1/matrix.c index 233404ed3..a2bea865b 100644 --- a/keyboards/duck/octagon/v1/matrix.c +++ b/keyboards/duck/octagon/v1/matrix.c @@ -22,7 +22,7 @@ along with this program. If not, see . #include "print.h" #include "debug.h" -static uint8_t debouncing = DEBOUNCING_DELAY; +static uint8_t debouncing = DEBOUNCE; /* matrix state(1:on, 0:off) */ static matrix_row_t matrix[MATRIX_ROWS]; @@ -87,7 +87,7 @@ uint8_t matrix_scan(void) { if (debouncing) { dprint("bounce!: "); dprintf("%02X", debouncing); dprintln(); } - debouncing = DEBOUNCING_DELAY; + debouncing = DEBOUNCE; } } unselect_cols(); diff --git a/keyboards/duck/octagon/v2/config.h b/keyboards/duck/octagon/v2/config.h index 4aab587f6..82b0c8a99 100644 --- a/keyboards/duck/octagon/v2/config.h +++ b/keyboards/duck/octagon/v2/config.h @@ -34,7 +34,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* number of backlight levels */ #define BACKLIGHT_LEVELS 1 @@ -48,4 +48,3 @@ along with this program. If not, see . #define BOOTMAGIC_LITE_COLUMN 10 #define TAPPING_TERM 200 - diff --git a/keyboards/duck/octagon/v2/matrix.c b/keyboards/duck/octagon/v2/matrix.c index e6e7046b4..25d1e45b0 100644 --- a/keyboards/duck/octagon/v2/matrix.c +++ b/keyboards/duck/octagon/v2/matrix.c @@ -22,7 +22,7 @@ along with this program. If not, see . #include "print.h" #include "debug.h" -static uint8_t debouncing = DEBOUNCING_DELAY; +static uint8_t debouncing = DEBOUNCE; /* matrix state(1:on, 0:off) */ static matrix_row_t matrix[MATRIX_ROWS]; @@ -92,7 +92,7 @@ uint8_t matrix_scan(void) { if (debouncing) { dprint("bounce!: "); dprintf("%02X", debouncing); dprintln(); } - debouncing = DEBOUNCING_DELAY; + debouncing = DEBOUNCE; } } unselect_cols(); diff --git a/keyboards/dz60/config.h b/keyboards/dz60/config.h index 46702adcd..8d66c3584 100644 --- a/keyboards/dz60/config.h +++ b/keyboards/dz60/config.h @@ -28,7 +28,7 @@ #define BACKLIGHT_LEVELS 5 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/dz60/keymaps/LEdiodes/config.h b/keyboards/dz60/keymaps/LEdiodes/config.h index 6cdc4a91e..196d05c53 100644 --- a/keyboards/dz60/keymaps/LEdiodes/config.h +++ b/keyboards/dz60/keymaps/LEdiodes/config.h @@ -28,7 +28,7 @@ #define BACKLIGHT_LEVELS 5 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/eco/config.h b/keyboards/eco/config.h index f5820eafc..a6ae1821a 100644 --- a/keyboards/eco/config.h +++ b/keyboards/eco/config.h @@ -38,7 +38,7 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/ep/40/config.h b/keyboards/ep/40/config.h index b7f99a3b7..c954882b8 100644 --- a/keyboards/ep/40/config.h +++ b/keyboards/ep/40/config.h @@ -48,7 +48,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/ep/96/config.h b/keyboards/ep/96/config.h index 152b04b62..22d406fd5 100644 --- a/keyboards/ep/96/config.h +++ b/keyboards/ep/96/config.h @@ -51,7 +51,7 @@ along with this program. If not, see . // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/ergo42/matrix.c b/keyboards/ergo42/matrix.c index fc42dd14d..328d16c77 100644 --- a/keyboards/ergo42/matrix.c +++ b/keyboards/ergo42/matrix.c @@ -37,11 +37,11 @@ along with this program. If not, see . # include "serial.h" #endif -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 +#ifndef DEBOUNCE +# define DEBOUNCE 5 #endif -#if (DEBOUNCING_DELAY > 0) +#if (DEBOUNCE > 0) static uint16_t debouncing_time; static bool debouncing = false; #endif @@ -145,7 +145,7 @@ uint8_t _matrix_scan(void) #if (DIODE_DIRECTION == COL2ROW) // Set row, read cols for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); if (matrix_changed) { @@ -162,7 +162,7 @@ uint8_t _matrix_scan(void) #elif (DIODE_DIRECTION == ROW2COL) // Set col, read rows for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); if (matrix_changed) { debouncing = true; @@ -175,8 +175,8 @@ uint8_t _matrix_scan(void) } #endif -# if (DEBOUNCING_DELAY > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { +# if (DEBOUNCE > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { matrix[i+offset] = matrix_debouncing[i+offset]; } diff --git a/keyboards/ergo42/rev1/config.h b/keyboards/ergo42/rev1/config.h index f9d909cc7..68a5e2bbe 100644 --- a/keyboards/ergo42/rev1/config.h +++ b/keyboards/ergo42/rev1/config.h @@ -52,7 +52,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/ergodash/mini/config.h b/keyboards/ergodash/mini/config.h index cac1bba6f..2fa51dcc1 100644 --- a/keyboards/ergodash/mini/config.h +++ b/keyboards/ergodash/mini/config.h @@ -55,7 +55,7 @@ along with this program. If not, see . #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/ergodash/rev1/config.h b/keyboards/ergodash/rev1/config.h index 5b7d85688..52f81e4ac 100644 --- a/keyboards/ergodash/rev1/config.h +++ b/keyboards/ergodash/rev1/config.h @@ -55,7 +55,7 @@ along with this program. If not, see . #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/ergoinu/config.h b/keyboards/ergoinu/config.h index a59e5da74..dfc8a5293 100644 --- a/keyboards/ergoinu/config.h +++ b/keyboards/ergoinu/config.h @@ -57,7 +57,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/ergotravel/rev1/config.h b/keyboards/ergotravel/rev1/config.h index 1d8a60afd..89045666b 100644 --- a/keyboards/ergotravel/rev1/config.h +++ b/keyboards/ergotravel/rev1/config.h @@ -44,7 +44,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/espectro/config.h b/keyboards/espectro/config.h index 438530c41..2736c1d88 100755 --- a/keyboards/espectro/config.h +++ b/keyboards/espectro/config.h @@ -43,7 +43,7 @@ #define BACKLIGHT_LEVELS 5 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/evil80/config.h b/keyboards/evil80/config.h index 6bb286146..ae507c74f 100644 --- a/keyboards/evil80/config.h +++ b/keyboards/evil80/config.h @@ -32,7 +32,7 @@ #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/exclusive/e6v2/le/config.h b/keyboards/exclusive/e6v2/le/config.h index 580929ba8..6477d5364 100644 --- a/keyboards/exclusive/e6v2/le/config.h +++ b/keyboards/exclusive/e6v2/le/config.h @@ -54,6 +54,6 @@ along with this program. If not, see . #endif #define DIODE_DIRECTION COL2ROW -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #endif diff --git a/keyboards/exclusive/e6v2/oe/config.h b/keyboards/exclusive/e6v2/oe/config.h index 0bb89eba6..9206916d3 100644 --- a/keyboards/exclusive/e6v2/oe/config.h +++ b/keyboards/exclusive/e6v2/oe/config.h @@ -54,6 +54,6 @@ along with this program. If not, see . #endif #define DIODE_DIRECTION COL2ROW -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #endif diff --git a/keyboards/exclusive/e7v1/config.h b/keyboards/exclusive/e7v1/config.h index eacb3ba31..689d7e862 100644 --- a/keyboards/exclusive/e7v1/config.h +++ b/keyboards/exclusive/e7v1/config.h @@ -29,7 +29,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/facew/config.h b/keyboards/facew/config.h index b4fb0d4cd..239783f8b 100644 --- a/keyboards/facew/config.h +++ b/keyboards/facew/config.h @@ -34,7 +34,7 @@ along with this program. If not, see . #define UNUSED_PINS #define DIODE_DIRECTION COL2ROW -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #define NO_BACKLIGHT_CLOCK #define BACKLIGHT_LEVELS 1 diff --git a/keyboards/fc660c/config.h b/keyboards/fc660c/config.h index fe9c69517..e55896e6c 100644 --- a/keyboards/fc660c/config.h +++ b/keyboards/fc660c/config.h @@ -44,7 +44,7 @@ along with this program. If not, see . // #define BACKLIGHT_PIN B7 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 0 +#define DEBOUNCE 0 #define TAPPING_TERM 175 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ diff --git a/keyboards/fc980c/config.h b/keyboards/fc980c/config.h index b46bdfd55..f9d3e06d6 100644 --- a/keyboards/fc980c/config.h +++ b/keyboards/fc980c/config.h @@ -48,7 +48,7 @@ along with this program. If not, see . // #define BACKLIGHT_PIN B7 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 0 +#define DEBOUNCE 0 #define TAPPING_TERM 175 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ diff --git a/keyboards/felix/config.h b/keyboards/felix/config.h index 0e5dd9d2d..0dd8eea07 100644 --- a/keyboards/felix/config.h +++ b/keyboards/felix/config.h @@ -29,7 +29,7 @@ #define BACKLIGHT_LEVELS 5 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/fleuron/config.h b/keyboards/fleuron/config.h index 8e1d27436..0236bc3b6 100644 --- a/keyboards/fleuron/config.h +++ b/keyboards/fleuron/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/fortitude60/matrix.c b/keyboards/fortitude60/matrix.c index 565f417d8..9037d53a6 100644 --- a/keyboards/fortitude60/matrix.c +++ b/keyboards/fortitude60/matrix.c @@ -38,11 +38,11 @@ extern backlight_config_t backlight_config; #include "serial.h" -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 +#ifndef DEBOUNCE +# define DEBOUNCE 5 #endif -#if (DEBOUNCING_DELAY > 0) +#if (DEBOUNCE > 0) static uint16_t debouncing_time; static bool debouncing = false; #endif @@ -144,7 +144,7 @@ uint8_t _matrix_scan(void) #if (DIODE_DIRECTION == COL2ROW) // Set row, read cols for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); if (matrix_changed) { @@ -161,7 +161,7 @@ uint8_t _matrix_scan(void) #elif (DIODE_DIRECTION == ROW2COL) // Set col, read rows for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); if (matrix_changed) { debouncing = true; @@ -174,8 +174,8 @@ uint8_t _matrix_scan(void) } #endif -# if (DEBOUNCING_DELAY > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { +# if (DEBOUNCE > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { matrix[i+offset] = matrix_debouncing[i+offset]; } diff --git a/keyboards/fortitude60/rev1/config.h b/keyboards/fortitude60/rev1/config.h index 2fa179ae2..ad4407a11 100644 --- a/keyboards/fortitude60/rev1/config.h +++ b/keyboards/fortitude60/rev1/config.h @@ -51,7 +51,7 @@ along with this program. If not, see . #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/four_banger/config.h b/keyboards/four_banger/config.h index 4567cec8e..8e0738e6d 100644 --- a/keyboards/four_banger/config.h +++ b/keyboards/four_banger/config.h @@ -30,7 +30,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/foxlab/leaf60/hotswap/config.h b/keyboards/foxlab/leaf60/hotswap/config.h index a471ea8e5..752b403c5 100644 --- a/keyboards/foxlab/leaf60/hotswap/config.h +++ b/keyboards/foxlab/leaf60/hotswap/config.h @@ -64,7 +64,7 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/foxlab/leaf60/universal/config.h b/keyboards/foxlab/leaf60/universal/config.h index d8d66ee38..f038430f9 100644 --- a/keyboards/foxlab/leaf60/universal/config.h +++ b/keyboards/foxlab/leaf60/universal/config.h @@ -64,7 +64,7 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/fractal/config.h b/keyboards/fractal/config.h index fce0931c2..f67f61c13 100755 --- a/keyboards/fractal/config.h +++ b/keyboards/fractal/config.h @@ -31,7 +31,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/ft/mars80/config.h b/keyboards/ft/mars80/config.h index e03d1b399..b56adb114 100644 --- a/keyboards/ft/mars80/config.h +++ b/keyboards/ft/mars80/config.h @@ -36,7 +36,7 @@ along with this program. If not, see . #define UNUSED_PINS {} #define DIODE_DIRECTION COL2ROW -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #define NO_BACKLIGHT_CLOCK #define BACKLIGHT_LEVELS 1 @@ -47,4 +47,3 @@ along with this program. If not, see . /* key combination for magic key command */ /* defined by default; to change, uncomment and set to the combination you want */ // #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - diff --git a/keyboards/gh60/config.h b/keyboards/gh60/config.h index a99dd4e59..8b7391faf 100644 --- a/keyboards/gh60/config.h +++ b/keyboards/gh60/config.h @@ -53,7 +53,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/gh60/keymaps/dbroqua/config.h b/keyboards/gh60/keymaps/dbroqua/config.h index 380b8303f..8952200e0 100644 --- a/keyboards/gh60/keymaps/dbroqua/config.h +++ b/keyboards/gh60/keymaps/dbroqua/config.h @@ -50,7 +50,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/gh60/keymaps/robotmaxtron/config.h b/keyboards/gh60/keymaps/robotmaxtron/config.h index ec2f8ceea..1cc41d183 100644 --- a/keyboards/gh60/keymaps/robotmaxtron/config.h +++ b/keyboards/gh60/keymaps/robotmaxtron/config.h @@ -53,7 +53,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/gh80_3000/config.h b/keyboards/gh80_3000/config.h index 7fb418312..edcacc20e 100644 --- a/keyboards/gh80_3000/config.h +++ b/keyboards/gh80_3000/config.h @@ -30,7 +30,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/gonnerd/config.h b/keyboards/gonnerd/config.h index 40615da5f..5b22495db 100644 --- a/keyboards/gonnerd/config.h +++ b/keyboards/gonnerd/config.h @@ -28,7 +28,7 @@ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/gray_studio/cod67/config.h b/keyboards/gray_studio/cod67/config.h index b72f47143..47b42d8a6 100644 --- a/keyboards/gray_studio/cod67/config.h +++ b/keyboards/gray_studio/cod67/config.h @@ -53,7 +53,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/gray_studio/space65/config.h b/keyboards/gray_studio/space65/config.h index e6d9f235d..979cb0a60 100644 --- a/keyboards/gray_studio/space65/config.h +++ b/keyboards/gray_studio/space65/config.h @@ -80,7 +80,7 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/gskt00/config.h b/keyboards/gskt00/config.h index 376f89dbe..7e1107d31 100755 --- a/keyboards/gskt00/config.h +++ b/keyboards/gskt00/config.h @@ -23,7 +23,7 @@ #define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/hadron/config.h b/keyboards/hadron/config.h index 7024f8fcb..61e764748 100644 --- a/keyboards/hadron/config.h +++ b/keyboards/hadron/config.h @@ -40,7 +40,7 @@ along with this program. If not, see . //#define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/halberd/config.h b/keyboards/halberd/config.h index ab46c4d8a..32930d778 100644 --- a/keyboards/halberd/config.h +++ b/keyboards/halberd/config.h @@ -61,7 +61,7 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST @@ -228,5 +228,3 @@ along with this program. If not, see . // #define BOOTMAGIC_LITE_COLUMN 0 #define TAPPING_TERM 100 - - diff --git a/keyboards/handwired/108key_trackpoint/config.h b/keyboards/handwired/108key_trackpoint/config.h index a773a72b1..2c0662c0b 100644 --- a/keyboards/handwired/108key_trackpoint/config.h +++ b/keyboards/handwired/108key_trackpoint/config.h @@ -61,7 +61,7 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #define LOCKING_SUPPORT_ENABLE #define LOCKING_RESYNC_ENABLE diff --git a/keyboards/handwired/412_64/config.h b/keyboards/handwired/412_64/config.h index 9cdb3fac8..cce38f3e6 100644 --- a/keyboards/handwired/412_64/config.h +++ b/keyboards/handwired/412_64/config.h @@ -38,7 +38,7 @@ // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/arrow_pad/config.h b/keyboards/handwired/arrow_pad/config.h index 1ae3d21c4..abb600c51 100644 --- a/keyboards/handwired/arrow_pad/config.h +++ b/keyboards/handwired/arrow_pad/config.h @@ -52,7 +52,7 @@ along with this program. If not, see . #define DIODE_DIRECTION ROW2COL /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h b/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h index 9b6ecfaa3..0e471527d 100644 --- a/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h +++ b/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h @@ -50,7 +50,7 @@ along with this program. If not, see . #define DIODE_DIRECTION ROW2COL /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_24/config.h b/keyboards/handwired/arrow_pad/keymaps/pad_24/config.h index db89e4b84..aba085f3d 100644 --- a/keyboards/handwired/arrow_pad/keymaps/pad_24/config.h +++ b/keyboards/handwired/arrow_pad/keymaps/pad_24/config.h @@ -52,7 +52,7 @@ along with this program. If not, see . #define DIODE_DIRECTION ROW2COL /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/atreus50/config.h b/keyboards/handwired/atreus50/config.h index 4cdc7ed12..0d51e1185 100644 --- a/keyboards/handwired/atreus50/config.h +++ b/keyboards/handwired/atreus50/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/cmd60/config.h b/keyboards/handwired/cmd60/config.h index e95cac1e4..ee676ca05 100644 --- a/keyboards/handwired/cmd60/config.h +++ b/keyboards/handwired/cmd60/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/dactyl/matrix.c b/keyboards/handwired/dactyl/matrix.c index f63cf1188..73423bfbd 100644 --- a/keyboards/handwired/dactyl/matrix.c +++ b/keyboards/handwired/dactyl/matrix.c @@ -31,11 +31,11 @@ along with this program. If not, see . /* Set 0 if debouncing isn't needed */ -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 +#ifndef DEBOUNCE +# define DEBOUNCE 5 #endif -#if (DEBOUNCING_DELAY > 0) +#if (DEBOUNCE > 0) static uint16_t debouncing_time; static bool debouncing = false; #endif @@ -256,7 +256,7 @@ uint8_t matrix_scan(void) #if (DIODE_DIRECTION == COL2ROW) for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row); if (matrix_changed) { @@ -270,7 +270,7 @@ uint8_t matrix_scan(void) #elif (DIODE_DIRECTION == ROW2COL) for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col); if (matrix_changed) { @@ -284,8 +284,8 @@ uint8_t matrix_scan(void) } #endif -# if (DEBOUNCING_DELAY > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { +# if (DEBOUNCE > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { for (uint8_t i = 0; i < MATRIX_ROWS; i++) { matrix[i] = matrix_debouncing[i]; } @@ -299,7 +299,7 @@ uint8_t matrix_scan(void) bool matrix_is_modified(void) // deprecated and evidently not called. { -#if (DEBOUNCING_DELAY > 0) +#if (DEBOUNCE > 0) if (debouncing) return false; #endif return true; diff --git a/keyboards/handwired/dactyl_manuform/config.h b/keyboards/handwired/dactyl_manuform/config.h index 5e7605d3a..6979821b6 100644 --- a/keyboards/handwired/dactyl_manuform/config.h +++ b/keyboards/handwired/dactyl_manuform/config.h @@ -36,7 +36,7 @@ along with this program. If not, see . #define MOUSEKEY_WHEEL_DELAY 0 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/handwired/dactyl_promicro/config.h b/keyboards/handwired/dactyl_promicro/config.h index f81b3de51..3c0b541d1 100644 --- a/keyboards/handwired/dactyl_promicro/config.h +++ b/keyboards/handwired/dactyl_promicro/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MOUSEKEY_WHEEL_DELAY 0 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/handwired/daishi/config.h b/keyboards/handwired/daishi/config.h index 020b486a9..15ff6a6a6 100644 --- a/keyboards/handwired/daishi/config.h +++ b/keyboards/handwired/daishi/config.h @@ -49,7 +49,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Set up rotary encoder */ #define NUMBER_OF_ENCODERS 1 diff --git a/keyboards/handwired/datahand/config.h b/keyboards/handwired/datahand/config.h index a269775f3..c7a0a43de 100644 --- a/keyboards/handwired/datahand/config.h +++ b/keyboards/handwired/datahand/config.h @@ -33,7 +33,7 @@ //#define DIODE_DIRECTION /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 0 +#define DEBOUNCE 0 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/handwired/downbubble/config.h b/keyboards/handwired/downbubble/config.h index 4b2bd92e4..f2628cb70 100644 --- a/keyboards/handwired/downbubble/config.h +++ b/keyboards/handwired/downbubble/config.h @@ -80,7 +80,7 @@ along with this program. If not, see . // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/fivethirteen/config.h b/keyboards/handwired/fivethirteen/config.h index 685d421b1..951122297 100644 --- a/keyboards/handwired/fivethirteen/config.h +++ b/keyboards/handwired/fivethirteen/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/gamenum/config.h b/keyboards/handwired/gamenum/config.h index 180b1b01a..ff60aa529 100644 --- a/keyboards/handwired/gamenum/config.h +++ b/keyboards/handwired/gamenum/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/hacked_motospeed/config.h b/keyboards/handwired/hacked_motospeed/config.h index 59300e0d2..1a341c0f4 100644 --- a/keyboards/handwired/hacked_motospeed/config.h +++ b/keyboards/handwired/hacked_motospeed/config.h @@ -84,7 +84,7 @@ along with this program. If not, see . // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ #define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/hexon38/config.h b/keyboards/handwired/hexon38/config.h index 5453eda54..e9e1eb4d2 100644 --- a/keyboards/handwired/hexon38/config.h +++ b/keyboards/handwired/hexon38/config.h @@ -31,7 +31,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/handwired/ibm122m/config.h b/keyboards/handwired/ibm122m/config.h index 1ef7be78d..8189f704d 100644 --- a/keyboards/handwired/ibm122m/config.h +++ b/keyboards/handwired/ibm122m/config.h @@ -53,7 +53,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 15 +#define DEBOUNCE 15 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/jn68m/config.h b/keyboards/handwired/jn68m/config.h index f6ab4056b..ef0c09cf1 100644 --- a/keyboards/handwired/jn68m/config.h +++ b/keyboards/handwired/jn68m/config.h @@ -40,7 +40,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/handwired/jot50/config.h b/keyboards/handwired/jot50/config.h index 2dfcfd2d2..2d2c1c183 100644 --- a/keyboards/handwired/jot50/config.h +++ b/keyboards/handwired/jot50/config.h @@ -29,7 +29,7 @@ #define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/handwired/jotanck/config.h b/keyboards/handwired/jotanck/config.h index cbbd6ea96..925464825 100644 --- a/keyboards/handwired/jotanck/config.h +++ b/keyboards/handwired/jotanck/config.h @@ -28,7 +28,7 @@ #define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/handwired/jotpad16/config.h b/keyboards/handwired/jotpad16/config.h index e113597dc..075f9649c 100644 --- a/keyboards/handwired/jotpad16/config.h +++ b/keyboards/handwired/jotpad16/config.h @@ -28,11 +28,10 @@ #define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 0 +#define DEBOUNCE 0 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - diff --git a/keyboards/handwired/kbod/config.h b/keyboards/handwired/kbod/config.h index 5f02c7172..f0bba68a5 100644 --- a/keyboards/handwired/kbod/config.h +++ b/keyboards/handwired/kbod/config.h @@ -53,7 +53,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/maartenwut/config.h b/keyboards/handwired/maartenwut/config.h index b939fa1f6..d059c6e4a 100755 --- a/keyboards/handwired/maartenwut/config.h +++ b/keyboards/handwired/maartenwut/config.h @@ -32,7 +32,7 @@ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #define QMK_ESC_OUTPUT C6 // usually COL #define QMK_ESC_INPUT D0 // usually ROW diff --git a/keyboards/handwired/magicforce61/config.h b/keyboards/handwired/magicforce61/config.h index 3dc74f83e..446f4aefc 100644 --- a/keyboards/handwired/magicforce61/config.h +++ b/keyboards/handwired/magicforce61/config.h @@ -53,7 +53,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/magicforce68/config.h b/keyboards/handwired/magicforce68/config.h index dc0a82c94..1cb7e91b4 100644 --- a/keyboards/handwired/magicforce68/config.h +++ b/keyboards/handwired/magicforce68/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/mechboards_micropad/config.h b/keyboards/handwired/mechboards_micropad/config.h index 01a0bdd90..8f237a64a 100644 --- a/keyboards/handwired/mechboards_micropad/config.h +++ b/keyboards/handwired/mechboards_micropad/config.h @@ -80,7 +80,7 @@ along with this program. If not, see . // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/minorca/config.h b/keyboards/handwired/minorca/config.h index c30d54db7..fea201b9c 100644 --- a/keyboards/handwired/minorca/config.h +++ b/keyboards/handwired/minorca/config.h @@ -47,7 +47,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/handwired/ms_sculpt_mobile/config.h b/keyboards/handwired/ms_sculpt_mobile/config.h index 6739b44fc..0b1d3e6b3 100644 --- a/keyboards/handwired/ms_sculpt_mobile/config.h +++ b/keyboards/handwired/ms_sculpt_mobile/config.h @@ -52,7 +52,7 @@ along with this program. If not, see . #define DIODE_DIRECTION ROW2COL /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/not_so_minidox/config.h b/keyboards/handwired/not_so_minidox/config.h index fc6068628..e92621af4 100644 --- a/keyboards/handwired/not_so_minidox/config.h +++ b/keyboards/handwired/not_so_minidox/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/handwired/numbrero/config.h b/keyboards/handwired/numbrero/config.h index bb178bd22..ac38e0814 100644 --- a/keyboards/handwired/numbrero/config.h +++ b/keyboards/handwired/numbrero/config.h @@ -29,7 +29,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/handwired/numpad20/config.h b/keyboards/handwired/numpad20/config.h index c597494c4..78d95965a 100644 --- a/keyboards/handwired/numpad20/config.h +++ b/keyboards/handwired/numpad20/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/ortho5x13/config.h b/keyboards/handwired/ortho5x13/config.h index 1e2128b65..b3850a48a 100644 --- a/keyboards/handwired/ortho5x13/config.h +++ b/keyboards/handwired/ortho5x13/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/pilcrow/config.h b/keyboards/handwired/pilcrow/config.h index 8f562de3b..439686ae6 100644 --- a/keyboards/handwired/pilcrow/config.h +++ b/keyboards/handwired/pilcrow/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/prime_exl/config.h b/keyboards/handwired/prime_exl/config.h index 3201a8247..a2962c074 100644 --- a/keyboards/handwired/prime_exl/config.h +++ b/keyboards/handwired/prime_exl/config.h @@ -43,7 +43,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 5 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h index b5a0a7f4b..f05273d25 100644 --- a/keyboards/handwired/promethium/config.h +++ b/keyboards/handwired/promethium/config.h @@ -60,7 +60,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/promethium/matrix.c b/keyboards/handwired/promethium/matrix.c index 0b4456e28..3b8e5af82 100644 --- a/keyboards/handwired/promethium/matrix.c +++ b/keyboards/handwired/promethium/matrix.c @@ -31,11 +31,11 @@ along with this program. If not, see . /* Set 0 if debouncing isn't needed */ -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 +#ifndef DEBOUNCE +# define DEBOUNCE 5 #endif -#if (DEBOUNCING_DELAY > 0) +#if (DEBOUNCE > 0) static uint16_t debouncing_time; static bool debouncing = false; #endif @@ -128,7 +128,7 @@ uint8_t matrix_scan(void) { // Set row, read cols for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row); if (matrix_changed) { @@ -142,8 +142,8 @@ uint8_t matrix_scan(void) } -# if (DEBOUNCING_DELAY > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { +# if (DEBOUNCE > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { for (uint8_t i = 0; i < MATRIX_ROWS; i++) { matrix[i] = matrix_debouncing[i]; } @@ -157,7 +157,7 @@ uint8_t matrix_scan(void) bool matrix_is_modified(void) { -#if (DEBOUNCING_DELAY > 0) +#if (DEBOUNCE > 0) if (debouncing) return false; #endif return true; @@ -294,4 +294,3 @@ static void unselect_row(uint8_t row) static void unselect_rows(void) { } - diff --git a/keyboards/handwired/pteron/config.h b/keyboards/handwired/pteron/config.h index d0b074c68..56921b020 100644 --- a/keyboards/handwired/pteron/config.h +++ b/keyboards/handwired/pteron/config.h @@ -23,7 +23,7 @@ #define DIODE_DIRECTION ROW2COL /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 // 5 is default +#define DEBOUNCE 5 // 5 is default /* prevent stuck modifiers */ #define PREVENT_STUCK_MODIFIERS diff --git a/keyboards/handwired/qc60/config.h b/keyboards/handwired/qc60/config.h index aad1d64a0..0c8f8f007 100644 --- a/keyboards/handwired/qc60/config.h +++ b/keyboards/handwired/qc60/config.h @@ -16,7 +16,7 @@ #define MATRIX_COLS 8 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/handwired/reddot/config.h b/keyboards/handwired/reddot/config.h index 82fe01863..4d908041b 100755 --- a/keyboards/handwired/reddot/config.h +++ b/keyboards/handwired/reddot/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/retro_refit/config.h b/keyboards/handwired/retro_refit/config.h index 34def3815..1d4f1e075 100644 --- a/keyboards/handwired/retro_refit/config.h +++ b/keyboards/handwired/retro_refit/config.h @@ -47,7 +47,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 0 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/handwired/space_oddity/config.h b/keyboards/handwired/space_oddity/config.h index 832216423..09975cfc8 100644 --- a/keyboards/handwired/space_oddity/config.h +++ b/keyboards/handwired/space_oddity/config.h @@ -35,7 +35,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/handwired/splittest/config.h b/keyboards/handwired/splittest/config.h index 9e4fb38ca..a502d1238 100644 --- a/keyboards/handwired/splittest/config.h +++ b/keyboards/handwired/splittest/config.h @@ -43,7 +43,7 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/handwired/tennie/config.h b/keyboards/handwired/tennie/config.h index b50886cdc..20795b048 100644 --- a/keyboards/handwired/tennie/config.h +++ b/keyboards/handwired/tennie/config.h @@ -80,7 +80,7 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/terminus_mini/config.h b/keyboards/handwired/terminus_mini/config.h index e1b5daccd..a5a6736ba 100644 --- a/keyboards/handwired/terminus_mini/config.h +++ b/keyboards/handwired/terminus_mini/config.h @@ -60,7 +60,7 @@ along with this program. If not, see . #define TAPPING_TERM 150 //reduce time required to register a held key /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/trackpoint/config.h b/keyboards/handwired/trackpoint/config.h index cecb6a509..a1c12efb0 100644 --- a/keyboards/handwired/trackpoint/config.h +++ b/keyboards/handwired/trackpoint/config.h @@ -61,7 +61,7 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #define LOCKING_SUPPORT_ENABLE #define LOCKING_RESYNC_ENABLE diff --git a/keyboards/handwired/tradestation/config.h b/keyboards/handwired/tradestation/config.h index 22650d2f1..33c87548f 100644 --- a/keyboards/handwired/tradestation/config.h +++ b/keyboards/handwired/tradestation/config.h @@ -29,7 +29,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/handwired/traveller/config.h b/keyboards/handwired/traveller/config.h index ccf214736..3812ec61f 100644 --- a/keyboards/handwired/traveller/config.h +++ b/keyboards/handwired/traveller/config.h @@ -63,7 +63,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/woodpad/config.h b/keyboards/handwired/woodpad/config.h index 77be4a0d9..d08c47387 100644 --- a/keyboards/handwired/woodpad/config.h +++ b/keyboards/handwired/woodpad/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/handwired/xealous/rev1/config.h b/keyboards/handwired/xealous/rev1/config.h index f58c8f90b..ab39dfbc1 100644 --- a/keyboards/handwired/xealous/rev1/config.h +++ b/keyboards/handwired/xealous/rev1/config.h @@ -62,7 +62,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* * Feature disable options diff --git a/keyboards/hecomi/alpha/config.h b/keyboards/hecomi/alpha/config.h index 8a65f146b..dbc94454f 100644 --- a/keyboards/hecomi/alpha/config.h +++ b/keyboards/hecomi/alpha/config.h @@ -79,7 +79,7 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/helix/pico/config.h b/keyboards/helix/pico/config.h index 343cecd59..b377332ef 100644 --- a/keyboards/helix/pico/config.h +++ b/keyboards/helix/pico/config.h @@ -63,7 +63,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/helix/rev1/config.h b/keyboards/helix/rev1/config.h index 22e61acc7..454e8ee62 100644 --- a/keyboards/helix/rev1/config.h +++ b/keyboards/helix/rev1/config.h @@ -60,7 +60,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/helix/rev2/config.h b/keyboards/helix/rev2/config.h index 2dc2fb8dd..ec7445859 100644 --- a/keyboards/helix/rev2/config.h +++ b/keyboards/helix/rev2/config.h @@ -72,7 +72,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/hid_liber/config.h b/keyboards/hid_liber/config.h index 4519d8628..c21307e1a 100755 --- a/keyboards/hid_liber/config.h +++ b/keyboards/hid_liber/config.h @@ -45,7 +45,7 @@ //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/hifumi/config.h b/keyboards/hifumi/config.h index dccb0352d..b4f192a7a 100644 --- a/keyboards/hifumi/config.h +++ b/keyboards/hifumi/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* ws2812 RGB LED */ #define RGB_DI_PIN D3 diff --git a/keyboards/hineybush/h87a/config.h b/keyboards/hineybush/h87a/config.h index 2e6c37e33..245e6eda8 100644 --- a/keyboards/hineybush/h87a/config.h +++ b/keyboards/hineybush/h87a/config.h @@ -53,7 +53,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/hineybush/hineyg80/config.h b/keyboards/hineybush/hineyg80/config.h index 7e75c62b3..4072def2f 100644 --- a/keyboards/hineybush/hineyg80/config.h +++ b/keyboards/hineybush/hineyg80/config.h @@ -29,7 +29,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE @@ -44,4 +44,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - diff --git a/keyboards/hs60/v1/config.h b/keyboards/hs60/v1/config.h index ee546f3f1..762ab319f 100644 --- a/keyboards/hs60/v1/config.h +++ b/keyboards/hs60/v1/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/hs60/v1/v1.c b/keyboards/hs60/v1/v1.c index 5267c9457..70c1c2128 100644 --- a/keyboards/hs60/v1/v1.c +++ b/keyboards/hs60/v1/v1.c @@ -315,7 +315,7 @@ void bootmagic_lite(void) // We need multiple scans because debouncing can't be turned off. matrix_scan(); - wait_ms(DEBOUNCING_DELAY); + wait_ms(DEBOUNCE); matrix_scan(); // If the Esc and space bar are held down on power up, diff --git a/keyboards/hs60/v2/config.h b/keyboards/hs60/v2/config.h index 05255d133..7169d846b 100644 --- a/keyboards/hs60/v2/config.h +++ b/keyboards/hs60/v2/config.h @@ -39,7 +39,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/idobo/config.h b/keyboards/idobo/config.h index 122180780..e1c08afae 100644 --- a/keyboards/idobo/config.h +++ b/keyboards/idobo/config.h @@ -62,7 +62,7 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/jc65/v32u4/config.h b/keyboards/jc65/v32u4/config.h index 98256b128..8233dd1e8 100644 --- a/keyboards/jc65/v32u4/config.h +++ b/keyboards/jc65/v32u4/config.h @@ -52,6 +52,6 @@ along with this program. If not, see . #endif #define DIODE_DIRECTION COL2ROW -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #endif diff --git a/keyboards/jd40/config.h b/keyboards/jd40/config.h index 70648d2f5..c03bb3aec 100644 --- a/keyboards/jd40/config.h +++ b/keyboards/jd40/config.h @@ -50,7 +50,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/jd45/config.h b/keyboards/jd45/config.h index d3137b9f4..02968b44e 100644 --- a/keyboards/jd45/config.h +++ b/keyboards/jd45/config.h @@ -49,7 +49,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/jd45/keymaps/mjt/config.h b/keyboards/jd45/keymaps/mjt/config.h index 5507caae5..da1adc9af 100644 --- a/keyboards/jd45/keymaps/mjt/config.h +++ b/keyboards/jd45/keymaps/mjt/config.h @@ -52,7 +52,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/jj40/config.h b/keyboards/jj40/config.h index e88147ac8..c068685a4 100644 --- a/keyboards/jj40/config.h +++ b/keyboards/jj40/config.h @@ -42,7 +42,7 @@ along with this program. If not, see . #define RGBLIGHT_ANIMATIONS /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #define NO_UART 1 diff --git a/keyboards/jj4x4/config.h b/keyboards/jj4x4/config.h index a8df46f01..80fa07d3b 100644 --- a/keyboards/jj4x4/config.h +++ b/keyboards/jj4x4/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define RGBLIGHT_ANIMATIONS /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #define NO_UART 1 diff --git a/keyboards/kagamidget/config.h b/keyboards/kagamidget/config.h index fc9463aee..00e09530e 100644 --- a/keyboards/kagamidget/config.h +++ b/keyboards/kagamidget/config.h @@ -57,7 +57,7 @@ along with this program. If not, see . #define RGBLIGHT_VAL_STEP 8 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/katana60/config.h b/keyboards/katana60/config.h index eb67c0b21..3385ddb9c 100644 --- a/keyboards/katana60/config.h +++ b/keyboards/katana60/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/kbdfans/kbd19x/config.h b/keyboards/kbdfans/kbd19x/config.h index 9c5f2ba38..d722dc261 100644 --- a/keyboards/kbdfans/kbd19x/config.h +++ b/keyboards/kbdfans/kbd19x/config.h @@ -62,7 +62,7 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/kbdfans/kbd4x/config.h b/keyboards/kbdfans/kbd4x/config.h index c99fcc73f..07bc4b990 100644 --- a/keyboards/kbdfans/kbd4x/config.h +++ b/keyboards/kbdfans/kbd4x/config.h @@ -62,7 +62,7 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/kbdfans/kbd66/config.h b/keyboards/kbdfans/kbd66/config.h index 730df1307..a2666a619 100644 --- a/keyboards/kbdfans/kbd66/config.h +++ b/keyboards/kbdfans/kbd66/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . #define BREATHING_PERIOD 6 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST @@ -180,4 +180,3 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 - diff --git a/keyboards/kbdfans/kbd67/hotswap/config.h b/keyboards/kbdfans/kbd67/hotswap/config.h index 8822b213e..fca9916ed 100644 --- a/keyboards/kbdfans/kbd67/hotswap/config.h +++ b/keyboards/kbdfans/kbd67/hotswap/config.h @@ -80,7 +80,7 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/kbdfans/kbd67/rev1/config.h b/keyboards/kbdfans/kbd67/rev1/config.h index a98687569..7a26192f4 100644 --- a/keyboards/kbdfans/kbd67/rev1/config.h +++ b/keyboards/kbdfans/kbd67/rev1/config.h @@ -75,7 +75,7 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/kbdfans/kbd67/rev2/config.h b/keyboards/kbdfans/kbd67/rev2/config.h index 1c8385f7d..97945eec8 100644 --- a/keyboards/kbdfans/kbd67/rev2/config.h +++ b/keyboards/kbdfans/kbd67/rev2/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/kbdfans/kbd6x/config.h b/keyboards/kbdfans/kbd6x/config.h index d3f1ee82c..1ee31e569 100644 --- a/keyboards/kbdfans/kbd6x/config.h +++ b/keyboards/kbdfans/kbd6x/config.h @@ -62,7 +62,7 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/kbdfans/kbd75/config.h b/keyboards/kbdfans/kbd75/config.h index 6f0cd86de..611e682e5 100644 --- a/keyboards/kbdfans/kbd75/config.h +++ b/keyboards/kbdfans/kbd75/config.h @@ -30,7 +30,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/kbdfans/kbd8x/config.h b/keyboards/kbdfans/kbd8x/config.h index 2cae29626..bdd310440 100644 --- a/keyboards/kbdfans/kbd8x/config.h +++ b/keyboards/kbdfans/kbd8x/config.h @@ -62,7 +62,7 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/kc60/config.h b/keyboards/kc60/config.h index 5c002f9b3..7e9cdaa08 100644 --- a/keyboards/kc60/config.h +++ b/keyboards/kc60/config.h @@ -56,7 +56,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/kc60se/config.h b/keyboards/kc60se/config.h index 66a4aa0cb..5fffe6114 100644 --- a/keyboards/kc60se/config.h +++ b/keyboards/kc60se/config.h @@ -47,7 +47,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 6 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/keebio/bdn9/config.h b/keyboards/keebio/bdn9/config.h index 1637ce45f..19e625348 100644 --- a/keyboards/keebio/bdn9/config.h +++ b/keyboards/keebio/bdn9/config.h @@ -60,7 +60,7 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/keebio/bfo9000/config.h b/keyboards/keebio/bfo9000/config.h index c5afb265f..b45ec9c2f 100644 --- a/keyboards/keebio/bfo9000/config.h +++ b/keyboards/keebio/bfo9000/config.h @@ -38,7 +38,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B5, B6, B2, B3, B1, F7, F6, F5, F4 } /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/keebio/chocopad/config.h b/keyboards/keebio/chocopad/config.h index fb00ae70a..d8831556c 100644 --- a/keyboards/keebio/chocopad/config.h +++ b/keyboards/keebio/chocopad/config.h @@ -27,7 +27,7 @@ #define BACKLIGHT_LEVELS 6 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/keebio/dilly/config.h b/keyboards/keebio/dilly/config.h index 1489ec302..e4d17df47 100644 --- a/keyboards/keebio/dilly/config.h +++ b/keyboards/keebio/dilly/config.h @@ -30,7 +30,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/keebio/fourier/config.h b/keyboards/keebio/fourier/config.h index 70967a13f..9ddc53a0c 100644 --- a/keyboards/keebio/fourier/config.h +++ b/keyboards/keebio/fourier/config.h @@ -52,7 +52,7 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/keebio/levinson/rev1/config.h b/keyboards/keebio/levinson/rev1/config.h index eec95f727..52cf7baf7 100644 --- a/keyboards/keebio/levinson/rev1/config.h +++ b/keyboards/keebio/levinson/rev1/config.h @@ -39,7 +39,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/keebio/levinson/rev2/config.h b/keyboards/keebio/levinson/rev2/config.h index a9fe89586..1365ae792 100644 --- a/keyboards/keebio/levinson/rev2/config.h +++ b/keyboards/keebio/levinson/rev2/config.h @@ -39,7 +39,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/keebio/nyquist/rev1/config.h b/keyboards/keebio/nyquist/rev1/config.h index 98381aca7..75fa43b58 100644 --- a/keyboards/keebio/nyquist/rev1/config.h +++ b/keyboards/keebio/nyquist/rev1/config.h @@ -44,7 +44,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/keebio/nyquist/rev2/config.h b/keyboards/keebio/nyquist/rev2/config.h index 52c50694b..9775113c6 100644 --- a/keyboards/keebio/nyquist/rev2/config.h +++ b/keyboards/keebio/nyquist/rev2/config.h @@ -41,7 +41,7 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/keebio/nyquist/rev3/config.h b/keyboards/keebio/nyquist/rev3/config.h index 3c7822def..b2573d1dc 100644 --- a/keyboards/keebio/nyquist/rev3/config.h +++ b/keyboards/keebio/nyquist/rev3/config.h @@ -42,7 +42,7 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/keebio/quefrency/rev1/config.h b/keyboards/keebio/quefrency/rev1/config.h index 67cef6195..9778ef470 100644 --- a/keyboards/keebio/quefrency/rev1/config.h +++ b/keyboards/keebio/quefrency/rev1/config.h @@ -41,7 +41,7 @@ along with this program. If not, see . #define SPLIT_HAND_PIN D2 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/keebio/rorschach/rev1/config.h b/keyboards/keebio/rorschach/rev1/config.h index 13402544f..bcfce2bee 100644 --- a/keyboards/keebio/rorschach/rev1/config.h +++ b/keyboards/keebio/rorschach/rev1/config.h @@ -40,7 +40,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/keebio/tragicforce68/config.h b/keyboards/keebio/tragicforce68/config.h index b415b5d71..4a1b6378c 100644 --- a/keyboards/keebio/tragicforce68/config.h +++ b/keyboards/keebio/tragicforce68/config.h @@ -53,7 +53,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 7 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/keebio/viterbi/rev1/config.h b/keyboards/keebio/viterbi/rev1/config.h index e6fc13abd..12a61448d 100644 --- a/keyboards/keebio/viterbi/rev1/config.h +++ b/keyboards/keebio/viterbi/rev1/config.h @@ -41,7 +41,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/keebio/viterbi/rev2/config.h b/keyboards/keebio/viterbi/rev2/config.h index b2970610e..0b78604d8 100644 --- a/keyboards/keebio/viterbi/rev2/config.h +++ b/keyboards/keebio/viterbi/rev2/config.h @@ -40,7 +40,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/keebio/wavelet/config.h b/keyboards/keebio/wavelet/config.h index 5610bba17..6f67fdbaf 100644 --- a/keyboards/keebio/wavelet/config.h +++ b/keyboards/keebio/wavelet/config.h @@ -38,7 +38,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F6, B1, B2, B6, B4, E6 } /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/keycapsss/o4l_5x12/config.h b/keyboards/keycapsss/o4l_5x12/config.h index b53e372d0..67bde35cf 100644 --- a/keyboards/keycapsss/o4l_5x12/config.h +++ b/keyboards/keycapsss/o4l_5x12/config.h @@ -34,7 +34,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/kinesis/config.h b/keyboards/kinesis/config.h index 74e85f6f1..368037d8b 100644 --- a/keyboards/kinesis/config.h +++ b/keyboards/kinesis/config.h @@ -36,7 +36,7 @@ along with this program. If not, see . #define MOUSEKEY_WHEEL_TIME_TO_MAX 1 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/kinesis/stapelberg/config.h b/keyboards/kinesis/stapelberg/config.h index 321aec5eb..992480195 100644 --- a/keyboards/kinesis/stapelberg/config.h +++ b/keyboards/kinesis/stapelberg/config.h @@ -30,7 +30,7 @@ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* don't know if this should be defined at the board or top level. Assuming board #define MOUSEKEY_DELAY 100 diff --git a/keyboards/kira75/config.h b/keyboards/kira75/config.h index 4f98c1df8..15be87d26 100644 --- a/keyboards/kira75/config.h +++ b/keyboards/kira75/config.h @@ -61,7 +61,7 @@ along with this program. If not, see . #define RGBLIGHT_VAL_STEP 8 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/kmac/config.h b/keyboards/kmac/config.h index bea682173..110a7ac0f 100644 --- a/keyboards/kmac/config.h +++ b/keyboards/kmac/config.h @@ -50,7 +50,7 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/kmac/matrix.c b/keyboards/kmac/matrix.c index 82f0621f2..00da96604 100644 --- a/keyboards/kmac/matrix.c +++ b/keyboards/kmac/matrix.c @@ -28,8 +28,8 @@ along with this program. If not, see . /* Set 0 if debouncing isn't needed */ -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 +#ifndef DEBOUNCE +# define DEBOUNCE 5 #endif #define COL_SHIFTER ((uint32_t)1) @@ -83,7 +83,7 @@ uint8_t matrix_scan(void) } } - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { for (uint8_t i = 0; i < MATRIX_ROWS; i++) { matrix[i] = matrix_debouncing[i]; } diff --git a/keyboards/kmini/config.h b/keyboards/kmini/config.h index 7a795d49d..b5460c9de 100755 --- a/keyboards/kmini/config.h +++ b/keyboards/kmini/config.h @@ -48,6 +48,6 @@ // #define BACKLIGHT_BREATHING /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #endif diff --git a/keyboards/kmini/matrix.c b/keyboards/kmini/matrix.c index 69135909a..9888f1a76 100755 --- a/keyboards/kmini/matrix.c +++ b/keyboards/kmini/matrix.c @@ -27,8 +27,8 @@ /* Set 0 if debouncing isn't needed */ -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 +#ifndef DEBOUNCE +# define DEBOUNCE 5 #endif #define COL_SHIFTER ((uint32_t)1) @@ -98,7 +98,7 @@ uint8_t matrix_scan(void) } } - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { for (uint8_t i = 0; i < MATRIX_ROWS; i++) { matrix[i] = matrix_debouncing[i]; } diff --git a/keyboards/knops/mini/config.h b/keyboards/knops/mini/config.h index 312914127..01a5f44ba 100644 --- a/keyboards/knops/mini/config.h +++ b/keyboards/knops/mini/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/kona_classic/config.h b/keyboards/kona_classic/config.h index 819a7475a..affd572b7 100644 --- a/keyboards/kona_classic/config.h +++ b/keyboards/kona_classic/config.h @@ -61,7 +61,7 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/laptreus/config.h b/keyboards/laptreus/config.h index de6b7ce94..675d7b007 100644 --- a/keyboards/laptreus/config.h +++ b/keyboards/laptreus/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/launchpad/config.h b/keyboards/launchpad/config.h index 4023a2201..d93fe65d2 100644 --- a/keyboards/launchpad/config.h +++ b/keyboards/launchpad/config.h @@ -38,7 +38,7 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/lazydesigners/dimple/config.h b/keyboards/lazydesigners/dimple/config.h index 0f7a8798e..9814d1050 100644 --- a/keyboards/lazydesigners/dimple/config.h +++ b/keyboards/lazydesigners/dimple/config.h @@ -40,7 +40,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/lazydesigners/the50/config.h b/keyboards/lazydesigners/the50/config.h index d1ddbfea4..72246eaba 100644 --- a/keyboards/lazydesigners/the50/config.h +++ b/keyboards/lazydesigners/the50/config.h @@ -29,7 +29,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/lazydesigners/the60/config.h b/keyboards/lazydesigners/the60/config.h index a767d1dc8..d6bd2205c 100644 --- a/keyboards/lazydesigners/the60/config.h +++ b/keyboards/lazydesigners/the60/config.h @@ -29,7 +29,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h index e9dc0a534..c6e7f6479 100644 --- a/keyboards/lets_split/rev1/config.h +++ b/keyboards/lets_split/rev1/config.h @@ -43,7 +43,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h index e31026965..2481ce041 100644 --- a/keyboards/lets_split/rev2/config.h +++ b/keyboards/lets_split/rev2/config.h @@ -43,7 +43,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/lets_split/sockets/config.h b/keyboards/lets_split/sockets/config.h index 9c6367f53..2d3e68610 100644 --- a/keyboards/lets_split/sockets/config.h +++ b/keyboards/lets_split/sockets/config.h @@ -43,7 +43,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/lets_split_eh/config.h b/keyboards/lets_split_eh/config.h index c227326c0..655d35e1a 100644 --- a/keyboards/lets_split_eh/config.h +++ b/keyboards/lets_split_eh/config.h @@ -34,7 +34,7 @@ along with this program. If not, see . #define MATRIX_COLS 6 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* serial.c configuration for split keyboard */ //#define SOFT_SERIAL_PIN D0 diff --git a/keyboards/lfkeyboards/lfk65_hs/config.h b/keyboards/lfkeyboards/lfk65_hs/config.h index 73e906c3b..f448419d4 100644 --- a/keyboards/lfkeyboards/lfk65_hs/config.h +++ b/keyboards/lfkeyboards/lfk65_hs/config.h @@ -34,7 +34,7 @@ #define RGBLIGHT_VAL_STEP 17 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/lfkeyboards/lfk78/config.h b/keyboards/lfkeyboards/lfk78/config.h index 30919894c..44b55b50e 100644 --- a/keyboards/lfkeyboards/lfk78/config.h +++ b/keyboards/lfkeyboards/lfk78/config.h @@ -65,7 +65,7 @@ along with this program. If not, see . #define TAPPING_TERM 200 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/lfkeyboards/lfk87/config.h b/keyboards/lfkeyboards/lfk87/config.h index 00df42977..00df4e911 100644 --- a/keyboards/lfkeyboards/lfk87/config.h +++ b/keyboards/lfkeyboards/lfk87/config.h @@ -65,7 +65,7 @@ along with this program. If not, see . #define TAPPING_TERM 200 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/lfkeyboards/lfkpad/config.h b/keyboards/lfkeyboards/lfkpad/config.h index ea29e84a4..1d8de837d 100644 --- a/keyboards/lfkeyboards/lfkpad/config.h +++ b/keyboards/lfkeyboards/lfkpad/config.h @@ -44,7 +44,7 @@ along with this program. If not, see . #define TAPPING_TERM 200 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/lfkeyboards/mini1800/config.h b/keyboards/lfkeyboards/mini1800/config.h index e4d197aa2..214f5f45a 100644 --- a/keyboards/lfkeyboards/mini1800/config.h +++ b/keyboards/lfkeyboards/mini1800/config.h @@ -52,7 +52,7 @@ along with this program. If not, see . #define TAPPING_TERM 200 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/lfkeyboards/smk65/config.h b/keyboards/lfkeyboards/smk65/config.h index ddc7c5165..deca087bc 100644 --- a/keyboards/lfkeyboards/smk65/config.h +++ b/keyboards/lfkeyboards/smk65/config.h @@ -61,7 +61,7 @@ along with this program. If not, see . #define RGBLIGHT_VAL_STEP 17 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/lily58/matrix.c b/keyboards/lily58/matrix.c index fc42dd14d..328d16c77 100644 --- a/keyboards/lily58/matrix.c +++ b/keyboards/lily58/matrix.c @@ -37,11 +37,11 @@ along with this program. If not, see . # include "serial.h" #endif -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 +#ifndef DEBOUNCE +# define DEBOUNCE 5 #endif -#if (DEBOUNCING_DELAY > 0) +#if (DEBOUNCE > 0) static uint16_t debouncing_time; static bool debouncing = false; #endif @@ -145,7 +145,7 @@ uint8_t _matrix_scan(void) #if (DIODE_DIRECTION == COL2ROW) // Set row, read cols for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); if (matrix_changed) { @@ -162,7 +162,7 @@ uint8_t _matrix_scan(void) #elif (DIODE_DIRECTION == ROW2COL) // Set col, read rows for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); if (matrix_changed) { debouncing = true; @@ -175,8 +175,8 @@ uint8_t _matrix_scan(void) } #endif -# if (DEBOUNCING_DELAY > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { +# if (DEBOUNCE > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { matrix[i+offset] = matrix_debouncing[i+offset]; } diff --git a/keyboards/lily58/rev1/config.h b/keyboards/lily58/rev1/config.h index 7a4386e70..8fd42070e 100644 --- a/keyboards/lily58/rev1/config.h +++ b/keyboards/lily58/rev1/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/m0lly/config.h b/keyboards/m0lly/config.h index 21f5fd3fb..010833ac8 100644 --- a/keyboards/m0lly/config.h +++ b/keyboards/m0lly/config.h @@ -60,7 +60,7 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/m10a/config.h b/keyboards/m10a/config.h index ec425dfbd..f2e6e45e7 100644 --- a/keyboards/m10a/config.h +++ b/keyboards/m10a/config.h @@ -49,7 +49,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 6 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/massdrop/alt/config.h b/keyboards/massdrop/alt/config.h index 59e66e133..d8389fc00 100644 --- a/keyboards/massdrop/alt/config.h +++ b/keyboards/massdrop/alt/config.h @@ -92,7 +92,7 @@ along with this program. If not, see . #define DEBUG_BOOT_TRACING_PIN 23 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/massdrop/alt/matrix.c b/keyboards/massdrop/alt/matrix.c index 472479d30..314115571 100644 --- a/keyboards/massdrop/alt/matrix.c +++ b/keyboards/massdrop/alt/matrix.c @@ -128,7 +128,7 @@ uint8_t matrix_scan(void) else { //Begin or extend debounce on change - mdebouncing = timer_read64() + DEBOUNCING_DELAY; + mdebouncing = timer_read64() + DEBOUNCE; } matrix_scan_quantum(); diff --git a/keyboards/massdrop/ctrl/config.h b/keyboards/massdrop/ctrl/config.h index 9b9f98f5f..215a2e1b1 100644 --- a/keyboards/massdrop/ctrl/config.h +++ b/keyboards/massdrop/ctrl/config.h @@ -92,7 +92,7 @@ along with this program. If not, see . #define DEBUG_BOOT_TRACING_PIN 23 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/massdrop/ctrl/matrix.c b/keyboards/massdrop/ctrl/matrix.c index 5f1741e58..f3529fe72 100644 --- a/keyboards/massdrop/ctrl/matrix.c +++ b/keyboards/massdrop/ctrl/matrix.c @@ -128,7 +128,7 @@ uint8_t matrix_scan(void) else { //Begin or extend debounce on change - mdebouncing = timer_read64() + DEBOUNCING_DELAY; + mdebouncing = timer_read64() + DEBOUNCE; } matrix_scan_quantum(); diff --git a/keyboards/maxipad/config.h b/keyboards/maxipad/config.h index 6d8225d74..50496c16b 100644 --- a/keyboards/maxipad/config.h +++ b/keyboards/maxipad/config.h @@ -32,7 +32,7 @@ //#define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/mechkeys/mk60/config.h b/keyboards/mechkeys/mk60/config.h index 9d6a2565d..9fccd8a8b 100644 --- a/keyboards/mechkeys/mk60/config.h +++ b/keyboards/mechkeys/mk60/config.h @@ -80,7 +80,7 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/mechmini/v2/config.h b/keyboards/mechmini/v2/config.h index edca6a5c4..9da3e5f0a 100755 --- a/keyboards/mechmini/v2/config.h +++ b/keyboards/mechmini/v2/config.h @@ -48,7 +48,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/meira/featherble/config.h b/keyboards/meira/featherble/config.h index d8f86fe02..fb24c6079 100644 --- a/keyboards/meira/featherble/config.h +++ b/keyboards/meira/featherble/config.h @@ -48,7 +48,7 @@ along with this program. If not, see . //#define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/meira/matrix.c b/keyboards/meira/matrix.c index c1952f35f..030c91332 100644 --- a/keyboards/meira/matrix.c +++ b/keyboards/meira/matrix.c @@ -33,11 +33,11 @@ along with this program. If not, see . #include "config.h" #include "timer.h" -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 +#ifndef DEBOUNCE +# define DEBOUNCE 5 #endif -#if (DEBOUNCING_DELAY > 0) +#if (DEBOUNCE > 0) static uint16_t debouncing_time; static bool debouncing = false; #endif @@ -132,7 +132,7 @@ uint8_t _matrix_scan(void) { // Set col, read rows for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col); if (matrix_changed) { debouncing = true; @@ -144,8 +144,8 @@ uint8_t _matrix_scan(void) } -# if (DEBOUNCING_DELAY > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { +# if (DEBOUNCE > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { for (uint8_t i = 0; i < MATRIX_ROWS; i++) { matrix[i] = matrix_debouncing[i]; } @@ -276,5 +276,3 @@ static void unselect_cols(void) _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW } } - - diff --git a/keyboards/meira/promicro/config.h b/keyboards/meira/promicro/config.h index 3c2113a20..67e5ca06d 100644 --- a/keyboards/meira/promicro/config.h +++ b/keyboards/meira/promicro/config.h @@ -39,7 +39,7 @@ along with this program. If not, see . #define CATERINA_BOOTLOADER /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/meishi/config.h b/keyboards/meishi/config.h index 6aa4e6b6e..3393610c7 100644 --- a/keyboards/meishi/config.h +++ b/keyboards/meishi/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST @@ -180,4 +180,3 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 - diff --git a/keyboards/melody96/config.h b/keyboards/melody96/config.h index db814d013..201b1ad07 100644 --- a/keyboards/melody96/config.h +++ b/keyboards/melody96/config.h @@ -30,7 +30,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/meme/config.h b/keyboards/meme/config.h index bd3e1cf2c..e06b0e4ef 100644 --- a/keyboards/meme/config.h +++ b/keyboards/meme/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/miniaxe/config.h b/keyboards/miniaxe/config.h index be8ef4baf..db8509717 100644 --- a/keyboards/miniaxe/config.h +++ b/keyboards/miniaxe/config.h @@ -70,7 +70,7 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/minidox/config.h b/keyboards/minidox/config.h index b99180eb1..7502983b6 100644 --- a/keyboards/minidox/config.h +++ b/keyboards/minidox/config.h @@ -42,7 +42,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/mint60/config.h b/keyboards/mint60/config.h index 35449eb26..c98b9c1af 100644 --- a/keyboards/mint60/config.h +++ b/keyboards/mint60/config.h @@ -59,7 +59,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/miuni32/config.h b/keyboards/miuni32/config.h index d7df83cfe..59402e869 100644 --- a/keyboards/miuni32/config.h +++ b/keyboards/miuni32/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/model01/config.h b/keyboards/model01/config.h index 167310731..c2160979c 100644 --- a/keyboards/model01/config.h +++ b/keyboards/model01/config.h @@ -32,7 +32,7 @@ along with this program. If not, see . #define MATRIX_COLS 8 /* The scanners already debounce for us */ -#define DEBOUNCING_DELAY 0 +#define DEBOUNCE 0 /* RGB matrix constants */ #define DRIVER_LED_TOTAL 64 diff --git a/keyboards/mt40/config.h b/keyboards/mt40/config.h index e268c3c1a..48f707f71 100644 --- a/keyboards/mt40/config.h +++ b/keyboards/mt40/config.h @@ -68,7 +68,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -/* #define DEBOUNCING_DELAY 5 */ +/* #define DEBOUNCE 5 */ /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/mt980/config.h b/keyboards/mt980/config.h index 88c25a587..6b8b95295 100644 --- a/keyboards/mt980/config.h +++ b/keyboards/mt980/config.h @@ -29,7 +29,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/mxss/config.h b/keyboards/mxss/config.h index e3636ed51..812f301d6 100644 --- a/keyboards/mxss/config.h +++ b/keyboards/mxss/config.h @@ -41,7 +41,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Basic RGB configuration */ #define RGB_DI_PIN C7 diff --git a/keyboards/namecard2x4/rev1/config.h b/keyboards/namecard2x4/rev1/config.h index 4c60d059d..9286afa69 100644 --- a/keyboards/namecard2x4/rev1/config.h +++ b/keyboards/namecard2x4/rev1/config.h @@ -60,7 +60,7 @@ along with this program. If not, see . //#define BACKLIGHT_LEVELS 1 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/namecard2x4/rev2/config.h b/keyboards/namecard2x4/rev2/config.h index 4343dff8c..f2cf053d2 100644 --- a/keyboards/namecard2x4/rev2/config.h +++ b/keyboards/namecard2x4/rev2/config.h @@ -60,7 +60,7 @@ along with this program. If not, see . //#define BACKLIGHT_LEVELS 1 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/nek_type_a/config.h b/keyboards/nek_type_a/config.h index 782b91d0e..5b105804d 100644 --- a/keyboards/nek_type_a/config.h +++ b/keyboards/nek_type_a/config.h @@ -39,7 +39,7 @@ along with this program. If not, see . #define DIODE_DIRECTION ROW2COL /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE @@ -51,5 +51,3 @@ along with this program. If not, see . #define IS_COMMAND() ( \ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ ) - - diff --git a/keyboards/nek_type_a/matrix.c b/keyboards/nek_type_a/matrix.c index 525296b1f..a3c0155e1 100644 --- a/keyboards/nek_type_a/matrix.c +++ b/keyboards/nek_type_a/matrix.c @@ -38,11 +38,11 @@ along with this program. If not, see . /* Set 0 if debouncing isn't needed */ -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 +#ifndef DEBOUNCE +# define DEBOUNCE 5 #endif -#if (DEBOUNCING_DELAY > 0) +#if (DEBOUNCE > 0) static uint16_t debouncing_time; static bool debouncing = false; #endif @@ -160,7 +160,7 @@ uint8_t matrix_scan(void) // Set row, read cols for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row); if (matrix_changed) { @@ -178,7 +178,7 @@ uint8_t matrix_scan(void) // Set col, read rows for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col); if (matrix_changed) { debouncing = true; @@ -192,8 +192,8 @@ uint8_t matrix_scan(void) #endif -# if (DEBOUNCING_DELAY > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { +# if (DEBOUNCE > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { for (uint8_t i = 0; i < MATRIX_ROWS; i++) { matrix[i] = matrix_debouncing[i]; } @@ -207,7 +207,7 @@ uint8_t matrix_scan(void) bool matrix_is_modified(void) { -#if (DEBOUNCING_DELAY > 0) +#if (DEBOUNCE > 0) if (debouncing) return false; #endif return true; diff --git a/keyboards/niu_mini/config.h b/keyboards/niu_mini/config.h index 9a4b43c1e..2c202a8e4 100644 --- a/keyboards/niu_mini/config.h +++ b/keyboards/niu_mini/config.h @@ -51,7 +51,7 @@ along with this program. If not, see . #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/nk65/config.h b/keyboards/nk65/config.h index 0edb1bb62..791e44468 100755 --- a/keyboards/nk65/config.h +++ b/keyboards/nk65/config.h @@ -39,7 +39,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/novelpad/config.h b/keyboards/novelpad/config.h index 3a47c0eb6..c9b6b91a5 100755 --- a/keyboards/novelpad/config.h +++ b/keyboards/novelpad/config.h @@ -40,7 +40,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/noxary/220/config.h b/keyboards/noxary/220/config.h index e5a6be2de..1242de61b 100644 --- a/keyboards/noxary/220/config.h +++ b/keyboards/noxary/220/config.h @@ -86,7 +86,7 @@ along with this program. If not, see . // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/noxary/260/config.h b/keyboards/noxary/260/config.h index 984712dd1..379dbbf78 100644 --- a/keyboards/noxary/260/config.h +++ b/keyboards/noxary/260/config.h @@ -86,7 +86,7 @@ along with this program. If not, see . // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/noxary/268/config.h b/keyboards/noxary/268/config.h index d6f5234cb..8264b8019 100644 --- a/keyboards/noxary/268/config.h +++ b/keyboards/noxary/268/config.h @@ -47,7 +47,7 @@ along with this program. If not, see . #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/noxary/268_2/config.h b/keyboards/noxary/268_2/config.h index 733c87990..547c729f9 100644 --- a/keyboards/noxary/268_2/config.h +++ b/keyboards/noxary/268_2/config.h @@ -56,7 +56,7 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/noxary/280/config.h b/keyboards/noxary/280/config.h index 427709d1b..d0a10866a 100644 --- a/keyboards/noxary/280/config.h +++ b/keyboards/noxary/280/config.h @@ -86,7 +86,7 @@ along with this program. If not, see . // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/noxary/x268/config.h b/keyboards/noxary/x268/config.h index d2a8c3b9f..0604f6529 100644 --- a/keyboards/noxary/x268/config.h +++ b/keyboards/noxary/x268/config.h @@ -65,7 +65,7 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/ok60/config.h b/keyboards/ok60/config.h index eb75b71c9..cc056a489 100644 --- a/keyboards/ok60/config.h +++ b/keyboards/ok60/config.h @@ -52,7 +52,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/omnikey_blackheart/config.h b/keyboards/omnikey_blackheart/config.h index edfd113de..6c9be77b6 100644 --- a/keyboards/omnikey_blackheart/config.h +++ b/keyboards/omnikey_blackheart/config.h @@ -29,7 +29,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/orange75/config.h b/keyboards/orange75/config.h index 7d1b497be..35399cc60 100644 --- a/keyboards/orange75/config.h +++ b/keyboards/orange75/config.h @@ -26,7 +26,7 @@ /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/org60/config.h b/keyboards/org60/config.h index 5f3f4f5de..f455fea2a 100644 --- a/keyboards/org60/config.h +++ b/keyboards/org60/config.h @@ -55,7 +55,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* RGB Underglow * F6 PIN for Org60 that has pre-soldered WS2812 LEDs diff --git a/keyboards/orthodox/rev1/config.h b/keyboards/orthodox/rev1/config.h index 198fff5ac..89e36dce7 100644 --- a/keyboards/orthodox/rev1/config.h +++ b/keyboards/orthodox/rev1/config.h @@ -57,7 +57,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ // #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/orthodox/rev3/config.h b/keyboards/orthodox/rev3/config.h index 53e5b15ae..ad3437a62 100644 --- a/keyboards/orthodox/rev3/config.h +++ b/keyboards/orthodox/rev3/config.h @@ -62,7 +62,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ // #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/orthodox/rev3_teensy/config.h b/keyboards/orthodox/rev3_teensy/config.h index 54cbb823e..c26e15dee 100644 --- a/keyboards/orthodox/rev3_teensy/config.h +++ b/keyboards/orthodox/rev3_teensy/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ // #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/paladin64/config.h b/keyboards/paladin64/config.h index 0696fefd0..8d7cef248 100755 --- a/keyboards/paladin64/config.h +++ b/keyboards/paladin64/config.h @@ -97,7 +97,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/panc60/config.h b/keyboards/panc60/config.h index edb25ad27..b5889180e 100644 --- a/keyboards/panc60/config.h +++ b/keyboards/panc60/config.h @@ -34,7 +34,7 @@ along with this program. If not, see . #define UNUSED_PINS #define DIODE_DIRECTION COL2ROW -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #define NO_BACKLIGHT_CLOCK #define BACKLIGHT_LEVELS 1 diff --git a/keyboards/pearl/config.h b/keyboards/pearl/config.h index 00850b8f0..3dbe5ee03 100644 --- a/keyboards/pearl/config.h +++ b/keyboards/pearl/config.h @@ -40,7 +40,7 @@ along with this program. If not, see . #define UNUSED_PINS #define DIODE_DIRECTION COL2ROW -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION diff --git a/keyboards/phantom/config.h b/keyboards/phantom/config.h index 3fa462445..4ca731f2d 100644 --- a/keyboards/phantom/config.h +++ b/keyboards/phantom/config.h @@ -61,7 +61,7 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/pinky/3/config.h b/keyboards/pinky/3/config.h index 370d2a702..8a3f53a17 100644 --- a/keyboards/pinky/3/config.h +++ b/keyboards/pinky/3/config.h @@ -81,7 +81,7 @@ // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/pinky/4/config.h b/keyboards/pinky/4/config.h index a6beaf29d..a1544bc48 100644 --- a/keyboards/pinky/4/config.h +++ b/keyboards/pinky/4/config.h @@ -81,7 +81,7 @@ // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/plaid/config.h b/keyboards/plaid/config.h index efef3ca18..9da31d700 100644 --- a/keyboards/plaid/config.h +++ b/keyboards/plaid/config.h @@ -83,7 +83,7 @@ along with this program. If not, see . // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/plain60/config.h b/keyboards/plain60/config.h index 5dd784887..a86c23587 100644 --- a/keyboards/plain60/config.h +++ b/keyboards/plain60/config.h @@ -43,7 +43,7 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #define QMK_ESC_OUTPUT D2 // usually COL #define QMK_ESC_INPUT B4 // usually ROW diff --git a/keyboards/planck/config.h b/keyboards/planck/config.h index 837311c76..e0839a175 100644 --- a/keyboards/planck/config.h +++ b/keyboards/planck/config.h @@ -56,7 +56,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/planck/keymaps/dodger/config.h b/keyboards/planck/keymaps/dodger/config.h index 4b7931e77..f6aaec155 100644 --- a/keyboards/planck/keymaps/dodger/config.h +++ b/keyboards/planck/keymaps/dodger/config.h @@ -56,7 +56,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 15 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/playkbtw/ca66/ca66.c b/keyboards/playkbtw/ca66/ca66.c index 6f24a895f..5f61df64e 100644 --- a/keyboards/playkbtw/ca66/ca66.c +++ b/keyboards/playkbtw/ca66/ca66.c @@ -9,7 +9,7 @@ void bootmagic_lite(void) // We need multiple scans because debouncing can't be turned off. matrix_scan(); - wait_ms(DEBOUNCING_DELAY); + wait_ms(DEBOUNCE); matrix_scan(); // If the Esc (matrix 0,0) is held down on power up, diff --git a/keyboards/playkbtw/ca66/config.h b/keyboards/playkbtw/ca66/config.h index 958fdd0d4..b4c0e6234 100644 --- a/keyboards/playkbtw/ca66/config.h +++ b/keyboards/playkbtw/ca66/config.h @@ -29,7 +29,7 @@ #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/playkbtw/pk60/config.h b/keyboards/playkbtw/pk60/config.h index 77822e0a1..93e29951e 100644 --- a/keyboards/playkbtw/pk60/config.h +++ b/keyboards/playkbtw/pk60/config.h @@ -30,7 +30,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/preonic/config.h b/keyboards/preonic/config.h index 1887bff5d..7ed4814fa 100644 --- a/keyboards/preonic/config.h +++ b/keyboards/preonic/config.h @@ -56,7 +56,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/preonic/keymaps/kinesis/config.h b/keyboards/preonic/keymaps/kinesis/config.h index 7899408cd..fd934726b 100644 --- a/keyboards/preonic/keymaps/kinesis/config.h +++ b/keyboards/preonic/keymaps/kinesis/config.h @@ -49,7 +49,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/preonic/keymaps/zach/config.h b/keyboards/preonic/keymaps/zach/config.h index 58690a4ab..66e6b087f 100644 --- a/keyboards/preonic/keymaps/zach/config.h +++ b/keyboards/preonic/keymaps/zach/config.h @@ -50,7 +50,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 5 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/primekb/prime_e/config.h b/keyboards/primekb/prime_e/config.h index 331993f4b..9ef4edd88 100644 --- a/keyboards/primekb/prime_e/config.h +++ b/keyboards/primekb/prime_e/config.h @@ -44,7 +44,7 @@ along with this program. If not, see . /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/primekb/prime_l/config.h b/keyboards/primekb/prime_l/config.h index 8451a7686..786ceb59c 100644 --- a/keyboards/primekb/prime_l/config.h +++ b/keyboards/primekb/prime_l/config.h @@ -44,7 +44,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 4 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/primekb/prime_m/config.h b/keyboards/primekb/prime_m/config.h index 119e20a40..75731abf7 100644 --- a/keyboards/primekb/prime_m/config.h +++ b/keyboards/primekb/prime_m/config.h @@ -44,7 +44,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 4 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/primekb/prime_o/config.h b/keyboards/primekb/prime_o/config.h index 2a35785ea..36de49b9e 100644 --- a/keyboards/primekb/prime_o/config.h +++ b/keyboards/primekb/prime_o/config.h @@ -44,7 +44,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 4 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/primekb/prime_r/config.h b/keyboards/primekb/prime_r/config.h index 345bf91b8..942eced32 100644 --- a/keyboards/primekb/prime_r/config.h +++ b/keyboards/primekb/prime_r/config.h @@ -47,7 +47,7 @@ along with this program. If not, see . #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/puck/config.h b/keyboards/puck/config.h index b2cb1b23e..3eaa8cd26 100644 --- a/keyboards/puck/config.h +++ b/keyboards/puck/config.h @@ -22,7 +22,7 @@ #define DIODE_DIRECTION ROW2COL /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* number of backlight levels */ #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/quantrik/kyuu/config.h b/keyboards/quantrik/kyuu/config.h index 655314985..b40ce64cc 100644 --- a/keyboards/quantrik/kyuu/config.h +++ b/keyboards/quantrik/kyuu/config.h @@ -80,7 +80,7 @@ along with this program. If not, see . // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/qwertyydox/config.h b/keyboards/qwertyydox/config.h index 4c651d3c6..67f5d3c16 100644 --- a/keyboards/qwertyydox/config.h +++ b/keyboards/qwertyydox/config.h @@ -47,7 +47,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/qwertyydox/rev1/config.h b/keyboards/qwertyydox/rev1/config.h index 5823beb3d..703d62de7 100644 --- a/keyboards/qwertyydox/rev1/config.h +++ b/keyboards/qwertyydox/rev1/config.h @@ -47,7 +47,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/rama/koyu/config.h b/keyboards/rama/koyu/config.h index e7817e79a..4fa8c3d8a 100644 --- a/keyboards/rama/koyu/config.h +++ b/keyboards/rama/koyu/config.h @@ -44,7 +44,7 @@ #define DIODE_DIRECTION COL2ROW // Set 0 if debouncing isn't needed -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/rama/m10_b/config.h b/keyboards/rama/m10_b/config.h index 25fd58d15..32d1d21ed 100644 --- a/keyboards/rama/m10_b/config.h +++ b/keyboards/rama/m10_b/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/rama/m60_a/config.h b/keyboards/rama/m60_a/config.h index 1cbdee5ae..b3e916231 100644 --- a/keyboards/rama/m60_a/config.h +++ b/keyboards/rama/m60_a/config.h @@ -42,7 +42,7 @@ #define DIODE_DIRECTION COL2ROW // Set 0 if debouncing isn't needed -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/rama/m6_a/config.h b/keyboards/rama/m6_a/config.h index efaf74a93..341e29b95 100644 --- a/keyboards/rama/m6_a/config.h +++ b/keyboards/rama/m6_a/config.h @@ -51,7 +51,7 @@ // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/rama/m6_b/config.h b/keyboards/rama/m6_b/config.h index 0d690bffa..015bc6df8 100644 --- a/keyboards/rama/m6_b/config.h +++ b/keyboards/rama/m6_b/config.h @@ -51,7 +51,7 @@ // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/rama/u80_a/config.h b/keyboards/rama/u80_a/config.h index 953bf63f2..44d9e2133 100644 --- a/keyboards/rama/u80_a/config.h +++ b/keyboards/rama/u80_a/config.h @@ -52,7 +52,7 @@ // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/redox/rev1/config.h b/keyboards/redox/rev1/config.h index ce205e02e..72ca94b79 100644 --- a/keyboards/redox/rev1/config.h +++ b/keyboards/redox/rev1/config.h @@ -47,7 +47,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/rgbkb/sol/config.h b/keyboards/rgbkb/sol/config.h index a7317d9d9..1afd973e9 100644 --- a/keyboards/rgbkb/sol/config.h +++ b/keyboards/rgbkb/sol/config.h @@ -41,7 +41,7 @@ along with this program. If not, see . #define ENCODERS_PAD_B { D6 } /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* ws2812 RGB LED */ #define RGB_DI_PIN B3 diff --git a/keyboards/rgbkb/zen/rev1/config.h b/keyboards/rgbkb/zen/rev1/config.h index 88f39af48..4d81855a8 100644 --- a/keyboards/rgbkb/zen/rev1/config.h +++ b/keyboards/rgbkb/zen/rev1/config.h @@ -43,7 +43,7 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/rgbkb/zen/rev2/config.h b/keyboards/rgbkb/zen/rev2/config.h index c56956108..b9f3d2228 100644 --- a/keyboards/rgbkb/zen/rev2/config.h +++ b/keyboards/rgbkb/zen/rev2/config.h @@ -56,7 +56,7 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/rgbkb/zygomorph/rev1/config.h b/keyboards/rgbkb/zygomorph/rev1/config.h index 107e58c12..ad58761cc 100644 --- a/keyboards/rgbkb/zygomorph/rev1/config.h +++ b/keyboards/rgbkb/zygomorph/rev1/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define ENCODERS_PAD_B { D7 } /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* ws2812 RGB LED */ #define RGB_DI_PIN B7 diff --git a/keyboards/romac/config.h b/keyboards/romac/config.h index b92785fd5..da236c500 100644 --- a/keyboards/romac/config.h +++ b/keyboards/romac/config.h @@ -26,7 +26,7 @@ #define BACKLIGHT_LEVELS 0 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/s7_elephant/config.h b/keyboards/s7_elephant/config.h index 6335fbc9c..c4f57178d 100644 --- a/keyboards/s7_elephant/config.h +++ b/keyboards/s7_elephant/config.h @@ -23,7 +23,7 @@ #define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/satan/config.h b/keyboards/satan/config.h index c15e5c37c..d8c9ae9ab 100644 --- a/keyboards/satan/config.h +++ b/keyboards/satan/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/satan/keymaps/admiralStrokers/config.h b/keyboards/satan/keymaps/admiralStrokers/config.h index 17e0ea3b7..c8d40730f 100644 --- a/keyboards/satan/keymaps/admiralStrokers/config.h +++ b/keyboards/satan/keymaps/admiralStrokers/config.h @@ -48,7 +48,7 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/satan/keymaps/fakb/config.h b/keyboards/satan/keymaps/fakb/config.h index 81598f22e..dc182753d 100644 --- a/keyboards/satan/keymaps/fakb/config.h +++ b/keyboards/satan/keymaps/fakb/config.h @@ -30,7 +30,7 @@ //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/scarletbandana/config.h b/keyboards/scarletbandana/config.h index 01cf95065..4e37b4b42 100644 --- a/keyboards/scarletbandana/config.h +++ b/keyboards/scarletbandana/config.h @@ -55,4 +55,4 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 diff --git a/keyboards/scythe/config.h b/keyboards/scythe/config.h index 76d332364..66d47c356 100644 --- a/keyboards/scythe/config.h +++ b/keyboards/scythe/config.h @@ -64,7 +64,7 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST @@ -237,4 +237,3 @@ along with this program. If not, see . //#define I2C_MASTER_RIGHT #define TAPPING_TERM 120 - diff --git a/keyboards/sentraq/number_pad/config.h b/keyboards/sentraq/number_pad/config.h index f02e537b6..a5df625aa 100644 --- a/keyboards/sentraq/number_pad/config.h +++ b/keyboards/sentraq/number_pad/config.h @@ -75,4 +75,4 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 diff --git a/keyboards/sentraq/s60_x/default/config.h b/keyboards/sentraq/s60_x/default/config.h index d7fb79625..dc4114143 100644 --- a/keyboards/sentraq/s60_x/default/config.h +++ b/keyboards/sentraq/s60_x/default/config.h @@ -36,7 +36,7 @@ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #define LOCKING_SUPPORT_ENABLE #define LOCKING_RESYNC_ENABLE @@ -44,4 +44,3 @@ #define NO_ACTION_ONESHOT #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION - diff --git a/keyboards/sentraq/s60_x/keymaps/bluebear/config.h b/keyboards/sentraq/s60_x/keymaps/bluebear/config.h index c1db5f64a..0a6ce8178 100644 --- a/keyboards/sentraq/s60_x/keymaps/bluebear/config.h +++ b/keyboards/sentraq/s60_x/keymaps/bluebear/config.h @@ -31,7 +31,7 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/sentraq/s60_x/rgb/config.h b/keyboards/sentraq/s60_x/rgb/config.h index 0e231a722..57e736a05 100644 --- a/keyboards/sentraq/s60_x/rgb/config.h +++ b/keyboards/sentraq/s60_x/rgb/config.h @@ -36,7 +36,7 @@ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #define RGB_DI_PIN F6 #ifdef RGB_DI_PIN @@ -46,4 +46,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - diff --git a/keyboards/sentraq/s65_plus/config.h b/keyboards/sentraq/s65_plus/config.h index c45fd2412..51aacfc19 100644 --- a/keyboards/sentraq/s65_plus/config.h +++ b/keyboards/sentraq/s65_plus/config.h @@ -36,7 +36,7 @@ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/sentraq/s65_x/config.h b/keyboards/sentraq/s65_x/config.h index 486765273..9c337bde4 100644 --- a/keyboards/sentraq/s65_x/config.h +++ b/keyboards/sentraq/s65_x/config.h @@ -38,7 +38,7 @@ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/signum/3_0/elitec/config.h b/keyboards/signum/3_0/elitec/config.h index 3df07d17f..88e45ef45 100644 --- a/keyboards/signum/3_0/elitec/config.h +++ b/keyboards/signum/3_0/elitec/config.h @@ -20,7 +20,7 @@ #define UNUSED_PINS /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/singa/config.h b/keyboards/singa/config.h index aca1153d7..29110bd4e 100644 --- a/keyboards/singa/config.h +++ b/keyboards/singa/config.h @@ -34,7 +34,7 @@ along with this program. If not, see . #define UNUSED_PINS #define DIODE_DIRECTION COL2ROW -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #define NO_BACKLIGHT_CLOCK #define BACKLIGHT_LEVELS 1 diff --git a/keyboards/sixkeyboard/config.h b/keyboards/sixkeyboard/config.h index 3a672788b..a825467af 100644 --- a/keyboards/sixkeyboard/config.h +++ b/keyboards/sixkeyboard/config.h @@ -39,7 +39,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 0 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/snagpad/config.h b/keyboards/snagpad/config.h index d0c55cf97..9503ae25f 100644 --- a/keyboards/snagpad/config.h +++ b/keyboards/snagpad/config.h @@ -29,7 +29,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/southpole/config.h b/keyboards/southpole/config.h index 5992a360f..396384040 100644 --- a/keyboards/southpole/config.h +++ b/keyboards/southpole/config.h @@ -29,7 +29,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/speedo/config.h b/keyboards/speedo/config.h index ac9d5e4f1..04195b866 100644 --- a/keyboards/speedo/config.h +++ b/keyboards/speedo/config.h @@ -55,7 +55,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/standaside/config.h b/keyboards/standaside/config.h index fa3576ca5..80c9f8d21 100644 --- a/keyboards/standaside/config.h +++ b/keyboards/standaside/config.h @@ -40,7 +40,7 @@ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST @@ -201,4 +201,3 @@ #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/staryu/config.h b/keyboards/staryu/config.h index 05131b68b..dc7353fcc 100755 --- a/keyboards/staryu/config.h +++ b/keyboards/staryu/config.h @@ -68,7 +68,7 @@ along with this program. If not, see . #define BACKLIGHT_ON_STATE 1 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Bootmagic Lite key configuration */ #define BOOTMAGIC_LITE_ROW 0 diff --git a/keyboards/subatomic/config.h b/keyboards/subatomic/config.h index d4ace70d8..f509ca53e 100644 --- a/keyboards/subatomic/config.h +++ b/keyboards/subatomic/config.h @@ -52,7 +52,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/sx60/config.h b/keyboards/sx60/config.h index cad8b0ba4..d75e19b29 100755 --- a/keyboards/sx60/config.h +++ b/keyboards/sx60/config.h @@ -31,7 +31,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/sx60/matrix.c b/keyboards/sx60/matrix.c index 634a98a12..e8e9d6574 100644 --- a/keyboards/sx60/matrix.c +++ b/keyboards/sx60/matrix.c @@ -30,11 +30,11 @@ along with this program. If not, see . /* Set 0 if debouncing isn't needed */ -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 +#ifndef DEBOUNCE +# define DEBOUNCE 5 #endif -#if (DEBOUNCING_DELAY > 0) +#if (DEBOUNCE > 0) static uint16_t debouncing_time; static bool debouncing = false; #endif @@ -154,7 +154,7 @@ uint8_t matrix_scan(void) /* Set row, read cols */ for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row); if (matrix_changed) { @@ -166,8 +166,8 @@ uint8_t matrix_scan(void) # endif } -# if (DEBOUNCING_DELAY > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { +# if (DEBOUNCE > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { for (uint8_t i = 0; i < MATRIX_ROWS; i++) { matrix[i] = matrix_debouncing[i]; } @@ -181,7 +181,7 @@ uint8_t matrix_scan(void) bool matrix_is_modified(void) { -#if (DEBOUNCING_DELAY > 0) +#if (DEBOUNCE > 0) if (debouncing) return false; #endif return true; diff --git a/keyboards/tada68/config.h b/keyboards/tada68/config.h index ab564cd3b..a8fa37a5b 100755 --- a/keyboards/tada68/config.h +++ b/keyboards/tada68/config.h @@ -47,7 +47,7 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/tetris/config.h b/keyboards/tetris/config.h index 2cc7d2951..7fe0c2d64 100755 --- a/keyboards/tetris/config.h +++ b/keyboards/tetris/config.h @@ -23,7 +23,7 @@ #define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE @@ -52,4 +52,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 12 - diff --git a/keyboards/the_ruler/config.h b/keyboards/the_ruler/config.h index c340019be..ecae3a4f2 100644 --- a/keyboards/the_ruler/config.h +++ b/keyboards/the_ruler/config.h @@ -50,7 +50,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/thevankeyboards/bananasplit/config.h b/keyboards/thevankeyboards/bananasplit/config.h index a96c59dbb..7c0b5b201 100644 --- a/keyboards/thevankeyboards/bananasplit/config.h +++ b/keyboards/thevankeyboards/bananasplit/config.h @@ -48,7 +48,7 @@ along with this program. If not, see . #define BACKLIGHT_PIN B7 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #define TAPPING_TERM 175 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ diff --git a/keyboards/thevankeyboards/minivan/config.h b/keyboards/thevankeyboards/minivan/config.h index 38207d38d..22fb37762 100644 --- a/keyboards/thevankeyboards/minivan/config.h +++ b/keyboards/thevankeyboards/minivan/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/thevankeyboards/minivan/keymaps/budi/config.h b/keyboards/thevankeyboards/minivan/keymaps/budi/config.h index 67bcf3546..dc36b7380 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/budi/config.h +++ b/keyboards/thevankeyboards/minivan/keymaps/budi/config.h @@ -4,10 +4,10 @@ #include "../../config.h" // place overrides here -#ifdef DEBOUNCING_DELAY -#undef DEBOUNCING_DELAY +#ifdef DEBOUNCE +#undef DEBOUNCE #endif -#define DEBOUNCING_DELAY 2 +#define DEBOUNCE 2 #define MOUSEKEY_INTERVAL 10 #define MOUSEKEY_DELAY 0 #define MOUSEKEY_TIME_TO_MAX 120 diff --git a/keyboards/thevankeyboards/roadkit/config.h b/keyboards/thevankeyboards/roadkit/config.h index 3f7178039..71bd6ba6b 100644 --- a/keyboards/thevankeyboards/roadkit/config.h +++ b/keyboards/thevankeyboards/roadkit/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/tkc1800/config.h b/keyboards/tkc1800/config.h index 2f45d04de..a45fb677e 100644 --- a/keyboards/tkc1800/config.h +++ b/keyboards/tkc1800/config.h @@ -60,7 +60,7 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/tmo50/config.h b/keyboards/tmo50/config.h index 3af322e9b..ee7f0e34a 100644 --- a/keyboards/tmo50/config.h +++ b/keyboards/tmo50/config.h @@ -76,7 +76,7 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/toad/config.h b/keyboards/toad/config.h index f750b52bf..5f3eb43c2 100644 --- a/keyboards/toad/config.h +++ b/keyboards/toad/config.h @@ -30,7 +30,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/tokyo60/config.h b/keyboards/tokyo60/config.h index fddb37d28..2c1326c0a 100644 --- a/keyboards/tokyo60/config.h +++ b/keyboards/tokyo60/config.h @@ -26,7 +26,7 @@ #define DIODE_DIRECTION ROW2COL /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Set power consumption to work with mobile devices */ #define USB_MAX_POWER_CONSUMPTION 100 diff --git a/keyboards/touchpad/config.h b/keyboards/touchpad/config.h index 8e93c9427..b953b4f49 100644 --- a/keyboards/touchpad/config.h +++ b/keyboards/touchpad/config.h @@ -39,7 +39,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/treadstone32/config.h b/keyboards/treadstone32/config.h index 6151d6e82..a7f991453 100644 --- a/keyboards/treadstone32/config.h +++ b/keyboards/treadstone32/config.h @@ -49,7 +49,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/treadstone48/rev1/config.h b/keyboards/treadstone48/rev1/config.h index d8ecf170d..09fb62154 100644 --- a/keyboards/treadstone48/rev1/config.h +++ b/keyboards/treadstone48/rev1/config.h @@ -63,7 +63,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/treasure/type9/config.h b/keyboards/treasure/type9/config.h index 6115880d0..220b7f780 100644 --- a/keyboards/treasure/type9/config.h +++ b/keyboards/treasure/type9/config.h @@ -62,7 +62,7 @@ along with this program. If not, see . // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/uk78/config.h b/keyboards/uk78/config.h index eff8d1d62..879360773 100644 --- a/keyboards/uk78/config.h +++ b/keyboards/uk78/config.h @@ -47,7 +47,7 @@ along with this program. If not, see . #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/ut472/config.h b/keyboards/ut472/config.h index 8f0d76271..c71995ec7 100644 --- a/keyboards/ut472/config.h +++ b/keyboards/ut472/config.h @@ -40,7 +40,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/v60_type_r/config.h b/keyboards/v60_type_r/config.h index e3e00a9f8..51ca6def9 100644 --- a/keyboards/v60_type_r/config.h +++ b/keyboards/v60_type_r/config.h @@ -63,7 +63,7 @@ along with this program. If not, see . #define RGB_STEP 16 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/vision_division/config.h b/keyboards/vision_division/config.h index c80a011e2..249431b87 100644 --- a/keyboards/vision_division/config.h +++ b/keyboards/vision_division/config.h @@ -30,7 +30,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 0 +#define DEBOUNCE 0 #define MATRIX_MASKED diff --git a/keyboards/vitamins_included/matrix.c b/keyboards/vitamins_included/matrix.c index cf4c1064f..1f5071c69 100644 --- a/keyboards/vitamins_included/matrix.c +++ b/keyboards/vitamins_included/matrix.c @@ -45,11 +45,11 @@ along with this program. If not, see . # include "serial.h" #endif -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 +#ifndef DEBOUNCE +# define DEBOUNCE 5 #endif -#if (DEBOUNCING_DELAY > 0) +#if (DEBOUNCE > 0) static uint16_t debouncing_time; static bool debouncing = false; #endif @@ -192,7 +192,7 @@ uint8_t _matrix_scan(void) #if (DIODE_DIRECTION == COL2ROW) // Set row, read cols for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); if (matrix_changed) { @@ -209,7 +209,7 @@ uint8_t _matrix_scan(void) #elif (DIODE_DIRECTION == ROW2COL) // Set col, read rows for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { -# if (DEBOUNCING_DELAY > 0) +# if (DEBOUNCE > 0) bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); if (matrix_changed) { debouncing = true; @@ -222,8 +222,8 @@ uint8_t _matrix_scan(void) } #endif -# if (DEBOUNCING_DELAY > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { +# if (DEBOUNCE > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { matrix[i+offset] = matrix_debouncing[i+offset]; } diff --git a/keyboards/vitamins_included/rev1/config.h b/keyboards/vitamins_included/rev1/config.h index 7112c7891..f4e5666fe 100644 --- a/keyboards/vitamins_included/rev1/config.h +++ b/keyboards/vitamins_included/rev1/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/waldo/config.h b/keyboards/waldo/config.h index c460e7c27..c913ae771 100644 --- a/keyboards/waldo/config.h +++ b/keyboards/waldo/config.h @@ -47,7 +47,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/wasdat/config.h b/keyboards/wasdat/config.h index 73dcdc536..b5c4d3bc2 100644 --- a/keyboards/wasdat/config.h +++ b/keyboards/wasdat/config.h @@ -91,7 +91,7 @@ along with this program. If not, see . // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/westfoxtrot/aanzee/config.h b/keyboards/westfoxtrot/aanzee/config.h index 3959066b2..d88101fdc 100644 --- a/keyboards/westfoxtrot/aanzee/config.h +++ b/keyboards/westfoxtrot/aanzee/config.h @@ -68,7 +68,7 @@ along with this program. If not, see . #define RGBW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/westfoxtrot/cyclops/config.h b/keyboards/westfoxtrot/cyclops/config.h index b9a8fb28b..3af607031 100644 --- a/keyboards/westfoxtrot/cyclops/config.h +++ b/keyboards/westfoxtrot/cyclops/config.h @@ -49,7 +49,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST @@ -204,4 +204,4 @@ along with this program. If not, see . /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 -// #define BOOTMAGIC_LITE_COLUMN 0 \ No newline at end of file +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/westfoxtrot/cypher/config.h b/keyboards/westfoxtrot/cypher/config.h index 48ff816f9..137883703 100644 --- a/keyboards/westfoxtrot/cypher/config.h +++ b/keyboards/westfoxtrot/cypher/config.h @@ -53,7 +53,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 5 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/wilba_tech/wt60_a/config.h b/keyboards/wilba_tech/wt60_a/config.h index f492074e3..3a2adb3c4 100644 --- a/keyboards/wilba_tech/wt60_a/config.h +++ b/keyboards/wilba_tech/wt60_a/config.h @@ -46,7 +46,7 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL - + // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/wilba_tech/wt65_a/config.h b/keyboards/wilba_tech/wt65_a/config.h index ec488fb50..cb0df1460 100644 --- a/keyboards/wilba_tech/wt65_a/config.h +++ b/keyboards/wilba_tech/wt65_a/config.h @@ -46,7 +46,7 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL - + // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/wilba_tech/wt69_a/config.h b/keyboards/wilba_tech/wt69_a/config.h index 653e90d47..0ed40b27e 100644 --- a/keyboards/wilba_tech/wt69_a/config.h +++ b/keyboards/wilba_tech/wt69_a/config.h @@ -46,7 +46,7 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL - + // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/wilba_tech/wt75_a/config.h b/keyboards/wilba_tech/wt75_a/config.h index 8d7025a60..d1ae33156 100644 --- a/keyboards/wilba_tech/wt75_a/config.h +++ b/keyboards/wilba_tech/wt75_a/config.h @@ -46,7 +46,7 @@ /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL - + // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/wilba_tech/wt80_a/config.h b/keyboards/wilba_tech/wt80_a/config.h index 5a825c3f7..7d974193c 100644 --- a/keyboards/wilba_tech/wt80_a/config.h +++ b/keyboards/wilba_tech/wt80_a/config.h @@ -46,7 +46,7 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL - + // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/wilba_tech/wt8_a/config.h b/keyboards/wilba_tech/wt8_a/config.h index 43f692e0f..6604b7ce8 100644 --- a/keyboards/wilba_tech/wt8_a/config.h +++ b/keyboards/wilba_tech/wt8_a/config.h @@ -46,7 +46,7 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW - + // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/xd60/rev2/config.h b/keyboards/xd60/rev2/config.h index 6c447b89f..5f23f6eac 100644 --- a/keyboards/xd60/rev2/config.h +++ b/keyboards/xd60/rev2/config.h @@ -54,7 +54,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* RGB Underglow * F6 PIN for XD60v2 that has pre-soldered WS2812 LEDs diff --git a/keyboards/xd60/rev3/config.h b/keyboards/xd60/rev3/config.h index d88330cf7..861755e45 100644 --- a/keyboards/xd60/rev3/config.h +++ b/keyboards/xd60/rev3/config.h @@ -53,7 +53,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* RGB Underglow * F6 PIN for XD60v3 that has pre-soldered LEDs diff --git a/keyboards/xd75/config.h b/keyboards/xd75/config.h index bc1f1860f..7f8b71c45 100644 --- a/keyboards/xd75/config.h +++ b/keyboards/xd75/config.h @@ -48,12 +48,12 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW - + #define BACKLIGHT_PIN F5 #define BACKLIGHT_LEVELS 6 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/xd84/config.h b/keyboards/xd84/config.h index abb9f17a5..138c2c4c8 100644 --- a/keyboards/xd84/config.h +++ b/keyboards/xd84/config.h @@ -75,7 +75,7 @@ // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/xd87/config.h b/keyboards/xd87/config.h index 4fb52be6e..dae9d3db8 100644 --- a/keyboards/xd87/config.h +++ b/keyboards/xd87/config.h @@ -64,7 +64,7 @@ along with this program. If not, see . // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/xd96/config.h b/keyboards/xd96/config.h index df21205f8..ea6c878e9 100644 --- a/keyboards/xd96/config.h +++ b/keyboards/xd96/config.h @@ -76,7 +76,7 @@ // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/xmmx/config.h b/keyboards/xmmx/config.h index c08829ce3..bee047bf0 100644 --- a/keyboards/xmmx/config.h +++ b/keyboards/xmmx/config.h @@ -30,7 +30,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/yd60mq/config.h b/keyboards/yd60mq/config.h index 2a899fa3e..75e697802 100644 --- a/keyboards/yd60mq/config.h +++ b/keyboards/yd60mq/config.h @@ -29,7 +29,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE @@ -44,4 +44,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - diff --git a/keyboards/yd68/config.h b/keyboards/yd68/config.h index 4caedb0b5..17461c5dc 100644 --- a/keyboards/yd68/config.h +++ b/keyboards/yd68/config.h @@ -62,7 +62,7 @@ along with this program. If not, see . #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/yosino58/rev1/config.h b/keyboards/yosino58/rev1/config.h index 8a0cf151b..0214bc102 100644 --- a/keyboards/yosino58/rev1/config.h +++ b/keyboards/yosino58/rev1/config.h @@ -20,7 +20,7 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0x0F6A -#define PRODUCT_ID 0x01B8 +#define PRODUCT_ID 0x01B8 #define DEVICE_VER 0x0001 #define MANUFACTURER sakuranbo0046 #define PRODUCT yosino58 @@ -42,7 +42,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/z150_blackheart/config.h b/keyboards/z150_blackheart/config.h index c8a38b038..fc33021ff 100644 --- a/keyboards/z150_blackheart/config.h +++ b/keyboards/z150_blackheart/config.h @@ -23,7 +23,7 @@ #define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/zeal60/config.h b/keyboards/zeal60/config.h index a5e41116d..7c5340e73 100644 --- a/keyboards/zeal60/config.h +++ b/keyboards/zeal60/config.h @@ -42,7 +42,7 @@ #define DIODE_DIRECTION COL2ROW // Set 0 if debouncing isn't needed -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/zeal60/zeal60.c b/keyboards/zeal60/zeal60.c index 5f93c571a..93f442f55 100644 --- a/keyboards/zeal60/zeal60.c +++ b/keyboards/zeal60/zeal60.c @@ -234,8 +234,8 @@ void bootmagic_lite(void) // We need multiple scans because debouncing can't be turned off. matrix_scan(); - wait_ms(DEBOUNCING_DELAY); - wait_ms(DEBOUNCING_DELAY); + wait_ms(DEBOUNCE); + wait_ms(DEBOUNCE); matrix_scan(); // If the Esc (matrix 0,0) is held down on power up, @@ -374,4 +374,3 @@ void suspend_wakeup_init_kb(void) backlight_set_suspend_state(false); #endif // RGB_BACKLIGHT_ENABLED } - diff --git a/keyboards/zeal65/config.h b/keyboards/zeal65/config.h index 224fce1f6..7217c6ed1 100644 --- a/keyboards/zeal65/config.h +++ b/keyboards/zeal65/config.h @@ -42,7 +42,7 @@ #define DIODE_DIRECTION COL2ROW // Set 0 if debouncing isn't needed -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/zinc/rev1/config.h b/keyboards/zinc/rev1/config.h index 370b5c203..c8560233d 100644 --- a/keyboards/zinc/rev1/config.h +++ b/keyboards/zinc/rev1/config.h @@ -27,7 +27,7 @@ along with this program. If not, see . #define DEVICE_VER 0x0001 #define MANUFACTURER monksoffunk #define PRODUCT zinc rev.1 -#define DESCRIPTION A split keyboard +#define DESCRIPTION A split keyboard #define PREVENT_STUCK_MODIFIERS #define TAPPING_FORCE_HOLD @@ -59,7 +59,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/zinc/reva/config.h b/keyboards/zinc/reva/config.h index f4277f713..6ae12d54c 100644 --- a/keyboards/zinc/reva/config.h +++ b/keyboards/zinc/reva/config.h @@ -24,7 +24,7 @@ along with this program. If not, see . #define DEVICE_VER 0x0001 #define MANUFACTURER monksoffunk #define PRODUCT zinc rev.A -#define DESCRIPTION A split keyboard +#define DESCRIPTION A split keyboard #define PREVENT_STUCK_MODIFIERS #define TAPPING_FORCE_HOLD @@ -56,7 +56,7 @@ along with this program. If not, see . // #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/zlant/config.h b/keyboards/zlant/config.h index 8732a6d37..a6b5227d6 100755 --- a/keyboards/zlant/config.h +++ b/keyboards/zlant/config.h @@ -30,7 +30,7 @@ #endif /* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE From 06975aa0dd47b7fa1756735f159750af1381ff4e Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Thu, 6 Jun 2019 12:23:46 -0700 Subject: [PATCH 190/341] Remove all Copyrighted Sounds and Songs (#5905) * Remove all Copyrighted Sounds and Songs This removes any song that has a license/copyright on them. Additionally, it adds the license information for any song that remains. * Add removed song list Can be reverted if we'd rather do that * Use newer coding conventions * Fix typo Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Revert copyright date * Update quantum/audio/song_list.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- quantum/audio/song_list.h | 589 +++++--------------------------------- 1 file changed, 73 insertions(+), 516 deletions(-) diff --git a/quantum/audio/song_list.h b/quantum/audio/song_list.h index 9ca8231e4..173cd194a 100644 --- a/quantum/audio/song_list.h +++ b/quantum/audio/song_list.h @@ -1,4 +1,7 @@ -/* Copyright 2016 Jack Humbert +/* Any song or sound without a license explicitly stated is: + * + * Copyright 2016 Jack Humbert + * Copyright 2017 Zach White * * 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 @@ -13,10 +16,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "musical_notes.h" +#pragma once -#ifndef SONG_LIST_H -#define SONG_LIST_H +#include "musical_notes.h" #define NO_SOUND @@ -25,44 +27,26 @@ WD_NOTE(_A5), WD_NOTE(_GS5), WD_NOTE(_REST), H__NOTE(_CS5), H__NOTE(_E5), \ H__NOTE(_CS5), WD_NOTE(_A5), WD_NOTE(_GS5), WD_NOTE(_E5), - +/* Ode to Joy + * Author: Friedrich Schiller + + License: Public Domain + */ #define ODE_TO_JOY \ Q__NOTE(_E4), Q__NOTE(_E4), Q__NOTE(_F4), Q__NOTE(_G4), \ Q__NOTE(_G4), Q__NOTE(_F4), Q__NOTE(_E4), Q__NOTE(_D4), \ Q__NOTE(_C4), Q__NOTE(_C4), Q__NOTE(_D4), Q__NOTE(_E4), \ QD_NOTE(_E4), E__NOTE(_D4), H__NOTE(_D4), +/* Rock-a-bye Baby + * Author: Unknown + + License: Public Domain + */ #define ROCK_A_BYE_BABY \ QD_NOTE(_B4), E__NOTE(_D4), Q__NOTE(_B5), \ H__NOTE(_A5), Q__NOTE(_G5), \ QD_NOTE(_B4), E__NOTE(_D5), Q__NOTE(_G5), \ H__NOTE(_FS5), -#define CLOSE_ENCOUNTERS_5_NOTE \ - Q__NOTE(_D5), \ - Q__NOTE(_E5), \ - Q__NOTE(_C5), \ - Q__NOTE(_C4), \ - Q__NOTE(_G4), - -#define DOE_A_DEER \ - QD_NOTE(_C4), E__NOTE(_D4), \ - QD_NOTE(_E4), E__NOTE(_C4), \ - Q__NOTE(_E4), Q__NOTE(_C4), \ - Q__NOTE(_E4), - -#define IN_LIKE_FLINT \ - E__NOTE(_AS4), E__NOTE(_AS4), QD_NOTE(_B4), \ - E__NOTE(_AS4), E__NOTE(_B4), QD_NOTE(_CS4), \ - E__NOTE(_B4), E__NOTE(_CS4), QD_NOTE(_DS4), \ - E__NOTE(_CS4), E__NOTE(_B4), QD_NOTE(_AS4), \ - E__NOTE(_AS4), E__NOTE(_AS4), QD_NOTE(_B4), - -#define IMPERIAL_MARCH \ - HD_NOTE(_A4), HD_NOTE(_A4), HD_NOTE(_A4), QD_NOTE(_F4), QD_NOTE(_C5), \ - HD_NOTE(_A4), QD_NOTE(_F4), QD_NOTE(_C5), WD_NOTE(_A4), \ - HD_NOTE(_E5), HD_NOTE(_E5), HD_NOTE(_E5), QD_NOTE(_F5), QD_NOTE(_C5), \ - HD_NOTE(_A4), QD_NOTE(_F4), QD_NOTE(_C5), WD_NOTE(_A4) #define CLUEBOARD_SOUND \ HD_NOTE(_C3), HD_NOTE(_D3), HD_NOTE(_E3), HD_NOTE(_F3), HD_NOTE(_G3), HD_NOTE(_A4), HD_NOTE(_B4), HD_NOTE(_C4) @@ -77,11 +61,6 @@ Q__NOTE(_F3) */ -#define BASKET_CASE \ - QD_NOTE(_G3), E__NOTE(_F3), E__NOTE(_E3), Q__NOTE(_F3), M__NOTE(_G3, 8+32), Q__NOTE(_REST), \ - Q__NOTE(_B4), Q__NOTE(_C4), Q__NOTE(_B4), E__NOTE(_A4), Q__NOTE(_G3), M__NOTE(_G3, 8+32), Q__NOTE(_REST), \ - Q__NOTE(_B4), Q__NOTE(_C4), Q__NOTE(_B4), E__NOTE(_A4), Q__NOTE(_G3), Q__NOTE(_G3), Q__NOTE(_G3), Q__NOTE(_G3), E__NOTE(_A4), E__NOTE(_C4), QD_NOTE(_B4), HD_NOTE(_B4) - #define STARTUP_SOUND \ E__NOTE(_E6), \ E__NOTE(_A6), \ @@ -256,299 +235,15 @@ E__NOTE(_E6), \ S__NOTE(_B5), -#define COIN_SOUND \ - E__NOTE(_A5 ), \ - HD_NOTE(_E6 ), - -#define ONE_UP_SOUND \ - Q__NOTE(_E6 ), \ - Q__NOTE(_G6 ), \ - Q__NOTE(_E7 ), \ - Q__NOTE(_C7 ), \ - Q__NOTE(_D7 ), \ - Q__NOTE(_G7 ), - -#define SONIC_RING \ - E__NOTE(_E6), \ - E__NOTE(_G6), \ - HD_NOTE(_C7), - -#define ZELDA_PUZZLE \ - Q__NOTE(_G5), \ - Q__NOTE(_FS5), \ - Q__NOTE(_DS5), \ - Q__NOTE(_A4), \ - Q__NOTE(_GS4), \ - Q__NOTE(_E5), \ - Q__NOTE(_GS5), \ - HD_NOTE(_C6), - -#define ZELDA_TREASURE \ - Q__NOTE(_A4 ), \ - Q__NOTE(_AS4), \ - Q__NOTE(_B4 ), \ - HD_NOTE(_C5 ), \ #define TERMINAL_SOUND \ E__NOTE(_C5 ) -#define OVERWATCH_THEME \ - HD_NOTE(_A4 ), \ - Q__NOTE(_E4 ), \ - Q__NOTE(_A4 ), \ - HD_NOTE(_B4 ), \ - Q__NOTE(_E4 ), \ - Q__NOTE(_B4 ), \ - W__NOTE(_CS5), - -#define MARIO_THEME \ - Q__NOTE(_E5), \ - H__NOTE(_E5), \ - H__NOTE(_E5), \ - Q__NOTE(_C5), \ - H__NOTE(_E5), \ - W__NOTE(_G5), \ - Q__NOTE(_G4), - -#define MARIO_GAMEOVER \ - HD_NOTE(_C5 ), \ - HD_NOTE(_G4 ), \ - H__NOTE(_E4 ), \ - H__NOTE(_A4 ), \ - H__NOTE(_B4 ), \ - H__NOTE(_A4 ), \ - H__NOTE(_AF4), \ - H__NOTE(_BF4), \ - H__NOTE(_AF4), \ - WD_NOTE(_G4 ), - -#define MARIO_MUSHROOM \ - S__NOTE(_C5 ), \ - S__NOTE(_G4 ), \ - S__NOTE(_C5 ), \ - S__NOTE(_E5 ), \ - S__NOTE(_G5 ), \ - S__NOTE(_C6 ), \ - S__NOTE(_G5 ), \ - S__NOTE(_GS4), \ - S__NOTE(_C5 ), \ - S__NOTE(_DS5), \ - S__NOTE(_GS5), \ - S__NOTE(_DS5), \ - S__NOTE(_GS5), \ - S__NOTE(_C6 ), \ - S__NOTE(_DS6), \ - S__NOTE(_GS6), \ - S__NOTE(_DS6), \ - S__NOTE(_AS4), \ - S__NOTE(_D5 ), \ - S__NOTE(_F5 ), \ - S__NOTE(_AS5), \ - S__NOTE(_D6 ), \ - S__NOTE(_F6 ), \ - S__NOTE(_AS6), \ - S__NOTE(_F6 ) - -#define E1M1_DOOM \ - Q__NOTE(_E3 ), \ - Q__NOTE(_E3 ), \ - Q__NOTE(_E4 ), \ - Q__NOTE(_E3 ), \ - Q__NOTE(_E3 ), \ - Q__NOTE(_D4 ), \ - Q__NOTE(_E3 ), \ - Q__NOTE(_E3 ), \ - Q__NOTE(_C4 ), \ - Q__NOTE(_E3 ), \ - Q__NOTE(_E3 ), \ - Q__NOTE(_BF3), \ - Q__NOTE(_E3 ), \ - Q__NOTE(_E3 ), \ - Q__NOTE(_B3 ), \ - Q__NOTE(_C4 ), \ - Q__NOTE(_E3 ), \ - Q__NOTE(_E3 ), \ - Q__NOTE(_E4 ), \ - Q__NOTE(_E3 ), \ - Q__NOTE(_E3 ), \ - Q__NOTE(_D4 ), \ - Q__NOTE(_E3 ), \ - Q__NOTE(_E3 ), \ - Q__NOTE(_C4 ), \ - Q__NOTE(_E3 ), \ - Q__NOTE(_E3 ), \ - H__NOTE(_BF3), - -#define DISNEY_SONG \ - H__NOTE(_G3 ), \ - H__NOTE(_G4 ), \ - H__NOTE(_F4 ), \ - H__NOTE(_E4 ), \ - H__NOTE(_CS4), \ - H__NOTE(_D4 ), \ - W__NOTE(_A4 ), \ - H__NOTE(_B3 ), \ - H__NOTE(_B4 ), \ - H__NOTE(_A4 ), \ - H__NOTE(_G4 ), \ - H__NOTE(_FS4), \ - H__NOTE(_G4 ), \ - W__NOTE(_C5 ), \ - H__NOTE(_D5 ), \ - H__NOTE(_C5 ), \ - H__NOTE(_B4 ), \ - H__NOTE(_A4 ), \ - H__NOTE(_G4 ), \ - H__NOTE(_F4 ), \ - H__NOTE(_E4 ), \ - H__NOTE(_D4 ), \ - W__NOTE(_A4 ), \ - W__NOTE(_B3 ), \ - W__NOTE(_C4 ), - -#define NUMBER_ONE \ - HD_NOTE(_F4 ), \ - Q__NOTE(_C5 ), \ - E__NOTE(_B4 ), \ - E__NOTE(_C5 ), \ - E__NOTE(_B4 ), \ - E__NOTE(_C5 ), \ - Q__NOTE(_B4 ), \ - Q__NOTE(_C5 ), \ - H__NOTE(_AF4), \ - HD_NOTE(_F4 ), \ - Q__NOTE(_F4 ), \ - Q__NOTE(_AF4), \ - Q__NOTE(_C5 ), \ - H__NOTE(_DF5), \ - H__NOTE(_AF4), \ - H__NOTE(_DF5), \ - H__NOTE(_EF5), \ - Q__NOTE(_C5 ), \ - Q__NOTE(_DF5), \ - Q__NOTE(_C5 ), \ - Q__NOTE(_DF5), \ - H__NOTE(_C5 ), - -#define CABBAGE_SONG \ - H__NOTE(_C4), \ - H__NOTE(_A4), \ - H__NOTE(_B4), \ - H__NOTE(_B4), \ - H__NOTE(_A4), \ - H__NOTE(_G4), \ - H__NOTE(_E4), - -#define OLD_SPICE \ - Q__NOTE(_A4 ), \ - Q__NOTE(_A4 ), \ - H__NOTE(_B4 ), \ - H__NOTE(_D5 ), \ - H__NOTE(_CS5), \ - Q__NOTE(_E5 ), \ - H__NOTE(_FS5), \ - H__NOTE(_D5 ), \ - -#define VICTORY_FANFARE_SHORT \ - ED_NOTE(_C6), \ - ED_NOTE(_C6), \ - ED_NOTE(_C6), \ - ED_NOTE(_C6), \ - W__NOTE(_REST), \ - QD_NOTE(_GS5), \ - QD_NOTE(_AS5), \ - Q__NOTE(_C6), \ - Q__NOTE(_AS5), \ - Q__NOTE(_C6), \ - -#define ALL_STAR \ - H__NOTE(_AS4), W__NOTE(_FS4), Q__NOTE(_FS4), Q__NOTE(_DS4), H__NOTE(_FS4), W__NOTE(_FS4), Q__NOTE(_FS4), Q__NOTE(_DS4), \ - H__NOTE(_FS4), W__NOTE(_FS4), W__NOTE(_FS4), QD_NOTE(_AS4), \ - H__NOTE(_AS4), W__NOTE(_FS4), Q__NOTE(_FS4), Q__NOTE(_DS4), H__NOTE(_FS4), W__NOTE(_FS4), Q__NOTE(_FS4), Q__NOTE(_DS4), \ - H__NOTE(_FS4), W__NOTE(_FS4), W__NOTE(_FS4), W__NOTE(_AS4), H__NOTE(_REST),\ - W__NOTE(_AS4), W__NOTE(_CS5), H__NOTE(_B4), H__NOTE(_CS5), H__NOTE(_DS5), W__NOTE(_FS5), \ - H__NOTE(_GS5), W__NOTE(_GS5), H__NOTE(_FS4), H__NOTE(_FS4), H__NOTE(_GS4), H__NOTE(_FS4), \ - H__NOTE(_AS4), W__NOTE(_GS4), W__NOTE(_GS4), W__NOTE(_FS4), W__NOTE(_GS4), \ - H__NOTE(_AS4), WD_NOTE(_DS4) - -#define RICK_ROLL \ - Q__NOTE(_F4), \ - Q__NOTE(_G4), \ - Q__NOTE(_BF4), \ - Q__NOTE(_G4), \ - HD_NOTE(_D5), \ - HD_NOTE(_D5), \ - W__NOTE(_C5), \ - S__NOTE(_REST), \ - Q__NOTE(_F4), \ - Q__NOTE(_G4), \ - Q__NOTE(_BF4), \ - Q__NOTE(_G4), \ - HD_NOTE(_C5), \ - HD_NOTE(_C5), \ - W__NOTE(_BF4), \ - S__NOTE(_REST), \ - Q__NOTE(_F4), \ - Q__NOTE(_G4), \ - Q__NOTE(_BF4), \ - Q__NOTE(_G4), \ - W__NOTE(_BF4), \ - H__NOTE(_C5), \ - H__NOTE(_A4), \ - H__NOTE(_A4), \ - H__NOTE(_G4), \ - H__NOTE(_F4), \ - H__NOTE(_F4), \ - W__NOTE(_C5), \ - W__NOTE(_BF4), - -/* Prelude music from Final Fantasy */ -#define FF_PRELUDE \ - M__NOTE(_C3, 20), M__NOTE(_D3, 20), M__NOTE(_E3, 20), M__NOTE(_G3, 20), \ - M__NOTE(_C4, 20), M__NOTE(_D4, 20), M__NOTE(_E4, 20), M__NOTE(_G4, 20), \ - M__NOTE(_C5, 20), M__NOTE(_D5, 20), M__NOTE(_E5, 20), M__NOTE(_G5, 20), \ - M__NOTE(_C6, 20), M__NOTE(_D6, 20), M__NOTE(_E6, 20), M__NOTE(_G6, 20), \ - M__NOTE(_C7, 20), M__NOTE(_G6, 20), M__NOTE(_E6, 20), M__NOTE(_D6, 20), \ - M__NOTE(_C6, 20), M__NOTE(_G5, 20), M__NOTE(_E5, 20), M__NOTE(_D5, 20), \ - M__NOTE(_C5, 20), M__NOTE(_G4, 20), M__NOTE(_E4, 20), M__NOTE(_D4, 20), \ - M__NOTE(_C4, 20), M__NOTE(_G3, 20), M__NOTE(_E3, 20), M__NOTE(_D3, 20), \ - M__NOTE(_A2, 20), M__NOTE(_B2, 20), M__NOTE(_C3, 20), M__NOTE(_E3, 20), \ - M__NOTE(_A3, 20), M__NOTE(_B3, 20), M__NOTE(_C4, 20), M__NOTE(_E4, 20), \ - M__NOTE(_A4, 20), M__NOTE(_B4, 20), M__NOTE(_C5, 20), M__NOTE(_E5, 20), \ - M__NOTE(_A5, 20), M__NOTE(_B5, 20), M__NOTE(_C6, 20), M__NOTE(_E6, 20), \ - M__NOTE(_A6, 20), M__NOTE(_E6, 20), M__NOTE(_C6, 20), M__NOTE(_B5, 20), \ - M__NOTE(_A5, 20), M__NOTE(_E5, 20), M__NOTE(_C5, 20), M__NOTE(_B4, 20), \ - M__NOTE(_A4, 20), M__NOTE(_E4, 20), M__NOTE(_C4, 20), M__NOTE(_B3, 20), \ - M__NOTE(_A3, 20), M__NOTE(_E3, 20), M__NOTE(_C3, 20), M__NOTE(_B2, 20), - -/* Melody from the main themes of Star Trek TNG and the original series */ -#define TO_BOLDLY_GO \ - W__NOTE(_BF3 ), \ - Q__NOTE(_EF4 ), \ - WD_NOTE(_AF4 ), \ - W__NOTE(_REST), \ - H__NOTE(_G4 ), \ - Q__NOTE(_EF4 ), \ - H__NOTE(_C4 ), \ - W__NOTE(_REST), \ - QD_NOTE(_F4 ), \ - M__NOTE(_BF4, 128), - -#define KATAWARE_DOKI \ - W__NOTE(_G5), HD_NOTE(_G5), Q__NOTE(_G5), H__NOTE(_G5), H__NOTE(_E5), H__NOTE(_D5), Q__NOTE(_D5), Q__NOTE(_C5), \ - B__NOTE(_E5), H__NOTE(_C5), W__NOTE(_G5), HD_NOTE(_G5), Q__NOTE(_C5), H__NOTE(_C6), Q__NOTE(_B5), \ - Q__NOTE(_A5), H__NOTE(_G5), Q__NOTE(_G5), Q__NOTE(_A5), W__NOTE(_G5), QD_NOTE(_E5), \ - QD_NOTE(_F5), Q__NOTE(_E5), WD_NOTE(_D5), H__NOTE(_C5), W__NOTE(_G5), HD_NOTE(_G5), Q__NOTE(_G5), \ - H__NOTE(_G5), H__NOTE(_E5), H__NOTE(_D5), Q__NOTE(_D5), Q__NOTE(_C5), B__NOTE(_E5), H__NOTE(_G4), \ - Q__NOTE(_C5), Q__NOTE(_D5), Q__NOTE(_E5), H__NOTE(_D5), Q__NOTE(_C5), Q__NOTE(_C5), \ - Q__NOTE(_A4), H__NOTE(_C5), Q__NOTE(_C5), W__NOTE(_C5), Q__NOTE(_F4), Q__NOTE(_C5), \ - Q__NOTE(_D5), Q__NOTE(_E5), H__NOTE(_D5), H__NOTE(_C5), Q__NOTE(_C5), H__NOTE(_G5), \ - Q__NOTE(_C5), HD_NOTE(_D5), H__NOTE(_G4), Q__NOTE(_C5), Q__NOTE(_D5), Q__NOTE(_E5), \ - H__NOTE(_D5), Q__NOTE(_C5), Q__NOTE(_C5), Q__NOTE(_A4), H__NOTE(_C5), Q__NOTE(_C5), \ - W__NOTE(_C5), Q__NOTE(_F4), Q__NOTE(_C5), Q__NOTE(_D5), Q__NOTE(_E5), H__NOTE(_D5), \ - H__NOTE(_C5), Q__NOTE(_C5), H__NOTE(_G5), Q__NOTE(_C5), HD_NOTE(_D5), \ - HD_NOTE(_G4), Q__NOTE(_C5), Q__NOTE(_D5), BD_NOTE(_C5), +/* Title: La Campanella + * Author/Composer: Frank Lizst + + License: Public Domain + */ #define CAMPANELLA \ Q__NOTE(_DS4), E__NOTE(_DS4), E__NOTE(_DS5), Q__NOTE(_DS5), E__NOTE(_DS5), E__NOTE(_DS6), Q__NOTE(_DS5), E__NOTE(_DS5), \ E__NOTE(_DS6), Q__NOTE(_CS5), E__NOTE(_CS5), E__NOTE(_DS6), Q__NOTE(_B4), E__NOTE(_B4), E__NOTE(_DS6), \ @@ -567,163 +262,13 @@ Q__NOTE(_GS5), E__NOTE(_GS5), E__NOTE(_DS7), Q__NOTE(_AS5), E__NOTE(_AS5), E__NOTE(_DS7), Q__NOTE(_DS5), \ E__NOTE(_DS5), E__NOTE(_DS7), W__NOTE(_DS6), W__NOTE(_GS5), -#define MEGALOVANIA \ - Q__NOTE(_D4), Q__NOTE(_D4), H__NOTE(_D5), HD_NOTE(_A4), H__NOTE(_AF4), H__NOTE(_G4), H__NOTE(_F4), \ - Q__NOTE(_D4), Q__NOTE(_F4), Q__NOTE(_G4), Q__NOTE(_C4), Q__NOTE(_C4), H__NOTE(_D5), HD_NOTE(_A4), \ - H__NOTE(_AF4), H__NOTE(_G4), H__NOTE(_F4), Q__NOTE(_D4), Q__NOTE(_F4), Q__NOTE(_G4), \ - Q__NOTE(_B3), Q__NOTE(_B3), H__NOTE(_D5), HD_NOTE(_A4), H__NOTE(_AF4), H__NOTE(_G4), H__NOTE(_F4), \ - Q__NOTE(_D4), Q__NOTE(_F4), Q__NOTE(_G4), Q__NOTE(_BF3), Q__NOTE(_BF3), H__NOTE(_D5), \ - HD_NOTE(_A4), H__NOTE(_AF4), H__NOTE(_G4), H__NOTE(_F4), Q__NOTE(_D4), Q__NOTE(_F4), \ - Q__NOTE(_G4), -#define MICHISHIRUBE \ - W__NOTE(_A5), H__NOTE(_A5), H__NOTE(_A5), W__NOTE(_B5), H__NOTE(_A5), H__NOTE(_B5), BD_NOTE(_CS6), W__NOTE(_E6), \ - W__NOTE(_CS6), WD_NOTE(_B5), H__NOTE(_A5), BD_NOTE(_A5), W__NOTE(_A5), H__NOTE(_A5), H__NOTE(_A5), \ - W__NOTE(_B5), H__NOTE(_A5), H__NOTE(_B5), W__NOTE(_A5), W__NOTE(_A6), W__NOTE(_GS6), H__NOTE(_CS6), \ - Q__NOTE(_E6), Q__NOTE(_CS6), W__NOTE(_B5), H__NOTE(_B5), H__NOTE(_CS6), W__NOTE(_B5), H__NOTE(_A5), \ - Q__NOTE(_B5), BD_NOTE(_A5), \ - H__NOTE(_E6), H__NOTE(_FS6), H__NOTE(_E6), H__NOTE(_B6), \ - W__NOTE(_A6), H__NOTE(_E6), H__NOTE(_B6), W__NOTE(_A6), H__NOTE(_A6), H__NOTE(_B6), \ - B__NOTE(_CS7), H__NOTE(_E6), H__NOTE(_FS6), H__NOTE(_E6), H__NOTE(_B6), W__NOTE(_A6), H__NOTE(_E6), \ - H__NOTE(_B6), W__NOTE(_A6), H__NOTE(_A6), H__NOTE(_GS6), B__NOTE(_E6), H__NOTE(_E6), \ - H__NOTE(_FS6), H__NOTE(_E6), H__NOTE(_B6), W__NOTE(_A6), H__NOTE(_E6), H__NOTE(_B6), \ - W__NOTE(_A6), H__NOTE(_A6), H__NOTE(_B6), H__NOTE(_CS7), B__NOTE(_CS7), H__NOTE(_E6), H__NOTE(_E6), \ - H__NOTE(_E6), H__NOTE(_E6), H__NOTE(_D6), H__NOTE(_D6), H__NOTE(_CS6), H__NOTE(_CS6), Q__NOTE(_B5), \ - BD_NOTE(_B5), W__NOTE(_A5), H__NOTE(_A5), H__NOTE(_A5), W__NOTE(_B5), H__NOTE(_A5), H__NOTE(_B5), \ - BD_NOTE(_CS6), W__NOTE(_E6), W__NOTE(_CS6), WD_NOTE(_B5), H__NOTE(_A5), BD_NOTE(_A5), W__NOTE(_A5), \ - H__NOTE(_A5), H__NOTE(_A5), W__NOTE(_B5), H__NOTE(_A5), H__NOTE(_B5), W__NOTE(_A5), W__NOTE(_A6), \ - W__NOTE(_GS6), H__NOTE(_CS6), Q__NOTE(_E6), Q__NOTE(_CS6), W__NOTE(_B5), H__NOTE(_B5), H__NOTE(_CS6), \ - W__NOTE(_B5), H__NOTE(_A5), Q__NOTE(_B5), BD_NOTE(_A5), -#define LIEBESLEID \ - Q__NOTE(_E4), Q__NOTE(_DS4), Q__NOTE(_E4), Q__NOTE(_F4), Q__NOTE(_E4), Q__NOTE(_FS4), Q__NOTE(_EF4), Q__NOTE(_G4), Q__NOTE(_D4), \ - Q__NOTE(_GS4), Q__NOTE(_CS4), W__NOTE(_A4), H__NOTE(_E5), H__NOTE(_E5), HD_NOTE(_G4), Q__NOTE(_E5), E__NOTE(_E5), \ - E__NOTE(_F5), ED_NOTE(_E5), HD_NOTE(_D5), Q__NOTE(_E5), H__NOTE(_F5), H__NOTE(_CS5), H__NOTE(_C5), W__NOTE(_G4), \ - H__NOTE(_D5), H__NOTE(_D5), HD_NOTE(_D5), Q__NOTE(_D5), E__NOTE(_D5), E__NOTE(_E5), E__NOTE(_D5), HD_NOTE(_C5), \ - Q__NOTE(_D5), H__NOTE(_E5), H__NOTE(_B4), H__NOTE(_BF4), W__NOTE(_F4), H__NOTE(_C5), H__NOTE(_C5), HD_NOTE(_EF4), \ - Q__NOTE(_C5), E__NOTE(_C5), E__NOTE(_D5), E__NOTE(_C5), HD_NOTE(_BF4), Q__NOTE(_C5), H__NOTE(_D5), H__NOTE(_FS4), \ - H__NOTE(_F4), HD_NOTE(_E4), Q__NOTE(_A4), HD_NOTE(_FS4), Q__NOTE(_A4), HD_NOTE(_GS4), Q__NOTE(_B4), Q__NOTE(_A4), \ - Q__NOTE(_E4), Q__NOTE(_DS4), Q__NOTE(_E4), Q__NOTE(_F4), Q__NOTE(_D4), Q__NOTE(_FS4), Q__NOTE(_CS4), Q__NOTE(_G4), \ - Q__NOTE(_C4), Q__NOTE(_GS4), Q__NOTE(_D4), WD_NOTE(_A4), - -#define MELODIES_OF_LIFE \ - H__NOTE(_B5), W__NOTE(_GS6), H__NOTE(_GS6), H__NOTE(_FS6), W__NOTE(_E6), H__NOTE(_E6), H__NOTE(_DS6), H__NOTE(_CS6), H__NOTE(_DS6), \ - H__NOTE(_E6), H__NOTE(_FS6), WD_NOTE(_B5), H__NOTE(_B5), H__NOTE(_CS6), H__NOTE(_DS6), H__NOTE(_E6), H__NOTE(_CS6), \ - H__NOTE(_CS6), H__NOTE(_B5), H__NOTE(_E6), H__NOTE(_GS6), H__NOTE(_A6), H__NOTE(_GS6), H__NOTE(_E6), H__NOTE(_GS6), \ - WD_NOTE(_FS6), H__NOTE(_GS6), WD_NOTE(_B6), H__NOTE(_CS7), H__NOTE(_B6), H__NOTE(_A6), H__NOTE(_A6), H__NOTE(_GS6), \ - H__NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_FS6), H__NOTE(_GS6), WD_NOTE(_A6), Q__NOTE(_GS6), Q__NOTE(_FS6), Q__NOTE(_FS6), \ - Q__NOTE(_E6), W__NOTE(_E6), Q__NOTE(_B5), Q__NOTE(_CS6), WD_NOTE(_E6), Q__NOTE(_E6), Q__NOTE(_FS6), W__NOTE(_GS6), \ - H__NOTE(_A6), B__NOTE(_FS6), - -#define EYES_ON_ME \ - Q__NOTE(_A6), Q__NOTE(_G6), Q__NOTE(_FS6), Q__NOTE(_D6), Q__NOTE(_A5), Q__NOTE(_G5), Q__NOTE(_FS5), Q__NOTE(_D5), \ - W__NOTE(_A4), W__NOTE(_D5), W__NOTE(_E5), W__NOTE(_FS5), H__NOTE(_A5), M__NOTE(_FS5, 256), H__NOTE(_E5), \ - H__NOTE(_FS5), B__NOTE(_D5), H__NOTE(_B4), H__NOTE(_D5), BD_NOTE(_E5), H__NOTE(_A4), W__NOTE(_D5), W__NOTE(_E5), \ - W__NOTE(_FS5), H__NOTE(_A5), BD_NOTE(_CS6), W__NOTE(_A5), H__NOTE(_CS6), H__NOTE(_D6), WD_NOTE(_B5), \ - H__NOTE(_A5), H__NOTE(_B5), B__NOTE(_A5), WD_NOTE(_B4), W__NOTE(_CS5), WD_NOTE(_D6), H__NOTE(_D6), \ - W__NOTE(_CS6), H__NOTE(_B5), H__NOTE(_B5), H__NOTE(_B5), B__NOTE(_A5), H__NOTE(_A5), H__NOTE(_FS5), H__NOTE(_A5), \ - WD_NOTE(_B5), H__NOTE(_B5), H__NOTE(_A5), H__NOTE(_G5), H__NOTE(_D5), W__NOTE(_FS5), WD_NOTE(_E5), \ - H__NOTE(_CS4), H__NOTE(_E4), H__NOTE(_A4), H__NOTE(_CS5), W__NOTE(_D5), W__NOTE(_E5), W__NOTE(_FS5), H__NOTE(_G5), \ - H__NOTE(_A5), B__NOTE(_A5), H__NOTE(_A5), H__NOTE(_G5), H__NOTE(_D5), BD_NOTE(_FS5), W__NOTE(_E5), B__NOTE(_D5), \ - H__NOTE(_G4), H__NOTE(_FS4), W__NOTE(_E4), BD_NOTE(_D4), - -#define SONG_OF_THE_ANCIENTS \ - H__NOTE(_D6), H__NOTE(_EF6), B__NOTE(_EF6), H__NOTE(_EF6), H__NOTE(_D6), H__NOTE(_BF5), H__NOTE(_G5), BD_NOTE(_C6), H__NOTE(_D6), \ - H__NOTE(_EF6), B__NOTE(_EF6), H__NOTE(_EF6), H__NOTE(_D6), H__NOTE(_BF5), H__NOTE(_G5), BD_NOTE(_G6), H__NOTE(_G5), \ - H__NOTE(_AF5), B__NOTE(_G6), H__NOTE(_AF6), H__NOTE(_G6), H__NOTE(_F6), H__NOTE(_D6), H__NOTE(_D6), H__NOTE(_EF6), \ - B__NOTE(_EF6), WD_NOTE(_G5), WD_NOTE(_BF5), H__NOTE(_D6), H__NOTE(_EF6), B__NOTE(_EF6), H__NOTE(_EF6), H__NOTE(_D6), \ - H__NOTE(_BF5), H__NOTE(_G5), BD_NOTE(_C6), WD_NOTE(_B5), WD_NOTE(_G5), WD_NOTE(_G6), W__NOTE(_G6), H__NOTE(_AF6), \ - W__NOTE(_G6), H__NOTE(_AF6), H__NOTE(_G6), H__NOTE(_F6), H__NOTE(_D6), H__NOTE(_D6), H__NOTE(_EF6), B__NOTE(_EF6), \ - WD_NOTE(_E6), H__NOTE(_E6), H__NOTE(_F6), H__NOTE(_G6), H__NOTE(_BF6), H__NOTE(_AF6), W__NOTE(_AF6), H__NOTE(_C6), \ - H__NOTE(_BF6), H__NOTE(_AF6), W__NOTE(_AF6), H__NOTE(_C6), H__NOTE(_AF6), BD_NOTE(_G6), WD_NOTE(_B5), WD_NOTE(_G6), \ - W__NOTE(_G6), H__NOTE(_AF6), W__NOTE(_G6), H__NOTE(_AF6), H__NOTE(_G6), H__NOTE(_F6), H__NOTE(_D6), H__NOTE(_D6), \ - H__NOTE(_EF6), B__NOTE(_EF6), WD_NOTE(_E6), H__NOTE(_E6), H__NOTE(_F6), H__NOTE(_G6), H__NOTE(_BF6), H__NOTE(_AF6), \ - W__NOTE(_AF6), H__NOTE(_C6), H__NOTE(_AF6), H__NOTE(_G6), W__NOTE(_G6), H__NOTE(_F6), H__NOTE(_D6), BD_NOTE(_EF6), \ - WD_NOTE(_F6), WD_NOTE(_G6), BD_NOTE(_C7), - -#define NIER_AMUSEMENT_PARK \ - H__NOTE(_D5), E__NOTE(_G6), E__NOTE(_GF6), Q__NOTE(_F6), Q__NOTE(_E6), Q__NOTE(_EF6), Q__NOTE(_DF6), Q__NOTE(_EF6), WD_NOTE(_D6), \ - Q__NOTE(_G5), Q__NOTE(_A5), H__NOTE(_BF5), H__NOTE(_D6), H__NOTE(_G6), H__NOTE(_A6), W__NOTE(_BF6), W__NOTE(_EF7), \ - H__NOTE(_D5), E__NOTE(_G6), E__NOTE(_GF6), Q__NOTE(_F6), Q__NOTE(_E6), Q__NOTE(_EF6), Q__NOTE(_DF6), Q__NOTE(_EF6), \ - WD_NOTE(_D6), Q__NOTE(_G5), Q__NOTE(_A5), H__NOTE(_BF5), H__NOTE(_D6), H__NOTE(_G6), H__NOTE(_A6), W__NOTE(_BF6), \ - H__NOTE(_EF7), H__NOTE(_D5), HD_NOTE(_A5), HD_NOTE(_BF5), B__NOTE(_D5), H__NOTE(_D5), HD_NOTE(_G5), HD_NOTE(_F5), \ - H__NOTE(_EF5), WD_NOTE(_D5), H__NOTE(_D5), HD_NOTE(_A5), HD_NOTE(_BF5), WD_NOTE(_D5), W__NOTE(_D5), B__NOTE(_G5), \ - H__NOTE(_D5), HD_NOTE(_A5), HD_NOTE(_BF5), B__NOTE(_D5), H__NOTE(_D5), HD_NOTE(_G5), HD_NOTE(_F5), H__NOTE(_EF5), \ - W__NOTE(_D5), W__NOTE(_C5), W__NOTE(_BF4), W__NOTE(_C5), W__NOTE(_D5), W__NOTE(_G5), B__NOTE(_D5), B__NOTE(_E5), \ - W__NOTE(_EF5), QD_NOTE(_C5), QD_NOTE(_D5), Q__NOTE(_EF5), H__NOTE(_G5), H__NOTE(_F5), H__NOTE(_EF5), H__NOTE(_F5), \ - B__NOTE(_D5), B__NOTE(_BF4), W__NOTE(_EF5), QD_NOTE(_C5), QD_NOTE(_D5), Q__NOTE(_EF5), H__NOTE(_G5), H__NOTE(_F5), \ - H__NOTE(_EF5), H__NOTE(_F5), W__NOTE(_D5), W__NOTE(_BF5), W__NOTE(_G5), W__NOTE(_D5), W__NOTE(_EF5), QD_NOTE(_C5), \ - QD_NOTE(_D5), Q__NOTE(_EF5), H__NOTE(_G5), H__NOTE(_F5), H__NOTE(_EF5), H__NOTE(_F5), B__NOTE(_D5), B__NOTE(_BF4), \ - B__NOTE(_C5), H__NOTE(_C5), H__NOTE(_D5), H__NOTE(_EF5), H__NOTE(_F5), WD_NOTE(_G5), H__NOTE(_C5), W__NOTE(_AF5), \ - WD_NOTE(_G5), - -#define COPIED_CITY \ - Q__NOTE(_F6), Q__NOTE(_BF5), Q__NOTE(_EF6), Q__NOTE(_G5), Q__NOTE(_AF5), Q__NOTE(_G6), Q__NOTE(_AF6), Q__NOTE(_EF6), Q__NOTE(_BF5), \ - Q__NOTE(_F6), Q__NOTE(_G5), Q__NOTE(_AF5), Q__NOTE(_EF6), Q__NOTE(_G5), Q__NOTE(_F5), Q__NOTE(_D6), Q__NOTE(_C6), \ - Q__NOTE(_G5), Q__NOTE(_BF5), Q__NOTE(_EF5), Q__NOTE(_AF5), Q__NOTE(_G5), Q__NOTE(_EF5), Q__NOTE(_BF4), H__NOTE(_C5), \ - Q__NOTE(_F5), Q__NOTE(_G5), Q__NOTE(_AF5), Q__NOTE(_EF6), Q__NOTE(_BF5), Q__NOTE(_G6), Q__NOTE(_EF6), Q__NOTE(_BF6), \ - Q__NOTE(_AF6), Q__NOTE(_EF6), Q__NOTE(_BF5), Q__NOTE(_F6), Q__NOTE(_G5), Q__NOTE(_F5), Q__NOTE(_EF6), Q__NOTE(_BF5), \ - Q__NOTE(_B6), Q__NOTE(_DF6), Q__NOTE(_EF6), Q__NOTE(_F6), Q__NOTE(_AF6), Q__NOTE(_EF7), Q__NOTE(_F6), Q__NOTE(_C6), \ - Q__NOTE(_G5), Q__NOTE(_AF5), Q__NOTE(_BF5), Q__NOTE(_C6), Q__NOTE(_EF6), Q__NOTE(_G5), Q__NOTE(_EF5), Q__NOTE(_F5), \ - Q__NOTE(_G5), Q__NOTE(_EF5), Q__NOTE(_F5), Q__NOTE(_C5), Q__NOTE(_EF5), Q__NOTE(_C5), Q__NOTE(_BF4), Q__NOTE(_G4), \ - Q__NOTE(_F4), Q__NOTE(_G4), H__NOTE(_AF4), Q__NOTE(_C5), Q__NOTE(_EF5), Q__NOTE(_F5), Q__NOTE(_C5), Q__NOTE(_EF5), \ - Q__NOTE(_F5), Q__NOTE(_G5), Q__NOTE(_BF5), Q__NOTE(_AF5), Q__NOTE(_G5), Q__NOTE(_EF5), Q__NOTE(_F5), Q__NOTE(_C5), \ - Q__NOTE(_AF4), Q__NOTE(_F5), Q__NOTE(_G5), Q__NOTE(_AF5), Q__NOTE(_G5), Q__NOTE(_F5), Q__NOTE(_EF5), Q__NOTE(_F5), \ - Q__NOTE(_G5), Q__NOTE(_BF5), Q__NOTE(_C6), Q__NOTE(_G6), Q__NOTE(_EF6), WD_NOTE(_F7), - -#define VAGUE_HOPE_COLD_RAIN \ - HD_NOTE(_D6), HD_NOTE(_E6), HD_NOTE(_CS6), HD_NOTE(_D6), HD_NOTE(_B5), Q__NOTE(_B5), Q__NOTE(_CS6), Q__NOTE(_D6), WD_NOTE(_A6), \ - HD_NOTE(_FS6), HD_NOTE(_G6), HD_NOTE(_D6), HD_NOTE(_E6), HD_NOTE(_FS6), Q__NOTE(_D5), Q__NOTE(_CS5), Q__NOTE(_A4), \ - W__NOTE(_FS4), H__NOTE(_D6), HD_NOTE(_E6), HD_NOTE(_FS6), HD_NOTE(_CS6), HD_NOTE(_E6), HD_NOTE(_D6), Q__NOTE(_CS6), \ - Q__NOTE(_D6), Q__NOTE(_E6), W__NOTE(_FS6), H__NOTE(_CS6), WD_NOTE(_D6), HD_NOTE(_D6), Q__NOTE(_D6), H__NOTE(_E6), \ - WD_NOTE(_CS6), HD_NOTE(_AS5), HD_NOTE(_B5), HD_NOTE(_B5), Q__NOTE(_B4), Q__NOTE(_CS5), Q__NOTE(_D5), HD_NOTE(_A5), \ - Q__NOTE(_B5), Q__NOTE(_CS6), Q__NOTE(_A6), HD_NOTE(_FS6), Q__NOTE(_D5), Q__NOTE(_CS5), Q__NOTE(_A4), H__NOTE(_FS4), \ - HD_NOTE(_FS6), HD_NOTE(_D6), HD_NOTE(_E6), HD_NOTE(_A6), HD_NOTE(_FS6), Q__NOTE(_CS5), Q__NOTE(_D5), Q__NOTE(_A5), \ - HD_NOTE(_FS5), Q__NOTE(_FS6), Q__NOTE(_FS6), Q__NOTE(_GS6), HD_NOTE(_A6), Q__NOTE(_B6), H__NOTE(_A6), H__NOTE(_GS6), \ - H__NOTE(_FS6), H__NOTE(_E6), H__NOTE(_CS6), H__NOTE(_FS6), E__NOTE(_FS5), E__NOTE(_CS5), Q__NOTE(_B4), H__NOTE(_AS4), \ - W__NOTE(_FS5), HD_NOTE(_FS6), HD_NOTE(_B5), H__NOTE(_D6), H__NOTE(_CS6), H__NOTE(_E6), HD_NOTE(_A6), HD_NOTE(_E6), \ - W__NOTE(_D6), Q__NOTE(_CS6), Q__NOTE(_D6), HD_NOTE(_E6), HD_NOTE(_FS6), WD_NOTE(_B6), HD_NOTE(_E6), HD_NOTE(_FS6), \ - HD_NOTE(_B5), Q__NOTE(_B5), Q__NOTE(_B5), Q__NOTE(_CS6), H__NOTE(_D6), H__NOTE(_E6), H__NOTE(_FS6), HD_NOTE(_E6), \ - HD_NOTE(_CS6), H__NOTE(_FS6), H__NOTE(_A6), H__NOTE(_B6), W__NOTE(_A6), H__NOTE(_FS6), BD_NOTE(_B6), - -#define KAINE_SALVATION \ - BD_NOTE(_D5), W__NOTE(_BF4), W__NOTE(_C5), W__NOTE(_F5), BD_NOTE(_D5), BD_NOTE(_BF4), BD_NOTE(_C5), W__NOTE(_BF4), W__NOTE(_C5), \ - W__NOTE(_D5), BD_NOTE(_C5), BD_NOTE(_F4), BD_NOTE(_D5), W__NOTE(_BF4), W__NOTE(_C5), W__NOTE(_F5), BD_NOTE(_D5), \ - BD_NOTE(_BF4), WD_NOTE(_EF5), WD_NOTE(_BF4), W__NOTE(_A4), W__NOTE(_BF4), W__NOTE(_C5), B__NOTE(_C5), H__NOTE(_B4), \ - H__NOTE(_C5), BD_NOTE(_D5), WD_NOTE(_G5), W__NOTE(_G5), H__NOTE(_FS5), H__NOTE(_G5), H__NOTE(_A5), H__NOTE(_B5), \ - H__NOTE(_A5), H__NOTE(_G5), H__NOTE(_FS5), WD_NOTE(_G5), W__NOTE(_G5), H__NOTE(_D6), H__NOTE(_C6), H__NOTE(_B5), \ - H__NOTE(_A5), WD_NOTE(_G5), WD_NOTE(_G5), W__NOTE(_G5), H__NOTE(_FS5), H__NOTE(_G5), H__NOTE(_A5), H__NOTE(_B5), \ - H__NOTE(_A5), H__NOTE(_G5), H__NOTE(_FS5), W__NOTE(_G5), H__NOTE(_B5), H__NOTE(_A5), H__NOTE(_G5), H__NOTE(_FS5), \ - BD_NOTE(_E5), WD_NOTE(_G5), W__NOTE(_G5), H__NOTE(_FS5), H__NOTE(_G5), H__NOTE(_A5), H__NOTE(_B5), H__NOTE(_A5), \ - H__NOTE(_G5), H__NOTE(_FS5), WD_NOTE(_G5), W__NOTE(_G5), H__NOTE(_D6), H__NOTE(_C6), H__NOTE(_B5), H__NOTE(_A5), \ - WD_NOTE(_G5), WD_NOTE(_G5), W__NOTE(_G5), H__NOTE(_FS5), H__NOTE(_G5), H__NOTE(_A5), H__NOTE(_B5), H__NOTE(_A5), \ - H__NOTE(_G5), H__NOTE(_FS5), W__NOTE(_G5), H__NOTE(_D6), WD_NOTE(_D6), W__NOTE(_F5), H__NOTE(_C6), H__NOTE(_C6), \ - H__NOTE(_BF5), H__NOTE(_A5), WD_NOTE(_G5), WD_NOTE(_F5), WD_NOTE(_G5), WD_NOTE(_A5), BD_NOTE(_G5), - -#define WEIGHT_OF_THE_WORLD \ - H__NOTE(_B5), Q__NOTE(_C6), Q__NOTE(_C6), Q__NOTE(_B5), H__NOTE(_C6), H__NOTE(_G6), WD_NOTE(_G6), H__NOTE(_B5), Q__NOTE(_C6), \ - Q__NOTE(_C6), Q__NOTE(_B5), H__NOTE(_C6), H__NOTE(_G6), H__NOTE(_G6), Q__NOTE(_A6), W__NOTE(_G6), Q__NOTE(_C6), \ - Q__NOTE(_D6), H__NOTE(_E6), Q__NOTE(_F6), H__NOTE(_E6), H__NOTE(_F6), HD_NOTE(_E6), H__NOTE(_D6), H__NOTE(_C6), \ - H__NOTE(_D6), WD_NOTE(_D6), Q__NOTE(_C6), Q__NOTE(_B5), WD_NOTE(_B5), H__NOTE(_B5), Q__NOTE(_C6), Q__NOTE(_C6), \ - Q__NOTE(_B5), H__NOTE(_C6), H__NOTE(_G6), WD_NOTE(_G6), H__NOTE(_B5), Q__NOTE(_C6), Q__NOTE(_C6), Q__NOTE(_B5), \ - H__NOTE(_C6), H__NOTE(_G6), H__NOTE(_G6), Q__NOTE(_A6), W__NOTE(_G6), Q__NOTE(_C6), Q__NOTE(_D6), H__NOTE(_E6), \ - Q__NOTE(_F6), H__NOTE(_E6), H__NOTE(_F6), HD_NOTE(_E6), H__NOTE(_D6), H__NOTE(_C6), H__NOTE(_D6), BD_NOTE(_D6), \ - Q__NOTE(_E6), Q__NOTE(_D6), Q__NOTE(_C6), Q__NOTE(_B5), H__NOTE(_C6), Q__NOTE(_C6), H__NOTE(_C6), HD_NOTE(_C6), \ - H__NOTE(_B5), H__NOTE(_C6), H__NOTE(_E6), H__NOTE(_G6), WD_NOTE(_G6), Q__NOTE(_C6), B__NOTE(_C6), H__NOTE(_B6), \ - Q__NOTE(_C7), BD_NOTE(_C7), - -#define ISABELLAS_LULLABY \ - W__NOTE(_BF4), B__NOTE(_D5), W__NOTE(_EF5), B__NOTE(_F5), W__NOTE(_BF5), B__NOTE(_AF5), W__NOTE(_GF5), BD_NOTE(_F5), B__NOTE(_CS5), \ - W__NOTE(_F5), B__NOTE(_C5), W__NOTE(_EF5), BD_NOTE(_BF4), W__NOTE(_AF4), W__NOTE(_BF4), W__NOTE(_F5), W__NOTE(_GF5), \ - WD_NOTE(_AF5), H__NOTE(_FS5), W__NOTE(_F5), B__NOTE(_EF5), W__NOTE(_C6), B__NOTE(_AF5), W__NOTE(_F5), WD_NOTE(_AF5), \ - H__NOTE(_BF5), W__NOTE(_F5), WD_NOTE(_AF5), H__NOTE(_BF5), W__NOTE(_F5), W__NOTE(_EF5), W__NOTE(_BF4), W__NOTE(_AF5), \ - WD_NOTE(_F5), H__NOTE(_F5), H__NOTE(_BF5), H__NOTE(_C6), WD_NOTE(_CS6), H__NOTE(_C6), W__NOTE(_BF5), W__NOTE(_AF5), \ - W__NOTE(_F5), W__NOTE(_EF5), WD_NOTE(_EF5), H__NOTE(_DF5), W__NOTE(_AF5), BD_NOTE(_F5), WD_NOTE(_BF4), H__NOTE(_C5), \ - W__NOTE(_CS5), W__NOTE(_EF5), W__NOTE(_AF4), W__NOTE(_EF5), WD_NOTE(_GF5), H__NOTE(_F5), W__NOTE(_EF5), WD_NOTE(_F5), \ - H__NOTE(_F5), H__NOTE(_BF5), H__NOTE(_C6), WD_NOTE(_CS6), H__NOTE(_C6), W__NOTE(_CS6), W__NOTE(_EF6), W__NOTE(_AF5), \ - W__NOTE(_EF6), WD_NOTE(_GF6), H__NOTE(_F6), W__NOTE(_EF6), B__NOTE(_DF6), H__NOTE(_GF6), H__NOTE(_AF6), BD_NOTE(_DF6), \ - B__NOTE(_BF5), W__NOTE(_F6), BD_NOTE(_C6), W__NOTE(_AF5), WD_NOTE(_EF6), H__NOTE(_DF6), W__NOTE(_C6), B__NOTE(_BF5), +/* Title: Fantaisie-Impromptu + * Author/Composer: Chopin + * License: Public Domain +*/ #define FANTASIE_IMPROMPTU \ E__NOTE(_GS4), E__NOTE(_A4), E__NOTE(_GS4), E__NOTE(_REST), E__NOTE(_GS4), E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_DS5), E__NOTE(_CS5), \ E__NOTE(_DS5), E__NOTE(_CS5), E__NOTE(_C5), E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_GS5), E__NOTE(_GS4), E__NOTE(_A4), \ @@ -740,45 +285,11 @@ E__NOTE(_B5), E__NOTE(_AS5), E__NOTE(_GS5), E__NOTE(_REST), E__NOTE(_E6), E__NOTE(_DS6), E__NOTE(_CS6), E__NOTE(_B5), \ E__NOTE(_AS5), E__NOTE(_GS5), E__NOTE(_REST), E__NOTE(_AS5), WD_NOTE(_GS5), -#define TERRAS_THEME \ - Q__NOTE(_GS5), Q__NOTE(_AS5), Q__NOTE(_B5), Q__NOTE(_EF6), BD_NOTE(_B5), Q__NOTE(_AS5), Q__NOTE(_GS5), W__NOTE(_AS5), \ - BD_NOTE(_DS5), Q__NOTE(_AF5), Q__NOTE(_BF5), Q__NOTE(_B5), Q__NOTE(_DS6), BD_NOTE(_B5), \ - Q__NOTE(_BF5), Q__NOTE(_AF5), W__NOTE(_AS5), BD_NOTE(_DS6), Q__NOTE(_B5), Q__NOTE(_CS6), Q__NOTE(_DS6), \ - Q__NOTE(_FS6), BD_NOTE(_DS6), Q__NOTE(_CS6), Q__NOTE(_B5), W__NOTE(_CS6), BD_NOTE(_FS5), \ - Q__NOTE(_B5), Q__NOTE(_AS5), BD_NOTE(_GS5), Q__NOTE(_B5), Q__NOTE(_AS5), BD_NOTE(_GS5), - -#define RENAI_CIRCULATION \ - Q__NOTE(_E6), Q__NOTE(_B5), HD_NOTE(_CS6), HD_NOTE(_CS6), H__NOTE(_B5), HD_NOTE(_E6), HD_NOTE(_E6), Q__NOTE(_E6), Q__NOTE(_B5), \ - HD_NOTE(_CS6), HD_NOTE(_CS6), H__NOTE(_B5), HD_NOTE(_E6), HD_NOTE(_GS6), Q__NOTE(_E6), Q__NOTE(_B5), HD_NOTE(_CS6), \ - H__NOTE(_CS6), Q__NOTE(_CS6), H__NOTE(_B5), HD_NOTE(_E6), H__NOTE(_E6), Q__NOTE(_E6), H__NOTE(_FS6), HD_NOTE(_E6), \ - H__NOTE(_E6), Q__NOTE(_E6), H__NOTE(_CS6), WD_NOTE(_GS6), HD_NOTE(_E6), H__NOTE(_E6), Q__NOTE(_FS6), H__NOTE(_G6), \ - HD_NOTE(_GS6), HD_NOTE(_E6), Q__NOTE(_B5), Q__NOTE(_CS6), HD_NOTE(_E6), H__NOTE(_E6), Q__NOTE(_FS6), H__NOTE(_G6), \ - HD_NOTE(_GS6), HD_NOTE(_E6), H__NOTE(_CS6), H__NOTE(_E6), Q__NOTE(_CS6), HD_NOTE(_E6), H__NOTE(_CS6), H__NOTE(_E6), \ - Q__NOTE(_CS6), HD_NOTE(_E6), H__NOTE(_E6), Q__NOTE(_A6), H__NOTE(_GS6), HD_NOTE(_E6), H__NOTE(_FS6), WD_NOTE(_E6), \ - H__NOTE(_GS6), H__NOTE(_A6), H__NOTE(_GS6), H__NOTE(_A6), W__NOTE(_B6), H__NOTE(_GS6), H__NOTE(_A6), H__NOTE(_GS6), \ - H__NOTE(_A6), W__NOTE(_B6), H__NOTE(_B6), H__NOTE(_A6), H__NOTE(_GS6), H__NOTE(_A6), Q__NOTE(_GS6), H__NOTE(_E6), \ - H__NOTE(_E6), Q__NOTE(_E6), H__NOTE(_CS6), Q__NOTE(_GS6), H__NOTE(_E6), H__NOTE(_E6), Q__NOTE(_E6), H__NOTE(_CS6), \ - Q__NOTE(_E6), H__NOTE(_E6), H__NOTE(_E6), Q__NOTE(_E6), H__NOTE(_FS6), WD_NOTE(_E6), W__NOTE(_B6), W__NOTE(_GS6), \ - W__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_E6), H__NOTE(_FS6), B__NOTE(_GS6), H__NOTE(_GS6), \ - W__NOTE(_CS7), W__NOTE(_GS6), W__NOTE(_E6), H__NOTE(_GS6), H__NOTE(_GS6), HD_NOTE(_E6), H__NOTE(_E6), Q__NOTE(_E6), \ - H__NOTE(_FS6), WD_NOTE(_E6), - -#define PLATINUM_DISCO \ - H__NOTE(_DS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_AS6), H__NOTE(_DS6), H__NOTE(_FS6), W__NOTE(_GS6), H__NOTE(_DS6), H__NOTE(_FS6), \ - H__NOTE(_GS6), H__NOTE(_AS6), H__NOTE(_CS6), H__NOTE(_FS6), WD_NOTE(_FS6), H__NOTE(_CS6), W__NOTE(_DS6), H__NOTE(_FS6), \ - H__NOTE(_AS6), W__NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_GS6), Q__NOTE(_AS6), Q__NOTE(_CS7), Q__NOTE(_GS6), Q__NOTE(_AS6), \ - Q__NOTE(_FS6), Q__NOTE(_GS6), Q__NOTE(_DS6), Q__NOTE(_FS6), Q__NOTE(_CS6), Q__NOTE(_DS6), Q__NOTE(_AS5), Q__NOTE(_CS6), \ - H__NOTE(_DS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_AS6), H__NOTE(_DS6), H__NOTE(_FS6), W__NOTE(_GS6), H__NOTE(_DS6), \ - H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_AS6), H__NOTE(_CS7), H__NOTE(_GS6), WD_NOTE(_FS6), H__NOTE(_CS6), W__NOTE(_DS6), \ - H__NOTE(_FS6), H__NOTE(_AS6), WD_NOTE(_GS6), H__NOTE(_FS6), Q__NOTE(_FS6), Q__NOTE(_GS5), Q__NOTE(_AS5), Q__NOTE(_CS6), \ - Q__NOTE(_FS6), Q__NOTE(_GS6), Q__NOTE(_AS6), Q__NOTE(_CS7), WD_NOTE(_FS7), H__NOTE(_CS6), WD_NOTE(_DS6), H__NOTE(_CS6), \ - WD_NOTE(_DS6), H__NOTE(_CS6), H__NOTE(_DS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_AS6), WD_NOTE(_GS6), H__NOTE(_FS6), \ - WD_NOTE(_GS6), H__NOTE(_FS6), WD_NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_AS6), H__NOTE(_DS6), H__NOTE(_FS6), \ - WD_NOTE(_FS6), H__NOTE(_CS6), WD_NOTE(_DS6), H__NOTE(_CS6), WD_NOTE(_DS6), H__NOTE(_CS6), H__NOTE(_DS6), H__NOTE(_FS6), \ - H__NOTE(_GS6), H__NOTE(_AS6), H__NOTE(_CS7), H__NOTE(_AS6), H__NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_DS6), W__NOTE(_FS6), \ - H__NOTE(_CS6), H__NOTE(_DS6), W__NOTE(_FS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_FS6), \ - B__NOTE(_FS6), +/* Title: Nocturne Op. 9 No. 1 in B flat minor + * Author/Composer: Chopin + License: Public Domain +*/ #define NOCTURNE_OP_9_NO_1 \ H__NOTE(_BF5), H__NOTE(_C6), H__NOTE(_DF6), H__NOTE(_A5), H__NOTE(_BF5), H__NOTE(_GF5), W__NOTE(_F5), W__NOTE(_F5), W__NOTE(_F5), \ W__NOTE(_F5), H__NOTE(_GF5), H__NOTE(_F5), H__NOTE(_EF5), H__NOTE(_C5), B__NOTE(_DF5), W__NOTE(_BF4), Q__NOTE(_BF5), \ @@ -791,4 +302,50 @@ H__NOTE(_DF5), H__NOTE(_A4), B__NOTE(_AF4), W__NOTE(_DF5), W__NOTE(_EF5), H__NOTE(_F5), H__NOTE(_EF5), H__NOTE(_DF5), \ H__NOTE(_EF5), BD_NOTE(_F5), -#endif + +/* Removed sounds + + This list is here solely for compatibility, so that removed songs don't just break things + * If you think that any of these songs were wrongfully removed, let us know and provide + * proof of permission to use them, or public domain status. + */ + +#define CLOSE_ENCOUNTERS_5_NOTE +#define DOE_A_DEER +#define IN_LIKE_FLINT +#define IMPERIAL_MARCH +#define BASKET_CASE +#define COIN_SOUND +#define ONE_UP_SOUND +#define SONIC_RING +#define ZELDA_PUZZLE +#define ZELDA_TREASURE +#define OVERWATCH_THEME +#define MARIO_THEME +#define MARIO_GAMEOVER +#define MARIO_MUSHROOM +#define E1M1_DOOM +#define DISNEY_SONG +#define NUMBER_ONE +#define CABBAGE_SONG +#define OLD_SPICE +#define VICTORY_FANFARE_SHORT +#define ALL_STAR +#define RICK_ROLL +#define FF_PRELUDE +#define TO_BOLDLY_GO +#define KATAWARE_DOKI +#define MEGALOVANIA +#define MICHISHIRUBE +#define LIEBESLEID +#define MELODIES_OF_LIFE +#define EYES_ON_ME +#define SONG_OF_THE_ANCIENTS +#define NIER_AMUSEMENT_PARK +#define COPIED_CITY +#define VAGUE_HOPE_COLD_RAIN +#define KAINE_SALVATION +#define WEIGHT_OF_THE_WORLD +#define ISABELLAS_LULLABY +#define TERRAS_THEME +#define RENAI_CIRCULATION +#define PLATINUM_DISCO From 872480dde2ba4713a96404d1a0a55db71a9d1b9b Mon Sep 17 00:00:00 2001 From: omkbd Date: Fri, 7 Jun 2019 04:50:00 +0900 Subject: [PATCH 191/341] [Keyboard] add runner3680 keyboards (#6069) * add runner3680 * Remove unnecessary code --- keyboards/runner3680/3x6/3x6.c | 1 + keyboards/runner3680/3x6/3x6.h | 19 ++++ keyboards/runner3680/3x6/config.h | 67 +++++++++++++ .../runner3680/3x6/keymaps/default/config.h | 9 ++ .../runner3680/3x6/keymaps/default/keymap.c | 86 ++++++++++++++++ .../runner3680/3x6/keymaps/default/rules.mk | 1 + keyboards/runner3680/3x6/rules.mk | 0 keyboards/runner3680/3x7/3x7.c | 1 + keyboards/runner3680/3x7/3x7.h | 19 ++++ keyboards/runner3680/3x7/config.h | 67 +++++++++++++ .../runner3680/3x7/keymaps/default/config.h | 9 ++ .../runner3680/3x7/keymaps/default/keymap.c | 86 ++++++++++++++++ .../runner3680/3x7/keymaps/default/rules.mk | 1 + keyboards/runner3680/3x7/rules.mk | 0 keyboards/runner3680/3x8/3x8.c | 1 + keyboards/runner3680/3x8/3x8.h | 19 ++++ keyboards/runner3680/3x8/config.h | 67 +++++++++++++ .../runner3680/3x8/keymaps/default/config.h | 9 ++ .../runner3680/3x8/keymaps/default/keymap.c | 88 +++++++++++++++++ .../runner3680/3x8/keymaps/default/rules.mk | 1 + keyboards/runner3680/3x8/rules.mk | 0 keyboards/runner3680/4x6/4x6.c | 1 + keyboards/runner3680/4x6/4x6.h | 22 +++++ keyboards/runner3680/4x6/config.h | 67 +++++++++++++ .../runner3680/4x6/keymaps/default/config.h | 9 ++ .../runner3680/4x6/keymaps/default/keymap.c | 92 +++++++++++++++++ .../runner3680/4x6/keymaps/default/rules.mk | 1 + keyboards/runner3680/4x6/rules.mk | 0 keyboards/runner3680/4x7/4x7.c | 1 + keyboards/runner3680/4x7/4x7.h | 22 +++++ keyboards/runner3680/4x7/config.h | 67 +++++++++++++ .../runner3680/4x7/keymaps/default/config.h | 9 ++ .../runner3680/4x7/keymaps/default/keymap.c | 92 +++++++++++++++++ .../runner3680/4x7/keymaps/default/rules.mk | 1 + keyboards/runner3680/4x7/rules.mk | 0 keyboards/runner3680/4x8/4x8.c | 1 + keyboards/runner3680/4x8/4x8.h | 22 +++++ keyboards/runner3680/4x8/config.h | 67 +++++++++++++ .../runner3680/4x8/keymaps/default/config.h | 9 ++ .../runner3680/4x8/keymaps/default/keymap.c | 92 +++++++++++++++++ .../runner3680/4x8/keymaps/default/rules.mk | 1 + keyboards/runner3680/4x8/rules.mk | 0 keyboards/runner3680/5x6/5x6.c | 1 + keyboards/runner3680/5x6/5x6.h | 25 +++++ keyboards/runner3680/5x6/config.h | 67 +++++++++++++ .../runner3680/5x6/keymaps/default/config.h | 9 ++ .../runner3680/5x6/keymaps/default/keymap.c | 98 ++++++++++++++++++ .../runner3680/5x6/keymaps/default/rules.mk | 1 + keyboards/runner3680/5x6/rules.mk | 0 keyboards/runner3680/5x7/5x7.c | 1 + keyboards/runner3680/5x7/5x7.h | 25 +++++ keyboards/runner3680/5x7/config.h | 67 +++++++++++++ .../runner3680/5x7/keymaps/default/config.h | 9 ++ .../runner3680/5x7/keymaps/default/keymap.c | 98 ++++++++++++++++++ .../runner3680/5x7/keymaps/default/rules.mk | 1 + keyboards/runner3680/5x7/rules.mk | 0 keyboards/runner3680/5x8/5x8.c | 1 + keyboards/runner3680/5x8/5x8.h | 25 +++++ keyboards/runner3680/5x8/config.h | 67 +++++++++++++ keyboards/runner3680/5x8/keymaps/JIS/config.h | 9 ++ keyboards/runner3680/5x8/keymaps/JIS/keymap.c | 99 +++++++++++++++++++ keyboards/runner3680/5x8/keymaps/JIS/rules.mk | 1 + .../runner3680/5x8/keymaps/default/config.h | 9 ++ .../runner3680/5x8/keymaps/default/keymap.c | 98 ++++++++++++++++++ .../runner3680/5x8/keymaps/default/rules.mk | 1 + keyboards/runner3680/5x8/rules.mk | 0 keyboards/runner3680/config.h | 3 + keyboards/runner3680/readme.md | 15 +++ keyboards/runner3680/rules.mk | 60 +++++++++++ keyboards/runner3680/runner3680.c | 1 + keyboards/runner3680/runner3680.h | 39 ++++++++ 71 files changed, 1957 insertions(+) create mode 100644 keyboards/runner3680/3x6/3x6.c create mode 100644 keyboards/runner3680/3x6/3x6.h create mode 100644 keyboards/runner3680/3x6/config.h create mode 100644 keyboards/runner3680/3x6/keymaps/default/config.h create mode 100644 keyboards/runner3680/3x6/keymaps/default/keymap.c create mode 100644 keyboards/runner3680/3x6/keymaps/default/rules.mk create mode 100644 keyboards/runner3680/3x6/rules.mk create mode 100644 keyboards/runner3680/3x7/3x7.c create mode 100644 keyboards/runner3680/3x7/3x7.h create mode 100644 keyboards/runner3680/3x7/config.h create mode 100644 keyboards/runner3680/3x7/keymaps/default/config.h create mode 100644 keyboards/runner3680/3x7/keymaps/default/keymap.c create mode 100644 keyboards/runner3680/3x7/keymaps/default/rules.mk create mode 100644 keyboards/runner3680/3x7/rules.mk create mode 100644 keyboards/runner3680/3x8/3x8.c create mode 100644 keyboards/runner3680/3x8/3x8.h create mode 100644 keyboards/runner3680/3x8/config.h create mode 100644 keyboards/runner3680/3x8/keymaps/default/config.h create mode 100644 keyboards/runner3680/3x8/keymaps/default/keymap.c create mode 100644 keyboards/runner3680/3x8/keymaps/default/rules.mk create mode 100644 keyboards/runner3680/3x8/rules.mk create mode 100644 keyboards/runner3680/4x6/4x6.c create mode 100644 keyboards/runner3680/4x6/4x6.h create mode 100644 keyboards/runner3680/4x6/config.h create mode 100644 keyboards/runner3680/4x6/keymaps/default/config.h create mode 100644 keyboards/runner3680/4x6/keymaps/default/keymap.c create mode 100644 keyboards/runner3680/4x6/keymaps/default/rules.mk create mode 100644 keyboards/runner3680/4x6/rules.mk create mode 100644 keyboards/runner3680/4x7/4x7.c create mode 100644 keyboards/runner3680/4x7/4x7.h create mode 100644 keyboards/runner3680/4x7/config.h create mode 100644 keyboards/runner3680/4x7/keymaps/default/config.h create mode 100644 keyboards/runner3680/4x7/keymaps/default/keymap.c create mode 100644 keyboards/runner3680/4x7/keymaps/default/rules.mk create mode 100644 keyboards/runner3680/4x7/rules.mk create mode 100644 keyboards/runner3680/4x8/4x8.c create mode 100644 keyboards/runner3680/4x8/4x8.h create mode 100644 keyboards/runner3680/4x8/config.h create mode 100644 keyboards/runner3680/4x8/keymaps/default/config.h create mode 100644 keyboards/runner3680/4x8/keymaps/default/keymap.c create mode 100644 keyboards/runner3680/4x8/keymaps/default/rules.mk create mode 100644 keyboards/runner3680/4x8/rules.mk create mode 100644 keyboards/runner3680/5x6/5x6.c create mode 100644 keyboards/runner3680/5x6/5x6.h create mode 100644 keyboards/runner3680/5x6/config.h create mode 100644 keyboards/runner3680/5x6/keymaps/default/config.h create mode 100644 keyboards/runner3680/5x6/keymaps/default/keymap.c create mode 100644 keyboards/runner3680/5x6/keymaps/default/rules.mk create mode 100644 keyboards/runner3680/5x6/rules.mk create mode 100644 keyboards/runner3680/5x7/5x7.c create mode 100644 keyboards/runner3680/5x7/5x7.h create mode 100644 keyboards/runner3680/5x7/config.h create mode 100644 keyboards/runner3680/5x7/keymaps/default/config.h create mode 100644 keyboards/runner3680/5x7/keymaps/default/keymap.c create mode 100644 keyboards/runner3680/5x7/keymaps/default/rules.mk create mode 100644 keyboards/runner3680/5x7/rules.mk create mode 100644 keyboards/runner3680/5x8/5x8.c create mode 100644 keyboards/runner3680/5x8/5x8.h create mode 100644 keyboards/runner3680/5x8/config.h create mode 100644 keyboards/runner3680/5x8/keymaps/JIS/config.h create mode 100644 keyboards/runner3680/5x8/keymaps/JIS/keymap.c create mode 100644 keyboards/runner3680/5x8/keymaps/JIS/rules.mk create mode 100644 keyboards/runner3680/5x8/keymaps/default/config.h create mode 100644 keyboards/runner3680/5x8/keymaps/default/keymap.c create mode 100644 keyboards/runner3680/5x8/keymaps/default/rules.mk create mode 100644 keyboards/runner3680/5x8/rules.mk create mode 100644 keyboards/runner3680/config.h create mode 100644 keyboards/runner3680/readme.md create mode 100644 keyboards/runner3680/rules.mk create mode 100644 keyboards/runner3680/runner3680.c create mode 100644 keyboards/runner3680/runner3680.h diff --git a/keyboards/runner3680/3x6/3x6.c b/keyboards/runner3680/3x6/3x6.c new file mode 100644 index 000000000..1f375c3ec --- /dev/null +++ b/keyboards/runner3680/3x6/3x6.c @@ -0,0 +1 @@ +#include "3x6.h" diff --git a/keyboards/runner3680/3x6/3x6.h b/keyboards/runner3680/3x6/3x6.h new file mode 100644 index 000000000..c197c6de2 --- /dev/null +++ b/keyboards/runner3680/3x6/3x6.h @@ -0,0 +1,19 @@ +#pragma once + +#include "runner3680.h" + +#include "quantum.h" + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 } \ + } diff --git a/keyboards/runner3680/3x6/config.h b/keyboards/runner3680/3x6/config.h new file mode 100644 index 000000000..0af32f26a --- /dev/null +++ b/keyboards/runner3680/3x6/config.h @@ -0,0 +1,67 @@ +/* Copyright 2019 omkbd + * + * 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 . + */ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0005 +#define MANUFACTURER Omkbd +#define PRODUCT runner3680 +#define DESCRIPTION A split keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, C6, D7 } +#define MATRIX_COL_PINS { F6, F7, B1, B3, B2 ,B6 } +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6} //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* define tapping term */ +#define TAPPING_TERM 120 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 70 +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT { 35, 35 } // Number of LEDs + +#define SOFT_SERIAL_PIN D2 +#define SELECT_SOFT_SERIAL_SPEED 1 +/*Sets the protocol speed when using serial communication*/ +//Speeds: +//0: about 189kbps (Experimental only) +//1: about 137kbps (default) +//2: about 75kbps +//3: about 39kbps +//4: about 26kbps +//5: about 20kbps diff --git a/keyboards/runner3680/3x6/keymaps/default/config.h b/keyboards/runner3680/3x6/keymaps/default/config.h new file mode 100644 index 000000000..43a82f38a --- /dev/null +++ b/keyboards/runner3680/3x6/keymaps/default/config.h @@ -0,0 +1,9 @@ +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/runner3680/3x6/keymaps/default/keymap.c b/keyboards/runner3680/3x6/keymaps/default/keymap.c new file mode 100644 index 000000000..9ccb2ad23 --- /dev/null +++ b/keyboards/runner3680/3x6/keymaps/default/keymap.c @@ -0,0 +1,86 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +rgblight_config_t RGB_current_config; +#endif + +enum layer_number { + _QWERTY = 0, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + ADJUST, + RGBRST +}; + +// Fillers to make layering more clear +#define EISU LALT(KC_GRV) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* QWERTY + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | [ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | A | S | D | F | G | | H | J | K | L | ; | " | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / | \ | + * `-----------------------------------------' `-----------------------------------------' + */ + [_QWERTY] = LAYOUT( + 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_ESC, 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_BSLS + ), + + /* Adjust + * ,-----------------------------------------. ,-----------------------------------------. + * | |RGBRST| RESET| | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | TOG | HUI | SAI | VAI | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | MOD | HUD | SAD | VAD | | | | | | | | | + * `-----------------------------------------' `-----------------------------------------' + */ + [_ADJUST] = LAYOUT( + _______, RGBRST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + break; + + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_config = rgblight_config; + } + #endif + break; + } + return true; +} diff --git a/keyboards/runner3680/3x6/keymaps/default/rules.mk b/keyboards/runner3680/3x6/keymaps/default/rules.mk new file mode 100644 index 000000000..9104ce244 --- /dev/null +++ b/keyboards/runner3680/3x6/keymaps/default/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/3x6/rules.mk b/keyboards/runner3680/3x6/rules.mk new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/runner3680/3x7/3x7.c b/keyboards/runner3680/3x7/3x7.c new file mode 100644 index 000000000..5246953b5 --- /dev/null +++ b/keyboards/runner3680/3x7/3x7.c @@ -0,0 +1 @@ +#include "3x7.h" diff --git a/keyboards/runner3680/3x7/3x7.h b/keyboards/runner3680/3x7/3x7.h new file mode 100644 index 000000000..2e07bc3b3 --- /dev/null +++ b/keyboards/runner3680/3x7/3x7.h @@ -0,0 +1,19 @@ +#pragma once + +#include "runner3680.h" + +#include "quantum.h" + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 } \ + } diff --git a/keyboards/runner3680/3x7/config.h b/keyboards/runner3680/3x7/config.h new file mode 100644 index 000000000..4c864f1d0 --- /dev/null +++ b/keyboards/runner3680/3x7/config.h @@ -0,0 +1,67 @@ +/* Copyright 2019 omkbd + * + * 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 . + */ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0005 +#define MANUFACTURER Omkbd +#define PRODUCT runner3680 +#define DESCRIPTION A split keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, C6, D7 } +#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2 ,B6 } +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5 } //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* define tapping term */ +#define TAPPING_TERM 120 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 70 +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT { 35, 35 } // Number of LEDs + +#define SOFT_SERIAL_PIN D2 +#define SELECT_SOFT_SERIAL_SPEED 1 +/*Sets the protocol speed when using serial communication*/ +//Speeds: +//0: about 189kbps (Experimental only) +//1: about 137kbps (default) +//2: about 75kbps +//3: about 39kbps +//4: about 26kbps +//5: about 20kbps diff --git a/keyboards/runner3680/3x7/keymaps/default/config.h b/keyboards/runner3680/3x7/keymaps/default/config.h new file mode 100644 index 000000000..43a82f38a --- /dev/null +++ b/keyboards/runner3680/3x7/keymaps/default/config.h @@ -0,0 +1,9 @@ +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/runner3680/3x7/keymaps/default/keymap.c b/keyboards/runner3680/3x7/keymaps/default/keymap.c new file mode 100644 index 000000000..e5de1efd0 --- /dev/null +++ b/keyboards/runner3680/3x7/keymaps/default/keymap.c @@ -0,0 +1,86 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +rgblight_config_t RGB_current_config; +#endif + +enum layer_number { + _QWERTY = 0, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + ADJUST, + RGBRST +}; + +// Fillers to make layering more clear +#define EISU LALT(KC_GRV) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* QWERTY + * ,------------------------------------------------. ,------------------------------------------------. + * | F4 | Tab | Q | W | E | R | T | | Y | U | I | O | P | [ | ] | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | F6 | Esc | A | S | D | F | G | | H | J | K | L | ; | " | Enter| + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | F8 | Shift| Z | X | C | V | B | | N | M | , | . | / | \ | Up | + * `------------------------------------------------' `------------------------------------------------' + */ + [_QWERTY] = LAYOUT( + KC_F4, 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_F6, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, KC_UP + ), + + /* Adjust + * ,------------------------------------------------. ,------------------------------------------------. + * | | |RGBRST| RESET| | | | | | | | | | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | TOG | HUI | SAI | VAI | | | | | | | | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | MOD | HUD | SAD | VAD | | | | | | | | | | + * `------------------------------------------------' `------------------------------------------------' + */ + [_ADJUST] = LAYOUT( + _______, _______, RGBRST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + break; + + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_config = rgblight_config; + } + #endif + break; + } + return true; +} diff --git a/keyboards/runner3680/3x7/keymaps/default/rules.mk b/keyboards/runner3680/3x7/keymaps/default/rules.mk new file mode 100644 index 000000000..9104ce244 --- /dev/null +++ b/keyboards/runner3680/3x7/keymaps/default/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/3x7/rules.mk b/keyboards/runner3680/3x7/rules.mk new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/runner3680/3x8/3x8.c b/keyboards/runner3680/3x8/3x8.c new file mode 100644 index 000000000..8ea77001c --- /dev/null +++ b/keyboards/runner3680/3x8/3x8.c @@ -0,0 +1 @@ +#include "3x8.h" diff --git a/keyboards/runner3680/3x8/3x8.h b/keyboards/runner3680/3x8/3x8.h new file mode 100644 index 000000000..c5856d003 --- /dev/null +++ b/keyboards/runner3680/3x8/3x8.h @@ -0,0 +1,19 @@ +#pragma once + +#include "runner3680.h" + +#include "quantum.h" + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, L07, R00, R01, R02, R03, R04, R05, R06, R07, \ + L10, L11, L12, L13, L14, L15, L16, L17, R10, R11, R12, R13, R14, R15, R16, R17, \ + L20, L21, L22, L23, L24, L25, L26, L27, R20, R21, R22, R23, R24, R25, R26, R27 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06, L07 }, \ + { L10, L11, L12, L13, L14, L15, L16, L17 }, \ + { L20, L21, L22, L23, L24, L25, L26, L27 }, \ + { R07, R06, R05, R04, R03, R02, R01, R00 }, \ + { R17, R16, R15, R14, R13, R12, R11, R10 }, \ + { R27, R26, R25, R24, R23, R22, R21, R20 } \ + } diff --git a/keyboards/runner3680/3x8/config.h b/keyboards/runner3680/3x8/config.h new file mode 100644 index 000000000..696b7f905 --- /dev/null +++ b/keyboards/runner3680/3x8/config.h @@ -0,0 +1,67 @@ +/* Copyright 2019 omkbd + * + * 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 . + */ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0005 +#define MANUFACTURER Omkbd +#define PRODUCT runner3680 +#define DESCRIPTION A split keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, C6, D7 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 ,B6 } +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* define tapping term */ +#define TAPPING_TERM 120 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 80 +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT { 40, 40 } // Number of LEDs + +#define SOFT_SERIAL_PIN D2 +#define SELECT_SOFT_SERIAL_SPEED 1 +/*Sets the protocol speed when using serial communication*/ +//Speeds: +//0: about 189kbps (Experimental only) +//1: about 137kbps (default) +//2: about 75kbps +//3: about 39kbps +//4: about 26kbps +//5: about 20kbps diff --git a/keyboards/runner3680/3x8/keymaps/default/config.h b/keyboards/runner3680/3x8/keymaps/default/config.h new file mode 100644 index 000000000..43a82f38a --- /dev/null +++ b/keyboards/runner3680/3x8/keymaps/default/config.h @@ -0,0 +1,9 @@ +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/runner3680/3x8/keymaps/default/keymap.c b/keyboards/runner3680/3x8/keymaps/default/keymap.c new file mode 100644 index 000000000..cad7e859a --- /dev/null +++ b/keyboards/runner3680/3x8/keymaps/default/keymap.c @@ -0,0 +1,88 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +rgblight_config_t RGB_current_config; +#endif + +enum layer_number { + _QWERTY = 0, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + ADJUST, + RGBRST +}; + +// Fillers to make layering more clear +#define EISU LALT(KC_GRV) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* QWERTY + * ,-------------------------------------------------------. ,--------------------------------------------------------. + * | F3 | F4 | Tab | Q | W | E | R | T | | Y | U | I | O | P | [ | ] | Bksp | + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | F5 | F6 | Esc | A | S | D | F | G | | H | J | K | L | ; | " | Enter| Enter| + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | F7 | F8 | Shift| Z | X | C | V | B | | N | M | , | . | / | \ | Up | Shift| + * `-------------------------------------------------------' `-------------------------------------------------------' + */ + [_QWERTY] = LAYOUT( + KC_F3, KC_F4, 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_BSPC, + KC_F5, KC_F6, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, + KC_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, KC_UP, KC_RSFT + ), + + /* Adjust + * ,-------------------------------------------------------. ,--------------------------------------------------------. + * | | | |RGBRST| RESET| | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | | | | TOG | HUI | SAI | VAI | | | | | | | | | | | + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | | | | MOD | HUD | SAD | VAD | | | | | | | | | | | + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | | | + * `-------------------------------------------------------' `-------------------------------------------------------' + */ + [_ADJUST] = LAYOUT( + _______, _______, _______, RGBRST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + break; + + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_config = rgblight_config; + } + #endif + break; + } + return true; +} diff --git a/keyboards/runner3680/3x8/keymaps/default/rules.mk b/keyboards/runner3680/3x8/keymaps/default/rules.mk new file mode 100644 index 000000000..9104ce244 --- /dev/null +++ b/keyboards/runner3680/3x8/keymaps/default/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/3x8/rules.mk b/keyboards/runner3680/3x8/rules.mk new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/runner3680/4x6/4x6.c b/keyboards/runner3680/4x6/4x6.c new file mode 100644 index 000000000..5e68c1a9f --- /dev/null +++ b/keyboards/runner3680/4x6/4x6.c @@ -0,0 +1 @@ +#include "4x6.h" diff --git a/keyboards/runner3680/4x6/4x6.h b/keyboards/runner3680/4x6/4x6.h new file mode 100644 index 000000000..dfc3a977b --- /dev/null +++ b/keyboards/runner3680/4x6/4x6.h @@ -0,0 +1,22 @@ +#pragma once + +#include "runner3680.h" + +#include "quantum.h" + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30 } \ + } diff --git a/keyboards/runner3680/4x6/config.h b/keyboards/runner3680/4x6/config.h new file mode 100644 index 000000000..1e3af6b52 --- /dev/null +++ b/keyboards/runner3680/4x6/config.h @@ -0,0 +1,67 @@ +/* Copyright 2019 omkbd + * + * 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 . + */ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0005 +#define MANUFACTURER Omkbd +#define PRODUCT runner3680 +#define DESCRIPTION A split keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, C6, D7, E6 } +#define MATRIX_COL_PINS { F6, F7, B1, B3, B2 ,B6 } +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6} //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* define tapping term */ +#define TAPPING_TERM 120 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 70 +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT { 35, 35 } // Number of LEDs + +#define SOFT_SERIAL_PIN D2 +#define SELECT_SOFT_SERIAL_SPEED 1 +/*Sets the protocol speed when using serial communication*/ +//Speeds: +//0: about 189kbps (Experimental only) +//1: about 137kbps (default) +//2: about 75kbps +//3: about 39kbps +//4: about 26kbps +//5: about 20kbps diff --git a/keyboards/runner3680/4x6/keymaps/default/config.h b/keyboards/runner3680/4x6/keymaps/default/config.h new file mode 100644 index 000000000..43a82f38a --- /dev/null +++ b/keyboards/runner3680/4x6/keymaps/default/config.h @@ -0,0 +1,9 @@ +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/runner3680/4x6/keymaps/default/keymap.c b/keyboards/runner3680/4x6/keymaps/default/keymap.c new file mode 100644 index 000000000..9af15c703 --- /dev/null +++ b/keyboards/runner3680/4x6/keymaps/default/keymap.c @@ -0,0 +1,92 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +rgblight_config_t RGB_current_config; +#endif + +enum layer_number { + _QWERTY = 0, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + ADJUST, + RGBRST +}; + +// Fillers to make layering more clear +#define EISU LALT(KC_GRV) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* QWERTY + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | [ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | A | S | D | F | G | | H | J | K | L | ; | " | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | GUI | Alt | EISU | Del | Space| | Enter| Bksp | EISU | ESC |Adjust| Left | + * `-----------------------------------------' `-----------------------------------------' + */ + [_QWERTY] = LAYOUT( + 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_ESC, 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_BSLS, + KC_LCTL, KC_LGUI, KC_LALT, EISU, KC_DEL, KC_SPC, KC_ENT, KC_BSPC, EISU, KC_ESC, ADJUST, KC_LEFT + ), + + /* Adjust + * ,-----------------------------------------. ,-----------------------------------------. + * | |RGBRST| RESET| | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | TOG | HUI | SAI | VAI | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | MOD | HUD | SAD | VAD | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * `-----------------------------------------' `-----------------------------------------' + */ + [_ADJUST] = LAYOUT( + _______, RGBRST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + break; + + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_config = rgblight_config; + } + #endif + break; + } + return true; +} diff --git a/keyboards/runner3680/4x6/keymaps/default/rules.mk b/keyboards/runner3680/4x6/keymaps/default/rules.mk new file mode 100644 index 000000000..9104ce244 --- /dev/null +++ b/keyboards/runner3680/4x6/keymaps/default/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/4x6/rules.mk b/keyboards/runner3680/4x6/rules.mk new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/runner3680/4x7/4x7.c b/keyboards/runner3680/4x7/4x7.c new file mode 100644 index 000000000..568fc2dac --- /dev/null +++ b/keyboards/runner3680/4x7/4x7.c @@ -0,0 +1 @@ +#include "4x7.h" diff --git a/keyboards/runner3680/4x7/4x7.h b/keyboards/runner3680/4x7/4x7.h new file mode 100644 index 000000000..7bd43e111 --- /dev/null +++ b/keyboards/runner3680/4x7/4x7.h @@ -0,0 +1,22 @@ +#pragma once + +#include "runner3680.h" + +#include "quantum.h" + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, R35, R34, R33, R32, R31, R30 } \ + } diff --git a/keyboards/runner3680/4x7/config.h b/keyboards/runner3680/4x7/config.h new file mode 100644 index 000000000..c9a744d07 --- /dev/null +++ b/keyboards/runner3680/4x7/config.h @@ -0,0 +1,67 @@ +/* Copyright 2019 omkbd + * + * 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 . + */ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0005 +#define MANUFACTURER Omkbd +#define PRODUCT runner3680 +#define DESCRIPTION A split keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, C6, D7, E6 } +#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2 ,B6 } +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5 } //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* define tapping term */ +#define TAPPING_TERM 120 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 70 +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT { 35, 35 } // Number of LEDs + +#define SOFT_SERIAL_PIN D2 +#define SELECT_SOFT_SERIAL_SPEED 1 +/*Sets the protocol speed when using serial communication*/ +//Speeds: +//0: about 189kbps (Experimental only) +//1: about 137kbps (default) +//2: about 75kbps +//3: about 39kbps +//4: about 26kbps +//5: about 20kbps diff --git a/keyboards/runner3680/4x7/keymaps/default/config.h b/keyboards/runner3680/4x7/keymaps/default/config.h new file mode 100644 index 000000000..43a82f38a --- /dev/null +++ b/keyboards/runner3680/4x7/keymaps/default/config.h @@ -0,0 +1,9 @@ +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/runner3680/4x7/keymaps/default/keymap.c b/keyboards/runner3680/4x7/keymaps/default/keymap.c new file mode 100644 index 000000000..091d44d81 --- /dev/null +++ b/keyboards/runner3680/4x7/keymaps/default/keymap.c @@ -0,0 +1,92 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +rgblight_config_t RGB_current_config; +#endif + +enum layer_number { + _QWERTY = 0, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + ADJUST, + RGBRST +}; + +// Fillers to make layering more clear +#define EISU LALT(KC_GRV) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* QWERTY + * ,------------------------------------------------. ,------------------------------------------------. + * | F4 | Tab | Q | W | E | R | T | | Y | U | I | O | P | [ | ] | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | F6 | Esc | A | S | D | F | G | | H | J | K | L | ; | " | Enter| + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | F8 | Shift| Z | X | C | V | B | | N | M | , | . | / | \ | Up | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | F10 | Ctrl | GUI | Alt | EISU | Del | Space| | Enter| Bksp | EISU | ESC |Adjust| Left | Down | + * `------------------------------------------------' `------------------------------------------------' + */ + [_QWERTY] = LAYOUT( + KC_F4, 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_F6, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, KC_UP, + KC_F10, KC_LCTL, KC_LGUI, KC_LALT, EISU, KC_DEL, KC_SPC, KC_ENT, KC_BSPC, EISU, KC_ESC, ADJUST, KC_LEFT, KC_DOWN + ), + + /* Adjust + * ,------------------------------------------------. ,------------------------------------------------. + * | | |RGBRST| RESET| | | | | | | | | | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | TOG | HUI | SAI | VAI | | | | | | | | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | MOD | HUD | SAD | VAD | | | | | | | | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * `------------------------------------------------' `------------------------------------------------' + */ + [_ADJUST] = LAYOUT( + _______, _______, RGBRST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + break; + + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_config = rgblight_config; + } + #endif + break; + } + return true; +} diff --git a/keyboards/runner3680/4x7/keymaps/default/rules.mk b/keyboards/runner3680/4x7/keymaps/default/rules.mk new file mode 100644 index 000000000..9104ce244 --- /dev/null +++ b/keyboards/runner3680/4x7/keymaps/default/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/4x7/rules.mk b/keyboards/runner3680/4x7/rules.mk new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/runner3680/4x8/4x8.c b/keyboards/runner3680/4x8/4x8.c new file mode 100644 index 000000000..266754807 --- /dev/null +++ b/keyboards/runner3680/4x8/4x8.c @@ -0,0 +1 @@ +#include "4x8.h" diff --git a/keyboards/runner3680/4x8/4x8.h b/keyboards/runner3680/4x8/4x8.h new file mode 100644 index 000000000..bc95b439b --- /dev/null +++ b/keyboards/runner3680/4x8/4x8.h @@ -0,0 +1,22 @@ +#pragma once + +#include "runner3680.h" + +#include "quantum.h" + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, L07, R00, R01, R02, R03, R04, R05, R06, R07, \ + L10, L11, L12, L13, L14, L15, L16, L17, R10, R11, R12, R13, R14, R15, R16, R17, \ + L20, L21, L22, L23, L24, L25, L26, L27, R20, R21, R22, R23, R24, R25, R26, R27, \ + L30, L31, L32, L33, L34, L35, L36, L37, R30, R31, R32, R33, R34, R35, R36, R37 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06, L07 }, \ + { L10, L11, L12, L13, L14, L15, L16, L17 }, \ + { L20, L21, L22, L23, L24, L25, L26, L27 }, \ + { L30, L31, L32, L33, L34, L35, L36, L37 }, \ + { R07, R06, R05, R04, R03, R02, R01, R00 }, \ + { R17, R16, R15, R14, R13, R12, R11, R10 }, \ + { R27, R26, R25, R24, R23, R22, R21, R20 }, \ + { R37, R36, R35, R34, R33, R32, R31, R30 } \ + } diff --git a/keyboards/runner3680/4x8/config.h b/keyboards/runner3680/4x8/config.h new file mode 100644 index 000000000..55626b6bc --- /dev/null +++ b/keyboards/runner3680/4x8/config.h @@ -0,0 +1,67 @@ +/* Copyright 2019 omkbd + * + * 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 . + */ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0005 +#define MANUFACTURER Omkbd +#define PRODUCT runner3680 +#define DESCRIPTION A split keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, C6, D7, E6 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 ,B6 } +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* define tapping term */ +#define TAPPING_TERM 120 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 80 +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT { 40, 40 } // Number of LEDs + +#define SOFT_SERIAL_PIN D2 +#define SELECT_SOFT_SERIAL_SPEED 1 +/*Sets the protocol speed when using serial communication*/ +//Speeds: +//0: about 189kbps (Experimental only) +//1: about 137kbps (default) +//2: about 75kbps +//3: about 39kbps +//4: about 26kbps +//5: about 20kbps diff --git a/keyboards/runner3680/4x8/keymaps/default/config.h b/keyboards/runner3680/4x8/keymaps/default/config.h new file mode 100644 index 000000000..43a82f38a --- /dev/null +++ b/keyboards/runner3680/4x8/keymaps/default/config.h @@ -0,0 +1,9 @@ +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/runner3680/4x8/keymaps/default/keymap.c b/keyboards/runner3680/4x8/keymaps/default/keymap.c new file mode 100644 index 000000000..9b1f9d237 --- /dev/null +++ b/keyboards/runner3680/4x8/keymaps/default/keymap.c @@ -0,0 +1,92 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +rgblight_config_t RGB_current_config; +#endif + +enum layer_number { + _QWERTY = 0, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + ADJUST, + RGBRST +}; + +// Fillers to make layering more clear +#define EISU LALT(KC_GRV) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* QWERTY + * ,-------------------------------------------------------. ,--------------------------------------------------------. + * | F3 | F4 | Tab | Q | W | E | R | T | | Y | U | I | O | P | [ | ] | Bksp | + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | F5 | F6 | Esc | A | S | D | F | G | | H | J | K | L | ; | " | Enter| Enter| + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | F7 | F8 | Shift| Z | X | C | V | B | | N | M | , | . | / | \ | Up | Shift| + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | F9 | F10 | Ctrl | GUI | Alt | EISU | Del | Space| | Enter| Bksp | EISU | ESC |Adjust| Left | Down | Right| + * `-------------------------------------------------------' `-------------------------------------------------------' + */ + [_QWERTY] = LAYOUT( + KC_F3, KC_F4, 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_BSPC, + KC_F5, KC_F6, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, + KC_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, KC_UP, KC_RSFT, + KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, EISU, KC_DEL, KC_SPC, KC_ENT, KC_BSPC, EISU, KC_ESC, ADJUST, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Adjust + * ,-------------------------------------------------------. ,--------------------------------------------------------. + * | | | |RGBRST| RESET| | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | | | | TOG | HUI | SAI | VAI | | | | | | | | | | | + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | | | | MOD | HUD | SAD | VAD | | | | | | | | | | | + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | | | + * `-------------------------------------------------------' `-------------------------------------------------------' + */ + [_ADJUST] = LAYOUT( + _______, _______, _______, RGBRST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + break; + + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_config = rgblight_config; + } + #endif + break; + } + return true; +} diff --git a/keyboards/runner3680/4x8/keymaps/default/rules.mk b/keyboards/runner3680/4x8/keymaps/default/rules.mk new file mode 100644 index 000000000..9104ce244 --- /dev/null +++ b/keyboards/runner3680/4x8/keymaps/default/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/4x8/rules.mk b/keyboards/runner3680/4x8/rules.mk new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/runner3680/5x6/5x6.c b/keyboards/runner3680/5x6/5x6.c new file mode 100644 index 000000000..0e9d5481c --- /dev/null +++ b/keyboards/runner3680/5x6/5x6.c @@ -0,0 +1 @@ +#include "5x6.h" diff --git a/keyboards/runner3680/5x6/5x6.h b/keyboards/runner3680/5x6/5x6.h new file mode 100644 index 000000000..5a6e70c20 --- /dev/null +++ b/keyboards/runner3680/5x6/5x6.h @@ -0,0 +1,25 @@ +#pragma once + +#include "runner3680.h" + +#include "quantum.h" + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ + L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { L40, L41, L42, L43, L44, L45 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30 }, \ + { R45, R44, R43, R42, R41, R40 } \ + } diff --git a/keyboards/runner3680/5x6/config.h b/keyboards/runner3680/5x6/config.h new file mode 100644 index 000000000..e7956555f --- /dev/null +++ b/keyboards/runner3680/5x6/config.h @@ -0,0 +1,67 @@ +/* Copyright 2019 omkbd + * + * 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 . + */ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0005 +#define MANUFACTURER Omkbd +#define PRODUCT runner3680 +#define DESCRIPTION A split keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F6, F7, B1, B3, B2 ,B6 } +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6} //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* define tapping term */ +#define TAPPING_TERM 120 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 70 +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT { 35, 35 } // Number of LEDs + +#define SOFT_SERIAL_PIN D2 +#define SELECT_SOFT_SERIAL_SPEED 1 +/*Sets the protocol speed when using serial communication*/ +//Speeds: +//0: about 189kbps (Experimental only) +//1: about 137kbps (default) +//2: about 75kbps +//3: about 39kbps +//4: about 26kbps +//5: about 20kbps diff --git a/keyboards/runner3680/5x6/keymaps/default/config.h b/keyboards/runner3680/5x6/keymaps/default/config.h new file mode 100644 index 000000000..43a82f38a --- /dev/null +++ b/keyboards/runner3680/5x6/keymaps/default/config.h @@ -0,0 +1,9 @@ +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/runner3680/5x6/keymaps/default/keymap.c b/keyboards/runner3680/5x6/keymaps/default/keymap.c new file mode 100644 index 000000000..d8f50e49e --- /dev/null +++ b/keyboards/runner3680/5x6/keymaps/default/keymap.c @@ -0,0 +1,98 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +rgblight_config_t RGB_current_config; +#endif + +enum layer_number { + _QWERTY = 0, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + ADJUST, + RGBRST +}; + +// Fillers to make layering more clear +#define EISU LALT(KC_GRV) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* QWERTY + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | [ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | A | S | D | F | G | | H | J | K | L | ; | " | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | GUI | Alt | EISU | Del | Space| | Enter| Bksp | EISU | ESC |Adjust| Left | + * `-----------------------------------------' `-----------------------------------------' + */ + [_QWERTY] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + 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_ESC, 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_BSLS, + KC_LCTL, KC_LGUI, KC_LALT, EISU, KC_DEL, KC_SPC, KC_ENT, KC_BSPC, EISU, KC_ESC, ADJUST, KC_LEFT + ), + + /* Adjust + * ,-----------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | |RGBRST| RESET| | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | TOG | HUI | SAI | VAI | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | MOD | HUD | SAD | VAD | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * `-----------------------------------------' `-----------------------------------------' + */ + [_ADJUST] = LAYOUT( \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, RGBRST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + break; + + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_config = rgblight_config; + } + #endif + break; + } + return true; +} diff --git a/keyboards/runner3680/5x6/keymaps/default/rules.mk b/keyboards/runner3680/5x6/keymaps/default/rules.mk new file mode 100644 index 000000000..9104ce244 --- /dev/null +++ b/keyboards/runner3680/5x6/keymaps/default/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/5x6/rules.mk b/keyboards/runner3680/5x6/rules.mk new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/runner3680/5x7/5x7.c b/keyboards/runner3680/5x7/5x7.c new file mode 100644 index 000000000..aae28e450 --- /dev/null +++ b/keyboards/runner3680/5x7/5x7.c @@ -0,0 +1 @@ +#include "5x7.h" diff --git a/keyboards/runner3680/5x7/5x7.h b/keyboards/runner3680/5x7/5x7.h new file mode 100644 index 000000000..451ecf6cd --- /dev/null +++ b/keyboards/runner3680/5x7/5x7.h @@ -0,0 +1,25 @@ +#pragma once + +#include "runner3680.h" + +#include "quantum.h" + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, R35, R34, R33, R32, R31, R30 }, \ + { R46, R45, R44, R43, R42, R41, R40 } \ + } diff --git a/keyboards/runner3680/5x7/config.h b/keyboards/runner3680/5x7/config.h new file mode 100644 index 000000000..ba5763a8a --- /dev/null +++ b/keyboards/runner3680/5x7/config.h @@ -0,0 +1,67 @@ +/* Copyright 2019 omkbd + * + * 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 . + */ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0005 +#define MANUFACTURER Omkbd +#define PRODUCT runner3680 +#define DESCRIPTION A split keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2 ,B6 } +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5 } //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* define tapping term */ +#define TAPPING_TERM 120 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 70 +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT { 35, 35 } // Number of LEDs + +#define SOFT_SERIAL_PIN D2 +#define SELECT_SOFT_SERIAL_SPEED 1 +/*Sets the protocol speed when using serial communication*/ +//Speeds: +//0: about 189kbps (Experimental only) +//1: about 137kbps (default) +//2: about 75kbps +//3: about 39kbps +//4: about 26kbps +//5: about 20kbps diff --git a/keyboards/runner3680/5x7/keymaps/default/config.h b/keyboards/runner3680/5x7/keymaps/default/config.h new file mode 100644 index 000000000..43a82f38a --- /dev/null +++ b/keyboards/runner3680/5x7/keymaps/default/config.h @@ -0,0 +1,9 @@ +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/runner3680/5x7/keymaps/default/keymap.c b/keyboards/runner3680/5x7/keymaps/default/keymap.c new file mode 100644 index 000000000..44c0b20bd --- /dev/null +++ b/keyboards/runner3680/5x7/keymaps/default/keymap.c @@ -0,0 +1,98 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +rgblight_config_t RGB_current_config; +#endif + +enum layer_number { + _QWERTY = 0, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + ADJUST, + RGBRST +}; + +// Fillers to make layering more clear +#define EISU LALT(KC_GRV) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* QWERTY + * ,------------------------------------------------. ,------------------------------------------------. + * | F1 | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | = | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | F2 | Tab | Q | W | E | R | T | | Y | U | I | O | P | [ | ] | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | F3 | Esc | A | S | D | F | G | | H | J | K | L | ; | " | Enter| + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | F4 | Shift| Z | X | C | V | B | | N | M | , | . | / | \ | Shift| + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | F5 | Ctrl | GUI | Alt | EISU | Del | Space| | Enter| Bksp | EISU | ESC |Adjust| Left | Down | + * `------------------------------------------------' `------------------------------------------------' + */ + [_QWERTY] = LAYOUT( \ + KC_F1, KC_GRV, 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_F2, 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_F3, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_F4, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, KC_RSFT, \ + KC_F5, KC_LCTL, KC_LGUI, KC_LALT, EISU, KC_DEL, KC_SPC, KC_ENT, KC_BSPC, ADJUST, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ + ), + + /* Adjust + * ,------------------------------------------------. ,------------------------------------------------. + * | | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | |RGBRST| RESET| | | | | | | | | | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | TOG | HUI | SAI | VAI | | | | | | | | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | MOD | HUD | SAD | VAD | | | | | | | | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * `------------------------------------------------' `------------------------------------------------' + */ + [_ADJUST] = LAYOUT( \ + _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, _______, RGBRST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + break; + + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_config = rgblight_config; + } + #endif + break; + } + return true; +} diff --git a/keyboards/runner3680/5x7/keymaps/default/rules.mk b/keyboards/runner3680/5x7/keymaps/default/rules.mk new file mode 100644 index 000000000..9104ce244 --- /dev/null +++ b/keyboards/runner3680/5x7/keymaps/default/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/5x7/rules.mk b/keyboards/runner3680/5x7/rules.mk new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/runner3680/5x8/5x8.c b/keyboards/runner3680/5x8/5x8.c new file mode 100644 index 000000000..395870257 --- /dev/null +++ b/keyboards/runner3680/5x8/5x8.c @@ -0,0 +1 @@ +#include "5x8.h" diff --git a/keyboards/runner3680/5x8/5x8.h b/keyboards/runner3680/5x8/5x8.h new file mode 100644 index 000000000..de53a0eb2 --- /dev/null +++ b/keyboards/runner3680/5x8/5x8.h @@ -0,0 +1,25 @@ +#pragma once + +#include "runner3680.h" + +#include "quantum.h" + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, L07, R00, R01, R02, R03, R04, R05, R06, R07, \ + L10, L11, L12, L13, L14, L15, L16, L17, R10, R11, R12, R13, R14, R15, R16, R17, \ + L20, L21, L22, L23, L24, L25, L26, L27, R20, R21, R22, R23, R24, R25, R26, R27, \ + L30, L31, L32, L33, L34, L35, L36, L37, R30, R31, R32, R33, R34, R35, R36, R37, \ + L40, L41, L42, L43, L44, L45, L46, L47, R40, R41, R42, R43, R44, R45, R46, R47 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06, L07 }, \ + { L10, L11, L12, L13, L14, L15, L16, L17 }, \ + { L20, L21, L22, L23, L24, L25, L26, L27 }, \ + { L30, L31, L32, L33, L34, L35, L36, L37 }, \ + { L40, L41, L42, L43, L44, L45, L46, L47 }, \ + { R07, R06, R05, R04, R03, R02, R01, R00 }, \ + { R17, R16, R15, R14, R13, R12, R11, R10 }, \ + { R27, R26, R25, R24, R23, R22, R21, R20 }, \ + { R37, R36, R35, R34, R33, R32, R31, R30 }, \ + { R47, R46, R45, R44, R43, R42, R41, R40 } \ + } diff --git a/keyboards/runner3680/5x8/config.h b/keyboards/runner3680/5x8/config.h new file mode 100644 index 000000000..5c3066bf7 --- /dev/null +++ b/keyboards/runner3680/5x8/config.h @@ -0,0 +1,67 @@ +/* Copyright 2019 omkbd + * + * 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 . + */ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0005 +#define MANUFACTURER Omkbd +#define PRODUCT runner3680 +#define DESCRIPTION A split keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 ,B6 } +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* define tapping term */ +#define TAPPING_TERM 120 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 80 +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT { 40, 40 } // Number of LEDs + +#define SOFT_SERIAL_PIN D2 +#define SELECT_SOFT_SERIAL_SPEED 1 +/*Sets the protocol speed when using serial communication*/ +//Speeds: +//0: about 189kbps (Experimental only) +//1: about 137kbps (default) +//2: about 75kbps +//3: about 39kbps +//4: about 26kbps +//5: about 20kbps diff --git a/keyboards/runner3680/5x8/keymaps/JIS/config.h b/keyboards/runner3680/5x8/keymaps/JIS/config.h new file mode 100644 index 000000000..43a82f38a --- /dev/null +++ b/keyboards/runner3680/5x8/keymaps/JIS/config.h @@ -0,0 +1,9 @@ +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/runner3680/5x8/keymaps/JIS/keymap.c b/keyboards/runner3680/5x8/keymaps/JIS/keymap.c new file mode 100644 index 000000000..1b39cf08e --- /dev/null +++ b/keyboards/runner3680/5x8/keymaps/JIS/keymap.c @@ -0,0 +1,99 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +rgblight_config_t RGB_current_config; +#endif + +enum layer_number { + _QWERTY = 0, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + ADJUST, + RGBRST +}; + +// Fillers to make layering more clear +#define EISU LALT(KC_GRV) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* QWERTY + * ,-------------------------------------------------------. ,--------------------------------------------------------. + * | F1 | F2 | EISU | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | ^ | \ | + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | F3 | F4 | Tab | Q | W | E | R | T | | Y | U | I | O | P | @ | [ | Bksp | + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | F5 | F6 | Esc | A | S | D | F | G | | H | J | K | L | : | ; | ] | Enter| + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | F7 | F8 | Shift| Z | X | C | V | B | | N | M | , | . | / | \ | Up | Shift| + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | F9 | F10 | Ctrl | GUI | Alt | MHEN | Del | Space| | Enter| Bksp | HENK |Adjust| F10 | Left | Down | Right| + * `-------------------------------------------------------' `-------------------------------------------------------' + */ + [_QWERTY] = LAYOUT( + RGBRST , RGB_TOG, JP_ZHTG, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, JP_CIRC, JP_YEN, + RGB_MOD, RGB_SAI, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, JP_LBRC, KC_BSPC, + RGB_SAI, RGB_SAD, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, JP_RBRC, KC_ENT, + RGB_VAI, RGB_VAD, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, JP_BSLS, KC_UP, KC_RSFT, + _______, _______, KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_DEL, KC_SPC, KC_ENT, KC_BSPC, KC_HENK, ADJUST, KC_F10, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Adjust + * ,-------------------------------------------------------. ,--------------------------------------------------------. + * | | | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | | | |RGBRST| RESET| | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | | | | TOG | HUI | SAI | VAI | | | | | | | | | | | + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | | | | MOD | HUD | SAD | VAD | | | | | | | | | | | + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | | | + * `-------------------------------------------------------' `-------------------------------------------------------' + */ + [_ADJUST] = LAYOUT( + _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, _______, _______, RGBRST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + break; + + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_config = rgblight_config; + } + #endif + break; + } + return true; +} diff --git a/keyboards/runner3680/5x8/keymaps/JIS/rules.mk b/keyboards/runner3680/5x8/keymaps/JIS/rules.mk new file mode 100644 index 000000000..9104ce244 --- /dev/null +++ b/keyboards/runner3680/5x8/keymaps/JIS/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/5x8/keymaps/default/config.h b/keyboards/runner3680/5x8/keymaps/default/config.h new file mode 100644 index 000000000..43a82f38a --- /dev/null +++ b/keyboards/runner3680/5x8/keymaps/default/config.h @@ -0,0 +1,9 @@ +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/runner3680/5x8/keymaps/default/keymap.c b/keyboards/runner3680/5x8/keymaps/default/keymap.c new file mode 100644 index 000000000..9f0084e89 --- /dev/null +++ b/keyboards/runner3680/5x8/keymaps/default/keymap.c @@ -0,0 +1,98 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +rgblight_config_t RGB_current_config; +#endif + +enum layer_number { + _QWERTY = 0, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + ADJUST, + RGBRST +}; + +// Fillers to make layering more clear +#define EISU LALT(KC_GRV) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* QWERTY + * ,-------------------------------------------------------. ,--------------------------------------------------------. + * | F1 | F2 | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | = | Del | + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | F3 | F4 | Tab | Q | W | E | R | T | | Y | U | I | O | P | [ | ] | Bksp | + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | F5 | F6 | Esc | A | S | D | F | G | | H | J | K | L | ; | " | Enter| Enter| + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | F7 | F8 | Shift| Z | X | C | V | B | | N | M | , | . | / | \ | Up | Shift| + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | F9 | F10 | Ctrl | GUI | Alt | EISU | Del | Space| | Enter| Bksp | EISU | ESC |Adjust| Left | Down | Right| + * `-------------------------------------------------------' `-------------------------------------------------------' + */ + [_QWERTY] = LAYOUT( + KC_F1, KC_F2, KC_GRV, 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_DEL, + KC_F3, KC_F4, 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_BSPC, + KC_F5, KC_F6, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, + KC_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, KC_UP, KC_RSFT, + KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, EISU, KC_DEL, KC_SPC, KC_ENT, KC_BSPC, EISU, KC_ESC, ADJUST, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Adjust + * ,-------------------------------------------------------. ,--------------------------------------------------------. + * | | | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | | | |RGBRST| RESET| | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | | | | TOG | HUI | SAI | VAI | | | | | | | | | | | + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | | | | MOD | HUD | SAD | VAD | | | | | | | | | | | + * |------+------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | | | + * `-------------------------------------------------------' `-------------------------------------------------------' + */ + [_ADJUST] = LAYOUT( + _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, _______, _______, RGBRST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + break; + + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_config = rgblight_config; + } + #endif + break; + } + return true; +} diff --git a/keyboards/runner3680/5x8/keymaps/default/rules.mk b/keyboards/runner3680/5x8/keymaps/default/rules.mk new file mode 100644 index 000000000..9104ce244 --- /dev/null +++ b/keyboards/runner3680/5x8/keymaps/default/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/runner3680/5x8/rules.mk b/keyboards/runner3680/5x8/rules.mk new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/runner3680/config.h b/keyboards/runner3680/config.h new file mode 100644 index 000000000..b8c5759db --- /dev/null +++ b/keyboards/runner3680/config.h @@ -0,0 +1,3 @@ +#pragma once + +#include "config_common.h" diff --git a/keyboards/runner3680/readme.md b/keyboards/runner3680/readme.md new file mode 100644 index 000000000..b32ead412 --- /dev/null +++ b/keyboards/runner3680/readme.md @@ -0,0 +1,15 @@ +# runner3680 + +![runner3680](https://github.com/omkbd/Runner3680/blob/master/Picture/Runner3680.jpg) + +A split ortholinear keyboard. Each half is a 5x8 arrangement, with breakable pieces to allow the number of rows to be customized between 3 to 5, and the number of columns to be between 6 to 8. + +Keyboard Maintainer: [omkbd](https://github.com/omkbd) [@omkbd](https://twitter.com/omkbd) +Hardware Supported: Runner3680, Pro Micro ATmega32u4 +Hardware Availability: Order your own [yourself](https://github.com/omkbd/Runner3680) + +Make example for this keyboard (after setting up your build environment): + + make runner3680/5x8:default + +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). diff --git a/keyboards/runner3680/rules.mk b/keyboards/runner3680/rules.mk new file mode 100644 index 000000000..1342a9f59 --- /dev/null +++ b/keyboards/runner3680/rules.mk @@ -0,0 +1,60 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +F_CPU = 16000000 + +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +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 = yes # 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +SPLIT_KEYBOARD = yes # Enables split keyboard support + +DEFAULT_FOLDER = runner3680/5x8 diff --git a/keyboards/runner3680/runner3680.c b/keyboards/runner3680/runner3680.c new file mode 100644 index 000000000..7d8362363 --- /dev/null +++ b/keyboards/runner3680/runner3680.c @@ -0,0 +1 @@ +#include "runner3680.h" diff --git a/keyboards/runner3680/runner3680.h b/keyboards/runner3680/runner3680.h new file mode 100644 index 000000000..e7842b765 --- /dev/null +++ b/keyboards/runner3680/runner3680.h @@ -0,0 +1,39 @@ +#pragma once + +#include "quantum.h" + +#ifdef KEYBOARD_runner3680_5x8 + #include "5x8.h" +#endif + +#ifdef KEYBOARD_runner3680_5x7 + #include "5x7.h" +#endif + +#ifdef KEYBOARD_runner3680_5x6 + #include "5x6.h" +#endif + +#ifdef KEYBOARD_runner3680_4x8 + #include "4x8.h" +#endif + +#ifdef KEYBOARD_runner3680_4x7 + #include "4x7.h" +#endif + +#ifdef KEYBOARD_runner3680_4x6 + #include "4x6.h" +#endif + +#ifdef KEYBOARD_runner3680_3x8 + #include "3x8.h" +#endif + +#ifdef KEYBOARD_runner3680_3x7 + #include "3x7.h" +#endif + +#ifdef KEYBOARD_runner3680_3x6 + #include "3x6.h" +#endif From de29da973a3171d55834a1401b72772726d5a354 Mon Sep 17 00:00:00 2001 From: Stick <8531041+nstickney@users.noreply.github.com> Date: Thu, 6 Jun 2019 16:00:52 -0400 Subject: [PATCH 192/341] [Keymap] update @nstickney's keymaps (#6076) * [Keymap] iris@nstickney: improve RGB init Perfecting the rgb backlight initialization with a delay for each color; also start and stop the animation at the "default layer" color. * [Keymap] iris,ergodox@nstickney fix FN on SYMB The function key was not operational on the SYMB and SYSH layers due to other keycodes being mapped over MO() on those layers. The offending keycodes have been moved to other keys. * [Keymap] add @nstickney's userspace Pulled common code out to a userspace directory for my iris and ergodox keymaps. * [Keymap] iris@nstickney add image to README Added an image from keyboard-layout-editor.com to meet the README standard. * iris@nstickney hue values now `uint8_t` (#6050) --- .../keebio/iris/keymaps/nstickney/README.md | 9 +- .../keebio/iris/keymaps/nstickney/config.h | 6 +- .../keebio/iris/keymaps/nstickney/keymap.c | 92 +------ .../keebio/iris/keymaps/nstickney/rules.mk | 5 +- layouts/community/ergodox/nstickney/keymap.c | 231 ++++++------------ layouts/community/ergodox/nstickney/rules.mk | 2 - users/nstickney/nstickney.c | 44 ++++ users/nstickney/nstickney.h | 25 ++ users/nstickney/rules.mk | 4 + 9 files changed, 173 insertions(+), 245 deletions(-) delete mode 100644 layouts/community/ergodox/nstickney/rules.mk create mode 100644 users/nstickney/nstickney.c create mode 100644 users/nstickney/nstickney.h create mode 100644 users/nstickney/rules.mk diff --git a/keyboards/keebio/iris/keymaps/nstickney/README.md b/keyboards/keebio/iris/keymaps/nstickney/README.md index 1cafce67f..8124fe1cd 100644 --- a/keyboards/keebio/iris/keymaps/nstickney/README.md +++ b/keyboards/keebio/iris/keymaps/nstickney/README.md @@ -2,6 +2,8 @@ > Familiar layout for users who regularly switch between Iris and more standard layouts. +[![Keymap](https://i.imgur.com/hKs7fYr.jpg)](http://www.keyboard-layout-editor.com/#/gists/aa6093ea2eb9c750ab941b92adae7036) + [![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg)](https://github.com/RichardLitt/standard-readme) ## Install @@ -15,11 +17,11 @@ $ make keebio/iris/rev2:nstickney:avrdude ## Usage 0. QWERTY `BASE` layer. - * `/`, `\\`, ` `, `[ENTER]`, `-`, and `=` on the thumb clusters. + * `/`, `\`, ` `, `[ENTER]`, `-`, and `=` on the thumb clusters. * `CAPSLOCK` replaced by `ESC`; hold it down for `CTRL`. `'` can also be held for `CTRL`. - * [Space-Cadet Shift](/docs/docs/feature_space_cadet_shift.md) is enabled, so the `SHIFT` keys send `(` and `)` when tapped. + * [Space-Cadet Shift](https://docs.qmk.fm/#/feature_space_cadet_shift) is enabled, so the `SHIFT` keys send `(` and `)` when tapped. * Hold down `/` or `=` for `ALT`. - * Hold down `\\` or `-` to access the functions layer. + * Hold down `\` or `-` to access the functions layer. * Upper-center thumb keys are `GUI` and `MENU`. * Tapping `GUI` 2, 3, or 4 times will toggle `NUMLOCK`, `CAPSLOCK`, or `SCROLLLOCK`, respectively. * Tapping `MENU` 2, 3, or 4 times will toggle the `NUMP`, `SYMB`, and `SYSH` layers, respectively. @@ -40,7 +42,6 @@ $ make keebio/iris/rev2:nstickney:avrdude If you are using this layout and think you've found a better way to do something, I'd appreciate an [issue](https://github.com/nstickney/qmk_firmware/issues), or better yet a [pull request](https://github.com/nstickney/qmk_firmware/pulls). - ## License Copyright © 2016-2019 @nstickney. Released under [GPL-2.0](/LICENSE). diff --git a/keyboards/keebio/iris/keymaps/nstickney/config.h b/keyboards/keebio/iris/keymaps/nstickney/config.h index 0aeb87e62..f4899781e 100644 --- a/keyboards/keebio/iris/keymaps/nstickney/config.h +++ b/keyboards/keebio/iris/keymaps/nstickney/config.h @@ -33,8 +33,4 @@ along with this program. If not, see . // #define RGBLED_NUM 12 // #define RGBLIGHT_HUE_STEP 8 // #define RGBLIGHT_SAT_STEP 8 -// #define RGBLIGHT_VAL_STEP 8 - -// Unicode input -#undef UNICODE_SELECTED_MODES -#define UNICODE_SELECTED_MODES UC_OSX, UC_LNX, UC_WINC +// #define RGBLIGHT_VAL_STEP 8 \ No newline at end of file diff --git a/keyboards/keebio/iris/keymaps/nstickney/keymap.c b/keyboards/keebio/iris/keymaps/nstickney/keymap.c index 609139985..16b2d0de3 100644 --- a/keyboards/keebio/iris/keymaps/nstickney/keymap.c +++ b/keyboards/keebio/iris/keymaps/nstickney/keymap.c @@ -1,66 +1,4 @@ -#include QMK_KEYBOARD_H - -extern keymap_config_t keymap_config; - -// Layers -#define BASE 0 // Base layer -#define SYMB 1 // Symbols -#define SYSH 2 // Symbols, shifted -#define NUMP 4 // Numpad -#define FCTN 8 // Functions - -// Tap Dancing -void dance_lock (qk_tap_dance_state_t *state, void *user_data) { - switch (state->count){ - case 1: // Press once for LGUI - tap_code(KC_LGUI); - break; - case 2: // Press twice for NUMLOCK - tap_code(KC_NLCK); - break; - case 3: // Press thrice for CAPSLOCK - tap_code(KC_CAPS); - break; - case 4: // Press four times for SCROLLOCK - tap_code(KC_SLCK); - break; - default: - break; - } -}; - -void dance_layer (qk_tap_dance_state_t *state, void *user_data) { - switch (state -> count) { - case 1: // Press once for MENU - tap_code(KC_APP); - break; - case 2: // Press twice for NUMPAD - layer_invert(NUMP); - break; - case 3: // Press thrice for SYMBOLS - layer_invert(SYMB); - break; - case 4: // Press four times for SYMBOLS, SHIFTED - layer_invert(SYSH); - break; - default: - break; - } -}; - -enum tap_dances {LOCKS = 0, LAYERS = 1}; -qk_tap_dance_action_t tap_dance_actions[] = { - [LOCKS] = ACTION_TAP_DANCE_FN(dance_lock), - [LAYERS] = ACTION_TAP_DANCE_FN(dance_layer) -}; - -// Make layering more clear -#define CC_ESC LCTL_T(KC_ESC) -#define CC_QUOT RCTL_T(KC_QUOT) -#define AC_SLSH LALT_T(KC_SLSH) -#define AC_EQL RALT_T(KC_EQL) -#define FC_BSLS LT(FCTN, KC_BSLS) -#define FC_MINS LT(FCTN, KC_MINS) +#include "nstickney.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -88,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┐ ┌──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ _______, UC(0x00E6),UC(0x00E8),UC(0x00A9),UC(0x00EA),UC(0x00EB),_______, _______, UC(0x00F1),UC(0x00FD),UC(0x00E7),UC(0x00F4),UC(0x00BF),_______, // └──────────┴──────────┴──────────┴────┬─────┴────┬─────┴────┬─────┴────┬─────┘ └────┬─────┴────┬─────┴────┬─────┴────┬─────┴──────────┴──────────┴──────────┘ - UC(0x00BF),UC(0x00AC),_______, _______, UC(0x00B1),UC(0x00D7) + UC(0x00BF),_______, UC(0x00AC), UC(0x00B1),_______, UC(0x00D7) // └──────────┴──────────┴──────────┘ └──────────┴──────────┴──────────┘ ), @@ -102,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┐ ┌──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ _______, UC(0x00C6),UC(0x00C8),UC(0x00A2),UC(0x00CA),UC(0x00CB),_______, _______, UC(0x00D1),UC(0x00DD),UC(0x00C7),UC(0x00D4),UC(0x203D),_______, // └──────────┴──────────┴──────────┴────┬─────┴────┬─────┴────┬─────┴────┬─────┘ └────┬─────┴────┬─────┴────┬─────┴────┬─────┴──────────┴──────────┴──────────┘ - UC(0x203D),UC(0x00A6),_______, _______, UC(0x00AA),UC(0x00F7) + UC(0x203D),_______, UC(0x00A6), UC(0x00AA),_______, UC(0x00F7) // └──────────┴──────────┴──────────┘ └──────────┴──────────┴──────────┘ ), @@ -138,8 +76,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Initialize rgblight void keyboard_post_init_user(void) { rgblight_enable_noeeprom(); - for (int i = 360; i > 0; i--) { - rgblight_sethsv_noeeprom(i, 255, 255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + layer_state_set_user(layer_state); + uint16_t user_hue = rgblight_get_hue(); + for (uint16_t i = 0; i < 256; ++i) { + rgblight_sethsv_noeeprom( (i + user_hue) % 256, 255, 255); + wait_ms(5); } layer_state_set_user(layer_state); }; @@ -147,19 +89,11 @@ void keyboard_post_init_user(void) { // Turn on RGB underglow according to active layer uint32_t layer_state_set_user(uint32_t state) { switch (biton32(state)) { - case FCTN: - rgblight_sethsv_noeeprom(136, 255, 255); - break; - case NUMP: - rgblight_sethsv_noeeprom(228, 255, 255); - break; + case FCTN: rgblight_sethsv_noeeprom(96, 255, 255); break; + case NUMP: rgblight_sethsv_noeeprom(162, 255, 255); break; case SYMB: - case SYSH: - rgblight_sethsv_noeeprom(320, 255, 255); - break; - default: // for any other layers, or the default layer - rgblight_sethsv_noeeprom(19, 255, 255); - break; + case SYSH: rgblight_sethsv_noeeprom(227, 255, 255); break; + default: rgblight_sethsv_noeeprom(13, 255, 255); break; } return state; }; diff --git a/keyboards/keebio/iris/keymaps/nstickney/rules.mk b/keyboards/keebio/iris/keymaps/nstickney/rules.mk index 851fc924e..7ad666d1a 100644 --- a/keyboards/keebio/iris/keymaps/nstickney/rules.mk +++ b/keyboards/keebio/iris/keymaps/nstickney/rules.mk @@ -1,4 +1 @@ -BACKLIGHT_ENABLE = yes -RGBLIGHT_ENABLE = yes -TAP_DANCE_ENABLE=yes -UNICODE_ENABLE = yes +RGBLIGHT_ENABLE = yes \ No newline at end of file diff --git a/layouts/community/ergodox/nstickney/keymap.c b/layouts/community/ergodox/nstickney/keymap.c index dc83c2f4d..a37bc5f96 100644 --- a/layouts/community/ergodox/nstickney/keymap.c +++ b/layouts/community/ergodox/nstickney/keymap.c @@ -1,196 +1,125 @@ -#include QMK_KEYBOARD_H +#include "nstickney.h" /* * This keymap simulates the key limitations of an Iris on an ErgoDox. See the - * matching iris layout (/keyboards/iris/keymaps/nstickney) for further + * matching iris layout (/keyboards/keebio/iris/keymaps/nstickney) for further * information. */ -// Layers -#define BASE 0 // Base layer -#define SYMB 1 // Symbols -#define SYSH 2 // Symbols, shifted -#define NUMP 4 // Numpad -#define FCTN 8 // Function - -// Tap Dancing -void dance_lock (qk_tap_dance_state_t *state, void *user_data) { - switch (state->count){ - case 1: // Press once for LGUI - tap_code(KC_LGUI); - break; - case 2: // Press twice for NUMLOCK - tap_code(KC_NLCK); - break; - case 3: // Press thrice for CAPSLOCK - tap_code(KC_CAPS); - break; - case 4: // Press four times for SCROLLOCK - tap_code(KC_SLCK); - break; - default: - break; - } -}; - -void dance_layer (qk_tap_dance_state_t *state, void *user_data) { - switch (state -> count) { - case 1: // Press once for MENU - tap_code(KC_APP); - break; - case 2: // Press twice for NUMPAD - layer_invert(NUMP); - break; - case 3: // Press thrice for SYMBOLS - layer_invert(SYMB); - break; - case 4: // Press four times for SYMBOLS, SHIFTED - layer_invert(SYSH); - break; - default: - break; - } -}; - -enum tap_dances {LOCKS = 0, LAYERS = 1}; -qk_tap_dance_action_t tap_dance_actions[] = { - [LOCKS] = ACTION_TAP_DANCE_FN(dance_lock), - [LAYERS] = ACTION_TAP_DANCE_FN(dance_layer) -}; - -// Make layering more clear -enum custom_keycodes { - __________ = KC_TRNS, - XXX = KC_NO, - CC_ESC = LCTL_T(KC_ESC), - CC_QUOT = RCTL_T(KC_QUOT), - AC_SLSH = LALT_T(KC_SLSH), - AC_EQL = RALT_T(KC_EQL), - FC_BSLS = LT(FCTN, KC_BSLS), - FC_MINS = LT(FCTN, KC_MINS), -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // left hand - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, XXX, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, XXX, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, CC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, XXX, - XXX, XXX, XXX, XXX, AC_SLSH, - TD(LOCKS), XXX, - XXX, - FC_BSLS, KC_SPC, XXX, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, AC_SLSH, + TD(LOCKS), XXXXXXX, + XXXXXXX, + FC_BSLS, KC_SPC, XXXXXXX, // right hand - XXX, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - XXX, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + XXXXXXX, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + XXXXXXX, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CC_QUOT, - XXX, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, - AC_EQL, XXX, XXX, XXX, XXX, - XXX, TD(LAYERS), - XXX, - XXX, KC_ENT, FC_MINS + XXXXXXX, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + AC_EQL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, TD(LAYERS), + XXXXXXX, + XXXXXXX, KC_ENT, FC_MINS ), [SYMB] = LAYOUT_ergodox( // left hand - UC(0x00EF), UC(0x00A1), UC(0x00B2), UC(0x00B3), UC(0x00A4), UC(0x20AC), __________, - __________, UC(0x00E4), UC(0x00E5), UC(0x00E9), UC(0x00AE), UC(0x00FE), __________, - __________, UC(0x00E1), UC(0x00DF), UC(0x00F0), UC(0x00EC), UC(0x00ED), - __________, UC(0x00E6), UC(0x00E8), UC(0x00A9), UC(0x00EA), UC(0x00EB), __________, - __________, __________, __________, __________, UC(0x00BF), - __________, __________, - __________, - UC(0x00AC), __________, __________, + UC(0x00EF), UC(0x00A1), UC(0x00B2), UC(0x00B3), UC(0x00A4), UC(0x20AC), _______, + _______, UC(0x00E4), UC(0x00E5), UC(0x00E9), UC(0x00AE), UC(0x00FE), _______, + _______, UC(0x00E1), UC(0x00DF), UC(0x00F0), UC(0x00EC), UC(0x00ED), + _______, UC(0x00E6), UC(0x00E8), UC(0x00A9), UC(0x00EA), UC(0x00EB), _______, + _______, _______, _______, _______, UC(0x00BF), + _______, _______, + _______, + _______, UC(0x00AC), _______, // right hand - __________, UC(0x00BC), UC(0x00BD), UC(0x00BE), UC(0x2018), UC(0x2019), __________, - __________, UC(0x00FC), UC(0x00FA), UC(0x00ED), UC(0x00F3), UC(0x00F6), __________, + _______, UC(0x00BC), UC(0x00BD), UC(0x00BE), UC(0x2018), UC(0x2019), _______, + _______, UC(0x00FC), UC(0x00FA), UC(0x00ED), UC(0x00F3), UC(0x00F6), _______, UC(0x00EE), UC(0x00E0), UC(0x00E2), UC(0x00F8), UC(0x00B6), UC(0x00B4), - __________, UC(0x00F1), UC(0x00FD), UC(0x00E7), UC(0x00F4), UC(0x00BF), __________, - UC(0x00D7), __________, __________, __________, __________, - __________, __________, - __________, - __________, __________, UC(0x00B1) + _______, UC(0x00F1), UC(0x00FD), UC(0x00E7), UC(0x00F4), UC(0x00BF), _______, + UC(0x00D7), _______, _______, _______, _______, + _______, _______, + _______, + _______, UC(0x00B1), _______ ), [SYSH] = LAYOUT_ergodox( // left hand - UC(0x00CF), UC(0x00B9), UC(0x2200), UC(0x2201), UC(0x00A3), UC(0x00A5), __________, - __________, UC(0x00C4), UC(0x00C5), UC(0x00C9), UC(0x2122), UC(0x00DE), __________, - __________, UC(0x00C1), UC(0x00A7), UC(0x00D0), UC(0x00CC), UC(0x00CD), - __________, UC(0x00C6), UC(0x00C8), UC(0x00A2), UC(0x00CA), UC(0x00CB), __________, - __________, __________, __________, __________, UC(0x203D), - __________, __________, - __________, - UC(0x00A6), __________, __________, + UC(0x00CF), UC(0x00B9), UC(0x2200), UC(0x2201), UC(0x00A3), UC(0x00A5), _______, + _______, UC(0x00C4), UC(0x00C5), UC(0x00C9), UC(0x2122), UC(0x00DE), _______, + _______, UC(0x00C1), UC(0x00A7), UC(0x00D0), UC(0x00CC), UC(0x00CD), + _______, UC(0x00C6), UC(0x00C8), UC(0x00A2), UC(0x00CA), UC(0x00CB), _______, + _______, _______, _______, _______, UC(0x203D), + _______, _______, + _______, + _______, UC(0x00A6), _______, // right hand - __________, UC(0x00B5), UC(0x00AB), UC(0x00BB), UC(0x201C), UC(0x201D), __________, - __________, UC(0x00DC), UC(0x00DA), UC(0x00CD), UC(0x00D3), UC(0x00D6), __________, + _______, UC(0x00B5), UC(0x00AB), UC(0x00BB), UC(0x201C), UC(0x201D), _______, + _______, UC(0x00DC), UC(0x00DA), UC(0x00CD), UC(0x00D3), UC(0x00D6), _______, UC(0x00CE), UC(0x00C1), UC(0x00C2), UC(0x00D8), UC(0x00B0), UC(0x00A8), - __________, UC(0x00D1), UC(0x00DD), UC(0x00C7), UC(0x00D4), UC(0x203D), __________, - UC(0x00F7), __________, __________, __________, __________, - __________, __________, - __________, - __________, __________, UC(0x00AA) + _______, UC(0x00D1), UC(0x00DD), UC(0x00C7), UC(0x00D4), UC(0x203D), _______, + UC(0x00F7), _______, _______, _______, _______, + _______, _______, + _______, + _______, UC(0x00AA), _______ ), [NUMP] = LAYOUT_ergodox( // left hand - __________, __________, KC_P7, KC_P8, KC_P9, KC_PSLS, __________, - __________, __________, KC_P4, KC_P5, KC_P6, KC_PAST, __________, - __________, __________, KC_P1, KC_P2, KC_P3, KC_PMNS, - __________, __________, KC_P0, KC_PCMM, KC_PDOT, KC_PPLS, __________, - __________, __________, __________, __________, __________, - __________, __________, - __________, - __________, __________, __________, + _______, _______, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, + _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, + _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, + _______, _______, KC_P0, KC_PCMM, KC_PDOT, KC_PPLS, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, // right hand - __________, __________, KC_P7, KC_P8, KC_P9, KC_PSLS, __________, - __________, __________, KC_P4, KC_P5, KC_P6, KC_PAST, __________, - __________, KC_P1, KC_P2, KC_P3, KC_PMNS, __________, - __________, __________, KC_P0, KC_PCMM, KC_PDOT, KC_PPLS, __________, - __________, __________, __________, __________, __________, - __________, __________, - __________, - __________, KC_PENT, __________ + _______, _______, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, + _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, + _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, + _______, _______, KC_P0, KC_PCMM, KC_PDOT, KC_PPLS, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, KC_PENT, _______ ), [FCTN] = LAYOUT_ergodox( // left hand - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, __________, - KC_PSCR, RGB_TOG, KC_HOME, KC_UP, KC_END, KC_PGUP, __________, - KC_PAUS, __________, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, - __________, KC_MPRV, KC_MRWD, KC_MPLY, KC_MFFD, KC_MNXT, __________, - __________, __________, __________, __________, __________, - KC_F11, __________, - __________, - __________, __________, __________, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, + KC_PSCR, RGB_TOG, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, + KC_PAUS, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, + _______, KC_MPRV, KC_MRWD, KC_MPLY, KC_MFFD, KC_MNXT, _______, + _______, _______, _______, _______, _______, + KC_F11, _______, + _______, + _______, _______, _______, // right hand - __________, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_SYSREQ, - __________, UC(0x2014), KC_LBRC, KC_RBRC, S(KC_LBRC), S(KC_RBRC), KC_INS, + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_SYSREQ, + _______, UC(0x2014), KC_LBRC, KC_RBRC, S(KC_LBRC), S(KC_RBRC), KC_INS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BRIU, KC_CLR, - __________, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, KC_BRID, __________, - __________, __________, __________, __________, __________, - __________, KC_F12, - __________, - __________, __________, __________ + _______, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, KC_BRID, _______, + _______, _______, _______, _______, _______, + _______, KC_F12, + _______, + _______, _______, _______ ), }; -void eeconfig_init_user(void) { - set_unicode_input_mode(UC_LNX); // Linux - //set_unicode_input_mode(UC_OSX); // Mac OSX - //set_unicode_input_mode(UC_WIN); // Windows (with registry key, see wiki) - //set_unicode_input_mode(UC_WINC); // Windows (with WinCompose, see wiki) -}; - // Runs just one time when the keyboard initializes. -void matrix_init_user(void) { +void matrix_init_user (void) { ergodox_board_led_off(); }; // Runs constantly in the background, in a loop. -void matrix_scan_user(void) { +void matrix_scan_user (void) { if (IS_LAYER_ON(SYMB) || IS_LAYER_ON(SYSH)) { ergodox_right_led_1_on(); @@ -210,4 +139,4 @@ void matrix_scan_user(void) { ergodox_right_led_3_off(); } -}; +}; \ No newline at end of file diff --git a/layouts/community/ergodox/nstickney/rules.mk b/layouts/community/ergodox/nstickney/rules.mk deleted file mode 100644 index 4a3c58621..000000000 --- a/layouts/community/ergodox/nstickney/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -TAP_DANCE_ENABLE=yes -LEADER_ENABLE = yes diff --git a/users/nstickney/nstickney.c b/users/nstickney/nstickney.c new file mode 100644 index 000000000..3e18e5c83 --- /dev/null +++ b/users/nstickney/nstickney.c @@ -0,0 +1,44 @@ +#include "nstickney.h" + +// Tap Dancing +void dance_layer (qk_tap_dance_state_t *state, void *user_data) { + switch (state -> count) { + case 1: tap_code(KC_APP); break; + case 2: layer_invert(NUMP); break; + case 3: layer_invert(SYMB); break; + case 4: layer_invert(SYSH); break; + default: break; + } +}; + +void dance_lock_finished (qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: register_code(KC_LGUI); break; + case 2: register_code(KC_NLCK); break; + case 3: register_code(KC_CAPS); break; + case 4: register_code(KC_SLCK); break; + default: break; + } +}; + +void dance_lock_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: unregister_code(KC_LGUI); break; + case 2: unregister_code(KC_NLCK); break; + case 3: register_code(KC_CAPS); break; + case 4: register_code(KC_SLCK); break; + default: break; + } +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [LOCKS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_lock_finished, dance_lock_reset), + [LAYERS] = ACTION_TAP_DANCE_FN(dance_layer) +}; + +void eeconfig_init_user (void) { + set_unicode_input_mode(UC_LNX); // Linux + //set_unicode_input_mode(UC_OSX); // Mac OSX + //set_unicode_input_mode(UC_WIN); // Windows (with registry key, see wiki) + //set_unicode_input_mode(UC_WINC); // Windows (with WinCompose, see wiki) +}; \ No newline at end of file diff --git a/users/nstickney/nstickney.h b/users/nstickney/nstickney.h new file mode 100644 index 000000000..d3f5a7c6f --- /dev/null +++ b/users/nstickney/nstickney.h @@ -0,0 +1,25 @@ +#include QMK_KEYBOARD_H + +#pragma once +#define USE_SERIAL +#define MASTER_LEFT + +#undef UNICODE_SELECTED_MODES +#define UNICODE_SELECTED_MODES UC_OSX, UC_LNX, UC_WINC + +// Layers +#define BASE 0 // Base layer +#define SYMB 1 // Symbols +#define SYSH 2 // Symbols, shifted +#define NUMP 3 // Numpad +#define FCTN 4 // Function + +// Make keymaps more clear +#define CC_ESC LCTL_T(KC_ESC) +#define CC_QUOT RCTL_T(KC_QUOT) +#define AC_SLSH LALT_T(KC_SLSH) +#define AC_EQL RALT_T(KC_EQL) +#define FC_BSLS LT(FCTN, KC_BSLS) +#define FC_MINS LT(FCTN, KC_MINS) + +enum tap_dances {LOCKS = 0, LAYERS = 1}; \ No newline at end of file diff --git a/users/nstickney/rules.mk b/users/nstickney/rules.mk new file mode 100644 index 000000000..f52371c79 --- /dev/null +++ b/users/nstickney/rules.mk @@ -0,0 +1,4 @@ +SRC += nstickney.c + +TAP_DANCE_ENABLE = yes +UNICODE_ENABLE = yes \ No newline at end of file From 29c7fa6efc48385445673a77ec58e880746e6524 Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Thu, 6 Jun 2019 16:08:27 -0400 Subject: [PATCH 193/341] [Keyboard] Candybar: updated rules.mk (#6083) * Candybar: updated rules.mk Disabled console and command to get compiled size under flash space limitations. * Candybar: Enable LINK_TIME_OPTIMIZATION_ENABLE --- keyboards/candybar/rules.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/keyboards/candybar/rules.mk b/keyboards/candybar/rules.mk index 0bc9a5b3e..a0365a20b 100644 --- a/keyboards/candybar/rules.mk +++ b/keyboards/candybar/rules.mk @@ -36,14 +36,15 @@ DFU_SUFFIX_ARGS = -p DF11 -v 0483 # Build Options # comment out to disable the options. # -EXTRAFLAGS+=-flto +# EXTRAFLAGS+=-flto +LINK_TIME_OPTIMIZATION_ENABLE = yes BACKLIGHT_ENABLE = no BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover AUDIO_ENABLE = no From 983613c88d69501b184c52b08ea6a3a7d3f149f8 Mon Sep 17 00:00:00 2001 From: Viktor Eikman Date: Thu, 6 Jun 2019 22:15:19 +0200 Subject: [PATCH 194/341] [Keyboard] Added DMOTE (#6087) * Added DMOTE as a variant of the Dactyl-ManuForm, with slight changes to prior code organization to reflect differences. --- .../handwired/dactyl_manuform/4x5/config.h | 6 +- .../handwired/dactyl_manuform/4x6/config.h | 4 + .../handwired/dactyl_manuform/5x6/config.h | 4 +- .../handwired/dactyl_manuform/5x7/config.h | 4 + .../handwired/dactyl_manuform/6x6/config.h | 4 + keyboards/handwired/dactyl_manuform/config.h | 5 - .../dactyl_manuform/dactyl_manuform.h | 4 +- .../dactyl_manuform/dmote/62key/62key.c | 5 + .../dactyl_manuform/dmote/62key/62key.h | 54 +++++++ .../dactyl_manuform/dmote/62key/config.h | 49 ++++++ .../dmote/62key/keymaps/default/config.h | 5 + .../dmote/62key/keymaps/default/keymap.c | 146 ++++++++++++++++++ .../dactyl_manuform/dmote/62key/rules.mk | 5 + .../handwired/dactyl_manuform/dmote/config.h | 3 + .../handwired/dactyl_manuform/dmote/readme.md | 16 ++ 15 files changed, 304 insertions(+), 10 deletions(-) create mode 100644 keyboards/handwired/dactyl_manuform/dmote/62key/62key.c create mode 100644 keyboards/handwired/dactyl_manuform/dmote/62key/62key.h create mode 100644 keyboards/handwired/dactyl_manuform/dmote/62key/config.h create mode 100644 keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/config.h create mode 100644 keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/keymap.c create mode 100644 keyboards/handwired/dactyl_manuform/dmote/62key/rules.mk create mode 100644 keyboards/handwired/dactyl_manuform/dmote/config.h create mode 100644 keyboards/handwired/dactyl_manuform/dmote/readme.md diff --git a/keyboards/handwired/dactyl_manuform/4x5/config.h b/keyboards/handwired/dactyl_manuform/4x5/config.h index c8417a2f0..1f24c9aca 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/config.h +++ b/keyboards/handwired/dactyl_manuform/4x5/config.h @@ -40,7 +40,9 @@ along with this program. If not, see . /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST +// WS2812 RGB LED strip input and number of LEDs +#define RGB_DI_PIN D3 +#define RGBLED_NUM 12 + /* number of backlight levels */ // #define BACKLIGHT_LEVELS 3 - - diff --git a/keyboards/handwired/dactyl_manuform/4x6/config.h b/keyboards/handwired/dactyl_manuform/4x6/config.h index d4a192287..a9ad1a36d 100644 --- a/keyboards/handwired/dactyl_manuform/4x6/config.h +++ b/keyboards/handwired/dactyl_manuform/4x6/config.h @@ -38,3 +38,7 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW + +// WS2812 RGB LED strip input and number of LEDs +#define RGB_DI_PIN D3 +#define RGBLED_NUM 12 diff --git a/keyboards/handwired/dactyl_manuform/5x6/config.h b/keyboards/handwired/dactyl_manuform/5x6/config.h index 06ac02dfc..413039449 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6/config.h @@ -32,10 +32,12 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } #define MATRIX_ROW_PINS { F6, F7, B1, B3, B2, B6 } +// WS2812 RGB LED strip input and number of LEDs +#define RGB_DI_PIN D3 +#define RGBLED_NUM 12 /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST /* number of backlight levels */ // #define BACKLIGHT_LEVELS 3 - diff --git a/keyboards/handwired/dactyl_manuform/5x7/config.h b/keyboards/handwired/dactyl_manuform/5x7/config.h index bef48f17e..435837498 100644 --- a/keyboards/handwired/dactyl_manuform/5x7/config.h +++ b/keyboards/handwired/dactyl_manuform/5x7/config.h @@ -31,3 +31,7 @@ along with this program. If not, see . // wiring of each half #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } + +// WS2812 RGB LED strip input and number of LEDs +#define RGB_DI_PIN D3 +#define RGBLED_NUM 12 diff --git a/keyboards/handwired/dactyl_manuform/6x6/config.h b/keyboards/handwired/dactyl_manuform/6x6/config.h index 9bb7b07bf..9bc501c5e 100644 --- a/keyboards/handwired/dactyl_manuform/6x6/config.h +++ b/keyboards/handwired/dactyl_manuform/6x6/config.h @@ -31,3 +31,7 @@ along with this program. If not, see . // wiring of each half #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } #define MATRIX_ROW_PINS { F5, F6, F7, B1, B3, B2, B6 } + +// WS2812 RGB LED strip input and number of LEDs +#define RGB_DI_PIN D3 +#define RGBLED_NUM 12 diff --git a/keyboards/handwired/dactyl_manuform/config.h b/keyboards/handwired/dactyl_manuform/config.h index 6979821b6..7c95f7058 100644 --- a/keyboards/handwired/dactyl_manuform/config.h +++ b/keyboards/handwired/dactyl_manuform/config.h @@ -49,11 +49,6 @@ along with this program. If not, see . /* Enables This makes it easier for fast typists to use dual-function keys */ #define PERMISSIVE_HOLD -/* ws2812 RGB LED */ -#define RGB_DI_PIN D3 - -#define RGBLED_NUM 12 // Number of LEDs - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/handwired/dactyl_manuform/dactyl_manuform.h b/keyboards/handwired/dactyl_manuform/dactyl_manuform.h index eea0757d5..72f2acaab 100644 --- a/keyboards/handwired/dactyl_manuform/dactyl_manuform.h +++ b/keyboards/handwired/dactyl_manuform/dactyl_manuform.h @@ -10,6 +10,8 @@ #include "5x7.h" #elif KEYBOARD_handwired_dactyl_manuform_6x6 #include "6x6.h" +#elif KEYBOARD_handwired_dactyl_manuform_dmote_62key + #include "62key.h" #endif //void promicro_bootloader_jmp(bool program); @@ -23,5 +25,3 @@ #include #endif #endif - - diff --git a/keyboards/handwired/dactyl_manuform/dmote/62key/62key.c b/keyboards/handwired/dactyl_manuform/dmote/62key/62key.c new file mode 100644 index 000000000..e5d444277 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/dmote/62key/62key.c @@ -0,0 +1,5 @@ +#include "62key.h" + +void matrix_init_kb(void) { + matrix_init_user(); +}; diff --git a/keyboards/handwired/dactyl_manuform/dmote/62key/62key.h b/keyboards/handwired/dactyl_manuform/dmote/62key/62key.h new file mode 100644 index 000000000..273410165 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/dmote/62key/62key.h @@ -0,0 +1,54 @@ +#pragma once + +#include "dactyl_manuform.h" +#include "quantum.h" + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +// This uses the same coordinate system as the program that defines +// the case model, but not the same coordinates. +// Numbers increase going to the right and away from the user on the +// right-hand side of the keyboard. This is mirrored for the +// left-hand side. +// The matrix is constructed for ease of soldering, with the columns +// of the thumb cluster extending along the sides of the finger +// cluster so that everything can be contained in a 6x6 pattern. + +#define LAYOUT_62key( \ + LA_20, LA_10, LF_35, LF_25, LF_15, LF_05, \ + LF_55, LF_45, LF_34, LF_24, LF_14, LF_04, \ + LF_54, LF_44, LF_33, LF_23, LF_13, LF_03, \ + LF_53, LF_43, LF_32, LF_22, LF_12, \ + LF_21, LT_21, LT_22, \ + LT_10, LT_11, LT_12, \ + LT_01, LT_02, \ + \ + RF_05, RF_15, RF_25, RF_35, RA_10, RA_20, \ + RF_04, RF_14, RF_24, RF_34, RF_45, RF_55, \ + RF_03, RF_13, RF_23, RF_33, RF_44, RF_54, \ + RF_12, RF_22, RF_32, RF_43, RF_53, \ + RT_22, RT_21, RF_21, \ + RT_12, RT_11, RT_10, \ + RT_02, RT_01 \ + ) \ + { \ + { LA_20, LA_10, LF_35, LF_25, LF_15, LF_05 }, \ + { LF_55, LF_45, LF_34, LF_24, LF_14, LF_04 }, \ + { LF_54, LF_44, LF_33, LF_23, LF_13, LF_03 }, \ + { LF_53, LF_43, LF_32, LF_22, LF_12, LT_22 }, \ + { KC_NO, KC_NO, LT_21, LF_21, LT_11, LT_12 }, \ + { KC_NO, KC_NO, LT_10, KC_NO, LT_01, LT_02 }, \ + \ + { RA_20, RA_10, RF_35, RF_25, RF_15, RF_05 }, \ + { RF_55, RF_45, RF_34, RF_24, RF_14, RF_04 }, \ + { RF_54, RF_44, RF_33, RF_23, RF_13, RF_03 }, \ + { RF_53, RF_43, RF_32, RF_22, RF_12, RT_22 }, \ + { KC_NO, KC_NO, RT_21, RF_21, RT_11, RT_12 }, \ + { KC_NO, KC_NO, RT_10, KC_NO, RT_01, RT_02 }, \ + } diff --git a/keyboards/handwired/dactyl_manuform/dmote/62key/config.h b/keyboards/handwired/dactyl_manuform/dmote/62key/config.h new file mode 100644 index 000000000..7db3ceb75 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/dmote/62key/config.h @@ -0,0 +1,49 @@ +#pragma once + +#include "config_common.h" + +#define PRODUCT DMOTE (62-key) +#define MATRIX_ROWS 12 +#define MATRIX_COLS 6 + +// MCUs are flipped on each side, relative to the shape of the case, +// but for ease of mounting, the pinout is not flipped with the controller. +// The same finger on each hand uses a column connected to the pin with the +// same silk-screen label on each Pro Micro. + +// Pin use: +// +// MCU | Silk | DMOTE +// -----+------+---------- +// D3 | TX0 | +// D2 | RX1 | +// D1 | 2 | LED strip input (dominant half only) +// D0 | 3 | Serial interface between halves +// D4 | 4 | Outermost pinky-finger column +// C6 | 5 | Column +// D7 | 6 | Column +// E6 | 7 | Column +// B4 | 8 | Column +// B5 | 9 | Outermost index-finger column +// -----+------+---------- +// F4 | A3 | +// F5 | A2 | +// F6 | A1 | Top row (furthest from user) +// F7 | A0 | Row +// B1 | 15 | Row +// B3 | 14 | Row +// B2 | 16 | Row +// B6 | 10 | Bottom row (closest to user) +#define MATRIX_ROW_PINS { F6, F7, B1, B3, B2, B6 } +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } + +// WS2812 RGB LED, normally used to indicate keyboard state: +#define RGBLIGHT_EFFECT_KNIGHT +#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 +#define RGBLIGHT_EFFECT_CHRISTMAS +#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 +#define RGB_DI_PIN D1 +#define RGBLED_NUM 6 // Used when chaining strips +#define RGBLED_SPLIT { 3, 3 } // Used when not chaining strips +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD diff --git a/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/config.h new file mode 100644 index 000000000..2e1d4f8dc --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/config.h @@ -0,0 +1,5 @@ +#pragma once + +#define USE_SERIAL + +#define EE_HANDS diff --git a/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/keymap.c new file mode 100644 index 000000000..3012d40a1 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/keymap.c @@ -0,0 +1,146 @@ +#include "62key.h" +#include "rgblight.h" +#include +#include + +extern keymap_config_t keymap_config; + +// Automatic Layer ID: +enum layer_names { + _QWERTY, // OS-side Colemak. Default. + _COLEMAK, // Keyboard-side Colemak. Portability, emergency. + _NUMERIC +}; + +// Shorthand: +#define LAYER_N MO(_NUMERIC) +#define LAYER_C TG(_COLEMAK) +#define PASTE LSFT(KC_INS) // Terminal-compatible paste. +#define SLQ RALT(KC_9) // Single left-side quotation mark (in Colemak). +#define SRQ RALT(KC_0) +#define EMDASH RALT(LSFT(KC_MINUS)) // Em dash character (in Colemak). +#define BK_LCTL CTL_T(KC_LBRACKET) +#define BK_RCTL RCTL_T(KC_RBRACKET) +// TODO: Mod-tap ALT with a curvilinear brace. +// https://github.com/qmk/qmk_firmware/pull/2055 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT_62key( + KC_VOLD, KC_VOLU, CM_W, CM_F, CM_P, CM_G, + KC_TAB, CM_Q, CM_R, CM_S, CM_T, CM_D, + KC_BSPC, CM_A, CM_X, CM_C, CM_V, CM_B, + SLQ, CM_Z, KC_HOME, KC_PGUP, KC_END, + KC_PGDN, KC_ENT, KC_SPC, + KC_LSPO, KC_LGUI, KC_MINS, + BK_LCTL, KC_LALT, + + CM_J, CM_L, CM_U, CM_Y, KC_MPLY, KC_MUTE, + CM_H, CM_N, CM_E, CM_I, CM_SCLN, KC_BSLS, + CM_K, CM_M, KC_COMM, KC_DOT, CM_O, KC_QUOT, + KC_LEFT, KC_UP, KC_RGHT, KC_SLSH, SRQ, + KC_DEL, KC_ESC, KC_DOWN, + KC_EQL, LAYER_N, KC_RSPC, + KC_RALT, BK_RCTL +), + +[_COLEMAK] = LAYOUT_62key( + _______, _______, KC_W, KC_F, KC_P, KC_G, + _______, KC_Q, KC_R, KC_S, KC_T, KC_D, + _______, KC_A, KC_X, KC_C, KC_V, KC_B, + _______, KC_Z, _______, _______, _______, + _______, _______, _______, + _______, _______, _______, + _______, _______, + + KC_J, KC_L, KC_U, KC_Y, _______, _______, + KC_H, KC_N, KC_E, KC_I, KC_SCLN, _______, + KC_K, KC_M, _______, _______, KC_O, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______, + _______, _______ +), + +[_NUMERIC] = LAYOUT_62key( + LAYER_C, KC_INS, KC_F2, KC_F3, KC_F4, KC_F5, + KC_F12, KC_F1, KC_2, KC_3, KC_4, KC_5, + _______, KC_1, KC_AT, KC_HASH, KC_DLR, KC_PERC, + KC_GRV, KC_EXLM, KC_BTN1, KC_WH_U, KC_BTN2, + KC_WH_D, RGB_MOD, _______, + _______, _______, EMDASH, + _______, _______, + + KC_F6, KC_F7, KC_F8, KC_F9, RESET, KC_WAKE, // * + KC_6, KC_7, KC_8, KC_9, KC_F10, KC_F11, + KC_CIRC, KC_AMPR, KC_ASTR, KC_APP, KC_0, PASTE, + KC_MS_L, KC_MS_U, KC_MS_R, KC_PSCR, RGB_TOG, + KC_ACL1, KC_ACL2, KC_MS_D, + KC_ACL0, _______, _______, + _______, _______ +) +}; +// *KC_WAKE: Used in place of KC_SLEP because X11 with i3 on prerelease +// Debian 10 was seeing duplicate keypress and release events for sleep +// (regardless of i3 binding), which ruined the function. + + +/* +The rest is all about lighting control. +The logic here represents a pretty poor compromise solution between the +following concerns: + +- Feedback on active modifiers. +- Flexibility: Both sides of the keyboard are interchangeable. +- Regular QMK RBG lighting modes. Specifically, Knight and Xmas. + +Currently, the last item suffers, because the first two seem to require +calling a function that implements the RGBLIGHT_SPLIT_SET_CHANGE_HSVS macro, +which most of the rgblight.c functions do not. In particular, functions that +target an individual LED do not do so correctly across the wire, so instead +we let HSV vary without ever targeting LEDs. +*/ + +// How long to wait between animation steps for "Knight" animation: +const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {255, 200, 100}; + +bool _initialized = false; +bool _leds_dirty = false; + +void modal_leds(void) { + uint8_t mods = get_mods(); + uint16_t hue = 355; // Rough match to printed case. + uint8_t saturation = 255; + uint8_t value = 0; + if (layer_state_is(_COLEMAK)) { hue -= 50; saturation -= 20; value += 20; }; + if (layer_state_is(_NUMERIC)) { value += 30; }; + if (mods & MOD_MASK_SHIFT) { saturation -= 20; value += 30; }; + if (mods & MOD_MASK_ALT) { hue -= 100; saturation -= 20; value += 30; }; + if (mods & MOD_MASK_CTRL) { hue -= 200; saturation -= 20; value += 30; }; + // rgblight_sethsv_eeprom_helper is not a great API function but it does + // affect both halves of a split keyboard. + rgblight_sethsv_eeprom_helper(hue, saturation, value, false); + _leds_dirty = false; +} + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { + if (_leds_dirty) { modal_leds(); }; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (!_initialized) { + // Static lighting is amenable to customization. + rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); + _initialized = true; + }; + if (keycode == KC_WAKE) { + // Turn the lights off before going to sleep. + rgblight_sethsv_eeprom_helper(0, 0, 0, false); + } else { + _leds_dirty = true; + }; + return true; +} diff --git a/keyboards/handwired/dactyl_manuform/dmote/62key/rules.mk b/keyboards/handwired/dactyl_manuform/dmote/62key/rules.mk new file mode 100644 index 000000000..28d0bfb5c --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/dmote/62key/rules.mk @@ -0,0 +1,5 @@ +# Build-process overrides for the DMOTE. +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +RGBLIGHT_ENABLE = yes # Needed for the C linker with lighting control. +COMMAND_ENABLE = no # Not a good combo with Space Cadet shift. diff --git a/keyboards/handwired/dactyl_manuform/dmote/config.h b/keyboards/handwired/dactyl_manuform/dmote/config.h new file mode 100644 index 000000000..b8c5759db --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/dmote/config.h @@ -0,0 +1,3 @@ +#pragma once + +#include "config_common.h" diff --git a/keyboards/handwired/dactyl_manuform/dmote/readme.md b/keyboards/handwired/dactyl_manuform/dmote/readme.md new file mode 100644 index 000000000..7aff2df52 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/dmote/readme.md @@ -0,0 +1,16 @@ +DMOTE +====== + +The “Dactyl-ManuForm: Opposable Thumb Edition” is made from a Clojure +application maintained [here](https://github.com/veikman/dactyl-keyboard). +The application supports varied physical layouts and therefore matrices. +This physical variability is its main feature; its QMK firmware is ordinary. + +Consult the general [Dactyl-ManuForm readme](../readme.md). + +## The `62key` layout + +This folder represents the default build target of the Clojure application +as of its version 0.4.0. The default keymap for this layout has a QWERTY base +layer but is intended for running Colemak on the OS side with the i3 tiling +window manager. It’s also got a layer that forces Colemak from the QMK side. From 44f4338688930d341281152bd7c5c88d1830d2af Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Thu, 6 Jun 2019 20:01:22 -0700 Subject: [PATCH 195/341] Fix debounce conflicts in a few boards --- keyboards/clueboard/66_hotswap/gen1/config.h | 2 +- keyboards/hadron/ver3/config.h | 6 +++--- keyboards/planck/ez/config.h | 2 +- keyboards/planck/rev6/config.h | 2 +- keyboards/preonic/rev3/config.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/keyboards/clueboard/66_hotswap/gen1/config.h b/keyboards/clueboard/66_hotswap/gen1/config.h index 795adecd5..ea01a078b 100644 --- a/keyboards/clueboard/66_hotswap/gen1/config.h +++ b/keyboards/clueboard/66_hotswap/gen1/config.h @@ -52,7 +52,7 @@ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 6 +// #define DEBOUNCE 6 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/hadron/ver3/config.h b/keyboards/hadron/ver3/config.h index 82081ba43..5e44b27ae 100644 --- a/keyboards/hadron/ver3/config.h +++ b/keyboards/hadron/ver3/config.h @@ -48,7 +48,7 @@ #define ENCODERS_PAD_A { B13 } #define ENCODERS_PAD_B { B14 } - + //Audio #undef AUDIO_VOICES #undef C6_AUDIO @@ -79,7 +79,7 @@ #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 6 +// #define DEBOUNCE 6 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE @@ -155,7 +155,7 @@ #define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ /* default 3V ERM vibration motor voltage and library*/ -#if FB_ERM_LRA == 0 +#if FB_ERM_LRA == 0 #define RATED_VOLTAGE 3 #define V_RMS 2.3 #define V_PEAK 3.30 diff --git a/keyboards/planck/ez/config.h b/keyboards/planck/ez/config.h index c449d1719..142382dab 100644 --- a/keyboards/planck/ez/config.h +++ b/keyboards/planck/ez/config.h @@ -52,7 +52,7 @@ #undef C6_AUDIO /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 6 +// #define DEBOUNCE 6 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/planck/rev6/config.h b/keyboards/planck/rev6/config.h index 4713d9d23..841a62190 100644 --- a/keyboards/planck/rev6/config.h +++ b/keyboards/planck/rev6/config.h @@ -52,7 +52,7 @@ #undef C6_AUDIO /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 6 +// #define DEBOUNCE 6 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/preonic/rev3/config.h b/keyboards/preonic/rev3/config.h index c37f263ad..b2a53ee65 100644 --- a/keyboards/preonic/rev3/config.h +++ b/keyboards/preonic/rev3/config.h @@ -52,7 +52,7 @@ #undef C6_AUDIO /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 6 +// #define DEBOUNCE 6 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE From e495574670b27602891936f3a4baf4c84e2f0481 Mon Sep 17 00:00:00 2001 From: Pavlos Vinieratos Date: Fri, 7 Jun 2019 15:44:46 +0200 Subject: [PATCH 196/341] use mods (#6095) --- keyboards/ergodox_ez/keymaps/pvinis/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/ergodox_ez/keymaps/pvinis/keymap.c b/keyboards/ergodox_ez/keymaps/pvinis/keymap.c index 9943886e2..dc804d632 100644 --- a/keyboards/ergodox_ez/keymaps/pvinis/keymap.c +++ b/keyboards/ergodox_ez/keymaps/pvinis/keymap.c @@ -94,7 +94,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [LR_QWERTY] = LAYOUT_ergodox_pretty_wrapper( _______, ________________NUMBERS_L__________________, _______, KC_MINS, ________________NUMBERS_R__________________, KC_EQL , _______, _________________QWERTY_L1_________________, KC_LBRC, KC_RBRC, _________________QWERTY_R1_________________, _______, - _______, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, _______, + _______, _____________MOD_QWERTY_L2_________________, _____________MOD_QWERTY_R2_________________, _______, _______, _________________QWERTY_L3_________________, KC_LPRN, KC_RPRN, _________________QWERTY_R3_________________, _______, _______, KC_GRV, _______, _______, _______, _______, _______, _______, KC_QUOT , _______, _______, _______, _______, _______, From c70016eee55db9f7e37a312922c509c670434461 Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Fri, 7 Jun 2019 14:58:23 -0500 Subject: [PATCH 197/341] [Keymap] Set a short TAP_CODE_DELAY so media keys work (#6097) A delay of 10ms seems sufficient. Otherwise, media keys tapped from the encoder of my BDN9 macropad only seem to get picked up by the OS (Windows 10) some of the time. --- users/bcat/config.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/users/bcat/config.h b/users/bcat/config.h index a29aded71..c5f731b73 100644 --- a/users/bcat/config.h +++ b/users/bcat/config.h @@ -1,3 +1,8 @@ +/* Delay between tap_code register and unregister to fix flaky media keys. */ +#undef TAP_CODE_DELAY + +#define TAP_CODE_DELAY 10 + /* Turn off RGB lighting when the host goes to sleep. */ #define RGBLIGHT_SLEEP From e86298fbe263de642dc01cb12b63f4ef912b82ed Mon Sep 17 00:00:00 2001 From: Domantas Petrauskas Date: Fri, 7 Jun 2019 23:21:24 +0300 Subject: [PATCH 198/341] [Keymap] Update jj40:cockpit keymap (#6089) * Add JJ40 Cockpit keymap * Fix lower layer symbols * Improve documentation JJ40 Cockpit * Add screen backlight controls jj40:cockpit * Update docs jj40:cockpit --- keyboards/jj40/keymaps/cockpit/keymap.c | 12 ++++----- keyboards/jj40/keymaps/cockpit/readme.md | 33 ++++++++++++------------ 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/keyboards/jj40/keymaps/cockpit/keymap.c b/keyboards/jj40/keymaps/cockpit/keymap.c index 12ed62b6b..34c6c861e 100644 --- a/keyboards/jj40/keymaps/cockpit/keymap.c +++ b/keyboards/jj40/keymaps/cockpit/keymap.c @@ -120,11 +120,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | RGB | RGB | RGB | RGB | BL | BL | BL | | | | | - * | Caps | Togl | Hue+ | Sat+ | Brt+ | Togl |Breath| Brt+ | | | | Vol+ | + * | | RGB | RGB | RGB | RGB | BL | BL | BL | | Scr | | | + * | Caps | Togl | Hue+ | Sat+ | Brt+ | Togl |Breath| Brt+ | | Brt+ | | Vol+ | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | RGB | RGB | RGB | WWW | WWW | BL | | | | | - * |Shift | Term | Hue- | Sat- | Brt- | < | > | Brt- | | |PrScr | Vol- | + * | | | RGB | RGB | RGB | WWW | WWW | BL | | Scr | | | + * |Shift | Term | Hue- | Sat- | Brt- | < | > | Brt- | | Brt- |PrScr | Vol- | * |------+------+------+------+------+------+------+------+------+------+------+------| * | |||||||| RGB | | | | | | | | | * | Ctrl |||Fn||| Mode | Alt | | Space |MPrev |MStop |MNext |MPlay | Lock | @@ -132,8 +132,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_FUNC] = LAYOUT_planck_mit( \ 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_CAPS, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, BL_TOGG, BL_BRTG, BL_INC, _______, _______, _______, KC_VOLU, \ - KC_LSFT, KC_CALC, RGB_HUD, RGB_SAD, RGB_VAD, KC_WBAK, KC_WFWD, BL_DEC, _______, _______, KC_PSCR, KC_VOLD, \ + KC_CAPS, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, BL_TOGG, BL_BRTG, BL_INC, _______, KC_BRIU, _______, KC_VOLU, \ + KC_LSFT, KC_CALC, RGB_HUD, RGB_SAD, RGB_VAD, KC_WBAK, KC_WFWD, BL_DEC, _______, KC_BRID, KC_PSCR, KC_VOLD, \ KC_LCTL, _______, RGB_MOD, KC_LALT, _______, KC_SPC, KC_MPRV, KC_MSTP, KC_MNXT, KC_MPLY, CP_LOCK \ ) }; diff --git a/keyboards/jj40/keymaps/cockpit/readme.md b/keyboards/jj40/keymaps/cockpit/readme.md index 37bd47b1d..766a3c93b 100644 --- a/keyboards/jj40/keymaps/cockpit/readme.md +++ b/keyboards/jj40/keymaps/cockpit/readme.md @@ -18,32 +18,31 @@ | | | | | | | | | | | | | | :-------: | :----: | :----: | :----: | :-------: | :----: | :----: | :----: | :----: | :----: | :-----: | :------: | | ~
\` | Ą
ą | Č
č | Ę
ę | Ė
ė | Į
į | Š
š | Ų
ų | Ū
ū | Ž
ž | \_
- |
Bksp | -|
Tab |
! |
@ |
# |
$ |
% |
^ |
& |
\* |
( |
) |
Del | +|
Tab |
! |
@ |
# |
\$ |
% |
^ |
& |
\* |
( |
) |
Del | |
Shift |
= |
+ |
- |
\| | {
[ | }
] |
< |
> |
{ |
} |
Ins | | Ctrl | | | Alt | **Lower** | Sp | ace | | Home | PgDn | PgUp | End | ### Raise -| | | | | | | | | | | | | -| :-------: | :----: | :-----: | :----: | :----: | :----: | :----: | :-------: | :-----: | :----: | :----: | :-------: | -| ~
\` | !
1 | @
2 | #
3 | $
4 | %
5 | ^
6 | &
7 | \*
8 | (
9 | )
0 |
Bksp | -|
Tab | $
4 | %
5 | ^
6 | | | | | | | | \|
\ | -|
Shift | &
7 | \*
8 | (
9 | )
0 | | | | <
, | >
. | ?
/ |
Enter | -| Ctrl | | | Alt | | Sp | ace | **Raise** | Left | Down | Up | Right | +| | | | | | | | | | | | | +| :-------: | :-----: | :-----: | :----: | :-----: | :----: | :----: | :-------: | :-----: | :----: | :----: | :-------: | +| ~
\` | !
1 | @
2 | #
3 | \$
4 | %
5 | ^
6 | &
7 | \*
8 | (
9 | )
0 |
Bksp | +|
Tab | \$
4 | %
5 | ^
6 | | | | | | | | \|
\ | +|
Shift | &
7 | \*
8 | (
9 | )
0 | | | | <
, | >
. | ?
/ |
Enter | +| Ctrl | | | Alt | | Sp | ace | **Raise** | Left | Down | Up | Right | ### Function -* Caps does not work. Might be an issue with my laptop, not JJ40 specific. -* Backlight breathing does not work. -* **Term** button is bound to `Calculator`. I have set this button as a shortcut to open a terminal. -* **Lock** is a shortcut for `Alt + L` +- Backlight breathing does not work. +- **Term** button is bound to `Calculator`. I have set this button as a shortcut to open a terminal. +- **Lock** is a shortcut for `Alt + L` -| | | | | | | | | | | | | -| :-------: | :---------: | :---------: | :---------: | :---------: | :--------: | :----------: | :--------: | :----: | :-----: | :-----: | :------: | -|
F1 |
F2 |
F3 |
F4 |
F5 |
F6 |
F7 |
F8 |
F9 |
F10 |
F11 |
F12 | -|
Caps | RGB
Togl | RGB
Hue+ | RGB
Sat+ | RGB
Brt+ | BL
Togl | BL
Breath | BL
Brt+ | | | |
Vol+ | -|
Shift |
Term | RGB
Hue- | RGB
Sat- | RGB
Brt- | WWW
< | WWW
> | BL
Brt- | | | PrScr |
Vol- | -| Ctrl | **Fn** | RGB
Mode | Alt | | Sp | ace | MPrev | MStop | MNext | MPlay | Lock | +| | | | | | | | | | | | | +| :-------: | :---------: | :---------: | :---------: | :---------: | :--------: | :----------: | :--------: | :----: | :---------: | :-----: | :------: | +|
F1 |
F2 |
F3 |
F4 |
F5 |
F6 |
F7 |
F8 |
F9 |
F10 |
F11 |
F12 | +|
Caps | RGB
Togl | RGB
Hue+ | RGB
Sat+ | RGB
Brt+ | BL
Togl | BL
Breath | BL
Brt+ | | Scr
Brt+ | |
Vol+ | +|
Shift |
Term | RGB
Hue- | RGB
Sat- | RGB
Brt- | WWW
< | WWW
> | BL
Brt- | | Scr
Brt- | PrScr |
Vol- | +| Ctrl | **Fn** | RGB
Mode | Alt | | Sp | ace | MPrev | MStop | MNext | MPlay | Lock | ## Usage From 2a71bc9fde59a686bdae85beb74ab3358ba996ad Mon Sep 17 00:00:00 2001 From: jotix <47826561+jotix@users.noreply.github.com> Date: Fri, 7 Jun 2019 17:22:30 -0300 Subject: [PATCH 199/341] [Keymap] jotix ortho_4x12 layout change (#6088) --- layouts/community/ortho_4x12/jotix/keymap.c | 27 ++++++++++---------- layouts/community/ortho_4x12/jotix/readme.md | 2 +- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/layouts/community/ortho_4x12/jotix/keymap.c b/layouts/community/ortho_4x12/jotix/keymap.c index b513272d3..8aed3b765 100644 --- a/layouts/community/ortho_4x12/jotix/keymap.c +++ b/layouts/community/ortho_4x12/jotix/keymap.c @@ -11,12 +11,11 @@ enum layers { #define LOWER TT(_LOWER) #define RAISE TT(_RAISE) -#define TAB_ADJ LT(_ADJUST, KC_TAB) #define FN_LAYER LAYOUT_ortho_4x12 (\ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,\ - KC_CAPS, KC_VOLD, KC_MUTE, KC_VOLU, KC_HOME, KC_PGUP, KC_LBRC, KC_RBRC, KC_BSLS, KC_QUOT, _______, _______,\ - _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_END, KC_PGDN, KC_MINS, KC_EQL, _______, _______, _______, _______,\ + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,\ + _______, KC_VOLD, KC_MUTE, KC_VOLU, KC_HOME, KC_PGUP, KC_LBRC, KC_RBRC, KC_BSLS, KC_QUOT, _______, _______,\ + _______, KC_GRV, KC_TILD, KC_CAPS, KC_END, KC_PGDN, KC_MINS, KC_EQL, _______, _______, _______, _______,\ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______\ ), @@ -26,18 +25,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * | esc | Q | W | E | R | T | Y | U | I | O | P | bksp | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * |tab/adj | A | S | D | F | G | H | J | K | L | ; | enter | + * | tab | A | S | D | F | G | H | J | K | L | ; | enter | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | lshift | Z | X | C | V | B | N | M | , | . | up | / | + * | lshift | Z | X | C | V | B | N | M | , | . | up | del | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | lctrl | lgui | lalt | ralt | lower | space | space | raise | del | right | down | right | + * | lctrl | lgui | lalt | ralt | lower | space | space | raise | / | right | down | right | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ */ [_QWERTY] = LAYOUT_ortho_4x12 ( KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - TAB_ADJ, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH, - KC_LCTL, KC_LGUI, KC_LALT, KC_RALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_RALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT ), [_LOWER] = FN_LAYER @@ -48,15 +47,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * Adjust */ [_ADJUST] = LAYOUT_ortho_4x12 ( - _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, _______, _______, _______, _______, RESET, - _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, _______, _______, _______, _______, _______, - _______, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, + _______, RESET, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, _______, _______, + _______, _______, _______, _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, _______, _______, + _______, _______, _______, _______, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; uint32_t layer_state_set_user(uint32_t state) { - + state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); #ifdef JOTANCK_LEDS switch (biton32(state)) { case _LOWER: diff --git a/layouts/community/ortho_4x12/jotix/readme.md b/layouts/community/ortho_4x12/jotix/readme.md index dafc22ecf..3163029c9 100644 --- a/layouts/community/ortho_4x12/jotix/readme.md +++ b/layouts/community/ortho_4x12/jotix/readme.md @@ -1,6 +1,6 @@ # Jotix ortho 4x12 keymap -![keymap](https://i.imgur.com/aQQo4eb.jpg) +![keymap](https://i.imgur.com/6fW4Uf4.jpg) Tested on: From 2cb32328b636be32e74786694a4d791548e08d1a Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Fri, 7 Jun 2019 13:42:40 -0700 Subject: [PATCH 200/341] [Keyboard] New Keyboard(s): Red Scarf II+ RS68 and RS78 (#6084) * martenwuut's original code commit * delete random directory that is the same as the parent directory * get this compiling * update readmes * add manufacturer * fix up the keymap error and replace KC_A with KC_1 * add verc support which is basically just at trimmed down verb * update keymap readme to specify which redscarf it is * add parent level readme * fix grammar * fix up readmes and put in alternative name for PCBs * add configurator support for the ver.c pcb * add configurator support for Ver.B (RS78) pcb * add iso support for Ver.C (RS68) * change DEBOUNCING_DELAY to just DEBOUNCE * remove K2C to fit the default layouts * fix keymap * fixup configurator layout with split backspace --- keyboards/redscarf_iiplus/readme.md | 14 + keyboards/redscarf_iiplus/verb/config.h | 252 +++++++++++ keyboards/redscarf_iiplus/verb/info.json | 16 + .../verb/keymaps/default/keymap.c | 27 ++ .../verb/keymaps/default/readme.md | 1 + keyboards/redscarf_iiplus/verb/matrix.c | 391 ++++++++++++++++++ keyboards/redscarf_iiplus/verb/readme.md | 23 ++ keyboards/redscarf_iiplus/verb/rules.mk | 83 ++++ keyboards/redscarf_iiplus/verb/verb.c | 51 +++ keyboards/redscarf_iiplus/verb/verb.h | 59 +++ keyboards/redscarf_iiplus/verc/config.h | 252 +++++++++++ keyboards/redscarf_iiplus/verc/info.json | 16 + .../verc/keymaps/default/keymap.c | 35 ++ .../verc/keymaps/default/readme.md | 1 + keyboards/redscarf_iiplus/verc/matrix.c | 391 ++++++++++++++++++ keyboards/redscarf_iiplus/verc/readme.md | 23 ++ keyboards/redscarf_iiplus/verc/rules.mk | 85 ++++ keyboards/redscarf_iiplus/verc/verc.c | 51 +++ keyboards/redscarf_iiplus/verc/verc.h | 61 +++ 19 files changed, 1832 insertions(+) create mode 100644 keyboards/redscarf_iiplus/readme.md create mode 100755 keyboards/redscarf_iiplus/verb/config.h create mode 100644 keyboards/redscarf_iiplus/verb/info.json create mode 100755 keyboards/redscarf_iiplus/verb/keymaps/default/keymap.c create mode 100755 keyboards/redscarf_iiplus/verb/keymaps/default/readme.md create mode 100755 keyboards/redscarf_iiplus/verb/matrix.c create mode 100755 keyboards/redscarf_iiplus/verb/readme.md create mode 100755 keyboards/redscarf_iiplus/verb/rules.mk create mode 100755 keyboards/redscarf_iiplus/verb/verb.c create mode 100755 keyboards/redscarf_iiplus/verb/verb.h create mode 100755 keyboards/redscarf_iiplus/verc/config.h create mode 100644 keyboards/redscarf_iiplus/verc/info.json create mode 100755 keyboards/redscarf_iiplus/verc/keymaps/default/keymap.c create mode 100755 keyboards/redscarf_iiplus/verc/keymaps/default/readme.md create mode 100755 keyboards/redscarf_iiplus/verc/matrix.c create mode 100755 keyboards/redscarf_iiplus/verc/readme.md create mode 100755 keyboards/redscarf_iiplus/verc/rules.mk create mode 100755 keyboards/redscarf_iiplus/verc/verc.c create mode 100755 keyboards/redscarf_iiplus/verc/verc.h diff --git a/keyboards/redscarf_iiplus/readme.md b/keyboards/redscarf_iiplus/readme.md new file mode 100644 index 000000000..fd67fb8df --- /dev/null +++ b/keyboards/redscarf_iiplus/readme.md @@ -0,0 +1,14 @@ +# Red Scarf II+ + +The Red Scarf II+ is an improved version of the Red Scarf II and is available in four different sizes. + +Ver A (RS Model F): 60% + Numpad on right, and Macro Keys on the left. +Ver B (RS78): 65% + Macro Keys on the left. +Ver C (RS68): 65%. +Ver D (RS77): 60% + Numpad on right. + +For more information please consult [Geekhack](https://geekhack.org/index.php?topic=74400.0) + +The Red Scarf II+ utilizes the same switch matrix across all its different versions. Therefore, firmware created for one will work on another. The caveat is that if you flash firmware built for the smaller boards onto a larger one, you will lose functionality of those extra keys. If you flash firmware built for a larger board onto a smaller one, the keys will operate normally. + +At this time, only the Ver B and the Ver C have been confirmed working with QMK. diff --git a/keyboards/redscarf_iiplus/verb/config.h b/keyboards/redscarf_iiplus/verb/config.h new file mode 100755 index 000000000..3fecdcac3 --- /dev/null +++ b/keyboards/redscarf_iiplus/verb/config.h @@ -0,0 +1,252 @@ +/* +Copyright 2019 Maarten Dekkers + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER RedScarf +#define PRODUCT RedScarfII+ +#define DESCRIPTION QMK Firmware for the RedScarf II+ + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 + + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { } +#define MATRIX_COL_PINS { F4, F1, F0, B3, D0, D1, D4, D5, D6, D7, F7, F6, D2, D3, B6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/redscarf_iiplus/verb/info.json b/keyboards/redscarf_iiplus/verb/info.json new file mode 100644 index 000000000..8466063fc --- /dev/null +++ b/keyboards/redscarf_iiplus/verb/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "Red Scarf II+ Ver.B (RS78)", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 5, + "layouts": { + "LAYOUT_78_ansi": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2.25, "y":0}, {"x":3.25, "y":0}, {"x":4.25, "y":0}, {"x":5.25, "y":0}, {"x":6.25, "y":0}, {"x":7.25, "y":0}, {"x":8.25, "y":0}, {"x":9.25, "y":0}, {"x":10.25, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.25, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2.25, "y":1, "w":1.5}, {"x":3.75, "y":1}, {"x":4.75, "y":1}, {"x":5.75, "y":1}, {"x":6.75, "y":1}, {"x":7.75, "y":1}, {"x":8.75, "y":1}, {"x":9.75, "y":1}, {"x":10.75, "y":1}, {"x":11.75, "y":1}, {"x":12.75, "y":1}, {"x":13.75, "y":1}, {"x":14.75, "y":1}, {"x":15.75, "y":1, "w":1.5}, {"x":17.25, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2.25, "y":2, "w":1.75}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2, "w":2.25}, {"x":17.25, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2.25, "y":3, "w":2.25}, {"x":4.5, "y":3}, {"x":5.5, "y":3}, {"x":6.5, "y":3}, {"x":7.5, "y":3}, {"x":8.5, "y":3}, {"x":9.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3, "w":1.75}, {"x":16.25, "y":3}, {"x":17.25, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2.25, "y":4, "w":1.25}, {"x":3.5, "y":4, "w":1.25}, {"x":4.75, "y":4, "w":1.25}, {"x":6, "y":4, "w":6.25}, {"x":12.25, "y":4}, {"x":13.25, "y":4}, {"x":14.25, "y":4}, {"x":15.25, "y":4}, {"x":16.25, "y":4}, {"x":17.25, "y":4}] + }, + + "LAYOUT_78_iso": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2.25, "y":0}, {"x":3.25, "y":0}, {"x":4.25, "y":0}, {"x":5.25, "y":0}, {"x":6.25, "y":0}, {"x":7.25, "y":0}, {"x":8.25, "y":0}, {"x":9.25, "y":0}, {"x":10.25, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.25, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2.25, "y":1, "w":1.5}, {"x":3.75, "y":1}, {"x":4.75, "y":1}, {"x":5.75, "y":1}, {"x":6.75, "y":1}, {"x":7.75, "y":1}, {"x":8.75, "y":1}, {"x":9.75, "y":1}, {"x":10.75, "y":1}, {"x":11.75, "y":1}, {"x":12.75, "y":1}, {"x":13.75, "y":1}, {"x":14.75, "y":1}, {"x":16, "y":1, "w":1.25, "h":2}, {"x":17.25, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2.25, "y":2, "w":1.75}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":17.25, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2.25, "y":3, "w":1.25}, {"x":3.5, "y":3}, {"x":4.5, "y":3}, {"x":5.5, "y":3}, {"x":6.5, "y":3}, {"x":7.5, "y":3}, {"x":8.5, "y":3}, {"x":9.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3, "w":1.75}, {"x":16.25, "y":3}, {"x":17.25, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2.25, "y":4, "w":1.25}, {"x":3.5, "y":4, "w":1.25}, {"x":4.75, "y":4, "w":1.25}, {"x":6, "y":4, "w":6.25}, {"x":12.25, "y":4}, {"x":13.25, "y":4}, {"x":14.25, "y":4}, {"x":15.25, "y":4}, {"x":16.25, "y":4}, {"x":17.25, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/redscarf_iiplus/verb/keymaps/default/keymap.c b/keyboards/redscarf_iiplus/verb/keymaps/default/keymap.c new file mode 100755 index 000000000..eea39a33b --- /dev/null +++ b/keyboards/redscarf_iiplus/verb/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2019 Maarten Dekkers + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_78_ansi( + KC_F1, KC_F2, KC_ESC, 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_GRV, KC_INS, + KC_F3, KC_F4, 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_DEL, + KC_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_F7, KC_F8, 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_UP, KC_PGDN, + KC_F9, RESET, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT + ) +}; diff --git a/keyboards/redscarf_iiplus/verb/keymaps/default/readme.md b/keyboards/redscarf_iiplus/verb/keymaps/default/readme.md new file mode 100755 index 000000000..b7324c518 --- /dev/null +++ b/keyboards/redscarf_iiplus/verb/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for the Red Scarf II+ ver B. \ No newline at end of file diff --git a/keyboards/redscarf_iiplus/verb/matrix.c b/keyboards/redscarf_iiplus/verb/matrix.c new file mode 100755 index 000000000..54b0f3a9a --- /dev/null +++ b/keyboards/redscarf_iiplus/verb/matrix.c @@ -0,0 +1,391 @@ +/* +Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar + +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 . +*/ +#include +#include +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +#ifdef MATRIX_MASKED + extern const matrix_row_t matrix_mask[]; +#endif + +#ifdef DIRECT_PINS +static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS; +#elif (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) +// static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; +#endif + +/* matrix state(1:on, 0:off) */ +static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values +static matrix_row_t matrix[MATRIX_ROWS]; //debounced values + +__attribute__ ((weak)) +void matrix_init_quantum(void) { + matrix_init_kb(); +} + +__attribute__ ((weak)) +void matrix_scan_quantum(void) { + matrix_scan_kb(); +} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +//Deprecated. +bool matrix_is_modified(void) +{ + if (debounce_active()) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1< + * + * 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 . + */ +#include "verb.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); + led_init_ports(); +} + +void led_init_ports(void) { + setPinOutput(C7); + setPinOutput(E6); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(C7); + } else { + writePinHigh(C7); + } + + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(E6); + } else { + writePinHigh(E6); + } + + led_set_user(usb_led); +} diff --git a/keyboards/redscarf_iiplus/verb/verb.h b/keyboards/redscarf_iiplus/verb/verb.h new file mode 100755 index 000000000..d86a6c4c6 --- /dev/null +++ b/keyboards/redscarf_iiplus/verb/verb.h @@ -0,0 +1,59 @@ +/* Copyright 2019 Maarten Dekkers + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_78_ansi( \ + K51, K52, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2C, K0E, \ + K53, K54, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K55, K56, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K57, K58, K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K59, K5A, K40, K41, K42, K49, K4A, K4B, K47, K4C, K4D, K4E \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, XXX, XXX, XXX, XXX, K47, XXX, K49, K4A, K4B, K4C, K4D, K4E }, \ + { XXX, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, XXX, XXX, XXX, XXX } \ +} +#define LAYOUT_78_iso( \ + K51, K52, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2C, K0E, \ + K53, K54, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ + K55, K56, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K1D, K2D, K2E, \ + K57, K58, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K59, K5A, K40, K41, K42, K49, K4A, K4B, K47, K4C, K4D, K4E \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, XXX, XXX, XXX, XXX, K47, XXX, K49, K4A, K4B, K4C, K4D, K4E }, \ + { XXX, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, XXX, XXX, XXX, XXX } \ +} diff --git a/keyboards/redscarf_iiplus/verc/config.h b/keyboards/redscarf_iiplus/verc/config.h new file mode 100755 index 000000000..3fecdcac3 --- /dev/null +++ b/keyboards/redscarf_iiplus/verc/config.h @@ -0,0 +1,252 @@ +/* +Copyright 2019 Maarten Dekkers + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER RedScarf +#define PRODUCT RedScarfII+ +#define DESCRIPTION QMK Firmware for the RedScarf II+ + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 + + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { } +#define MATRIX_COL_PINS { F4, F1, F0, B3, D0, D1, D4, D5, D6, D7, F7, F6, D2, D3, B6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/redscarf_iiplus/verc/info.json b/keyboards/redscarf_iiplus/verc/info.json new file mode 100644 index 000000000..210b399ba --- /dev/null +++ b/keyboards/redscarf_iiplus/verc/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "Red Scarf II+ Ver.C (RS68)", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + }, + + "LAYOUT_65_iso": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.75, "y":1, "w":1.25, "h":2}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/redscarf_iiplus/verc/keymaps/default/keymap.c b/keyboards/redscarf_iiplus/verc/keymaps/default/keymap.c new file mode 100755 index 000000000..aad191328 --- /dev/null +++ b/keyboards/redscarf_iiplus/verc/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* Copyright 2019 Maarten Dekkers + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_65_ansi( + KC_ESC, 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_INS, + 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_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + 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_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT + ), + + [1] = LAYOUT_65_ansi( + RESET, 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/redscarf_iiplus/verc/keymaps/default/readme.md b/keyboards/redscarf_iiplus/verc/keymaps/default/readme.md new file mode 100755 index 000000000..c792f1d12 --- /dev/null +++ b/keyboards/redscarf_iiplus/verc/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for the Red Scarf II+ ver C \ No newline at end of file diff --git a/keyboards/redscarf_iiplus/verc/matrix.c b/keyboards/redscarf_iiplus/verc/matrix.c new file mode 100755 index 000000000..54b0f3a9a --- /dev/null +++ b/keyboards/redscarf_iiplus/verc/matrix.c @@ -0,0 +1,391 @@ +/* +Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar + +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 . +*/ +#include +#include +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +#ifdef MATRIX_MASKED + extern const matrix_row_t matrix_mask[]; +#endif + +#ifdef DIRECT_PINS +static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS; +#elif (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) +// static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; +#endif + +/* matrix state(1:on, 0:off) */ +static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values +static matrix_row_t matrix[MATRIX_ROWS]; //debounced values + +__attribute__ ((weak)) +void matrix_init_quantum(void) { + matrix_init_kb(); +} + +__attribute__ ((weak)) +void matrix_scan_quantum(void) { + matrix_scan_kb(); +} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +//Deprecated. +bool matrix_is_modified(void) +{ + if (debounce_active()) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1< + * + * 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 . + */ +#include "verc.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); + led_init_ports(); +} + +void led_init_ports(void) { + setPinOutput(C7); + setPinOutput(E6); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(C7); + } else { + writePinHigh(C7); + } + + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(E6); + } else { + writePinHigh(E6); + } + + led_set_user(usb_led); +} diff --git a/keyboards/redscarf_iiplus/verc/verc.h b/keyboards/redscarf_iiplus/verc/verc.h new file mode 100755 index 000000000..6da76134d --- /dev/null +++ b/keyboards/redscarf_iiplus/verc/verc.h @@ -0,0 +1,61 @@ +/* Copyright 2019 Maarten Dekkers + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_65_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K49, K4A, K4B, K47, K4C, K4D, K4E \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D, K2E }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, XXX, XXX, XXX, XXX, K47, XXX, K49, K4A, K4B, K4C, K4D, K4E }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } \ +} + +#define LAYOUT_65_iso( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K1D, K2D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K49, K4A, K4B, K47, K4C, K4D, K4E \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, XXX, XXX, XXX, XXX, K47, XXX, K49, K4A, K4B, K4C, K4D, K4E }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } \ +} + From f6e2716dfb17714d67cd9f1b2211620ae045442a Mon Sep 17 00:00:00 2001 From: jotix Date: Fri, 7 Jun 2019 18:14:03 -0300 Subject: [PATCH 201/341] jotix layout add KC_GESC --- layouts/community/ortho_4x12/jotix/keymap.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/layouts/community/ortho_4x12/jotix/keymap.c b/layouts/community/ortho_4x12/jotix/keymap.c index 8aed3b765..de3093d25 100644 --- a/layouts/community/ortho_4x12/jotix/keymap.c +++ b/layouts/community/ortho_4x12/jotix/keymap.c @@ -15,7 +15,7 @@ enum layers { #define FN_LAYER LAYOUT_ortho_4x12 (\ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,\ _______, KC_VOLD, KC_MUTE, KC_VOLU, KC_HOME, KC_PGUP, KC_LBRC, KC_RBRC, KC_BSLS, KC_QUOT, _______, _______,\ - _______, KC_GRV, KC_TILD, KC_CAPS, KC_END, KC_PGDN, KC_MINS, KC_EQL, _______, _______, _______, _______,\ + _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_END, KC_PGDN, KC_MINS, KC_EQL, _______, _______, _______, _______,\ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______\ ), @@ -23,20 +23,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* qwerty * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | esc | Q | W | E | R | T | Y | U | I | O | P | bksp | + * | gesc | Q | W | E | R | T | Y | U | I | O | P | bksp | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * | tab | A | S | D | F | G | H | J | K | L | ; | enter | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | lshift | Z | X | C | V | B | N | M | , | . | up | del | + * | lshift | Z | X | C | V | B | N | M | , | . | up | / | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | lctrl | lgui | lalt | ralt | lower | space | space | raise | / | right | down | right | + * | lctrl | lgui | lalt | ralt | lower | space | space | raise | del | right | down | right | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ */ [_QWERTY] = LAYOUT_ortho_4x12 ( - 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_GESC, 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_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_DEL, - KC_LCTL, KC_LGUI, KC_LALT, KC_RALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH, + KC_LCTL, KC_LGUI, KC_LALT, KC_RALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT ), [_LOWER] = FN_LAYER @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_ortho_4x12 ( _______, RESET, _______, _______, 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_CAPS, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; From 54ac80d4a5a34661283b413e14f88e955bedeeef Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Fri, 7 Jun 2019 19:01:13 -0500 Subject: [PATCH 202/341] Add 60_ansi_split_bs_rshift layout to DZ60, with a new keymap for the same (#6096) * Add 60_ansi_split_bs_rshift layout to DZ60 I know there's already a lot of DZ60 layout macros, and #4668 suggests they should be refactored at some point, but since this is one of the standard layouts already in QMK that this PCB supports, I figured it was okay to add so that DZ60 keyboards can share this layout with other keyboards. * New 60% ANSI split backspace/right-shift layout I'm using this on a DZ60, but it should work fine on most 60% PCBs. It's basically a HHKB layout with a standard ANSI bottom row (3x 1.25U mods, 6.25U spacebar, 4x 1.25U mods). --- keyboards/dz60/dz60.h | 27 ++++++++++++ keyboards/dz60/rules.mk | 2 +- .../60_ansi_split_bs_rshift/bcat/keymap.c | 42 +++++++++++++++++++ .../60_ansi_split_bs_rshift/bcat/readme.md | 20 +++++++++ 4 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c create mode 100644 layouts/community/60_ansi_split_bs_rshift/bcat/readme.md diff --git a/keyboards/dz60/dz60.h b/keyboards/dz60/dz60.h index f435c4072..35f3b9f09 100644 --- a/keyboards/dz60/dz60.h +++ b/keyboards/dz60/dz60.h @@ -88,6 +88,33 @@ { KC_NO, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, KC_NO, k4b, KC_NO, k4d, KC_NO } \ } +/* LAYOUT_60_ansi_split_bs_rshift + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │0e │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │1d │1e │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │20 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │2d │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │30 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3d │3e │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤ + * │40 │41 │43 │46 │4a │4b │4d │4e │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ +*/ +#define LAYOUT_60_ansi_split_bs_rshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, \ + k40, k41, k43, k46, k4a, k4b, k4d, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ + { k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ + { k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3d, k3e }, \ + { k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4a, k4b, KC_NO, k4d, k4e } \ +} + // 带方向配列 /* Directional arrangement | LAYOUT_directional * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ diff --git a/keyboards/dz60/rules.mk b/keyboards/dz60/rules.mk index f290c305e..ed683dbfa 100644 --- a/keyboards/dz60/rules.mk +++ b/keyboards/dz60/rules.mk @@ -55,4 +55,4 @@ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes -LAYOUTS = 60_ansi 60_iso 60_hhkb +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_hhkb 60_iso diff --git a/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c b/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c new file mode 100644 index 000000000..780c13c2f --- /dev/null +++ b/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c @@ -0,0 +1,42 @@ +#include QMK_KEYBOARD_H + +enum layer { + LAYER_DEFAULT, + LAYER_FUNCTION, + LAYER_ADJUST, +}; + +/* Switch to function layer when held. */ +#define LY_FUNC MO(LAYER_FUNCTION) + +/* Switch to adjust layer when held. */ +#define LY_ADJST MO(LAYER_ADJUST) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Default layer: http://www.keyboard-layout-editor.com/#/gists/327b41b5a933b3d44bf60ca9822e85dc */ + [LAYER_DEFAULT] = LAYOUT_60_ansi_split_bs_rshift( + KC_ESC, 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_BSLS, KC_GRV, + 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_BSPC, + 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, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, LY_FUNC, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LY_ADJST, KC_APP, KC_RCTL + ), + + /* Function layer: http://www.keyboard-layout-editor.com/#/gists/c7a55e75285d474b6301140eaf53f915 */ + [LAYER_FUNCTION] = LAYOUT_60_ansi_split_bs_rshift( + _______, 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_INS, KC_DEL, + _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, + KC_CAPS, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, + _______, _______, KC_MUTE, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/6e1068e4f91bbacccaf5ac0acbeec79c */ + [LAYER_ADJUST] = LAYOUT_60_ansi_split_bs_rshift( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md b/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md new file mode 100644 index 000000000..79bff7406 --- /dev/null +++ b/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md @@ -0,0 +1,20 @@ +# bcat's 60% ANSI split backspace/right-shift layout + +This is a hybrid of an HHKB layout and a standard ANSI bottom row. It's nice if +you want to fill out a 60% case with no blockers, or just really want a 6.25U +spacebar. The arrow and navigation keys match a standard HHKB layout (using the +Fn key next to the right shift key), but the media keys are centered around the +WASD cluster instead of the usual HHKB layout. Additionally, the redundant Fn +key on the bottom row activates an adjust layer to control RGB underglow. + +## Default layer + +![Default layer layout](https://i.imgur.com/HM0115k.png) + +## Function layer + +![Function layer layout](https://i.imgur.com/8dr5ktH.png) + +## Adjust layer + +![Adjust layer layout](https://i.imgur.com/78PBNt6.png) From 09968ba035f3bfa4df5b1d142dddfa669aefb2d7 Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Fri, 7 Jun 2019 19:02:05 -0500 Subject: [PATCH 203/341] Fixing OLED Driver for 128x64 displays (#6085) --- docs/feature_oled_driver.md | 9 +++---- drivers/oled/oled_driver.c | 6 ++++- drivers/oled/oled_driver.h | 47 ++++++++++++++++++++++++++++++++++--- 3 files changed, 54 insertions(+), 8 deletions(-) diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md index fcc19515a..144b695b7 100644 --- a/docs/feature_oled_driver.md +++ b/docs/feature_oled_driver.md @@ -108,10 +108,11 @@ void oled_task_user(void) { |`OLED_DISPLAY_CUSTOM` |*Not defined* |Changes the display defines for use with custom displays.
Requires user to implement the below defines. | |`OLED_DISPLAY_WIDTH` |`128` |The width of the OLED display. | |`OLED_DISPLAY_HEIGHT` |`32` |The height of the OLED display. | -|`OLED_MATRIX_SIZE` |`512` |The local buffer size to allocate.
`(OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH)`| -|`OLED_BLOCK_TYPE` |`uint16_t` |The unsigned integer type to use for dirty rendering.| -|`OLED_BLOCK_COUNT` |`16` |The number of blocks the display is divided into for dirty rendering.
`(sizeof(OLED_BLOCK_TYPE) * 8)`| -|`OLED_BLOCK_SIZE` |`32` |The size of each block for dirty rendering
`(OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)`| +|`OLED_MATRIX_SIZE` |`512` |The local buffer size to allocate.
`(OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH)`. | +|`OLED_BLOCK_TYPE` |`uint16_t` |The unsigned integer type to use for dirty rendering. | +|`OLED_BLOCK_COUNT` |`16` |The number of blocks the display is divided into for dirty rendering.
`(sizeof(OLED_BLOCK_TYPE) * 8)`. | +|`OLED_BLOCK_SIZE` |`32` |The size of each block for dirty rendering
`(OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)`. | +|`OLED_COM_PINS` |`COM_PINS_SEQ` |How the SSD1306 chip maps it's memory to display.
Options are `COM_PINS_SEQ`, `COM_PINS_ALT`, `COM_PINS_SEQ_LR`, & `COM_PINS_ALT_LR`. | |`OLED_SOURCE_MAP` |`{ 0, ... N }` |Precalculated source array to use for mapping source buffer to target OLED memory in 90 degree rendering. | |`OLED_TARGET_MAP` |`{ 24, ... N }`|Precalculated target array to use for mapping source buffer to target OLED memory in 90 degree rendering. | diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c index 96ea58ccb..643e52894 100644 --- a/drivers/oled/oled_driver.c +++ b/drivers/oled/oled_driver.c @@ -63,6 +63,10 @@ along with this program. If not, see . #define COM_SCAN_DEC 0xC8 #define DISPLAY_OFFSET 0xD3 #define COM_PINS 0xDA +#define COM_PINS_SEQ 0x02 +#define COM_PINS_ALT 0x12 +#define COM_PINS_SEQ_LR 0x22 +#define COM_PINS_ALT_LR 0x32 // Timing & Driving Commands #define DISPLAY_CLOCK 0xD5 @@ -182,7 +186,7 @@ bool oled_init(uint8_t rotation) { static const uint8_t PROGMEM display_setup2[] = { I2C_CMD, - COM_PINS, 0x02, + COM_PINS, OLED_COM_PINS, CONTRAST, 0x8F, PRE_CHARGE_PERIOD, 0xF1, VCOM_DETECT, 0x40, diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h index ec07f1d9b..abbdde57e 100644 --- a/drivers/oled/oled_driver.h +++ b/drivers/oled/oled_driver.h @@ -24,17 +24,39 @@ along with this program. If not, see . // Expected user to implement the necessary defines #elif defined(OLED_DISPLAY_128X64) // Double height 128x64 +#ifndef OLED_DISPLAY_WIDTH #define OLED_DISPLAY_WIDTH 128 +#endif +#ifndef OLED_DISPLAY_HEIGHT #define OLED_DISPLAY_HEIGHT 64 +#endif +#ifndef OLED_MATRIX_SIZE #define OLED_MATRIX_SIZE (OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH) // 1024 (compile time mathed) - #define OLED_BLOCK_TYPE uint32_t +#endif +#ifndef OLED_BLOCK_TYPE + #define OLED_BLOCK_TYPE uint16_t +#endif +#ifndef OLED_BLOCK_COUNT #define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) // 32 (compile time mathed) +#endif +#ifndef OLED_BLOCK_SIZE #define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) // 32 (compile time mathed) +#endif +#ifndef OLED_COM_PINS + #define OLED_COM_PINS COM_PINS_ALT +#endif // For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays // The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode - #define OLED_SOURCE_MAP { 32, 40, 48, 56 } - #define OLED_TARGET_MAP { 24, 16, 8, 0 } +#ifndef OLED_SOURCE_MAP + #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56 } +#endif +#ifndef OLED_TARGET_MAP + #define OLED_TARGET_MAP { 56, 48, 40, 32, 24, 16, 8, 0 } +#endif + // If OLED_BLOCK_TYPE is uint32_t, these tables would look like: + // #define OLED_SOURCE_MAP { 32, 40, 48, 56 } + // #define OLED_TARGET_MAP { 24, 16, 8, 0 } // If OLED_BLOCK_TYPE is uint16_t, these tables would look like: // #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56 } // #define OLED_TARGET_MAP { 56, 48, 40, 32, 24, 16, 8, 0 } @@ -43,17 +65,36 @@ along with this program. If not, see . // #define OLED_TARGET_MAP { 56, 120, 48, 112, 40, 104, 32, 96, 24, 88, 16, 80, 8, 72, 0, 64 } #else // defined(OLED_DISPLAY_128X64) // Default 128x32 +#ifndef OLED_DISPLAY_WIDTH #define OLED_DISPLAY_WIDTH 128 +#endif +#ifndef OLED_DISPLAY_HEIGHT #define OLED_DISPLAY_HEIGHT 32 +#endif +#ifndef OLED_MATRIX_SIZE #define OLED_MATRIX_SIZE (OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH) // 512 (compile time mathed) +#endif +#ifndef OLED_BLOCK_TYPE #define OLED_BLOCK_TYPE uint16_t // Type to use for segmenting the oled display for smart rendering, use unsigned types only +#endif +#ifndef OLED_BLOCK_COUNT #define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) // 16 (compile time mathed) +#endif +#ifndef OLED_BLOCK_SIZE #define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) // 32 (compile time mathed) +#endif +#ifndef OLED_COM_PINS + #define OLED_COM_PINS COM_PINS_SEQ +#endif // For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays // The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode +#ifndef OLED_SOURCE_MAP #define OLED_SOURCE_MAP { 0, 8, 16, 24 } +#endif +#ifndef OLED_TARGET_MAP #define OLED_TARGET_MAP { 24, 16, 8, 0 } +#endif // If OLED_BLOCK_TYPE is uint8_t, these tables would look like: // #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56 } // #define OLED_TARGET_MAP { 48, 32, 16, 0, 56, 40, 24, 8 } From a03ece6affb94961f8496cd04d3bc89b372ff34f Mon Sep 17 00:00:00 2001 From: jotix Date: Sat, 8 Jun 2019 00:31:07 -0300 Subject: [PATCH 204/341] fix error in readme.md --- keyboards/handwired/jotanck/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/jotanck/readme.md b/keyboards/handwired/jotanck/readme.md index 4cf211adc..e9dd82403 100644 --- a/keyboards/handwired/jotanck/readme.md +++ b/keyboards/handwired/jotanck/readme.md @@ -22,7 +22,7 @@ Hardware Availability: [Mercado Libre](https://articulo.mercadolibre.com.ar/MLA- | | LED1 | LED2 | |-------------|------|------| -| Arduino pin | 8 | 9 | +| Arduino pin | 9 | 8 | | QMK pin | B5 | B4 | ### Compiling the Firmware From 8ac90488031330bb184dafe40dfb5ec5790665e1 Mon Sep 17 00:00:00 2001 From: Christopher Jenkins Date: Sat, 8 Jun 2019 21:39:23 -0600 Subject: [PATCH 205/341] [Keyboard] niu_mini uses dfu bootloader rather than the afrdude bootloader (#6092) * niu_mini uses dfu bootloader rather than the afrdude bootloader modified: readme.md * Change rules in rules.mk to reflect the bootloader change modified: keyboards/niu_mini/rules.mk --- keyboards/niu_mini/readme.md | 2 +- keyboards/niu_mini/rules.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/niu_mini/readme.md b/keyboards/niu_mini/readme.md index af05d34fa..36e8c8458 100644 --- a/keyboards/niu_mini/readme.md +++ b/keyboards/niu_mini/readme.md @@ -11,6 +11,6 @@ Hardware Availability: [KBDFans](https://kbdfans.myshopify.com/products/niu-mini Make example for this keyboard (after setting up your build environment): - make niu_mini:default:avrdude + make niu_mini:default:dfu 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. diff --git a/keyboards/niu_mini/rules.mk b/keyboards/niu_mini/rules.mk index 496928ed7..01d96eccf 100644 --- a/keyboards/niu_mini/rules.mk +++ b/keyboards/niu_mini/rules.mk @@ -44,7 +44,7 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Atmel DFU loader 4096 # LUFA bootloader 4096 # USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +BOOTLOADER = atmel-dfu # Build Options # change to "no" to disable the options, or define them in the Makefile in From c3c61dc76ea07ece799d7fc5edf63b700dbd346c Mon Sep 17 00:00:00 2001 From: shela Date: Sun, 9 Jun 2019 17:49:40 +0900 Subject: [PATCH 206/341] fix indent size --- .clang-format | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.clang-format b/.clang-format index 96c486259..b4f796783 100644 --- a/.clang-format +++ b/.clang-format @@ -13,7 +13,7 @@ BinPackParameters: 'true' ColumnLimit: '1000' IndentCaseLabels: 'true' IndentPPDirectives: AfterHash -IndentWidth: '2' +IndentWidth: '4' MaxEmptyLinesToKeep: '1' PointerAlignment: Right SortIncludes: 'false' From d0c29f25c9d2fae826e8ed66bfc9a1c51d0de6a4 Mon Sep 17 00:00:00 2001 From: Yan-Fa Li Date: Tue, 11 Jun 2019 02:45:00 -0700 Subject: [PATCH 207/341] [Keyboard] Fix the layer state messages for actual values (#6116) - display adjust when the bits are set correctly --- keyboards/lily58/lib/layer_state_reader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/lily58/lib/layer_state_reader.c b/keyboards/lily58/lib/layer_state_reader.c index 58f406bbc..48674b067 100644 --- a/keyboards/lily58/lib/layer_state_reader.c +++ b/keyboards/lily58/lib/layer_state_reader.c @@ -6,8 +6,8 @@ #define L_BASE 0 #define L_LOWER 2 #define L_RAISE 4 -#define L_ADJUST 65536 -#define L_ADJUST_TRI 65542 +#define L_ADJUST 8 +#define L_ADJUST_TRI 14 char layer_state_str[24]; From 8c22d641ee378cba08769f667201fea6ddaef98e Mon Sep 17 00:00:00 2001 From: brickbots Date: Tue, 11 Jun 2019 09:01:59 -0700 Subject: [PATCH 208/341] [Keyboard] Adding LED support to the plaid default keycap (#6109) * Adding led support for Plaid * Adding led support for Plaid --- keyboards/plaid/keymaps/default/keymap.c | 195 +++++++++++++++++++++- keyboards/plaid/keymaps/default/readme.md | 32 +++- keyboards/plaid/plaid.h | 3 + 3 files changed, 226 insertions(+), 4 deletions(-) diff --git a/keyboards/plaid/keymaps/default/keymap.c b/keyboards/plaid/keymaps/default/keymap.c index f27abb0aa..35c22b498 100644 --- a/keyboards/plaid/keymaps/default/keymap.c +++ b/keyboards/plaid/keymaps/default/keymap.c @@ -33,12 +33,44 @@ enum plaid_keycodes { COLEMAK, DVORAK, PLOVER, - EXT_PLV + EXT_PLV, + LED_1, + LED_2, + LED_3, + LED_4, + LED_5, + LED_6, + LED_7, + LED_8, + LED_9, + LED_0 }; #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) +// array of keys considered modifiers for led purposes +const uint16_t modifiers[] = { + KC_LCTL, + KC_RCTL, + KC_LALT, + KC_RALT, + KC_LSFT, + KC_RSFT, + KC_LGUI, + KC_RGUI, + LOWER, + RAISE +}; + +//Setup consts for LED modes +#define LEDMODE_ON 1 //always on +#define LEDMODE_OFF 0 //always off +#define LEDMODE_MODS 2 //On with modifiers +#define LEDMODE_BLINKIN 3 //blinkinlights - % chance toggle on keypress +#define LEDMODE_KEY 4 //On with any keypress, off with key release +#define LEDMODE_ENTER 5 // On with enter key + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -152,7 +184,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | | Del | + * |Reset | | | | | | | | | | | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | * |------+------+------+------+------+------|------+------+------+------+------+------| @@ -162,7 +194,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_plaid_grid( - _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + RESET,LED_1, LED_2, LED_3, LED_4, LED_5,LED_6, LED_7, LED_8, LED_9, LED_0,KC_DEL , _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ @@ -171,11 +203,100 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; +//Setup config struct for LED +typedef union { + uint32_t raw; + struct { + uint8_t red_mode :8; + uint8_t green_mode :8; + }; +} led_config_t; +led_config_t led_config; + +//Set leds to saved state during powerup +void keyboard_post_init_user(void) { + // Call the post init code. + led_config.raw = eeconfig_read_user(); + + if(led_config.red_mode == LEDMODE_ON) { + writePinHigh(LED_RED); + } + + if(led_config.green_mode == LEDMODE_ON) { + writePinHigh(LED_GREEN); + } +} + +void eeconfig_init_user(void) { // EEPROM is getting reset! + led_config.raw = 0; + led_config.red_mode = LEDMODE_ON; + led_config.green_mode = LEDMODE_MODS; + eeconfig_update_user(led_config.raw); + eeconfig_update_user(led_config.raw); +} + uint32_t layer_state_set_user(uint32_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } +void led_keypress_update(uint8_t led, uint8_t led_mode, uint16_t keycode, keyrecord_t *record) { + switch (led_mode) { + case LEDMODE_MODS: + for (int i=0;ievent.pressed) { + writePinHigh(led); + } + else { + writePinLow(led); + } + } + } + break; + case LEDMODE_BLINKIN: + if (record->event.pressed) { + if(rand() % 2 == 1) { + if(rand() % 2 == 0) { + writePinLow(led); + } + else { + writePinHigh(led); + } + } + } + break; + case LEDMODE_KEY: + if (record->event.pressed) { + writePinHigh(led); + return; + } + else { + writePinLow(led); + return; + } + break; + case LEDMODE_ENTER: + if (keycode==KC_ENT) { + writePinHigh(led); + } + else { + writePinLow(led); + } + break; + + } +} + bool process_record_user(uint16_t keycode, keyrecord_t *record) { + /* If the either led mode is keypressed based, call the led updater + then let it fall through the keypress handlers. Just to keep + the logic out of this procedure */ + if (led_config.red_mode >= LEDMODE_MODS && led_config.red_mode <= LEDMODE_ENTER) { + led_keypress_update(LED_RED, led_config.red_mode, keycode, record); + } + if (led_config.green_mode >= LEDMODE_MODS && led_config.green_mode <= LEDMODE_ENTER) { + led_keypress_update(LED_GREEN, led_config.green_mode, keycode, record); + } switch (keycode) { case QWERTY: if (record->event.pressed) { @@ -217,6 +338,74 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case LED_1: + if (record->event.pressed) { + if (led_config.red_mode==LEDMODE_ON) { + led_config.red_mode=LEDMODE_OFF; + writePinLow(LED_RED); + } + else { + led_config.red_mode=LEDMODE_ON; + writePinHigh(LED_RED); + } + } + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_2: + if (record->event.pressed) { + if (led_config.green_mode==LEDMODE_ON) { + led_config.green_mode=LEDMODE_OFF; + writePinLow(LED_GREEN); + } + else { + led_config.green_mode=LEDMODE_ON; + writePinHigh(LED_GREEN); + } + } + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_3: + led_config.red_mode=LEDMODE_MODS; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_4: + led_config.green_mode=LEDMODE_MODS; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_5: + led_config.red_mode=LEDMODE_BLINKIN; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_6: + led_config.green_mode=LEDMODE_BLINKIN; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_7: + led_config.red_mode=LEDMODE_KEY; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_8: + led_config.green_mode=LEDMODE_KEY; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_9: + led_config.red_mode=LEDMODE_ENTER; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_0: + led_config.green_mode=LEDMODE_ENTER; + eeconfig_update_user(led_config.raw); + return false; + break; } return true; } diff --git a/keyboards/plaid/keymaps/default/readme.md b/keyboards/plaid/keymaps/default/readme.md index 6f68e46af..2f491e367 100644 --- a/keyboards/plaid/keymaps/default/readme.md +++ b/keyboards/plaid/keymaps/default/readme.md @@ -1,2 +1,32 @@ # The default keymap for plaid -folk from planck +Original copyright 2019 Takuya Urakawa (dm9records.com) +LED Support added by Richard Sutherland (rich@brickbots.com) + +This layout is based on the Planck layout, and includes an adjust layer (6) +accessible by holding the lower and raise modifiers (MO3 and MO4) together. +The adjustment layer is used to set the behavior of the two LEDs: + +Modifier Mode: + +Activates when any modifier (shift, alt, os, MO) key is held +down. LED turns off when key is release + +Blinkinlights Mode: +Random chance of state change on each keystroke. + +Keypress Mode: +On for any keypress as long as the key is pressed + +Carriage Mode: +Turns on when enter is pressed, turns off when any next key is pressed + +q = Toggle Red LED state, deactivates any other modes +w = Toggle Green LED state, deactivates any other modes +e = Set RED LED to modifier mode +r = Set GREEN LED to modifier mode +t = Set RED LED to Blinkinlights mode +y = set GREEN LED to Blinkinlights mode +u = set RED LED to Keypress mode +i = set GREEN LED to Keypress mode +o = set RED LED to Carriage mode +p = set GREEN LED to Carriage mode diff --git a/keyboards/plaid/plaid.h b/keyboards/plaid/plaid.h index e680c077c..d791cf7c0 100644 --- a/keyboards/plaid/plaid.h +++ b/keyboards/plaid/plaid.h @@ -63,3 +63,6 @@ #define LAYOUT_planck_mit LAYOUT_plaid_mit #define LAYOUT_kc_ortho_4x12 KC_KEYMAP #define KC_LAYOUT_ortho_4x12 KC_KEYMAP + +#define LED_RED C5 +#define LED_GREEN C4 From f664ed92542d1f11ca500b88c3aea7b41b7a1716 Mon Sep 17 00:00:00 2001 From: Calvin Moody Date: Tue, 11 Jun 2019 12:11:47 -0400 Subject: [PATCH 209/341] [Keymap] add keymap with split spacebar, ansi, hhkb features (#6114) * add calbatr0ss dz60 layout * add media controls * add media next/prev controls * add base layer for windows and macos * swap right ctrl and menu * missing bracket * update gitignore --- keyboards/dz60/dz60.h | 27 +++++++ keyboards/dz60/info.json | 6 +- keyboards/dz60/keymaps/calbatr0ss/keymap.c | 84 ++++++++++++++++++++++ 3 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 keyboards/dz60/keymaps/calbatr0ss/keymap.c diff --git a/keyboards/dz60/dz60.h b/keyboards/dz60/dz60.h index 35f3b9f09..9000ba64d 100644 --- a/keyboards/dz60/dz60.h +++ b/keyboards/dz60/dz60.h @@ -440,6 +440,33 @@ { k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, KC_NO, k4b, KC_NO, k4d, k4e } \ } +/* LAYOUT_60_calbatr0ss + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │0e │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │1d │1e │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │20 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │2d │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │30 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3d │3e │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤ + * │40 │41 │43 │44 │46 │48 │4a │4b │4d │4e │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +#define LAYOUT_60_calbatr0ss( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, \ + k40, k41, k43, k44, k46, k48, k4a, k4b, k4d, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ + { k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ + { k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3d, k3e }, \ + { k40, k41, KC_NO, k43, k44, KC_NO, k46, KC_NO, k48, KC_NO, k4a, k4b, KC_NO, k4d, k4e } \ +} + /* LAYOUT_60_iso_split_space_bs_rshift * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │0e │ diff --git a/keyboards/dz60/info.json b/keyboards/dz60/info.json index aca960dff..d1be70bdd 100644 --- a/keyboards/dz60/info.json +++ b/keyboards/dz60/info.json @@ -59,12 +59,16 @@ }, "LAYOUT_60_tsangan": { "keycount": 61, - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] }, "LAYOUT_60_tsangan_hhkb": { "key_count": 62, "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Win", "x":11, "y":4, "w":1.5}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] }, + "LAYOUT_60_calbatr0ss": { + "key_count": 65, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"Ctrl", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Caps Lock", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"label":"Shift", "x":3.75, "y":4, "w":2.25}, {"label":"Fn", "x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, "LAYOUT_60_iso_split_space_bs_rshift": { "key_count": 66, "layout": [{"label":"¬", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"£", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Del", "x":13, "y":0, "w":1}, {"label":"Backspace", "x":14, "y":0, "w":1}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Print screen", "x":14, "y":3, "w":1}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"label":"FN", "x":6.00, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] diff --git a/keyboards/dz60/keymaps/calbatr0ss/keymap.c b/keyboards/dz60/keymaps/calbatr0ss/keymap.c new file mode 100644 index 000000000..2852b4a20 --- /dev/null +++ b/keyboards/dz60/keymaps/calbatr0ss/keymap.c @@ -0,0 +1,84 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* LAYER 0 + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ESC│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ BKSP│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ CTRL │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ ENTER │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │ SHIFT │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ SHIFT│LYR│ + * ├────┬───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴───┼───┴┬────┬┴───┤ + * │CAPS│ OS │ ALT│ SPACE │ FN │ SPACE │ ALT│ OS │MENU│CTRL│ + * └────┴────┴────┴────────┴────┴──────────┴────┴────┴────┴────┘ + */ + LAYOUT_60_calbatr0ss( + KC_ESC, 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_BSLS, KC_GRV, + 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_BSPC, + 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, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(3), + KC_CAPS, KC_LGUI, KC_LALT, KC_SPC, MO(2), KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL), + +/* LAYER 1 + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ESC│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ BKSP│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ CTRL │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ ENTER │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │ SHIFT │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ SHIFT│LYR│ + * ├────┬───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴───┼───┴┬────┬┴───┤ + * │CAPS│ ALT│ OS │ SPACE │ FN │ SPACE │ OS │ ALT│MENU│CTRL│ + * └────┴────┴────┴────────┴────┴──────────┴────┴────┴────┴────┘ + */ + LAYOUT_60_calbatr0ss( + KC_ESC, 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_BSLS, KC_GRV, + 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_BSPC, + 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, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(3), + KC_CAPS, KC_LALT, KC_LGUI, KC_SPC, MO(2), KC_SPC, KC_RGUI, KC_RALT, KC_APP, KC_RCTL), + +/* LAYER 2 + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │ │ │ │ │ │ │ │PDN│ UP│PUP│ │ │ │ DEL │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ │ │ │ │ │ │HOM│LFT│DWN│RHT│END│ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │ │ │ │ │ │VDN│VUP│MUT│PRV│NXT│PLY│ │ │ + * ├────┬───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴───┼───┴┬────┬┴───┤ + * │RSET│ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────┴────┴──────────┴────┴────┴────┴────┘ + */ + LAYOUT_60_calbatr0ss( + KC_TRNS, 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_UP, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPRV, KC_MNXT, KC_MPLY, KC_TRNS, KC_TRNS, + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +/* LAYER 3 + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │WIN│MAC│ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴───┼───┴┬────┬┴───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────┴────┴──────────┴────┴────┴────┴────┘ + */ + LAYOUT_60_calbatr0ss( + KC_TRNS, DF(0), DF(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; From 105c90bd1c9be4b8239afd553c2a1afbd13986e1 Mon Sep 17 00:00:00 2001 From: yiancar Date: Tue, 11 Jun 2019 17:14:54 +0100 Subject: [PATCH 210/341] [Keyboard] Siemens Tastatur Converter (#6090) * initial commit * Siemens Tastatur * Update keyboards/handwired/siemens_tastatur/keymaps/default/keymap.c Co-Authored-By: fauxpark * beauty fixes * More tidying up * Update keyboards/converter/siemens_tastatur/keymaps/default/keymap.c Co-Authored-By: Drashna Jaelre --- .../boards/GENERIC_STM32_F103/board.c | 56 ++ .../boards/GENERIC_STM32_F103/board.h | 166 ++++++ .../boards/GENERIC_STM32_F103/board.mk | 5 + .../siemens_tastatur/bootloader_defs.h | 10 + keyboards/converter/siemens_tastatur/chconf.h | 524 ++++++++++++++++++ keyboards/converter/siemens_tastatur/config.h | 67 +++ .../converter/siemens_tastatur/halconf.h | 353 ++++++++++++ .../siemens_tastatur/keymaps/default/config.h | 19 + .../siemens_tastatur/keymaps/default/keymap.c | 64 +++ .../keymaps/default/readme.md | 1 + .../converter/siemens_tastatur/ld/MKL26Z64.ld | 105 ++++ .../ld/STM32F103x8_stm32duino_bootloader.ld | 88 +++ keyboards/converter/siemens_tastatur/matrix.c | 252 +++++++++ .../converter/siemens_tastatur/mcuconf.h | 209 +++++++ .../converter/siemens_tastatur/readme.md | 17 + keyboards/converter/siemens_tastatur/rules.mk | 52 ++ .../siemens_tastatur/siemens_tastatur.c | 45 ++ .../siemens_tastatur/siemens_tastatur.h | 41 ++ 18 files changed, 2074 insertions(+) create mode 100644 keyboards/converter/siemens_tastatur/boards/GENERIC_STM32_F103/board.c create mode 100644 keyboards/converter/siemens_tastatur/boards/GENERIC_STM32_F103/board.h create mode 100644 keyboards/converter/siemens_tastatur/boards/GENERIC_STM32_F103/board.mk create mode 100644 keyboards/converter/siemens_tastatur/bootloader_defs.h create mode 100644 keyboards/converter/siemens_tastatur/chconf.h create mode 100644 keyboards/converter/siemens_tastatur/config.h create mode 100644 keyboards/converter/siemens_tastatur/halconf.h create mode 100644 keyboards/converter/siemens_tastatur/keymaps/default/config.h create mode 100644 keyboards/converter/siemens_tastatur/keymaps/default/keymap.c create mode 100644 keyboards/converter/siemens_tastatur/keymaps/default/readme.md create mode 100644 keyboards/converter/siemens_tastatur/ld/MKL26Z64.ld create mode 100644 keyboards/converter/siemens_tastatur/ld/STM32F103x8_stm32duino_bootloader.ld create mode 100644 keyboards/converter/siemens_tastatur/matrix.c create mode 100644 keyboards/converter/siemens_tastatur/mcuconf.h create mode 100644 keyboards/converter/siemens_tastatur/readme.md create mode 100644 keyboards/converter/siemens_tastatur/rules.mk create mode 100644 keyboards/converter/siemens_tastatur/siemens_tastatur.c create mode 100644 keyboards/converter/siemens_tastatur/siemens_tastatur.h diff --git a/keyboards/converter/siemens_tastatur/boards/GENERIC_STM32_F103/board.c b/keyboards/converter/siemens_tastatur/boards/GENERIC_STM32_F103/board.c new file mode 100644 index 000000000..8c5a87f35 --- /dev/null +++ b/keyboards/converter/siemens_tastatur/boards/GENERIC_STM32_F103/board.c @@ -0,0 +1,56 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include "hal.h" + +// Value to place in RTC backup register 10 for persistent bootloader mode +#define RTC_BOOTLOADER_FLAG 0x424C + +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +#if HAL_USE_PAL || defined(__DOXYGEN__) +const PALConfig pal_default_config = +{ + {VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH}, + {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH}, + {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH}, + {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH}, + {VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH}, +}; +#endif + +/* + * Early initialization code. + * This initialization must be performed just after stack setup and before + * any other initialization. + */ +void __early_init(void) { + + stm32_clock_init(); +} + +/* + * Board-specific initialization code. + */ +void boardInit(void) { + //JTAG-DP Disabled and SW-DP Enabled + AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE; + //Set backup register DR10 to enter bootloader on reset + BKP->DR10 = RTC_BOOTLOADER_FLAG; +} diff --git a/keyboards/converter/siemens_tastatur/boards/GENERIC_STM32_F103/board.h b/keyboards/converter/siemens_tastatur/boards/GENERIC_STM32_F103/board.h new file mode 100644 index 000000000..9427adabf --- /dev/null +++ b/keyboards/converter/siemens_tastatur/boards/GENERIC_STM32_F103/board.h @@ -0,0 +1,166 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _BOARD_H_ +#define _BOARD_H_ + +/* + * Setup for a Generic STM32F103 board. + */ + +/* + * Board identifier. + */ +#define BOARD_GENERIC_STM32_F103 +#define BOARD_NAME "Generic STM32F103x board" + +/* + * Board frequencies. + */ +#define STM32_LSECLK 32768 +#define STM32_HSECLK 8000000 + +/* + * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h. + */ +#define STM32F103xB + +/* + * IO pins assignments + */ + +/* on-board */ + +#define GPIOA_LED 8 +#define GPIOD_OSC_IN 0 +#define GPIOD_OSC_OUT 1 + +/* In case your board has a "USB enable" hardware + controlled by a pin, define it here. (It could be just + a 1.5k resistor connected to D+ line.) +*/ +/* +#define GPIOB_USB_DISC 10 +*/ + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * + * The digits have the following meaning: + * 0 - Analog input. + * 1 - Push Pull output 10MHz. + * 2 - Push Pull output 2MHz. + * 3 - Push Pull output 50MHz. + * 4 - Digital input. + * 5 - Open Drain output 10MHz. + * 6 - Open Drain output 2MHz. + * 7 - Open Drain output 50MHz. + * 8 - Digital input with PullUp or PullDown resistor depending on ODR. + * 9 - Alternate Push Pull output 10MHz. + * A - Alternate Push Pull output 2MHz. + * B - Alternate Push Pull output 50MHz. + * C - Reserved. + * D - Alternate Open Drain output 10MHz. + * E - Alternate Open Drain output 2MHz. + * F - Alternate Open Drain output 50MHz. + * Please refer to the STM32 Reference Manual for details. + */ + +/* + * Port A setup. + * Everything input with pull-up except: + * PA2 - Alternate output (USART2 TX). + * PA3 - Normal input (USART2 RX). + * PA9 - Alternate output (USART1 TX). + * PA10 - Normal input (USART1 RX). + */ +#define VAL_GPIOACRL 0x88884B88 /* PA7...PA0 */ +#define VAL_GPIOACRH 0x888884B8 /* PA15...PA8 */ +#define VAL_GPIOAODR 0xFFFFFFFF + +/* + * Port B setup. + * Everything input with pull-up except: + * PB10 - Push Pull output (USB switch). + */ +#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */ +#define VAL_GPIOBCRH 0x88888388 /* PB15...PB8 */ +#define VAL_GPIOBODR 0xFFFFFFFF + +/* + * Port C setup. + * Everything input with pull-up except: + * PC13 - Push Pull output (LED). + */ +#define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */ +#define VAL_GPIOCCRH 0x88388888 /* PC15...PC8 */ +#define VAL_GPIOCODR 0xFFFFFFFF + +/* + * Port D setup. + * Everything input with pull-up except: + * PD0 - Normal input (XTAL). + * PD1 - Normal input (XTAL). + */ +#define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */ +#define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */ +#define VAL_GPIODODR 0xFFFFFFFF + +/* + * Port E setup. + * Everything input with pull-up except: + */ +#define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */ +#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */ +#define VAL_GPIOEODR 0xFFFFFFFF + +/* + * USB bus activation macro, required by the USB driver. + */ +/* The point is that most of the generic STM32F103* boards + have a 1.5k resistor connected on one end to the D+ line + and on the other end to some pin. Or even a slightly more + complicated "USB enable" circuit, controlled by a pin. + That should go here. + + However on some boards (e.g. one that I have), there's no + such hardware. In which case it's better to not do anything. +*/ +/* +#define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC) +*/ +#define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT); + +/* + * USB bus de-activation macro, required by the USB driver. + */ +/* +#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC) +*/ +#define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12); + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* _BOARD_H_ */ diff --git a/keyboards/converter/siemens_tastatur/boards/GENERIC_STM32_F103/board.mk b/keyboards/converter/siemens_tastatur/boards/GENERIC_STM32_F103/board.mk new file mode 100644 index 000000000..6b8b312fd --- /dev/null +++ b/keyboards/converter/siemens_tastatur/boards/GENERIC_STM32_F103/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F103/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F103 diff --git a/keyboards/converter/siemens_tastatur/bootloader_defs.h b/keyboards/converter/siemens_tastatur/bootloader_defs.h new file mode 100644 index 000000000..6b8fa9f72 --- /dev/null +++ b/keyboards/converter/siemens_tastatur/bootloader_defs.h @@ -0,0 +1,10 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here (page 175): + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ + +// STM32F103* does NOT have an USB bootloader in ROM (only serial), +// so setting anything here does not make much sense +#define STM32_BOOTLOADER_ADDRESS 0x80000000 diff --git a/keyboards/converter/siemens_tastatur/chconf.h b/keyboards/converter/siemens_tastatur/chconf.h new file mode 100644 index 000000000..bbd9b2da6 --- /dev/null +++ b/keyboards/converter/siemens_tastatur/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 100000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 0 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE TRUE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP TRUE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS FALSE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/converter/siemens_tastatur/config.h b/keyboards/converter/siemens_tastatur/config.h new file mode 100644 index 000000000..bbb747152 --- /dev/null +++ b/keyboards/converter/siemens_tastatur/config.h @@ -0,0 +1,67 @@ +/* +Copyright 2019 Yiancar + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x8968 +#define PRODUCT_ID 0x4353 +#define DEVICE_VER 0x0001 + +#define MANUFACTURER Yiancar-Designs +#define PRODUCT Siemens Tastatur +#define DESCRIPTION Practice + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 19 + +//This is all fake and not used +#define MATRIX_COL_PINS { B11, B10, B1, B0, A7, A6, A5, A4, A3, A2, A1, A0, C15, C14 } +#define MATRIX_ROW_PINS { B3, B4, B5, B6, B7 } +#define DIODE_DIRECTION COL2ROW + + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + + +/* + * Feature disable options + * 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_FUNCTION diff --git a/keyboards/converter/siemens_tastatur/halconf.h b/keyboards/converter/siemens_tastatur/halconf.h new file mode 100644 index 000000000..4ffc50fb1 --- /dev/null +++ b/keyboards/converter/siemens_tastatur/halconf.h @@ -0,0 +1,353 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT TRUE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/converter/siemens_tastatur/keymaps/default/config.h b/keyboards/converter/siemens_tastatur/keymaps/default/config.h new file mode 100644 index 000000000..76d8106de --- /dev/null +++ b/keyboards/converter/siemens_tastatur/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* +Copyright 2019 Yiancar + +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 . +*/ +#pragma once + +// place overrides here diff --git a/keyboards/converter/siemens_tastatur/keymaps/default/keymap.c b/keyboards/converter/siemens_tastatur/keymaps/default/keymap.c new file mode 100644 index 000000000..70edf94d7 --- /dev/null +++ b/keyboards/converter/siemens_tastatur/keymaps/default/keymap.c @@ -0,0 +1,64 @@ +/* +Copyright 2019 Yiancar + +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 . +*/ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + DCAPS = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SCLN, KC_CIRC, KC_BSPC, KC_ENT, KC_0, KC_1, KC_2, KC_3, KC_4, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Z, KC_U, KC_I, KC_O, KC_P, KC_RBRC, KC_PLUS, KC_5, KC_6, KC_7, KC_8, KC_9, + DCAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_BSLS, KC_RBRC, KC_DLR, KC_EQL, KC_0, KC_1, KC_2, KC_3, KC_4, + KC_LSFT, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_MINS, KC_5, KC_6, KC_7, KC_8, KC_9, + KC_SPC + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DCAPS: + if (record->event.pressed) { + // When keycode DCAPS is pressed. + // This is needed for mac. + tap_code(KC_CAPS); + } else { + // When keycode DCAPS is released. + } + break; + } + return true; +} + +void matrix_init_user(void) { + setPinOutput(B0); + writePinLow(B0); +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinHigh(B0); + } else { + writePinLow(B0); + } +} diff --git a/keyboards/converter/siemens_tastatur/keymaps/default/readme.md b/keyboards/converter/siemens_tastatur/keymaps/default/readme.md new file mode 100644 index 000000000..8b72f0770 --- /dev/null +++ b/keyboards/converter/siemens_tastatur/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for siemens_tastatur diff --git a/keyboards/converter/siemens_tastatur/ld/MKL26Z64.ld b/keyboards/converter/siemens_tastatur/ld/MKL26Z64.ld new file mode 100644 index 000000000..c4ca8b874 --- /dev/null +++ b/keyboards/converter/siemens_tastatur/ld/MKL26Z64.ld @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2013-2016 Fabio Utzig, http://fabioutzig.com + * (C) 2016 flabbergast + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* + * KL26Z64 memory setup. + */ +MEMORY +{ + flash0 : org = 0x00000000, len = 0x100 + flash1 : org = 0x00000400, len = 0x10 + flash2 : org = 0x00000410, len = 62k - 0x410 + flash3 : org = 0x0000F800, len = 2k + flash4 : org = 0x00000000, len = 0 + flash5 : org = 0x00000000, len = 0 + flash6 : org = 0x00000000, len = 0 + flash7 : org = 0x00000000, len = 0 + ram0 : org = 0x1FFFF800, len = 8k + ram1 : org = 0x00000000, len = 0 + ram2 : org = 0x00000000, len = 0 + ram3 : org = 0x00000000, len = 0 + ram4 : org = 0x00000000, len = 0 + ram5 : org = 0x00000000, len = 0 + ram6 : org = 0x00000000, len = 0 + ram7 : org = 0x00000000, len = 0 +} + +/* Flash region for the configuration bytes.*/ +SECTIONS +{ + .cfmprotect : ALIGN(4) SUBALIGN(4) + { + KEEP(*(.cfmconfig)) + } > flash1 +} + +/* For each data/text section two region are defined, a virtual region + and a load region (_LMA suffix).*/ + +/* Flash region to be used for exception vectors.*/ +REGION_ALIAS("VECTORS_FLASH", flash0); +REGION_ALIAS("VECTORS_FLASH_LMA", flash0); + +/* Flash region to be used for constructors and destructors.*/ +REGION_ALIAS("XTORS_FLASH", flash2); +REGION_ALIAS("XTORS_FLASH_LMA", flash2); + +/* Flash region to be used for code text.*/ +REGION_ALIAS("TEXT_FLASH", flash2); +REGION_ALIAS("TEXT_FLASH_LMA", flash2); + +/* Flash region to be used for read only data.*/ +REGION_ALIAS("RODATA_FLASH", flash2); +REGION_ALIAS("RODATA_FLASH_LMA", flash2); + +/* Flash region to be used for various.*/ +REGION_ALIAS("VARIOUS_FLASH", flash2); +REGION_ALIAS("VARIOUS_FLASH_LMA", flash2); + +/* Flash region to be used for RAM(n) initialization data.*/ +REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2); + +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts.*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); + +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); + +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); +REGION_ALIAS("DATA_RAM_LMA", flash2); + +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); + +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); + +__eeprom_workarea_start__ = ORIGIN(flash3); +__eeprom_workarea_size__ = LENGTH(flash3); +__eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__; + +/* Generic rules inclusion.*/ +INCLUDE rules.ld diff --git a/keyboards/converter/siemens_tastatur/ld/STM32F103x8_stm32duino_bootloader.ld b/keyboards/converter/siemens_tastatur/ld/STM32F103x8_stm32duino_bootloader.ld new file mode 100644 index 000000000..d0688ef60 --- /dev/null +++ b/keyboards/converter/siemens_tastatur/ld/STM32F103x8_stm32duino_bootloader.ld @@ -0,0 +1,88 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * ST32F103xB memory setup for use with the maplemini bootloader. + * You will have to + * #define CORTEX_VTOR_INIT 0x5000 + * in your projects chconf.h + */ +MEMORY +{ + flash0 : org = 0x08002000, len = 64k - 0x2000 + flash1 : org = 0x00000000, len = 0 + flash2 : org = 0x00000000, len = 0 + flash3 : org = 0x00000000, len = 0 + flash4 : org = 0x00000000, len = 0 + flash5 : org = 0x00000000, len = 0 + flash6 : org = 0x00000000, len = 0 + flash7 : org = 0x00000000, len = 0 + ram0 : org = 0x20000000, len = 20k + ram1 : org = 0x00000000, len = 0 + ram2 : org = 0x00000000, len = 0 + ram3 : org = 0x00000000, len = 0 + ram4 : org = 0x00000000, len = 0 + ram5 : org = 0x00000000, len = 0 + ram6 : org = 0x00000000, len = 0 + ram7 : org = 0x00000000, len = 0 +} + +/* For each data/text section two region are defined, a virtual region + and a load region (_LMA suffix).*/ + +/* Flash region to be used for exception vectors.*/ +REGION_ALIAS("VECTORS_FLASH", flash0); +REGION_ALIAS("VECTORS_FLASH_LMA", flash0); + +/* Flash region to be used for constructors and destructors.*/ +REGION_ALIAS("XTORS_FLASH", flash0); +REGION_ALIAS("XTORS_FLASH_LMA", flash0); + +/* Flash region to be used for code text.*/ +REGION_ALIAS("TEXT_FLASH", flash0); +REGION_ALIAS("TEXT_FLASH_LMA", flash0); + +/* Flash region to be used for read only data.*/ +REGION_ALIAS("RODATA_FLASH", flash0); +REGION_ALIAS("RODATA_FLASH_LMA", flash0); + +/* Flash region to be used for various.*/ +REGION_ALIAS("VARIOUS_FLASH", flash0); +REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); + +/* Flash region to be used for RAM(n) initialization data.*/ +REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); + +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts.*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); + +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); + +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); +REGION_ALIAS("DATA_RAM_LMA", flash0); + +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); + +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); + +/* Generic rules inclusion.*/ +INCLUDE rules.ld diff --git a/keyboards/converter/siemens_tastatur/matrix.c b/keyboards/converter/siemens_tastatur/matrix.c new file mode 100644 index 000000000..b7654e6e1 --- /dev/null +++ b/keyboards/converter/siemens_tastatur/matrix.c @@ -0,0 +1,252 @@ +/* +Copyright 2019 Yiancar + +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 . +*/ +#include +#include +#include +#include "quantum.h" +#include "timer.h" +#include "wait.h" +#include "print.h" +#include "matrix.h" +#include "ch.h" +#include "hal.h" + +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +volatile uint16_t porta_buffer = 0; +volatile uint16_t portb_buffer = 0; + +static uint32_t switch_buffer = 0; + +// Trigger on negative edge of any of the sense lines. +static void extcb1(EXTDriver *extp, expchannel_t channel) { + + (void)extp; + (void)channel; + chSysLockFromISR(); + porta_buffer = palReadPort(GPIOA); + portb_buffer = palReadPort(GPIOB); + //Disable further interrupts that might occur on same button press. + extChannelDisable(&EXTD1,0); + extChannelDisable(&EXTD1,1); + extChannelDisable(&EXTD1,2); + extChannelDisable(&EXTD1,9); + extChannelDisable(&EXTD1,10); + extChannelDisable(&EXTD1,12); + extChannelDisable(&EXTD1,13); + extChannelDisable(&EXTD1,14); + extChannelDisable(&EXTD1,15); + + extChannelEnable(&EXTD1,0); + extChannelEnable(&EXTD1,1); + extChannelEnable(&EXTD1,2); + extChannelEnable(&EXTD1,9); + extChannelEnable(&EXTD1,10); + extChannelEnable(&EXTD1,12); + extChannelEnable(&EXTD1,13); + extChannelEnable(&EXTD1,14); + extChannelEnable(&EXTD1,15); + chSysUnlockFromISR(); +} + +static const EXTConfig extcfg = { + { + {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOA, extcb1 }, //0 + {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOA, extcb1 }, //1 + {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOA, extcb1 }, //2 + {EXT_CH_MODE_DISABLED, NULL}, + {EXT_CH_MODE_DISABLED, NULL}, + {EXT_CH_MODE_DISABLED, NULL}, + {EXT_CH_MODE_DISABLED, NULL}, + {EXT_CH_MODE_DISABLED, NULL}, + {EXT_CH_MODE_DISABLED, NULL}, + {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOA, extcb1 }, //9 + {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOA, extcb1 }, //10 + {EXT_CH_MODE_DISABLED, NULL}, + {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOB, extcb1 }, //12 + {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOB, extcb1 }, //13 + {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOB, extcb1 }, //14 + {EXT_CH_MODE_FALLING_EDGE | EXT_CH_MODE_AUTOSTART | EXT_MODE_GPIOB, extcb1 } //15 + }, +}; + +void matrix_init(void) { + //Set I/O as pull-up inputs to read states + setPinInputHigh(A0); + setPinInputHigh(A1); + setPinInputHigh(A2); + setPinInputHigh(A3); + setPinInputHigh(A4); + setPinInputHigh(A5); + setPinInputHigh(A6); + setPinInputHigh(A7); + setPinInputHigh(A8); + setPinInputHigh(A9); + setPinInputHigh(A10); + setPinInputHigh(B3); + setPinInputHigh(B4); + setPinInputHigh(B5); + setPinInputHigh(B6); + setPinInputHigh(B7); + setPinInputHigh(B8); + setPinInputHigh(B9); + setPinInputHigh(B11); + setPinInputHigh(B12); + setPinInputHigh(B13); + setPinInputHigh(B14); + setPinInputHigh(B15); + + memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); + memset(matrix_debouncing, 0, MATRIX_ROWS * sizeof(matrix_row_t)); + + matrix_init_quantum(); + //Start interrupt driver + extStart(&EXTD1, &extcfg); +} + +uint8_t matrix_scan(void) { + switch_buffer = ((uint32_t)(porta_buffer & 0x7FF)) | ((uint32_t)(portb_buffer & 0x3F8) << 8); + + switch (switch_buffer) { + case 0x1134E: matrix[0] = 0x01; break; + case 0x3774D: matrix[0] = 0x02; break; + case 0x10BCC: matrix[0] = 0x04; break; + case 0x16B4B: matrix[0] = 0x08; break; + case 0x167CA: matrix[0] = 0x10; break; + case 0x35FC9: matrix[0] = 0x20; break; + case 0x15B48: matrix[0] = 0x40; break; + case 0x28347: matrix[0] = 0x80; break; + case 0x173C6: matrix[0] = 0x100; break; + case 0x143CF: matrix[0] = 0x200; break; + case 0x3FDC5: matrix[0] = 0x400; break; + case 0x3FD21: matrix[0] = 0x800; break; + case 0x3FD77: matrix[0] = 0x1000; break; + case 0x3FD72: matrix[0] = 0x2000; break; + //Special pin + case 0x3E7FA: matrix[0] = 0x8000; break; + case 0x183EE: matrix[0] = 0x10000; break; + case 0x197F3: matrix[0] = 0x20000; break; + case 0x1AB7E: matrix[0] = 0x40000; break; + + case 0x107C3: matrix[1] = 0x01; break; + case 0x3FD2E: matrix[1] = 0x02; break; + case 0x3FD28: matrix[1] = 0x04; break; + case 0x3FD3A: matrix[1] = 0x08; break; + case 0x3FD2D: matrix[1] = 0x10; break; + case 0x3FD2B: matrix[1] = 0x20; break; + case 0x3FDA5: matrix[1] = 0x40; break; + case 0x3FDAA: matrix[1] = 0x80; break; + case 0x3FD36: matrix[1] = 0x100; break; + case 0x3FD30: matrix[1] = 0x200; break; + case 0x3FDAF: matrix[1] = 0x400; break; + case 0x3FD22: matrix[1] = 0x800; break; + case 0x157D4: matrix[1] = 0x1000; break; + //Does not exist in matrix + //Special pin + case 0x1C778: matrix[1] = 0x8000; break; + case 0x387ED: matrix[1] = 0x10000; break; + case 0x19B74: matrix[1] = 0x20000; break; + case 0x3FD7D: matrix[1] = 0x40000; break; + + //Special pin + case 0x3FDBE: matrix[2] = 0x02; break; + case 0x3FDAC: matrix[2] = 0x04; break; + case 0x3FDBB: matrix[2] = 0x08; break; + case 0x3FD39: matrix[2] = 0x10; break; + case 0x3FDB8: matrix[2] = 0x20; break; + case 0x3FDB7: matrix[2] = 0x40; break; + case 0x3FD35: matrix[2] = 0x80; break; + case 0x3FDB4: matrix[2] = 0x100; break; + case 0x3FD33: matrix[2] = 0x200; break; + case 0x3FDA3: matrix[2] = 0x400; break; + case 0x3FD24: matrix[2] = 0x800; break; + case 0x0FFDB: matrix[2] = 0x1000; break; + case 0x3FDF5: matrix[2] = 0x2000; break; + case 0x3FDFF: matrix[2] = 0x4000; break; + case 0x3C3E4: matrix[2] = 0x8000; break; + case 0x38B6C: matrix[2] = 0x10000; break; + case 0x39FF6: matrix[2] = 0x20000; break; + case 0x3FDFC: matrix[2] = 0x40000; break; + + //Special pin + case 0x3FDA6: matrix[3] = 0x02; break; + case 0x3FD27: matrix[3] = 0x04; break; + case 0x3FD3C: matrix[3] = 0x08; break; + case 0x3FDA9: matrix[3] = 0x10; break; + case 0x3FDBD: matrix[3] = 0x20; break; + case 0x3FDB1: matrix[3] = 0x40; break; + case 0x3FDB2: matrix[3] = 0x80; break; + case 0x30353: matrix[3] = 0x100; break; + case 0x37BD1: matrix[3] = 0x200; break; + case 0x363D2: matrix[3] = 0x400; break; + case 0x3FD5F: matrix[3] = 0x800; break; + //Does not exist in matrix + //Does not exist in matrix + //Special pin + case 0x1BF00: matrix[3] = 0x8000; break; + case 0x18FEB: matrix[3] = 0x10000; break; + case 0x3FF69: matrix[3] = 0x20000; break; + case 0x3A37B: matrix[3] = 0x40000; break; + default: + if ((portb_buffer & 0x1000) == 0) { matrix[1] = 0x4000; break; } + if ((portb_buffer & 0x2000) == 0) { matrix[3] = 0x4000; break; } + if ((portb_buffer & 0x4000) == 0) { matrix[0] = 0x4000; break; } + if ((portb_buffer & 0x8000) == 0) { matrix[2] = 0x01; break; } + matrix[0] = 0x00; + matrix[1] = 0x00; + matrix[2] = 0x00; + matrix[3] = 0x00; + } + //Special case for Shift + if (readPin(B11) == 0) { matrix[3] |= 0x01; } + + porta_buffer = 65535; + portb_buffer = 65535; + + matrix_scan_quantum(); + return 1; +} + +matrix_row_t matrix_get_row(uint8_t row) +{ + return matrix[row]; +} + +void matrix_print(void) +{ + +} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + diff --git a/keyboards/converter/siemens_tastatur/mcuconf.h b/keyboards/converter/siemens_tastatur/mcuconf.h new file mode 100644 index 000000000..9945e7408 --- /dev/null +++ b/keyboards/converter/siemens_tastatur/mcuconf.h @@ -0,0 +1,209 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +#define STM32F103_MCUCONF + +/* + * STM32F103 drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED FALSE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_USB_CLOCK_REQUIRED TRUE +#define STM32_USBPRE STM32_USBPRE_DIV1P5 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_RTCSEL STM32_RTCSEL_HSEDIV +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC1_IRQ_PRIORITY 6 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM8 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 7 +#define STM32_PWM_TIM2_IRQ_PRIORITY 7 +#define STM32_PWM_TIM3_IRQ_PRIORITY 7 +#define STM32_PWM_TIM4_IRQ_PRIORITY 7 +#define STM32_PWM_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM8_IRQ_PRIORITY 7 + +/* + * RTC driver system settings. + */ +#define STM32_RTC_IRQ_PRIORITY 15 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USE_USART3 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_HP_IRQ_PRIORITY 13 +#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/converter/siemens_tastatur/readme.md b/keyboards/converter/siemens_tastatur/readme.md new file mode 100644 index 000000000..ca1b6ec0f --- /dev/null +++ b/keyboards/converter/siemens_tastatur/readme.md @@ -0,0 +1,17 @@ +# Siemens Tastatur + +[Siemens_tastatur](https://i.imgur.com/mQY4CQA.jpg) + +A Blue Pill STM32F103C8T6-based Converter board for a very very old keyboard. + +Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar) +Hardware Supported: Blue Pill STM32F103C8T6 +Hardware Availability: Custom PCB available, contact me + +Make example for this keyboard (after setting up your build environment): + + make converter/siemens_tastatur:default + +Unplugging and replugging the keyboard is necessary after a firmware update. + +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). diff --git a/keyboards/converter/siemens_tastatur/rules.mk b/keyboards/converter/siemens_tastatur/rules.mk new file mode 100644 index 000000000..75b3d7b36 --- /dev/null +++ b/keyboards/converter/siemens_tastatur/rules.mk @@ -0,0 +1,52 @@ +SRC = matrix.c +# GENERIC STM32F103C8T6 board - stm32duino bootloader +OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 +MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader +BOARD = GENERIC_STM32_F103 + +# OPT_DEFS = +# MCU_LDSCRIPT = STM32F103x8 +# BOARD = GENERIC_STM32_F103 + +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F1xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f1xx +# it should exist either in /os/hal/boards/ +# or /boards +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m3 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# /tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + +DFU_ARGS = -d 1eaf:0003 -a 2 + +#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = no +CUSTOM_MATRIX = yes + diff --git a/keyboards/converter/siemens_tastatur/siemens_tastatur.c b/keyboards/converter/siemens_tastatur/siemens_tastatur.c new file mode 100644 index 000000000..298f24c36 --- /dev/null +++ b/keyboards/converter/siemens_tastatur/siemens_tastatur.c @@ -0,0 +1,45 @@ +/* +Copyright 2019 Yiancar + +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 . +*/ +#include "siemens_tastatur.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + diff --git a/keyboards/converter/siemens_tastatur/siemens_tastatur.h b/keyboards/converter/siemens_tastatur/siemens_tastatur.h new file mode 100644 index 000000000..6a81b2550 --- /dev/null +++ b/keyboards/converter/siemens_tastatur/siemens_tastatur.h @@ -0,0 +1,41 @@ +/* +Copyright 2019 Yiancar + +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 . +*/ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, k0h, k0i, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, k1f, k1g, k1h, k1i, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2h, k2i, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3e, k3f, k3g, k3h, k3i, \ + k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, k0h, k0i }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, KC_NO, k1e, k1f, k1g, k1h, k1i }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2h, k2i }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, KC_NO, k3e, k3f, k3g, k3h, k3i }, \ +} From bba5c09b23208f7c70b1062b695a5b3df492b329 Mon Sep 17 00:00:00 2001 From: Chris Scheib Date: Tue, 11 Jun 2019 17:42:53 -0400 Subject: [PATCH 211/341] [Docs] Update feature_rgb_matrix.md (#6117) * Update feature_rgb_matrix.md fix indentation on code comments * Update feature_rgb_matrix.md more formatting changes, missed these the first time --- docs/feature_rgb_matrix.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 8f0cd12b3..916fcdce0 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -42,11 +42,11 @@ Define these arrays listing all the LEDs in your `.c`: ```C const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ {0, C1_3, C2_3, C3_3}, .... } @@ -93,11 +93,11 @@ Define these arrays listing all the LEDs in your `.c`: ```C const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ {0, B_1, A_1, C_1}, .... } From 332fc7e8143e3071d3904616e108aaf63b623568 Mon Sep 17 00:00:00 2001 From: Yan-Fa Li Date: Tue, 11 Jun 2019 14:49:50 -0700 Subject: [PATCH 212/341] [Keymap] Tsangan bottom plain60 configuration (#6100) * Personal keymap for plain60 * Update keymap for incorrect keys - update docs * Placate the gods of Case Insensitivity --- keyboards/plain60/keymaps/yanfali/keymap.c | 25 +++++++++++++++++++++ keyboards/plain60/keymaps/yanfali/readme.md | 9 ++++++++ keyboards/plain60/keymaps/yanfali/rules.mk | 4 ++++ 3 files changed, 38 insertions(+) create mode 100644 keyboards/plain60/keymaps/yanfali/keymap.c create mode 100644 keyboards/plain60/keymaps/yanfali/readme.md create mode 100644 keyboards/plain60/keymaps/yanfali/rules.mk diff --git a/keyboards/plain60/keymaps/yanfali/keymap.c b/keyboards/plain60/keymaps/yanfali/keymap.c new file mode 100644 index 000000000..3a0bc634f --- /dev/null +++ b/keyboards/plain60/keymaps/yanfali/keymap.c @@ -0,0 +1,25 @@ +#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 _MA 0 +#define _FN 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_FN] = LAYOUT( + _______, 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, \ + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ + KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______), + +[_MA] = LAYOUT( + KC_ESC, 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_GRV, KC_BSPC, \ + 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, \ + LCTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, \ + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN) , \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_NO, KC_RGUI, KC_RALT, KC_RCTRL) +}; diff --git a/keyboards/plain60/keymaps/yanfali/readme.md b/keyboards/plain60/keymaps/yanfali/readme.md new file mode 100644 index 000000000..790f3af5d --- /dev/null +++ b/keyboards/plain60/keymaps/yanfali/readme.md @@ -0,0 +1,9 @@ +- Disable VIA +- Tsangan bottom row +- Split Backspace +- Split Right shift +- RESET, F keys, and Cursors (WASD), DEL, Capslock on layer +- Capslock -> LCTL_T(KC_ESC) +- Bootmagic lite +- Command enabled +- Console enabled diff --git a/keyboards/plain60/keymaps/yanfali/rules.mk b/keyboards/plain60/keymaps/yanfali/rules.mk new file mode 100644 index 000000000..3d1f67763 --- /dev/null +++ b/keyboards/plain60/keymaps/yanfali/rules.mk @@ -0,0 +1,4 @@ +BOOTMAGIC = lite +DYNAMIC_KEYMAP_ENABLE = no +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes From 2558466d78a2c2436dedeff593491bdb20780cfc Mon Sep 17 00:00:00 2001 From: pngu <34752364+itspngu@users.noreply.github.com> Date: Tue, 11 Jun 2019 23:58:29 +0200 Subject: [PATCH 213/341] [Keyboard] Added idb 60 keyboard (#5994) * Added idb 60 keyboard * fixed info.json * implemented revievers' suggested changes * fixed an error * implemented revievers' suggestions * further cleanup * implemented suggested changes * fixed errors --- keyboards/idb_60/config.h | 170 ++++++++++++++++++++++ keyboards/idb_60/idb_60.c | 23 +++ keyboards/idb_60/idb_60.h | 38 +++++ keyboards/idb_60/info.json | 76 ++++++++++ keyboards/idb_60/keymaps/default/keymap.c | 32 ++++ keyboards/idb_60/keymaps/pngu/keymap.c | 39 +++++ keyboards/idb_60/readme.md | 17 +++ keyboards/idb_60/rules.mk | 65 +++++++++ 8 files changed, 460 insertions(+) create mode 100644 keyboards/idb_60/config.h create mode 100644 keyboards/idb_60/idb_60.c create mode 100644 keyboards/idb_60/idb_60.h create mode 100644 keyboards/idb_60/info.json create mode 100644 keyboards/idb_60/keymaps/default/keymap.c create mode 100644 keyboards/idb_60/keymaps/pngu/keymap.c create mode 100644 keyboards/idb_60/readme.md create mode 100644 keyboards/idb_60/rules.mk diff --git a/keyboards/idb_60/config.h b/keyboards/idb_60/config.h new file mode 100644 index 000000000..b85eb14af --- /dev/null +++ b/keyboards/idb_60/config.h @@ -0,0 +1,170 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6060 // 24672 +#define PRODUCT_ID 0x6060 // 24672 +#define DEVICE_VER 0x0001 +#define MANUFACTURER pngu +#define PRODUCT idb 60 +#define DESCRIPTION QMK keyboard firmware for idb 60 + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { C2, D0, D1, D2, D3, D4, D5, D6, B0, B1 } +#define MATRIX_COL_PINS { B2, B3, B4, C6, B6, B7, C7, B5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 0 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 32 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 34 + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 +// Dynamic macro starts after dynamic keymaps (35+(4*10*6*2)) = (35+480) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 675 // **** CHANGE THIS BASED ON MATRIX_ROWS & MATRIX_COLS **** +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 349 // **** CHANGE THIS BASED ON 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR **** +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/idb_60/idb_60.c b/keyboards/idb_60/idb_60.c new file mode 100644 index 000000000..d280f644b --- /dev/null +++ b/keyboards/idb_60/idb_60.c @@ -0,0 +1,23 @@ +#include "idb_60.h" + +extern inline void _idb_60_caps_led_on(void); +extern inline void _idb_60_esc_led_on(void); + +extern inline void _idb_60_caps_led_off(void); +extern inline void _idb_60_esc_led_off(void); + +void keyboard_pre_init_kb(void) { + setPinOutput(C4); + setPinOutput(C5); +} + +void led_set_kb(uint8_t usb_led) { + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + _idb_60_caps_led_on(); + } else { + _idb_60_caps_led_off(); + } + + led_set_user(usb_led); +} diff --git a/keyboards/idb_60/idb_60.h b/keyboards/idb_60/idb_60.h new file mode 100644 index 000000000..e9045f664 --- /dev/null +++ b/keyboards/idb_60/idb_60.h @@ -0,0 +1,38 @@ +#pragma once + +#include "quantum.h" + +inline void _idb_60_caps_led_on(void) { + writePinLow(C5); +} + +inline void _idb_60_esc_led_on(void) { + writePinLow(C4); +} + +inline void _idb_60_caps_led_off(void) { + writePinLow(C5); +} + +inline void _idb_60_esc_led_off(void) { + writePinLow(C4); +} + +#define LAYOUT( \ + K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K07,\ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36,\ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K56,\ + K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K66, K76,\ + K80, K90, K81, K93, K95, K86, K96\ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16 }, \ + { K20, K21, K22, K23, K24, K25, K26 }, \ + { K30, K31, K32, K33, K34, K35, K36 }, \ + { K40, K41, K42, K43, K44, K45, KC_NO }, \ + { K50, K51, K52, K53, K54, K55, K56 }, \ + { K60, K61, K62, K63, K64, K65, K66 }, \ + { K70, K71, K72, K73, K74, K75, K76 }, \ + { K80, K81, KC_NO, KC_NO, KC_NO, KC_NO, K86 }, \ + { K90, KC_NO, KC_NO, K93, KC_NO, K95, K96 } \ +} diff --git a/keyboards/idb_60/info.json b/keyboards/idb_60/info.json new file mode 100644 index 000000000..9bbe580bf --- /dev/null +++ b/keyboards/idb_60/info.json @@ -0,0 +1,76 @@ +{ + "keyboard_name": "idb_60", + "url": "https://idb-keyboards.xyz/60", + "maintainer": "pngu", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc","x":0,"y":0}, + {"label":"!\n1","x":1,"y":0}, + {"label":"@\n2","x":2,"y":0}, + {"label":"#\n3","x":3,"y":0}, + {"label":"$\n4","x":4,"y":0}, + {"label":"%\n5","x":5,"y":0}, + {"label":"^\n6","x":6,"y":0}, + {"label":"&\n7","x":7,"y":0}, + {"label":"*\n8","x":8,"y":0}, + {"label":"(\n9","x":9,"y":0}, + {"label":")\n0","x":10,"y":0}, + {"label":"_\n-","x":11,"y":0}, + {"label":"+\n=","x":12,"y":0}, + {"label":"BS","x":13,"y":0}, + {"label":"~\n`","x":14,"y":0}, + {"label":"Tab","x":0,"y":1,"w":1.5}, + {"label":"Q","x":1.5,"y":1}, + {"label":"W","x":2.5,"y":1}, + {"label":"E","x":3.5,"y":1}, + {"label":"R","x":4.5,"y":1}, + {"label":"T","x":5.5,"y":1}, + {"label":"Y","x":6.5,"y":1}, + {"label":"U","x":7.5,"y":1}, + {"label":"I","x":8.5,"y":1}, + {"label":"O","x":9.5,"y":1}, + {"label":"P","x":10.5,"y":1}, + {"label":"{\n[","x":11.5,"y":1}, + {"label":"}\n]","x":12.5,"y":1}, + {"label":"|\n\\","x":13.5,"y":1,"w":1.5}, + {"label":"Caps Lock","x":0,"y":2,"w":1.75}, + {"label":"A","x":1.75,"y":2}, + {"label":"S","x":2.75,"y":2}, + {"label":"D","x":3.75,"y":2}, + {"label":"F","x":4.75,"y":2}, + {"label":"G","x":5.75,"y":2}, + {"label":"H","x":6.75,"y":2}, + {"label":"J","x":7.75,"y":2}, + {"label":"K","x":8.75,"y":2}, + {"label":"L","x":9.75,"y":2}, + {"label":":\n;","x":10.75,"y":2}, + {"label":"\"\n'","x":11.75,"y":2}, + {"label":"Enter","x":12.75,"y":2,"w":2.25}, + {"label":"Shift","x":0,"y":3,"w":1.25}, + {"label":">\n<\n\n|","x":1.25,"y":3}, + {"label":"Z","x":2.25,"y":3}, + {"label":"X","x":3.25,"y":3}, + {"label":"C","x":4.25,"y":3}, + {"label":"V","x":5.25,"y":3}, + {"label":"B","x":6.25,"y":3}, + {"label":"N","x":7.25,"y":3}, + {"label":"M","x":8.25,"y":3}, + {"label":"<\n,","x":9.25,"y":3}, + {"label":">\n.","x":10.25,"y":3}, + {"label":"?\n/","x":11.25,"y":3}, + {"label":"Shift","x":12.25,"y":3,"w":1.75}, + {"label":"Fn","x":14,"y":3}, + {"label":"Ctrl","x":0,"y":4,"w":1.5}, + {"label":"Win","x":1.5,"y":4}, + {"label":"Alt","x":2.5,"y":4,"w":1.5}, + {"label":"","x":4,"y":4,"w":7}, + {"label":"Alt","x":11,"y":4,"w":1.5}, + {"label":"Win","x":12.5,"y":4}, + {"label":"Ctrl","x":13.5,"y":4,"w":1.5} + ] + } + } +} diff --git a/keyboards/idb_60/keymaps/default/keymap.c b/keyboards/idb_60/keymaps/default/keymap.c new file mode 100644 index 000000000..48c998774 --- /dev/null +++ b/keyboards/idb_60/keymaps/default/keymap.c @@ -0,0 +1,32 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + 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_NO, + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_MENU, KC_RCTL + ), + [1] = LAYOUT( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ) + +}; + +// Layer LED indicators + +layer_state_t layer_state_set_user(layer_state_t state) { + if (layer_state_cmp(state, 1)) { + _idb_60_esc_led_on(); + } else { + _idb_60_esc_led_off(); + } + + return state; +} \ No newline at end of file diff --git a/keyboards/idb_60/keymaps/pngu/keymap.c b/keyboards/idb_60/keymaps/pngu/keymap.c new file mode 100644 index 000000000..de336e5fa --- /dev/null +++ b/keyboards/idb_60/keymaps/pngu/keymap.c @@ -0,0 +1,39 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + 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_NO, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Z, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + LT(2, KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_NUBS, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_MENU, MO(1) + ), + [1] = LAYOUT( + RESET, 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, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ) + +}; + +// Layer LED indicators + +layer_state_t layer_state_set_user(layer_state_t state) { + if (layer_state_cmp(state, 1)) { + _idb_60_esc_led_on(); + } else { + _idb_60_esc_led_off(); + } + + return state; +} \ No newline at end of file diff --git a/keyboards/idb_60/readme.md b/keyboards/idb_60/readme.md new file mode 100644 index 000000000..e6ed6822b --- /dev/null +++ b/keyboards/idb_60/readme.md @@ -0,0 +1,17 @@ +# idb 60 PCB + +Firmware for the idb 60 PCB + +Keyboard Maintainer: [/u/omgitspngu](https://github.com/itspngu) +Hardware Supported: idb 60 PCB +Hardware Availability: [/u/omgitspngu](https://www.reddit.com/user/omgitspngu/) + +Make example for this keyboard (after setting up your build environment): + + make idb_60:default + +Or to make and flash: + + make idb_60:default:dfu + +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). diff --git a/keyboards/idb_60/rules.mk b/keyboards/idb_60/rules.mk new file mode 100644 index 000000000..b5c941347 --- /dev/null +++ b/keyboards/idb_60/rules.mk @@ -0,0 +1,65 @@ +# MCU name +MCU = atmega32u2 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +BOOTLOADER = atmel-dfu + + +# 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 +# KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +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 keyboard backlight functionality +# MIDI_ENABLE = YES # MIDI controls +# UNICODE_ENABLE = YES # Unicode +# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID \ No newline at end of file From b92387b7499e21603e241d136db92c6e716b0cba Mon Sep 17 00:00:00 2001 From: Volodymyr Lukashevych Date: Tue, 11 Jun 2019 15:18:14 -0700 Subject: [PATCH 214/341] [Keymap] Add BB8520 trackpad support for CrKbd (#5925) * Add vlukash CrKbd keymap to support trackpad adapter. The trackpad adapter uses Elite-C board that has five extra pins. Also SPI pins are taken for trackpad, keymap config updates column data pins for matrix scan. * Update vlukash keymap * Enable pointing devide, configure mouse BTN1 * Set TAPPING_TERM to 300 * Add support for the BlackBerry 8520 trackpad * Add vlukash keymap for master-right no-trackpad version * Remap backspace * Set EXTRAKEY_ENABLE = yes * Update thumb keys mappings * Set bootloader to atmel-dfu * Sync keymap * Add scrolling support * Make debug LEDS conditional * Add support for both flex and no-flex PCBs * Add readme and rename root folders * Update readme file with blog link * Fix readme file formatting * Remove ADJUST keycode, code cleanup. * Add Win key to the keymap. --- .../keymaps/vlukash_trackpad_left/config.h | 21 ++ .../keymaps/vlukash_trackpad_left/keymap.c | 227 ++++++++++++++++++ .../keymaps/vlukash_trackpad_left/readme.md | 14 ++ .../keymaps/vlukash_trackpad_left/rules.mk | 11 + .../keymaps/vlukash_trackpad_right/config.h | 35 +++ .../keymaps/vlukash_trackpad_right/keymap.c | 199 +++++++++++++++ .../keymaps/vlukash_trackpad_right/readme.md | 14 ++ .../keymaps/vlukash_trackpad_right/rules.mk | 10 + .../keymaps/vlukash_trackpad_right/trackpad.c | 78 ++++++ .../keymaps/vlukash_trackpad_right/trackpad.h | 32 +++ keyboards/crkbd/rev1/matrix.c | 50 +++- 11 files changed, 684 insertions(+), 7 deletions(-) create mode 100644 keyboards/crkbd/keymaps/vlukash_trackpad_left/config.h create mode 100644 keyboards/crkbd/keymaps/vlukash_trackpad_left/keymap.c create mode 100644 keyboards/crkbd/keymaps/vlukash_trackpad_left/readme.md create mode 100644 keyboards/crkbd/keymaps/vlukash_trackpad_left/rules.mk create mode 100644 keyboards/crkbd/keymaps/vlukash_trackpad_right/config.h create mode 100644 keyboards/crkbd/keymaps/vlukash_trackpad_right/keymap.c create mode 100644 keyboards/crkbd/keymaps/vlukash_trackpad_right/readme.md create mode 100644 keyboards/crkbd/keymaps/vlukash_trackpad_right/rules.mk create mode 100644 keyboards/crkbd/keymaps/vlukash_trackpad_right/trackpad.c create mode 100644 keyboards/crkbd/keymaps/vlukash_trackpad_right/trackpad.h diff --git a/keyboards/crkbd/keymaps/vlukash_trackpad_left/config.h b/keyboards/crkbd/keymaps/vlukash_trackpad_left/config.h new file mode 100644 index 000000000..bdd1a099a --- /dev/null +++ b/keyboards/crkbd/keymaps/vlukash_trackpad_left/config.h @@ -0,0 +1,21 @@ +#pragma once + +/* Select hand configuration */ + +#define MASTER_RIGHT +// #define EE_HANDS + +#define SSD1306OLED + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 100 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 27 +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 diff --git a/keyboards/crkbd/keymaps/vlukash_trackpad_left/keymap.c b/keyboards/crkbd/keymaps/vlukash_trackpad_left/keymap.c new file mode 100644 index 000000000..48f60419f --- /dev/null +++ b/keyboards/crkbd/keymaps/vlukash_trackpad_left/keymap.c @@ -0,0 +1,227 @@ +#include QMK_KEYBOARD_H +#include "bootloader.h" +#ifdef PROTOCOL_LUFA + #include "lufa.h" + #include "split_util.h" +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + RGBRST, + MBTN1, + SCRL +}; + +#define KC______ KC_TRNS +#define KC_XXXXX KC_NO +#define KC_LOWER LOWER +#define KC_RAISE RAISE +#define KC_RST RESET +#define KC_LRST RGBRST +#define KC_LTOG RGB_TOG +#define KC_LHUI RGB_HUI +#define KC_LHUD RGB_HUD +#define KC_LSAI RGB_SAI +#define KC_LSAD RGB_SAD +#define KC_LVAI RGB_VAI +#define KC_LVAD RGB_VAD +#define KC_LMOD RGB_MOD + +#define KC_CTLA CTL_T(KC_A) +#define KC_CTLSC CTL_T(KC_SCLN) +#define KC_SFTZ SFT_T(KC_Z) +#define KC_SFTSL SFT_T(KC_SLSH) +#define KC_WINX LWIN_T(KC_X) +#define KC_WINDO RWIN_T(KC_DOT) + +#define KC_MBTN1 MBTN1 +#define KC_SCRL SCRL + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_kc( + //,-----------------------------------------. ,-----------------------------------------. + ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + TAB, CTLA, S, D, F, G, H, J, K, L, CTLSC, QUOT, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + GRAVE, SFTZ, WINX, C, V, B, N, M, COMM, WINDO, SFTSL,BSLASH, + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + LOWER, SPC, SCRL, MBTN1, ENT, RAISE + //`--------------------' `--------------------' + ), + + [_LOWER] = LAYOUT_kc( + //,-----------------------------------------. ,-----------------------------------------. + ESC, XXXXX, PGDN, PSCR, PGUP, LBRC, RBRC, 7, 8, 9, XXXXX, XXXXX, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + XXXXX, LCTRL, PLUS, MINS, EQL, LPRN, RPRN, 4, 5, 6, RCTRL, XXXXX, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + XXXXX, LSFT, HOME, XXXXX, END, LCBR, RCBR, 1, 2, 3, RSFT, XXXXX, + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + LOWER, SPC, SCRL, MBTN1, ENT, 0 + //`--------------------' `--------------------' + ), + + [_RAISE] = LAYOUT_kc( + //,-----------------------------------------. ,-----------------------------------------. + ESC, XXXXX, F7, F8, F9, F10, BTN2, BTN2, MNXT, MPRV, MPLY, MSTP, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + XXXXX, LCTRL, F4, F5, F6, F11, LEFT, DOWN, UP, RIGHT, RCTRL, XXXXX, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + XXXXX, LSFT, F1, F2, F3, F12, XXXXX, XXXXX, VOLU, VOLD, MUTE, RSFT, + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + LOWER, SPC, SCRL, MBTN1, ENT, RAISE + //`--------------------' `--------------------' + ), + + [_ADJUST] = LAYOUT_kc( + //,-----------------------------------------. ,-----------------------------------------. + RST, LRST, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, RST, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LTOG, LHUI, LSAI, LVAI, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LMOD, LHUD, LSAD, LVAD, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + LOWER, SPC, SCRL, MBTN1, ENT, RAISE + //`--------------------' `--------------------' + ) +}; + +int RGB_current_mode; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + #ifdef SSD1306OLED + iota_gfx_init(!has_usb()); // turns on the display + #endif +} + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED + +// When add source files to SRC in rules.mk, you can use functions. +const char *read_layer_state(void); +const char *read_logo(void); +void set_keylog(uint16_t keycode, keyrecord_t *record); +const char *read_keylog(void); +const char *read_keylogs(void); + +void matrix_scan_user(void) { + iota_gfx_task(); +} + +void matrix_render_user(struct CharacterMatrix *matrix) { + if (is_master) { + // If you want to change the display of OLED, you need to change here + matrix_write_ln(matrix, read_layer_state()); + matrix_write_ln(matrix, read_keylog()); + matrix_write_ln(matrix, read_keylogs()); + } else { + matrix_write(matrix, read_logo()); + } +} + +void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} + +void iota_gfx_task_user(void) { + struct CharacterMatrix matrix; + matrix_clear(&matrix); + matrix_render_user(&matrix); + matrix_update(&display, &matrix); +} +#endif//SSD1306OLED + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { +#ifdef SSD1306OLED + set_keylog(keycode, record); +#endif + } + + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + case RGB_MOD: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + #endif + return false; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + #endif + break; + } + return true; +} + diff --git a/keyboards/crkbd/keymaps/vlukash_trackpad_left/readme.md b/keyboards/crkbd/keymaps/vlukash_trackpad_left/readme.md new file mode 100644 index 000000000..91b884749 --- /dev/null +++ b/keyboards/crkbd/keymaps/vlukash_trackpad_left/readme.md @@ -0,0 +1,14 @@ +# CrKbd with the Trackpad support + +CrKbd version that supports BlackBerry 8520 trackpad via additional PCB. +See this repository for more details: + - https://github.com/vlukash/corne-trackpad + - https://vlukash.com/2019/01/15/trackpad-in-keycap-corne-crkbd-keyboard + +This firmware is for the Left keyboard. + +# Build + +``` +make crkbd:vlukash_trackpad_left:dfu +``` diff --git a/keyboards/crkbd/keymaps/vlukash_trackpad_left/rules.mk b/keyboards/crkbd/keymaps/vlukash_trackpad_left/rules.mk new file mode 100644 index 000000000..46be73c47 --- /dev/null +++ b/keyboards/crkbd/keymaps/vlukash_trackpad_left/rules.mk @@ -0,0 +1,11 @@ +# Build Options +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. + +BOOTLOADER = atmel-dfu + +# If you want to change the display of OLED, you need to change here +SRC += ./lib/glcdfont.c \ + ./lib/rgb_state_reader.c \ + ./lib/layer_state_reader.c \ + ./lib/logo_reader.c \ + ./lib/keylogger.c \ diff --git a/keyboards/crkbd/keymaps/vlukash_trackpad_right/config.h b/keyboards/crkbd/keymaps/vlukash_trackpad_right/config.h new file mode 100644 index 000000000..8cbd8e907 --- /dev/null +++ b/keyboards/crkbd/keymaps/vlukash_trackpad_right/config.h @@ -0,0 +1,35 @@ +#pragma once + +#define NO_DEBUG_LEDS + +// Connector PCB version +// 1 - PCB that supports flex caple and the trackpad sensor is mounted on an 'H' keycap +// - https://github.com/vlukash/corne-trackpad/tree/master/connector +// 2 - PCB woth no flex option, track sensor mounted directly on the PCB +// - https://github.com/vlukash/corne-trackpad/tree/master/connector-no-flex +#define TRACKPAD_CONNECTOR_VER 1 + +/* Select hand configuration */ +#define MASTER_RIGHT + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 300 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 27 +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* key matrix size */ +// Rows are doubled-up +#undef MATRIX_COL_PINS +#define MATRIX_COL_PINS { F4, F5, F6, F7, B7, D5 } + +/* ws2812 RGB LED */ +#undef RGB_DI_PIN +#define RGB_DI_PIN B5 diff --git a/keyboards/crkbd/keymaps/vlukash_trackpad_right/keymap.c b/keyboards/crkbd/keymaps/vlukash_trackpad_right/keymap.c new file mode 100644 index 000000000..8749f7a68 --- /dev/null +++ b/keyboards/crkbd/keymaps/vlukash_trackpad_right/keymap.c @@ -0,0 +1,199 @@ +#include QMK_KEYBOARD_H +#include "bootloader.h" +#include "mousekey.h" +#include "pointing_device.h" +#include "report.h" + +#ifdef PROTOCOL_LUFA + #include "lufa.h" + #include "split_util.h" +#endif + +extern bool isScrollMode; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + RGBRST, + MBTN1, + SCRL +}; + +#define KC______ KC_TRNS +#define KC_XXXXX KC_NO +#define KC_LOWER LOWER +#define KC_RAISE RAISE +#define KC_RST RESET +#define KC_LRST RGBRST +#define KC_LTOG RGB_TOG +#define KC_LHUI RGB_HUI +#define KC_LHUD RGB_HUD +#define KC_LSAI RGB_SAI +#define KC_LSAD RGB_SAD +#define KC_LVAI RGB_VAI +#define KC_LVAD RGB_VAD +#define KC_LMOD RGB_MOD + +#define KC_CTLA CTL_T(KC_A) +#define KC_CTLSC CTL_T(KC_SCLN) +#define KC_SFTZ SFT_T(KC_Z) +#define KC_SFTSL SFT_T(KC_SLSH) +#define KC_WINX LWIN_T(KC_X) +#define KC_WINDO RWIN_T(KC_DOT) + +#define KC_MBTN1 MBTN1 +#define KC_SCRL SCRL + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_kc( + //,-----------------------------------------. ,-----------------------------------------. + ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + TAB, CTLA, S, D, F, G, H, J, K, L, CTLSC, QUOT, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + GRAVE, SFTZ, WINX, C, V, B, N, M, COMM, WINDO, SFTSL,BSLASH, + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + LOWER, SPC, SCRL, MBTN1, ENT, RAISE + //`--------------------' `--------------------' + ), + + [_LOWER] = LAYOUT_kc( + //,-----------------------------------------. ,-----------------------------------------. + ESC, XXXXX, PGDN, PSCR, PGUP, LBRC, RBRC, 7, 8, 9, XXXXX, XXXXX, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + XXXXX, LCTRL, PLUS, MINS, EQL, LPRN, RPRN, 4, 5, 6, RCTRL, XXXXX, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + XXXXX, LSFT, HOME, XXXXX, END, LCBR, RCBR, 1, 2, 3, RSFT, XXXXX, + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + LOWER, SPC, SCRL, MBTN1, ENT, 0 + //`--------------------' `--------------------' + ), + + [_RAISE] = LAYOUT_kc( + //,-----------------------------------------. ,-----------------------------------------. + ESC, XXXXX, F7, F8, F9, F10, BTN2, BTN2, MNXT, MPRV, MPLY, MSTP, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + XXXXX, LCTRL, F4, F5, F6, F11, LEFT, DOWN, UP, RIGHT, RCTRL, XXXXX, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + XXXXX, LSFT, F1, F2, F3, F12, XXXXX, XXXXX, VOLU, VOLD, MUTE, RSFT, + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + LOWER, SPC, SCRL, MBTN1, ENT, RAISE + //`--------------------' `--------------------' + ), + + [_ADJUST] = LAYOUT_kc( + //,-----------------------------------------. ,-----------------------------------------. + RST, LRST, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, RST, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LTOG, LHUI, LSAI, LVAI, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LMOD, LHUD, LSAD, LVAD, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + LOWER, SPC, SCRL, MBTN1, ENT, RAISE + //`--------------------' `--------------------' + ) +}; + +int RGB_current_mode; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + report_mouse_t currentReport = {}; + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + case RGB_MOD: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + #endif + return false; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + #endif + break; + case MBTN1: + currentReport = pointing_device_get_report(); + if (record->event.pressed) { + currentReport.buttons |= MOUSE_BTN1; + } + else { + currentReport.buttons &= ~MOUSE_BTN1; + } + pointing_device_set_report(currentReport); + pointing_device_send(); + return false; + case SCRL: + if (record->event.pressed) { + isScrollMode = true; + } + else { + isScrollMode = false; + } + return false; + } + return true; +} diff --git a/keyboards/crkbd/keymaps/vlukash_trackpad_right/readme.md b/keyboards/crkbd/keymaps/vlukash_trackpad_right/readme.md new file mode 100644 index 000000000..cd511018c --- /dev/null +++ b/keyboards/crkbd/keymaps/vlukash_trackpad_right/readme.md @@ -0,0 +1,14 @@ +# CrKbd with the Trackpad support + +CrKbd version that supports BlackBerry 8520 trackpad via additional PCB. +See this repository for more details: + - https://github.com/vlukash/corne-trackpad + - https://vlukash.com/2019/01/15/trackpad-in-keycap-corne-crkbd-keyboard + +This firmware is for the Right keyboard. + +# Build + +``` +make crkbd:vlukash_trackpad_right:dfu +``` diff --git a/keyboards/crkbd/keymaps/vlukash_trackpad_right/rules.mk b/keyboards/crkbd/keymaps/vlukash_trackpad_right/rules.mk new file mode 100644 index 000000000..bd53c1921 --- /dev/null +++ b/keyboards/crkbd/keymaps/vlukash_trackpad_right/rules.mk @@ -0,0 +1,10 @@ +# Build Options +POINTING_DEVICE_ENABLE = yes # Generic Pointer, not as big as mouse keys hopefully. +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. + +BOOTLOADER = atmel-dfu + +# Add support for the BB 8520 trackpad +SRC += trackpad.c diff --git a/keyboards/crkbd/keymaps/vlukash_trackpad_right/trackpad.c b/keyboards/crkbd/keymaps/vlukash_trackpad_right/trackpad.c new file mode 100644 index 000000000..afccb8c7e --- /dev/null +++ b/keyboards/crkbd/keymaps/vlukash_trackpad_right/trackpad.c @@ -0,0 +1,78 @@ +#include "trackpad.h" + +// bool isScrollingMode = false; +bool isScrollMode = false; + +void pointing_device_init(void){ + + SPI_Init(SPI_SPEED_FCPU_DIV_8 | SPI_MODE_MASTER); + + // Set as output + TP_RESET_INIT; + TP_SHUTDOWN_INIT; + TP_CS_INIT; + LVL_SHIFT_EN_INIT; + + // Reset level shifter + LVL_SHIFT_EN_LO; + wait_ms(100); + LVL_SHIFT_EN_HI; + + // Force a BB-8520 reset + TP_RESET_HI; + wait_ms(100); + TP_RESET_LO; + + // Turn on BB-8520 trackpad + TP_SHUTDOWN_LO; + + TP_CS_HI; +} + +uint8_t readRegister(uint8_t address) { + uint8_t data; + + TP_CS_LO; + + // Read the data + SPI_TransferByte(address); + data = SPI_TransferByte(0x00); + + TP_CS_HI; + + return data; +} + +void pointing_device_task(void){ + uint8_t motion = readRegister(0x02); + + // Motion has occurred on the trackpad + if (motion > 127) { + + int8_t dx, dy; + + if(TRACKPAD_CONNECTOR_VER == 1) { + dx = readRegister(0x03); + dy = -readRegister(0x04); + } + else { + dy = -readRegister(0x03); + dx = -readRegister(0x04); + } + + report_mouse_t currentReport = pointing_device_get_report(); + if (isScrollMode) + { + currentReport.h = dx/SCROLL_SPEED_DIVIDER; + currentReport.v = dy/SCROLL_SPEED_DIVIDER; + } + else + { + currentReport.x = dx * POINTER_SPEED_MULTIPLIER; + currentReport.y = dy * POINTER_SPEED_MULTIPLIER; + } + + pointing_device_set_report(currentReport); + pointing_device_send(); + } +} diff --git a/keyboards/crkbd/keymaps/vlukash_trackpad_right/trackpad.h b/keyboards/crkbd/keymaps/vlukash_trackpad_right/trackpad.h new file mode 100644 index 000000000..755abc7de --- /dev/null +++ b/keyboards/crkbd/keymaps/vlukash_trackpad_right/trackpad.h @@ -0,0 +1,32 @@ +#pragma once + +#include "pointing_device.h" +#include "quantum.h" +#include "report.h" +#include +#include "../../lib/lufa/LUFA/Drivers/Peripheral/SPI.h" + +// Trackpad speed adjustments +#define POINTER_SPEED_MULTIPLIER 2 +#define SCROLL_SPEED_DIVIDER 6 + +// Pins on corresponding ports +#define TP_RESET 1 +#define TP_SHUTDOWN 0 +#define TP_CS 0 +#define LVL_SHIFT_EN 7 + +// Configure as output +#define TP_RESET_INIT DDRF |= (1 << TP_RESET); +#define TP_SHUTDOWN_INIT DDRF |= (1 << TP_SHUTDOWN); +#define TP_CS_INIT DDRB |= (1 << TP_CS); +#define LVL_SHIFT_EN_INIT DDRC |= (1 << LVL_SHIFT_EN); + +#define TP_RESET_HI PORTF |= (1 << TP_RESET); +#define TP_RESET_LO PORTF &= ~ (1 << TP_RESET); +#define TP_SHUTDOWN_HI PORTF |= (1 << TP_SHUTDOWN); +#define TP_SHUTDOWN_LO PORTF &= ~ (1 << TP_SHUTDOWN); +#define TP_CS_HI PORTB |= (1 << TP_CS); +#define TP_CS_LO PORTB &= ~ (1 << TP_CS); +#define LVL_SHIFT_EN_HI PORTC |= (1 << LVL_SHIFT_EN); +#define LVL_SHIFT_EN_LO PORTC &= ~ (1 << LVL_SHIFT_EN); diff --git a/keyboards/crkbd/rev1/matrix.c b/keyboards/crkbd/rev1/matrix.c index 718cc5744..dd93506db 100644 --- a/keyboards/crkbd/rev1/matrix.c +++ b/keyboards/crkbd/rev1/matrix.c @@ -93,6 +93,44 @@ uint8_t matrix_cols(void) return MATRIX_COLS; } +void tx_rx_leds_init(void) +{ +#ifndef NO_DEBUG_LEDS + TX_RX_LED_INIT; + TXLED0; + RXLED0; +#endif +} + +void tx_led_on(void) +{ +#ifndef NO_DEBUG_LEDS + TXLED1; +#endif +} + +void tx_led_off(void) +{ +#ifndef NO_DEBUG_LEDS + TXLED0; +#endif +} + +void rx_led_on(void) +{ +#ifndef NO_DEBUG_LEDS + RXLED1; +#endif +} + +void rx_led_off(void) +{ +#ifndef NO_DEBUG_LEDS + RXLED0; +#endif +} + + void matrix_init(void) { debug_enable = true; @@ -102,9 +140,7 @@ void matrix_init(void) unselect_rows(); init_cols(); - TX_RX_LED_INIT; - TXLED0; - RXLED0; + tx_rx_leds_init(); // initialize matrix state: all keys off for (uint8_t i=0; i < MATRIX_ROWS; i++) { @@ -189,10 +225,10 @@ int serial_transaction(int master_changed) { int ret=serial_update_buffers(); #endif if (ret ) { - if(ret==2) RXLED1; + if(ret==2) rx_led_on(); return 1; } - RXLED0; + rx_led_off(); memcpy(&matrix[slaveOffset], (void *)serial_slave_buffer, SERIAL_SLAVE_BUFFER_LENGTH); return 0; @@ -241,7 +277,7 @@ uint8_t matrix_master_scan(void) { if( serial_transaction(mchanged) ) { #endif // turn on the indicator led when halves are disconnected - TXLED1; + tx_led_on(); error_count++; @@ -254,7 +290,7 @@ uint8_t matrix_master_scan(void) { } } else { // turn off the indicator led on no error - TXLED0; + tx_led_off(); error_count = 0; } matrix_scan_quantum(); From e6a81133dd3d0d4076a08be76340f905fdbf7c7f Mon Sep 17 00:00:00 2001 From: "Michael F. Lamb" Date: Tue, 11 Jun 2019 15:27:17 -0700 Subject: [PATCH 215/341] Add SH1106 OLED support (#5787) * modify oled_driver to support SH1106 also: - improve mechanism to specify which OLED IC we use - comment calc_bounds() - give OLED_COLUMN_OFFSET a default value - inline comment re: OLED MEMORY_MODE and SH1106 - update docs/feature_oled_driver.h for SH1106 support and related changes - docs: OLED: note we have tested SSD1306 on ARM boards (per @XScorpion2) - define out MEMORY_MODE when using SH1106 OLED driver * document that SSD1306 128x64 on AVR works Per @XScorpion2: https://github.com/qmk/qmk_firmware/pull/5787#discussion_r291837842 --- docs/feature_oled_driver.md | 38 +++++++++++++++++++++++++------------ drivers/oled/oled_driver.c | 31 +++++++++++++++++++++++++++--- drivers/oled/oled_driver.h | 14 +++++++++++++- 3 files changed, 67 insertions(+), 16 deletions(-) diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md index 144b695b7..155dfa9d2 100644 --- a/docs/feature_oled_driver.md +++ b/docs/feature_oled_driver.md @@ -2,7 +2,17 @@ ## OLED Supported Hardware -128x32 OLED modules using SSD1306 driver IC over I2C. Supported on AVR based keyboards. Possible but untested hardware includes ARM based keyboards and other sized OLED modules using SSD1306 over I2C, such as 128x64. +OLED modules using SSD1306 or SH1106 driver ICs, communicating over I2C. +Tested combinations: + +| IC driver | Size | Keyboard Platform | Notes | +|-----------|--------|-------------------|--------------------------| +| SSD1306 | 128x32 | AVR | Primary support | +| SSD1306 | 128x64 | AVR | Verified working | +| SSD1306 | 128x32 | ARM | | +| SH1106 | 128x64 | AVR | No rotation or scrolling | + +Hardware configurations using ARM-based microcontrollers or different sizes of OLED modules may be compatible, but are untested. !> Warning: This OLED Driver currently uses the new i2c_master driver from split common code. If your split keyboard uses i2c to communication between sides this driver could cause an address conflict (serial is fine). Please contact your keyboard vendor and ask them to migrate to the latest split common code to fix this. @@ -86,17 +96,17 @@ void oled_task_user(void) { ## Basic Configuration -|Define |Default |Description | -|-----------------------|---------------|------------------------------------------------| -|`OLED_DISPLAY_ADDRESS` |`0x3C` |The i2c address of the OLED Display | -|`OLED_FONT_H` |`"glcdfont.c"` |The font code file to use for custom fonts | -|`OLED_FONT_START` |`0` |The starting characer index for custom fonts | -|`OLED_FONT_END` |`224` |The ending characer index for custom fonts | -|`OLED_FONT_WIDTH` |`6` |The font width | -|`OLED_FONT_HEIGHT` |`8` |The font height (untested) | -|`OLED_DISABLE_TIMEOUT` |*Not defined* |Disables the built in OLED timeout feature. Useful when implementing custom timeout rules.| - - +| Define | Default | Description | +|------------------------|-------------------|----------------------------------------------------------------------------------------------------------------------------| +| `OLED_DISPLAY_ADDRESS` | `0x3C` | The i2c address of the OLED Display | +| `OLED_FONT_H` | `"glcdfont.c"` | The font code file to use for custom fonts | +| `OLED_FONT_START` | `0` | The starting characer index for custom fonts | +| `OLED_FONT_END` | `224` | The ending characer index for custom fonts | +| `OLED_FONT_WIDTH` | `6` | The font width | +| `OLED_FONT_HEIGHT` | `8` | The font height (untested) | +| `OLED_DISABLE_TIMEOUT` | *Not defined* | Disables the built in OLED timeout feature. Useful when implementing custom timeout rules. | +| `OLED_IC` | `OLED_IC_SSD1306` | Set to `OLED_IC_SH1106` if you're using the SH1106 OLED controller. | +| `OLED_COLUMN_OFFSET` | `0` | (SH1106 only.) Shift output to the right this many pixels.
Useful for 128x64 displays centered on a 132x64 SH1106 IC. | ## 128x64 & Custom sized OLED Displays @@ -119,6 +129,8 @@ void oled_task_user(void) { ### 90 Degree Rotation - Technical Mumbo Jumbo +!> Rotation is unsupported on the SH1106. + ```C // OLED Rotation enum values are flags typedef enum { @@ -250,6 +262,8 @@ uint8_t oled_max_chars(void); uint8_t oled_max_lines(void); ``` +!> Scrolling and rotation are unsupported on the SH1106. + ## SSD1306.h driver conversion guide |Old API |Recommended New API | diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c index 643e52894..a54f5fadc 100644 --- a/drivers/oled/oled_driver.c +++ b/drivers/oled/oled_driver.c @@ -33,6 +33,8 @@ along with this program. If not, see . #endif // defined(__AVR__) // Used commands from spec sheet: https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf +// for SH1106: https://www.velleman.eu/downloads/29/infosheets/sh1106_datasheet.pdf + // Fundamental Commands #define CONTRAST 0x81 #define DISPLAY_ALL_ON 0xA5 @@ -40,6 +42,7 @@ along with this program. If not, see . #define NORMAL_DISPLAY 0xA6 #define DISPLAY_ON 0xAF #define DISPLAY_OFF 0xAE +#define NOP 0xE3 // Scrolling Commands #define ACTIVATE_SCROLL 0x2F @@ -53,6 +56,9 @@ along with this program. If not, see . #define MEMORY_MODE 0x20 #define COLUMN_ADDR 0x21 #define PAGE_ADDR 0x22 +#define PAM_SETCOLUMN_LSB 0x00 +#define PAM_SETCOLUMN_MSB 0x10 +#define PAM_PAGE_ADDR 0xB0 // 0xb0 -- 0xb7 // Hardware Configuration Commands #define DISPLAY_START_LINE 0x40 @@ -158,7 +164,11 @@ bool oled_init(uint8_t rotation) { DISPLAY_OFFSET, 0x00, DISPLAY_START_LINE | 0x00, CHARGE_PUMP, 0x14, - MEMORY_MODE, 0x00, }; // Horizontal addressing mode +#if (OLED_IC != OLED_IC_SH1106) + // MEMORY_MODE is unsupported on SH1106 (Page Addressing only) + MEMORY_MODE, 0x00, // Horizontal addressing mode +#endif + }; if (I2C_TRANSMIT_P(display_setup1) != I2C_STATUS_SUCCESS) { print("oled_init cmd set 1 failed\n"); return false; @@ -219,10 +229,25 @@ void oled_clear(void) { static void calc_bounds(uint8_t update_start, uint8_t* cmd_array) { - cmd_array[1] = OLED_BLOCK_SIZE * update_start % OLED_DISPLAY_WIDTH; - cmd_array[4] = OLED_BLOCK_SIZE * update_start / OLED_DISPLAY_WIDTH; + // Calculate commands to set memory addressing bounds. + uint8_t start_page = OLED_BLOCK_SIZE * update_start / OLED_DISPLAY_WIDTH; + uint8_t start_column = OLED_BLOCK_SIZE * update_start % OLED_DISPLAY_WIDTH; +#if (OLED_IC == OLED_IC_SH1106) + // Commands for Page Addressing Mode. Sets starting page and column; has no end bound. + // Column value must be split into high and low nybble and sent as two commands. + cmd_array[0] = PAM_PAGE_ADDR | start_page; + cmd_array[1] = PAM_SETCOLUMN_LSB | ((OLED_COLUMN_OFFSET + start_column) & 0x0f); + cmd_array[2] = PAM_SETCOLUMN_MSB | ((OLED_COLUMN_OFFSET + start_column) >> 4 & 0x0f); + cmd_array[3] = NOP; + cmd_array[4] = NOP; + cmd_array[5] = NOP; +#else + // Commands for use in Horizontal Addressing mode. + cmd_array[1] = start_column; + cmd_array[4] = start_page; cmd_array[2] = (OLED_BLOCK_SIZE + OLED_DISPLAY_WIDTH - 1) % OLED_DISPLAY_WIDTH + cmd_array[1]; cmd_array[5] = (OLED_BLOCK_SIZE + OLED_DISPLAY_WIDTH - 1) / OLED_DISPLAY_WIDTH - 1; +#endif } static void calc_bounds_90(uint8_t update_start, uint8_t* cmd_array) diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h index abbdde57e..03dda2e64 100644 --- a/drivers/oled/oled_driver.h +++ b/drivers/oled/oled_driver.h @@ -19,6 +19,9 @@ along with this program. If not, see . #include #include +// an enumeration of the chips this driver supports +#define OLED_IC_SSD1306 0 +#define OLED_IC_SH1106 1 #if defined(OLED_DISPLAY_CUSTOM) // Expected user to implement the necessary defines @@ -100,7 +103,16 @@ along with this program. If not, see . // #define OLED_TARGET_MAP { 48, 32, 16, 0, 56, 40, 24, 8 } #endif // defined(OLED_DISPLAY_CUSTOM) -// Address to use for tthe i2d oled communication +#if !defined(OLED_IC) + #define OLED_IC OLED_IC_SSD1306 +#endif + +// the column address corresponding to the first column in the display hardware +#if !defined(OLED_COLUMN_OFFSET) + #define OLED_COLUMN_OFFSET 0 +#endif + +// Address to use for the i2c oled communication #if !defined(OLED_DISPLAY_ADDRESS) #define OLED_DISPLAY_ADDRESS 0x3C #endif From 5343eaf89a1fb4e4f5a88ace3dee9cfa1354deeb Mon Sep 17 00:00:00 2001 From: brickbots Date: Tue, 11 Jun 2019 15:56:06 -0700 Subject: [PATCH 216/341] [Keymap] Adding personal keymap / clarifying default keymap readme (#6119) * Adding led support for Plaid * Adding led support for Plaid * Update readme.md Fixing bad markdown * Adding my personal keymap * Clarifying LED instructions / formatting --- keyboards/plaid/keymaps/brickbots/config.h | 19 + keyboards/plaid/keymaps/brickbots/keymap.c | 411 ++++++++++++++++++++ keyboards/plaid/keymaps/brickbots/readme.md | 36 ++ keyboards/plaid/keymaps/default/readme.md | 33 +- 4 files changed, 484 insertions(+), 15 deletions(-) create mode 100644 keyboards/plaid/keymaps/brickbots/config.h create mode 100644 keyboards/plaid/keymaps/brickbots/keymap.c create mode 100644 keyboards/plaid/keymaps/brickbots/readme.md diff --git a/keyboards/plaid/keymaps/brickbots/config.h b/keyboards/plaid/keymaps/brickbots/config.h new file mode 100644 index 000000000..5733b9e4b --- /dev/null +++ b/keyboards/plaid/keymaps/brickbots/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.com) + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/plaid/keymaps/brickbots/keymap.c b/keyboards/plaid/keymaps/brickbots/keymap.c new file mode 100644 index 000000000..20b6eac68 --- /dev/null +++ b/keyboards/plaid/keymaps/brickbots/keymap.c @@ -0,0 +1,411 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.com) + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum plaid_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; + +enum plaid_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + EXT_PLV, + LED_1, + LED_2, + LED_3, + LED_4, + LED_5, + LED_6, + LED_7, + LED_8, + LED_9, + LED_0 +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +// array of keys considered modifiers for led purposes +const uint16_t modifiers[] = { + KC_LCTL, + KC_RCTL, + KC_LALT, + KC_RALT, + KC_LSFT, + KC_RSFT, + KC_LGUI, + KC_RGUI, + LOWER, + RAISE +}; + +//Setup consts for LED modes +#define LEDMODE_ON 1 //always on +#define LEDMODE_OFF 0 //always off +#define LEDMODE_MODS 2 //On with modifiers +#define LEDMODE_BLINKIN 3 //blinkinlights - % chance toggle on keypress +#define LEDMODE_KEY 4 //On with any keypress, off with key release +#define LEDMODE_ENTER 5 // On with enter key + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ltrl | Rctl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_plaid_grid( + 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_ENT , + KC_LCTL, KC_RCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_plaid_grid( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_ESC, 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_ENT , + KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_plaid_grid( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , + KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_plaid_grid( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_plaid_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | E | U | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_PLOVER] = LAYOUT_plaid_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * |Reset | | | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_plaid_grid( + RESET,LED_1, LED_2, LED_3, LED_4, LED_5,LED_6, LED_7, LED_8, LED_9, LED_0,KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +//Setup config struct for LED +typedef union { + uint32_t raw; + struct { + uint8_t red_mode :8; + uint8_t green_mode :8; + }; +} led_config_t; +led_config_t led_config; + +//Set leds to saved state during powerup +void keyboard_post_init_user(void) { + // Call the post init code. + led_config.raw = eeconfig_read_user(); + + if(led_config.red_mode == LEDMODE_ON) { + writePinHigh(LED_RED); + } + + if(led_config.green_mode == LEDMODE_ON) { + writePinHigh(LED_GREEN); + } +} + +void eeconfig_init_user(void) { // EEPROM is getting reset! + led_config.raw = 0; + led_config.red_mode = LEDMODE_ON; + led_config.green_mode = LEDMODE_MODS; + eeconfig_update_user(led_config.raw); + eeconfig_update_user(led_config.raw); +} + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +void led_keypress_update(uint8_t led, uint8_t led_mode, uint16_t keycode, keyrecord_t *record) { + switch (led_mode) { + case LEDMODE_MODS: + for (int i=0;ievent.pressed) { + writePinHigh(led); + } + else { + writePinLow(led); + } + } + } + break; + case LEDMODE_BLINKIN: + if (record->event.pressed) { + if(rand() % 2 == 1) { + if(rand() % 2 == 0) { + writePinLow(led); + } + else { + writePinHigh(led); + } + } + } + break; + case LEDMODE_KEY: + if (record->event.pressed) { + writePinHigh(led); + return; + } + else { + writePinLow(led); + return; + } + break; + case LEDMODE_ENTER: + if (keycode==KC_ENT) { + writePinHigh(led); + } + else { + writePinLow(led); + } + break; + + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + /* If the either led mode is keypressed based, call the led updater + then let it fall through the keypress handlers. Just to keep + the logic out of this procedure */ + if (led_config.red_mode >= LEDMODE_MODS && led_config.red_mode <= LEDMODE_ENTER) { + led_keypress_update(LED_RED, led_config.red_mode, keycode, record); + } + if (led_config.green_mode >= LEDMODE_MODS && led_config.green_mode <= LEDMODE_ENTER) { + led_keypress_update(LED_GREEN, led_config.green_mode, keycode, record); + } + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + layer_off(_PLOVER); + } + return false; + break; + case LED_1: + if (record->event.pressed) { + if (led_config.red_mode==LEDMODE_ON) { + led_config.red_mode=LEDMODE_OFF; + writePinLow(LED_RED); + } + else { + led_config.red_mode=LEDMODE_ON; + writePinHigh(LED_RED); + } + } + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_2: + if (record->event.pressed) { + if (led_config.green_mode==LEDMODE_ON) { + led_config.green_mode=LEDMODE_OFF; + writePinLow(LED_GREEN); + } + else { + led_config.green_mode=LEDMODE_ON; + writePinHigh(LED_GREEN); + } + } + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_3: + led_config.red_mode=LEDMODE_MODS; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_4: + led_config.green_mode=LEDMODE_MODS; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_5: + led_config.red_mode=LEDMODE_BLINKIN; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_6: + led_config.green_mode=LEDMODE_BLINKIN; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_7: + led_config.red_mode=LEDMODE_KEY; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_8: + led_config.green_mode=LEDMODE_KEY; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_9: + led_config.red_mode=LEDMODE_ENTER; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_0: + led_config.green_mode=LEDMODE_ENTER; + eeconfig_update_user(led_config.raw); + return false; + break; + } + return true; +} diff --git a/keyboards/plaid/keymaps/brickbots/readme.md b/keyboards/plaid/keymaps/brickbots/readme.md new file mode 100644 index 000000000..48a12fa8b --- /dev/null +++ b/keyboards/plaid/keymaps/brickbots/readme.md @@ -0,0 +1,36 @@ +# Brickbots keymap for plaid +Original copyright 2019 Takuya Urakawa (dm9records.com) +LED Support added by Richard Sutherland (rich@brickbots.com) + +This layout is based on the Planck layout, with esc/tab swapped and an extra +ctrl key in the bottom left corner. It includes an adjust layer (6) +accessible by holding the lower and raise modifiers (MO3 and MO4) together. +The adjustment layer is used to set the behavior of the two LEDs: + +**Modifier Mode:** +Activates when any modifier (shift, alt, os, MO) key is held +down. LED turns off when key is release + +**Blinkinlights Mode:** +Random chance of state change on each keystroke. + +**Keypress Mode:** +On for any keypress as long as the key is pressed + +**Carriage Mode:** +Turns on when enter is pressed, turns off when any next key is pressed + +To set the behavior of an LED, and save it to eeprom, hold the +raise/lower keys together to access the adjust layer, then use +the keys indicated below to set the behaviors + +* q = Toggle Red LED state, deactivates any other modes +* w = Toggle Green LED state, deactivates any other modes +* e = Set RED LED to modifier mode +* r = Set GREEN LED to modifier mode +* t = Set RED LED to Blinkinlights mode +* y = set GREEN LED to Blinkinlights mode +* u = set RED LED to Keypress mode +* i = set GREEN LED to Keypress mode +* o = set RED LED to Carriage mode +* p = set GREEN LED to Carriage mode diff --git a/keyboards/plaid/keymaps/default/readme.md b/keyboards/plaid/keymaps/default/readme.md index 2f491e367..5a08a1fff 100644 --- a/keyboards/plaid/keymaps/default/readme.md +++ b/keyboards/plaid/keymaps/default/readme.md @@ -6,27 +6,30 @@ This layout is based on the Planck layout, and includes an adjust layer (6) accessible by holding the lower and raise modifiers (MO3 and MO4) together. The adjustment layer is used to set the behavior of the two LEDs: -Modifier Mode: - +**Modifier Mode:** Activates when any modifier (shift, alt, os, MO) key is held down. LED turns off when key is release -Blinkinlights Mode: +**Blinkinlights Mode:** Random chance of state change on each keystroke. -Keypress Mode: +**Keypress Mode:** On for any keypress as long as the key is pressed -Carriage Mode: +**Carriage Mode:** Turns on when enter is pressed, turns off when any next key is pressed -q = Toggle Red LED state, deactivates any other modes -w = Toggle Green LED state, deactivates any other modes -e = Set RED LED to modifier mode -r = Set GREEN LED to modifier mode -t = Set RED LED to Blinkinlights mode -y = set GREEN LED to Blinkinlights mode -u = set RED LED to Keypress mode -i = set GREEN LED to Keypress mode -o = set RED LED to Carriage mode -p = set GREEN LED to Carriage mode +To set the behavior of an LED, and save it to eeprom, hold the +raise/lower keys together to access the adjust layer, then use +the keys indicated below to set the behaviors + +* q = Toggle Red LED state, deactivates any other modes +* w = Toggle Green LED state, deactivates any other modes +* e = Set RED LED to modifier mode +* r = Set GREEN LED to modifier mode +* t = Set RED LED to Blinkinlights mode +* y = set GREEN LED to Blinkinlights mode +* u = set RED LED to Keypress mode +* i = set GREEN LED to Keypress mode +* o = set RED LED to Carriage mode +* p = set GREEN LED to Carriage mode From 29824f3cf7cb09337a4c579ea108418e4de99b8b Mon Sep 17 00:00:00 2001 From: mgalisa Date: Tue, 11 Jun 2019 18:02:33 -0500 Subject: [PATCH 217/341] [Keymap] New planck keymap (#6093) * New keymap * Add readme; fix lack of asterisk on raise * Update default planck map to tap_code vs reg/unreg * Press F to pay respects --- keyboards/planck/keymaps/default/keymap.c | 12 +- keyboards/planck/keymaps/mgalisa/config.h | 39 ++ keyboards/planck/keymaps/mgalisa/keymap.c | 403 +++++++++++++++++++++ keyboards/planck/keymaps/mgalisa/readme.md | 15 + keyboards/planck/keymaps/mgalisa/rules.mk | 6 + 5 files changed, 467 insertions(+), 8 deletions(-) create mode 100644 keyboards/planck/keymaps/mgalisa/config.h create mode 100644 keyboards/planck/keymaps/mgalisa/keymap.c create mode 100644 keyboards/planck/keymaps/mgalisa/readme.md create mode 100644 keyboards/planck/keymaps/mgalisa/rules.mk diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c index 03cc0049e..cc090200b 100644 --- a/keyboards/planck/keymaps/default/keymap.c +++ b/keyboards/planck/keymaps/default/keymap.c @@ -274,19 +274,15 @@ void encoder_update(bool clockwise) { } else { if (clockwise) { #ifdef MOUSEKEY_ENABLE - register_code(KC_MS_WH_DOWN); - unregister_code(KC_MS_WH_DOWN); + tap_code(KC_MS_WH_DOWN); #else - register_code(KC_PGDN); - unregister_code(KC_PGDN); + tap_code(KC_PGDN); #endif } else { #ifdef MOUSEKEY_ENABLE - register_code(KC_MS_WH_UP); - unregister_code(KC_MS_WH_UP); + tap_code(KC_MS_WH_UP); #else - register_code(KC_PGUP); - unregister_code(KC_PGUP); + tap_code(KC_PGUP); #endif } } diff --git a/keyboards/planck/keymaps/mgalisa/config.h b/keyboards/planck/keymaps/mgalisa/config.h new file mode 100644 index 000000000..6fa31cc8a --- /dev/null +++ b/keyboards/planck/keymaps/mgalisa/config.h @@ -0,0 +1,39 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 + diff --git a/keyboards/planck/keymaps/mgalisa/keymap.c b/keyboards/planck/keymaps/mgalisa/keymap.c new file mode 100644 index 000000000..09acceb4c --- /dev/null +++ b/keyboards/planck/keymaps/mgalisa/keymap.c @@ -0,0 +1,403 @@ +/* Copyright 2015-2017 Jack Humbert + * + * 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 . + */ + +#include QMK_KEYBOARD_H +#include "muse.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _EMOJI, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + BACKLIT, + EXT_PLV, + AUTO_SQ, + AUTO_PA, + AUTO_CB, + SHRUG, + F4R +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT(_EMOJI,KC_ESC), 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_ENT , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + LT(_EMOJI,KC_ESC), 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_ENT , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_planck_grid( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + LT(_EMOJI,KC_ESC), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_planck_grid( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +/* [_RAISE] = LAYOUT_planck_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), */ + +/* Raise - new + * ,-----------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | {} | 7 | 8 | 9 | - | * | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F5 | F6 | F7 | F8 | () | 4 | 5 | 6 | + | / | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F9 | F10 | F11 | F12 | [] | 1 | 2 | 3 |Vol - |Vol + | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | 0 | | Home |Pg Dn |Pg Up | End | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_planck_grid( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, AUTO_CB, KC_7, KC_8, KC_9, KC_MINS, KC_ASTR, KC_BSPC, + KC_DEL, KC_F5, KC_F6, KC_F7, KC_F8, AUTO_PA, KC_4, KC_5, KC_6, KC_PLUS, KC_SLSH, KC_BSLS, + _______, KC_F9, KC_F10, KC_F11, KC_F12, AUTO_SQ, KC_1, KC_2, KC_3, KC_PGUP, KC_VOLU, _______, + _______, _______, _______, _______, _______, KC_0, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | E | U | | | | + * `-----------------------------------------------------------------------------------' + */ +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), + +[_EMOJI] = LAYOUT_planck_grid( + _______, _______, _______, F4R, _______, _______, _______, _______, _______, _______, _______, _______, + KC_TRNS, _______, _______, SHRUG, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + #ifdef KEYBOARD_planck_rev5 + PORTE &= ~(1<<6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef KEYBOARD_planck_rev5 + PORTE |= (1<<6); + #endif + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_song); + #endif + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_PLOVER); + } + return false; + break; + case AUTO_SQ: + if (record->event.pressed) { + SEND_STRING("[]SS_TAP(X_LEFT)"); + } + return false; + break; + case AUTO_CB: + if (record->event.pressed) { + SEND_STRING("{}SS_TAP(X_LEFT)"); + } + return false; + break; + case AUTO_PA: + if (record->event.pressed) { + SEND_STRING("()SS_TAP(X_LEFT)"); + } + return false; + break; + case SHRUG: + if (record->event.pressed) { + SEND_STRING("/shrugSS_TAP(X_ENT)"); + } + return false; + break; + case F4R: + if (record->event.pressed) { + SEND_STRING(":f-for-respects:"); + } + return false; + break; + } + return true; +} + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update(bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_DOWN); + #else + tap_code(KC_PGDN); + #endif + } else { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_UP); + #else + tap_code(KC_PGUP); + #endif + } + } +} + +void dip_update(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_song); + #endif + layer_on(_ADJUST); + } else { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + #ifdef AUDIO_ENABLE + stop_all_notes(); + #endif + } + } +} + +void matrix_scan_user(void) { + #ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } + #endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/planck/keymaps/mgalisa/readme.md b/keyboards/planck/keymaps/mgalisa/readme.md new file mode 100644 index 000000000..9d5b59601 --- /dev/null +++ b/keyboards/planck/keymaps/mgalisa/readme.md @@ -0,0 +1,15 @@ +# @mgalisa's Planck keymap + +A minor (so far) update to the default keymap. Probably more to come. + +## Raise layer + +![Raise layer](https://i.imgur.com/n0f4275.png) + +* Moved F-keys and number keys into 4x3 and 3x3 grid patterns for pseudo-numpad like effect +* Added macros to the middle column that insert bracket/brace/paren pairs and moves the cursor inbetween +* Minor adjustments + +## Emoji layer + +Activate by holding the Esc key from QWERTY/Dvorak/Colemak. Holds macros primarily for annoying coworkers via Slack. diff --git a/keyboards/planck/keymaps/mgalisa/rules.mk b/keyboards/planck/keymaps/mgalisa/rules.mk new file mode 100644 index 000000000..2afe59043 --- /dev/null +++ b/keyboards/planck/keymaps/mgalisa/rules.mk @@ -0,0 +1,6 @@ +SRC += muse.c +EXTRAKEY_ENABLE = yes +# RGBLIGHT_ENABLE = yes +## I bought the WS2812s... +## just need the main branch to be updated. +# Uncomment to make build fail. From f4840139a2572a916e11805f1d0921e3b7d7658a Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 12 Jun 2019 09:53:15 -0700 Subject: [PATCH 218/341] [Keyboard] Planck: Layout Macro Refactor (#4402) * Planck: layout macro refactor Unified layout macro names across AVR and ARM boards. Currently certain layout macros are specific to either AVR or ARM when used in the QMK Configurator. If an AVR-specific macro is used for a Planck rev. 6, or an ARM-specific macro on a rev. 5 or earlier, the user receives a compile error. * Update keyboards/planck/planck.h per @drashna Changed KC_LAYOUT_ortho_4x12 alias to LAYOUT_kc_ortho_4x12. Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Add KC_KEYMAP alias for LAYOUT_kc macro per @drashna Update keyboards/planck/planck.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Fix LAYOUT_planck_1x2uC macro for Planck rev6 Thanks to drashna for testing. * Fix inline comment regarding revisions * Add specific info.json file for Planck rev6 --- keyboards/planck/planck.h | 235 +++++++++++++-------------- keyboards/planck/rev6/info.json | 270 ++++++++++++++++++++++++++++++++ 2 files changed, 388 insertions(+), 117 deletions(-) create mode 100644 keyboards/planck/rev6/info.json diff --git a/keyboards/planck/planck.h b/keyboards/planck/planck.h index 4bc5e9c3f..09ac0c607 100644 --- a/keyboards/planck/planck.h +++ b/keyboards/planck/planck.h @@ -9,128 +9,111 @@ #include "ez.h" #endif -#ifdef __AVR__ -#define LAYOUT_planck_mit( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ - { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3a, k3b } \ -} +#ifdef __AVR__ // Planck revs. 1-5 -#define LAYOUT_planck_grid( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ -} - -// Used to create a keymap using only KC_ prefixed keys -#define KC_KEYMAP( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ - ) \ - LAYOUT_planck_grid( \ - KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \ - KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \ - KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \ - KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \ - ) - -#define KEYMAP LAYOUT_planck_grid -#define LAYOUT_ortho_4x12 LAYOUT_planck_grid -#define KC_LAYOUT_ortho_4x12 KC_KEYMAP - -#elif KEYBOARD_planck_rev6 - - #define LAYOUT_planck_1x2uC( \ + #define LAYOUT_planck_1x2uC( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k39, k3a, k3b }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { k36, k37, k38, k33, k34, k35 } \ -} + ) \ + { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3a, k3b } \ + } -#define LAYOUT_planck_1x2uR( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k39, k3a, k3b }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { k36, k37, k38, k33, k34, k35 } \ -} - -#define LAYOUT_planck_1x2uL( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k39, k3a, k3b }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { k36, k37, k38, k33, k34, k35 } \ -} - -#define LAYOUT_planck_2x2u( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k36, k38, k39, k3a, k3b \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k39, k3a, k3b }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { k36, k37, k38, k33, k34, k35 } \ -} - -#define LAYOUT_planck_grid( \ + #define LAYOUT_ortho_4x12( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ -) \ -{ \ + ) \ + { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ + } + +#elif KEYBOARD_planck_rev6 + + #define LAYOUT_planck_1x2uC( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a, k3b \ + ) \ + { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k39, k3a, k3b }, \ + { k06, k07, k08, k09, k0a, k0b }, \ + { k16, k17, k18, k19, k1a, k1b }, \ + { k26, k27, k28, k29, k2a, k2b }, \ + { k36, k37, k38, k33, k34, KC_NO } \ + } + + #define LAYOUT_planck_1x2uR( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ + ) \ + { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k39, k3a, k3b }, \ + { k06, k07, k08, k09, k0a, k0b }, \ + { k16, k17, k18, k19, k1a, k1b }, \ + { k26, k27, k28, k29, k2a, k2b }, \ + { KC_NO, k37, k38, k33, k34, k35 } \ + } + + #define LAYOUT_planck_1x2uL( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k35, k36, k37, k38, k39, k3a, k3b \ + ) \ + { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k39, k3a, k3b }, \ + { k06, k07, k08, k09, k0a, k0b }, \ + { k16, k17, k18, k19, k1a, k1b }, \ + { k26, k27, k28, k29, k2a, k2b }, \ + { k36, k37, k38, k33, KC_NO, k35 } \ + } + + #define LAYOUT_planck_2x2u( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k35, k37, k38, k39, k3a, k3b \ + ) \ + { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k39, k3a, k3b }, \ + { k06, k07, k08, k09, k0a, k0b }, \ + { k16, k17, k18, k19, k1a, k1b }, \ + { k26, k27, k28, k29, k2a, k2b }, \ + { KC_NO, k37, k38, k33, KC_NO, k35 } \ + } + + #define LAYOUT_ortho_4x12( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ + ) \ + { \ { k00, k01, k02, k03, k04, k05 }, \ { k10, k11, k12, k13, k14, k15 }, \ { k20, k21, k22, k23, k24, k25 }, \ @@ -139,12 +122,30 @@ { k16, k17, k18, k19, k1a, k1b }, \ { k26, k27, k28, k29, k2a, k2b }, \ { k36, k37, k38, k33, k34, k35 } \ -} - -#define KEYMAP LAYOUT_planck_grid -#define LAYOUT_ortho_4x12 LAYOUT_planck_grid -#define KC_LAYOUT_ortho_4x12 KC_KEYMAP + } #endif +// all Planck keyboards + +// Used to create a keymap using only KC_ prefixed keys +#define LAYOUT_kc( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +LAYOUT_ortho_4x12( \ + KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \ + KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \ + KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \ + KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \ +) + +#define KEYMAP LAYOUT_ortho_4x12 +#define LAYOUT_planck_mit LAYOUT_planck_1x2uC +#define LAYOUT_planck_grid LAYOUT_ortho_4x12 +#define LAYOUT_kc_ortho_4x12 LAYOUT_kc +#define KC_KEYMAP LAYOUT_kc + #endif diff --git a/keyboards/planck/rev6/info.json b/keyboards/planck/rev6/info.json new file mode 100644 index 000000000..81eacabc3 --- /dev/null +++ b/keyboards/planck/rev6/info.json @@ -0,0 +1,270 @@ +{ + "keyboard_name": "Planck", + "keyboard_folder": "planck", + "url": "https://olkb.com/planck", + "maintainer": "jackhumbert", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x12": { + "key_count": 48, + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 3, "y": 1 }, + { "x": 4, "y": 1 }, + { "x": 5, "y": 1 }, + { "x": 6, "y": 1 }, + { "x": 7, "y": 1 }, + { "x": 8, "y": 1 }, + { "x": 9, "y": 1 }, + { "x": 10, "y": 1 }, + { "x": 11, "y": 1 }, + { "x": 0, "y": 2 }, + { "x": 1, "y": 2 }, + { "x": 2, "y": 2 }, + { "x": 3, "y": 2 }, + { "x": 4, "y": 2 }, + { "x": 5, "y": 2 }, + { "x": 6, "y": 2 }, + { "x": 7, "y": 2 }, + { "x": 8, "y": 2 }, + { "x": 9, "y": 2 }, + { "x": 10, "y": 2 }, + { "x": 11, "y": 2 }, + { "x": 0, "y": 3 }, + { "x": 1, "y": 3 }, + { "x": 2, "y": 3 }, + { "x": 3, "y": 3 }, + { "x": 4, "y": 3 }, + { "x": 5, "y": 3 }, + { "x": 6, "y": 3 }, + { "x": 7, "y": 3 }, + { "x": 8, "y": 3 }, + { "x": 9, "y": 3 }, + { "x": 10, "y": 3 }, + { "x": 11, "y": 3 } + ] + }, + "LAYOUT_planck_1x2uC": { + "key_count": 47, + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 3, "y": 1 }, + { "x": 4, "y": 1 }, + { "x": 5, "y": 1 }, + { "x": 6, "y": 1 }, + { "x": 7, "y": 1 }, + { "x": 8, "y": 1 }, + { "x": 9, "y": 1 }, + { "x": 10, "y": 1 }, + { "x": 11, "y": 1 }, + { "x": 0, "y": 2 }, + { "x": 1, "y": 2 }, + { "x": 2, "y": 2 }, + { "x": 3, "y": 2 }, + { "x": 4, "y": 2 }, + { "x": 5, "y": 2 }, + { "x": 6, "y": 2 }, + { "x": 7, "y": 2 }, + { "x": 8, "y": 2 }, + { "x": 9, "y": 2 }, + { "x": 10, "y": 2 }, + { "x": 11, "y": 2 }, + { "x": 0, "y": 3 }, + { "x": 1, "y": 3 }, + { "x": 2, "y": 3 }, + { "x": 3, "y": 3 }, + { "x": 4, "y": 3 }, + { "x": 5, "y": 3, "w": 2 }, + { "x": 7, "y": 3 }, + { "x": 8, "y": 3 }, + { "x": 9, "y": 3 }, + { "x": 10, "y": 3 }, + { "x": 11, "y": 3 } + ] + }, + "LAYOUT_planck_1x2uL": { + "key_count": 47, + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 3, "y": 1 }, + { "x": 4, "y": 1 }, + { "x": 5, "y": 1 }, + { "x": 6, "y": 1 }, + { "x": 7, "y": 1 }, + { "x": 8, "y": 1 }, + { "x": 9, "y": 1 }, + { "x": 10, "y": 1 }, + { "x": 11, "y": 1 }, + { "x": 0, "y": 2 }, + { "x": 1, "y": 2 }, + { "x": 2, "y": 2 }, + { "x": 3, "y": 2 }, + { "x": 4, "y": 2 }, + { "x": 5, "y": 2 }, + { "x": 6, "y": 2 }, + { "x": 7, "y": 2 }, + { "x": 8, "y": 2 }, + { "x": 9, "y": 2 }, + { "x": 10, "y": 2 }, + { "x": 11, "y": 2 }, + { "x": 0, "y": 3 }, + { "x": 1, "y": 3 }, + { "x": 2, "y": 3 }, + { "x": 3, "y": 3 }, + { "x": 4, "y": 3, "w": 2 }, + { "x": 6, "y": 3 }, + { "x": 7, "y": 3 }, + { "x": 8, "y": 3 }, + { "x": 9, "y": 3 }, + { "x": 10, "y": 3 }, + { "x": 11, "y": 3 } + ] + }, + "LAYOUT_planck_1x2uR": { + "key_count": 47, + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 3, "y": 1 }, + { "x": 4, "y": 1 }, + { "x": 5, "y": 1 }, + { "x": 6, "y": 1 }, + { "x": 7, "y": 1 }, + { "x": 8, "y": 1 }, + { "x": 9, "y": 1 }, + { "x": 10, "y": 1 }, + { "x": 11, "y": 1 }, + { "x": 0, "y": 2 }, + { "x": 1, "y": 2 }, + { "x": 2, "y": 2 }, + { "x": 3, "y": 2 }, + { "x": 4, "y": 2 }, + { "x": 5, "y": 2 }, + { "x": 6, "y": 2 }, + { "x": 7, "y": 2 }, + { "x": 8, "y": 2 }, + { "x": 9, "y": 2 }, + { "x": 10, "y": 2 }, + { "x": 11, "y": 2 }, + { "x": 0, "y": 3 }, + { "x": 1, "y": 3 }, + { "x": 2, "y": 3 }, + { "x": 3, "y": 3 }, + { "x": 4, "y": 3 }, + { "x": 5, "y": 3 }, + { "x": 6, "y": 3, "w": 2 }, + { "x": 8, "y": 3 }, + { "x": 9, "y": 3 }, + { "x": 10, "y": 3 }, + { "x": 11, "y": 3 } + ] + }, + "LAYOUT_planck_2x2u": { + "key_count": 46, + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 3, "y": 1 }, + { "x": 4, "y": 1 }, + { "x": 5, "y": 1 }, + { "x": 6, "y": 1 }, + { "x": 7, "y": 1 }, + { "x": 8, "y": 1 }, + { "x": 9, "y": 1 }, + { "x": 10, "y": 1 }, + { "x": 11, "y": 1 }, + { "x": 0, "y": 2 }, + { "x": 1, "y": 2 }, + { "x": 2, "y": 2 }, + { "x": 3, "y": 2 }, + { "x": 4, "y": 2 }, + { "x": 5, "y": 2 }, + { "x": 6, "y": 2 }, + { "x": 7, "y": 2 }, + { "x": 8, "y": 2 }, + { "x": 9, "y": 2 }, + { "x": 10, "y": 2 }, + { "x": 11, "y": 2 }, + { "x": 0, "y": 3 }, + { "x": 1, "y": 3 }, + { "x": 2, "y": 3 }, + { "x": 3, "y": 3 }, + { "x": 4, "y": 3, "w": 2 }, + { "x": 6, "y": 3, "w": 2 }, + { "x": 8, "y": 3 }, + { "x": 9, "y": 3 }, + { "x": 10, "y": 3 }, + { "x": 11, "y": 3 } + ] + } + } +} From 61b884d865092cf4e32e287e4b286db2b2176318 Mon Sep 17 00:00:00 2001 From: kakunpc <15257475+kakunpc@users.noreply.github.com> Date: Fri, 14 Jun 2019 03:44:44 +0900 Subject: [PATCH 219/341] [Keymap] add keymap hecomi alpha (#6115) * add keymap hecomi alpha * Update keyboards/hecomi/keymaps/kakunpc/keymap.c Co-Authored-By: Drashna Jaelre --- keyboards/hecomi/keymaps/kakunpc/config.h | 23 +++++ keyboards/hecomi/keymaps/kakunpc/keymap.c | 98 ++++++++++++++++++++++ keyboards/hecomi/keymaps/kakunpc/readme.md | 1 + 3 files changed, 122 insertions(+) create mode 100644 keyboards/hecomi/keymaps/kakunpc/config.h create mode 100644 keyboards/hecomi/keymaps/kakunpc/keymap.c create mode 100644 keyboards/hecomi/keymaps/kakunpc/readme.md diff --git a/keyboards/hecomi/keymaps/kakunpc/config.h b/keyboards/hecomi/keymaps/kakunpc/config.h new file mode 100644 index 000000000..faf175a8f --- /dev/null +++ b/keyboards/hecomi/keymaps/kakunpc/config.h @@ -0,0 +1,23 @@ +/* Copyright 2018 kakunpc + * + * 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 . + */ + +#pragma once + +// place overrides here +#define MASTER_RIGHT +#define RGBLIGHT_SLEEP +#define RGBLIGHT_SPLIT { 8, 8 } +#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/hecomi/keymaps/kakunpc/keymap.c b/keyboards/hecomi/keymaps/kakunpc/keymap.c new file mode 100644 index 000000000..d73bcd03f --- /dev/null +++ b/keyboards/hecomi/keymaps/kakunpc/keymap.c @@ -0,0 +1,98 @@ +/* Copyright 2018 takashiski + * Copyright 2019 kakunpc + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +//R1:7 + 8 = 15 +//R2:7 + 8 = 15 +//R3:6 + 7 = 13 +//R4:6 + 8 = 14 +//R5:6 + 6 = 12 +//total : 69 keys +// +enum layers{ + DF, + LW, + FN +}; + +#define KC_FN MO(FN) +#define KC_LW MO(LW) +#define KC_SFT(XXX) LSFT(XXX) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DF]=LAYOUT(\ + KC_ESC,KC_GRV,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_TAB ,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y, KC_Y,KC_U,KC_I,KC_O,KC_P,KC_LBRC,KC_RBRC,KC_BSLS, + KC_LCTRL ,KC_A,KC_S,KC_D,KC_F,KC_G, KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_QUOT,KC_ENT, + KC_LSFT ,KC_Z,KC_X,KC_C,KC_V,KC_B, KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_RSFT,KC_DEL, + KC_LGUI,KC_NO,KC_LALT,KC_LW,KC_FN,KC_SPC, KC_SPC,KC_FN,KC_LEFT,KC_UP,KC_DOWN,KC_RIGHT + ), + [LW]=LAYOUT(\ + KC_NO,KC_NO,RGB_VAD,RGB_VAI,RGB_HUI,RGB_HUD,KC_TRNS, RGB_MOD,RGB_RMOD,KC_TRNS,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, + KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, + KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, + KC_NO ,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, + KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO + ), + [FN]=LAYOUT(\ + KC_ESC,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_BSPC, + KC_TAB ,KC_NO,KC_UP,KC_NO,KC_NO,KC_NO,KC_NO, KC_7,KC_8,KC_0,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, + KC_LCTRL ,KC_LEFT,KC_DOWN,KC_RIGHT,KC_NO,KC_NO, KC_4,KC_5,KC_6,KC_NO,KC_NO,KC_NO,KC_NO, + KC_LSFT ,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_1,KC_2,KC_3,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, + KC_LGUI,KC_NO,KC_LALT,KC_MHEN,KC_NO,KC_SPC, KC_0,KC_NO,KC_HOME,KC_PGUP,KC_PGDOWN,KC_END + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void keyboard_post_init_user(void) { + rgblight_enable_noeeprom(); +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/hecomi/keymaps/kakunpc/readme.md b/keyboards/hecomi/keymaps/kakunpc/readme.md new file mode 100644 index 000000000..d5ccbbf82 --- /dev/null +++ b/keyboards/hecomi/keymaps/kakunpc/readme.md @@ -0,0 +1 @@ +# The kakunpc keymap for hecomi_alpha From 03ce37052f16bd5fca00e3196a8e22ae1acee9bd Mon Sep 17 00:00:00 2001 From: Nicholas Ryan <38951795+nickryan17@users.noreply.github.com> Date: Fri, 14 Jun 2019 04:45:48 +1000 Subject: [PATCH 220/341] [Keymap] add new planck keymap (#6122) * add new planck keymap * add newlines to end of files --- keyboards/planck/keymaps/nick/config.h | 4 + keyboards/planck/keymaps/nick/keymap.c | 122 ++++++++++++++++++++++++ keyboards/planck/keymaps/nick/readme.md | 6 ++ keyboards/planck/keymaps/nick/rules.mk | 1 + 4 files changed, 133 insertions(+) create mode 100644 keyboards/planck/keymaps/nick/config.h create mode 100644 keyboards/planck/keymaps/nick/keymap.c create mode 100644 keyboards/planck/keymaps/nick/readme.md create mode 100644 keyboards/planck/keymaps/nick/rules.mk diff --git a/keyboards/planck/keymaps/nick/config.h b/keyboards/planck/keymaps/nick/config.h new file mode 100644 index 000000000..3b8eff751 --- /dev/null +++ b/keyboards/planck/keymaps/nick/config.h @@ -0,0 +1,4 @@ +#pragma once + +#define TAP_CODE_DELAY 10 +#define ENCODER_RESOLUTION 2 diff --git a/keyboards/planck/keymaps/nick/keymap.c b/keyboards/planck/keymaps/nick/keymap.c new file mode 100644 index 000000000..f100594d6 --- /dev/null +++ b/keyboards/planck/keymaps/nick/keymap.c @@ -0,0 +1,122 @@ +/* Copyright 2015-2017 Jack Humbert + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl |Adjust| Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, 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_ENT , + KC_LCTL, ADJUST, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_planck_grid( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_planck_grid( + KC_MPLY, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +void encoder_update(bool clockwise) { + if (clockwise && !IS_LAYER_ON(_RAISE)) { + tap_code(KC_MS_WH_DOWN); + } else if (!clockwise && !IS_LAYER_ON(_RAISE)) { + tap_code(KC_MS_WH_UP); + } else if (clockwise && IS_LAYER_ON(_RAISE)) { + tap_code(KC_VOLU); + } else if (!clockwise && IS_LAYER_ON(_RAISE)) { + tap_code(KC_VOLD); + } +} diff --git a/keyboards/planck/keymaps/nick/readme.md b/keyboards/planck/keymaps/nick/readme.md new file mode 100644 index 000000000..da7d3861a --- /dev/null +++ b/keyboards/planck/keymaps/nick/readme.md @@ -0,0 +1,6 @@ +# Nick's Planck Layout + +Similar to default layout with some minor changes: +- scroll and volume control knob +- added rule to remove audio +- encoder resolution altered to suit [this model](https://au.element14.com/alps/ec11e15244g1/encoder-vertical-11mm-30det-15ppr/dp/2064986?ost=EC11E15244G1&ddkey=https%3Aen-AU%2FElement14_Australia%2Fsearch) diff --git a/keyboards/planck/keymaps/nick/rules.mk b/keyboards/planck/keymaps/nick/rules.mk new file mode 100644 index 000000000..3bf3f2731 --- /dev/null +++ b/keyboards/planck/keymaps/nick/rules.mk @@ -0,0 +1 @@ +AUDIO_ENABLE = no From 1cd26607bd4bd5bd718e5c1e2e3884fbcdf50f5d Mon Sep 17 00:00:00 2001 From: roggan87 Date: Thu, 13 Jun 2019 20:47:31 +0200 Subject: [PATCH 221/341] [Keyboard] Made it possible for real to choose register on io expander for cols and rows (#6124) * Replace deprecated EXPANDER_MASK with dynamic expander_pin_input_mask * Made it possible to switch rows and cols registers on expander --- keyboards/handwired/dactyl/config.h | 3 +- keyboards/handwired/dactyl/matrix.c | 44 +++++++++++++---------------- 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/keyboards/handwired/dactyl/config.h b/keyboards/handwired/dactyl/config.h index 8d42c0ae4..49524c209 100644 --- a/keyboards/handwired/dactyl/config.h +++ b/keyboards/handwired/dactyl/config.h @@ -36,7 +36,8 @@ along with this program. If not, see . #define COL_EXPANDED { true, true, true, true, true, true, false, false, false, false, false, false} #define MATRIX_ONBOARD_ROW_PINS { F0, F1, F4, F5, F6, F7 } #define MATRIX_ONBOARD_COL_PINS { 0, 0, 0, 0, 0, 0, B1, B2, B3, D2, D3, C6 } -#define EXPANDER_COL_REGISTER 0 +#define EXPANDER_COL_REGISTER GPIOA +#define EXPANDER_ROW_REGISTER GPIOB #define MATRIX_EXPANDER_COL_PINS {0, 1, 2, 3, 4, 5} #define MATRIX_EXPANDER_ROW_PINS {0, 1, 2, 3, 4, 5} diff --git a/keyboards/handwired/dactyl/matrix.c b/keyboards/handwired/dactyl/matrix.c index 73423bfbd..28cf37522 100644 --- a/keyboards/handwired/dactyl/matrix.c +++ b/keyboards/handwired/dactyl/matrix.c @@ -82,10 +82,6 @@ uint32_t matrix_scan_count; #endif #define ROW_SHIFTER ((matrix_row_t)1) -#if (DIODE_DIRECTION == COL2ROW) -// bitmask to ensure the row state from the expander only applies to its columns -#define EXPANDER_MASK ((matrix_row_t)0b00111111) -#endif __attribute__ ((weak)) void matrix_init_user(void) {} @@ -166,17 +162,17 @@ void init_expander(void) { /* Pin direction and pull-up depends on both the diode direction - and on whether the column register is 0 ("A") or 1 ("B"): + and on whether the column register is GPIOA or GPIOB +-------+---------------+---------------+ | | ROW2COL | COL2ROW | +-------+---------------+---------------+ - | Reg 0 | input, output | output, input | + | GPIOA | input, output | output, input | +-------+---------------+---------------+ - | Reg 1 | output, input | input, output | + | GPIOB | output, input | input, output | +-------+---------------+---------------+ */ -#if (EXPANDER_COLUMN_REGISTER == 0) +#if (EXPANDER_COL_REGISTER == GPIOA) # if (DIODE_DIRECTION == COL2ROW) expander_status = i2c_write(expander_input_pin_mask); if (expander_status) goto out; expander_status = i2c_write(0); if (expander_status) goto out; @@ -184,7 +180,7 @@ void init_expander(void) { expander_status = i2c_write(0); if (expander_status) goto out; expander_status = i2c_write(expander_input_pin_mask); if (expander_status) goto out; # endif -#elif (EXPANDER_COLUMN_REGISTER == 1) +#elif (EXPANDER_COL_REGISTER == GPIOB) # if (DIODE_DIRECTION == COL2ROW) expander_status = i2c_write(0); if (expander_status) goto out; expander_status = i2c_write(expander_input_pin_mask); if (expander_status) goto out; @@ -202,7 +198,7 @@ void init_expander(void) { // - driving : off : 0 expander_status = i2c_start(I2C_ADDR_WRITE); if (expander_status) goto out; expander_status = i2c_write(GPPUA); if (expander_status) goto out; -#if (EXPANDER_COLUMN_REGISTER == 0) +#if (EXPANDER_COL_REGISTER == GPIOA) # if (DIODE_DIRECTION == COL2ROW) expander_status = i2c_write(expander_input_pin_mask); if (expander_status) goto out; expander_status = i2c_write(0); if (expander_status) goto out; @@ -210,7 +206,7 @@ void init_expander(void) { expander_status = i2c_write(0); if (expander_status) goto out; expander_status = i2c_write(expander_input_pin_mask); if (expander_status) goto out; # endif -#elif (EXPANDER_COLUMN_REGISTER == 1) +#elif (EXPANDER_COL_REGISTER == GPIOB) # if (DIODE_DIRECTION == COL2ROW) expander_status = i2c_write(0); if (expander_status) goto out; expander_status = i2c_write(expander_input_pin_mask); if (expander_status) goto out; @@ -365,11 +361,11 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) // Read columns from expander, unless it's in an error state if (! expander_status) { - expander_status = i2c_start(I2C_ADDR_WRITE); if (expander_status) goto out; - expander_status = i2c_write(GPIOA); if (expander_status) goto out; - expander_status = i2c_start(I2C_ADDR_READ); if (expander_status) goto out; + expander_status = i2c_start(I2C_ADDR_WRITE); if (expander_status) goto out; + expander_status = i2c_write(EXPANDER_COL_REGISTER); if (expander_status) goto out; + expander_status = i2c_start(I2C_ADDR_READ); if (expander_status) goto out; - current_matrix[current_row] |= (~i2c_readNak()) & EXPANDER_MASK; + current_matrix[current_row] |= (~i2c_readNak()) & expander_input_pin_mask; out: i2c_stop(); @@ -394,9 +390,9 @@ static void select_row(uint8_t row) { if (! expander_status) { // set active row low : 0 // set other rows hi-Z : 1 - expander_status = i2c_start(I2C_ADDR_WRITE); if (expander_status) goto out; - expander_status = i2c_write(GPIOB); if (expander_status) goto out; - expander_status = i2c_write(0xFF & ~(1< Date: Fri, 14 Jun 2019 15:10:56 -0300 Subject: [PATCH 222/341] [Keymap] jotix ortho_4x12_layout rethink (#6126) * jotix ortho_4x12_layout rethink * refactor * readme update --- layouts/community/ortho_4x12/jotix/keymap.c | 100 ++++++++++++------- layouts/community/ortho_4x12/jotix/readme.md | 2 +- 2 files changed, 67 insertions(+), 35 deletions(-) diff --git a/layouts/community/ortho_4x12/jotix/keymap.c b/layouts/community/ortho_4x12/jotix/keymap.c index de3093d25..1eb82ff16 100644 --- a/layouts/community/ortho_4x12/jotix/keymap.c +++ b/layouts/community/ortho_4x12/jotix/keymap.c @@ -6,56 +6,74 @@ enum layers { _QWERTY, _LOWER, _RAISE, - _ADJUST, }; -#define LOWER TT(_LOWER) -#define RAISE TT(_RAISE) +#define LOWER TT(_LOWER) +#define RAISE TT(_RAISE) -#define FN_LAYER LAYOUT_ortho_4x12 (\ - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,\ - _______, KC_VOLD, KC_MUTE, KC_VOLU, KC_HOME, KC_PGUP, KC_LBRC, KC_RBRC, KC_BSLS, KC_QUOT, _______, _______,\ - _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_END, KC_PGDN, KC_MINS, KC_EQL, _______, _______, _______, _______,\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______\ -), +static bool is_ctl_pressed; +static bool is_esc_pressed; +static bool is_bspc_pressed; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* qwerty * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | gesc | Q | W | E | R | T | Y | U | I | O | P | bksp | + * | esc | Q | W | E | R | T | Y | U | I | O | P | bspc | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | tab | A | S | D | F | G | H | J | K | L | ; | enter | + * | tab | A | S | D | F | G | H | J | K | L | ; | ' | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | lshift | Z | X | C | V | B | N | M | , | . | up | / | + * | lshift | Z | X | C | V | B | N | M | , | . | / | enter | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | lctrl | lgui | lalt | ralt | lower | space | space | raise | del | right | down | right | + * | lctrl | lgui | lalt | ralt | lower | space | space | raise | right | down | up | right | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ */ [_QWERTY] = LAYOUT_ortho_4x12 ( - KC_GESC, 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_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_SLSH, - KC_LCTL, KC_LGUI, KC_LALT, KC_RALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT + 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_ENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_RALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), -[_LOWER] = FN_LAYER - -[_RAISE] = FN_LAYER - -/* - * Adjust +/* lower + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | vol- | mute | vol+ | caps | home | pgup | - | = | [ | ] | \ | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | prev | play | next | del | end | pgdn | ` | | | | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | | | | | | | | | | | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ */ -[_ADJUST] = LAYOUT_ortho_4x12 ( - _______, RESET, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, _______, _______, - _______, _______, _______, _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, _______, _______, - _______, _______, _______, KC_CAPS, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, +[_LOWER] = LAYOUT_ortho_4x12 ( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_VOLD, KC_MUTE, KC_VOLU, KC_CAPS, KC_HOME, KC_PGUP, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_DEL, KC_END, KC_PGDN, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), +), + +/* raise + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | F7 | F8 | F9 | F10 | F11 | F12 | ~ | | | | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | | | | | | | | | | | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + */ +[_RAISE] = LAYOUT_ortho_4x12 ( + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TILD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + }; uint32_t layer_state_set_user(uint32_t state) { - state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); #ifdef JOTANCK_LEDS switch (biton32(state)) { case _LOWER: @@ -66,10 +84,6 @@ uint32_t layer_state_set_user(uint32_t state) { writePinLow(JOTANCK_LED1); writePinHigh(JOTANCK_LED2); break; - case _ADJUST: - writePinHigh(JOTANCK_LED1); - writePinHigh(JOTANCK_LED2); - break; default: writePinLow(JOTANCK_LED1); writePinLow(JOTANCK_LED2); @@ -79,5 +93,23 @@ uint32_t layer_state_set_user(uint32_t state) { return state; } -void matrix_init_user(void) { +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_LCTL: + is_ctl_pressed = record->event.pressed; + break; + case KC_ESC: + is_esc_pressed = record->event.pressed; + break; + case KC_BSPC: + is_bspc_pressed = record->event.pressed; + break; + }; + return true; +} + +void matrix_scan_user(void) { + if (is_ctl_pressed && is_esc_pressed && is_bspc_pressed) { + reset_keyboard(); + } } diff --git a/layouts/community/ortho_4x12/jotix/readme.md b/layouts/community/ortho_4x12/jotix/readme.md index 3163029c9..ed4aa7414 100644 --- a/layouts/community/ortho_4x12/jotix/readme.md +++ b/layouts/community/ortho_4x12/jotix/readme.md @@ -1,6 +1,6 @@ # Jotix ortho 4x12 keymap -![keymap](https://i.imgur.com/6fW4Uf4.jpg) +![keymap](https://i.imgur.com/ocZCRkN.png) Tested on: From 5f69ca47ffa5cfe18d68196a2d689e3a5e8d2e04 Mon Sep 17 00:00:00 2001 From: Yusuke Nakamura Date: Sun, 16 Jun 2019 03:32:06 +0900 Subject: [PATCH 223/341] Install avrdude in Arch/Manjaro Linux (#6132) avrdude is require package but not installed by script when arch linux. --- util/linux_install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/util/linux_install.sh b/util/linux_install.sh index 3df7c0b2a..efb2ee774 100755 --- a/util/linux_install.sh +++ b/util/linux_install.sh @@ -61,6 +61,7 @@ elif grep ID /etc/os-release | grep -q 'arch\|manjaro'; then arm-none-eabi-binutils \ arm-none-eabi-gcc \ arm-none-eabi-newlib \ + avrdude \ avr-binutils \ avr-libc \ avr-gcc \ From fff526cb00c3e3a831dd3e085f1b0cfb6eba6ea9 Mon Sep 17 00:00:00 2001 From: Rob Hilgefort Date: Sun, 16 Jun 2019 01:34:10 -0600 Subject: [PATCH 224/341] [Keymap] Fix firmware errors when flashing Rev6 Planck (#6135) --- keyboards/planck/keymaps/rjhilgefort/config.h | 3 ++ keyboards/planck/keymaps/rjhilgefort/keymap.c | 43 ++++++++++--------- keyboards/planck/keymaps/rjhilgefort/rules.mk | 1 + 3 files changed, 26 insertions(+), 21 deletions(-) diff --git a/keyboards/planck/keymaps/rjhilgefort/config.h b/keyboards/planck/keymaps/rjhilgefort/config.h index 672c5d570..e8c13caac 100644 --- a/keyboards/planck/keymaps/rjhilgefort/config.h +++ b/keyboards/planck/keymaps/rjhilgefort/config.h @@ -33,3 +33,6 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 2 + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 diff --git a/keyboards/planck/keymaps/rjhilgefort/keymap.c b/keyboards/planck/keymaps/rjhilgefort/keymap.c index 455aa5a36..333191531 100644 --- a/keyboards/planck/keymaps/rjhilgefort/keymap.c +++ b/keyboards/planck/keymaps/rjhilgefort/keymap.c @@ -15,6 +15,7 @@ */ #include QMK_KEYBOARD_H +#include "muse.h" extern keymap_config_t keymap_config; @@ -26,7 +27,7 @@ enum planck_layers { }; enum planck_keycodes { - // QWERTY = SAFE_RANGE, + QWERTY = SAFE_RANGE, BACKLIT, EXT_PLV }; @@ -51,10 +52,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------------------------------------------------------------------------------------------------------' */ [_QWERTY] = LAYOUT_planck_grid( - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {CTRL_ESC, 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_ENT }, - {_______, KC_LCTL, RAISE, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, LOWER, HYPER, _______, _______, RAISE } + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + CTRL_ESC, 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_ENT, + _______, KC_LCTL, RAISE, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, LOWER, HYPER, _______, _______, RAISE ), /* Lower @@ -69,10 +70,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT_planck_grid( - {_______, KC_BSLS, KC_SLSH, KC_LBRC, KC_RBRC, KC_TILD, KC_PIPE, KC_EQL, KC_PLUS, KC_MINS, KC_UNDS, _______}, - {_______, KC_LCBR, KC_RCBR, KC_LPRN, KC_RPRN, KC_GRV, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_LALT, _______}, - {_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} + _______, KC_BSLS, KC_SLSH, KC_LBRC, KC_RBRC, KC_TILD, KC_PIPE, KC_EQL, KC_PLUS, KC_MINS, KC_UNDS, _______, + _______, KC_LCBR, KC_RCBR, KC_LPRN, KC_RPRN, KC_GRV, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_LALT, _______, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* Raise @@ -87,10 +88,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `----------------------------------------------------------------------------------------------------------' */ [_RAISE] = LAYOUT_planck_grid( - {_______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______}, - {_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, KC_4, KC_5, KC_6, _______, _______}, - {_______, KC_MRWD, KC_MFFD, KC_SLCK, KC_PAUS, _______, _______, KC_1, KC_2, KC_3, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, KC_0, KC_0, KC_DOT, _______, _______} + _______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, + _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, KC_4, KC_5, KC_6, _______, _______, + _______, KC_MRWD, KC_MFFD, KC_SLCK, KC_PAUS, _______, _______, KC_1, KC_2, KC_3, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_0, KC_0, KC_DOT, _______, _______ ), /* Adjust (Lower + Raise) @@ -105,10 +106,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `----------------------------------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_planck_grid( - {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, - {_______, _______, MU_MOD, AU_ON, AU_OFF, _______, _______, QWERTY, _______, _______, _______, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, _______, _______, QWERTY, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; @@ -145,9 +146,9 @@ bool music_mask_user(uint16_t keycode) { * `----------------------------------------------------------------------------------------------------------' * [_EXAMPLE] = LAYOUT_planck_grid( - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), */ diff --git a/keyboards/planck/keymaps/rjhilgefort/rules.mk b/keyboards/planck/keymaps/rjhilgefort/rules.mk index e69de29bb..dcf16bef3 100644 --- a/keyboards/planck/keymaps/rjhilgefort/rules.mk +++ b/keyboards/planck/keymaps/rjhilgefort/rules.mk @@ -0,0 +1 @@ +SRC += muse.c From 53a81fc2f681eda7267804eb990bc24c4ef58512 Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Sun, 16 Jun 2019 02:35:46 -0500 Subject: [PATCH 225/341] [Keymap] Minor userspace and Quefrency keymap fixes (#6134) * Fix typo for RGBLIGHT config values It doesn't make a difference right now since these are the defaults in rgblight.h (which I'm just setting explicitly since some of the keyboard configs change these defaults). However, I'd rather be explicit, so fixing my typo. :) * Remove mouse keys layer from Quefrency keymap It's a fun idea, but I never use it in practice. --- keyboards/keebio/quefrency/keymaps/bcat/keymap.c | 15 +-------------- keyboards/keebio/quefrency/keymaps/bcat/readme.md | 8 ++------ users/bcat/config.h | 6 +++--- 3 files changed, 6 insertions(+), 23 deletions(-) diff --git a/keyboards/keebio/quefrency/keymaps/bcat/keymap.c b/keyboards/keebio/quefrency/keymaps/bcat/keymap.c index fc66ff101..9dc98f5a1 100644 --- a/keyboards/keebio/quefrency/keymaps/bcat/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/bcat/keymap.c @@ -3,15 +3,11 @@ enum layer { LAYER_DEFAULT, LAYER_FUNCTION, - LAYER_MOUSE, }; /* Switch to function layer when held. */ #define LY_FUNC MO(LAYER_FUNCTION) -/* Switch to mouse layer when held; send menu key when tapped. */ -#define LY_MOUSE LT(LAYER_MOUSE, KC_APP) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Default layer: http://www.keyboard-layout-editor.com/#/gists/60a262432bb340b37d364a4424f3037b */ [LAYER_DEFAULT] = LAYOUT_65( @@ -19,7 +15,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_BSPC, KC_PGUP, 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, KC_PGDN, 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_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, LY_FUNC, KC_SPC, KC_SPC, XXXXXXX, KC_RALT, LY_FUNC, LY_MOUSE, KC_LEFT, KC_DOWN, KC_RGHT + KC_LCTL, KC_LGUI, KC_LALT, LY_FUNC, KC_SPC, KC_SPC, XXXXXXX, KC_RALT, LY_FUNC, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT ), /* Function layer: http://www.keyboard-layout-editor.com/#/gists/59636898946da51f91fb290f8e078b4d */ @@ -30,13 +26,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD ), - - /* Mouse layer: http://www.keyboard-layout-editor.com/#/gists/05b9fbe8a34f65ed85ded659b3941152 */ - [LAYER_MOUSE] = LAYOUT_65( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN3, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_U, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_D, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN3, KC_BTN1, KC_MS_U, KC_BTN2, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R - ), }; diff --git a/keyboards/keebio/quefrency/keymaps/bcat/readme.md b/keyboards/keebio/quefrency/keymaps/bcat/readme.md index 2e9e0f6d7..793e8833a 100644 --- a/keyboards/keebio/quefrency/keymaps/bcat/readme.md +++ b/keyboards/keebio/quefrency/keymaps/bcat/readme.md @@ -2,16 +2,12 @@ This is pretty much a stock 65% split keyboard layout, with an HHKB-style (split) backspace, media keys in the function layer centered around the WASD -cluster, and mouse keys on their own layer centered around the arrow cluster. +cluster, and RGB controls in the function layer on the arrow/nav keys. ## Default layer -![Default layer layout](https://i.imgur.com/3riRFev.png) +![Default layer layout](https://i.imgur.com/CU2fxDg.png) ## Function layer ![Function layer layout](https://i.imgur.com/4R1F72M.png) - -## Mouse layer - -![Mouse layer layout](https://i.imgur.com/LmGgJEG.png) diff --git a/users/bcat/config.h b/users/bcat/config.h index c5f731b73..7d4200895 100644 --- a/users/bcat/config.h +++ b/users/bcat/config.h @@ -13,9 +13,9 @@ #undef RGBLIGHT_VAL_STEP #define BACKLIGHT_LEVELS 7 -#define RGVLIGHT_HUE_STEP 8 -#define RGVLIGHT_SAT_STEP 17 -#define RGVLIGHT_VAL_STEP 17 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 /* Make mouse operation smoother. */ #undef MOUSEKEY_DELAY From e58b82e7cabfe7848fb210793dae111f640349ca Mon Sep 17 00:00:00 2001 From: Oliver Ladner Date: Sun, 16 Jun 2019 22:19:02 +0200 Subject: [PATCH 226/341] PoC weeheavy_2.25_lshift --- .../keymaps/weeheavy_2.25_lshift/README.md | 53 +++++++++++++++++++ .../keymaps/weeheavy_2.25_lshift/keymap.c | 30 +++++++++++ 2 files changed, 83 insertions(+) create mode 100644 keyboards/dz60/keymaps/weeheavy_2.25_lshift/README.md create mode 100644 keyboards/dz60/keymaps/weeheavy_2.25_lshift/keymap.c diff --git a/keyboards/dz60/keymaps/weeheavy_2.25_lshift/README.md b/keyboards/dz60/keymaps/weeheavy_2.25_lshift/README.md new file mode 100644 index 000000000..adb1175d8 --- /dev/null +++ b/keyboards/dz60/keymaps/weeheavy_2.25_lshift/README.md @@ -0,0 +1,53 @@ +![DZ60 ANSI with arrow cluster](https://i.imgur.com/014XWvY.png) + +# weeheavy's DZ60 layout + +* Default 2.25 left shift +* arrow cluster + +## Layouts + +The base layout is ANSI QWERTY. + +Key sizes (ASCII keyboards below match this scale): + + 1u = 4 chars = | | + 1.25u = 5 chars = | | + 1.5u = 6 chars = | | + 1.75u = 7 chars = | | + 2u = 8 chars = | | + 2.25u = 9 chars = | | + 2.75u = 11 chars = | | + 6.25u = 25 chars = | | + +### Layer 0: Base layout + +Specialities: + +* Arrow cluster +* FN: access to layer 1 + +``` +,----------------------------------------------------------. +|Es||1 ||2 ||3 ||4 ||5 ||6 ||7 ||8 ||9 ||0 ||- ||= || Bksp | +|----------------------------------------------------------+ +|Tab ||Q ||W ||E ||R ||T ||Y ||U ||I ||O ||P ||[ ||] || \ | +|----------------------------------------------------------+ +|Caps ||A ||S ||D ||F ||G ||H ||J ||K ||L ||; ||' || Enter | +|----------------------------------------------------------+ +| Shift ||Z ||X ||C ||V ||B ||N ||M ||, ||. ||/ || Shift | +|----------------------------------------------------------+ +|Ctl||Win||Alt|| Space |FN||← ||↑ ||↓ ||→ | +`----------------------------------------------------------' +``` + +### Layer 1: Utility + +Specialities: + +* F1-F12 keys when holding FN1 +* Movement cluster on the right hand side +* Multimedia cluster on the bottom right +* RGB config on the left hand side +* Reset key on ESC and backslash location +* Additional "B" key (a learning from my mistakes) diff --git a/keyboards/dz60/keymaps/weeheavy_2.25_lshift/keymap.c b/keyboards/dz60/keymaps/weeheavy_2.25_lshift/keymap.c new file mode 100644 index 000000000..9d70b6a01 --- /dev/null +++ b/keyboards/dz60/keymaps/weeheavy_2.25_lshift/keymap.c @@ -0,0 +1,30 @@ +#include QMK_KEYBOARD_H + +// Make special keycodes more visible +#define ____ KC_TRNS +#define XXXX KC_NO + +// Layer definition +#define L0 0 +#define L1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Base layer - ANSI QWERTY +[L0] = LAYOUT_all( + 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, XXXX, KC_BSPC, + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, XXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, MO(L1), KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT), + +// Utility layer - RGB and multimedia control, reset and additional "b" button +[L1] = LAYOUT_all( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ____, ____, + KB_B, RGB_TOG, RGB_MOD, RGB_M_K, RGB_M_R, ____, ____, KC_PSCR, ____, KC_PAUS, ____, ____, ____, RESET, + ____, RGB_HUI, RGB_HUD, ____, ____, ____, ____, KC_INS, KC_HOME, KC_PGUP, ____, ____, ____, + ____, ____, RGB_SAI, RGB_SAD, ____, ____, ____, ____, ____, KC_END, KC_PGDN, ____, KC_MPLY, KC_VOLU, KC_MUTE, + ____, RGB_VAI, RGB_VAD, ____, ____, ____, ____, ____, KC_MPRV, KC_VOLD, KC_MNXT), + +}; + From 9058c93bc1e4e673a586d2baa9819df52a73d273 Mon Sep 17 00:00:00 2001 From: Oliver Ladner Date: Sun, 16 Jun 2019 22:47:37 +0200 Subject: [PATCH 227/341] KB_B should read KC_B --- keyboards/dz60/keymaps/weeheavy_2.25_lshift/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/dz60/keymaps/weeheavy_2.25_lshift/keymap.c b/keyboards/dz60/keymaps/weeheavy_2.25_lshift/keymap.c index 9d70b6a01..2ca5bc538 100644 --- a/keyboards/dz60/keymaps/weeheavy_2.25_lshift/keymap.c +++ b/keyboards/dz60/keymaps/weeheavy_2.25_lshift/keymap.c @@ -21,7 +21,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Utility layer - RGB and multimedia control, reset and additional "b" button [L1] = LAYOUT_all( RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ____, ____, - KB_B, RGB_TOG, RGB_MOD, RGB_M_K, RGB_M_R, ____, ____, KC_PSCR, ____, KC_PAUS, ____, ____, ____, RESET, + KC_B, RGB_TOG, RGB_MOD, RGB_M_K, RGB_M_R, ____, ____, KC_PSCR, ____, KC_PAUS, ____, ____, ____, RESET, ____, RGB_HUI, RGB_HUD, ____, ____, ____, ____, KC_INS, KC_HOME, KC_PGUP, ____, ____, ____, ____, ____, RGB_SAI, RGB_SAD, ____, ____, ____, ____, ____, KC_END, KC_PGDN, ____, KC_MPLY, KC_VOLU, KC_MUTE, ____, RGB_VAI, RGB_VAD, ____, ____, ____, ____, ____, KC_MPRV, KC_VOLD, KC_MNXT), From 83754c114684109b3ac37683e208a5e6e627272b Mon Sep 17 00:00:00 2001 From: SpacebarRacecar <42380065+SpacebarRacecar@users.noreply.github.com> Date: Mon, 17 Jun 2019 02:35:20 +0200 Subject: [PATCH 228/341] [Keymap] Update to personal keymaps (#6136) * changes to keymaps * changes to userspace * changes to userspace * removed reference to fc660c keymap which no longer exists from userspace readme * removed preonic keymap --- .../v2/keymaps/spacebarracecar/keymap.c | 4 +- .../planck/keymaps/spacebarracecar/keymap.c | 4 +- .../preonic/keymaps/spacebarracecar/config.h | 5 - .../preonic/keymaps/spacebarracecar/keymap.c | 176 ------------------ .../preonic/keymaps/spacebarracecar/readme.md | 5 - .../preonic/keymaps/spacebarracecar/rules.mk | 22 --- .../prime_o/keymaps/spacebarracecar/keymap.c | 12 +- users/spacebarracecar/readme.md | 2 +- users/spacebarracecar/spacebarracecar.c | 10 + users/spacebarracecar/spacebarracecar.h | 2 + 10 files changed, 23 insertions(+), 219 deletions(-) delete mode 100644 keyboards/preonic/keymaps/spacebarracecar/config.h delete mode 100644 keyboards/preonic/keymaps/spacebarracecar/keymap.c delete mode 100644 keyboards/preonic/keymaps/spacebarracecar/readme.md delete mode 100644 keyboards/preonic/keymaps/spacebarracecar/rules.mk diff --git a/keyboards/mechmini/v2/keymaps/spacebarracecar/keymap.c b/keyboards/mechmini/v2/keymaps/spacebarracecar/keymap.c index d4e9de036..a7e06c604 100644 --- a/keyboards/mechmini/v2/keymaps/spacebarracecar/keymap.c +++ b/keyboards/mechmini/v2/keymaps/spacebarracecar/keymap.c @@ -101,10 +101,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_NAV] = LAYOUT_ortho( - ALTF4, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL, + _______, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, GUIL, GUID, GUIR, EMOJI, KC_ENT, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, RGB_TOG, RGB_MOD, RGB_HUI, CU_RGBV, _______, - RESET, CU_ESCT, _______, _______, _______, KC_SPC, CTLENT, RGB_M_P, _______, _______, _______, CU_GAME + RESET, CU_ESCT, ALTF4, _______, _______, KC_SPC, CTLENT, RGB_M_P, _______, _______, _______, CU_GAME ) }; diff --git a/keyboards/planck/keymaps/spacebarracecar/keymap.c b/keyboards/planck/keymaps/spacebarracecar/keymap.c index 7ace78903..71f44c996 100644 --- a/keyboards/planck/keymaps/spacebarracecar/keymap.c +++ b/keyboards/planck/keymaps/spacebarracecar/keymap.c @@ -108,10 +108,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_NAV] = LAYOUT_ortho_4x12( - ALTF4, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL, + _______, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, GUIL, GUID, GUIR, EMOJI, KC_ENT, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, MU_ON, XXXXXXX, XXXXXXX, XXXXXXX, _______, - RESET, CU_ESCT, _______, _______, _______, KC_SPC, CTLENT, _______, _______, _______, _______, CU_GAME + RESET, CU_ESCT, ALTF4, _______, _______, KC_SPC, CTLENT, _______, _______, _______, _______, CU_GAME ) }; diff --git a/keyboards/preonic/keymaps/spacebarracecar/config.h b/keyboards/preonic/keymaps/spacebarracecar/config.h deleted file mode 100644 index 4f48857fe..000000000 --- a/keyboards/preonic/keymaps/spacebarracecar/config.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#ifdef AUDIO_ENABLE - #define STARTUP_SONG SONG(NO_SOUND) -#endif diff --git a/keyboards/preonic/keymaps/spacebarracecar/keymap.c b/keyboards/preonic/keymaps/spacebarracecar/keymap.c deleted file mode 100644 index 041fa9fed..000000000 --- a/keyboards/preonic/keymaps/spacebarracecar/keymap.c +++ /dev/null @@ -1,176 +0,0 @@ -#include QMK_KEYBOARD_H -#include "spacebarracecar.h" - -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) - -enum layers { - _BASE, - _RAISE, - _LOWER, - _MUSICMODE -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Base -,-----------------------------------------------------------------------------------------------------------------------. -|` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |\ | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|Tab |Q |W |E |R |T |Z |U |I |O |P |Backspace| -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|Esc/Nav |A |S |D |F |G |H |J |K |L |; |' | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|Shift |Y |X |C |V |B |N |M |, |. |/ |Shift | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|LCtrl | |Win |Alt |Lower |Space |Enter |Raise |AltGr |Win |Menu |RCtrl | -`-----------------------------------------------------------------------------------------------------------------------' -*/ - -[_BASE] = LAYOUT_preonic_grid( - CU_GRV, DE_1, DE_2, CU_3, DE_4, DE_5, CU_6, CU_7, CU_8, CU_9, CU_0, CU_BSLS, - KC_TAB, DE_Q, DE_W, DE_E, DE_R, DE_T, CU_Z, DE_U, DE_I, DE_O, DE_P, KC_BSPC, - CU_NAV, DE_A, DE_S, DE_D, DE_F, DE_G, DE_H, DE_J, DE_K, DE_L, CU_SCLN, CU_QUOT, - CU_LSFT, CU_Y, DE_X, DE_C, DE_V, DE_B, DE_N, DE_M, CU_COMM, CU_DOT, CU_SLSH, CU_RSFT, - KC_LCTL, XXXXXXX, KC_LGUI, KC_LALT, LOWER, KC_SPC, CTLENT, RAISE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL -), - -/* Lower -,-----------------------------------------------------------------------------------------------------------------------. -|` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |\ | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|~ |! |" |# |$ |% |^ |& |* |( |) | | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| |@ |Strg+X |Strg+C |Strg+V | | |_ |+ |{ |} || | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| |? | | | | | | | | | | | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| | | | | | | | | | | | | -`-----------------------------------------------------------------------------------------------------------------------' -*/ -[_LOWER] = LAYOUT_preonic_grid( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - DE_TILD, DE_EXLM, DE_DQOT, DE_HASH, DE_DLR, DE_PERC, CU_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, _______, - _______, DE_AT, CTRLX, CTRLC, CTRLV, XXXXXXX, XXXXXXX, DE_UNDS, DE_PLUS, DE_LCBR, DE_RCBR, DE_PIPE, - _______, DE_EURO, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DE_MINS, CU_EQL, CU_LBRC, CU_RBRC, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), - -/* Raise -,-----------------------------------------------------------------------------------------------------------------------. -|` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |\ | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 | | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| |F1 |F2 |F3 |F4 |F5 |F6 |- |= |[ |] |\ | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| |F7 |F8 |F9 |F10 |F11 |F12 | | | | | | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| | | | | | | | | | | | | -`-----------------------------------------------------------------------------------------------------------------------' -*/ - -[_RAISE] = LAYOUT_preonic_grid( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - CU_GRV, DE_1, DE_2, CU_3, DE_4, DE_5, CU_6, CU_7, CU_8, CU_9, CU_0, _______, - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DE_MINS, CU_EQL, CU_LBRC, CU_RBRC, CU_BSLS, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), - -[_MUSICMODE] = LAYOUT_preonic_grid( - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - KC_LCTL, KC_LALT, KC_LGUI, KC_DOWN, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_MOD, MU_OFF -), - -/* Deadkey -,-----------------------------------------------------------------------------------------------------------------------. -| | | | | | | | | | | | | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| | | | | | | |Ü | |Ö | | | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| |Ä |ß | | | | | | | | | | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| | | | | | | | | | | | | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| | | | | |" |" | | | | | | -`-----------------------------------------------------------------------------------------------------------------------' -*/ - -[_DEADKEY] = LAYOUT_preonic_grid( - CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, - KC_TAB, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_UE, CU_ED, CU_OE, CU_ED, KC_BSPC, - CU_NAV, CU_AE, CU_SS, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_DDQ, - CU_LSFT, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_RSFT, - KC_LCTL, XXXXXXX, KC_LGUI, KC_LALT, LOWER, CU_DDQ, CU_DDQ, RAISE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL -), - -/* Navigation -,-----------------------------------------------------------------------------------------------------------------------. -|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10 |F11 |F12 | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|ALT F4 |PageDown |Up |PageUp |Home | | | |Win+Up | | |Del | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| |Left |Down |Right |End | | |Win+Left |Win+Down |Win+Right| |Enter | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| |Prev |Pause |Next |LowerVol |RaiseVol |Mute | | | | | | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|RESET |ESCT | | | | | | | | | |Game | -`-----------------------------------------------------------------------------------------------------------------------' -*/ - -[_NAV] = LAYOUT_preonic_grid( - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - ALTF4, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL, - _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, GUIL, GUID, GUIR, EMOJI, KC_ENT, - _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, MU_ON, XXXXXXX, XXXXXXX, XXXXXXX, _______, - RESET, CU_ESCT, _______, _______, _______, KC_SPC, CTLENT, _______, _______, _______, _______, CU_GAME -) - -}; - -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { -switch (keycode) { - case MO(_LOWER): - if (game){ - if(record->event.pressed) { - register_code(KC_SPC); - } else { - unregister_code(KC_SPC); - } - return false; - } else { - return true; - } - case KC_LALT: - if (game) { - if (record->event.pressed){ - layer_on(_RAISE); - } else { - layer_off(_RAISE); - } - return false; - } else { - return true; - } - case MU_ON: - if(record->event.pressed) { - layer_off(_LOWER); - layer_off(_RAISE); - layer_off(_NAV); - layer_off(_DEADKEY); - layer_on(_MUSICMODE); - } - return true; - case MU_OFF: - if(record->event.pressed) { - layer_off(_MUSICMODE); - } - return true; - default: - return true; - } -} diff --git a/keyboards/preonic/keymaps/spacebarracecar/readme.md b/keyboards/preonic/keymaps/spacebarracecar/readme.md deleted file mode 100644 index b99bb956f..000000000 --- a/keyboards/preonic/keymaps/spacebarracecar/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -# SpacebarRacecar US-International Preonic Keymap for German PCs - -This keymap emulates most keys of the US-International layout on PCs that have German set as input language. -This allows the use of the keyboard on any PC in Germany without the need to change any settings. -The keymap is mostly based on the Preonic default layout but adds essential features for german input, like access to Ä, Ö, Ü, ß. diff --git a/keyboards/preonic/keymaps/spacebarracecar/rules.mk b/keyboards/preonic/keymaps/spacebarracecar/rules.mk deleted file mode 100644 index bc817a140..000000000 --- a/keyboards/preonic/keymaps/spacebarracecar/rules.mk +++ /dev/null @@ -1,22 +0,0 @@ -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -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 = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# Userspace defines -GERMAN_ENABLE = yes # Enable Custom US Ansi Keycodes for PC with German set as input language diff --git a/keyboards/primekb/prime_o/keymaps/spacebarracecar/keymap.c b/keyboards/primekb/prime_o/keymaps/spacebarracecar/keymap.c index 407118309..244b165f1 100644 --- a/keyboards/primekb/prime_o/keymaps/spacebarracecar/keymap.c +++ b/keyboards/primekb/prime_o/keymaps/spacebarracecar/keymap.c @@ -121,10 +121,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NAV] = LAYOUT( _______, _______, _______, _______, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - _______, _______, _______, _______, ALTF4, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL, + _______, _______, _______, _______, _______, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, GUIL, GUID, GUIR, EMOJI, KC_ENT, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, - _______, _______, _______, _______, RESET, CU_ESCT, _______, _______, _______, KC_SPC, CTLENT, _______, _______, _______, _______, CU_GAME + _______, _______, _______, _______, RESET, ALTF4, _______, _______, _______, KC_SPC, CTLENT, _______, _______, _______, _______, CU_GAME ), // Can be used to place macros on the numpad @@ -242,10 +242,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NAV] = LAYOUT( KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - ALTF4, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, _______, _______, _______, _______, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL, + _______, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, _______, _______, _______, _______, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, _______, _______, _______, _______, XXXXXXX, GUIL, GUID, GUIR, EMOJI, KC_ENT, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, _______, _______, _______, _______, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, - RESET, CU_ESCT, _______, _______, _______, KC_SPC, _______, _______, _______, _______, CTLENT, _______, _______, _______, _______, CU_GAME + RESET, CU_ESCT, ALTF4, _______, _______, KC_SPC, _______, _______, _______, _______, CTLENT, _______, _______, _______, _______, CU_GAME ), // Can be used to place macros on the numpad @@ -363,10 +363,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NAV] = LAYOUT( KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, - ALTF4, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL, _______, _______, _______, _______, + _______, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, GUIL, GUID, GUIR, EMOJI, KC_ENT, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, - RESET, CU_ESCT, _______, _______, _______, KC_SPC, CTLENT, _______, _______, _______, _______, CU_GAME, _______, _______, _______, _______ + RESET, CU_ESCT, ALTF4, _______, _______, KC_SPC, CTLENT, _______, _______, _______, _______, CU_GAME, _______, _______, _______, _______ ), // Can be used to place macros on the numpad diff --git a/users/spacebarracecar/readme.md b/users/spacebarracecar/readme.md index 172764c07..3d9ceb80c 100644 --- a/users/spacebarracecar/readme.md +++ b/users/spacebarracecar/readme.md @@ -14,7 +14,7 @@ I'm using the US Ansi layout however I'm living in Germany which means that ever - The keycodes are handled by the `process_record_user` function which is now located in [spacebarracecar.c](spacebarracecar.c). To change keyboard specific configuration `process_record_keymap` is used (see [drashna userspace readme](../drashna/readme.md) for better explanation). - There is a predefined `_DEADKEY` layer in [spacebarracecar.h](spacebarracecar.h) under `enum userspace_layers`. Shifted CU_QUOT enables the dead key layer, just like KC_QUOT would when using the US International layout. (See `enum userspace_custom_keycodes` for more explanation). - On Windows grave and circonflexe are defined as dead keys when using the standard german layout. Those are automatically escaped when using the custom keycodes. `CU_ESCT` can be used to enable/disable this behavior. -- For a complete example see my [fc660c](../../keyboards/fc660c/keymaps/spacebarracecar/keymap.c) or [planck](../../keyboards/planck/keymaps/spacebarracecar/keymap.c) keymaps. +- For a complete example see my [planck](../../keyboards/planck/keymaps/spacebarracecar/keymap.c) keymap. ### How it works diff --git a/users/spacebarracecar/spacebarracecar.c b/users/spacebarracecar/spacebarracecar.c index 2ab10d945..bbd864aa9 100644 --- a/users/spacebarracecar/spacebarracecar.c +++ b/users/spacebarracecar/spacebarracecar.c @@ -71,6 +71,11 @@ void timer_timeout(void){ rshiftp = false; #endif navesc = false; + timer_timeout_keymap(); +} + +__attribute__((weak)) +void timer_timeout_keymap(void){ } bool process_record_user(uint16_t keycode, keyrecord_t *record) { @@ -340,3 +345,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return process_record_keymap(keycode, record); } } + +__attribute__((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/users/spacebarracecar/spacebarracecar.h b/users/spacebarracecar/spacebarracecar.h index 690971c39..43bfc5e65 100644 --- a/users/spacebarracecar/spacebarracecar.h +++ b/users/spacebarracecar/spacebarracecar.h @@ -75,6 +75,8 @@ extern bool game; void timer_timeout(void); +void timer_timeout_keymap(void); + bool process_record_keymap(uint16_t keycode, keyrecord_t *record); #define CTRLX LCTL(KC_X) From c6850bad74ccec3cec0af1c74eb20b139d0ca481 Mon Sep 17 00:00:00 2001 From: Sid Carter Date: Sun, 16 Jun 2019 20:44:14 -0400 Subject: [PATCH 229/341] [Keymap] Layout for FC660C with additions for mouse keys and few other changes (#6139) * new keymap for the hasu with media keys and mac layout * switch escape and grave * switch to the usual default * with play and stop * add reset on fn layer * add mouse buttons, move reset, update copyright --- keyboards/fc660c/keymaps/siroleo/README.md | 8 +++ keyboards/fc660c/keymaps/siroleo/config.h | 19 +++++++ keyboards/fc660c/keymaps/siroleo/keymap.c | 60 ++++++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 keyboards/fc660c/keymaps/siroleo/README.md create mode 100644 keyboards/fc660c/keymaps/siroleo/config.h create mode 100644 keyboards/fc660c/keymaps/siroleo/keymap.c diff --git a/keyboards/fc660c/keymaps/siroleo/README.md b/keyboards/fc660c/keymaps/siroleo/README.md new file mode 100644 index 000000000..91dd9ed3b --- /dev/null +++ b/keyboards/fc660c/keymaps/siroleo/README.md @@ -0,0 +1,8 @@ +# Sid's mods for the fc660c + +Emulates original keymap with modifications for: + +- Media keys +- Grave key(s) +- Reset on the function layer +- Mouse keys ala Tada68 diff --git a/keyboards/fc660c/keymaps/siroleo/config.h b/keyboards/fc660c/keymaps/siroleo/config.h new file mode 100644 index 000000000..8262805a0 --- /dev/null +++ b/keyboards/fc660c/keymaps/siroleo/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Khader Syed + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/fc660c/keymaps/siroleo/keymap.c b/keyboards/fc660c/keymaps/siroleo/keymap.c new file mode 100644 index 000000000..a2d859f15 --- /dev/null +++ b/keyboards/fc660c/keymaps/siroleo/keymap.c @@ -0,0 +1,60 @@ +/* +Copyright 2019 Khader Syed + +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 . +*/ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* BASE layer: Default Layer + * ,--------------------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | | ` | + * |-----------------------------------------------------------------------------------------+ +-----+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | | Del | + * |-----------------------------------------------------------------------------------------+ +-----+ + * | ` | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |--------------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Up | + * +--------------------------------------------------------------------------------------------+-----+ + * | Ctrl | Alt | Gui | Space | Fn | Ctrl | Alt | Left| Down|Right| + * `--------------------------------------------------------------------------------------------------´ + */ + [0] = LAYOUT( + KC_ESC, 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_GRV, + 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_DEL, + KC_GRV ,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, + 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_UP, + KC_LCTL,KC_LALT,KC_LGUI, KC_SPC, MO(1),KC_RCTL,KC_RALT, KC_LEFT,KC_DOWN,KC_RGHT + ), + /* FN layer + * ,--------------------------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Mute| | Vol-| + * |-----------------------------------------------------------------------------------------+ +-----+ + * | | | | | | | | |PrtSc| Slck| Paus| | | | | Vol+| + * |-----------------------------------------------------------------------------------------+ +-----+ + * | | | | | | | | | Home| PgUp| | | | + * |--------------------------------------------------------------------------------------------+ + * | | | | | | | | | End | PgDn| | Mouse Btn 1 | MsU | + * +--------------------------------------------------------------------------------------------+-----+ + * | | Reset | | | | | | MsL | MsD | MsR | + * `--------------------------------------------------------------------------------------------------´ + */ + [1] = LAYOUT( + 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_MUTE, KC_VOLU, + _______,_______,_______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK,KC_PAUS,_______,_______,_______, KC_VOLD, + _______,_______,_______,_______,_______,_______,_______,_______,KC_HOME,KC_PGUP,_______,_______, _______, + _______,_______,_______,_______,_______,_______,_______,_______,KC_END, KC_PGDN,_______,KC_BTN1, KC_MS_U, + _______, RESET,_______, _______, MO(1), _______,_______, KC_MS_L,KC_MS_D,KC_MS_R + ) +}; From 6bdcbfb25ae068d9f5351af0f7c6a03385020661 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 18 Jun 2019 12:37:17 +1000 Subject: [PATCH 230/341] Fix backlight breathing on C6 (#6102) * Fix backlight breathing on C6 * Account for ATmega32A's single TIMSK register (MT40) * Document hardware PWM on D4 for ATmega32A * Add C6 and D4 to BACKLIGHT_PIN description --- docs/config_options.md | 2 +- docs/feature_backlight.md | 15 ++++++------ quantum/quantum.c | 48 +++++++++++++++++++++++---------------- 3 files changed, 38 insertions(+), 27 deletions(-) diff --git a/docs/config_options.md b/docs/config_options.md index f4035809a..55d25d4c8 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -76,7 +76,7 @@ This is a C header file that is one of the first things included, and will persi * `#define B7_AUDIO` * enables audio on pin B7 (duophony is enables if one of B[5-7]\_AUDIO is enabled along with one of C[4-6]\_AUDIO) * `#define BACKLIGHT_PIN B7` - * pin of the backlight - B5, B6, B7 use PWM, others use softPWM + * pin of the backlight - `B5`, `B6`, `B7` and `C6` (and `D4` on ATmega32A) use hardware PWM, others use software implementation * `#define BACKLIGHT_LEVELS 3` * number of levels your backlight will have (maximum 15 excluding off) * `#define BACKLIGHT_BREATHING` diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md index 048d75390..5a21a6790 100644 --- a/docs/feature_backlight.md +++ b/docs/feature_backlight.md @@ -34,13 +34,14 @@ Hardware PWM is only supported on certain pins of the MCU, so if the backlightin Hardware PWM is supported according to the following table: -| Backlight Pin | Hardware timer | -|---------------|----------------| -|`B5` | Timer 1 | -|`B6` | Timer 1 | -|`B7` | Timer 1 | -|`C6` | Timer 3 | -| other | Software PWM | +| Backlight Pin | Hardware timer | +|---------------|-------------------------| +|`B5` | Timer 1 | +|`B6` | Timer 1 | +|`B7` | Timer 1 | +|`C6` | Timer 3 | +|`D4` | Timer 1 (ATmega32A only)| +| other | Software PWM | The [audio feature](feature_audio.md) also uses hardware timers. Please refer to the following table to know what hardware timer the software PWM will use depending on the audio configuration: diff --git a/quantum/quantum.c b/quantum/quantum.c index 23263b700..36b7942d5 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -1027,35 +1027,49 @@ void matrix_scan_quantum() { # define TCCRxB TCCR1B # define COMxx1 COM1C1 # define OCRxx OCR1C +# define TIMERx_OVF_vect TIMER1_OVF_vect +# define TOIEx TOIE1 # define ICRx ICR1 +# define TIMSKx TIMSK1 #elif BACKLIGHT_PIN == B6 # define HARDWARE_PWM # define TCCRxA TCCR1A # define TCCRxB TCCR1B # define COMxx1 COM1B1 # define OCRxx OCR1B +# define TIMERx_OVF_vect TIMER1_OVF_vect +# define TOIEx TOIE1 # define ICRx ICR1 +# define TIMSKx TIMSK1 #elif BACKLIGHT_PIN == B5 # define HARDWARE_PWM # define TCCRxA TCCR1A # define TCCRxB TCCR1B # define COMxx1 COM1A1 # define OCRxx OCR1A +# define TIMERx_OVF_vect TIMER1_OVF_vect +# define TOIEx TOIE1 # define ICRx ICR1 +# define TIMSKx TIMSK1 #elif BACKLIGHT_PIN == C6 # define HARDWARE_PWM # define TCCRxA TCCR3A # define TCCRxB TCCR3B -# define COMxx1 COM1A1 +# define COMxx1 COM3A1 # define OCRxx OCR3A +# define TIMERx_OVF_vect TIMER3_OVF_vect +# define TOIEx TOIE3 # define ICRx ICR3 +# define TIMSKx TIMSK3 #elif defined(__AVR_ATmega32A__) && BACKLIGHT_PIN == D4 # define TCCRxA TCCR1A # define TCCRxB TCCR1B # define COMxx1 COM1B1 # define OCRxx OCR1B +# define TIMERx_OVF_vect TIMER1_OVF_vect +# define TOIEx TOIE1 # define ICRx ICR1 -# define TIMSK1 TIMSK +# define TIMSKx TIMSK1 #else # if !defined(BACKLIGHT_CUSTOM_DRIVER) # if !defined(B5_AUDIO) && !defined(B6_AUDIO) && !defined(B7_AUDIO) @@ -1066,15 +1080,15 @@ void matrix_scan_quantum() { # define TCCRxA TCCR1A # define TCCRxB TCCR1B # define OCRxx OCR1A -# define OCRxAH OCR1AH -# define OCRxAL OCR1AL # define TIMERx_COMPA_vect TIMER1_COMPA_vect # define TIMERx_OVF_vect TIMER1_OVF_vect # define OCIExA OCIE1A # define TOIEx TOIE1 # define ICRx ICR1 -# ifndef TIMSK -# define TIMSK TIMSK1 +# if defined(__AVR_ATmega32A__) // This MCU has only one TIMSK register +# define TIMSKx TIMSK +# else +# define TIMSKx TIMSK1 # endif # elif !defined(C6_AUDIO) && !defined(C5_AUDIO) && !defined(C4_AUDIO) #pragma message "Using hardware timer 3 with software PWM" @@ -1084,16 +1098,12 @@ void matrix_scan_quantum() { # define TCCRxA TCCR3A # define TCCRxB TCCR3B # define OCRxx OCR3A -# define OCRxAH OCR3AH -# define OCRxAL OCR3AL # define TIMERx_COMPA_vect TIMER3_COMPA_vect # define TIMERx_OVF_vect TIMER3_OVF_vect # define OCIExA OCIE3A # define TOIEx TOIE3 # define ICRx ICR1 -# ifndef TIMSK -# define TIMSK TIMSK3 -# endif +# define TIMSKx TIMSK3 # else #pragma message "Audio in use - using pure software PWM" #define NO_HARDWARE_PWM @@ -1274,8 +1284,8 @@ void backlight_set(uint8_t level) { if (level == 0) { #ifdef BACKLIGHT_PWM_TIMER if (OCRxx) { - TIMSK &= ~(_BV(OCIExA)); - TIMSK &= ~(_BV(TOIEx)); + TIMSKx &= ~(_BV(OCIExA)); + TIMSKx &= ~(_BV(TOIEx)); FOR_EACH_LED( backlight_off(backlight_pin); ) @@ -1287,8 +1297,8 @@ void backlight_set(uint8_t level) { } else { #ifdef BACKLIGHT_PWM_TIMER if (!OCRxx) { - TIMSK |= _BV(OCIExA); - TIMSK |= _BV(TOIEx); + TIMSKx |= _BV(OCIExA); + TIMSKx |= _BV(TOIEx); } #else // Turn on PWM control of backlight pin @@ -1325,11 +1335,11 @@ bool is_breathing(void) { #else bool is_breathing(void) { - return !!(TIMSK1 & _BV(TOIE1)); + return !!(TIMSKx & _BV(TOIEx)); } -#define breathing_interrupt_enable() do {TIMSK1 |= _BV(TOIE1);} while (0) -#define breathing_interrupt_disable() do {TIMSK1 &= ~_BV(TOIE1);} while (0) +#define breathing_interrupt_enable() do {TIMSKx |= _BV(TOIEx);} while (0) +#define breathing_interrupt_disable() do {TIMSKx &= ~_BV(TOIEx);} while (0) #endif #define breathing_min() do {breathing_counter = 0;} while (0) @@ -1411,7 +1421,7 @@ void breathing_task(void) /* Assuming a 16MHz CPU clock and a timer that resets at 64k (ICR1), the following interrupt handler will run * about 244 times per second. */ -ISR(TIMER1_OVF_vect) +ISR(TIMERx_OVF_vect) #endif { uint16_t interval = (uint16_t) breathing_period * 244 / BREATHING_STEPS; From 7f65844f75c30f17804d57d34c0f0ce971226b59 Mon Sep 17 00:00:00 2001 From: Scott Sheffield Date: Mon, 17 Jun 2019 22:40:38 -0400 Subject: [PATCH 231/341] [Keymap] 40percent/gherkin Midi Layout (#6130) * Add midi layout for 40percent/gherkin * Add readme for 40percent/gherkin:midi --- .../gherkin/keymaps/midi/config.h | 24 ++++ .../gherkin/keymaps/midi/keymap.c | 115 ++++++++++++++++++ .../gherkin/keymaps/midi/readme.md | 14 +++ .../gherkin/keymaps/midi/rules.mk | 8 ++ 4 files changed, 161 insertions(+) create mode 100644 keyboards/40percentclub/gherkin/keymaps/midi/config.h create mode 100644 keyboards/40percentclub/gherkin/keymaps/midi/keymap.c create mode 100644 keyboards/40percentclub/gherkin/keymaps/midi/readme.md create mode 100644 keyboards/40percentclub/gherkin/keymaps/midi/rules.mk diff --git a/keyboards/40percentclub/gherkin/keymaps/midi/config.h b/keyboards/40percentclub/gherkin/keymaps/midi/config.h new file mode 100644 index 000000000..4a9607e5b --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/midi/config.h @@ -0,0 +1,24 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#pragma once + +#undef TAPPING_TERM +#define TAPPING_TERM 190 + +#define MUSIC_MASK (keycode != KC_NO) +#define MIDI_ADVANCED diff --git a/keyboards/40percentclub/gherkin/keymaps/midi/keymap.c b/keyboards/40percentclub/gherkin/keymaps/midi/keymap.c new file mode 100644 index 000000000..965652441 --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/midi/keymap.c @@ -0,0 +1,115 @@ +#include QMK_KEYBOARD_H + +enum layer_number { + _IONIAN = 0, + _DORIAN, + _PHRYGIAN, + _LYDIAN, + _MIXOLYDIAN, + _AEOLIAN, + _LOCRIAN, + _MENU +}; + +enum custom_keycodes { + IONIAN = SAFE_RANGE, + DORIAN, + PHRYGIAN, + LYDIAN, + MIXOLYDIAN, + AEOLIAN, + LOCRIAN, +}; + +#define MENU MO(_MENU) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_IONIAN] = LAYOUT_ortho_3x10( + MI_C_1, MI_F_1, MI_B_1, MI_E_2, MI_A_2, MI_D_3, MI_G_3, MI_C_4, MI_OCTD, MI_OCTU, + MI_D_1, MI_G_1, MI_C_2, MI_F_2, MI_B_2, MI_E_3, MI_A_3, MI_D_4, MI_TRNSD, MI_TRNSU, + MI_E_1, MI_A_1, MI_D_2, MI_G_2, MI_C_3, MI_F_3, MI_B_3, MI_E_4, MI_SUS, MENU + ), + + [_DORIAN] = LAYOUT_ortho_3x10( + MI_C_1, MI_F_1, MI_As_1, MI_Ds_2, MI_A_2, MI_D_3, MI_G_3, MI_C_4, _______, _______, + MI_D_1, MI_G_1, MI_C_2, MI_F_2, MI_As_2, MI_Ds_3, MI_A_3, MI_D_4, _______, _______, + MI_Ds_1, MI_A_1, MI_D_2, MI_G_2, MI_C_3, MI_F_3, MI_As_3, MI_Ds_4, _______, _______ + ), + + [_PHRYGIAN] = LAYOUT_ortho_3x10( + MI_C_1, MI_F_1, MI_As_1, MI_Ds_2, MI_Gs_2, MI_Cs_3, MI_G_3, MI_C_4, _______, _______, + MI_Cs_1, MI_G_1, MI_C_2, MI_F_2, MI_As_2, MI_Ds_3, MI_Gs_3, MI_Cs_4, _______, _______, + MI_Ds_1, MI_Gs_1, MI_Cs_2, MI_G_2, MI_C_3, MI_F_3, MI_As_3, MI_Ds_4, _______, _______ + ), + + [_LYDIAN] = LAYOUT_ortho_3x10( + MI_C_1, MI_Fs_1, MI_B_1, MI_E_2, MI_A_2, MI_D_3, MI_G_3, MI_C_4, _______, _______, + MI_D_1, MI_G_1, MI_C_2, MI_Fs_2, MI_B_2, MI_E_3, MI_A_3, MI_D_4, _______, _______, + MI_E_1, MI_A_1, MI_D_2, MI_G_2, MI_C_3, MI_Fs_3, MI_B_3, MI_E_4, _______, _______ + ), + + [_MIXOLYDIAN] = LAYOUT_ortho_3x10( + MI_C_1, MI_F_1, MI_As_1, MI_E_2, MI_A_2, MI_D_3, MI_G_3, MI_C_4, _______, _______, + MI_D_1, MI_G_1, MI_C_2, MI_F_2, MI_As_2, MI_E_3, MI_A_3, MI_D_4, _______, _______, + MI_E_1, MI_A_1, MI_D_2, MI_G_2, MI_C_3, MI_F_3, MI_As_3, MI_E_4, _______, _______ + ), + + [_AEOLIAN] = LAYOUT_ortho_3x10( + MI_C_1, MI_F_1, MI_As_1, MI_Ds_2, MI_Gs_2, MI_D_3, MI_G_3, MI_C_4, _______, _______, + MI_D_1, MI_G_1, MI_C_2, MI_F_2, MI_As_2, MI_Ds_3, MI_Gs_3, MI_D_4, _______, _______, + MI_Ds_1, MI_Gs_1, MI_D_2, MI_G_2, MI_C_3, MI_F_3, MI_As_3, MI_Ds_4, _______, _______ + ), + + [_LOCRIAN] = LAYOUT_ortho_3x10( + MI_C_1, MI_F_1, MI_As_1, MI_Ds_2, MI_Gs_2, MI_Cs_3, MI_Fs_3, MI_C_4, _______, _______, + MI_Cs_1, MI_Fs_1, MI_C_2, MI_F_2, MI_As_2, MI_Ds_3, MI_Gs_3, MI_Cs_4, _______, _______, + MI_Ds_1, MI_Gs_1, MI_Cs_2, MI_Fs_2, MI_C_3, MI_F_3, MI_As_3, MI_Ds_4, _______, _______ + ), + + [_MENU] = LAYOUT_ortho_3x10( + IONIAN, LYDIAN, LOCRIAN, _______, _______, _______, _______, _______, _______, _______, + DORIAN, MIXOLYDIAN, _______, _______, _______, _______, _______, _______, _______, _______, + PHRYGIAN, AEOLIAN, _______, _______, _______, _______, _______, _______, RESET, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case IONIAN: + if (record->event.pressed) { + set_single_persistent_default_layer(_IONIAN); + } + break; + case DORIAN: + if (record->event.pressed) { + set_single_persistent_default_layer(_DORIAN); + } + break; + case PHRYGIAN: + if (record->event.pressed) { + set_single_persistent_default_layer(_PHRYGIAN); + } + break; + case LYDIAN: + if (record->event.pressed) { + set_single_persistent_default_layer(_LYDIAN); + } + break; + case MIXOLYDIAN: + if (record->event.pressed) { + set_single_persistent_default_layer(_MIXOLYDIAN); + } + break; + case AEOLIAN: + if (record->event.pressed) { + set_single_persistent_default_layer(_AEOLIAN); + } + break; + case LOCRIAN: + if (record->event.pressed) { + set_single_persistent_default_layer(_LOCRIAN); + } + break; + } + return true; +} diff --git a/keyboards/40percentclub/gherkin/keymaps/midi/readme.md b/keyboards/40percentclub/gherkin/keymaps/midi/readme.md new file mode 100644 index 000000000..f8fad08dc --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/midi/readme.md @@ -0,0 +1,14 @@ +### Gherkin Midi +A gherkin midi layout that should cover most midi note playing needs. + +A 3x8 grid of notes written bottom left to right upwards as notes for the selected mode, with octave and transpose note controls at the top. Menu accesses other mode layouts, persisted to keyboard settings, and a reset for firmware programming. + +Modes are set by pressing Menu and their corresponding note from the C Ionian layout. That is, for Aeolian, press Menu and A 1. For Phrygian, press Menu and E 1. + +#### Keyboard Default Layout +![](https://i.imgur.com/VNc0GsI.jpg) + +Keyboard Editor Gist [link](https://gist.github.com/scottsheffield/c57859fe1a85d703f5387bf8ce41028c) + +#### Glamour Shot +![](https://i.imgur.com/B3Q4JoU.jpg) \ No newline at end of file diff --git a/keyboards/40percentclub/gherkin/keymaps/midi/rules.mk b/keyboards/40percentclub/gherkin/keymaps/midi/rules.mk new file mode 100644 index 000000000..bfc6dbbd0 --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/midi/rules.mk @@ -0,0 +1,8 @@ +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no +MIDI_ENABLE = yes From 875ae086928d07308888cd1f912e15aa9cf16e32 Mon Sep 17 00:00:00 2001 From: Benjamin Date: Mon, 17 Jun 2019 22:50:31 -0400 Subject: [PATCH 232/341] [Keymap] ortho_4x12: bredfield (#6137) * [Layout] 4x12: bredfield * ortho_4x12:bredfield code review tweaks --- .../community/ortho_4x12/bredfield/config.h | 4 + .../community/ortho_4x12/bredfield/keymap.c | 175 ++++++++++++++++++ .../community/ortho_4x12/bredfield/readme.md | 105 +++++++++++ 3 files changed, 284 insertions(+) create mode 100644 layouts/community/ortho_4x12/bredfield/config.h create mode 100644 layouts/community/ortho_4x12/bredfield/keymap.c create mode 100644 layouts/community/ortho_4x12/bredfield/readme.md diff --git a/layouts/community/ortho_4x12/bredfield/config.h b/layouts/community/ortho_4x12/bredfield/config.h new file mode 100644 index 000000000..9065e4139 --- /dev/null +++ b/layouts/community/ortho_4x12/bredfield/config.h @@ -0,0 +1,4 @@ +#pragma once + +#define TAPPING_TERM 200 +#define PERMISSIVE_HOLD \ No newline at end of file diff --git a/layouts/community/ortho_4x12/bredfield/keymap.c b/layouts/community/ortho_4x12/bredfield/keymap.c new file mode 100644 index 000000000..78fa8c89f --- /dev/null +++ b/layouts/community/ortho_4x12/bredfield/keymap.c @@ -0,0 +1,175 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// Keymap layers +enum layer_names { + _BASE_LAYER, + _RAISE_LAYER, + _LOWER_LAYER, + _NUMPAD_LAYER, + _NAVIGATION_LAYER, + _UI_LAYER, + _KEYBOARD_LAYER, +}; + +// Layer switches aliases +#define L_LOWER MO(_LOWER_LAYER) +#define L_RAISE MO(_RAISE_LAYER) +#define L_NUMPAD MO(_NUMPAD_LAYER) +#define L_UI MO(_UI_LAYER) +#define L_KEYBD MO(_KEYBOARD_LAYER) +#define SCL_NAV LT(_NAVIGATION_LAYER, KC_SCLN) +#define SFT_MIN MT(MOD_RSFT, KC_MINS) +#define SFT_ENT KC_SFTENT + +// GUI chords +#define GUI_1 LGUI(KC_1) +#define GUI_2 LGUI(KC_2) +#define GUI_3 LGUI(KC_3) +#define GUI_4 LGUI(KC_4) +#define GUI_5 LGUI(KC_5) +#define GUI_6 LGUI(KC_6) +#define GUI_7 LGUI(KC_7) +#define GUI_8 LGUI(KC_8) +#define GUI_9 LGUI(KC_9) +#define GUI_0 LGUI(KC_0) +#define GUI_MIN LGUI(KC_MINS) +#define GUI_EQL LGUI(KC_EQL) +#define GUI_LBR LGUI(KC_LBRC) +#define GUI_RBR LGUI(KC_RBRC) +#define GUI_ENT LGUI_T(KC_ENT) +#define GUI_ESC LGUI_T(KC_ESC) +#define GUI_TAB LGUI(KC_TAB) // application toggle +#define GUI_GRV LGUI(KC_GRV) // window toggle +#define GUI_SSF LGUI(LSFT(KC_3)) // Full screen shot +#define GUI_SST LGUI(LSFT(KC_4)) // Targetted screen shot + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | - | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | GUI/Esc| A | S | D | F | G | H | J | K | L | ;/nav | " | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | Shift | Z | X | C | V | B | N | M | , | . | / | Sft/ent| + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | Numpad | Ctrl | Alt | GUI | Lower | Bksp | Space | Raise | Ctrl | Alt | UI | Keybd | + * `-----------------------------------------------------------------------------------------------------------' + */ +[_BASE_LAYER] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + GUI_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SCL_NAV, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, + L_NUMPAD,KC_LCTL, KC_LALT, KC_LGUI, L_LOWER, KC_BSPC, KC_SPACE,L_RAISE, KC_RCTRL,KC_RALT, L_UI, L_KEYBD +), + +/* Lower + * ,-----------------------------------------------------------------------------------------------------------. + * | ` | ! | @ | # | $ | % | ^ | & | * | + | = | - | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | | | | | | | | , | . | / | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | | | | | Del | | | | | | + * `-----------------------------------------------------------------------------------------------------------' + */ +[_LOWER_LAYER] = LAYOUT_ortho_4x12( + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_PLUS, KC_EQL, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______ +), + +/* Raise + * ,-----------------------------------------------------------------------------------------------------------. + * | ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | _ | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | | { | [ | ( | < | > | ) | ] | } | | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | | | | | Del | | | | | | | + * `-----------------------------------------------------------------------------------------------------------' + */ +[_RAISE_LAYER] = LAYOUT_ortho_4x12( + KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_7, KC_F8, KC_F9, KC_F10, KC_UNDS, + _______, XXXXXXX, KC_LCBR, KC_LBRC, KC_LPRN, KC_LABK, KC_RABK, KC_RPRN, KC_RBRC, KC_RCBR, XXXXXXX, KC_PIPE, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______ +), + +/* Numpad + * ,-----------------------------------------------------------------------------------------------------------. + * | | | | | | | | 7 | 8 | 9 | * | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | | | | | | | 4 | 5 | 6 | - | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | | | | | | | 1 | 2 | 3 | + | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | | | | | | | 0 | . | / | | | + * `-----------------------------------------------------------------------------------------------------------' + */ +[_NUMPAD_LAYER] = LAYOUT_ortho_4x12( + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, KC_ASTR, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_4, KC_5, KC_6, KC_MINS, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_PLUS, _______, + _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_SLSH, _______, _______ +), + +/* Navigation + * ,-----------------------------------------------------------------------------------------------------------. + * | | | | | | | | Home | Up | End | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | | | | | | | Left | Down | Right | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | | | | Enter | | | Del | | | | | + * `-----------------------------------------------------------------------------------------------------------' + */ +[_NAVIGATION_LAYER] = LAYOUT_ortho_4x12( + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, KC_ENT, _______, _______, KC_DEL, _______, _______, _______, _______ +), + +/* UI + * ,--------------------------------------------------------------------------------+--------+-----------------. + * | GUI Tab| | | | | | | | | GUI - | GUI = | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | GUI ` | GUI 1 | GUI 2 | GUI 3 | GUI 4 | GUI 5 | GUI 6 | GUI 7 | | GUI [ | GUI ] | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------------------------+--------| + * | |Full SS | Area SS| | | | | | | | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | Prev | Play | Next | Bri - | | | Bri + | Mute | Vol - | Vol + | | + * `-----------------------------------------------------------------------------------------------------------' + */ +[_UI_LAYER] = LAYOUT_ortho_4x12( + GUI_TAB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, GUI_MIN, GUI_EQL, XXXXXXX, + GUI_GRV, GUI_1, GUI_2, GUI_3, GUI_4, GUI_5, GUI_6, GUI_7, XXXXXXX, GUI_LBR, GUI_RBR, XXXXXXX, + _______, GUI_SSF, GUI_SST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, KC_MRWD, KC_MPLY, KC_MFFD, KC_VOLD, KC_MUTE, KC_MUTE, KC_VOLU, _______, _______, _______, _______ +), + +/* Keyboard + * ,--------------------------------------------------------------------------------+--------+-----------------. + * | | | | | | | | | | | | RESET | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | DEBUG | + * |--------+--------+--------+--------+--------+-----------------+--------+--------------------------+--------| + * | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------------------------------' + */ +[_KEYBOARD_LAYER] = LAYOUT_ortho_4x12( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______ +), +}; \ No newline at end of file diff --git a/layouts/community/ortho_4x12/bredfield/readme.md b/layouts/community/ortho_4x12/bredfield/readme.md new file mode 100644 index 000000000..e0f6e3f55 --- /dev/null +++ b/layouts/community/ortho_4x12/bredfield/readme.md @@ -0,0 +1,105 @@ +# bredfield's 4x12 Ortho Keymap + +## Overview +This is the layout that I use for all 4x12 boards, for writing and programming. + +- Works with planck or split style boards +- Split spacebar; left position is backspace, which frees up the typical key for minus/undersc +- Targets mac os; linux variant to come +- Navigation layer is triggered via the `;` key, allowing for single-hand navigation without leaving the home row +- Brackets are located on the home row on raise, which is comfortable when programming +- Reduced mod / layer tap use, to avoid input lag +- LEDs are overrated + +## Layers +### Main +``` + * ,-----------------------------------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | - | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | GUI/Esc| A | S | D | F | G | H | J | K | L | ;/nav | " | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | Shift | Z | X | C | V | B | N | M | , | . | / | Sft/ent| + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | Numpad | Ctrl | Alt | GUI | Lower | Bksp | Space | Raise | Ctrl | Alt | UI | Keybd | + * `-----------------------------------------------------------------------------------------------------------' + ``` + + ### Lower + ``` + * ,-----------------------------------------------------------------------------------------------------------. + * | ` | ! | @ | # | $ | % | ^ | & | * | + | = | - | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | | | | | | | | , | . | / | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | | | | | Del | | | | | | | + * `-----------------------------------------------------------------------------------------------------------' +``` + +### Raise +``` + * ,-----------------------------------------------------------------------------------------------------------. + * | ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | _ | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | | { | [ | ( | < | > | ) | ] | } | | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | | | | | Del | | | | | | | + * `-----------------------------------------------------------------------------------------------------------' +``` + +### Numpad +``` + * ,-----------------------------------------------------------------------------------------------------------. + * | | | | | | | | 7 | 8 | 9 | * | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | | | | | | | 4 | 5 | 6 | - | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | | | | | | | 1 | 2 | 3 | + | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | | | | | | | 0 | . | / | | | + * `-----------------------------------------------------------------------------------------------------------' + ``` + +### Navigation +``` + * ,-----------------------------------------------------------------------------------------------------------. + * | | | | | | | | Home | Up | End | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | | | | | | | Left | Down | Right | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | | | | Enter | | | Del | | | | | + * `-----------------------------------------------------------------------------------------------------------' +``` + +### UI +``` + * ,--------------------------------------------------------------------------------+--------+-----------------. + * | GUI Tab| | | | | | | | | GUI - | GUI = | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | GUI ` | GUI 1 | GUI 2 | GUI 3 | GUI 4 | GUI 5 | GUI 6 | GUI 7 | | GUI [ | GUI ] | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------------------------+--------| + * | |Full SS | Area SS| | | | | | | | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | Prev | Play | Next | Bri - | | | Bri + | Mute | Vol - | Vol + | | + * `-----------------------------------------------------------------------------------------------------------' +``` + +### Keyboard +``` + * ,--------------------------------------------------------------------------------+--------+-----------------. + * | | | | | | | | | | | | RESET | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | DEBUG | + * |--------+--------+--------+--------+--------+-----------------+--------+--------------------------+--------| + * | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------------------------------' + */ + ``` \ No newline at end of file From 70285f5ed9c7d03b046bb618d8b3698ef25f5a0d Mon Sep 17 00:00:00 2001 From: M-AS Date: Tue, 18 Jun 2019 13:37:52 +0700 Subject: [PATCH 233/341] [Keymap] Update to personal keymaps (#6142) * added personal CTRL keymap * added personal dz60rgb keymap * enabled new rgb effect * added space cadet shift * media player track buttons now orange * updated keymaps with rgb setting and visual HSV setting preview * fixed source stuff? * added support for underglow toggle (bugged to all hell) * everything now behaves as expected when ti comes to RGB toggles, thank god * removed ifdefs * changed color of MAS_CRM * uh, whitespace * changed rgb positions and modifiers within RGB matrix thing for CTRL and DZ60RGB * updated keymap to work kindof * KEYMAP: changed list of rgb effects * changed CTRL rgb defaults * KEYMAP: new LED layout for ctrl * fixed white LED position in indicator * changed capslock tap timing --- keyboards/dztech/dz60rgb/keymaps/matthewrobo/config.h | 2 ++ keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h | 2 ++ keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/keyboards/dztech/dz60rgb/keymaps/matthewrobo/config.h b/keyboards/dztech/dz60rgb/keymaps/matthewrobo/config.h index 7166bf70b..a50008beb 100644 --- a/keyboards/dztech/dz60rgb/keymaps/matthewrobo/config.h +++ b/keyboards/dztech/dz60rgb/keymaps/matthewrobo/config.h @@ -5,6 +5,8 @@ #define PERMISSIVE_HOLD #define TAPPING_TERM 150 +#define TAP_HOLD_CAPS_DELAY 0 + #undef DISABLE_RGB_MATRIX_SPLASH #undef DISABLE_RGB_MATRIX_MULTISPLASH #undef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h index 4ee767cdd..b7a469208 100644 --- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h @@ -5,6 +5,8 @@ #define PERMISSIVE_HOLD #define TAPPING_TERM 150 +#define TAP_HOLD_CAPS_DELAY 0 + #define RGB_MATRIX_FRAMEBUFFER_EFFECTS // #define DISABLE_RGB_MATRIX_SOLID_COLOR diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c b/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c index 112be66d6..11b4d70ca 100644 --- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c @@ -206,7 +206,7 @@ void rgb_matrix_indicators_user(void) rgb_matrix_set_color(71, 0x00, 0xFF, 0x01); //MAS_GRN rgb_matrix_set_color(72, 0xFF, 0xA5, 0x18); //MAS_CRM rgb_matrix_set_color(60, 0x81, 0x3C, 0xFF); //MAS_PRP - rgb_matrix_set_color(26, 0xFF, 0xFF, 0xFF); //MAS_WHT + rgb_matrix_set_color(43, 0xFF, 0xFF, 0xFF); //MAS_WHT } break; } From d5f0327b97aff02a092578ea09fc277aa0cf81d1 Mon Sep 17 00:00:00 2001 From: George Petri Date: Tue, 18 Jun 2019 21:01:51 +0300 Subject: [PATCH 234/341] [Keymap] Add keymap for keebio/nyquist (#6144) * duplicate default * delete colemak, dvorak * cleanup * update keymap * disable unused rules, fix spit leds * ascii layout keymap * wip change rgb on layer * change rgb on layer * change rgb on caps lock * add impl navigation layer * add readme, swap gui and alt * update readme * Update keyboards/keebio/nyquist/keymaps/georgepetri/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/keebio/nyquist/keymaps/georgepetri/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * remove backslashes, use IS_HOST_LED_ON --- .../nyquist/keymaps/georgepetri/config.h | 27 ++++++ .../nyquist/keymaps/georgepetri/keymap.c | 91 +++++++++++++++++++ .../nyquist/keymaps/georgepetri/readme.md | 52 +++++++++++ .../nyquist/keymaps/georgepetri/rules.mk | 3 + 4 files changed, 173 insertions(+) create mode 100644 keyboards/keebio/nyquist/keymaps/georgepetri/config.h create mode 100644 keyboards/keebio/nyquist/keymaps/georgepetri/keymap.c create mode 100644 keyboards/keebio/nyquist/keymaps/georgepetri/readme.md create mode 100644 keyboards/keebio/nyquist/keymaps/georgepetri/rules.mk diff --git a/keyboards/keebio/nyquist/keymaps/georgepetri/config.h b/keyboards/keebio/nyquist/keymaps/georgepetri/config.h new file mode 100644 index 000000000..bc7fed826 --- /dev/null +++ b/keyboards/keebio/nyquist/keymaps/georgepetri/config.h @@ -0,0 +1,27 @@ +/* +Copyright 2017 Danny Nguyen + +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 . +*/ + +#pragma once + +// #define USE_I2C + +/* Select hand configuration */ +// #define MASTER_RIGHT +// #define EE_HANDS + +#undef RGBLED_NUM +#define RGBLED_NUM 12 diff --git a/keyboards/keebio/nyquist/keymaps/georgepetri/keymap.c b/keyboards/keebio/nyquist/keymaps/georgepetri/keymap.c new file mode 100644 index 000000000..6564e2a7f --- /dev/null +++ b/keyboards/keebio/nyquist/keymaps/georgepetri/keymap.c @@ -0,0 +1,91 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#define _BASE 0 +#define _L 1 +#define _R 2 + +enum custom_keycodes { + QWERTY = SAFE_RANGE +}; + +#define KC_TL LCTL(KC_PGUP) +#define KC_TR LCTL(KC_PGDN) +#define KC_TC LCTL(KC_W) +#define KC_TRO LCTL(LSFT(KC_T)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_BASE] = LAYOUT( +//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_BSPC, +//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_DEL , +//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_ESC , 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_ENT , +//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_CAPS, KC_LCTL, KC_LGUI, KC_LALT, MO(_L) , KC_SPC , KC_SPC , TG(_R) , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT +//└────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_L] = LAYOUT( +//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______, 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_MINS, KC_EQL , KC_LBRC, KC_RBRC, KC_BSLS, +//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_PGUP, KC_HOME, KC_END , _______, +//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +//└────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_R] = LAYOUT( +//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_TL , KC_TR , KC_TC , KC_TRO , _______, _______, KC_TL , KC_TR , KC_TC , KC_TRO , _______, +//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______, _______, +//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_PGDN, KC_PGUP, KC_HOME, KC_END , _______, _______, KC_PGDN, KC_PGUP, KC_HOME, KC_END , _______, +//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +//└────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┘ + ) +}; + +void keyboard_post_init_user(void) { + rgblight_sethsv_noeeprom(HSV_BLUE); +} + +void update_led(void) { + switch (biton32(layer_state)) { + case _BASE: + rgblight_sethsv_noeeprom(HSV_BLUE); + break; + case _L: + rgblight_sethsv_noeeprom(HSV_CORAL); + break; + case _R: + rgblight_sethsv_noeeprom(HSV_MAGENTA); + break; + } + if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { + rgblight_sethsv_range(HSV_WHITE,0,3); + rgblight_sethsv_range(HSV_WHITE,9,12); + } +} + +uint32_t layer_state_set_user(uint32_t state) { + update_led(); + return state; +} + +void led_set_user(uint8_t usb_led) { + update_led(); +} diff --git a/keyboards/keebio/nyquist/keymaps/georgepetri/readme.md b/keyboards/keebio/nyquist/keymaps/georgepetri/readme.md new file mode 100644 index 000000000..a773c9894 --- /dev/null +++ b/keyboards/keebio/nyquist/keymaps/georgepetri/readme.md @@ -0,0 +1,52 @@ +# George Petri's Nyquist layout + +``` +make keebio/nyquist/rev2:georgepetri +``` + +Features a dedicated navigation layer on rise and current layer status on rgb underglow. + +### Base Layer +``` +┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ +│ GRAVE│ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ BSPC │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ TAB │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ DEL │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ ESC │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ SCLN│ QUOT │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ LSFT│ Z │ X │ C │ V │ B │ │ N │ M │ COMM │ DOT │ SLSH│ ENT │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ CAPS│ LCTL│ LGUI │ LALT │MO(_L)│ SPC │ │ SPC │MO(_R)│ LEFT │ DOWN│ UP │ RGHT │ +└──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘ +``` + +### Lower +``` +┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ +│ │ F1 │ F2 │ F3 │ F4 │ F5 │ │ F6 │ F7 │ F8 │ F9 │ F10 │ │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ │ F11 │ F12 │ │ │ │ │ │ │ │ │ │ │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ │ │ │ │ │ │ │ │ MINS│ EQL │ LBRC│ RBRC│ BSLS │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ │ │ │ │ │ │ │ │ PGDN│ PGUP │ HOME│ END │ │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +└──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘ +``` + +### Rise +``` +┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ │ TAB_L│ TAB_R│ TAB_C│ TAB_R│ │ │ │ TAB_L│ TAB_R│ TAB_C│ TAB_R│ │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ │ LEFT │ DOWN │ UP │ RGHT │ │ │ LEFT │ DOWN │ UP │ RGHT │ │ │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ │ PGDN │ PGUP │ HOME│ END │ │ │ │ PGDN │ PGUP │ HOME│ END │ │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +└──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘ +``` diff --git a/keyboards/keebio/nyquist/keymaps/georgepetri/rules.mk b/keyboards/keebio/nyquist/keymaps/georgepetri/rules.mk new file mode 100644 index 000000000..2e145d5a8 --- /dev/null +++ b/keyboards/keebio/nyquist/keymaps/georgepetri/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = yes +MOUSEKEY_ENABLE = no +COMMAND_ENABLE = no From 2d15961855460ee098d6890a2b7fa336e25ed522 Mon Sep 17 00:00:00 2001 From: joelproko <51485167+joelproko@users.noreply.github.com> Date: Tue, 18 Jun 2019 20:34:36 +0200 Subject: [PATCH 235/341] [Keyboard] added custom keyboard (#6141) * added keyboard_layout_jopr * making it compile * #pragma once instead of #ifndef and #define * renamed and added keymap renamed old "default" to "modded_white", added new "default" that resembles an ISO 105-key layout * reordered keyboards/jopr/info.json to match order o layout array * implemented most suggestions * fixed missing ; * fixed bootloader setting for rules.mk * adopted standard layout matrix naming convention * "fixed" commented-out code in keymaps * changes to keymap layers and LEDs Turns out adding a layer for ROYA-modified keycodes is more trouble than it's worth and works better by just defining a ROYA key. Also, LEDs were set up incorrectly. Lastly, implemented SysReq-Warning LED. * moved forced NumLock code just in case either it or the CapsLock & ScrlLock update code wouldn't both work otherwise * rearranged media keycodes * replaced Shifted keycodes with basic ones * Apply suggestions from code review Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * implemented suggestions by noroadsleft * Apply suggestions from code review Make ISO-Enter QMK Configurator-friendly Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update readme.md * Update keyboards/jopr/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * moved keyboard to handwired folder It was said that personal passion projects belong in there, even if they're not actually handwired * Update readme.md --- keyboards/handwired/jopr/config.h | 49 ++ keyboards/handwired/jopr/info.json | 562 ++++++++++++++++++ keyboards/handwired/jopr/jopr.c | 11 + keyboards/handwired/jopr/jopr.h | 24 + .../handwired/jopr/keymaps/default/keymap.c | 59 ++ .../jopr/keymaps/modded_white/keymap.c | 59 ++ keyboards/handwired/jopr/readme.md | 17 + keyboards/handwired/jopr/rules.mk | 63 ++ 8 files changed, 844 insertions(+) create mode 100644 keyboards/handwired/jopr/config.h create mode 100644 keyboards/handwired/jopr/info.json create mode 100644 keyboards/handwired/jopr/jopr.c create mode 100644 keyboards/handwired/jopr/jopr.h create mode 100644 keyboards/handwired/jopr/keymaps/default/keymap.c create mode 100644 keyboards/handwired/jopr/keymaps/modded_white/keymap.c create mode 100644 keyboards/handwired/jopr/readme.md create mode 100644 keyboards/handwired/jopr/rules.mk diff --git a/keyboards/handwired/jopr/config.h b/keyboards/handwired/jopr/config.h new file mode 100644 index 000000000..aece70915 --- /dev/null +++ b/keyboards/handwired/jopr/config.h @@ -0,0 +1,49 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4DAE +#define PRODUCT_ID 0x1000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER joelproko +#define PRODUCT jopr-106-Nl2SR-Cl2nL +#define DESCRIPTION jopr-106 Mechanical Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 11 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D0, D6, D2, D4, D3, D5, D7, C6, B6, F5 } +#define MATRIX_COL_PINS { B3, B2, B1, B0, F7, E6, F6, B5, C7, B4, D1 } +#define UNUSED_PINS { B7 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 0 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +/* #define LOCKING_SUPPORT_ENABLE */ + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE +/* #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) */ +#define NO_ACTION_ONESHOT +#define TAPPING_TOGGLE 3 + +/*#define RGB_DI_PIN F4*/ +#ifdef RGB_DI_PIN +/*#define RGBLIGHT_ANIMATIONS*/ +#define RGBLED_NUM 1 +#define RGBLIGHT_HUE_STEP 1 +#define RGBLIGHT_SAT_STEP 1 +#define RGBLIGHT_VAL_STEP 1 +#endif diff --git a/keyboards/handwired/jopr/info.json b/keyboards/handwired/jopr/info.json new file mode 100644 index 000000000..c4cadb8c3 --- /dev/null +++ b/keyboards/handwired/jopr/info.json @@ -0,0 +1,562 @@ +{ + "keyboard_name": "jopr-106", + "url": "https://github.com/joelproko/keyboard_layout_jopr", + "maintainer": "joelproko", + "width": 22.5, + "height": 6.25, + "layouts": { + "LAYOUT": { + "key_count": 106, + "layout": [ + { + "label": "MX_A0", + "x": 0, + "y": 0 + }, + { + "label": "MX_B0", + "x": 1.25, + "y": 0 + }, + { + "label": "MX_C0", + "x": 2.25, + "y": 0 + }, + { + "label": "MX_D0", + "x": 3.25, + "y": 0 + }, + { + "label": "MX_E0", + "x": 4.25, + "y": 0 + }, + { + "label": "MX_F0", + "x": 5.5, + "y": 0 + }, + { + "label": "MX_G0", + "x": 6.5, + "y": 0 + }, + { + "label": "MX_H0", + "x": 7.5, + "y": 0 + }, + { + "label": "MX_I0", + "x": 8.5, + "y": 0 + }, + { + "label": "MX_J0", + "x": 9.75, + "y": 0 + }, + { + "label": "MX_A6", + "x": 10.75, + "y": 0 + }, + { + "label": "MX_B6", + "x": 11.75, + "y": 0 + }, + { + "label": "MX_C6", + "x": 12.75, + "y": 0 + }, + { + "label": "MX_D6", + "x": 14, + "y": 0 + }, + { + "label": "MX_E6", + "x": 15.25, + "y": 0 + }, + { + "label": "MX_F6", + "x": 16.25, + "y": 0 + }, + { + "label": "MX_G6", + "x": 17.25, + "y": 0 + }, + { + "label": "MX_H6", + "x": 18.25, + "y": 0 + }, + { + "label": "MX_A1", + "x": 0, + "y": 1.25 + }, + { + "label": "MX_B1", + "x": 1, + "y": 1.25 + }, + { + "label": "MX_C1", + "x": 2, + "y": 1.25 + }, + { + "label": "MX_D1", + "x": 3, + "y": 1.25 + }, + { + "label": "MX_E1", + "x": 4, + "y": 1.25 + }, + { + "label": "MX_F1", + "x": 5, + "y": 1.25 + }, + { + "label": "MX_G1", + "x": 6, + "y": 1.25 + }, + { + "label": "MX_H1", + "x": 7, + "y": 1.25 + }, + { + "label": "MX_I1", + "x": 8, + "y": 1.25 + }, + { + "label": "MX_J1", + "x": 9, + "y": 1.25 + }, + { + "label": "MX_A7", + "x": 10, + "y": 1.25 + }, + { + "label": "MX_B7", + "x": 11, + "y": 1.25 + }, + { + "label": "MX_C7", + "x": 12, + "y": 1.25 + }, + { + "label": "MX_D7", + "x": 13, + "y": 1.25, + "w": 2 + }, + { + "label": "MX_E7", + "x": 15.25, + "y": 1.25 + }, + { + "label": "MX_F7", + "x": 16.25, + "y": 1.25 + }, + { + "label": "MX_G7", + "x": 17.25, + "y": 1.25 + }, + { + "label": "MX_H7", + "x": 18.25, + "y": 1.25 + }, + { + "label": "MX_A2", + "x": 0, + "y": 2.25, + "w": 1.5 + }, + { + "label": "MX_B2", + "x": 1.5, + "y": 2.25 + }, + { + "label": "MX_C2", + "x": 2.5, + "y": 2.25 + }, + { + "label": "MX_D2", + "x": 3.5, + "y": 2.25 + }, + { + "label": "MX_E2", + "x": 4.5, + "y": 2.25 + }, + { + "label": "MX_F2", + "x": 5.5, + "y": 2.25 + }, + { + "label": "MX_G2", + "x": 6.5, + "y": 2.25 + }, + { + "label": "MX_H2", + "x": 7.5, + "y": 2.25 + }, + { + "label": "MX_I2", + "x": 8.5, + "y": 2.25 + }, + { + "label": "MX_J2", + "x": 9.5, + "y": 2.25 + }, + { + "label": "MX_A8", + "x": 10.5, + "y": 2.25 + }, + { + "label": "MX_B8", + "x": 11.5, + "y": 2.25 + }, + { + "label": "MX_C8", + "x": 12.5, + "y": 2.25 + }, + { + "label": "MX_D8", + "x": 13.75, + "y": 2.25, + "w": 1.25, + "h": 2 + }, + { + "label": "MX_E8", + "x": 15.25, + "y": 2.25 + }, + { + "label": "MX_F8", + "x": 16.25, + "y": 2.25 + }, + { + "label": "MX_G8", + "x": 17.25, + "y": 2.25 + }, + { + "label": "MX_H8", + "x": 18.25, + "y": 2.25, + "h": 2 + }, + { + "label": "MX_A3", + "x": 0, + "y": 3.25, + "w": 1.75 + }, + { + "label": "MX_B3", + "x": 1.75, + "y": 3.25 + }, + { + "label": "MX_C3", + "x": 2.75, + "y": 3.25 + }, + { + "label": "MX_D3", + "x": 3.75, + "y": 3.25 + }, + { + "label": "MX_E3", + "x": 4.75, + "y": 3.25 + }, + { + "label": "MX_F3", + "x": 5.75, + "y": 3.25 + }, + { + "label": "MX_G3", + "x": 6.75, + "y": 3.25 + }, + { + "label": "MX_H3", + "x": 7.75, + "y": 3.25 + }, + { + "label": "MX_I3", + "x": 8.75, + "y": 3.25 + }, + { + "label": "MX_J3", + "x": 9.75, + "y": 3.25 + }, + { + "label": "MX_A9", + "x": 10.75, + "y": 3.25 + }, + { + "label": "MX_B9", + "x": 11.75, + "y": 3.25 + }, + { + "label": "MX_C9", + "x": 12.75, + "y": 3.25 + }, + { + "label": "MX_E9", + "x": 15.25, + "y": 3.25 + }, + { + "label": "MX_F9", + "x": 16.25, + "y": 3.25 + }, + { + "label": "MX_G9", + "x": 17.25, + "y": 3.25 + }, + { + "label": "MX_H9", + "x": 19.5, + "y": 3.25 + }, + { + "label": "MX_K1", + "x": 20.5, + "y": 3.25 + }, + { + "label": "MX_K0", + "x": 21.5, + "y": 3.25 + }, + { + "label": "MX_A4", + "x": 0, + "y": 4.25, + "w": 1.25 + }, + { + "label": "MX_B4", + "x": 1.25, + "y": 4.25 + }, + { + "label": "MX_C4", + "x": 2.25, + "y": 4.25 + }, + { + "label": "MX_D4", + "x": 3.25, + "y": 4.25 + }, + { + "label": "MX_E4", + "x": 4.25, + "y": 4.25 + }, + { + "label": "MX_F4", + "x": 5.25, + "y": 4.25 + }, + { + "label": "MX_G4", + "x": 6.25, + "y": 4.25 + }, + { + "label": "MX_H4", + "x": 7.25, + "y": 4.25 + }, + { + "label": "MX_I4", + "x": 8.25, + "y": 4.25 + }, + { + "label": "MX_J4", + "x": 9.25, + "y": 4.25 + }, + { + "label": "MX_I9", + "x": 10.25, + "y": 4.25 + }, + { + "label": "MX_I8", + "x": 11.25, + "y": 4.25 + }, + { + "label": "MX_I7", + "x": 12.25, + "y": 4.25, + "w": 2.75 + }, + { + "label": "MX_I6", + "x": 15.25, + "y": 4.25 + }, + { + "label": "MX_J9", + "x": 16.25, + "y": 4.25 + }, + { + "label": "MX_J8", + "x": 17.25, + "y": 4.25 + }, + { + "label": "MX_J7", + "x": 18.25, + "y": 4.25, + "h": 2 + }, + { + "label": "MX_J6", + "x": 19.5, + "y": 4.25 + }, + { + "label": "MX_K3", + "x": 20.5, + "y": 4.25 + }, + { + "label": "MX_K2", + "x": 21.5, + "y": 4.25 + }, + { + "label": "MX_A5", + "x": 0, + "y": 5.25, + "w": 1.25 + }, + { + "label": "MX_B5", + "x": 1.25, + "y": 5.25, + "w": 1.25 + }, + { + "label": "MX_C5", + "x": 2.5, + "y": 5.25, + "w": 1.25 + }, + { + "label": "MX_D5", + "x": 3.75, + "y": 5.25, + "w": 6.25 + }, + { + "label": "MX_J5", + "x": 10, + "y": 5.25, + "w": 1.25 + }, + { + "label": "MX_I5", + "x": 11.25, + "y": 5.25, + "w": 1.25 + }, + { + "label": "MX_K9", + "x": 12.5, + "y": 5.25, + "w": 1.25 + }, + { + "label": "MX_E5", + "x": 13.75, + "y": 5.25, + "w": 1.25 + }, + { + "label": "MX_K8", + "x": 15.25, + "y": 5.25, + "w": 2 + }, + { + "label": "MX_K7", + "x": 17.25, + "y": 5.25 + }, + { + "label": "MX_K6", + "x": 19.5, + "y": 5.25 + }, + { + "label": "MX_K5", + "x": 20.5, + "y": 5.25 + }, + { + "label": "MX_K4", + "x": 21.5, + "y": 5.25 + } + ] + } + } +} diff --git a/keyboards/handwired/jopr/jopr.c b/keyboards/handwired/jopr/jopr.c new file mode 100644 index 000000000..3dccb719c --- /dev/null +++ b/keyboards/handwired/jopr/jopr.c @@ -0,0 +1,11 @@ +#include "jopr.h" +void matrix_init_kb(void) { + matrix_init_user(); + led_init_ports(); +}; + +void led_init_ports(void) { + setPinOutput(F0); + setPinOutput(F1); + setPinOutput(F4); +} \ No newline at end of file diff --git a/keyboards/handwired/jopr/jopr.h b/keyboards/handwired/jopr/jopr.h new file mode 100644 index 000000000..b79a8f264 --- /dev/null +++ b/keyboards/handwired/jopr/jopr.h @@ -0,0 +1,24 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K600, K601, K602, K603, K604, K605, K606, K607, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K700, K701, K702, K703, K704, K705, K706, K707, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K800, K801, K802, K803, K804, K805, K806, K807, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K900, K901, K902, K904, K905, K906, K907, K110, K010, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K908, K808, K708, K608, K909, K809, K709, K609, K310, K210, \ + K500, K501, K502, K503, K509, K508, K910, K504, K810, K710, K610, K510, K410 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410 }, \ + { K500, K501, K502, K503, K504, KC_NO, KC_NO, KC_NO, K508, K509, K510 }, \ + { K600, K601, K602, K603, K604, K605, K606, K607, K608, K609, K610 }, \ + { K700, K701, K702, K703, K704, K705, K706, K707, K708, K709, K710 }, \ + { K800, K801, K802, K803, K804, K805, K806, K807, K808, K809, K810 }, \ + { K900, K901, K902, KC_NO, K904, K905, K906, K907, K908, K909, K910 } \ +} diff --git a/keyboards/handwired/jopr/keymaps/default/keymap.c b/keyboards/handwired/jopr/keymaps/default/keymap.c new file mode 100644 index 000000000..d6b998f49 --- /dev/null +++ b/keyboards/handwired/jopr/keymaps/default/keymap.c @@ -0,0 +1,59 @@ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FN 1 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BL] = LAYOUT( + KC_ESC, 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, KC_NO, KC_CAPS, KC_SLCK, KC_PAUS, + KC_GRV, 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_PSCR, KC_PSLS, KC_PAST, KC_PMNS, + 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_ENT, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_MHEN, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_P4, KC_P5, KC_P6, KC_PGUP, KC_INS, KC_PGDN, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_P1, KC_P2, KC_P3, KC_PENT, KC_HOME, KC_UP, KC_END, + KC_LCTL, KC_LWIN, KC_LALT, KC_SPC, KC_RALT, KC_RWIN, LT(_FN,KC_APP), KC_RCTL, KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SYSREQ, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MSTP, KC_VOLU, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_MUTE, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, _______, _______, KC_VOLD, KC_MSTP, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT + ) +}; + +void led_set_user(uint8_t usb_led) { + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinHigh(F1); + } else { + writePinLow(F1); + } + + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinHigh(F0); + } else { + writePinLow(F0); + } + + if (!(IS_LED_ON(usb_led, USB_LED_NUM_LOCK))) { + tap_code(KC_NUMLOCK); + } +} +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static bool sysreq_led = false; + if (record->event.pressed) { + if (sysreq_led) { + sysreq_led = false; + writePinLow(F4); + } + else { + switch(keycode) { + case KC_SYSREQ: + sysreq_led = true; + writePinHigh(F4); + } + } + } + return true; +} diff --git a/keyboards/handwired/jopr/keymaps/modded_white/keymap.c b/keyboards/handwired/jopr/keymaps/modded_white/keymap.c new file mode 100644 index 000000000..da1f9e183 --- /dev/null +++ b/keyboards/handwired/jopr/keymaps/modded_white/keymap.c @@ -0,0 +1,59 @@ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FN 1 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BL] = LAYOUT( + KC_ESC, 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, KC_NO, KC_CAPS, KC_SLCK, KC_PAUS, + KC_NUHS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NUBS, KC_SLSH, KC_BSPC, KC_PSCR, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_V, KC_Y, KC_D, KC_COMM, KC_QUOT, KC_INT1, KC_J, KC_M, KC_L, KC_U, KC_LBRC, KC_RBRC, KC_ENT, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_MHEN, KC_A, KC_T, KC_H, KC_E, KC_B, KC_MINS, KC_C, KC_S, KC_N, KC_O, KC_I, KC_EQL, KC_P4, KC_P5, KC_P6, KC_PGUP, KC_INS, KC_PGDN, + KC_LSFT, KC_GRV, KC_P, KC_K, KC_G, KC_W, KC_Q, KC_X, KC_R, KC_F, KC_DOT, KC_Z, KC_RSFT, KC_P1, KC_P2, KC_P3, KC_PENT, KC_HOME, KC_UP, KC_END, + KC_LCTL, KC_LWIN, KC_LALT, KC_SPC, KC_RALT, KC_RWIN, LT(_FN,KC_APP), KC_RCTL, KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SYSREQ, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MSTP, KC_VOLU, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_MUTE, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, _______, _______, KC_VOLD, KC_MSTP, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT + ) +}; + +void led_set_user(uint8_t usb_led) { + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinHigh(F1); + } else { + writePinLow(F1); + } + + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinHigh(F0); + } else { + writePinLow(F0); + } + + if (!(IS_LED_ON(usb_led, USB_LED_NUM_LOCK))) { + tap_code(KC_NUMLOCK); + } +} +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static bool sysreq_led = false; + if (record->event.pressed) { + if (sysreq_led) { + sysreq_led = false; + writePinLow(F4); + } + else { + switch(keycode) { + case KC_SYSREQ: + sysreq_led = true; + writePinHigh(F4); + } + } + } + return true; +} \ No newline at end of file diff --git a/keyboards/handwired/jopr/readme.md b/keyboards/handwired/jopr/readme.md new file mode 100644 index 000000000..eab197d2d --- /dev/null +++ b/keyboards/handwired/jopr/readme.md @@ -0,0 +1,17 @@ +# jopr-106-Nl2SR-Cl2MH + +106-key based on ISO 105-key, NumLock to SysReq, CapsLock to Muhenkan/ROYA, NumLock state forced on + +![jopr-106-default](https://raw.githubusercontent.com/joelproko/keyboard_layout_jopr/master/keycode_layout_default.png) +![jopr-106-modded_white](https://raw.githubusercontent.com/joelproko/keyboard_layout_jopr/master/keycap_layout_modded_white.png) + +Inspired by [KeyBored](https://github.com/itractus/KeyBored) and [white_keyboard_layout](https://github.com/mw8/white_keyboard_layout) + +Keyboard Maintainer: [joelproko](https://github.com/joelproko) +Hardware: https://github.com/joelproko/keyboard_layout_jopr + +Make example for this keyboard (after setting up your build environment): + + make jopr:default + +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). diff --git a/keyboards/handwired/jopr/rules.mk b/keyboards/handwired/jopr/rules.mk new file mode 100644 index 000000000..de83252c3 --- /dev/null +++ b/keyboards/handwired/jopr/rules.mk @@ -0,0 +1,63 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# 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 = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +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 = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +UNICODE_ENABLE = yes +RGBLIGHT_ENABLE = no From 628e08c60661ca14313ecaef9205a1bf851b70bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismael=20Venegas=20Castell=C3=B3?= Date: Wed, 19 Jun 2019 00:43:07 -0500 Subject: [PATCH 236/341] [Keymap] Add new mod tap dances to Hacker Dvorak (#6155) --- .../ergodox_ez/keymaps/hacker_dvorak/config.h | 10 +++- .../keymaps/hacker_dvorak/gulpfile.js | 31 +++++----- .../keymaps/hacker_dvorak/hacker_dvorak.c | 26 ++++----- .../keycodes/aliases_definitions.c | 14 ++++- .../hacker_dvorak/keycodes/custom_keycodes.c | 1 - .../ergodox_ez/keymaps/hacker_dvorak/keymap.c | 9 +++ .../hacker_dvorak/layers/layers_definitions.c | 2 +- .../hacker_dvorak/leader/leader_setup.c | 13 ----- .../keymaps/hacker_dvorak/package.json | 2 +- .../ergodox_ez/keymaps/hacker_dvorak/rules.mk | 1 + .../tap_dance/mod_tap_layer_dances/dot_comm.c | 41 +++++++++++++ .../mod_tap_layer_dances/h_mouse_gui.c | 39 +++++++++++++ .../mod_tap_layer_dances/j_media_meh.c | 43 ++++++++++++++ .../mod_tap_layer_dances/k_numpad_hyper.c | 45 ++++++++++++++ .../mod_tap_layer_dances/m_chords_hyper.c | 45 ++++++++++++++ .../mod_tap_layer_dances/none_lead.c | 4 +- .../mod_tap_layer_dances/quot_dquot.c | 41 +++++++++++++ .../mod_tap_layer_dances/scln_coln.c | 43 ++++++++++++++ .../mod_tap_layer_dances/u_arrows_gui.c | 39 +++++++++++++ .../mod_tap_layer_dances/w_media_meh.c | 43 ++++++++++++++ .../tap_dance/tap_dance_actions.c | 40 +++++++------ .../hacker_dvorak/tap_dance/tap_dances.c | 58 +++++++++++++------ .../hacker_dvorak/user/layer_set_state_user.c | 2 +- 23 files changed, 506 insertions(+), 86 deletions(-) create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/dot_comm.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/h_mouse_gui.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/j_media_meh.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/k_numpad_hyper.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/m_chords_hyper.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/quot_dquot.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/scln_coln.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/u_arrows_gui.c create mode 100644 keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/w_media_meh.c diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h b/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h index e188d95d5..a0ba655ed 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h @@ -6,12 +6,15 @@ #undef TAPPING_TERM -#define TAPPING_TERM 200 +#define TAPPING_TERM 175 #undef DEBOUNCE -#define DEBOUNCE 10 +#define DEBOUNCE 15 #undef IGNORE_MOD_TAP_INTERRUPT +#define IGNORE_MOD_TAP_INTERRUPT + +#define RGB_DISABLE_WHEN_USB_SUSPENDED true #undef FORCE_NKRO #define FORCE_NKRO @@ -20,12 +23,13 @@ #define TAPPING_TOGGLE 5 #define LEADER_TIMEOUT 1000 -#define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD #define QMK_KEYS_PER_SCAN 4 #define DANCING_TERM 175 #define ONESHOT_TAP_TOGGLE 5 + +#undef ONESHOT_TIMEOUT #define ONESHOT_TIMEOUT 5000 #define COMBO_COUNT 4 diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/gulpfile.js b/keyboards/ergodox_ez/keymaps/hacker_dvorak/gulpfile.js index 23f19d18a..81a4e93fd 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/gulpfile.js +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/gulpfile.js @@ -1,19 +1,22 @@ -let gulp = require('gulp'); -let run = require('gulp-run-command').default; +const gulp = require('gulp'); +const run = require('gulp-run-command').default; -gulp.task('clean', run('rm -rf ../../../../.build')); +const ROOT_DIR = '../../../../'; +const BUILD_DIR = `${ROOT_DIR}.build`; +const HACKER_DVORAK_DIR = './**/*'; -gulp.task('build', ['clean'], run('make -C ../../../../ ergodox_ez:hacker_dvorak', { - ignoreErrors: true +const CLEAN_CMD = `rm -rf ${BUILD_DIR}`; +const BUILD_CMD = `make -C ${ROOT_DIR} ergodox_ez:hacker_dvorak`; + +gulp.task('clean', run(CLEAN_CMD)); + +gulp.task('build', gulp.series('clean', run(BUILD_CMD, { + ignoreErrors: true +}))); + +gulp.task('watch', gulp.series('build', () => { + gulp.watch(HACKER_DVORAK_DIR, gulp.series('build')); })); -gulp.task('watch', ['build'], () => { - gulp.watch([ - 'keymap.c', - 'config.h', - 'rules.mk', - ], ['build']); -}); - -gulp.task('default', ['watch']); +gulp.task('default', gulp.series('watch')); diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/hacker_dvorak.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/hacker_dvorak.c index 65878a67c..71cf1053a 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/hacker_dvorak.c +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/hacker_dvorak.c @@ -13,21 +13,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// // TAB | MOD TAP: ALT+SHIFT | MOD TAP: CTRL+ALT | MOD TAP: CTRL+SHIFT | P | Y | // // | | | | | | // - KC_TAB, TD(NONE_LEAD), TD(QUOT_DQUO), TD(DOT_COMM), ALL_T(KC_P), MEH_T(KC_Y), DYN_MACRO_PLAY1, // + KC_TAB, TD(NONE_LEAD), TD(QUOT_DQUO), TD(DOT_COMM), LCG_T(KC_P), LAG_T(KC_Y), DYN_MACRO_PLAY1, // // | LEAD | " | , | | | // - // | TAP DANCE: NONE | TAP DANCE: ' | TAP DANCE: . | MOD TAP: HYPER | MOD TAP: MEH | // + // | TAP DANCE: NONE | TAP DANCE: ' | TAP DANCE: . | MOD TAP: CTRL+GUI | MOD TAP: ALT+GUI | // //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------| PLAY DYNAMIC MACRO 1 // - // | MOD TAP: ALT | MOD TAP: CTRL | LAYER TAP: SHIFT | LAYER TAP: ARROW KEYS | MOD TAP: GUI | // + // | MOD TAP: ALT | MOD TAP: CTRL | LAYER TAP: SHIFT | M TAP DANCE: ARROWS/GUI | MOD TAP: SHIFT+GUI | // // | | | | Ü | | // - TD(EQL_PLUS), ALT_T(KC_A), CTL_T(KC_O), SFT_T(KC_E), LT(ARROWS, KC_U), LGUI_T(KC_I), //-----------------------// + TD(EQL_PLUS), LALT_T(KC_A), LCTL_T(KC_O), LSFT_T(KC_E), TD(U_ARR_GUI), SGUI_T(KC_I), //-----------------------// // + | Á | Ó | É | Ú | Í | // // TAP DANCE: = | TAP DANCE: A | TAP DANCE: O | TAP DANCE: E | TAP DANCE: U | TAP DANCE: I | // //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------| META // // STOP RECORDING | MOD TAP: GUI+SHIFT+ALT | Q | J | K | X | // // | | | | | | // - DYN_REC_STOP, TD(SCLN_COLN), SGUI_T(KC_Q), LT(MEDIA_FN, KC_J), LT(NUMPAD, KC_K), LCAG_T(KC_X), KC_LGUI, // + DYN_REC_STOP, TD(SCLN_COLN), LCAG_T(KC_Q), TD(J_MED_MEH), TD(K_NUM_HYP), LCSG_T(KC_X), KC_LGUI, // // | : | | | | | // - // DYNAMIC MACRO | TAP DANCE: ; | MOD TAP: SHIFT+GUI | LAYER TAP: MEDIA/F-KEYS | LAYER TAP: ATM NUMPAD | MOD TAP: CTL+ALT+GUI | // + // DYNAMIC MACRO | TAP DANCE: ; | MOD TAP: SHIFT+GUI | M TAP DANCE: MEDIA/MEH | M TAP DANCE: ATM/HYPER | MOD TAP: CTL+SHIFT+GUI | // //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// // LAYERS SWITCHER | APPLICATION MENU | | | // // | | | | SCROLL // @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //-------------------------+-------------------------+------------------------// // | | HOME // // | | // - /* SPACE | BACKSPACE */ KC_HOME, // + /* SPACE | BACKSPACE */ KC_HOME, // // | | // // | | // KC_SPC, KC_BSPC, //-----------------------// @@ -69,19 +69,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// // | | | | | | // // | | | | | | // - DYN_MACRO_PLAY2, MEH_T(KC_F), ALL_T(KC_G), C_S_T(KC_C), LCA_T(KC_R), LAS_T(KC_L), TD(SLSH_BSLS), // + DYN_MACRO_PLAY2, LAG_T(KC_F), LCG_T(KC_G), C_S_T(KC_C), LCA_T(KC_R), LAS_T(KC_L), TD(SLSH_BSLS), // // | | | | | | // // | | | | | | // // |-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// // | | | | | | // // | | | | | | // - /*-----------------------*/ LGUI_T(KC_D), LT(MOUSE, KC_H), SFT_T(KC_T), CTL_T(KC_N), ALT_T(KC_S), TD(MINS_UNDS), // + /*-----------------------*/ SGUI_T(KC_D), TD(H_MOU_GUI), LSFT_T(KC_T), LCTL_T(KC_N), LALT_T(KC_S), TD(MINS_UNDS), // // | | | | | | // // | | | | | | // // |-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// // | | | | | | // // | | | | | | // - KC_LGUI, LCAG_T(KC_B), LT(HYPER, KC_M), LT(MEDIA_FN, KC_W), SGUI_T(KC_V), LGAS_T(KC_Z), COMPOSE, // + KC_LGUI, LCSG_T(KC_B), TD(M_CHO_HYP), TD(W_MED_MEH), LCAG_T(KC_V), LASG_T(KC_Z), COMPOSE, // // | | | | | | // // | | | | | | ⎄ // //------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------// @@ -163,7 +163,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_RBRC, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, // right thumb - KC_MS_BTN5, MO(HYPER), + KC_MS_BTN5, MO(CHORD), KC_MS_BTN4, KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1 ), @@ -295,10 +295,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right thumb XXXXXXX, XXXXXXX, XXXXXXX, - RGB_GREEN, XXXXXXX, XXXXXXX + XXXXXXX, XXXXXXX, XXXXXXX ), - [HYPER] = LAYOUT_ergodox( + [CHORD] = LAYOUT_ergodox( // left hand XXXXXXX, HYPR(KC_F1), HYPR(KC_F2), HYPR(KC_F3), HYPR(KC_F4), HYPR(KC_F5), XXXXXXX, XXXXXXX, HYPR(KC_F6), HYPR(KC_F7), HYPR(KC_F8), HYPR(KC_F9), HYPR(KC_F10), XXXXXXX, diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/keycodes/aliases_definitions.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/keycodes/aliases_definitions.c index e5eba1820..323358357 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/keycodes/aliases_definitions.c +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/keycodes/aliases_definitions.c @@ -1,5 +1,13 @@ -// Keycode aliases +// Compound keycode aliases #define SCTL(kc) LSFT(LCTL(kc)) // Modifier keys: SHIFT+CTRL+kc combination. -#define LGAS_T(kc) MT(MOD_LGUI | MOD_LALT | MOD_LSFT, kc) // Mod tap: kc when tapped, GUI+ALT+SHIFT when held. -#define LAS_T(kc) MT(MOD_LALT | MOD_LSFT, kc) // Mod tap: kc when tapped, ALT+SHIFT whin held. + +// Tap +#define LASG_T(kc) MT(MOD_LGUI | MOD_LALT | MOD_LSFT, kc) // Mod tap: kc when tapped, GUI+ALT+SHIFT when held. +#define LCSG_T(kc) MT(MOD_LGUI | MOD_LSFT | MOD_LCTL, kc) // Mod tap: kc when tapped, GUI+CTL+SHIFT when held. + +#define LCG_T(kc) MT(MOD_LCTL | MOD_LGUI, kc) // Mod tap: kc when tapped, CTL+GUI when held. +#define LAS_T(kc) MT(MOD_LALT | MOD_LSFT, kc) // Mod tap: kc when tapped, ALT+SHIFT when held. +#define LAG_T(kc) MT(MOD_LALT | MOD_LGUI, kc) // Mod tap: kc when tapped, ALT+GUI when held. + +// Others #define COMPOSE KC_RALT // Compose key (used to input characters like á, ñ, ü). diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/keycodes/custom_keycodes.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/keycodes/custom_keycodes.c index 368062172..338910b53 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/keycodes/custom_keycodes.c +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/keycodes/custom_keycodes.c @@ -1,7 +1,6 @@ // Define custom user keycodes: enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // Can always be here. - RGB_GREEN, // To set default RGB layer as green once. MY_CUSTOM_MACRO, // Custom macro example. MY_OTHER_MACRO, // Custom macro example. DYNAMIC_MACRO_RANGE // Should always be the last. diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/keymap.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/keymap.c index af06d2bd8..e953f06de 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/keymap.c +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/keymap.c @@ -9,6 +9,15 @@ #include "tap_dance/tap_dances.c" #include "user/matrix_scan_user.c" #include "tap_dance/mod_tap_layer_dances/none_lead.c" +#include "tap_dance/mod_tap_layer_dances/dot_comm.c" +#include "tap_dance/mod_tap_layer_dances/quot_dquot.c" +#include "tap_dance/mod_tap_layer_dances/scln_coln.c" +#include "tap_dance/mod_tap_layer_dances/u_arrows_gui.c" +#include "tap_dance/mod_tap_layer_dances/h_mouse_gui.c" +#include "tap_dance/mod_tap_layer_dances/j_media_meh.c" +#include "tap_dance/mod_tap_layer_dances/w_media_meh.c" +#include "tap_dance/mod_tap_layer_dances/k_numpad_hyper.c" +#include "tap_dance/mod_tap_layer_dances/m_chords_hyper.c" #include "tap_dance/tap_dance_actions.c" #include "keycodes/custom_keycodes.c" #include "dynamic_macro.h" // Includes dynamic macro definitions, needed *after* the custom keycodes. diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/layers/layers_definitions.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/layers/layers_definitions.c index f190e4f6f..f252bc802 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/layers/layers_definitions.c +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/layers/layers_definitions.c @@ -7,6 +7,6 @@ enum layers { // Hacker Dvorak keyboard layers: NUMPAD = 5, // * ATM style numpad with symbols and letters that should suffice to input any numeric literal. LAYERS = 6, // * Layer switcher used to change between DVORAK, PLOVER and GAMING layers. MEDIA_FN = 7, // * Media, RGB and function keys from F1 to F24 in symmetric fashion. - HYPER = 8, // * Hot keys layer (uses hyper + F1 .. F24) suitable for global shortcut tasks. + CHORD = 8, // * Hot keys layer (uses hyper + F1 .. F24) suitable for global shortcut tasks. FIRMWARE = 9 // * Layer with firmware related functionality, like the reset and EEPROM keys. }; diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/leader/leader_setup.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/leader/leader_setup.c index 1e89c4bfc..c22670a05 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/leader/leader_setup.c +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/leader/leader_setup.c @@ -1,14 +1 @@ LEADER_EXTERNS(); - -void qk_leader_start(void) { - if (!leading) { - leading = true; - leader_time = timer_read(); - leader_sequence_size = 0; - leader_sequence[0] = 0; - leader_sequence[1] = 0; - leader_sequence[2] = 0; - leader_sequence[3] = 0; - leader_sequence[4] = 0; - } -} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/package.json b/keyboards/ergodox_ez/keymaps/hacker_dvorak/package.json index 116911e46..173bcd5a8 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/package.json +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/package.json @@ -9,7 +9,7 @@ "author": "SalchiPapa", "license": "GPL-2.0", "dependencies": { - "gulp": "^3.9.1", + "gulp": "^4.0.0", "gulp-run-command": "0.0.9" } } diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk b/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk index 51a9ff0d4..aa13f98bd 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk @@ -1,6 +1,7 @@ # Set any rules.mk overrides for your specific keymap here. # See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file +LINK_TIME_OPTIMIZATION_ENABLE = yes NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work TAP_DANCE_ENABLE = yes MOUSEKEY_ENABLE = yes # Mouse keys(+4700b). diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/dot_comm.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/dot_comm.c new file mode 100644 index 000000000..cbfbcdaf9 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/dot_comm.c @@ -0,0 +1,41 @@ +//instanalize an instance of 'tap' for the Dot - Comma tap dance. +static tap dot_comm_state = { + .is_press_action = true, + .state = 0 +}; + +void dot_comm_finished(qk_tap_dance_state_t *state, void *user_data) { + dot_comm_state.state = current_dance(state); + switch (dot_comm_state.state) { + case SINGLE_TAP: + register_code(KC_DOT); + break; + + case SINGLE_HOLD: + register_code(KC_LCTL); + register_code(KC_LSFT); + break; + + case DOUBLE_TAP: + register_code(KC_COMM); + break; + } +} + +void dot_comm_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (dot_comm_state.state) { + case SINGLE_TAP: + unregister_code(KC_DOT); + break; + + case SINGLE_HOLD: + unregister_code(KC_LCTL); + unregister_code(KC_LSFT); + break; + + case DOUBLE_TAP: + unregister_code(KC_COMM); + break; + } + dot_comm_state.state = 0; +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/h_mouse_gui.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/h_mouse_gui.c new file mode 100644 index 000000000..76dda6eb3 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/h_mouse_gui.c @@ -0,0 +1,39 @@ +//instanalize an instance of 'tap' for the H - Mouse - Gui tap dance. +static tap h_mouse_gui_state = { + .is_press_action = true, + .state = 0 +}; + +void h_mouse_gui_finished(qk_tap_dance_state_t *state, void *user_data) { + h_mouse_gui_state.state = current_dance(state); + switch (h_mouse_gui_state.state) { + case SINGLE_TAP: + register_code(KC_H); + break; + + case SINGLE_HOLD: + layer_on(MOUSE); + break; + + case DOUBLE_HOLD: + register_code(KC_LGUI); + break; + } +} + +void h_mouse_gui_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (h_mouse_gui_state.state) { + case SINGLE_TAP: + unregister_code(KC_H); + break; + + case SINGLE_HOLD: + layer_off(MOUSE); + break; + + case DOUBLE_HOLD: + unregister_code(KC_LGUI); + break; + } + h_mouse_gui_state.state = 0; +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/j_media_meh.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/j_media_meh.c new file mode 100644 index 000000000..daf7be1f6 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/j_media_meh.c @@ -0,0 +1,43 @@ +//instanalize an instance of 'tap' for the J - Media - Meh tap dance. +static tap j_media_meh_state = { + .is_press_action = true, + .state = 0 +}; + +void j_media_meh_finished(qk_tap_dance_state_t *state, void *user_data) { + j_media_meh_state.state = current_dance(state); + switch (j_media_meh_state.state) { + case SINGLE_TAP: + register_code(KC_J); + break; + + case SINGLE_HOLD: + layer_on(MEDIA_FN); + break; + + case DOUBLE_HOLD: + register_code(KC_LCTL); + register_code(KC_LSFT); + register_code(KC_LALT); + break; + } +} + +void j_media_meh_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (j_media_meh_state.state) { + case SINGLE_TAP: + unregister_code(KC_J); + break; + + case SINGLE_HOLD: + layer_off(MEDIA_FN); + break; + + case DOUBLE_HOLD: + unregister_code(KC_LCTL); + unregister_code(KC_LSFT); + unregister_code(KC_LALT); + break; + } + j_media_meh_state.state = 0; +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/k_numpad_hyper.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/k_numpad_hyper.c new file mode 100644 index 000000000..609e9f553 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/k_numpad_hyper.c @@ -0,0 +1,45 @@ +//instanalize an instance of 'tap' for the K - Numpad - Hyper tap dance. +static tap k_numpad_hyper_state = { + .is_press_action = true, + .state = 0 +}; + +void k_numpad_hyper_finished(qk_tap_dance_state_t *state, void *user_data) { + k_numpad_hyper_state.state = current_dance(state); + switch (k_numpad_hyper_state.state) { + case SINGLE_TAP: + register_code(KC_K); + break; + + case SINGLE_HOLD: + layer_on(NUMPAD); + break; + + case DOUBLE_HOLD: + register_code(KC_LCTL); + register_code(KC_LSFT); + register_code(KC_LALT); + register_code(KC_LGUI); + break; + } +} + +void k_numpad_hyper_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (k_numpad_hyper_state.state) { + case SINGLE_TAP: + unregister_code(KC_K); + break; + + case SINGLE_HOLD: + layer_off(NUMPAD); + break; + + case DOUBLE_HOLD: + unregister_code(KC_LCTL); + unregister_code(KC_LSFT); + unregister_code(KC_LALT); + unregister_code(KC_LGUI); + break; + } + k_numpad_hyper_state.state = 0; +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/m_chords_hyper.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/m_chords_hyper.c new file mode 100644 index 000000000..e7df3aef1 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/m_chords_hyper.c @@ -0,0 +1,45 @@ +//instanalize an instance of 'tap' for the M - Chords - Hyper tap dance. +static tap m_chords_hyper_state = { + .is_press_action = true, + .state = 0 +}; + +void m_chords_hyper_finished(qk_tap_dance_state_t *state, void *user_data) { + m_chords_hyper_state.state = current_dance(state); + switch (m_chords_hyper_state.state) { + case SINGLE_TAP: + register_code(KC_M); + break; + + case SINGLE_HOLD: + layer_on(CHORD); + break; + + case DOUBLE_HOLD: + register_code(KC_LCTL); + register_code(KC_LSFT); + register_code(KC_LALT); + register_code(KC_LGUI); + break; + } +} + +void m_chords_hyper_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (m_chords_hyper_state.state) { + case SINGLE_TAP: + unregister_code(KC_M); + break; + + case SINGLE_HOLD: + layer_off(CHORD); + break; + + case DOUBLE_HOLD: + unregister_code(KC_LCTL); + unregister_code(KC_LSFT); + unregister_code(KC_LALT); + unregister_code(KC_LGUI); + break; + } + m_chords_hyper_state.state = 0; +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/none_lead.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/none_lead.c index 6debc1ce4..0ba31cec8 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/none_lead.c +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/none_lead.c @@ -1,7 +1,7 @@ //instanalize an instance of 'tap' for the None - Lead tap dance. static tap none_lead_state = { - .is_press_action = true, - .state = 0 + .is_press_action = true, + .state = 0 }; void none_lead_finished(qk_tap_dance_state_t *state, void *user_data) { diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/quot_dquot.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/quot_dquot.c new file mode 100644 index 000000000..ac6da9e00 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/quot_dquot.c @@ -0,0 +1,41 @@ +//instanalize an instance of 'tap' for the Quote - Double Quote tap dance. +static tap quot_dquot_state = { + .is_press_action = true, + .state = 0 +}; + +void quot_dquot_finished(qk_tap_dance_state_t *state, void *user_data) { + quot_dquot_state.state = current_dance(state); + switch (quot_dquot_state.state) { + case SINGLE_TAP: + register_code(KC_QUOT); + break; + + case SINGLE_HOLD: + register_code(KC_LCTL); + register_code(KC_LALT); + break; + + case DOUBLE_TAP: + register_code16(KC_DQUO); + break; + } +} + +void quot_dquot_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (quot_dquot_state.state) { + case SINGLE_TAP: + unregister_code(KC_QUOT); + break; + + case SINGLE_HOLD: + unregister_code(KC_LCTL); + unregister_code(KC_LALT); + break; + + case DOUBLE_TAP: + unregister_code16(KC_DQUO); + break; + } + quot_dquot_state.state = 0; +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/scln_coln.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/scln_coln.c new file mode 100644 index 000000000..513c93266 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/scln_coln.c @@ -0,0 +1,43 @@ +//instanalize an instance of 'tap' for the Semicolon - Colon tap dance. +static tap scln_coln_state = { + .is_press_action = true, + .state = 0 +}; + +void scln_coln_finished(qk_tap_dance_state_t *state, void *user_data) { + scln_coln_state.state = current_dance(state); + switch (scln_coln_state.state) { + case SINGLE_TAP: + register_code(KC_SCLN); + break; + + case SINGLE_HOLD: + register_code(KC_LALT); + register_code(KC_LSFT); + register_code(KC_LGUI); + break; + + case DOUBLE_TAP: + register_code16(KC_COLN); + break; + } +} + +void scln_coln_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (scln_coln_state.state) { + case SINGLE_TAP: + unregister_code(KC_SCLN); + break; + + case SINGLE_HOLD: + unregister_code(KC_LALT); + unregister_code(KC_LSFT); + unregister_code(KC_LGUI); + break; + + case DOUBLE_TAP: + unregister_code16(KC_COLN); + break; + } + scln_coln_state.state = 0; +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/u_arrows_gui.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/u_arrows_gui.c new file mode 100644 index 000000000..e57502a79 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/u_arrows_gui.c @@ -0,0 +1,39 @@ +//instanalize an instance of 'tap' for the U - Arrows - Gui tap dance. +static tap u_arrows_gui_state = { + .is_press_action = true, + .state = 0 +}; + +void u_arrows_gui_finished(qk_tap_dance_state_t *state, void *user_data) { + u_arrows_gui_state.state = current_dance(state); + switch (u_arrows_gui_state.state) { + case SINGLE_TAP: + register_code(KC_U); + break; + + case SINGLE_HOLD: + layer_on(ARROWS); + break; + + case DOUBLE_HOLD: + register_code(KC_LGUI); + break; + } +} + +void u_arrows_gui_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (u_arrows_gui_state.state) { + case SINGLE_TAP: + unregister_code(KC_U); + break; + + case SINGLE_HOLD: + layer_off(ARROWS); + break; + + case DOUBLE_HOLD: + unregister_code(KC_LGUI); + break; + } + u_arrows_gui_state.state = 0; +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/w_media_meh.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/w_media_meh.c new file mode 100644 index 000000000..c26980526 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/mod_tap_layer_dances/w_media_meh.c @@ -0,0 +1,43 @@ +//instanalize an instance of 'tap' for the W - Media - Meh tap dance. +static tap w_media_meh_state = { + .is_press_action = true, + .state = 0 +}; + +void w_media_meh_finished(qk_tap_dance_state_t *state, void *user_data) { + w_media_meh_state.state = current_dance(state); + switch (w_media_meh_state.state) { + case SINGLE_TAP: + register_code(KC_W); + break; + + case SINGLE_HOLD: + layer_on(MEDIA_FN); + break; + + case DOUBLE_HOLD: + register_code(KC_LCTL); + register_code(KC_LSFT); + register_code(KC_LALT); + break; + } +} + +void w_media_meh_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (w_media_meh_state.state) { + case SINGLE_TAP: + unregister_code(KC_W); + break; + + case SINGLE_HOLD: + layer_off(MEDIA_FN); + break; + + case DOUBLE_HOLD: + unregister_code(KC_LCTL); + unregister_code(KC_LSFT); + unregister_code(KC_LALT); + break; + } + w_media_meh_state.state = 0; +} diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dance_actions.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dance_actions.c index 550e1f7c8..59e3e2b0d 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dance_actions.c +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dance_actions.c @@ -1,20 +1,26 @@ // Register the double tap dances: qk_tap_dance_action_t tap_dance_actions[] = { - [EQL_PLUS] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_PLUS), - [MINS_UNDS] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_UNDS), - [SLSH_BSLS] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_BSLS), - [GRV_TILD] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, KC_TILD), - [QUOT_DQUO] = ACTION_TAP_DANCE_DOUBLE(KC_QUOT, KC_DQUO), - [SCLN_COLN] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_COLN), - [ASTR_CIRC] = ACTION_TAP_DANCE_DOUBLE(KC_ASTR, KC_CIRC), - [APMR_PIPE] = ACTION_TAP_DANCE_DOUBLE(KC_AMPR, KC_PIPE), - [EXLM_QUES] = ACTION_TAP_DANCE_DOUBLE(KC_EXLM, KC_QUES), - [HASH_PERC] = ACTION_TAP_DANCE_DOUBLE(KC_HASH, KC_PERC), - [AT_DLR] = ACTION_TAP_DANCE_DOUBLE(KC_AT, KC_DLR), - [LPRN_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_LPRN, KC_LBRC), - [RPRN_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_RPRN, KC_RBRC), - [LCBR_LABK] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR, KC_LABK), - [RCBR_RABK] = ACTION_TAP_DANCE_DOUBLE(KC_RCBR, KC_RABK), - [DOT_COMM] = ACTION_TAP_DANCE_DOUBLE(KC_DOT, KC_COMM), - [NONE_LEAD] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, none_lead_finished, none_lead_reset, DANCING_TERM) + [EQL_PLUS] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_PLUS), + [MINS_UNDS] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_UNDS), + [SLSH_BSLS] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_BSLS), + [GRV_TILD] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, KC_TILD), + [ASTR_CIRC] = ACTION_TAP_DANCE_DOUBLE(KC_ASTR, KC_CIRC), + [APMR_PIPE] = ACTION_TAP_DANCE_DOUBLE(KC_AMPR, KC_PIPE), + [EXLM_QUES] = ACTION_TAP_DANCE_DOUBLE(KC_EXLM, KC_QUES), + [HASH_PERC] = ACTION_TAP_DANCE_DOUBLE(KC_HASH, KC_PERC), + [AT_DLR] = ACTION_TAP_DANCE_DOUBLE(KC_AT, KC_DLR), + [LPRN_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_LPRN, KC_LBRC), + [RPRN_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_RPRN, KC_RBRC), + [LCBR_LABK] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR, KC_LABK), + [RCBR_RABK] = ACTION_TAP_DANCE_DOUBLE(KC_RCBR, KC_RABK), + [SCLN_COLN] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, scln_coln_finished, scln_coln_reset, DANCING_TERM), + [QUOT_DQUO] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, quot_dquot_finished, quot_dquot_reset, DANCING_TERM), + [DOT_COMM] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, dot_comm_finished, dot_comm_reset, DANCING_TERM), + [NONE_LEAD] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, none_lead_finished, none_lead_reset, DANCING_TERM), + [U_ARR_GUI] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, u_arrows_gui_finished, u_arrows_gui_reset, DANCING_TERM), + [H_MOU_GUI] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, h_mouse_gui_finished, h_mouse_gui_reset, DANCING_TERM), + [J_MED_MEH] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, j_media_meh_finished, j_media_meh_reset, DANCING_TERM), + [W_MED_MEH] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, w_media_meh_finished, w_media_meh_reset, DANCING_TERM), + [K_NUM_HYP] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, k_numpad_hyper_finished, k_numpad_hyper_reset, DANCING_TERM), + [M_CHO_HYP] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, m_chords_hyper_finished, m_chords_hyper_reset, DANCING_TERM), }; diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dances.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dances.c index 3d4469872..d05a71d7e 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dances.c +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/tap_dance/tap_dances.c @@ -4,71 +4,95 @@ // Mod tap dances: // | | | | | // enum tap_dances { //--------------------------------------------------------------------------------------------// // | | | | | // - EQL_PLUS = 0, // = | + | | | | // + EQL_PLUS = 0, // = | | + | | | // // | | | | | // //--------------------------------------------------------------------------------------------// // | | | | | // - MINS_UNDS = 1, // - | _ | | | | // + MINS_UNDS = 1, // - | | _ | | | // // | | | | | // //--------------------------------------------------------------------------------------------// // | | | | | // - SLSH_BSLS = 2, // / | \ | | | | // + SLSH_BSLS = 2, // / | | \ | | | // // | | | | | // //--------------------------------------------------------------------------------------------// // | | | | | // - GRV_TILD = 3, // ` | ~ | | | | // + GRV_TILD = 3, // ` | | ~ | | | // // | | | | | // //--------------------------------------------------------------------------------------------// // | | | | | // - QUOT_DQUO = 4, // ' | " | | | | // + QUOT_DQUO = 4, // ' | CTRL+ALT | " | | | // // | | | | | // //--------------------------------------------------------------------------------------------// // | | | | | // - SCLN_COLN = 5, // ; | : | | | | // + SCLN_COLN = 5, // ; |ALT+SHIFT+META | : | | | // // | | | | | // //--------------------------------------------------------------------------------------------// // | | | | | // - ASTR_CIRC = 6, // * | ^ | | | | // + ASTR_CIRC = 6, // * | | ^ | | | // // | | | | | // //--------------------------------------------------------------------------------------------// // | | | | | // - APMR_PIPE = 7, // & | | | | | | // + APMR_PIPE = 7, // & | | | | | | // // | | | | | // //--------------------------------------------------------------------------------------------// // | | | | | // - EXLM_QUES = 8, // ! | ? | | | | // + EXLM_QUES = 8, // ! | | ? | | | // // | | | | | // //--------------------------------------------------------------------------------------------// // | | | | | // - HASH_PERC = 9, // # | % | | | | // + HASH_PERC = 9, // # | | % | | | // // | | | | | // //--------------------------------------------------------------------------------------------// // | | | | | // - AT_DLR = 10, // @ | $ | | | | // + AT_DLR = 10, // @ | | $ | | | // // | | | | | // //--------------------------------------------------------------------------------------------// // | | | | | // - LPRN_LBRC = 11, // ( | [ | | | | // + LPRN_LBRC = 11, // ( | | [ | | | // // | | | | | // //--------------------------------------------------------------------------------------------// // | | | | | // - RPRN_RBRC = 12, // ) | ] | | | | // + RPRN_RBRC = 12, // ) | | ] | | | // // | | | | | // //--------------------------------------------------------------------------------------------// // | | | | | // - LCBR_LABK = 13, // { | < | | | | // + LCBR_LABK = 13, // { | | < | | | // // | | | | | // //--------------------------------------------------------------------------------------------// // | | | | | // - RCBR_RABK = 14, // } | > | | | | // + RCBR_RABK = 14, // } | | > | | | // // | | | | | // //--------------------------------------------------------------------------------------------// // | | | | | // - DOT_COMM = 15, // . | , | | | | // + DOT_COMM = 15, // . | CTRL+SHIFT | , | | | // // | | | | | // //--------------------------------------------------------------------------------------------// // | | | | | // - NONE_LEAD = 16, // NONE | ALT+SHIFT | LEAD | | | // + NONE_LEAD = 16, // NONE | ALT+SHIFT | LEAD | | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + U_ARR_GUI = 17, // U | ARROWS | | GUI | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + H_MOU_GUI = 18, // H | MOUSE | | GUI | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + J_MED_MEH = 19, // J | MEDIA_FN | | MEH | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + W_MED_MEH = 20, // W | MEDIA_FN | | MEH | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + K_NUM_HYP = 21, // K | NUMPAD | | HYPER | | // + // | | | | | // + //--------------------------------------------------------------------------------------------// + // | | | | | // + M_CHO_HYP = 22, // M | CHORD | | HYPER | | // // | | | | | // //--------------------------------------------------------------------------------------------// }; diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/layer_set_state_user.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/layer_set_state_user.c index e2eeed6fa..c0b3b9c99 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/layer_set_state_user.c +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/layer_set_state_user.c @@ -91,7 +91,7 @@ uint32_t layer_state_set_user(uint32_t state) { break; - case HYPER: + case CHORD: rgblight_sethsv_noeeprom_magenta(); rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2); From 4a43a947bd190c9fc859faa5df8aa26fa7feb5c9 Mon Sep 17 00:00:00 2001 From: jotix <47826561+jotix@users.noreply.github.com> Date: Wed, 19 Jun 2019 02:47:54 -0300 Subject: [PATCH 237/341] [Keymap] Update Jotix keymap (#6154) * jotix ortho_4x12_layout * jotix ortho_4x12_layout * add KC_CAPS to raise --- layouts/community/ortho_4x12/jotix/keymap.c | 28 ++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/layouts/community/ortho_4x12/jotix/keymap.c b/layouts/community/ortho_4x12/jotix/keymap.c index 1eb82ff16..e5f539181 100644 --- a/layouts/community/ortho_4x12/jotix/keymap.c +++ b/layouts/community/ortho_4x12/jotix/keymap.c @@ -37,38 +37,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* lower * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | vol- | mute | vol+ | caps | home | pgup | - | = | [ | ] | \ | + * | | vol- | mute | vol+ | | | | | | | | | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | prev | play | next | del | end | pgdn | ` | | | | | + * | | prev | play | next | | | | | | | | | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * | | | | | | | | | | | | | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ */ [_LOWER] = LAYOUT_ortho_4x12 ( - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - _______, KC_VOLD, KC_MUTE, KC_VOLU, KC_CAPS, KC_HOME, KC_PGUP, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_DEL, KC_END, KC_PGDN, KC_GRV, _______, _______, _______, _______, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* raise * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | del | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * | caps | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | F7 | F8 | F9 | F10 | F11 | F12 | ~ | | | | | + * | | F7 | F8 | F9 | F10 | F11 | F12 | _ | + | { | } | | | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | | | | | | | | | | | | + * | | | | | | | | | home | pgdn | pgup | end | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ */ [_RAISE] = LAYOUT_ortho_4x12 ( - _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TILD, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END ), }; From a825bbf5eac56ed7358d71d952ba4d795bc1b1ef Mon Sep 17 00:00:00 2001 From: Jimmy Multani Date: Wed, 19 Jun 2019 01:54:55 -0400 Subject: [PATCH 238/341] [Keyboard] Fix incorrect RGBLED_NUM value (#6148) KBD67 Rev 2 has 20 LEDs, not 18. This was causing 2 of the underglow LEDs to remain off. This fix updates that. --- keyboards/kbdfans/kbd67/rev2/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/kbdfans/kbd67/rev2/config.h b/keyboards/kbdfans/kbd67/rev2/config.h index 97945eec8..d4e200fa8 100644 --- a/keyboards/kbdfans/kbd67/rev2/config.h +++ b/keyboards/kbdfans/kbd67/rev2/config.h @@ -56,7 +56,7 @@ along with this program. If not, see . #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 18 +#define RGBLED_NUM 20 #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 From 5f0ab5a24b4ec9ea01a5fd95bda9315ac6e96142 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 19 Jun 2019 10:56:20 -0700 Subject: [PATCH 239/341] [Keyboard] Planck Layout Macro Refactor, Part II (#6156) * Move layout macros to revision folders * Update Planck EZ layout macros Planck EZ only supports one layout (centered 2u spacebar). Deleted all the other macros. * Flesh out QMK Configurator support Give each Planck revision its own info.json file. * Readme updates - give each revision its own readme - add the Planck EZ to the main Planck readme * Fix layout macro for Planck EZ Previous matrix didn't compile because the electrical matrix defined a k3b location, which was unused by the physical arguments. Drashna was kind enough to confirm the Planck EZ's matrix for me. Co-authored-by: Drashna Jaelre * Pretend the Planck EZ supports ortho_4x12 layout The hardware doesn't, but doing so prevents CI errors because the default keymap uses LAYOUT_planck_grid. Going to pretend LAYOUT_ortho_4x12 is a valid layout for the Planck EZ. * Update Planck EZ's URL in info.json Co-Authored-By: Drashna Jaelre --- keyboards/planck/ez/ez.h | 97 +++++-------------- keyboards/planck/ez/info.json | 115 ++++++++++++++++++++++ keyboards/planck/ez/readme.md | 15 +++ keyboards/planck/light/info.json | 113 +++++++++++++++++++++- keyboards/planck/light/light.h | 46 +++++++++ keyboards/planck/light/readme.md | 15 +++ keyboards/planck/planck.h | 157 ++++--------------------------- keyboards/planck/readme.md | 2 +- keyboards/planck/rev1/info.json | 115 ++++++++++++++++++++++ keyboards/planck/rev1/readme.md | 13 +++ keyboards/planck/rev1/rev1.h | 49 ++++++++++ keyboards/planck/rev2/info.json | 115 ++++++++++++++++++++++ keyboards/planck/rev2/readme.md | 13 +++ keyboards/planck/rev2/rev2.h | 49 ++++++++++ keyboards/planck/rev3/info.json | 115 ++++++++++++++++++++++ keyboards/planck/rev3/readme.md | 13 +++ keyboards/planck/rev3/rev3.h | 49 ++++++++++ keyboards/planck/rev4/info.json | 115 ++++++++++++++++++++++ keyboards/planck/rev4/readme.md | 13 +++ keyboards/planck/rev4/rev4.h | 49 ++++++++++ keyboards/planck/rev5/info.json | 115 ++++++++++++++++++++++ keyboards/planck/rev5/readme.md | 13 +++ keyboards/planck/rev5/rev5.h | 49 ++++++++++ keyboards/planck/rev6/info.json | 4 +- keyboards/planck/rev6/readme.md | 13 +++ keyboards/planck/rev6/rev6.h | 106 +++++++++++++++++++++ 26 files changed, 1347 insertions(+), 221 deletions(-) create mode 100644 keyboards/planck/ez/info.json create mode 100644 keyboards/planck/ez/readme.md create mode 100644 keyboards/planck/light/readme.md create mode 100644 keyboards/planck/rev1/info.json create mode 100644 keyboards/planck/rev1/readme.md create mode 100644 keyboards/planck/rev1/rev1.h create mode 100644 keyboards/planck/rev2/info.json create mode 100644 keyboards/planck/rev2/readme.md create mode 100644 keyboards/planck/rev2/rev2.h create mode 100644 keyboards/planck/rev3/info.json create mode 100644 keyboards/planck/rev3/readme.md create mode 100644 keyboards/planck/rev3/rev3.h create mode 100644 keyboards/planck/rev4/info.json create mode 100644 keyboards/planck/rev4/readme.md create mode 100644 keyboards/planck/rev4/rev4.h create mode 100644 keyboards/planck/rev5/info.json create mode 100644 keyboards/planck/rev5/readme.md create mode 100644 keyboards/planck/rev5/rev5.h create mode 100644 keyboards/planck/rev6/readme.md diff --git a/keyboards/planck/ez/ez.h b/keyboards/planck/ez/ez.h index a3ca2b6ec..55c403242 100644 --- a/keyboards/planck/ez/ez.h +++ b/keyboards/planck/ez/ez.h @@ -21,87 +21,32 @@ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a \ + k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ ) \ { \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k39, k3a, k3b }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { k36, k37, k38, k33, k34, k35 } \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k3a, k3b, KC_NO }, \ + { k06, k07, k08, k09, k0a, k0b }, \ + { k16, k17, k18, k19, k1a, k1b }, \ + { k26, k27, k28, k29, k2a, k2b }, \ + { k37, k38, k39, k33, k34, k35 } \ } -#define LAYOUT_planck_1x2uR( \ +#define LAYOUT_ortho_4x12( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, KC_NO, k37, k38, k39, k3a, k3b \ +) \ +LAYOUT_planck_1x2uC( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k39, k3a, k3b }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { k36, k37, k38, k33, k34, k35 } \ -} + k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ +) -#define LAYOUT_planck_1x2uL( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k39, k3a, k3b }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { k36, k37, k38, k33, k34, k35 } \ -} - -#define LAYOUT_planck_2x2u( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k39, k3a, k3b }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { k36, k37, k38, k33, k34, k35 } \ -} - -#define LAYOUT_planck_grid( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, KC_NO, k36, k37, k38, k39, k3a \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k39, k3a, KC_NO }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { k36, k37, k38, k33, k34, k35 } \ -} - -#define KEYMAP LAYOUT_planck_grid -#define LAYOUT_ortho_4x12 LAYOUT_planck_grid -#define KC_LAYOUT_ortho_4x12 KC_KEYMAP +#define KEYMAP LAYOUT_ortho_4x12 +#define LAYOUT_planck_mit LAYOUT_planck_1x2uC +#define LAYOUT_planck_grid LAYOUT_ortho_4x12 diff --git a/keyboards/planck/ez/info.json b/keyboards/planck/ez/info.json new file mode 100644 index 000000000..b8382bfe0 --- /dev/null +++ b/keyboards/planck/ez/info.json @@ -0,0 +1,115 @@ +{ + "keyboard_name": "Planck EZ", + "keyboard_folder": "planck/ez", + "url": "https://ergodox-ez.com/pages/planck", + "maintainer": "jackhumbert", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_planck_1x2uC": { + "key_count": 47, + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 3, "y": 1 }, + { "x": 4, "y": 1 }, + { "x": 5, "y": 1 }, + { "x": 6, "y": 1 }, + { "x": 7, "y": 1 }, + { "x": 8, "y": 1 }, + { "x": 9, "y": 1 }, + { "x": 10, "y": 1 }, + { "x": 11, "y": 1 }, + { "x": 0, "y": 2 }, + { "x": 1, "y": 2 }, + { "x": 2, "y": 2 }, + { "x": 3, "y": 2 }, + { "x": 4, "y": 2 }, + { "x": 5, "y": 2 }, + { "x": 6, "y": 2 }, + { "x": 7, "y": 2 }, + { "x": 8, "y": 2 }, + { "x": 9, "y": 2 }, + { "x": 10, "y": 2 }, + { "x": 11, "y": 2 }, + { "x": 0, "y": 3 }, + { "x": 1, "y": 3 }, + { "x": 2, "y": 3 }, + { "x": 3, "y": 3 }, + { "x": 4, "y": 3 }, + { "x": 5, "y": 3, "w": 2 }, + { "x": 7, "y": 3 }, + { "x": 8, "y": 3 }, + { "x": 9, "y": 3 }, + { "x": 10, "y": 3 }, + { "x": 11, "y": 3 } + ] + }, + "LAYOUT_ortho_4x12": { + "key_count": 48, + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 3, "y": 1 }, + { "x": 4, "y": 1 }, + { "x": 5, "y": 1 }, + { "x": 6, "y": 1 }, + { "x": 7, "y": 1 }, + { "x": 8, "y": 1 }, + { "x": 9, "y": 1 }, + { "x": 10, "y": 1 }, + { "x": 11, "y": 1 }, + { "x": 0, "y": 2 }, + { "x": 1, "y": 2 }, + { "x": 2, "y": 2 }, + { "x": 3, "y": 2 }, + { "x": 4, "y": 2 }, + { "x": 5, "y": 2 }, + { "x": 6, "y": 2 }, + { "x": 7, "y": 2 }, + { "x": 8, "y": 2 }, + { "x": 9, "y": 2 }, + { "x": 10, "y": 2 }, + { "x": 11, "y": 2 }, + { "x": 0, "y": 3 }, + { "x": 1, "y": 3 }, + { "x": 2, "y": 3 }, + { "x": 3, "y": 3 }, + { "x": 4, "y": 3 }, + { "x": 5, "y": 3 }, + { "x": 6, "y": 3 }, + { "x": 7, "y": 3 }, + { "x": 8, "y": 3 }, + { "x": 9, "y": 3 }, + { "x": 10, "y": 3 }, + { "x": 11, "y": 3 } + ] + } + } +} diff --git a/keyboards/planck/ez/readme.md b/keyboards/planck/ez/readme.md new file mode 100644 index 000000000..9bd161abd --- /dev/null +++ b/keyboards/planck/ez/readme.md @@ -0,0 +1,15 @@ +# Planck EZ + +![Planck EZ](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/planck/ez/neat-planck-banner.png) + +A variant of the Planck featuring a 2u spacebar and per-key RGB backlighting. + +Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert) +Hardware Supported: Planck EZ +Hardware Availability: [ergodox-ez.com](https://ergodox-ez.com/pages/planck) + +Make example for this keyboard (after setting up your build environment): + + make planck/ez:default + +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). diff --git a/keyboards/planck/light/info.json b/keyboards/planck/light/info.json index 34566f85d..fa8f4c43b 100644 --- a/keyboards/planck/light/info.json +++ b/keyboards/planck/light/info.json @@ -1,4 +1,115 @@ { "keyboard_name": "Planck Light", - "keyboard_folder": "planck/light" + "keyboard_folder": "planck/light", + "url": "https://olkb.com/planck", + "maintainer": "jackhumbert", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_planck_1x2uC": { + "key_count": 47, + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 3, "y": 1 }, + { "x": 4, "y": 1 }, + { "x": 5, "y": 1 }, + { "x": 6, "y": 1 }, + { "x": 7, "y": 1 }, + { "x": 8, "y": 1 }, + { "x": 9, "y": 1 }, + { "x": 10, "y": 1 }, + { "x": 11, "y": 1 }, + { "x": 0, "y": 2 }, + { "x": 1, "y": 2 }, + { "x": 2, "y": 2 }, + { "x": 3, "y": 2 }, + { "x": 4, "y": 2 }, + { "x": 5, "y": 2 }, + { "x": 6, "y": 2 }, + { "x": 7, "y": 2 }, + { "x": 8, "y": 2 }, + { "x": 9, "y": 2 }, + { "x": 10, "y": 2 }, + { "x": 11, "y": 2 }, + { "x": 0, "y": 3 }, + { "x": 1, "y": 3 }, + { "x": 2, "y": 3 }, + { "x": 3, "y": 3 }, + { "x": 4, "y": 3 }, + { "x": 5, "y": 3, "w": 2 }, + { "x": 7, "y": 3 }, + { "x": 8, "y": 3 }, + { "x": 9, "y": 3 }, + { "x": 10, "y": 3 }, + { "x": 11, "y": 3 } + ] + }, + "LAYOUT_ortho_4x12": { + "key_count": 48, + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 3, "y": 1 }, + { "x": 4, "y": 1 }, + { "x": 5, "y": 1 }, + { "x": 6, "y": 1 }, + { "x": 7, "y": 1 }, + { "x": 8, "y": 1 }, + { "x": 9, "y": 1 }, + { "x": 10, "y": 1 }, + { "x": 11, "y": 1 }, + { "x": 0, "y": 2 }, + { "x": 1, "y": 2 }, + { "x": 2, "y": 2 }, + { "x": 3, "y": 2 }, + { "x": 4, "y": 2 }, + { "x": 5, "y": 2 }, + { "x": 6, "y": 2 }, + { "x": 7, "y": 2 }, + { "x": 8, "y": 2 }, + { "x": 9, "y": 2 }, + { "x": 10, "y": 2 }, + { "x": 11, "y": 2 }, + { "x": 0, "y": 3 }, + { "x": 1, "y": 3 }, + { "x": 2, "y": 3 }, + { "x": 3, "y": 3 }, + { "x": 4, "y": 3 }, + { "x": 5, "y": 3 }, + { "x": 6, "y": 3 }, + { "x": 7, "y": 3 }, + { "x": 8, "y": 3 }, + { "x": 9, "y": 3 }, + { "x": 10, "y": 3 }, + { "x": 11, "y": 3 } + ] + } + } } diff --git a/keyboards/planck/light/light.h b/keyboards/planck/light/light.h index a395f30e8..2cf46c2a2 100644 --- a/keyboards/planck/light/light.h +++ b/keyboards/planck/light/light.h @@ -20,4 +20,50 @@ #include "planck.h" #include "rgb_matrix.h" +#define LAYOUT_planck_1x2uC( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3a, k3b } \ +} + +#define LAYOUT_ortho_4x12( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ +} + +// Used to create a keymap using only KC_ prefixed keys +#define LAYOUT_kc( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +LAYOUT_ortho_4x12( \ + KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \ + KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \ + KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \ + KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \ +) + +#define KEYMAP LAYOUT_ortho_4x12 +#define LAYOUT_planck_mit LAYOUT_planck_1x2uC +#define LAYOUT_planck_grid LAYOUT_ortho_4x12 +#define LAYOUT_kc_ortho_4x12 LAYOUT_kc +#define KC_KEYMAP LAYOUT_kc + #endif \ No newline at end of file diff --git a/keyboards/planck/light/readme.md b/keyboards/planck/light/readme.md new file mode 100644 index 000000000..f372e1fcc --- /dev/null +++ b/keyboards/planck/light/readme.md @@ -0,0 +1,15 @@ +# Planck Light + +![Planck Light](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/planck/light/planck_light.jpg) + +A Planck variant sold by Massdrop. Designed for Kailh PG1350 "Choc" switches, the Planck Light Features per-key RGB backlighting and a dual-channel speaker. [More info on qmk.fm](http://qmk.fm/planck/) + +Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert) +Hardware Supported: Planck Light +Hardware Availability: [Massdrop](https://www.massdrop.com/buy/massdrop-x-olkb-planck-light-mechanical-keyboard?mode=guest_open) + +Make example for this keyboard (after setting up your build environment): + + make planck/light:default + +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). diff --git a/keyboards/planck/planck.h b/keyboards/planck/planck.h index 09ac0c607..1beafa776 100644 --- a/keyboards/planck/planck.h +++ b/keyboards/planck/planck.h @@ -5,147 +5,22 @@ #define encoder_update(clockwise) encoder_update_user(uint8_t index, clockwise) -#ifdef KEYBOARD_planck_ez +#if defined(KEYBOARD_planck_ez) #include "ez.h" -#endif - -#ifdef __AVR__ // Planck revs. 1-5 - - #define LAYOUT_planck_1x2uC( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ - ) \ - { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ - { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3a, k3b } \ - } - - #define LAYOUT_ortho_4x12( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ - ) \ - { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ - } - -#elif KEYBOARD_planck_rev6 - - #define LAYOUT_planck_1x2uC( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a, k3b \ - ) \ - { \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k39, k3a, k3b }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { k36, k37, k38, k33, k34, KC_NO } \ - } - - #define LAYOUT_planck_1x2uR( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ - ) \ - { \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k39, k3a, k3b }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { KC_NO, k37, k38, k33, k34, k35 } \ - } - - #define LAYOUT_planck_1x2uL( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k35, k36, k37, k38, k39, k3a, k3b \ - ) \ - { \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k39, k3a, k3b }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { k36, k37, k38, k33, KC_NO, k35 } \ - } - - #define LAYOUT_planck_2x2u( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k35, k37, k38, k39, k3a, k3b \ - ) \ - { \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k39, k3a, k3b }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { KC_NO, k37, k38, k33, KC_NO, k35 } \ - } - - #define LAYOUT_ortho_4x12( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ - ) \ - { \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k39, k3a, k3b }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { k36, k37, k38, k33, k34, k35 } \ - } - -#endif - -// all Planck keyboards - -// Used to create a keymap using only KC_ prefixed keys -#define LAYOUT_kc( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ -) \ -LAYOUT_ortho_4x12( \ - KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \ - KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \ - KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \ - KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \ -) - -#define KEYMAP LAYOUT_ortho_4x12 -#define LAYOUT_planck_mit LAYOUT_planck_1x2uC -#define LAYOUT_planck_grid LAYOUT_ortho_4x12 -#define LAYOUT_kc_ortho_4x12 LAYOUT_kc -#define KC_KEYMAP LAYOUT_kc +#elif defined(KEYBOARD_planck_light) + #include "light.h" +#elif defined(KEYBOARD_planck_rev1) + #include "rev1.h" +#elif defined(KEYBOARD_planck_rev2) + #include "rev2.h" +#elif defined(KEYBOARD_planck_rev3) + #include "rev3.h" +#elif defined(KEYBOARD_planck_rev4) + #include "rev4.h" +#elif defined(KEYBOARD_planck_rev5) + #include "rev5.h" +#elif defined(KEYBOARD_planck_rev6) + #include "rev6.h" +#endif // Planck revisions #endif diff --git a/keyboards/planck/readme.md b/keyboards/planck/readme.md index 94b256c74..0d836563c 100644 --- a/keyboards/planck/readme.md +++ b/keyboards/planck/readme.md @@ -6,7 +6,7 @@ Planck A compact 40% (12x4) ortholinear keyboard kit made and sold by OLKB and Massdrop. [More info on qmk.fm](http://qmk.fm/planck/) Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert) -Hardware Supported: Planck PCB rev1, rev2, rev3, rev4, rev5, rev6; Planck Light +Hardware Supported: Planck PCB rev1, rev2, rev3, rev4, rev5, rev6; Planck Light, Planck EZ Hardware Availability: [OLKB.com](https://olkb.com), [Massdrop](https://www.massdrop.com/buy/planck-mechanical-keyboard?mode=guest_open) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/planck/rev1/info.json b/keyboards/planck/rev1/info.json new file mode 100644 index 000000000..c64cdbfde --- /dev/null +++ b/keyboards/planck/rev1/info.json @@ -0,0 +1,115 @@ +{ + "keyboard_name": "Planck rev 1", + "keyboard_folder": "planck/rev1", + "url": "https://olkb.com/planck", + "maintainer": "jackhumbert", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_planck_1x2uC": { + "key_count": 47, + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 3, "y": 1 }, + { "x": 4, "y": 1 }, + { "x": 5, "y": 1 }, + { "x": 6, "y": 1 }, + { "x": 7, "y": 1 }, + { "x": 8, "y": 1 }, + { "x": 9, "y": 1 }, + { "x": 10, "y": 1 }, + { "x": 11, "y": 1 }, + { "x": 0, "y": 2 }, + { "x": 1, "y": 2 }, + { "x": 2, "y": 2 }, + { "x": 3, "y": 2 }, + { "x": 4, "y": 2 }, + { "x": 5, "y": 2 }, + { "x": 6, "y": 2 }, + { "x": 7, "y": 2 }, + { "x": 8, "y": 2 }, + { "x": 9, "y": 2 }, + { "x": 10, "y": 2 }, + { "x": 11, "y": 2 }, + { "x": 0, "y": 3 }, + { "x": 1, "y": 3 }, + { "x": 2, "y": 3 }, + { "x": 3, "y": 3 }, + { "x": 4, "y": 3 }, + { "x": 5, "y": 3, "w": 2 }, + { "x": 7, "y": 3 }, + { "x": 8, "y": 3 }, + { "x": 9, "y": 3 }, + { "x": 10, "y": 3 }, + { "x": 11, "y": 3 } + ] + }, + "LAYOUT_ortho_4x12": { + "key_count": 48, + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 3, "y": 1 }, + { "x": 4, "y": 1 }, + { "x": 5, "y": 1 }, + { "x": 6, "y": 1 }, + { "x": 7, "y": 1 }, + { "x": 8, "y": 1 }, + { "x": 9, "y": 1 }, + { "x": 10, "y": 1 }, + { "x": 11, "y": 1 }, + { "x": 0, "y": 2 }, + { "x": 1, "y": 2 }, + { "x": 2, "y": 2 }, + { "x": 3, "y": 2 }, + { "x": 4, "y": 2 }, + { "x": 5, "y": 2 }, + { "x": 6, "y": 2 }, + { "x": 7, "y": 2 }, + { "x": 8, "y": 2 }, + { "x": 9, "y": 2 }, + { "x": 10, "y": 2 }, + { "x": 11, "y": 2 }, + { "x": 0, "y": 3 }, + { "x": 1, "y": 3 }, + { "x": 2, "y": 3 }, + { "x": 3, "y": 3 }, + { "x": 4, "y": 3 }, + { "x": 5, "y": 3 }, + { "x": 6, "y": 3 }, + { "x": 7, "y": 3 }, + { "x": 8, "y": 3 }, + { "x": 9, "y": 3 }, + { "x": 10, "y": 3 }, + { "x": 11, "y": 3 } + ] + } + } +} diff --git a/keyboards/planck/rev1/readme.md b/keyboards/planck/rev1/readme.md new file mode 100644 index 000000000..b5561fc1a --- /dev/null +++ b/keyboards/planck/rev1/readme.md @@ -0,0 +1,13 @@ +# Planck + +A compact 40% (12x4) ortholinear keyboard kit made and sold by OLKB and Massdrop. [More info on qmk.fm](http://qmk.fm/planck/) + +Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert) +Hardware Supported: Planck PCB rev1 +Hardware Availability: [OLKB.com](https://olkb.com), [Massdrop](https://www.massdrop.com/buy/planck-mechanical-keyboard?mode=guest_open) + +Make example for this keyboard (after setting up your build environment): + + make planck/rev1:default + +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). diff --git a/keyboards/planck/rev1/rev1.h b/keyboards/planck/rev1/rev1.h new file mode 100644 index 000000000..f81b36b31 --- /dev/null +++ b/keyboards/planck/rev1/rev1.h @@ -0,0 +1,49 @@ +#pragma once + +#include "planck.h" + +#define LAYOUT_planck_1x2uC( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3a, k3b } \ +} + +#define LAYOUT_ortho_4x12( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ +} + +// Used to create a keymap using only KC_ prefixed keys +#define LAYOUT_kc( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +LAYOUT_ortho_4x12( \ + KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \ + KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \ + KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \ + KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \ +) + +#define KEYMAP LAYOUT_ortho_4x12 +#define LAYOUT_planck_mit LAYOUT_planck_1x2uC +#define LAYOUT_planck_grid LAYOUT_ortho_4x12 +#define LAYOUT_kc_ortho_4x12 LAYOUT_kc +#define KC_KEYMAP LAYOUT_kc diff --git a/keyboards/planck/rev2/info.json b/keyboards/planck/rev2/info.json new file mode 100644 index 000000000..68f89f601 --- /dev/null +++ b/keyboards/planck/rev2/info.json @@ -0,0 +1,115 @@ +{ + "keyboard_name": "Planck rev 2", + "keyboard_folder": "planck/rev2", + "url": "https://olkb.com/planck", + "maintainer": "jackhumbert", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_planck_1x2uC": { + "key_count": 47, + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 3, "y": 1 }, + { "x": 4, "y": 1 }, + { "x": 5, "y": 1 }, + { "x": 6, "y": 1 }, + { "x": 7, "y": 1 }, + { "x": 8, "y": 1 }, + { "x": 9, "y": 1 }, + { "x": 10, "y": 1 }, + { "x": 11, "y": 1 }, + { "x": 0, "y": 2 }, + { "x": 1, "y": 2 }, + { "x": 2, "y": 2 }, + { "x": 3, "y": 2 }, + { "x": 4, "y": 2 }, + { "x": 5, "y": 2 }, + { "x": 6, "y": 2 }, + { "x": 7, "y": 2 }, + { "x": 8, "y": 2 }, + { "x": 9, "y": 2 }, + { "x": 10, "y": 2 }, + { "x": 11, "y": 2 }, + { "x": 0, "y": 3 }, + { "x": 1, "y": 3 }, + { "x": 2, "y": 3 }, + { "x": 3, "y": 3 }, + { "x": 4, "y": 3 }, + { "x": 5, "y": 3, "w": 2 }, + { "x": 7, "y": 3 }, + { "x": 8, "y": 3 }, + { "x": 9, "y": 3 }, + { "x": 10, "y": 3 }, + { "x": 11, "y": 3 } + ] + }, + "LAYOUT_ortho_4x12": { + "key_count": 48, + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 3, "y": 1 }, + { "x": 4, "y": 1 }, + { "x": 5, "y": 1 }, + { "x": 6, "y": 1 }, + { "x": 7, "y": 1 }, + { "x": 8, "y": 1 }, + { "x": 9, "y": 1 }, + { "x": 10, "y": 1 }, + { "x": 11, "y": 1 }, + { "x": 0, "y": 2 }, + { "x": 1, "y": 2 }, + { "x": 2, "y": 2 }, + { "x": 3, "y": 2 }, + { "x": 4, "y": 2 }, + { "x": 5, "y": 2 }, + { "x": 6, "y": 2 }, + { "x": 7, "y": 2 }, + { "x": 8, "y": 2 }, + { "x": 9, "y": 2 }, + { "x": 10, "y": 2 }, + { "x": 11, "y": 2 }, + { "x": 0, "y": 3 }, + { "x": 1, "y": 3 }, + { "x": 2, "y": 3 }, + { "x": 3, "y": 3 }, + { "x": 4, "y": 3 }, + { "x": 5, "y": 3 }, + { "x": 6, "y": 3 }, + { "x": 7, "y": 3 }, + { "x": 8, "y": 3 }, + { "x": 9, "y": 3 }, + { "x": 10, "y": 3 }, + { "x": 11, "y": 3 } + ] + } + } +} diff --git a/keyboards/planck/rev2/readme.md b/keyboards/planck/rev2/readme.md new file mode 100644 index 000000000..16fa8b7fd --- /dev/null +++ b/keyboards/planck/rev2/readme.md @@ -0,0 +1,13 @@ +# Planck + +A compact 40% (12x4) ortholinear keyboard kit made and sold by OLKB and Massdrop. [More info on qmk.fm](http://qmk.fm/planck/) + +Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert) +Hardware Supported: Planck PCB rev2 +Hardware Availability: [OLKB.com](https://olkb.com), [Massdrop](https://www.massdrop.com/buy/planck-mechanical-keyboard?mode=guest_open) + +Make example for this keyboard (after setting up your build environment): + + make planck/rev2:default + +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). diff --git a/keyboards/planck/rev2/rev2.h b/keyboards/planck/rev2/rev2.h new file mode 100644 index 000000000..f81b36b31 --- /dev/null +++ b/keyboards/planck/rev2/rev2.h @@ -0,0 +1,49 @@ +#pragma once + +#include "planck.h" + +#define LAYOUT_planck_1x2uC( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3a, k3b } \ +} + +#define LAYOUT_ortho_4x12( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ +} + +// Used to create a keymap using only KC_ prefixed keys +#define LAYOUT_kc( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +LAYOUT_ortho_4x12( \ + KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \ + KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \ + KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \ + KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \ +) + +#define KEYMAP LAYOUT_ortho_4x12 +#define LAYOUT_planck_mit LAYOUT_planck_1x2uC +#define LAYOUT_planck_grid LAYOUT_ortho_4x12 +#define LAYOUT_kc_ortho_4x12 LAYOUT_kc +#define KC_KEYMAP LAYOUT_kc diff --git a/keyboards/planck/rev3/info.json b/keyboards/planck/rev3/info.json new file mode 100644 index 000000000..65e59adc8 --- /dev/null +++ b/keyboards/planck/rev3/info.json @@ -0,0 +1,115 @@ +{ + "keyboard_name": "Planck rev 3", + "keyboard_folder": "planck/rev3", + "url": "https://olkb.com/planck", + "maintainer": "jackhumbert", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_planck_1x2uC": { + "key_count": 47, + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 3, "y": 1 }, + { "x": 4, "y": 1 }, + { "x": 5, "y": 1 }, + { "x": 6, "y": 1 }, + { "x": 7, "y": 1 }, + { "x": 8, "y": 1 }, + { "x": 9, "y": 1 }, + { "x": 10, "y": 1 }, + { "x": 11, "y": 1 }, + { "x": 0, "y": 2 }, + { "x": 1, "y": 2 }, + { "x": 2, "y": 2 }, + { "x": 3, "y": 2 }, + { "x": 4, "y": 2 }, + { "x": 5, "y": 2 }, + { "x": 6, "y": 2 }, + { "x": 7, "y": 2 }, + { "x": 8, "y": 2 }, + { "x": 9, "y": 2 }, + { "x": 10, "y": 2 }, + { "x": 11, "y": 2 }, + { "x": 0, "y": 3 }, + { "x": 1, "y": 3 }, + { "x": 2, "y": 3 }, + { "x": 3, "y": 3 }, + { "x": 4, "y": 3 }, + { "x": 5, "y": 3, "w": 2 }, + { "x": 7, "y": 3 }, + { "x": 8, "y": 3 }, + { "x": 9, "y": 3 }, + { "x": 10, "y": 3 }, + { "x": 11, "y": 3 } + ] + }, + "LAYOUT_ortho_4x12": { + "key_count": 48, + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 3, "y": 1 }, + { "x": 4, "y": 1 }, + { "x": 5, "y": 1 }, + { "x": 6, "y": 1 }, + { "x": 7, "y": 1 }, + { "x": 8, "y": 1 }, + { "x": 9, "y": 1 }, + { "x": 10, "y": 1 }, + { "x": 11, "y": 1 }, + { "x": 0, "y": 2 }, + { "x": 1, "y": 2 }, + { "x": 2, "y": 2 }, + { "x": 3, "y": 2 }, + { "x": 4, "y": 2 }, + { "x": 5, "y": 2 }, + { "x": 6, "y": 2 }, + { "x": 7, "y": 2 }, + { "x": 8, "y": 2 }, + { "x": 9, "y": 2 }, + { "x": 10, "y": 2 }, + { "x": 11, "y": 2 }, + { "x": 0, "y": 3 }, + { "x": 1, "y": 3 }, + { "x": 2, "y": 3 }, + { "x": 3, "y": 3 }, + { "x": 4, "y": 3 }, + { "x": 5, "y": 3 }, + { "x": 6, "y": 3 }, + { "x": 7, "y": 3 }, + { "x": 8, "y": 3 }, + { "x": 9, "y": 3 }, + { "x": 10, "y": 3 }, + { "x": 11, "y": 3 } + ] + } + } +} diff --git a/keyboards/planck/rev3/readme.md b/keyboards/planck/rev3/readme.md new file mode 100644 index 000000000..26ef89831 --- /dev/null +++ b/keyboards/planck/rev3/readme.md @@ -0,0 +1,13 @@ +# Planck + +A compact 40% (12x4) ortholinear keyboard kit made and sold by OLKB and Massdrop. [More info on qmk.fm](http://qmk.fm/planck/) + +Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert) +Hardware Supported: Planck PCB rev3 +Hardware Availability: [OLKB.com](https://olkb.com), [Massdrop](https://www.massdrop.com/buy/planck-mechanical-keyboard?mode=guest_open) + +Make example for this keyboard (after setting up your build environment): + + make planck/rev3:default + +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). diff --git a/keyboards/planck/rev3/rev3.h b/keyboards/planck/rev3/rev3.h new file mode 100644 index 000000000..f81b36b31 --- /dev/null +++ b/keyboards/planck/rev3/rev3.h @@ -0,0 +1,49 @@ +#pragma once + +#include "planck.h" + +#define LAYOUT_planck_1x2uC( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3a, k3b } \ +} + +#define LAYOUT_ortho_4x12( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ +} + +// Used to create a keymap using only KC_ prefixed keys +#define LAYOUT_kc( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +LAYOUT_ortho_4x12( \ + KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \ + KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \ + KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \ + KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \ +) + +#define KEYMAP LAYOUT_ortho_4x12 +#define LAYOUT_planck_mit LAYOUT_planck_1x2uC +#define LAYOUT_planck_grid LAYOUT_ortho_4x12 +#define LAYOUT_kc_ortho_4x12 LAYOUT_kc +#define KC_KEYMAP LAYOUT_kc diff --git a/keyboards/planck/rev4/info.json b/keyboards/planck/rev4/info.json new file mode 100644 index 000000000..ad135b6cb --- /dev/null +++ b/keyboards/planck/rev4/info.json @@ -0,0 +1,115 @@ +{ + "keyboard_name": "Planck rev 4", + "keyboard_folder": "planck/rev4", + "url": "https://olkb.com/planck", + "maintainer": "jackhumbert", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_planck_1x2uC": { + "key_count": 47, + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 3, "y": 1 }, + { "x": 4, "y": 1 }, + { "x": 5, "y": 1 }, + { "x": 6, "y": 1 }, + { "x": 7, "y": 1 }, + { "x": 8, "y": 1 }, + { "x": 9, "y": 1 }, + { "x": 10, "y": 1 }, + { "x": 11, "y": 1 }, + { "x": 0, "y": 2 }, + { "x": 1, "y": 2 }, + { "x": 2, "y": 2 }, + { "x": 3, "y": 2 }, + { "x": 4, "y": 2 }, + { "x": 5, "y": 2 }, + { "x": 6, "y": 2 }, + { "x": 7, "y": 2 }, + { "x": 8, "y": 2 }, + { "x": 9, "y": 2 }, + { "x": 10, "y": 2 }, + { "x": 11, "y": 2 }, + { "x": 0, "y": 3 }, + { "x": 1, "y": 3 }, + { "x": 2, "y": 3 }, + { "x": 3, "y": 3 }, + { "x": 4, "y": 3 }, + { "x": 5, "y": 3, "w": 2 }, + { "x": 7, "y": 3 }, + { "x": 8, "y": 3 }, + { "x": 9, "y": 3 }, + { "x": 10, "y": 3 }, + { "x": 11, "y": 3 } + ] + }, + "LAYOUT_ortho_4x12": { + "key_count": 48, + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 3, "y": 1 }, + { "x": 4, "y": 1 }, + { "x": 5, "y": 1 }, + { "x": 6, "y": 1 }, + { "x": 7, "y": 1 }, + { "x": 8, "y": 1 }, + { "x": 9, "y": 1 }, + { "x": 10, "y": 1 }, + { "x": 11, "y": 1 }, + { "x": 0, "y": 2 }, + { "x": 1, "y": 2 }, + { "x": 2, "y": 2 }, + { "x": 3, "y": 2 }, + { "x": 4, "y": 2 }, + { "x": 5, "y": 2 }, + { "x": 6, "y": 2 }, + { "x": 7, "y": 2 }, + { "x": 8, "y": 2 }, + { "x": 9, "y": 2 }, + { "x": 10, "y": 2 }, + { "x": 11, "y": 2 }, + { "x": 0, "y": 3 }, + { "x": 1, "y": 3 }, + { "x": 2, "y": 3 }, + { "x": 3, "y": 3 }, + { "x": 4, "y": 3 }, + { "x": 5, "y": 3 }, + { "x": 6, "y": 3 }, + { "x": 7, "y": 3 }, + { "x": 8, "y": 3 }, + { "x": 9, "y": 3 }, + { "x": 10, "y": 3 }, + { "x": 11, "y": 3 } + ] + } + } +} diff --git a/keyboards/planck/rev4/readme.md b/keyboards/planck/rev4/readme.md new file mode 100644 index 000000000..4cf6e8cf2 --- /dev/null +++ b/keyboards/planck/rev4/readme.md @@ -0,0 +1,13 @@ +# Planck + +A compact 40% (12x4) ortholinear keyboard kit made and sold by OLKB and Massdrop. The first revision of the Planck to support Audio. [More info on qmk.fm](http://qmk.fm/planck/) + +Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert) +Hardware Supported: Planck PCB rev4 +Hardware Availability: [OLKB.com](https://olkb.com), [Massdrop](https://www.massdrop.com/buy/planck-mechanical-keyboard?mode=guest_open) + +Make example for this keyboard (after setting up your build environment): + + make planck/rev4:default + +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). diff --git a/keyboards/planck/rev4/rev4.h b/keyboards/planck/rev4/rev4.h new file mode 100644 index 000000000..f81b36b31 --- /dev/null +++ b/keyboards/planck/rev4/rev4.h @@ -0,0 +1,49 @@ +#pragma once + +#include "planck.h" + +#define LAYOUT_planck_1x2uC( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3a, k3b } \ +} + +#define LAYOUT_ortho_4x12( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ +} + +// Used to create a keymap using only KC_ prefixed keys +#define LAYOUT_kc( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +LAYOUT_ortho_4x12( \ + KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \ + KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \ + KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \ + KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \ +) + +#define KEYMAP LAYOUT_ortho_4x12 +#define LAYOUT_planck_mit LAYOUT_planck_1x2uC +#define LAYOUT_planck_grid LAYOUT_ortho_4x12 +#define LAYOUT_kc_ortho_4x12 LAYOUT_kc +#define KC_KEYMAP LAYOUT_kc diff --git a/keyboards/planck/rev5/info.json b/keyboards/planck/rev5/info.json new file mode 100644 index 000000000..6f31472f5 --- /dev/null +++ b/keyboards/planck/rev5/info.json @@ -0,0 +1,115 @@ +{ + "keyboard_name": "Planck rev 5", + "keyboard_folder": "planck/rev5", + "url": "https://olkb.com/planck", + "maintainer": "jackhumbert", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_planck_1x2uC": { + "key_count": 47, + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 3, "y": 1 }, + { "x": 4, "y": 1 }, + { "x": 5, "y": 1 }, + { "x": 6, "y": 1 }, + { "x": 7, "y": 1 }, + { "x": 8, "y": 1 }, + { "x": 9, "y": 1 }, + { "x": 10, "y": 1 }, + { "x": 11, "y": 1 }, + { "x": 0, "y": 2 }, + { "x": 1, "y": 2 }, + { "x": 2, "y": 2 }, + { "x": 3, "y": 2 }, + { "x": 4, "y": 2 }, + { "x": 5, "y": 2 }, + { "x": 6, "y": 2 }, + { "x": 7, "y": 2 }, + { "x": 8, "y": 2 }, + { "x": 9, "y": 2 }, + { "x": 10, "y": 2 }, + { "x": 11, "y": 2 }, + { "x": 0, "y": 3 }, + { "x": 1, "y": 3 }, + { "x": 2, "y": 3 }, + { "x": 3, "y": 3 }, + { "x": 4, "y": 3 }, + { "x": 5, "y": 3, "w": 2 }, + { "x": 7, "y": 3 }, + { "x": 8, "y": 3 }, + { "x": 9, "y": 3 }, + { "x": 10, "y": 3 }, + { "x": 11, "y": 3 } + ] + }, + "LAYOUT_ortho_4x12": { + "key_count": 48, + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 0, "y": 1 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 3, "y": 1 }, + { "x": 4, "y": 1 }, + { "x": 5, "y": 1 }, + { "x": 6, "y": 1 }, + { "x": 7, "y": 1 }, + { "x": 8, "y": 1 }, + { "x": 9, "y": 1 }, + { "x": 10, "y": 1 }, + { "x": 11, "y": 1 }, + { "x": 0, "y": 2 }, + { "x": 1, "y": 2 }, + { "x": 2, "y": 2 }, + { "x": 3, "y": 2 }, + { "x": 4, "y": 2 }, + { "x": 5, "y": 2 }, + { "x": 6, "y": 2 }, + { "x": 7, "y": 2 }, + { "x": 8, "y": 2 }, + { "x": 9, "y": 2 }, + { "x": 10, "y": 2 }, + { "x": 11, "y": 2 }, + { "x": 0, "y": 3 }, + { "x": 1, "y": 3 }, + { "x": 2, "y": 3 }, + { "x": 3, "y": 3 }, + { "x": 4, "y": 3 }, + { "x": 5, "y": 3 }, + { "x": 6, "y": 3 }, + { "x": 7, "y": 3 }, + { "x": 8, "y": 3 }, + { "x": 9, "y": 3 }, + { "x": 10, "y": 3 }, + { "x": 11, "y": 3 } + ] + } + } +} diff --git a/keyboards/planck/rev5/readme.md b/keyboards/planck/rev5/readme.md new file mode 100644 index 000000000..fed975a39 --- /dev/null +++ b/keyboards/planck/rev5/readme.md @@ -0,0 +1,13 @@ +# Planck + +A compact 40% (12x4) ortholinear keyboard kit made and sold by OLKB and Massdrop. [More info on qmk.fm](http://qmk.fm/planck/) + +Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert) +Hardware Supported: Planck PCB rev5 +Hardware Availability: [OLKB.com](https://olkb.com), [Massdrop](https://www.massdrop.com/buy/planck-mechanical-keyboard?mode=guest_open) + +Make example for this keyboard (after setting up your build environment): + + make planck/rev5:default + +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). diff --git a/keyboards/planck/rev5/rev5.h b/keyboards/planck/rev5/rev5.h new file mode 100644 index 000000000..f81b36b31 --- /dev/null +++ b/keyboards/planck/rev5/rev5.h @@ -0,0 +1,49 @@ +#pragma once + +#include "planck.h" + +#define LAYOUT_planck_1x2uC( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3a, k3b } \ +} + +#define LAYOUT_ortho_4x12( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ +} + +// Used to create a keymap using only KC_ prefixed keys +#define LAYOUT_kc( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +LAYOUT_ortho_4x12( \ + KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \ + KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \ + KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \ + KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \ +) + +#define KEYMAP LAYOUT_ortho_4x12 +#define LAYOUT_planck_mit LAYOUT_planck_1x2uC +#define LAYOUT_planck_grid LAYOUT_ortho_4x12 +#define LAYOUT_kc_ortho_4x12 LAYOUT_kc +#define KC_KEYMAP LAYOUT_kc diff --git a/keyboards/planck/rev6/info.json b/keyboards/planck/rev6/info.json index 81eacabc3..66dd8f575 100644 --- a/keyboards/planck/rev6/info.json +++ b/keyboards/planck/rev6/info.json @@ -1,6 +1,6 @@ { - "keyboard_name": "Planck", - "keyboard_folder": "planck", + "keyboard_name": "Planck rev 6", + "keyboard_folder": "planck/rev6", "url": "https://olkb.com/planck", "maintainer": "jackhumbert", "width": 12, diff --git a/keyboards/planck/rev6/readme.md b/keyboards/planck/rev6/readme.md new file mode 100644 index 000000000..1034eb9d7 --- /dev/null +++ b/keyboards/planck/rev6/readme.md @@ -0,0 +1,13 @@ +# Planck + +A compact 40% (12x4) ortholinear keyboard kit made and sold by OLKB and Massdrop. A complete hardware rework of the Planck, sporting a faster and more powerful STM32 ARM Cortex-M4 microcontroller, with support for rotary encoders and three additional layouts. [More info on qmk.fm](http://qmk.fm/planck/) + +Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert) +Hardware Supported: Planck PCB rev6 +Hardware Availability: [OLKB.com](https://olkb.com), [Massdrop](https://www.massdrop.com/buy/planck-mechanical-keyboard?mode=guest_open) + +Make example for this keyboard (after setting up your build environment): + + make planck/rev6:default + +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). diff --git a/keyboards/planck/rev6/rev6.h b/keyboards/planck/rev6/rev6.h index 75c2904c5..601e347f5 100644 --- a/keyboards/planck/rev6/rev6.h +++ b/keyboards/planck/rev6/rev6.h @@ -18,4 +18,110 @@ #include "planck.h" +#define LAYOUT_planck_1x2uC( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k39, k3a, k3b }, \ + { k06, k07, k08, k09, k0a, k0b }, \ + { k16, k17, k18, k19, k1a, k1b }, \ + { k26, k27, k28, k29, k2a, k2b }, \ + { k36, k37, k38, k33, k34, KC_NO } \ +} + +#define LAYOUT_planck_1x2uR( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k39, k3a, k3b }, \ + { k06, k07, k08, k09, k0a, k0b }, \ + { k16, k17, k18, k19, k1a, k1b }, \ + { k26, k27, k28, k29, k2a, k2b }, \ + { KC_NO, k37, k38, k33, k34, k35 } \ +} + +#define LAYOUT_planck_1x2uL( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k39, k3a, k3b }, \ + { k06, k07, k08, k09, k0a, k0b }, \ + { k16, k17, k18, k19, k1a, k1b }, \ + { k26, k27, k28, k29, k2a, k2b }, \ + { k36, k37, k38, k33, KC_NO, k35 } \ +} + +#define LAYOUT_planck_2x2u( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k35, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k39, k3a, k3b }, \ + { k06, k07, k08, k09, k0a, k0b }, \ + { k16, k17, k18, k19, k1a, k1b }, \ + { k26, k27, k28, k29, k2a, k2b }, \ + { KC_NO, k37, k38, k33, KC_NO, k35 } \ +} + +#define LAYOUT_ortho_4x12( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k39, k3a, k3b }, \ + { k06, k07, k08, k09, k0a, k0b }, \ + { k16, k17, k18, k19, k1a, k1b }, \ + { k26, k27, k28, k29, k2a, k2b }, \ + { k36, k37, k38, k33, k34, k35 } \ +} + + +// Used to create a keymap using only KC_ prefixed keys +#define LAYOUT_kc( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +LAYOUT_ortho_4x12( \ + KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \ + KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \ + KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \ + KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \ +) + +#define KEYMAP LAYOUT_ortho_4x12 +#define LAYOUT_planck_mit LAYOUT_planck_1x2uC +#define LAYOUT_planck_grid LAYOUT_ortho_4x12 +#define LAYOUT_kc_ortho_4x12 LAYOUT_kc +#define KC_KEYMAP LAYOUT_kc + #endif From 810c8db7706f40f0436555fdffbaf849dc0a5641 Mon Sep 17 00:00:00 2001 From: Danny Date: Thu, 20 Jun 2019 01:02:20 -0400 Subject: [PATCH 240/341] Set default I2C clock speed to 100kHz for split_common (#6161) * Set default I2C clock rate for split_common boards to 100kHz Default from I2C driver is 400kHz. * Update documentation for setting I2C clock speed --- docs/config_options.md | 4 ++-- quantum/split_common/post_config.h | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/config_options.md b/docs/config_options.md index 55d25d4c8..7418e8dbf 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -93,8 +93,8 @@ This is a C header file that is one of the first things included, and will persi * key combination that allows the use of magic commands (useful for debugging) * `#define USB_MAX_POWER_CONSUMPTION` * sets the maximum power (in mA) over USB for the device (default: 500) -* `#define SCL_CLOCK 100000L` - * sets the SCL_CLOCK speed for split keyboards. The default is `100000L` but some boards can be set to `400000L`. +* `#define F_SCL 100000L` + * sets the I2C clock rate speed for keyboards using I2C. The default is `400000L`, except for keyboards using `split_common`, where the default is `100000L`. ## Features That Can Be Disabled diff --git a/quantum/split_common/post_config.h b/quantum/split_common/post_config.h index 0e59df3d0..ff0fc5e19 100644 --- a/quantum/split_common/post_config.h +++ b/quantum/split_common/post_config.h @@ -4,6 +4,10 @@ #define RGBLIGHT_SPLIT #endif + #ifndef F_SCL + #define F_SCL 100000UL // SCL frequency + #endif + #else // use serial // When using serial, the user must define RGBLIGHT_SPLIT explicitly // in config.h as needed. From 8af3fe0c7dfce74477f86be19711c7ec4a70ccb2 Mon Sep 17 00:00:00 2001 From: Max Rumpf Date: Thu, 20 Jun 2019 07:02:43 +0200 Subject: [PATCH 241/341] [Keymap] Actually swap space and left control in gaming mode (#6162) --- keyboards/contra/keymaps/maxr1998/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/contra/keymaps/maxr1998/keymap.c b/keyboards/contra/keymaps/maxr1998/keymap.c index 326d5876d..c32a85661 100644 --- a/keyboards/contra/keymaps/maxr1998/keymap.c +++ b/keyboards/contra/keymaps/maxr1998/keymap.c @@ -128,7 +128,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {KC_SPC, XXXXXXX, _______, _______, _______, _______, _______, _______, G_0, _______, _______, _______} + {KC_SPC, XXXXXXX, _______, _______, _______, KC_LCTL, KC_LCTL, _______, G_0, _______, _______, _______} } }; From 9639f44f48a6073bf12094ad57688a1c79c3214a Mon Sep 17 00:00:00 2001 From: Alex Mayer Date: Thu, 20 Jun 2019 01:04:24 -0400 Subject: [PATCH 242/341] [Keyboard] 1up60hse: Add RGBLIGHT_SLEEP To Default Config (#6164) --- keyboards/1upkeyboards/1up60hse/config.h | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/1upkeyboards/1up60hse/config.h b/keyboards/1upkeyboards/1up60hse/config.h index 3781d7bcf..9ab969797 100644 --- a/keyboards/1upkeyboards/1up60hse/config.h +++ b/keyboards/1upkeyboards/1up60hse/config.h @@ -59,6 +59,7 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_SLEEP #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ From db0c1795520eea60e0092ced7048c9da7b508d37 Mon Sep 17 00:00:00 2001 From: Michael Speiser <34740424+Speiserm@users.noreply.github.com> Date: Thu, 20 Jun 2019 01:19:54 -0400 Subject: [PATCH 243/341] [Keymap] Added Deft layout (#6153) * Added Deft layout * Updated style and keymap * Updated readme, removed files * Updated readme and keymap * Updated readme * Fixed broken keymap * Fixed a typo in keymap and readme layer images * Fixed a typo in readme * Embedded layout image for readme * Embedded layout image for readme * Embedded layout image for readme * Fixed typos in keymap Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Fixed typo in keymap Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Fixed typo in keymap Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Fixed a spelling error in the readme * Typos and formatting in readme Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Co-Authored-By: fauxpark --- keyboards/planck/keymaps/deft/config.h | 39 +++++ keyboards/planck/keymaps/deft/deft-plank.json | 141 ++++++++++++++++++ keyboards/planck/keymaps/deft/keymap.c | 138 +++++++++++++++++ keyboards/planck/keymaps/deft/readme.md | 73 +++++++++ keyboards/planck/keymaps/deft/rules.mk | 1 + 5 files changed, 392 insertions(+) create mode 100644 keyboards/planck/keymaps/deft/config.h create mode 100644 keyboards/planck/keymaps/deft/deft-plank.json create mode 100644 keyboards/planck/keymaps/deft/keymap.c create mode 100644 keyboards/planck/keymaps/deft/readme.md create mode 100644 keyboards/planck/keymaps/deft/rules.mk diff --git a/keyboards/planck/keymaps/deft/config.h b/keyboards/planck/keymaps/deft/config.h new file mode 100644 index 000000000..6fa31cc8a --- /dev/null +++ b/keyboards/planck/keymaps/deft/config.h @@ -0,0 +1,39 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 + diff --git a/keyboards/planck/keymaps/deft/deft-plank.json b/keyboards/planck/keymaps/deft/deft-plank.json new file mode 100644 index 000000000..49dc57c3e --- /dev/null +++ b/keyboards/planck/keymaps/deft/deft-plank.json @@ -0,0 +1,141 @@ +[ + { + "backcolor": "#ffffff", + "name": "Deft Plank", + "author": "Michael Speiserß", + "switchMount": "cherry", + "switchBrand": "gateron", + "switchType": "KS-3-Tea", + "plate": true, + "pcb": true + }, + [ + { + "c": "#ba0000", + "sb": "gateron", + "st": "KS-3-Tea", + "a": 5 + }, + "\nDel\n\n\n\n\nEsc", + { + "c": "#cccccc", + "a": 4 + }, + "\n\n!\n\n\n\n\n\n1\nQ\nAlt 1", + "\n\n@\n\n\n\n\n\n2\nW\nAlt 2", + "\n\n#\n\n\n\n\n\n3\nE\nAlt 3", + "\n\n$\n\n\n\n\n\n4\nR\nAlt 4", + "\n\n%\n\n\n\n\n\n5\nT\n(", + "\n\n^\n\n\n\n\n\n6\nY\n)", + "\n\n&\n\n\n\n\n\n7\nU\nNum 7", + "\n\n*\n\n\n\n\n\n8\nI\nNum 8", + "\n\n(\n\n\n\n\n\n9\nO\nNum 9", + "\n\n)\n\n\n\n\n\n0\nP\nNum 0", + { + "c": "#ba0000", + "a": 7 + }, + "Bksp" + ], + [ + { + "c": "#365eff" + }, + "Tab", + { + "c": "#cccccc", + "a": 4 + }, + "\n\n\n~\n\n\n\n\nF1\nA\n`", + "\n\n\n|\n\n\n\n\nF2\nS\n\\", + "\n\n\n+\n\n\n\n\nF3\nD\n=", + { + "n": true + }, + "\n\n\n_\n\n\n\n\nF4\nF\n-", + { + "a": 5 + }, + "F5\n<\n\n\n\n\nG", + "F6\n>\n\n\n\n\nH", + { + "n": true + }, + "F7\nNum 4\n\n\n\n\nJ", + "F8\nNum 5\n\n\n\n\nK", + "F9\nNum 6\n\n\n\n\nL", + { + "a": 4 + }, + "\n\n\n\n\n\n\n:\nF10\n;\nNum .", + "\n\n\n\n\n\n\n\"\n\n'\nNumLk" + ], + [ + { + "c": "#365eff", + "a": 7 + }, + "Shift", + { + "c": "#cccccc", + "a": 5 + }, + "F11\nNum /\n\n\n\n\nZ", + "F12\nNum *\n\n\n\n\nX", + "F13\nNum -\n\n\n\n\nC", + "F14\nNum +\n\n\n\n\nV", + "F15\n[\n\n\n\n\nB", + "F16\n]\n\n\n\n\nN", + "F17\nNum 1\n\n\n\n\nM", + { + "a": 4 + }, + "\n\n\n\n\n\n\n<\nF18\n,\nNum 2", + "\n\n\n\n\n\n\n>\nF19\n.\nNum 3", + { + "c": "#365eff", + "a": 5 + }, + "Vol+\nPgup\n\n\n\n\n↑", + { + "c": "#cccccc", + "a": 4 + }, + "\n\n\n\n\n\n\n?\n\n/\nNum =" + ], + [ + { + "c": "#365eff", + "a": 7 + }, + "Ctrl", + { + "a": 5 + }, + "\nOption\n\n\n\n\nAlt", + "\n⌘\n\n\n\n\nWin", + "Cut\nPaste\n\n\n\n\nCopy", + { + "c": "#3f8f00", + "a": 7 + }, + "Lower", + { + "c": "#cccccc", + "w": 2 + }, + "", + { + "c": "#3f8f00" + }, + "Raise", + { + "c": "#365eff", + "a": 5 + }, + "\nNumE\n\n\n\n\nReturn", + "Play\nHome\n\n\n\n\n←", + "Vol -\nPgdn\n\n\n\n\n↓", + "Next\nEnd\n\n\n\n\n→" + ] +] \ No newline at end of file diff --git a/keyboards/planck/keymaps/deft/keymap.c b/keyboards/planck/keymaps/deft/keymap.c new file mode 100644 index 000000000..25a0a9f44 --- /dev/null +++ b/keyboards/planck/keymaps/deft/keymap.c @@ -0,0 +1,138 @@ +/* + * The Deft layout for the Planck Keyboard + * Version 1.0 + * + * A keyboard layout designed for efficiency in programming and transferability between ortholinear boards. + * Deft is currently supported on the following boards: + * Planck (12x4) + * + * The Deft keyboard layout was designed by Michael Speiser. You can find other Deft layouts at my Github: + * https://github.com/Speiserm + * + * For questions, issues, or feedback, feel free to email me at Speiserm@pm.me. + * + * + * Flashing: + * + * Rev 5 or earlier: + * make planck/revX:deft:dfu + * + * Rev 6: + * make planck/rev6:deft:dfu-util + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * Follow my cat: + * https://twitter.com/CatBucha + * https://www.instagram.com/buchathecat/ + * + */ + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |Shift | Z | X | C | V | B | N | M | , | . | Up | / | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI | Copy |Lower | Space |Raise |Enter | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_grid( + 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_UP, KC_SLSH, + KC_LCTL, KC_LALT, KC_LGUI, C(KC_C), LOWER, KC_SPC, KC_SPC, RAISE, KC_ENT, KC_LEFT, KC_DOWN, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | Del | Alt1 | Alt2 | Alt3 | Alt4 | ( | ) | Num7 | Num8 | Num9 | Num0 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | ` | \ | = | - | < | > | Num4 | Num5 | Num6 | Num. | NumL | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | Num/ | Num* | Num- | Num+ | [ | ] | Num1 | Num2 | Num3 | Pgup | Num= | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | |Paste | | | | NumE | Home | Pgdn | End | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_planck_grid( + KC_DEL, A(KC_1), A(KC_2), A(KC_3), A(KC_4), S(KC_9), S(KC_0), KC_P7, KC_P8, KC_P9, KC_P0, _______, + _______, KC_GRV,KC_BSLS,KC_EQL, KC_MINS,S(KC_COMM),S(KC_DOT), KC_P4, KC_P5, KC_P6, KC_PDOT, KC_NLCK, + _______, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, KC_LBRC, KC_RBRC, KC_P1, KC_P2, KC_P3, KC_PGUP, KC_PEQL, + _______, _______, _______, C(KC_V), _______, _______, _______, _______, KC_PENT, KC_HOME,KC_PGDOWN, KC_END +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | Vol+ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | Cut | | | | | Play | Vol- | Next | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_planck_grid( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, 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_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_VOLU, _______, + _______, _______, _______, C(KC_X), _______, _______, _______, _______, _______, KC_MPLY, KC_VOLD, KC_MNXT +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * |Reset | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_grid( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/planck/keymaps/deft/readme.md b/keyboards/planck/keymaps/deft/readme.md new file mode 100644 index 000000000..715ab3796 --- /dev/null +++ b/keyboards/planck/keymaps/deft/readme.md @@ -0,0 +1,73 @@ +# The Deft Planck Layout + +![Deft layout for the Planck keyboard](https://i.imgur.com/VtUkAyh.png) + +The Deft Planck layout is designed for efficiency in programming and transferability between ortholinear boards. It features a fairly standard default layer with properly placed arrow keys, a lower layer with a usable numpad and symbols, and a raise layer for numbers, f-keys, and music controls. The code is also cut down to only what you need. The result is a very usable Planck that can easily replace fullsize layouts. + +The strangely placed Enter key is meant to be closer to your thumb and moving it allows for proper arrow key placement without disturbing our layout too much. I wanted to separate the enter key from the forward slash key anyway, as I was commonly pressing enter when I meant to type a question mark. You get used to it pretty fast. + +Follow my cat: + +https://twitter.com/CatBucha + +https://www.instagram.com/buchathecat/ + + +## Flashing: +| Rev 5 or earlier: | Rev 6: | +|-|-| +| `make planck/revX:deft:dfu` | `make planck/rev6:deft:dfu-util` | + +## Layout: + +### QWERTY layer +``` +,-----------------------------------------------------------------------------------. +| Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Tab | A | S | D | F | G | H | J | K | L | ; | ' | +|------+------+------+------+------+------|------+------+------+------+------+------| +|Shift | Z | X | C | V | B | N | M | , | . | Up | / | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Ctrl | Alt | GUI | Copy |Lower | Space |Raise |Enter | Left | Down |Right | +`-----------------------------------------------------------------------------------' +``` + +### Lower layer +``` +,-----------------------------------------------------------------------------------. +| Del | Alt1 | Alt2 | Alt3 | Alt4 | ( | ) | Num7 | Num8 | Num9 | Num0 | | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | ` | \ | = | - | < | > | Num4 | Num5 | Num6 | Num. | NumL | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | Num/ | Num* | Num- | Num+ | [ | ] | Num1 | Num2 | Num3 | Pgup | Num= | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | |Paste | | | | NumE | Home | Pgdn | End | +`-----------------------------------------------------------------------------------' +``` + +### Raise layer +``` +,-----------------------------------------------------------------------------------. +| | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | Vol+ | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | Cut | | | | | Play | Vol- | Next | +`-----------------------------------------------------------------------------------' +``` + +### Adjust layer +``` +,-----------------------------------------------------------------------------------. +|Reset | | | | | | | | | | | | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | | | | | | | | | | | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | +`-----------------------------------------------------------------------------------' +``` diff --git a/keyboards/planck/keymaps/deft/rules.mk b/keyboards/planck/keymaps/deft/rules.mk new file mode 100644 index 000000000..dcf16bef3 --- /dev/null +++ b/keyboards/planck/keymaps/deft/rules.mk @@ -0,0 +1 @@ +SRC += muse.c From 67e0c951afee99ac1e1e96354655296457f57b78 Mon Sep 17 00:00:00 2001 From: yiancar Date: Thu, 20 Jun 2019 06:20:59 +0100 Subject: [PATCH 244/341] [Keyboard] Added NK65 Picture in Readme as promised (#6163) --- keyboards/nk65/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/nk65/readme.md b/keyboards/nk65/readme.md index c893c9782..41f52615a 100755 --- a/keyboards/nk65/readme.md +++ b/keyboards/nk65/readme.md @@ -1,7 +1,7 @@ NK65 ========= -[NK65]() +![NK65](https://i.imgur.com/EXNbVpL.jpg) This is a standard fixed layout 65% PCB. It supports VIA and full per-key RGB. From 317b8095647e208a7ac1ecf6b110051ca46553a8 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Thu, 20 Jun 2019 15:33:39 +1000 Subject: [PATCH 245/341] Fix breathing always on for soft PWM (#5983) * Fix breathing always on for soft PWM * Remove reference to hardware PWM pins in BACKLIGHT_BREATHING description Now, breathing will only be unsupported when Timers 1 and 3 are both used by Audio * Document BACKLIGHT_ON_STATE and its purpose --- docs/config_options.md | 2 +- docs/feature_backlight.md | 10 ++++++++-- quantum/quantum.c | 17 ++++++++++------- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/docs/config_options.md b/docs/config_options.md index 7418e8dbf..eb0a441cc 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -80,7 +80,7 @@ This is a C header file that is one of the first things included, and will persi * `#define BACKLIGHT_LEVELS 3` * number of levels your backlight will have (maximum 15 excluding off) * `#define BACKLIGHT_BREATHING` - * enables backlight breathing (only works with backlight pins B5, B6 and B7) + * enables backlight breathing * `#define BREATHING_PERIOD 6` * the length of one backlight "breath" in seconds * `#define DEBOUNCE 5` diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md index 5a21a6790..b06db89e4 100644 --- a/docs/feature_backlight.md +++ b/docs/feature_backlight.md @@ -64,11 +64,17 @@ To change the behaviour of the backlighting, `#define` these in your `config.h`: |Define |Default |Description | |---------------------|-------------|-------------------------------------------------------------------------------------------------------------| |`BACKLIGHT_PIN` |`B7` |The pin that controls the LEDs. Unless you are designing your own keyboard, you shouldn't need to change this| -|`BACKLIGHT_PINS` |*Not defined*|experimental: see below for more information| +|`BACKLIGHT_PINS` |*Not defined*|experimental: see below for more information | |`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 15 excluding off) | |`BACKLIGHT_CAPS_LOCK`|*Not defined*|Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) | -|`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if supported | +|`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if supported | |`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds | +|`BACKLIGHT_ON_STATE` |`0` |The state of the backlight pin when the backlight is "on" - `1` for high, `0` for low | + +## Backlight On State + +Most backlight circuits are driven by an N-channel MOSFET or NPN transistor. This means that to turn the transistor *on* and light the LEDs, you must drive the backlight pin, connected to the gate or base, *low*. +Sometimes, however, a P-channel MOSFET, or a PNP transistor is used. In this case you must `#define BACKLIGHT_ON_STATE 1`, so that when the transistor is on, the pin is driven *high* instead. ## Multiple backlight pins diff --git a/quantum/quantum.c b/quantum/quantum.c index 36b7942d5..6530738b7 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -707,8 +707,9 @@ bool process_record_quantum(keyrecord_t *record) { #if defined(BACKLIGHT_ENABLE) && defined(BACKLIGHT_BREATHING) case BL_BRTG: { - if (record->event.pressed) + if (record->event.pressed) { breathing_toggle(); + } return false; } #endif @@ -1148,13 +1149,13 @@ void backlight_off(uint8_t backlight_pin) { #define BACKLIGHT_PIN_INIT BACKLIGHT_PINS #endif -#define FOR_EACH_LED(x) \ +#define FOR_EACH_LED(x) \ for (uint8_t i = 0; i < BACKLIGHT_LED_COUNT; i++) \ - { \ - uint8_t backlight_pin = backlight_pins[i]; \ + { \ + uint8_t backlight_pin = backlight_pins[i]; \ { \ - x \ - } \ + x \ + } \ } static const uint8_t backlight_pins[BACKLIGHT_LED_COUNT] = BACKLIGHT_PIN_INIT; @@ -1233,7 +1234,9 @@ ISR(TIMERx_COMPA_vect) { // this one triggers at F_CPU/65536 =~ 244 Hz ISR(TIMERx_OVF_vect) { #ifdef BACKLIGHT_BREATHING - breathing_task(); + if(is_breathing()) { + breathing_task(); + } #endif // for very small values of OCRxx (or backlight level) // we can't guarantee this whole code won't execute From e15417eca8d84403096b7604e5106a6d494564cd Mon Sep 17 00:00:00 2001 From: Xelus22 Date: Fri, 21 Jun 2019 02:20:15 +1000 Subject: [PATCH 246/341] [Keyboard] Aeboards Ext65 - New keyboard & Aegis Update (#6127) * aegis config update and ext65 added * update readme's * PID ext65 change * fix ext65 config --- keyboards/aeboards/aegis/config.h | 4 +- keyboards/aeboards/ext65/config.h | 71 ++++++++++++ keyboards/aeboards/ext65/ext65.c | 18 +++ keyboards/aeboards/ext65/ext65.h | 40 +++++++ .../aeboards/ext65/keymaps/default/keymap.c | 104 ++++++++++++++++++ .../aeboards/ext65/keymaps/default/readme.md | 2 + keyboards/aeboards/ext65/keymaps/via/keymap.c | 103 +++++++++++++++++ .../aeboards/ext65/keymaps/via/readme.md | 2 + keyboards/aeboards/ext65/keymaps/via/rules.mk | 68 ++++++++++++ keyboards/aeboards/ext65/readme.md | 14 +++ keyboards/aeboards/ext65/rules.mk | 65 +++++++++++ 11 files changed, 489 insertions(+), 2 deletions(-) create mode 100644 keyboards/aeboards/ext65/config.h create mode 100644 keyboards/aeboards/ext65/ext65.c create mode 100644 keyboards/aeboards/ext65/ext65.h create mode 100644 keyboards/aeboards/ext65/keymaps/default/keymap.c create mode 100644 keyboards/aeboards/ext65/keymaps/default/readme.md create mode 100644 keyboards/aeboards/ext65/keymaps/via/keymap.c create mode 100644 keyboards/aeboards/ext65/keymaps/via/readme.md create mode 100644 keyboards/aeboards/ext65/keymaps/via/rules.mk create mode 100644 keyboards/aeboards/ext65/readme.md create mode 100644 keyboards/aeboards/ext65/rules.mk diff --git a/keyboards/aeboards/aegis/config.h b/keyboards/aeboards/aegis/config.h index 8db31b254..01e20454c 100644 --- a/keyboards/aeboards/aegis/config.h +++ b/keyboards/aeboards/aegis/config.h @@ -23,8 +23,8 @@ #define PRODUCT_ID 0x0807 // 1800 -> 0x0708 -> 0x0807 ;-) #define DEVICE_VER 0x0001 #define MANUFACTURER AEboards -#define PRODUCT Aegis -#define DESCRIPTION 1800 Left Handed Keyboard +#define PRODUCT AEboards Aegis +#define DESCRIPTION AEboards Aegis /* key matrix size */ #define MATRIX_ROWS 12 diff --git a/keyboards/aeboards/ext65/config.h b/keyboards/aeboards/ext65/config.h new file mode 100644 index 000000000..2f66f3f92 --- /dev/null +++ b/keyboards/aeboards/ext65/config.h @@ -0,0 +1,71 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4145 // "AE" +#define PRODUCT_ID 0xAE65 // AEboards EXT65 +#define DEVICE_VER 0x0001 +#define MANUFACTURER AEboards +#define PRODUCT AEboards Ext65 +#define DESCRIPTION AEboards Ext65 + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 10 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { C6, C7, B5, B6, D7, B4, D4, D6, B7, E6 } +#define MATRIX_COL_PINS { B2, B3, B1, B0, F7, F0, F1, F4, F5, F6 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +//#define WT_MONO_BACKLIGHT + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 32 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 34 + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 +// Dynamic macro starts after dynamic keymaps (35+(4*10*10*2)) = (35+800) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 835 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 189 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 + diff --git a/keyboards/aeboards/ext65/ext65.c b/keyboards/aeboards/ext65/ext65.c new file mode 100644 index 000000000..f52f8d438 --- /dev/null +++ b/keyboards/aeboards/ext65/ext65.c @@ -0,0 +1,18 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +// Nothing to see here, move along... ;-) + diff --git a/keyboards/aeboards/ext65/ext65.h b/keyboards/aeboards/ext65/ext65.h new file mode 100644 index 000000000..de79b92ab --- /dev/null +++ b/keyboards/aeboards/ext65/ext65.h @@ -0,0 +1,40 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define ____ KC_NO + +#define LAYOUT_ext65( \ + K000, K100, K001, K101, K002, K102, K003, K103, K004, K104, K005, K105, K006, K106, K007, K107, K008, K108, K508, K009, \ + K200, K300, K201, K301, K202, K302, K203, K303, K204, K304, K205, K305, K206, K306, K207, K307, K208, K308, K209, \ + K400, K500, K401, K501, K402, K502, K403, K503, K404, K504, K405, K505, K406, K506, K407, K507, K408, K409, \ + K600, K700, K601, K701, K602, K702, K603, K703, K604, K704, K605, K705, K606, K706, K607, K708, K608, K709, \ + K800, K900, K801, K901, K802, K902, K803, K805, K906, K807, K908, K808, K909 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, ____ }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, ____ }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409 }, \ + { K500, K501, K502, K503, K504, K505, K506, K507, K508, ____ }, \ + { K600, K601, K602, K603, K604, K605, K606, K607, K608, ____ }, \ + { K700, K701, K702, K703, K704, K705, K706, ____, K708, K709 }, \ + { K800, K801, K802, K803, ____, K805, ____, K807, K808, ____ }, \ + { K900, K901, K902, ____, ____, ____, K906, ____, K908, K909 } \ +} diff --git a/keyboards/aeboards/ext65/keymaps/default/keymap.c b/keyboards/aeboards/ext65/keymaps/default/keymap.c new file mode 100644 index 000000000..79d5ecf50 --- /dev/null +++ b/keyboards/aeboards/ext65/keymaps/default/keymap.c @@ -0,0 +1,104 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * ,-------------------. ,-------------------------------------------------------------------. + * |- | * | / |NmLK| |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|pipe| ~ | Pscr| + * |-------------------| |-------------------------------------------------------------------| + * | | 9 | 8 | 7 | |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| BSPC | Del | + * | + |--------------| |-------------------------------------------------------------------| + * | | 6 | 5 | 4 | |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return | Pgup| + * |-------------------| |-------------------------------------------------------------------| + * | | 3 | 2 | 1 | |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | Pgdn| + * | ENT|-------------------------------------------------------------------------------------| + * | | . | 0 | | Ctrl | Win | Alt | Space | FN | Ctrl | |Left| Dn | Rght| + * `------------------------------------------------------------------------------------------' + */ + [0] = LAYOUT_ext65( + KC_PMNS, KC_PAST, KC_PSLS, KC_NLCK, KC_ESC , 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_BSLS, KC_GRV , KC_PSCR, + KC_PPLS, KC_P9 , KC_P8 , KC_P7 , 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_BSPC, KC_DEL , + KC_PPLS, KC_P6 , KC_P5 , KC_P4 , KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_PGUP, + KC_PENT, KC_P3 , KC_P2 , KC_P1 , 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_UP , KC_PGDN, + KC_PENT, KC_PDOT, KC_P0 , KC_P0 , KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_ext65( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT_ext65( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT_ext65( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + + +void keyboard_pre_init_user(void) { + // Call the keyboard pre init code. + + // Set our LED pins as output + setPinOutput(D5); + setPinOutput(D3); + setPinOutput(D2); + setPinOutput(D1); +} + +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(D5); + } else { + writePinHigh(D5); + } + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(D3); + } else { + writePinHigh(D3); + } + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinLow(D2); + } else { + writePinHigh(D2); + } +} + +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case 1: + writePinHigh(D1); + break; + default: // for any other layers, or the default layer + writePinLow(D1); + break; + } + return state; +} \ No newline at end of file diff --git a/keyboards/aeboards/ext65/keymaps/default/readme.md b/keyboards/aeboards/ext65/keymaps/default/readme.md new file mode 100644 index 000000000..b4d9a0b6d --- /dev/null +++ b/keyboards/aeboards/ext65/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# The Default Ext65 Layout + diff --git a/keyboards/aeboards/ext65/keymaps/via/keymap.c b/keyboards/aeboards/ext65/keymaps/via/keymap.c new file mode 100644 index 000000000..3079c528e --- /dev/null +++ b/keyboards/aeboards/ext65/keymaps/via/keymap.c @@ -0,0 +1,103 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * ,-------------------. ,-------------------------------------------------------------------. + * |- | * | / |NmLK| |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|pipe| ~ | Pscr| + * |-------------------| |-------------------------------------------------------------------| + * | | 9 | 8 | 7 | |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| BSPC | Del | + * | + |--------------| |-------------------------------------------------------------------| + * | | 6 | 5 | 4 | |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return | Pgup| + * |-------------------| |-------------------------------------------------------------------| + * | | 3 | 2 | 1 | |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | Pgdn| + * | ENT|-------------------------------------------------------------------------------------| + * | | . | 0 | | Ctrl | Win | Alt | Space | FN | Ctrl | |Left| Dn | Rght| + * `------------------------------------------------------------------------------------------' + */ + [0] = LAYOUT_ext65( + KC_PMNS, KC_PAST, KC_PSLS, KC_NLCK, KC_ESC , 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_BSLS, KC_GRV , KC_PSCR, + KC_PPLS, KC_P9 , KC_P8 , KC_P7 , 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_BSPC, KC_DEL , + KC_PPLS, KC_P6 , KC_P5 , KC_P4 , 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 , KC_PGUP, + KC_PENT, KC_P3 , KC_P2 , KC_P1 , 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_UP , KC_PGDN, + KC_PENT, KC_PDOT, KC_P0 , KC_P0 , KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_ext65( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT_ext65( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT_ext65( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +void keyboard_pre_init_user(void) { + // Call the keyboard pre init code. + + // Set our LED pins as output + setPinOutput(D5); + setPinOutput(D3); + setPinOutput(D2); + setPinOutput(D1); +} + +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(D5); + } else { + writePinHigh(D5); + } + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(D3); + } else { + writePinHigh(D3); + } + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinLow(D2); + } else { + writePinHigh(D2); + } +} + +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case 1: + writePinHigh(D1); + break; + default: // for any other layers, or the default layer + writePinLow(D1); + break; + } + return state; +} diff --git a/keyboards/aeboards/ext65/keymaps/via/readme.md b/keyboards/aeboards/ext65/keymaps/via/readme.md new file mode 100644 index 000000000..c2c416d16 --- /dev/null +++ b/keyboards/aeboards/ext65/keymaps/via/readme.md @@ -0,0 +1,2 @@ +# The VIA Ext65 Layout + diff --git a/keyboards/aeboards/ext65/keymaps/via/rules.mk b/keyboards/aeboards/ext65/keymaps/via/rules.mk new file mode 100644 index 000000000..f072c6719 --- /dev/null +++ b/keyboards/aeboards/ext65/keymaps/via/rules.mk @@ -0,0 +1,68 @@ +# project specific files +SRC = keyboards/wilba_tech/wt_main.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +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 = no # Console for debug(+400) +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 on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/aeboards/ext65/readme.md b/keyboards/aeboards/ext65/readme.md new file mode 100644 index 000000000..5ee7fb4f8 --- /dev/null +++ b/keyboards/aeboards/ext65/readme.md @@ -0,0 +1,14 @@ +EXT65 +=== + +A southpaw inspired keyboard by [aeboards](https://aeboards.com/) + +Keyboard Maintainer: [Xelus22](https://github.com/Xelus22) +Hardware Supported: EXT65 +Hardware Availability: Custom keyboard group buys + +Make example for this keyboard (after setting up your build environment): + + make aeboards/ext65:default + +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). \ No newline at end of file diff --git a/keyboards/aeboards/ext65/rules.mk b/keyboards/aeboards/ext65/rules.mk new file mode 100644 index 000000000..f1c632289 --- /dev/null +++ b/keyboards/aeboards/ext65/rules.mk @@ -0,0 +1,65 @@ +# project specific files +SRC = keyboards/wilba_tech/wt_main.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +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 = no # Console for debug(+400) +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 on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches From b36bb58b7624533022dc38b02421c9f1d1f3f2e1 Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Wed, 19 Jun 2019 00:50:05 -0700 Subject: [PATCH 247/341] Add ergodash layout, update the backlight numbers for the rgb backlight to be the actual intended colors. --- .../ergodash/rev1/keymaps/333fred/config.h | 10 ++++ .../ergodash/rev1/keymaps/333fred/keymap.c | 57 +++++++++++++++++++ .../ergodash/rev1/keymaps/333fred/rules.mk | 7 +++ users/333fred/333fred.h | 1 + users/333fred/layout_macros.h | 44 ++++++++++++++ users/333fred/rgb.c | 6 +- 6 files changed, 122 insertions(+), 3 deletions(-) create mode 100644 keyboards/ergodash/rev1/keymaps/333fred/config.h create mode 100644 keyboards/ergodash/rev1/keymaps/333fred/keymap.c create mode 100644 keyboards/ergodash/rev1/keymaps/333fred/rules.mk create mode 100644 users/333fred/layout_macros.h diff --git a/keyboards/ergodash/rev1/keymaps/333fred/config.h b/keyboards/ergodash/rev1/keymaps/333fred/config.h new file mode 100644 index 000000000..e48702fd6 --- /dev/null +++ b/keyboards/ergodash/rev1/keymaps/333fred/config.h @@ -0,0 +1,10 @@ +#pragma once + +#include QMK_KEYBOARD_CONFIG_H +#include "333fred_config.h" + +#define USE_SERIAL +#define MASTER_LEFT + +#undef TAPPING_TERM +#define TAPPING_TERM 200 diff --git a/keyboards/ergodash/rev1/keymaps/333fred/keymap.c b/keyboards/ergodash/rev1/keymaps/333fred/keymap.c new file mode 100644 index 000000000..8ed826d5a --- /dev/null +++ b/keyboards/ergodash/rev1/keymaps/333fred/keymap.c @@ -0,0 +1,57 @@ +#include QMK_KEYBOARD_H +#include "333fred.h" + +extern keymap_config_t keymap_config; + +// Use an expanded macro with VA_ARGS to ensure that the common +// rows get expanded out before getting passed to the LAYOUT +// macro. + +#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_wrapper( \ + ROW5_LEFT_BASE, KC_F5, KC_F6, ROW5_RGHT_BASE, + ROW4_LEFT_BASE, TG(GAME), TG(GAME_ARROW), ROW4_RGHT_BASE, + ROW3_LEFT_BASE, KC_LGUI, KC_BSPC, ROW3_RGHT_BASE, + ROW2_LEFT_BASE, TD(TD_COPY_PASTE), KC_UP , ROW2_RGHT_BASE, + ROW1_LEFT_BASE, KC_BSPC, TD(TD_SYM_VIM), KC_DEL, KC_ENT, KC_SPC , KC_DOWN, ROW1_RGHT_BASE + ), + + [SYMB] = LAYOUT_wrapper( + ROW5_LEFT_SYMB, _______, _______, ROW5_RGHT_SYMB, + ROW4_LEFT_SYMB, PSCREEN_APP, _______, ROW4_RGHT_SYMB, + ROW3_LEFT_SYMB, KC_PSCR, KC_VOLU, ROW3_RGHT_SYMB, + ROW2_LEFT_SYMB, _______, KC_VOLD, ROW2_RGHT_SYMB, + ROW1_LEFT_SYMB, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, ROW1_RGHT_SYMB + ), + + [VIM] = LAYOUT_wrapper( + ROW5_LEFT_VIM, _______, _______, ROW5_RGHT_VIM, + ROW4_LEFT_VIM, _______, _______, ROW4_RGHT_VIM, + ROW3_LEFT_VIM, _______, _______, ROW3_RGHT_VIM, + ROW2_LEFT_VIM, _______, _______, ROW2_RGHT_VIM, + ROW1_LEFT_VIM, _______, _______, _______, _______, _______, _______, ROW1_RGHT_VIM + ), + + [GAME] = LAYOUT_wrapper( + KC_ESC, SIX_TRNS, _______, SIX_TRNS, + SIX_TRNS, _______, _______, SIX_TRNS, + KC_LCTL, FOUR_TRNS, _______, KC_F6, _______, SIX_TRNS, + KC_LSFT, KC_Z, FOUR_TRNS, KC_F5, _______, SIX_TRNS, + KC_ENT, _______, KC_LOCK, KC_BSPC, KC_LALT, KC_SPC, OSM(SYMB), _______, SIX_TRNS + ), + + [GAME_ARROW] = LAYOUT_wrapper( + KC_ESC, SIX_TRNS, _______, SIX_TRNS, + _______, _______, KC_UP, _______, _______, _______, _______, _______, SIX_TRNS, + KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_F6, _______, SIX_TRNS, + KC_LSFT, KC_Z, FOUR_TRNS, KC_F5, _______, SIX_TRNS, + KC_ENT, _______, KC_LOCK, KC_BSPC, KC_LALT, KC_SPC, OSM(SYMB), _______, SIX_TRNS + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + tap_dance_process_keycode(keycode); + return !try_handle_macro(keycode, record); +} diff --git a/keyboards/ergodash/rev1/keymaps/333fred/rules.mk b/keyboards/ergodash/rev1/keymaps/333fred/rules.mk new file mode 100644 index 000000000..9d8ff37e1 --- /dev/null +++ b/keyboards/ergodash/rev1/keymaps/333fred/rules.mk @@ -0,0 +1,7 @@ +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = yes +AUDIO_ENABLE = no +NKRO_ENABLE = yes +KEY_LOCK_ENABLE = yes +TAP_DANCE_ENABLE = yes +CONSOLE_ENABLE = no diff --git a/users/333fred/333fred.h b/users/333fred/333fred.h index 17f3779b7..716b61a25 100644 --- a/users/333fred/333fred.h +++ b/users/333fred/333fred.h @@ -1,6 +1,7 @@ #pragma once #include "quantum.h" +#include "layout_macros.h" #define BASE 0 #define CODE 1 // code layer diff --git a/users/333fred/layout_macros.h b/users/333fred/layout_macros.h new file mode 100644 index 000000000..3b163f6ce --- /dev/null +++ b/users/333fred/layout_macros.h @@ -0,0 +1,44 @@ +#pragma once + +#define SIX_TRNS _______, _______, _______, _______, _______, _______ +#define FOUR_TRNS _______, _______, _______, _______ + +// Row 5: 6 keys +#define ROW5_LEFT_BASE KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5 +#define ROW5_RGHT_BASE KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS +#define ROW5_LEFT_SYMB _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 +#define ROW5_RGHT_SYMB KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 +#define ROW5_LEFT_VIM SIX_TRNS +#define ROW5_RGHT_VIM SIX_TRNS + +// Row 4: 6 keys +#define ROW4_LEFT_BASE KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T +#define ROW4_RGHT_BASE KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS +#define ROW4_LEFT_SYMB _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE +#define ROW4_RGHT_SYMB KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12 +#define ROW4_LEFT_VIM SIX_TRNS +#define ROW4_RGHT_VIM SIX_TRNS + +// Row 3: 6 keys +#define ROW3_LEFT_BASE CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G +#define ROW3_RGHT_BASE KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT +#define ROW3_LEFT_SYMB _______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_GRV +#define ROW3_RGHT_SYMB KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, _______ +#define ROW3_LEFT_VIM _______, DLEFT, DRIGHT, KC_LCTL, KC_LGUI, _______ +#define ROW3_RGHT_VIM KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______ + +// Row 2: 6 keys +#define ROW2_LEFT_BASE OSM(MOD_LSFT), CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B +#define ROW2_RGHT_BASE KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), OSM(MOD_RSFT) +#define ROW2_LEFT_SYMB _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD +#define ROW2_RGHT_SYMB KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, _______ +#define ROW2_LEFT_VIM _______, _______, KC_TAB, _______, _______, _______ +#define ROW2_RGHT_VIM SIX_TRNS + +// Row 1: 4 keys +#define ROW1_LEFT_BASE OSM(MOD_LCTL), KC_F4, KC_F5, KC_LALT +#define ROW1_RGHT_BASE KC_DOWN, KC_EQL, KC_RIGHT, KC_RGUI +#define ROW1_LEFT_SYMB _______, _______, _______, _______ +#define ROW1_RGHT_SYMB KC_0, KC_DOT, KC_EQL, _______ +#define ROW1_LEFT_VIM FOUR_TRNS +#define ROW1_RGHT_VIM FOUR_TRNS diff --git a/users/333fred/rgb.c b/users/333fred/rgb.c index 5a6d74b5a..c86cd1c77 100644 --- a/users/333fred/rgb.c +++ b/users/333fred/rgb.c @@ -5,15 +5,15 @@ void layer_state_set_rgb(uint32_t state) { switch (biton32(state)) { case BASE: // purple - rgblight_sethsv_noeeprom(255, 255, 20); + rgblight_sethsv_noeeprom(210, 255, 20); break; case SYMB: // blue - rgblight_sethsv_noeeprom(240, 255, 20); + rgblight_sethsv_noeeprom(191, 255, 20); break; case VIM: // green - rgblight_sethsv_noeeprom(120, 255, 20); + rgblight_sethsv_noeeprom(85, 255, 20); break; case GAME: // red From af34c548f94528c15cf1f963da4c1dcdbc408dfe Mon Sep 17 00:00:00 2001 From: Max <17062872+westfoxtrot@users.noreply.github.com> Date: Thu, 20 Jun 2019 20:34:19 +0100 Subject: [PATCH 248/341] [Keyboard] fixes for issue with aanzee qmk port (#6159) * fixed issue with LED indicators corrected error in info.json * fixed issue with led indictors * added fix for key_count to info.json for westfoxtrot/aanzee * fix to support config.qmk.fm correctly and remove unused key from matrix for westfoxtrot/aanzee * fix for caps_lock led * Update readme.md --- keyboards/westfoxtrot/aanzee/aanzee.c | 29 ++++++++++++++------------ keyboards/westfoxtrot/aanzee/readme.md | 2 +- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/keyboards/westfoxtrot/aanzee/aanzee.c b/keyboards/westfoxtrot/aanzee/aanzee.c index 0dc1199be..17efdbe88 100644 --- a/keyboards/westfoxtrot/aanzee/aanzee.c +++ b/keyboards/westfoxtrot/aanzee/aanzee.c @@ -30,23 +30,26 @@ #include "aanzee.h" +void keyboard_pre_init_kb(void) { + + // Call the keyboard pre init code. + // Set our LED pins as output + setPinOutput(B2); + + keyboard_pre_init_user(); +} void led_set_kb(uint8_t usb_led) { -if (usb_led & (1< Date: Fri, 21 Jun 2019 05:00:39 +0900 Subject: [PATCH 249/341] [Keymap] New keymap for crkbd (#6103) * New keymap * Update keymap --- keyboards/crkbd/keymaps/thumb_ctrl/config.h | 44 ++++ keyboards/crkbd/keymaps/thumb_ctrl/keymap.c | 253 ++++++++++++++++++++ keyboards/crkbd/keymaps/thumb_ctrl/rules.mk | 31 +++ 3 files changed, 328 insertions(+) create mode 100755 keyboards/crkbd/keymaps/thumb_ctrl/config.h create mode 100755 keyboards/crkbd/keymaps/thumb_ctrl/keymap.c create mode 100755 keyboards/crkbd/keymaps/thumb_ctrl/rules.mk diff --git a/keyboards/crkbd/keymaps/thumb_ctrl/config.h b/keyboards/crkbd/keymaps/thumb_ctrl/config.h new file mode 100755 index 000000000..5670d8c64 --- /dev/null +++ b/keyboards/crkbd/keymaps/thumb_ctrl/config.h @@ -0,0 +1,44 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define SSD1306OLED + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 150 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 27 +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 diff --git a/keyboards/crkbd/keymaps/thumb_ctrl/keymap.c b/keyboards/crkbd/keymaps/thumb_ctrl/keymap.c new file mode 100755 index 000000000..c67958aa1 --- /dev/null +++ b/keyboards/crkbd/keymaps/thumb_ctrl/keymap.c @@ -0,0 +1,253 @@ +#include QMK_KEYBOARD_H +#include "bootloader.h" +#ifdef PROTOCOL_LUFA + #include "lufa.h" + #include "split_util.h" +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// 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. +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, + BACKLIT, + RGBRST +}; + +#define KC_ KC_TRNS +#define KC______ KC_TRNS +#define KC_XXXXX KC_NO +#define KC_LOWER LOWER +#define KC_RAISE RAISE +#define KC_RST RESET +#define KC_LRST RGBRST +#define KC_LTOG RGB_TOG +#define KC_LHUI RGB_HUI +#define KC_LHUD RGB_HUD +#define KC_LSAI RGB_SAI +#define KC_LSAD RGB_SAD +#define KC_LVAI RGB_VAI +#define KC_LVAD RGB_VAD +#define KC_LMOD RGB_MOD +#define KC_CTLTB CTL_T(KC_TAB) +#define KC_GUIEI GUI_T(KC_LANG2) +#define KC_ALTKN ALT_T(KC_LANG1) +#define KC_CTLEN CTL_T(KC_LANG2) // for Linux and Windows +#define KC_GUIEN GUI_T(KC_LANG2) // for Mac +#define KC_SFTJP SFT_T(KC_LANG1) +#define KC_ALTSP ALT_T(KC_SPACE) +#define KC_ALTDL ALT_T(KC_DEL) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_kc( + //,-----------------------------------------. ,-----------------------------------------. + ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + CTLTB, A, S, D, F, G, H, J, K, L, SCLN, QUOT, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, ENT, + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + ALTSP, LOWER, GUIEN, SFTJP, RAISE, ALTDL + //`--------------------' `--------------------' + ), + + [_LOWER] = LAYOUT_kc( + //,-----------------------------------------. ,-----------------------------------------. + , 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, , + //|------+------+------+------+------+------| |------+------+------+------+------+------| + , HOME, END, PGDN, PGUP, F11, LEFT, DOWN, UP, RGHT, F12, PIPE, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + , F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, , + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + , , , , , + //`--------------------' `--------------------' + ), + + [_RAISE] = LAYOUT_kc( + //,-----------------------------------------. ,-----------------------------------------. + , EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, , + //|------+------+------+------+------+------| |------+------+------+------+------+------| + , XXXXX, XXXXX, XXXXX, XXXXX, PSCR, GRV, MINS, PLUS, LCBR, RCBR, BSLS, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + , XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, TILD, UNDS, EQL, LBRC, RBRC, , + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + , , , , , + //`--------------------' `--------------------' + ), + + [_ADJUST] = LAYOUT_kc( + //,-----------------------------------------. ,-----------------------------------------. + RST, LRST, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LTOG, LHUI, LSAI, LVAI, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LMOD, LHUD, LSAD, LVAD, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + GUIEI, LOWER, SPC, ENT, RAISE, ALTKN + //`--------------------' `--------------------' + ) +}; + +int RGB_current_mode; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + #ifdef SSD1306OLED + iota_gfx_init(!has_usb()); // turns on the display + #endif +} + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED + +// When add source files to SRC in rules.mk, you can use functions. +const char *read_layer_state(void); +const char *read_logo(void); +void set_keylog(uint16_t keycode, keyrecord_t *record); +const char *read_keylog(void); +const char *read_keylogs(void); + +// const char *read_mode_icon(bool swap); +// const char *read_host_led_state(void); +// void set_timelog(void); +// const char *read_timelog(void); + +void matrix_scan_user(void) { + iota_gfx_task(); +} + +void matrix_render_user(struct CharacterMatrix *matrix) { + if (is_master) { + // If you want to change the display of OLED, you need to change here + matrix_write_ln(matrix, read_layer_state()); + matrix_write_ln(matrix, read_keylog()); + matrix_write_ln(matrix, read_keylogs()); + //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui)); + //matrix_write_ln(matrix, read_host_led_state()); + //matrix_write_ln(matrix, read_timelog()); + } else { + matrix_write(matrix, read_logo()); + } +} + +void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} + +void iota_gfx_task_user(void) { + struct CharacterMatrix matrix; + matrix_clear(&matrix); + matrix_render_user(&matrix); + matrix_update(&display, &matrix); +} +#endif//SSD1306OLED + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { +#ifdef SSD1306OLED + set_keylog(keycode, record); +#endif + // set_timelog(); + } + + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + case RGB_MOD: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + #endif + return false; + break; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + #endif + break; + } + return true; +} + diff --git a/keyboards/crkbd/keymaps/thumb_ctrl/rules.mk b/keyboards/crkbd/keymaps/thumb_ctrl/rules.mk new file mode 100755 index 000000000..16deaf45d --- /dev/null +++ b/keyboards/crkbd/keymaps/thumb_ctrl/rules.mk @@ -0,0 +1,31 @@ + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing + +# 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 you want to change the display of OLED, you need to change here +SRC += ./lib/glcdfont.c \ + ./lib/rgb_state_reader.c \ + ./lib/layer_state_reader.c \ + ./lib/logo_reader.c \ + ./lib/keylogger.c \ + # ./lib/mode_icon_reader.c \ + # ./lib/host_led_state_reader.c \ + # ./lib/timelogger.c \ From 1c75385d7663388e930933884b8a5de77e98692e Mon Sep 17 00:00:00 2001 From: henrikosorensen Date: Sat, 22 Jun 2019 17:36:05 +0200 Subject: [PATCH 250/341] [Keyboard] Add new keyboard: Omnikeyish - A replacement PCB for the Northgate Omnikey family (#6167) * Add omnikeyish keyboard support. * remove out of date comment * PCB Rev 1.1 moved Row5's pin to E6, because the teensy++ hangs an onboard LED off D6. * Move string.h include to .c file * Add pcb kicad link. * Add info.json * Move macro programming to numlock's keyposition, the most useless key on the post model M layout. Force numlock enabled on host at init time, so you're not stuck without a numpad (hopefully) * Make the macro blink function toggle LEDs from their previous state. * Use incorrect but code style compliant opening curly bracing style. * Make PCB rev 1.1 the default Omnikeyish config, as the author has the only rev 1.0 boards that'll ever be. * Fix silly spelling error in 3 defines * First set of review changes. * Layout macro and keymap defined using it. * Layout macros for the northgate factory plates. * minor rearrangements * ALL the layouts. * Forgot ultra-t in info.json --- keyboards/omnikeyish/config.h | 63 +++++ keyboards/omnikeyish/dynamic_macro.c | 252 ++++++++++++++++++ keyboards/omnikeyish/dynamic_macro.h | 95 +++++++ keyboards/omnikeyish/info.json | 36 +++ keyboards/omnikeyish/keymaps/default/keymap.c | 14 + keyboards/omnikeyish/omnikeyish.c | 55 ++++ keyboards/omnikeyish/omnikeyish.h | 159 +++++++++++ keyboards/omnikeyish/readme.md | 14 + keyboards/omnikeyish/rules.mk | 65 +++++ 9 files changed, 753 insertions(+) create mode 100644 keyboards/omnikeyish/config.h create mode 100644 keyboards/omnikeyish/dynamic_macro.c create mode 100644 keyboards/omnikeyish/dynamic_macro.h create mode 100644 keyboards/omnikeyish/info.json create mode 100644 keyboards/omnikeyish/keymaps/default/keymap.c create mode 100644 keyboards/omnikeyish/omnikeyish.c create mode 100644 keyboards/omnikeyish/omnikeyish.h create mode 100644 keyboards/omnikeyish/readme.md create mode 100644 keyboards/omnikeyish/rules.mk diff --git a/keyboards/omnikeyish/config.h b/keyboards/omnikeyish/config.h new file mode 100644 index 000000000..d510c64c9 --- /dev/null +++ b/keyboards/omnikeyish/config.h @@ -0,0 +1,63 @@ +#pragma once + +#include "config_common.h" + +#define KEYBOARD_PCB_REV 11 + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0666 +#define DEVICE_VER 0x1337 +#define MANUFACTURER Henrik O. Sørensen +#define PRODUCT Omnikey(-ish) Keyboard +#define DESCRIPTION Replacement PCB for Omnikey keyboards + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 23 + +/* key matrix pins */ +#if KEYBOARD_PCB_REV == 10 +#define MATRIX_ROW_PINS { D2, D3, D4, D5, D6, D7 } +#else +#define MATRIX_ROW_PINS { D2, D3, D4, D5, E6, D7 } +#endif +#define MATRIX_COL_PINS { F0, F1, F2, F3, F4, F5, F6, F7, C7, C6, C5, C4, C3, C2, C1, C0, B0, B1, B2, B3, B4, B5, B6 } + +#define NUMLOCKLEDPIN E0 +#define CAPSLOCKLEDPIN E1 +#define SCROLLLOCKLEDPIN B7 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* number of backlight levels */ +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 0 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* force n-key rollover*/ +#define FORCE_NKRO + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 0 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#define DYNAMIC_MACRO_COUNT 12 +#define DYNAMIC_MACRO_SIZE 48 +#define DYNAMIC_MACRO_EEPROM_STORAGE +#define DYNAMIC_MACRO_EEPROM_MAGIC_ADDR (uint16_t*)32 +#define DYNAMIC_MACRO_EEPROM_BLOCK0_ADDR (uint8_t*)34 diff --git a/keyboards/omnikeyish/dynamic_macro.c b/keyboards/omnikeyish/dynamic_macro.c new file mode 100644 index 000000000..c359b0bdd --- /dev/null +++ b/keyboards/omnikeyish/dynamic_macro.c @@ -0,0 +1,252 @@ +#include QMK_KEYBOARD_H +#include + +void dynamic_macro_init(void) { + /* zero out macro blocks */ + memset(&dynamic_macros, 0, DYNAMIC_MACRO_COUNT * sizeof(dynamic_macro_t)); +} + +/* Blink the LEDs to notify the user about some event. */ +void dynamic_macro_led_blink(void) { +#ifdef BACKLIGHT_ENABLE + backlight_toggle(); + wait_ms(100); + backlight_toggle(); +#else + led_set(host_keyboard_leds() ^ 0xFF); + wait_ms(100); + led_set(host_keyboard_leds()); +#endif +} + +/** + * Start recording of the dynamic macro. + * + * @param macro_id[in] The id of macro to be recorded + */ +void dynamic_macro_record_start(uint8_t macro_id) { + dprintf("dynamic macro recording: started for slot %d\n", macro_id); + + dynamic_macro_led_blink(); + + clear_keyboard(); + layer_clear(); + + dynamic_macros[macro_id].length = 0; +} + +/** + * Play the dynamic macro. + * + * @param macro_id[in] The id of macro to be played + */ +void dynamic_macro_play(uint8_t macro_id) { + dprintf("dynamic macro: slot %d playback, length %d\n", macro_id, dynamic_macros[macro_id].length); + + uint32_t saved_layer_state = layer_state; + + clear_keyboard(); + layer_clear(); + + for (uint8_t i = 0; i < dynamic_macros[macro_id].length; ++i) { + process_record(&dynamic_macros[macro_id].events[i]); + } + + clear_keyboard(); + + layer_state = saved_layer_state; +} + +/** + * Record a single key in a dynamic macro. + * + * @param macro_id[in] The start of the used macro buffer. + * @param record[in] The current keypress. + */ +void dynamic_macro_record_key(uint8_t macro_id, keyrecord_t* record) { + dynamic_macro_t* macro = &dynamic_macros[macro_id]; + uint8_t length = macro->length; + + /* If we've just started recording, ignore all the key releases. */ + if (!record->event.pressed && length == 0) { + dprintln("dynamic macro: ignoring a leading key-up event"); + return; + } + + if (length < DYNAMIC_MACRO_SIZE) { + macro->events[length] = *record; + macro->length = ++length; + } else { + dynamic_macro_led_blink(); + } + + dprintf("dynamic macro: slot %d length: %d/%d\n", macro_id, length, DYNAMIC_MACRO_SIZE); +} + +/** + * End recording of the dynamic macro. Essentially just update the + * pointer to the end of the macro. + */ +void dynamic_macro_record_end(uint8_t macro_id) { + dynamic_macro_led_blink(); + + dynamic_macro_t* macro = &dynamic_macros[macro_id]; + uint8_t length = macro->length; + + keyrecord_t* events_begin = &(macro->events[0]); + keyrecord_t* events_pointer = &(macro->events[length - 1]); + + dprintf("dynamic_macro: macro length before trimming: %d\n", macro->length); + while (events_pointer != events_begin && (events_pointer)->event.pressed) { + dprintln("dynamic macro: trimming a trailing key-down event"); + --(macro->length); + --events_pointer; + } + +#ifdef DYNAMIC_MACRO_EEPROM_STORAGE + macro->checksum = dynamic_macro_calc_crc(macro); + dynamic_macro_save_eeprom(macro_id); +#endif + + dprintf("dynamic macro: slot %d saved, length: %d\n", macro_id, length); +} + +/* Handle the key events related to the dynamic macros. Should be + * called from process_record_user() like this: + * + * bool process_record_user(uint16_t keycode, keyrecord_t *record) { + * if (!process_record_dynamic_macro(keycode, record)) { + * return false; + * } + * <...THE REST OF THE FUNCTION...> + * } + */ +bool process_record_dynamic_macro(uint16_t keycode, keyrecord_t* record) { + /* 0 to DYNAMIC_MACRO_COUNT -1 - macro macro_id is being recorded */ + static uint8_t macro_id = 255; + static uint8_t recording_state = STATE_NOT_RECORDING; + + if (STATE_NOT_RECORDING == recording_state) { + /* Program key pressed to request programming mode */ + if (keycode == DYN_MACRO_PROG && record->event.pressed) { + dynamic_macro_led_blink(); + + recording_state = STATE_RECORD_KEY_PRESSED; + dprintf("dynamic macro: programming key pressed, waiting for macro slot selection. %d\n", recording_state); + + return false; + } + /* Macro key pressed to request macro playback */ + if (keycode >= DYN_MACRO_KEY1 && keycode <= DYN_MACRO_KEY12 && record->event.pressed) { + dynamic_macro_play(keycode - DYN_MACRO_KEY1); + + return false; + } + + /* Non-dynamic macro key, process it elsewhere. */ + return true; + } else if (STATE_RECORD_KEY_PRESSED == recording_state) { + /* Program key pressed again before a macro selector key, cancel macro recording. + Blink leds to indicate cancelation. */ + if (keycode == DYN_MACRO_PROG && record->event.pressed) { + dynamic_macro_led_blink(); + + recording_state = STATE_NOT_RECORDING; + dprintf("dynamic macro: programming key pressed, programming mode canceled. %d\n", recording_state); + + return false; + } else if (keycode >= DYN_MACRO_KEY1 && keycode <= DYN_MACRO_KEY12 && record->event.pressed) { + macro_id = keycode - DYN_MACRO_KEY1; + + /* Macro slot selected, enter recording state. */ + recording_state = STATE_CURRENTLY_RECORDING; + dynamic_macro_record_start(macro_id); + + return false; + } + /* Ignore any non-macro key press while in RECORD_KEY_PRESSED state. */ + return false; + } else if (STATE_CURRENTLY_RECORDING == recording_state) { + /* Program key pressed to request end of macro recording. */ + if (keycode == DYN_MACRO_PROG && record->event.pressed) { + dynamic_macro_record_end(macro_id); + recording_state = STATE_NOT_RECORDING; + + return false; + } + /* Don't record other macro key presses. */ + else if (keycode >= DYN_MACRO_KEY1 && keycode <= DYN_MACRO_KEY12 && record->event.pressed) { + dprintln("dynamic macro: playback key ignored in programming mode."); + return false; + } + /* Non-macro keypress that should be recorded */ + else { + dynamic_macro_record_key(macro_id, record); + + /* Don't output recorded keypress. */ + return false; + } + } + + return true; +} + +#ifdef __AVR__ +# include +uint16_t dynamic_macro_calc_crc(dynamic_macro_t* macro) { + uint16_t crc = 0; + uint8_t* data = (uint8_t*)macro; + + for (uint16_t i = 0; i < DYNAMIC_MACRO_CRC_LENGTH; ++i) { + crc = _crc16_update(crc, *(data++)); + } + return crc; +} +#endif /* __AVR__ */ + +inline void* dynamic_macro_eeprom_macro_addr(uint8_t macro_id) { + return DYNAMIC_MACRO_EEPROM_BLOCK0_ADDR + sizeof(dynamic_macro_t) * macro_id; +} + +bool dynamic_macro_header_correct(void) { + return eeprom_read_word(DYNAMIC_MACRO_EEPROM_MAGIC_ADDR) == DYNAMIC_MACRO_EEPROM_MAGIC; +} + +void dynamic_macro_load_eeprom_all(void) { + if (!dynamic_macro_header_correct()) { + dprintf("dynamic_macro: eeprom header not valid, not restoring macros.\n"); + return; + } + + for (uint8_t i = 0; i < DYNAMIC_MACRO_COUNT; ++i) { + dynamic_macro_load_eeprom(i); + } +} + +void dynamic_macro_load_eeprom(uint8_t macro_id) { + dynamic_macro_t* dst = &dynamic_macros[macro_id]; + + eeprom_read_block(dst, dynamic_macro_eeprom_macro_addr(macro_id), sizeof(dynamic_macro_t)); + + /* Validate checksum, ifchecksum is NOT valid for macro, set its length to 0 to prevent its use. */ + if (dynamic_macro_calc_crc(dst) != dst->checksum) { + dprintf("dynamic macro: slot %d not loaded, checksum mismatch\n", macro_id); + dst->length = 0; + + return; + } + + dprintf("dynamic macro: slot %d loaded from eeprom, checksum okay\n", macro_id); +} + +void dynamic_macro_save_eeprom(uint8_t macro_id) { + if (!dynamic_macro_header_correct()) { + eeprom_write_word(DYNAMIC_MACRO_EEPROM_MAGIC_ADDR, DYNAMIC_MACRO_EEPROM_MAGIC); + dprintf("dynamic macro: writing magic eeprom header\n"); + } + + dynamic_macro_t* src = &dynamic_macros[macro_id]; + + eeprom_update_block(src, dynamic_macro_eeprom_macro_addr(macro_id), sizeof(dynamic_macro_t)); + dprintf("dynamic macro: slot %d saved to eeprom\n", macro_id); +} diff --git a/keyboards/omnikeyish/dynamic_macro.h b/keyboards/omnikeyish/dynamic_macro.h new file mode 100644 index 000000000..87665c443 --- /dev/null +++ b/keyboards/omnikeyish/dynamic_macro.h @@ -0,0 +1,95 @@ +/* Copyright 2016 Jack Humbert + * + * 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 . + */ + +/* Author: Wojciech Siewierski < wojciech dot siewierski at onet dot pl > */ +#pragma once + +#include "action.h" +#include "action_layer.h" + +#ifndef DYNAMIC_MACRO_COUNT +#define DYNAMIC_MACRO_COUNT 2 +#endif + +#ifndef DYNAMIC_MACRO_SIZE +/* May be overridden with a custom value. Be aware that the effective + * macro length is half of this value: each keypress is recorded twice + * because of the down-event and up-event. This is not a bug, it's the + * intended behavior. + * + * Usually it should be fine to set the macro size to at least 256 but + * there have been reports of it being too much in some users' cases, + * so 128 is considered a safe default. + */ +#define DYNAMIC_MACRO_SIZE 64 +#endif + +#ifndef DYNAMIC_MACRO_EEPROM_STORAGE +#define DYNAMIC_MACRO_EEPROM_STORAGE +#endif + +/* DYNAMIC_MACRO_RANGE must be set as the last element of user's + * "planck_keycodes" enum prior to including this header. This allows + * us to 'extend' it. + */ +enum dynamic_macro_keycodes { + DYN_MACRO_PROG = DYNAMIC_MACRO_RANGE, + + /* Requirement: DYN_MACRO_KEYs are in sequence in the enum. */ + DYN_MACRO_KEY1, + DYN_MACRO_KEY2, + DYN_MACRO_KEY3, + DYN_MACRO_KEY4, + DYN_MACRO_KEY5, + DYN_MACRO_KEY6, + DYN_MACRO_KEY7, + DYN_MACRO_KEY8, + DYN_MACRO_KEY9, + DYN_MACRO_KEY10, + DYN_MACRO_KEY11, + DYN_MACRO_KEY12 +}; + +enum dynamic_macro_recording_state { STATE_NOT_RECORDING, STATE_RECORD_KEY_PRESSED, STATE_CURRENTLY_RECORDING }; + +typedef struct { + keyrecord_t events[DYNAMIC_MACRO_SIZE]; + uint8_t length; + uint16_t checksum; +} dynamic_macro_t; + +dynamic_macro_t dynamic_macros[DYNAMIC_MACRO_COUNT]; + +void dynamic_macro_init(void); +void dynamic_macro_led_blink(void); +void dynamic_macro_record_start(uint8_t macro_id); +void dynamic_macro_play(uint8_t macro_id); +void dynamic_macro_record_key(uint8_t macro_id, keyrecord_t* record); +void dynamic_macro_record_end(uint8_t macro_id); +bool process_record_dynamic_macro(uint16_t keycode, keyrecord_t* record); + +#define DYNAMIC_MACRO_CRC_LENGTH (sizeof(dynamic_macro_t) - sizeof(uint16_t)) + +#ifdef DYNAMIC_MACRO_EEPROM_STORAGE +#define DYNAMIC_MACRO_EEPROM_MAGIC (uint16_t)0xDEAD + +uint16_t dynamic_macro_calc_crc(dynamic_macro_t* macro); +void dynamic_macro_load_eeprom_all(void); +void dynamic_macro_load_eeprom(uint8_t macro_id); +void dynamic_macro_save_eeprom(uint8_t macro_id); +bool dynamic_macro_header_correct(void); +#endif + diff --git a/keyboards/omnikeyish/info.json b/keyboards/omnikeyish/info.json new file mode 100644 index 000000000..0efb1270e --- /dev/null +++ b/keyboards/omnikeyish/info.json @@ -0,0 +1,36 @@ +{ + "keyboard_name": "Omnikey-(ish)", + "url": "https://github.com/henrikosorensen/keyboard_pcbs/tree/master/omnikeyish_pcb", + "maintainer": "qmk", + "width": 25.6667, + "height": 7, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"P11", "x":0, "y":0}, {"label":"P12", "x":1, "y":0}, {"label":"Esc", "x":2.6667, "y":0}, {"label":"F1", "x":4.6667, "y":0}, {"label":"F2", "x":5.6667, "y":0}, {"label":"F3", "x":6.6667, "y":0}, {"label":"F4", "x":7.6667, "y":0}, {"label":"F5", "x":9.1667, "y":0}, {"label":"F6", "x":10.1667, "y":0}, {"label":"F7", "x":11.1667, "y":0}, {"label":"F8", "x":12.1667, "y":0}, {"label":"F9", "x":13.6667, "y":0}, {"label":"F10", "x":14.6667, "y":0}, {"label":"F11", "x":15.6667, "y":0}, {"label":"F12", "x":16.6667, "y":0}, {"label":"PrtSc", "x":18.1667, "y":0}, {"label":"Scroll Lock", "x":19.1667, "y":0}, {"label":"Pause", "x":20.1667, "y":0}, {"x":21.6667, "y":0}, {"x":22.6667, "y":0}, {"x":23.6667, "y":0}, {"x":24.6667, "y":0}, {"label":"P1", "x":0, "y":2}, {"label":"P2", "x":1, "y":2}, {"label":"~", "x":2.6667, "y":2}, {"label":"!", "x":3.6667, "y":2}, {"label":"@", "x":4.6667, "y":2}, {"label":"#", "x":5.6667, "y":2}, {"label":"$", "x":6.6667, "y":2}, {"label":"%", "x":7.6667, "y":2}, {"label":"^", "x":8.6667, "y":2}, {"label":"&", "x":9.6667, "y":2}, {"label":"*", "x":10.6667, "y":2}, {"label":"(", "x":11.6667, "y":2}, {"label":")", "x":12.6667, "y":2}, {"label":"_", "x":13.6667, "y":2}, {"label":"+", "x":14.6667, "y":2}, {"label":"Back Space", "x":15.6667, "y":2, "w":2}, {"label":"Insert", "x":18.1667, "y":2}, {"label":"Home", "x":19.1667, "y":2}, {"label":"PgUp", "x":20.1667, "y":2}, {"label":"Num Lock", "x":21.6667, "y":2}, {"label":"/", "x":22.6667, "y":2}, {"label":"*", "x":23.6667, "y":2}, {"label":"-", "x":24.6667, "y":2}, {"label":"P3", "x":0, "y":3}, {"label":"P4", "x":1, "y":3}, {"label":"Tab", "x":2.6667, "y":3, "w":1.5}, {"label":"Q", "x":4.1667, "y":3}, {"label":"W", "x":5.1667, "y":3}, {"label":"E", "x":6.1667, "y":3}, {"label":"R", "x":7.1667, "y":3}, {"label":"T", "x":8.1667, "y":3}, {"label":"Y", "x":9.1667, "y":3}, {"label":"U", "x":10.1667, "y":3}, {"label":"I", "x":11.1667, "y":3}, {"label":"O", "x":12.1667, "y":3}, {"label":"P", "x":13.1667, "y":3}, {"label":"{", "x":14.1667, "y":3}, {"label":"}", "x":15.1667, "y":3}, {"label":"|", "x":16.1667, "y":3, "w":1.5}, {"label":"Delete", "x":18.1667, "y":3}, {"label":"End", "x":19.1667, "y":3}, {"label":"PgDn", "x":20.1667, "y":3}, {"label":"7", "x":21.6667, "y":3}, {"label":"8", "x":22.6667, "y":3}, {"label":"9", "x":23.6667, "y":3}, {"label":"+", "x":24.6667, "y":3}, {"label":"P5", "x":0, "y":4}, {"label":"P6", "x":1, "y":4}, {"label":"Caps Lock", "x":2.6667, "y":4, "w":1.75}, {"label":"A", "x":4.4167, "y":4}, {"label":"S", "x":5.4167, "y":4}, {"label":"D", "x":6.4167, "y":4}, {"label":"F", "x":7.4167, "y":4}, {"label":"G", "x":8.4167, "y":4}, {"label":"H", "x":9.4167, "y":4}, {"label":"J", "x":10.4167, "y":4}, {"label":"K", "x":11.4167, "y":4}, {"label":"L", "x":12.4167, "y":4}, {"label":":", "x":13.4167, "y":4}, {"label":"\"", "x":14.4167, "y":4}, {"label":"~", "x":15.4167, "y":4}, {"label":"Enter", "x":16.4167, "y":4, "w":1.25}, {"x":18.1667, "y":4}, {"x":19.1667, "y":4}, {"x":20.1667, "y":4}, {"label":"4", "x":21.6667, "y":4}, {"label":"5", "x":22.6667, "y":4}, {"label":"6", "x":23.6667, "y":4}, {"label":"=", "x":24.6667, "y":4}, {"label":"P7", "x":0, "y":5}, {"label":"P8", "x":1, "y":5}, {"label":"Shift", "x":2.6667, "y":5, "w":1.25}, {"label":"|", "x":3.9167, "y":5}, {"label":"Z", "x":4.9167, "y":5}, {"label":"X", "x":5.9167, "y":5}, {"label":"C", "x":6.9167, "y":5}, {"label":"V", "x":7.9167, "y":5}, {"label":"B", "x":8.9167, "y":5}, {"label":"N", "x":9.9167, "y":5}, {"label":"M", "x":10.9167, "y":5}, {"label":"<", "x":11.9167, "y":5}, {"label":">", "x":12.9167, "y":5}, {"label":"?", "x":13.9167, "y":5}, {"label":"Shift", "x":14.9167, "y":5, "w":1.75}, {"label":"|", "x":16.6667, "y":5}, {"x":18.1667, "y":5}, {"label":"\u2191", "x":19.1667, "y":5}, {"x":20.1667, "y":5}, {"label":"1", "x":21.6667, "y":5}, {"label":"2", "x":22.6667, "y":5}, {"label":"3", "x":23.6667, "y":5}, {"label":"Enter", "x":24.6667, "y":5, "h":2}, {"label":"P9", "x":0, "y":6}, {"label":"P10", "x":1, "y":6}, {"label":"Ctrl", "x":2.6667, "y":6, "w":1.25}, {"label":"Win", "x":3.9167, "y":6, "w":1.25}, {"label":"Alt", "x":5.1667, "y":6, "w":1.25}, {"x":6.4167, "y":6, "w":6.25}, {"label":"Alt Gr", "x":12.6667, "y":6, "w":1.25}, {"label":"Win", "x":13.9167, "y":6, "w":1.25}, {"label":"Compose", "x":15.1667, "y":6, "w":1.25}, {"label":"Ctrl", "x":16.4167, "y":6, "w":1.25}, {"label":"\u2190", "x":18.1667, "y":6}, {"label":"\u2193", "x":19.1667, "y":6}, {"label":"\u2192", "x":20.1667, "y":6}, {"label":"0", "x":21.6667, "y":6, "w":2}, {"label":".", "x":23.6667, "y":6}] + }, + "LAYOUT_101": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Num Lock", "x":18.5, "y":1.5}, {"label":"/", "x":19.5, "y":1.5}, {"label":"*", "x":20.5, "y":1.5}, {"label":"-", "x":21.5, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"7", "x":18.5, "y":2.5}, {"label":"8", "x":19.5, "y":2.5}, {"label":"9", "x":20.5, "y":2.5}, {"label":"+", "x":21.5, "y":2.5, "h":2}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"4", "x":18.5, "y":3.5}, {"label":"5", "x":19.5, "y":3.5}, {"label":"6", "x":20.5, "y":3.5}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"1", "x":18.5, "y":4.5}, {"label":"2", "x":19.5, "y":4.5}, {"label":"3", "x":20.5, "y":4.5}, {"label":"Enter", "x":21.5, "y":4.5, "h":2}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"label":"Alt", "x":11, "y":5.5, "w":1.5}, {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}, {"label":"0", "x":18.5, "y":5.5, "w":2}, {"label":".", "x":20.5, "y":5.5}] + }, + "LAYOUT_ultra_rev1": { + "layout": [{"label":"P11", "x":0, "y":0}, {"label":"P12", "x":1, "y":0}, {"label":"F1", "x":2.6667, "y":0}, {"label":"F2", "x":3.6667, "y":0}, {"label":"F3", "x":4.6667, "y":0}, {"label":"F4", "x":5.6667, "y":0}, {"label":"F5", "x":8.1667, "y":0}, {"label":"F6", "x":9.1667, "y":0}, {"label":"F7", "x":10.1667, "y":0}, {"label":"F8", "x":11.1667, "y":0}, {"label":"F9", "x":13.6667, "y":0}, {"label":"F10", "x":14.6667, "y":0}, {"label":"F11", "x":15.6667, "y":0}, {"label":"F12", "x":16.6667, "y":0}, {"label":"PrtSc", "x":18.6667, "y":0}, {"label":"Scroll Lock", "x":19.6667, "y":0}, {"label":"Pause", "x":20.6667, "y":0}, {"label":"P1", "x":0, "y":2}, {"label":"P2", "x":1, "y":2}, {"label":"Esc", "x":2.6667, "y":2}, {"label":"!", "x":3.6667, "y":2}, {"label":"@", "x":4.6667, "y":2}, {"label":"#", "x":5.6667, "y":2}, {"label":"$", "x":6.6667, "y":2}, {"label":"%", "x":7.6667, "y":2}, {"label":"^", "x":8.6667, "y":2}, {"label":"&", "x":9.6667, "y":2}, {"label":"*", "x":10.6667, "y":2}, {"label":"(", "x":11.6667, "y":2}, {"label":")", "x":12.6667, "y":2}, {"label":"_", "x":13.6667, "y":2}, {"label":"+", "x":14.6667, "y":2}, {"label":"Back Space", "x":15.6667, "y":2, "w":2}, {"label":"Insert", "x":18.1667, "y":2}, {"label":"Home", "x":19.1667, "y":2}, {"label":"PgUp", "x":20.1667, "y":2}, {"label":"Num Lock", "x":21.6667, "y":2}, {"label":"/", "x":22.6667, "y":2}, {"label":"*", "x":23.6667, "y":2}, {"label":"-", "x":24.6667, "y":2}, {"label":"P3", "x":0, "y":3}, {"label":"P4", "x":1, "y":3}, {"label":"Tab", "x":2.6667, "y":3, "w":1.5}, {"label":"Q", "x":4.1667, "y":3}, {"label":"W", "x":5.1667, "y":3}, {"label":"E", "x":6.1667, "y":3}, {"label":"R", "x":7.1667, "y":3}, {"label":"T", "x":8.1667, "y":3}, {"label":"Y", "x":9.1667, "y":3}, {"label":"U", "x":10.1667, "y":3}, {"label":"I", "x":11.1667, "y":3}, {"label":"O", "x":12.1667, "y":3}, {"label":"P", "x":13.1667, "y":3}, {"label":"{", "x":14.1667, "y":3}, {"label":"}", "x":15.1667, "y":3}, {"label":"Enter", "x":16.1667, "y":3, "w":1.5, "h":2}, {"label":"Delete", "x":18.1667, "y":3}, {"label":"End", "x":19.1667, "y":3}, {"label":"PgDn", "x":20.1667, "y":3}, {"label":"7", "x":21.6667, "y":3}, {"label":"8", "x":22.6667, "y":3}, {"label":"9", "x":23.6667, "y":3}, {"label":"+", "x":24.6667, "y":3}, {"label":"P5", "x":0, "y":4}, {"label":"P6", "x":1, "y":4}, {"label":"Caps Lock", "x":2.6667, "y":4, "w":1.75}, {"label":"A", "x":4.4167, "y":4}, {"label":"S", "x":5.4167, "y":4}, {"label":"D", "x":6.4167, "y":4}, {"label":"F", "x":7.4167, "y":4}, {"label":"G", "x":8.4167, "y":4}, {"label":"H", "x":9.4167, "y":4}, {"label":"J", "x":10.4167, "y":4}, {"label":"K", "x":11.4167, "y":4}, {"label":"L", "x":12.4167, "y":4}, {"label":":", "x":13.4167, "y":4}, {"label":"\"", "x":14.4167, "y":4}, {"x":18.1667, "y":4}, {"label":"\u2191", "x":19.1667, "y":4}, {"x":20.1667, "y":4}, {"label":"4", "x":21.6667, "y":4}, {"label":"5", "x":22.6667, "y":4}, {"label":"6", "x":23.6667, "y":4}, {"label":"=", "x":24.6667, "y":4}, {"label":"P7", "x":0, "y":5}, {"label":"P8", "x":1, "y":5}, {"label":"Shift", "x":2.6667, "y":5, "w":2.25}, {"label":"Z", "x":4.9167, "y":5}, {"label":"X", "x":5.9167, "y":5}, {"label":"C", "x":6.9167, "y":5}, {"label":"V", "x":7.9167, "y":5}, {"label":"B", "x":8.9167, "y":5}, {"label":"N", "x":9.9167, "y":5}, {"label":"M", "x":10.9167, "y":5}, {"label":"<", "x":11.9167, "y":5}, {"label":">", "x":12.9167, "y":5}, {"label":"?", "x":13.9167, "y":5}, {"label":"Shift", "x":14.9167, "y":5, "w":1.75}, {"label":"|", "x":16.6667, "y":5}, {"label":"\u2190", "x":18.1667, "y":5}, {"label":"\u2193", "x":19.1667, "y":5}, {"label":"\u2192", "x":20.1667, "y":5}, {"label":"1", "x":21.6667, "y":5}, {"label":"2", "x":22.6667, "y":5}, {"label":"3", "x":23.6667, "y":5}, {"label":"Enter", "x":24.6667, "y":5, "h":2}, {"label":"P9", "x":0, "y":6}, {"label":"P10", "x":1, "y":6}, {"label":"Ctrl", "x":2.6667, "y":6, "w":1.5}, {"label":"Win", "x":4.1667, "y":6}, {"label":"Alt", "x":5.1667, "y":6, "w":1.5}, {"x":6.6667, "y":6, "w":7}, {"label":"Alt Gr", "x":13.6667, "y":6, "w":1.5}, {"label":"~", "x":15.1667, "y":6}, {"label":"Ctrl", "x":16.1667, "y":6, "w":1.5}, {"label":"Insert", "x":18.1667, "y":6, "w":1.5}, {"label":"Delete", "x":19.6667, "y":6, "w":1.5}, {"label":"0", "x":21.6667, "y":6, "w":2}, {"label":".", "x":23.6667, "y":6}] + }, + "LAYOUT_ultra_rev3": { + "layout": [{"label":"P11", "x":0, "y":0}, {"label":"P12", "x":1, "y":0}, {"label":"Esc", "x":2.6667, "y":0}, {"label":"F1", "x":4.6667, "y":0}, {"label":"F2", "x":5.6667, "y":0}, {"label":"F3", "x":6.6667, "y":0}, {"label":"F4", "x":7.6667, "y":0}, {"label":"F5", "x":9.1667, "y":0}, {"label":"F6", "x":10.1667, "y":0}, {"label":"F7", "x":11.1667, "y":0}, {"label":"F8", "x":12.1667, "y":0}, {"label":"F9", "x":13.6667, "y":0}, {"label":"F10", "x":14.6667, "y":0}, {"label":"F11", "x":15.6667, "y":0}, {"label":"F12", "x":16.6667, "y":0}, {"label":"PrtSc", "x":18.1667, "y":0}, {"label":"Scroll Lock", "x":19.1667, "y":0}, {"label":"Pause", "x":20.1667, "y":0}, {"label":"P1", "x":0, "y":2}, {"label":"P2", "x":1, "y":2}, {"label":"~", "x":2.6667, "y":2}, {"label":"!", "x":3.6667, "y":2}, {"label":"@", "x":4.6667, "y":2}, {"label":"#", "x":5.6667, "y":2}, {"label":"$", "x":6.6667, "y":2}, {"label":"%", "x":7.6667, "y":2}, {"label":"^", "x":8.6667, "y":2}, {"label":"&", "x":9.6667, "y":2}, {"label":"*", "x":10.6667, "y":2}, {"label":"(", "x":11.6667, "y":2}, {"label":")", "x":12.6667, "y":2}, {"label":"_", "x":13.6667, "y":2}, {"label":"+", "x":14.6667, "y":2}, {"label":"Back Space", "x":15.6667, "y":2, "w":2}, {"label":"Insert", "x":18.1667, "y":2}, {"label":"Home", "x":19.1667, "y":2}, {"label":"PgUp", "x":20.1667, "y":2}, {"label":"Num Lock", "x":21.6667, "y":2}, {"label":"/", "x":22.6667, "y":2}, {"label":"*", "x":23.6667, "y":2}, {"label":"-", "x":24.6667, "y":2}, {"label":"P3", "x":0, "y":3}, {"label":"P4", "x":1, "y":3}, {"label":"Tab", "x":2.6667, "y":3, "w":1.5}, {"label":"Q", "x":4.1667, "y":3}, {"label":"W", "x":5.1667, "y":3}, {"label":"E", "x":6.1667, "y":3}, {"label":"R", "x":7.1667, "y":3}, {"label":"T", "x":8.1667, "y":3}, {"label":"Y", "x":9.1667, "y":3}, {"label":"U", "x":10.1667, "y":3}, {"label":"I", "x":11.1667, "y":3}, {"label":"O", "x":12.1667, "y":3}, {"label":"P", "x":13.1667, "y":3}, {"label":"{", "x":14.1667, "y":3}, {"label":"}", "x":15.1667, "y":3}, {"label":"Enter", "x":16.1667, "y":3, "w":1.5, "h":2}, {"label":"Delete", "x":18.1667, "y":3}, {"label":"End", "x":19.1667, "y":3}, {"label":"PgDn", "x":20.1667, "y":3}, {"label":"7", "x":21.6667, "y":3}, {"label":"8", "x":22.6667, "y":3}, {"label":"9", "x":23.6667, "y":3}, {"label":"+", "x":24.6667, "y":3}, {"label":"P5", "x":0, "y":4}, {"label":"P6", "x":1, "y":4}, {"label":"Caps Lock", "x":2.6667, "y":4, "w":1.75}, {"label":"A", "x":4.4167, "y":4}, {"label":"S", "x":5.4167, "y":4}, {"label":"D", "x":6.4167, "y":4}, {"label":"F", "x":7.4167, "y":4}, {"label":"G", "x":8.4167, "y":4}, {"label":"H", "x":9.4167, "y":4}, {"label":"J", "x":10.4167, "y":4}, {"label":"K", "x":11.4167, "y":4}, {"label":"L", "x":12.4167, "y":4}, {"label":":", "x":13.4167, "y":4}, {"label":"\"", "x":14.4167, "y":4}, {"x":18.1667, "y":4}, {"label":"\u2191", "x":19.1667, "y":4}, {"x":20.1667, "y":4}, {"label":"4", "x":21.6667, "y":4}, {"label":"5", "x":22.6667, "y":4}, {"label":"6", "x":23.6667, "y":4}, {"label":"=", "x":24.6667, "y":4}, {"label":"P7", "x":0, "y":5}, {"label":"P8", "x":1, "y":5}, {"label":"Shift", "x":2.6667, "y":5, "w":2.25}, {"label":"Z", "x":4.9167, "y":5}, {"label":"X", "x":5.9167, "y":5}, {"label":"C", "x":6.9167, "y":5}, {"label":"V", "x":7.9167, "y":5}, {"label":"B", "x":8.9167, "y":5}, {"label":"N", "x":9.9167, "y":5}, {"label":"M", "x":10.9167, "y":5}, {"label":"<", "x":11.9167, "y":5}, {"label":">", "x":12.9167, "y":5}, {"label":"?", "x":13.9167, "y":5}, {"label":"Shift", "x":14.9167, "y":5, "w":1.75}, {"label":"|", "x":16.6667, "y":5}, {"label":"\u2190", "x":18.1667, "y":5}, {"label":"\u2193", "x":19.1667, "y":5}, {"label":"\u2192", "x":20.1667, "y":5}, {"label":"1", "x":21.6667, "y":5}, {"label":"2", "x":22.6667, "y":5}, {"label":"3", "x":23.6667, "y":5}, {"label":"Enter", "x":24.6667, "y":5, "h":2}, {"label":"P9", "x":0, "y":6}, {"label":"P10", "x":1, "y":6}, {"label":"Ctrl", "x":2.6667, "y":6, "w":1.5}, {"label":"Win", "x":4.1667, "y":6}, {"label":"Alt", "x":5.1667, "y":6, "w":1.5}, {"x":6.6667, "y":6, "w":7}, {"label":"Alt Gr", "x":13.6667, "y":6, "w":1.5}, {"label":"Compose", "x":15.1667, "y":6}, {"label":"Ctrl", "x":16.1667, "y":6, "w":1.5}, {"label":"Insert", "x":18.1667, "y":6, "w":1.5}, {"label":"Delete", "x":19.6667, "y":6, "w":1.5}, {"label":"0", "x":21.6667, "y":6, "w":2}, {"label":".", "x":23.6667, "y":6}] + }, + "LAYOUT_plus_rev3": { + "layout": [{"label":"F11", "x":0, "y":0}, {"label":"F12", "x":1, "y":0}, {"label":"Esc", "x":2.6667, "y":0}, {"label":"PrtSc", "x":18.1667, "y":0}, {"label":"Scroll Lock", "x":19.1667, "y":0}, {"label":"Pause", "x":20.1667, "y":0}, {"label":"F1", "x":0, "y":2}, {"label":"F2", "x":1, "y":2}, {"label":"~", "x":2.6667, "y":2}, {"label":"!", "x":3.6667, "y":2}, {"label":"@", "x":4.6667, "y":2}, {"label":"#", "x":5.6667, "y":2}, {"label":"$", "x":6.6667, "y":2}, {"label":"%", "x":7.6667, "y":2}, {"label":"^", "x":8.6667, "y":2}, {"label":"&", "x":9.6667, "y":2}, {"label":"*", "x":10.6667, "y":2}, {"label":"(", "x":11.6667, "y":2}, {"label":")", "x":12.6667, "y":2}, {"label":"_", "x":13.6667, "y":2}, {"label":"+", "x":14.6667, "y":2}, {"label":"Back Space", "x":15.6667, "y":2, "w":2}, {"label":"Insert", "x":18.1667, "y":2}, {"label":"Home", "x":19.1667, "y":2}, {"label":"PgUp", "x":20.1667, "y":2}, {"label":"Num Lock", "x":21.6667, "y":2}, {"label":"/", "x":22.6667, "y":2}, {"label":"*", "x":23.6667, "y":2}, {"label":"-", "x":24.6667, "y":2}, {"label":"F3", "x":0, "y":3}, {"label":"F4", "x":1, "y":3}, {"label":"Tab", "x":2.6667, "y":3, "w":1.5}, {"label":"Q", "x":4.1667, "y":3}, {"label":"W", "x":5.1667, "y":3}, {"label":"E", "x":6.1667, "y":3}, {"label":"R", "x":7.1667, "y":3}, {"label":"T", "x":8.1667, "y":3}, {"label":"Y", "x":9.1667, "y":3}, {"label":"U", "x":10.1667, "y":3}, {"label":"I", "x":11.1667, "y":3}, {"label":"O", "x":12.1667, "y":3}, {"label":"P", "x":13.1667, "y":3}, {"label":"{", "x":14.1667, "y":3}, {"label":"}", "x":15.1667, "y":3}, {"label":"Enter", "x":16.1667, "y":3, "w":1.5, "h":2}, {"label":"Delete", "x":18.1667, "y":3}, {"label":"End", "x":19.1667, "y":3}, {"label":"PgDn", "x":20.1667, "y":3}, {"label":"7", "x":21.6667, "y":3}, {"label":"8", "x":22.6667, "y":3}, {"label":"9", "x":23.6667, "y":3}, {"label":"+", "x":24.6667, "y":3}, {"label":"F5", "x":0, "y":4}, {"label":"F6", "x":1, "y":4}, {"label":"Caps Lock", "x":2.6667, "y":4, "w":1.75}, {"label":"A", "x":4.4167, "y":4}, {"label":"S", "x":5.4167, "y":4}, {"label":"D", "x":6.4167, "y":4}, {"label":"F", "x":7.4167, "y":4}, {"label":"G", "x":8.4167, "y":4}, {"label":"H", "x":9.4167, "y":4}, {"label":"J", "x":10.4167, "y":4}, {"label":"K", "x":11.4167, "y":4}, {"label":"L", "x":12.4167, "y":4}, {"label":":", "x":13.4167, "y":4}, {"label":"\"", "x":14.4167, "y":4}, {"x":18.1667, "y":4}, {"label":"\u2191", "x":19.1667, "y":4}, {"x":20.1667, "y":4}, {"label":"4", "x":21.6667, "y":4}, {"label":"5", "x":22.6667, "y":4}, {"label":"6", "x":23.6667, "y":4}, {"label":"=", "x":24.6667, "y":4}, {"label":"F7", "x":0, "y":5}, {"label":"F8", "x":1, "y":5}, {"label":"Shift", "x":2.6667, "y":5, "w":2.25}, {"label":"Z", "x":4.9167, "y":5}, {"label":"X", "x":5.9167, "y":5}, {"label":"C", "x":6.9167, "y":5}, {"label":"V", "x":7.9167, "y":5}, {"label":"B", "x":8.9167, "y":5}, {"label":"N", "x":9.9167, "y":5}, {"label":"M", "x":10.9167, "y":5}, {"label":"<", "x":11.9167, "y":5}, {"label":">", "x":12.9167, "y":5}, {"label":"?", "x":13.9167, "y":5}, {"label":"Shift", "x":14.9167, "y":5, "w":1.75}, {"label":"|", "x":16.6667, "y":5}, {"label":"\u2190", "x":18.1667, "y":5}, {"label":"\u2193", "x":19.1667, "y":5}, {"label":"\u2192", "x":20.1667, "y":5}, {"label":"1", "x":21.6667, "y":5}, {"label":"2", "x":22.6667, "y":5}, {"label":"3", "x":23.6667, "y":5}, {"label":"Enter", "x":24.6667, "y":5, "h":2}, {"label":"F9", "x":0, "y":6}, {"label":"F10", "x":1, "y":6}, {"label":"Ctrl", "x":2.6667, "y":6, "w":1.5}, {"label":"Win", "x":4.1667, "y":6}, {"label":"Alt", "x":5.1667, "y":6, "w":1.5}, {"x":6.6667, "y":6, "w":7}, {"label":"Alt Gr", "x":13.6667, "y":6, "w":1.5}, {"label":"Compose", "x":15.1667, "y":6}, {"label":"Ctrl", "x":16.1667, "y":6, "w":1.5}, {"label":"Insert", "x":18.1667, "y":6, "w":1.5}, {"label":"Delete", "x":19.6667, "y":6, "w":1.5}, {"label":"0", "x":21.6667, "y":6, "w":2}, {"label":".", "x":23.6667, "y":6}] + }, + "LAYOUT_plus_rev1": { + "layout": [{"label":"F11", "x":0, "y":0}, {"label":"F12", "x":1, "y":0}, {"label":"PrtSc", "x":18.1667, "y":0}, {"label":"Scroll Lock", "x":19.1667, "y":0}, {"label":"Pause", "x":20.1667, "y":0}, {"label":"F1", "x":0, "y":2}, {"label":"F2", "x":1, "y":2}, {"label":"Esc", "x":2.6667, "y":2}, {"label":"!", "x":3.6667, "y":2}, {"label":"@", "x":4.6667, "y":2}, {"label":"#", "x":5.6667, "y":2}, {"label":"$", "x":6.6667, "y":2}, {"label":"%", "x":7.6667, "y":2}, {"label":"^", "x":8.6667, "y":2}, {"label":"&", "x":9.6667, "y":2}, {"label":"*", "x":10.6667, "y":2}, {"label":"(", "x":11.6667, "y":2}, {"label":")", "x":12.6667, "y":2}, {"label":"_", "x":13.6667, "y":2}, {"label":"+", "x":14.6667, "y":2}, {"label":"Back Space", "x":15.6667, "y":2, "w":2}, {"label":"Insert", "x":18.1667, "y":2}, {"label":"Home", "x":19.1667, "y":2}, {"label":"PgUp", "x":20.1667, "y":2}, {"label":"Num Lock", "x":21.6667, "y":2}, {"label":"/", "x":22.6667, "y":2}, {"label":"*", "x":23.6667, "y":2}, {"label":"-", "x":24.6667, "y":2}, {"label":"F3", "x":0, "y":3}, {"label":"F4", "x":1, "y":3}, {"label":"Tab", "x":2.6667, "y":3, "w":1.5}, {"label":"Q", "x":4.1667, "y":3}, {"label":"W", "x":5.1667, "y":3}, {"label":"E", "x":6.1667, "y":3}, {"label":"R", "x":7.1667, "y":3}, {"label":"T", "x":8.1667, "y":3}, {"label":"Y", "x":9.1667, "y":3}, {"label":"U", "x":10.1667, "y":3}, {"label":"I", "x":11.1667, "y":3}, {"label":"O", "x":12.1667, "y":3}, {"label":"P", "x":13.1667, "y":3}, {"label":"{", "x":14.1667, "y":3}, {"label":"}", "x":15.1667, "y":3}, {"label":"Enter", "x":16.1667, "y":3, "w":1.5, "h":2}, {"label":"Delete", "x":18.1667, "y":3}, {"label":"End", "x":19.1667, "y":3}, {"label":"PgDn", "x":20.1667, "y":3}, {"label":"7", "x":21.6667, "y":3}, {"label":"8", "x":22.6667, "y":3}, {"label":"9", "x":23.6667, "y":3}, {"label":"+", "x":24.6667, "y":3}, {"label":"F5", "x":0, "y":4}, {"label":"F6", "x":1, "y":4}, {"label":"Caps Lock", "x":2.6667, "y":4, "w":1.75}, {"label":"A", "x":4.4167, "y":4}, {"label":"S", "x":5.4167, "y":4}, {"label":"D", "x":6.4167, "y":4}, {"label":"F", "x":7.4167, "y":4}, {"label":"G", "x":8.4167, "y":4}, {"label":"H", "x":9.4167, "y":4}, {"label":"J", "x":10.4167, "y":4}, {"label":"K", "x":11.4167, "y":4}, {"label":"L", "x":12.4167, "y":4}, {"label":":", "x":13.4167, "y":4}, {"label":"\"", "x":14.4167, "y":4}, {"x":18.1667, "y":4}, {"label":"\u2191", "x":19.1667, "y":4}, {"x":20.1667, "y":4}, {"label":"4", "x":21.6667, "y":4}, {"label":"5", "x":22.6667, "y":4}, {"label":"6", "x":23.6667, "y":4}, {"label":"=", "x":24.6667, "y":4}, {"label":"F7", "x":0, "y":5}, {"label":"F8", "x":1, "y":5}, {"label":"Shift", "x":2.6667, "y":5, "w":2.25}, {"label":"Z", "x":4.9167, "y":5}, {"label":"X", "x":5.9167, "y":5}, {"label":"C", "x":6.9167, "y":5}, {"label":"V", "x":7.9167, "y":5}, {"label":"B", "x":8.9167, "y":5}, {"label":"N", "x":9.9167, "y":5}, {"label":"M", "x":10.9167, "y":5}, {"label":"<", "x":11.9167, "y":5}, {"label":">", "x":12.9167, "y":5}, {"label":"?", "x":13.9167, "y":5}, {"label":"Shift", "x":14.9167, "y":5, "w":1.75}, {"label":"|", "x":16.6667, "y":5}, {"label":"\u2190", "x":18.1667, "y":5}, {"label":"\u2193", "x":19.1667, "y":5}, {"label":"\u2192", "x":20.1667, "y":5}, {"label":"1", "x":21.6667, "y":5}, {"label":"2", "x":22.6667, "y":5}, {"label":"3", "x":23.6667, "y":5}, {"label":"Enter", "x":24.6667, "y":5, "h":2}, {"label":"F9", "x":0, "y":6}, {"label":"F10", "x":1, "y":6}, {"label":"Ctrl", "x":2.6667, "y":6, "w":1.5}, {"label":"Win", "x":4.1667, "y":6}, {"label":"Alt", "x":5.1667, "y":6, "w":1.5}, {"x":6.6667, "y":6, "w":7}, {"label":"Alt Gr", "x":13.6667, "y":6, "w":1.5}, {"label":"~", "x":15.1667, "y":6}, {"label":"Ctrl", "x":16.1667, "y":6, "w":1.5}, {"label":"Insert", "x":18.1667, "y":6, "w":1.5}, {"label":"Delete", "x":19.6667, "y":6, "w":1.5}, {"label":"0", "x":21.6667, "y":6, "w":2}, {"label":".", "x":23.6667, "y":6}] + }, + "LAYOUT_102_rev1": { + "layout": [{"label":"F11", "x":0, "y":0}, {"label":"F12", "x":1, "y":0}, {"label":"PrtSc", "x":18.1667, "y":0}, {"label":"Scroll Lock", "x":19.1667, "y":0}, {"label":"Pause", "x":20.1667, "y":0}, {"label":"F1", "x":0, "y":2}, {"label":"F2", "x":1, "y":2}, {"label":"Esc", "x":2.6667, "y":2}, {"label":"!", "x":3.6667, "y":2}, {"label":"@", "x":4.6667, "y":2}, {"label":"#", "x":5.6667, "y":2}, {"label":"$", "x":6.6667, "y":2}, {"label":"%", "x":7.6667, "y":2}, {"label":"^", "x":8.6667, "y":2}, {"label":"&", "x":9.6667, "y":2}, {"label":"*", "x":10.6667, "y":2}, {"label":"(", "x":11.6667, "y":2}, {"label":")", "x":12.6667, "y":2}, {"label":"_", "x":13.6667, "y":2}, {"label":"+", "x":14.6667, "y":2}, {"label":"Back Space", "x":15.6667, "y":2, "w":2}, {"label":"Insert", "x":18.1667, "y":2}, {"label":"Home", "x":19.1667, "y":2}, {"label":"PgUp", "x":20.1667, "y":2}, {"label":"Num Lock", "x":21.6667, "y":2}, {"label":"/", "x":22.6667, "y":2}, {"label":"*", "x":23.6667, "y":2}, {"label":"-", "x":24.6667, "y":2}, {"label":"F3", "x":0, "y":3}, {"label":"F4", "x":1, "y":3}, {"label":"Tab", "x":2.6667, "y":3, "w":1.5}, {"label":"Q", "x":4.1667, "y":3}, {"label":"W", "x":5.1667, "y":3}, {"label":"E", "x":6.1667, "y":3}, {"label":"R", "x":7.1667, "y":3}, {"label":"T", "x":8.1667, "y":3}, {"label":"Y", "x":9.1667, "y":3}, {"label":"U", "x":10.1667, "y":3}, {"label":"I", "x":11.1667, "y":3}, {"label":"O", "x":12.1667, "y":3}, {"label":"P", "x":13.1667, "y":3}, {"label":"{", "x":14.1667, "y":3}, {"label":"}", "x":15.1667, "y":3}, {"label":"Enter", "x":16.1667, "y":3, "w":1.5, "h":2}, {"label":"Delete", "x":18.1667, "y":3}, {"label":"End", "x":19.1667, "y":3}, {"label":"PgDn", "x":20.1667, "y":3}, {"label":"7", "x":21.6667, "y":3}, {"label":"8", "x":22.6667, "y":3}, {"label":"9", "x":23.6667, "y":3}, {"label":"+", "x":24.6667, "y":3}, {"label":"F5", "x":0, "y":4}, {"label":"F6", "x":1, "y":4}, {"label":"Caps Lock", "x":2.6667, "y":4, "w":1.75}, {"label":"A", "x":4.4167, "y":4}, {"label":"S", "x":5.4167, "y":4}, {"label":"D", "x":6.4167, "y":4}, {"label":"F", "x":7.4167, "y":4}, {"label":"G", "x":8.4167, "y":4}, {"label":"H", "x":9.4167, "y":4}, {"label":"J", "x":10.4167, "y":4}, {"label":"K", "x":11.4167, "y":4}, {"label":"L", "x":12.4167, "y":4}, {"label":":", "x":13.4167, "y":4}, {"label":"\"", "x":14.4167, "y":4}, {"label":"4", "x":21.6667, "y":4}, {"label":"5", "x":22.6667, "y":4}, {"label":"6", "x":23.6667, "y":4}, {"label":"=", "x":24.6667, "y":4}, {"label":"F7", "x":0, "y":5}, {"label":"F8", "x":1, "y":5}, {"label":"Shift", "x":2.6667, "y":5, "w":2.25}, {"label":"Z", "x":4.9167, "y":5}, {"label":"X", "x":5.9167, "y":5}, {"label":"C", "x":6.9167, "y":5}, {"label":"V", "x":7.9167, "y":5}, {"label":"B", "x":8.9167, "y":5}, {"label":"N", "x":9.9167, "y":5}, {"label":"M", "x":10.9167, "y":5}, {"label":"<", "x":11.9167, "y":5}, {"label":">", "x":12.9167, "y":5}, {"label":"?", "x":13.9167, "y":5}, {"label":"Shift", "x":14.9167, "y":5, "w":1.75}, {"label":"|", "x":16.6667, "y":5}, {"label":"\u2191", "x":19.1667, "y":5}, {"label":"1", "x":21.6667, "y":5}, {"label":"2", "x":22.6667, "y":5}, {"label":"3", "x":23.6667, "y":5}, {"label":"Enter", "x":24.6667, "y":5, "h":2}, {"label":"F9", "x":0, "y":6}, {"label":"F10", "x":1, "y":6}, {"label":"Ctrl", "x":2.6667, "y":6, "w":1.5}, {"label":"Win", "x":4.1667, "y":6}, {"label":"Alt", "x":5.1667, "y":6, "w":1.5}, {"x":6.6667, "y":6, "w":7}, {"label":"Alt Gr", "x":13.6667, "y":6, "w":1.5}, {"label":"~", "x":15.1667, "y":6}, {"label":"Ctrl", "x":16.1667, "y":6, "w":1.5}, {"label":"\u2190", "x":18.1667, "y":6}, {"label":"\u2193", "x":19.1667, "y":6}, {"label":"\u2192", "x":20.1667, "y":6}, {"label":"0", "x":21.6667, "y":6, "w":2}, {"label":".", "x":23.6667, "y":6}] + }, + "LAYOUT_102_rev3": { + "layout": [{"label":"F11", "x":0, "y":0}, {"label":"F12", "x":1, "y":0}, {"label":"Esc", "x":2.6667, "y":0}, {"label":"PrtSc", "x":18.1667, "y":0}, {"label":"Scroll Lock", "x":19.1667, "y":0}, {"label":"Pause", "x":20.1667, "y":0}, {"label":"F1", "x":0, "y":2}, {"label":"F2", "x":1, "y":2}, {"label":"~", "x":2.6667, "y":2}, {"label":"!", "x":3.6667, "y":2}, {"label":"@", "x":4.6667, "y":2}, {"label":"#", "x":5.6667, "y":2}, {"label":"$", "x":6.6667, "y":2}, {"label":"%", "x":7.6667, "y":2}, {"label":"^", "x":8.6667, "y":2}, {"label":"&", "x":9.6667, "y":2}, {"label":"*", "x":10.6667, "y":2}, {"label":"(", "x":11.6667, "y":2}, {"label":")", "x":12.6667, "y":2}, {"label":"_", "x":13.6667, "y":2}, {"label":"+", "x":14.6667, "y":2}, {"label":"Back Space", "x":15.6667, "y":2, "w":2}, {"label":"Insert", "x":18.1667, "y":2}, {"label":"Home", "x":19.1667, "y":2}, {"label":"PgUp", "x":20.1667, "y":2}, {"label":"Num Lock", "x":21.6667, "y":2}, {"label":"/", "x":22.6667, "y":2}, {"label":"*", "x":23.6667, "y":2}, {"label":"-", "x":24.6667, "y":2}, {"label":"F3", "x":0, "y":3}, {"label":"F4", "x":1, "y":3}, {"label":"Tab", "x":2.6667, "y":3, "w":1.5}, {"label":"Q", "x":4.1667, "y":3}, {"label":"W", "x":5.1667, "y":3}, {"label":"E", "x":6.1667, "y":3}, {"label":"R", "x":7.1667, "y":3}, {"label":"T", "x":8.1667, "y":3}, {"label":"Y", "x":9.1667, "y":3}, {"label":"U", "x":10.1667, "y":3}, {"label":"I", "x":11.1667, "y":3}, {"label":"O", "x":12.1667, "y":3}, {"label":"P", "x":13.1667, "y":3}, {"label":"{", "x":14.1667, "y":3}, {"label":"}", "x":15.1667, "y":3}, {"label":"Enter", "x":16.1667, "y":3, "w":1.5, "h":2}, {"label":"Delete", "x":18.1667, "y":3}, {"label":"End", "x":19.1667, "y":3}, {"label":"PgDn", "x":20.1667, "y":3}, {"label":"7", "x":21.6667, "y":3}, {"label":"8", "x":22.6667, "y":3}, {"label":"9", "x":23.6667, "y":3}, {"label":"+", "x":24.6667, "y":3}, {"label":"F5", "x":0, "y":4}, {"label":"F6", "x":1, "y":4}, {"label":"Caps Lock", "x":2.6667, "y":4, "w":1.75}, {"label":"A", "x":4.4167, "y":4}, {"label":"S", "x":5.4167, "y":4}, {"label":"D", "x":6.4167, "y":4}, {"label":"F", "x":7.4167, "y":4}, {"label":"G", "x":8.4167, "y":4}, {"label":"H", "x":9.4167, "y":4}, {"label":"J", "x":10.4167, "y":4}, {"label":"K", "x":11.4167, "y":4}, {"label":"L", "x":12.4167, "y":4}, {"label":":", "x":13.4167, "y":4}, {"label":"\"", "x":14.4167, "y":4}, {"label":"4", "x":21.6667, "y":4}, {"label":"5", "x":22.6667, "y":4}, {"label":"6", "x":23.6667, "y":4}, {"label":"=", "x":24.6667, "y":4}, {"label":"F7", "x":0, "y":5}, {"label":"F8", "x":1, "y":5}, {"label":"Shift", "x":2.6667, "y":5, "w":2.25}, {"label":"Z", "x":4.9167, "y":5}, {"label":"X", "x":5.9167, "y":5}, {"label":"C", "x":6.9167, "y":5}, {"label":"V", "x":7.9167, "y":5}, {"label":"B", "x":8.9167, "y":5}, {"label":"N", "x":9.9167, "y":5}, {"label":"M", "x":10.9167, "y":5}, {"label":"<", "x":11.9167, "y":5}, {"label":">", "x":12.9167, "y":5}, {"label":"?", "x":13.9167, "y":5}, {"label":"Shift", "x":14.9167, "y":5, "w":1.75}, {"label":"|", "x":16.6667, "y":5}, {"label":"\u2191", "x":19.1667, "y":5}, {"label":"1", "x":21.6667, "y":5}, {"label":"2", "x":22.6667, "y":5}, {"label":"3", "x":23.6667, "y":5}, {"label":"Enter", "x":24.6667, "y":5, "h":2}, {"label":"F9", "x":0, "y":6}, {"label":"F10", "x":1, "y":6}, {"label":"Ctrl", "x":2.6667, "y":6, "w":1.5}, {"label":"Win", "x":4.1667, "y":6}, {"label":"Alt", "x":5.1667, "y":6, "w":1.5}, {"x":6.6667, "y":6, "w":7}, {"label":"Alt Gr", "x":13.6667, "y":6, "w":1.5}, {"label":"*", "x":15.1667, "y":6}, {"label":"Ctrl", "x":16.1667, "y":6, "w":1.5}, {"label":"\u2190", "x":18.1667, "y":6}, {"label":"\u2193", "x":19.1667, "y":6}, {"label":"\u2192", "x":20.1667, "y":6}, {"label":"0", "x":21.6667, "y":6, "w":2}, {"label":".", "x":23.6667, "y":6}] + }, + "LAYOUT_ultra_t": { + "layout": [{"label":"P11", "x":0, "y":0}, {"label":"P12", "x":1, "y":0}, {"label":"Esc", "x":2.6667, "y":0}, {"label":"F1", "x":4.6667, "y":0}, {"label":"F2", "x":5.6667, "y":0}, {"label":"F3", "x":6.6667, "y":0}, {"label":"F4", "x":7.6667, "y":0}, {"label":"F5", "x":9.1667, "y":0}, {"label":"F6", "x":10.1667, "y":0}, {"label":"F7", "x":11.1667, "y":0}, {"label":"F8", "x":12.1667, "y":0}, {"label":"F9", "x":13.6667, "y":0}, {"label":"F10", "x":14.6667, "y":0}, {"label":"F11", "x":15.6667, "y":0}, {"label":"F12", "x":16.6667, "y":0}, {"label":"PrtSc", "x":18.1667, "y":0}, {"label":"Scroll Lock", "x":19.1667, "y":0}, {"label":"Pause", "x":20.1667, "y":0}, {"label":"P1", "x":0, "y":2}, {"label":"P2", "x":1, "y":2}, {"label":"~", "x":2.6667, "y":2}, {"label":"!", "x":3.6667, "y":2}, {"label":"@", "x":4.6667, "y":2}, {"label":"#", "x":5.6667, "y":2}, {"label":"$", "x":6.6667, "y":2}, {"label":"%", "x":7.6667, "y":2}, {"label":"^", "x":8.6667, "y":2}, {"label":"&", "x":9.6667, "y":2}, {"label":"*", "x":10.6667, "y":2}, {"label":"(", "x":11.6667, "y":2}, {"label":")", "x":12.6667, "y":2}, {"label":"_", "x":13.6667, "y":2}, {"label":"+", "x":14.6667, "y":2}, {"label":"Back Space", "x":15.6667, "y":2, "w":2}, {"label":"Insert", "x":18.1667, "y":2}, {"label":"Home", "x":19.1667, "y":2}, {"label":"PgUp", "x":20.1667, "y":2}, {"label":"Num Lock", "x":21.6667, "y":2}, {"label":"/", "x":22.6667, "y":2}, {"label":"*", "x":23.6667, "y":2}, {"label":"-", "x":24.6667, "y":2}, {"label":"P3", "x":0, "y":3}, {"label":"P4", "x":1, "y":3}, {"label":"Tab", "x":2.6667, "y":3, "w":1.5}, {"label":"Q", "x":4.1667, "y":3}, {"label":"W", "x":5.1667, "y":3}, {"label":"E", "x":6.1667, "y":3}, {"label":"R", "x":7.1667, "y":3}, {"label":"T", "x":8.1667, "y":3}, {"label":"Y", "x":9.1667, "y":3}, {"label":"U", "x":10.1667, "y":3}, {"label":"I", "x":11.1667, "y":3}, {"label":"O", "x":12.1667, "y":3}, {"label":"P", "x":13.1667, "y":3}, {"label":"{", "x":14.1667, "y":3}, {"label":"}", "x":15.1667, "y":3}, {"label":"Enter", "x":16.1667, "y":3, "w":1.5, "h":2}, {"label":"Delete", "x":18.1667, "y":3}, {"label":"End", "x":19.1667, "y":3}, {"label":"PgDn", "x":20.1667, "y":3}, {"label":"7", "x":21.6667, "y":3}, {"label":"8", "x":22.6667, "y":3}, {"label":"9", "x":23.6667, "y":3}, {"label":"+", "x":24.6667, "y":3}, {"label":"P5", "x":0, "y":4}, {"label":"P6", "x":1, "y":4}, {"label":"Caps Lock", "x":2.6667, "y":4, "w":1.75}, {"label":"A", "x":4.4167, "y":4}, {"label":"S", "x":5.4167, "y":4}, {"label":"D", "x":6.4167, "y":4}, {"label":"F", "x":7.4167, "y":4}, {"label":"G", "x":8.4167, "y":4}, {"label":"H", "x":9.4167, "y":4}, {"label":"J", "x":10.4167, "y":4}, {"label":"K", "x":11.4167, "y":4}, {"label":"L", "x":12.4167, "y":4}, {"label":":", "x":13.4167, "y":4}, {"label":"\"", "x":14.4167, "y":4}, {"label":"4", "x":21.6667, "y":4}, {"label":"5", "x":22.6667, "y":4}, {"label":"6", "x":23.6667, "y":4}, {"label":"=", "x":24.6667, "y":4}, {"label":"P7", "x":0, "y":5}, {"label":"P8", "x":1, "y":5}, {"label":"Shift", "x":2.6667, "y":5, "w":2.25}, {"label":"Z", "x":4.9167, "y":5}, {"label":"X", "x":5.9167, "y":5}, {"label":"C", "x":6.9167, "y":5}, {"label":"V", "x":7.9167, "y":5}, {"label":"B", "x":8.9167, "y":5}, {"label":"N", "x":9.9167, "y":5}, {"label":"M", "x":10.9167, "y":5}, {"label":"<", "x":11.9167, "y":5}, {"label":">", "x":12.9167, "y":5}, {"label":"?", "x":13.9167, "y":5}, {"label":"Shift", "x":14.9167, "y":5, "w":1.75}, {"label":"|", "x":16.6667, "y":5}, {"label":"\u2191", "x":19.1667, "y":5}, {"label":"1", "x":21.6667, "y":5}, {"label":"2", "x":22.6667, "y":5}, {"label":"3", "x":23.6667, "y":5}, {"label":"Enter", "x":24.6667, "y":5, "h":2}, {"label":"P9", "x":0, "y":6}, {"label":"P10", "x":1, "y":6}, {"label":"Ctrl", "x":2.6667, "y":6, "w":1.5}, {"label":"Win", "x":4.1667, "y":6}, {"label":"Alt", "x":5.1667, "y":6, "w":1.5}, {"x":6.6667, "y":6, "w":7}, {"label":"Alt Gr", "x":13.6667, "y":6, "w":1.5}, {"label":"Compose", "x":15.1667, "y":6}, {"label":"Ctrl", "x":16.1667, "y":6, "w":1.5}, {"label":"\u2190", "x":18.1667, "y":6}, {"label":"\u2193", "x":19.1667, "y":6}, {"label":"\u2192", "x":20.1667, "y":6}, {"label":"0", "x":21.6667, "y":6, "w":2}, {"label":".", "x":23.6667, "y":6}] + } + } +} \ No newline at end of file diff --git a/keyboards/omnikeyish/keymaps/default/keymap.c b/keyboards/omnikeyish/keymaps/default/keymap.c new file mode 100644 index 000000000..fd434b535 --- /dev/null +++ b/keyboards/omnikeyish/keymaps/default/keymap.c @@ -0,0 +1,14 @@ +#include QMK_KEYBOARD_H + +#define M_PROG DYN_MACRO_PROG + +/* COL1 COL2 COL3 COL4 COL5 COL6 COL7 COL8 COL9 COL10 COL11 COL12 COL13 COL14 COL15 COL16 COL17 COL18 COL19 COL20 COL21 COL22 COL23 */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT_all( + DYN_MACRO_KEY11, DYN_MACRO_KEY12, KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + DYN_MACRO_KEY1, DYN_MACRO_KEY2, KC_GRV, 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_INS, KC_HOME, KC_PGUP, M_PROG, KC_PSLS, KC_PAST, KC_PMNS, + DYN_MACRO_KEY3, DYN_MACRO_KEY4, 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + DYN_MACRO_KEY5, DYN_MACRO_KEY6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_MPRV, KC_MPLY, KC_MNXT, KC_P4, KC_P5, KC_P6, KC_PEQL, + DYN_MACRO_KEY7, DYN_MACRO_KEY8, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_BSLS, DEBUG, KC_UP, RESET, KC_P1, KC_P2, KC_P3, KC_PENT, + DYN_MACRO_KEY9, DYN_MACRO_KEY10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT) +}; diff --git a/keyboards/omnikeyish/omnikeyish.c b/keyboards/omnikeyish/omnikeyish.c new file mode 100644 index 000000000..d7b68d41a --- /dev/null +++ b/keyboards/omnikeyish/omnikeyish.c @@ -0,0 +1,55 @@ +#include "omnikeyish.h" + +void keyboard_pre_init_user(void) { + /* Configure LED driving pins as output pins */ + setPinOutput(NUMLOCKLEDPIN); + setPinOutput(CAPSLOCKLEDPIN); + setPinOutput(SCROLLLOCKLEDPIN); + + dynamic_macro_init(); +} + +void keyboard_post_init_user(void) { + /* Customise these values to desired behaviour */ + //debug_enable = true; + //debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; + +#ifdef DYNAMIC_MACRO_EEPROM_STORAGE + /* Restore macros from eeprom */ + dynamic_macro_load_eeprom_all(); +#endif + + /* Send numlock keycode to attempt to force numlock back on. */ + register_code(KC_NUMLOCK); + unregister_code(KC_NUMLOCK); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (!process_record_dynamic_macro(keycode, record)) { + return false; + } + + return true; +} + +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinHigh(NUMLOCKLEDPIN); + } else { + writePinLow(NUMLOCKLEDPIN); + } + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinHigh(CAPSLOCKLEDPIN); + } else { + writePinLow(CAPSLOCKLEDPIN); + } + + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinHigh(SCROLLLOCKLEDPIN); + } else { + writePinLow(SCROLLLOCKLEDPIN); + } +} \ No newline at end of file diff --git a/keyboards/omnikeyish/omnikeyish.h b/keyboards/omnikeyish/omnikeyish.h new file mode 100644 index 000000000..b961d7c7d --- /dev/null +++ b/keyboards/omnikeyish/omnikeyish.h @@ -0,0 +1,159 @@ +#pragma once + +#include "quantum.h" + +enum keycodes { + QWERTY = SAFE_RANGE, + DYNAMIC_MACRO_RANGE +}; + +#include "dynamic_macro.h" + +#define ____ KC_NO + +/* Every possible switch positions on the PCB. Depending on plate and keycap choice, some of these positions will be blocked by other keys. */ +#define LAYOUT_all( \ + K101, K102, K103, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, K120, K121, K122, K123, \ + K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222, K223, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, K319, K320, K321, K322, K323, \ + K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K417, K418, K419, K420, K421, K422, K423, \ + K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516, K517, K518, K519, K520, K521, K522, K523, \ + K601, K602, K603, K604, K605, K610, K613, K614, K615, K616, K617, K618, K619, K620, K622 \ +) { \ + { K101, K102, K103, ____, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, K120, K121, K122, K123 }, \ + { K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222, K223 }, \ + { K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, K319, K320, K321, K322, K323 }, \ + { K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K417, K418, K419, K420, K421, K422, K423 }, \ + { K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516, K517, K518, K519, K520, K521, K522, K523 }, \ + { K601, K602, K603, K604, K605, ____, ____, ____, ____, K610, ____, ____, K613, K614, K615, K616, K617, K618, K619, K620, ____, K622, ____ } \ +} + +/* Northgate Factory Plates. Most are based on internet research, user beware. */ +#define LAYOUT_101 ( \ + K103, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, \ + K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222, K223, \ + K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316 K317, K318, K319, K320, K321, K322, K323, \ + K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K416, K420, K421, K422, \ + K503, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516, K518, K520, K521, K522, K523, \ + K603, K605, K610, K613, K616, K617, K618, K619, K620, K622 \ +) { \ + { ____, ____, K103, ____ K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, ____, ____, ____, ____ }, \ + { ____, ____, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222, K223 }, \ + { ____, ____, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, K319, K320, K321, K322, K323 }, \ + { ____, ____, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, ____, K416, ____, ____, ____, K420, K421, K422, ____ }, \ + { ____, ____, K503, ____, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516, ____, K518, ____, K520, K521, K522, K523 }, \ + { ____, ____, K603, ____, K605, ____, ____, ____, ____, K610, ____, ____, K613, ____, ____, K616, K617, K618, K619, K620, ____, K622, ____ } \ +} + +#define LAYOUT_102_rev1( \ + K101, K102, K117, K118, K119, \ + K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222, K223, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K317, K318, K319, K320, K321, K322, K323, \ + K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K416, K420, K421, K422, K423, \ + K501, K502, K503, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516, K518, K520, K521, K522, K523, \ + K601, K602, K603, K604, K605, K610, K613, K614, K616, K617, K618, K619, K620, K622 \ +) { \ + { K101, K102, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, K117, K118, K119, ____, ____, ____, ____ }, \ + { K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222, K223 }, \ + { K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, ____, K317, K318, K319, K320, K321, K322, K323 }, \ + { K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, ____, K416, ____, ____, ____, K420, K421, K422, K423 }, \ + { K501, K502, K503, ____, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516, ____, K518, ____, K520, K521, K522, K523 }, \ + { K601, K602, K603, K604, K605, ____, ____, ____, ____, K610, ____, ____, K613, K614, ____, K616, K617, K618, K619, K620, ____, K622, ____ } \ +} + +#define LAYOUT_102_rev3( \ + K101, K102, K103, K117, K118, K119, \ + K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222, K223, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K317, K318, K319, K320, K321, K322, K323, \ + K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K416, K420, K421, K422, K423, \ + K501, K502, K503, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516, K518, K520, K521, K522, K523, \ + K601, K602, K603, K604, K605, K610, K613, K614, K616, K617, K618, K619, K620, K622 \ +) { \ + { K101, K102, K103, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, K117, K118, K119, ____, ____, ____, ____ }, \ + { K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222, K223 }, \ + { K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, ____, K317, K318, K319, K320, K321, K322, K323 }, \ + { K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, ____, K416, ____, ____, ____, K420, K421, K422, K423 }, \ + { K501, K502, K503, ____, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516, ____, K518, ____, K520, K521, K522, K523 }, \ + { K601, K602, K603, K604, K605, ____, ____, ____, ____, K610, ____, ____, K613, K614, ____, K616, K617, K618, K619, K620, ____, K622, ____ } \ +} + +#define LAYOUT_plus_rev1( \ + K101, K102, K117, K118, K119, \ + K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222, K223, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K317, K318, K319, K320, K321, K322, K323, \ + K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K416, K417, K418, K419, K420, K421, K422, K423, \ + K501, K502, K503, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516, K517, K518, K519, K520, K521, K522, K523, \ + K601, K602, K603, K604, K605, K610, K613, K614, K616, K617, K619, K620, K622 \ +) { \ + { K101, K102, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, K117, K118, K119, ____, ____, ____, ____ }, \ + { K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222, K223 }, \ + { K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, ____, K317, K318, K319, K320, K321, K322, K323 }, \ + { K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, ____, K416, K417, K418, K419, K420, K421, K422, K423 }, \ + { K501, K502, K503, ____, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516, K517, K518, K519, K520, K521, K522, K523 }, \ + { K601, K602, K603, K604, K605, ____, ____, ____, ____, K610, ____, ____, K613, K614, ____, K616, K617, ____, K619, K620, ____, K622, ____ } \ +} + +#define LAYOUT_plus_rev3( \ + K101, K102, K103, K117, K118, K119, \ + K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222, K223, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K317, K318, K319, K320, K321, K322, K323, \ + K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K416, K417, K418, K419, K420, K421, K422, K423, \ + K501, K502, K503, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516, K517, K518, K519, K520, K521, K522, K523, \ + K601, K602, K603, K604, K605, K610, K613, K614, K616, K617, K619, K620, K622 \ +) { \ + { K101, K102, K103, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, K117, K118, K119, ____, ____, ____, ____ }, \ + { K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222, K223 }, \ + { K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, ____, K317, K318, K319, K320, K321, K322, K323 }, \ + { K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, ____, K416, K417, K418, K419, K420, K421, K422, K423 }, \ + { K501, K502, K503, ____, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516, K517, K518, K519, K520, K521, K522, K523 }, \ + { K601, K602, K603, K604, K605, ____, ____, ____, ____, K610, ____, ____, K613, K614, ____, K616, K617, ____, K619, K620, ____, K622, ____ } \ +} + +#define LAYOUT_ultra_rev1( \ + K101, K102, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, \ + K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222, K223, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K317, K318, K319, K320, K321, K322, K323, \ + K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K416, K417, K418, K419, K420, K421, K422, K423, \ + K501, K502, K503, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516, K517, K518, K519, K520, K521, K522, K523, \ + K601, K602, K603, K604, K605, K610, K613, K614, K616, K617, K619, K620, K622 \ +) { \ + { K101, K102, ____, ____, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, ____, ____, ____, ____ }, \ + { K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222, K223 }, \ + { K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, ____, K317, K318, K319, K320, K321, K322, K323 }, \ + { K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, ____, K416, K417, K418, K419, K420, K421, K422, K423 }, \ + { K501, K502, K503, ____, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516, K517, K518, K519, K520, K521, K522, K523 }, \ + { K601, K602, K603, K604, K605, ____, ____, ____, ____, K610, ____, ____, K613, K614, ____, K616, K617, ____, K619, K620, ____, K622, ____ } \ +} + +#define LAYOUT_ultra_rev3( \ + K101, K102, K103, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, \ + K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222, K223, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K317, K318, K319, K320, K321, K322, K323, \ + K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K416, K417, K418, K419, K420, K421, K422, K423, \ + K501, K502, K503, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516, K517, K518, K519, K520, K521, K522, K523, \ + K601, K602, K603, K604, K605, K610, K613, K614, K616, K617, K619, K620, K622 \ +) { \ + { K101, K102, K103, ____, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, ____, ____, ____, ____ }, \ + { K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222, K223 }, \ + { K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, ____, K317, K318, K319, K320, K321, K322, K323 }, \ + { K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, ____, K416, K417, K418, K419, K420, K421, K422, K423 }, \ + { K501, K502, K503, ____, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516, K517, K518, K519, K520, K521, K522, K523 }, \ + { K601, K602, K603, K604, K605, ____, ____, ____, ____, K610, ____, ____, K613, K614, ____, K616, K617, ____, K619, K620, ____, K622, ____ } \ +} + +#define LAYOUT_ultra_t( \ + K101, K102, K103, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, \ + K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222, K223, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K317, K318, K319, K320, K321, K322, K323, \ + K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K416, K420, K421, K422, K423, \ + K501, K502, K503, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516, K518, K520, K521, K522, K523, \ + K601, K602, K603, K604, K605, K610, K613, K614, K616, K617, K618, K619, K620, K622 \ +) { \ + { K101, K102, K103, ____, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, ____, ____, ____, ____ }, \ + { K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222, K223 }, \ + { K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, ____, K317, K318, K319, K320, K321, K322, K323 }, \ + { K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, ____, K416, ____, ____, ____, K420, K421, K422, K423 }, \ + { K501, K502, K503, ____, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516, ____, K518, ____, K520, K521, K522, K523 }, \ + { K601, K602, K603, K604, K605, ____, ____, ____, ____, K610, ____, ____, K613, K614, ____, K616, K617, K618, K619, K620, ____, K622, ____ } \ +} + diff --git a/keyboards/omnikeyish/readme.md b/keyboards/omnikeyish/readme.md new file mode 100644 index 000000000..31387bb8a --- /dev/null +++ b/keyboards/omnikeyish/readme.md @@ -0,0 +1,14 @@ +Omnikey(-ish) +=== + +A replacement PCB for Omnikey keyboards. (In theory) supports 101, 102, Plus, Ultra T, Ultra, Prime and Stellar, as well as customs. + +Keyboard Maintainer: QMK Community and Henrik O. Sørensen +Hardware Supported: Omnikey(-ish) PCB +Hardware Availability: https://github.com/henrikosorensen/keyboard_pcbs/tree/master/omnikeyish_pcb + +Make example for this keyboard (after setting up your build environment): + + make omnikeyish: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. diff --git a/keyboards/omnikeyish/rules.mk b/keyboards/omnikeyish/rules.mk new file mode 100644 index 000000000..38d50425f --- /dev/null +++ b/keyboards/omnikeyish/rules.mk @@ -0,0 +1,65 @@ +# keyboard specific files +SRC += dynamic_macro.c + +# MCU name +MCU = at90usb1286 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = halfkay + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +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 = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no \ No newline at end of file From 90b10f2e7ce57bf0c893fe8f86d85efedb045574 Mon Sep 17 00:00:00 2001 From: Tyler Wince Date: Sat, 22 Jun 2019 12:25:00 -0700 Subject: [PATCH 251/341] [Keymap] add planck/tylerwince (#6169) * tylerwince keymap added * modifications for PR * remove legacy import * fix some build errors * fix layers * restore custom_keycodes * remove trailing commas * change persistent layer function * update light noeeprom * layer state set user * missing trailing " * changes to single_default_layer * added autoshift and made a couple mods * added planck layout * formatting * reset to upstream * updated some comments * remove EEP_RST * Apply suggestions from code review Co-Authored-By: Drashna Jaelre --- keyboards/planck/keymaps/tylerwince/config.h | 18 ++ keyboards/planck/keymaps/tylerwince/keymap.c | 294 +++++++++++++++++++ keyboards/planck/keymaps/tylerwince/rules.mk | 7 + 3 files changed, 319 insertions(+) create mode 100644 keyboards/planck/keymaps/tylerwince/config.h create mode 100644 keyboards/planck/keymaps/tylerwince/keymap.c create mode 100644 keyboards/planck/keymaps/tylerwince/rules.mk diff --git a/keyboards/planck/keymaps/tylerwince/config.h b/keyboards/planck/keymaps/tylerwince/config.h new file mode 100644 index 000000000..24adad94f --- /dev/null +++ b/keyboards/planck/keymaps/tylerwince/config.h @@ -0,0 +1,18 @@ +#pragma once + +#ifdef AUDIO_ENABLE +#define STARTUP_SONG SONG(PLANCK_SOUND) +#endif + +#define MIDI_BASIC + +#define ENCODER_RESOLUTION 4 + +/* + Set any config.h overrides for your specific keymap here. + See config.h options at https://docs.qmk.fm/#/config_options?id=the-configh-file +*/ +#define TAPPING_FORCE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT + +#define EECONFIG_RGB_MATRIX (uint32_t *)16 diff --git a/keyboards/planck/keymaps/tylerwince/keymap.c b/keyboards/planck/keymaps/tylerwince/keymap.c new file mode 100644 index 000000000..30412e9db --- /dev/null +++ b/keyboards/planck/keymaps/tylerwince/keymap.c @@ -0,0 +1,294 @@ +#include QMK_KEYBOARD_H +#include "muse.h" + +enum planck_keycodes { + RGB_SLD = SAFE_RANGE, + TOGGLE_LAYER_COLOR, +}; + +enum planck_layers { + _BASE, + _LOWER, + _RAISE, + _ADJUST, + _LAYER4, +}; + +//Tap Dance Declarations +enum { + TD_SEMI_COLON, +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_SEMI_COLON] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_COLN), +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_planck_grid( + /* _BASE + * ,-----------------------------------------------------------------------------------. + * | Tab | ' | , | . | P | Y | F | G | C | R | L | / | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |CtlEsc| A | O | E | U | I | D | H | T | N | S | Bksp | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Ctrl | Alt | GUI |LOWER | Shift/Space | RAISE| | | | | + * `-----------------------------------------------------------------------------------' + */ + KC_TAB, KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLASH, + LCTL_T(KC_ESCAPE), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_BSPACE, + _______, TD(TD_SEMI_COLON), KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENTER, + _______, KC_LCTRL, KC_LALT, KC_LGUI, LOWER, LSFT_T(KC_SPACE), KC_NO, RAISE, _______, _______, _______, _______ + ), + + [_LOWER] = LAYOUT_planck_grid( + /* _LOWER + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | _ | + | { | } |Delete| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Ctrl | Alt | GUI |LOWER | Shift/Space | RAISE| | [ | ] | | + * `-----------------------------------------------------------------------------------' + */ + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLASH, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_DELETE, + _______, KC_LCTRL, KC_LALT, KC_LGUI, _______, _______, KC_NO, _______, _______, KC_LBRACKET, KC_RBRACKET, _______ + ), + + [_RAISE] = LAYOUT_planck_grid( + /* _RAISE + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | | | |RIGHT | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | F7 | F8 | F9 | F10 | F11 | F12 | | LEFT | | | |Delete| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | DOWN | UP | | | - | = | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |THINGS|1PASS | | |LOWER | Shift/Space | RAISE| | | | | + * `-----------------------------------------------------------------------------------' + */ + + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, _______, _______, KC_RIGHT, _______, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_LEFT, _______, _______, _______, KC_DELETE, + _______, _______, _______, KC_DOWN, KC_UP, _______, _______, KC_MINUS, KC_EQUAL, _______, _______, _______, + LALT(KC_SPACE), LGUI(KC_BSLASH), _______, _______, _______, _______, KC_NO, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT_planck_grid( + /* _LOWER + * ,-----------------------------------------------------------------------------------. + * |Reset | | | | |WIN-TL|WIN-TR| | | |WIN-R | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | |WIN-BL|WIN-BR|WIN-L | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | |WIN-B |WIN-T | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | BASE |LAYER4| | |LOWER | Shift/Space | RAISE|VOL-DN| BR-DN|BR-UP |VOL-UP| + * `-----------------------------------------------------------------------------------' + */ + + RESET, _______, _______, _______, _______, LALT(LCTL(KC_7)), LALT(LCTL(KC_8)), _______, _______, _______, LALT(LCTL(KC_L)), _______, + _______, _______, _______, _______, _______, LALT(LCTL(KC_U)), LALT(LCTL(KC_I)), LALT(LCTL(KC_H)), _______, _______, _______, _______, + _______, _______, _______, LALT(LCTL(KC_J)), LALT(LCTL(KC_K)), _______, _______, _______, _______, _______, _______, LALT(LCTL(KC_ENTER)), + TO(0), TO(4), _______, _______, _______, _______, KC_NO, _______, KC_AUDIO_VOL_DOWN, KC_F14, KC_F15, KC_AUDIO_VOL_UP + ), + + [_LAYER4] = LAYOUT_planck_grid( + /* _LOWER + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | ' | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |CtlEsc| A | S | D | F | G | H | J | K | L | ; | Bksp | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Ctrl | Alt | GUI |LOWER | Shift/Space | RAISE| | | | | + * `-----------------------------------------------------------------------------------' + */ + + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOTE, + LCTL_T(KC_ESCAPE), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_BSPACE, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_ENTER, + _______, KC_LCTL, KC_LALT, KC_LGUI, LOWER, LSFT_T(KC_SPACE), KC_NO, RAISE, _______, _______, _______, _______ + ), + +}; + +extern bool g_suspend_state; +extern rgb_config_t rgb_matrix_config; +bool disable_layer_color = 0; + +void keyboard_post_init_user(void) { + rgb_matrix_enable(); +} + +const uint8_t PROGMEM ledmap[][DRIVER_LED_TOTAL][3] = { + [0] = { {32,255,234}, {32,255,234}, {12,225,241}, {12,225,241}, {0,204,255}, {0,204,255}, {169,120,255}, {169,120,255}, {169,120,255}, {146,224,255}, {146,224,255}, {146,224,255}, + {32,255,234}, {32,255,234}, {12,225,241}, {12,225,241}, {0,204,255}, {0,204,255}, {169,120,255}, {169,120,255}, {169,120,255}, {146,224,255}, {146,224,255}, {146,224,255}, + {32,255,234}, {32,255,234}, {12,225,241}, {12,225,241}, {0,204,255}, {0,204,255}, {169,120,255}, {169,120,255}, {169,120,255}, {146,224,255}, {146,224,255}, {146,224,255}, + {32,255,234}, {32,255,234}, {12,225,241}, {12,225,241}, {0,204,255}, {0,0,0}, {169,120,255}, {169,120,255}, {146,224,255}, {146,224,255}, {146,224,255} }, + + [1] = { {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, + {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, + {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, + {0,0,0}, {0,204,255}, {0,204,255}, {0,204,255}, {0,204,255}, {0,0,0}, {0,0,0}, {0,0,0}, {0,204,255}, {0,204,255}, {0,0,0} }, + + [2] = { {169,120,255}, {169,120,255}, {169,120,255}, {169,120,255}, {169,120,255}, {169,120,255}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {169,120,255}, {0,0,0}, + {169,120,255}, {169,120,255}, {169,120,255}, {169,120,255}, {169,120,255}, {169,120,255}, {0,0,0}, {169,120,255}, {0,0,0}, {0,0,0}, {0,0,0}, {169,120,255}, + {0,0,0}, {0,0,0}, {0,0,0}, {169,120,255}, {169,120,255}, {0,0,0}, {0,0,0}, {169,120,255}, {169,120,255}, {0,0,0}, {0,0,0}, {0,0,0}, + {169,120,255}, {169,120,255}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0}, {169,120,255}, {0,0,0}, {0,0,0}, {0,0,0}, {0,0,0} }, + + [4] = { {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255}, {105,255,255} }, + +}; + +void set_layer_color(int layer) { + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + HSV hsv = { + .h = pgm_read_byte(&ledmap[layer][i][0]), + .s = pgm_read_byte(&ledmap[layer][i][1]), + .v = pgm_read_byte(&ledmap[layer][i][2]), + }; + if (!hsv.h && !hsv.s && !hsv.v) { + rgb_matrix_set_color( i, 0, 0, 0 ); + } else { + RGB rgb = hsv_to_rgb( hsv ); + rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b ); + } + } +} + +void rgb_matrix_indicators_user(void) { + if (g_suspend_state || disable_layer_color) { return; } + switch (biton32(layer_state)) { + case 0: + set_layer_color(0); + break; + case 1: + set_layer_color(1); + break; + case 2: + set_layer_color(2); + break; + case 4: + set_layer_color(4); + break; + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case RGB_SLD: + if (record->event.pressed) { + rgblight_mode(1); + } + return false; + case RGB_TOG: + if (record->event.pressed) { + if (rgb_matrix_config.val) { + rgb_matrix_sethsv(rgb_matrix_config.hue, rgb_matrix_config.sat, 0); + } else { + rgb_matrix_sethsv(rgb_matrix_config.hue, rgb_matrix_config.sat, 255); + } + } + return false; + case TOGGLE_LAYER_COLOR: + if (record->event.pressed) { + disable_layer_color ^= 1; + } + return false; + } + return true; +} + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update(bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_DOWN); + #else + tap_code(KC_PGDN); + #endif + } else { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_UP); + #else + tap_code(KC_PGUP); + #endif + } + } +} + +void matrix_scan_user(void) { +#ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } +#endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} +uint32_t layer_state_set_user(uint32_t state) { + palClearPad(GPIOB, 8); + palClearPad(GPIOB, 9); + uint8_t layer = biton32(state); + switch (layer) { + case _LOWER: + palSetPad(GPIOB, 9); + break; + case _RAISE: + palSetPad(GPIOB, 8); + break; + case _ADJUST: + palSetPad(GPIOB, 9); + palSetPad(GPIOB, 8); + break; + default: + break; + } + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/planck/keymaps/tylerwince/rules.mk b/keyboards/planck/keymaps/tylerwince/rules.mk new file mode 100644 index 000000000..a4f1a0b84 --- /dev/null +++ b/keyboards/planck/keymaps/tylerwince/rules.mk @@ -0,0 +1,7 @@ +SRC += muse.c +# Set any rules.mk overrides for your specific keymap here. +# See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file +LINK_TIME_OPTIMIZATION_ENABLE = yes +COMMAND_ENABLE = no +MOUSEKEY_ENABLE = no +TAP_DANCE_ENABLE=yes From 3915c8eb00138852a4385701c9ebc71f63654a4b Mon Sep 17 00:00:00 2001 From: Andrew Kannan Date: Mon, 24 Jun 2019 03:09:02 -0400 Subject: [PATCH 252/341] [Keyboard] Add AN-C PCB (#6157) * Add cannonkeys AN-C keyboard * Update Instant60 readme to point to CannonKeys docs * Ortho75 * Update keyboards/cannonkeys/an_c/an_c.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/cannonkeys/an_c/an_c.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/cannonkeys/an_c/keymaps/default/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/cannonkeys/an_c/keymaps/default/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/cannonkeys/an_c/keymaps/tsangan/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/cannonkeys/an_c/keymaps/tsangan/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/cannonkeys/an_c/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/cannonkeys/instant60/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/cannonkeys/an_c/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update readme * Update info.json * Remove Ortho75 and put in a separate branch * Update info.json * remove redundant things * Update keyboards/cannonkeys/an_c/keymaps/default/keymap.c Co-Authored-By: fauxpark * Update keyboards/cannonkeys/an_c/keymaps/tsangan/keymap.c Co-Authored-By: fauxpark * Update rules and info.json --- keyboards/cannonkeys/an_c/an_c.c | 1 + keyboards/cannonkeys/an_c/an_c.h | 47 + .../boards/ST_STM32F072B_DISCOVERY/board.c | 109 +++ .../boards/ST_STM32F072B_DISCOVERY/board.h | 922 ++++++++++++++++++ .../boards/ST_STM32F072B_DISCOVERY/board.mk | 5 + .../ST_STM32F072B_DISCOVERY/cfg/board.chcfg | 703 +++++++++++++ keyboards/cannonkeys/an_c/bootloader_defs.h | 7 + keyboards/cannonkeys/an_c/chconf.h | 524 ++++++++++ keyboards/cannonkeys/an_c/config.h | 98 ++ keyboards/cannonkeys/an_c/halconf.h | 354 +++++++ keyboards/cannonkeys/an_c/info.json | 15 + .../cannonkeys/an_c/keymaps/default/keymap.c | 43 + .../cannonkeys/an_c/keymaps/tsangan/keymap.c | 44 + .../cannonkeys/an_c/keymaps/via/keymap.c | 43 + .../cannonkeys/an_c/keymaps/via/rules.mk | 5 + keyboards/cannonkeys/an_c/mcuconf.h | 176 ++++ keyboards/cannonkeys/an_c/readme.md | 12 + keyboards/cannonkeys/an_c/rules.mk | 59 ++ keyboards/cannonkeys/instant60/info.json | 4 +- keyboards/cannonkeys/instant60/readme.md | 4 +- 20 files changed, 3172 insertions(+), 3 deletions(-) create mode 100644 keyboards/cannonkeys/an_c/an_c.c create mode 100644 keyboards/cannonkeys/an_c/an_c.h create mode 100644 keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.c create mode 100644 keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.h create mode 100644 keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.mk create mode 100644 keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg create mode 100644 keyboards/cannonkeys/an_c/bootloader_defs.h create mode 100644 keyboards/cannonkeys/an_c/chconf.h create mode 100644 keyboards/cannonkeys/an_c/config.h create mode 100644 keyboards/cannonkeys/an_c/halconf.h create mode 100644 keyboards/cannonkeys/an_c/info.json create mode 100644 keyboards/cannonkeys/an_c/keymaps/default/keymap.c create mode 100644 keyboards/cannonkeys/an_c/keymaps/tsangan/keymap.c create mode 100644 keyboards/cannonkeys/an_c/keymaps/via/keymap.c create mode 100644 keyboards/cannonkeys/an_c/keymaps/via/rules.mk create mode 100644 keyboards/cannonkeys/an_c/mcuconf.h create mode 100644 keyboards/cannonkeys/an_c/readme.md create mode 100644 keyboards/cannonkeys/an_c/rules.mk diff --git a/keyboards/cannonkeys/an_c/an_c.c b/keyboards/cannonkeys/an_c/an_c.c new file mode 100644 index 000000000..9dfb80e9e --- /dev/null +++ b/keyboards/cannonkeys/an_c/an_c.c @@ -0,0 +1 @@ +#include "an_c.h" diff --git a/keyboards/cannonkeys/an_c/an_c.h b/keyboards/cannonkeys/an_c/an_c.h new file mode 100644 index 000000000..6d2085016 --- /dev/null +++ b/keyboards/cannonkeys/an_c/an_c.h @@ -0,0 +1,47 @@ +#pragma once + +#include "quantum.h" + +#define KNO KC_NO + +#define LAYOUT_60_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \ + K40, K41, K42, K45, K49, K4A, K4B, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KNO}, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KNO, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KNO, KNO, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KNO, KNO, KNO }, \ + { K40, K41, K42, KNO, KNO, K45, KNO, KNO, KNO, K49, K4A, K4B, KNO, KNO, K4E } \ +} + +#define LAYOUT_60_tsangan_hhkb( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3E,\ + K40, K41, K42, K45, K49, K4B, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E}, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KNO, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KNO, KNO, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KNO, KNO, K3E }, \ + { K40, K41, K42, KNO, KNO, K45, KNO, KNO, KNO, K49, KNO, K4B, KNO, KNO, K4E } \ +} + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3E,\ + K40, K41, K42, K45, K49, K4A, K4B, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E}, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KNO, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KNO, KNO, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KNO, KNO, K3E }, \ + { K40, K41, K42, KNO, KNO, K45, KNO, KNO, KNO, K49, K4A, K4B, KNO, KNO, K4E } \ +} diff --git a/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.c new file mode 100644 index 000000000..9d10fbd75 --- /dev/null +++ b/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.c @@ -0,0 +1,109 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#include "hal.h" + +#if HAL_USE_PAL || defined(__DOXYGEN__) +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +const PALConfig pal_default_config = { +#if STM32_HAS_GPIOA + {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, + VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, +#endif +#if STM32_HAS_GPIOB + {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, + VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, +#endif +#if STM32_HAS_GPIOC + {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, + VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, +#endif +#if STM32_HAS_GPIOD + {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, + VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, +#endif +#if STM32_HAS_GPIOE + {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, + VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, +#endif +#if STM32_HAS_GPIOF + {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, + VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, +#endif +#if STM32_HAS_GPIOG + {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, + VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, +#endif +#if STM32_HAS_GPIOH + {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, + VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, +#endif +#if STM32_HAS_GPIOI + {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} +#endif +}; +#endif + +void enter_bootloader_mode_if_requested(void); + +/** + * @brief Early initialization code. + * @details This initialization must be performed just after stack setup + * and before any other initialization. + */ +void __early_init(void) { + enter_bootloader_mode_if_requested(); + stm32_clock_init(); +} + +#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) +/** + * @brief MMC_SPI card detection. + */ +bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief MMC_SPI card write protection detection. + */ +bool mmc_lld_is_write_protected(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif + +/** + * @brief Board-specific initialization code. + * @todo Add your board-specific code, if any. + */ +void boardInit(void) { +} diff --git a/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.h new file mode 100644 index 000000000..de3a93d1c --- /dev/null +++ b/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.h @@ -0,0 +1,922 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#ifndef BOARD_H +#define BOARD_H + +/* + * Setup for ST STM32F072B-Discovery board. + */ + +/* + * Board identifier. + */ +#define BOARD_ST_STM32F072B_DISCOVERY +#define BOARD_NAME "ST STM32F072B-Discovery" + +/* + * Board oscillators-related settings. + * NOTE: HSE not fitted. + */ +#if !defined(STM32_LSECLK) +#define STM32_LSECLK 32768 +#endif + +#define STM32_LSEDRV (3U << 3U) + +#if !defined(STM32_HSECLK) +#define STM32_HSECLK 0U +#endif + +#define STM32_HSE_BYPASS + +/* + * MCU type as defined in the ST header. + */ +#define STM32F072xB + +/* + * IO pins assignments. + */ +#define GPIOA_BUTTON 0U +#define GPIOA_PIN1 1U +#define GPIOA_PIN2 2U +#define GPIOA_PIN3 3U +#define GPIOA_PIN4 4U +#define GPIOA_PIN5 5U +#define GPIOA_PIN6 6U +#define GPIOA_PIN7 7U +#define GPIOA_PIN8 8U +#define GPIOA_PIN9 9U +#define GPIOA_PIN10 10U +#define GPIOA_USB_DM 11U +#define GPIOA_USB_DP 12U +#define GPIOA_SWDIO 13U +#define GPIOA_SWCLK 14U +#define GPIOA_PIN15 15U + +#define GPIOB_PIN0 0U +#define GPIOB_PIN1 1U +#define GPIOB_PIN2 2U +#define GPIOB_PIN3 3U +#define GPIOB_PIN4 4U +#define GPIOB_PIN5 5U +#define GPIOB_PIN6 6U +#define GPIOB_PIN7 7U +#define GPIOB_PIN8 8U +#define GPIOB_PIN9 9U +#define GPIOB_PIN10 10U +#define GPIOB_PIN11 11U +#define GPIOB_PIN12 12U +#define GPIOB_SPI2_SCK 13U +#define GPIOB_SPI2_MISO 14U +#define GPIOB_SPI2_MOSI 15U + +#define GPIOC_MEMS_CS 0U +#define GPIOC_PIN1 1U +#define GPIOC_PIN2 2U +#define GPIOC_PIN3 3U +#define GPIOC_PIN4 4U +#define GPIOC_PIN5 5U +#define GPIOC_LED_RED 6U +#define GPIOC_LED_BLUE 7U +#define GPIOC_LED_ORANGE 8U +#define GPIOC_LED_GREEN 9U +#define GPIOC_PIN10 10U +#define GPIOC_PIN11 11U +#define GPIOC_PIN12 12U +#define GPIOC_PIN13 13U +#define GPIOC_OSC32_IN 14U +#define GPIOC_OSC32_OUT 15U + +#define GPIOD_PIN0 0U +#define GPIOD_PIN1 1U +#define GPIOD_PIN2 2U +#define GPIOD_PIN3 3U +#define GPIOD_PIN4 4U +#define GPIOD_PIN5 5U +#define GPIOD_PIN6 6U +#define GPIOD_PIN7 7U +#define GPIOD_PIN8 8U +#define GPIOD_PIN9 9U +#define GPIOD_PIN10 10U +#define GPIOD_PIN11 11U +#define GPIOD_PIN12 12U +#define GPIOD_PIN13 13U +#define GPIOD_PIN14 14U +#define GPIOD_PIN15 15U + +#define GPIOE_PIN0 0U +#define GPIOE_PIN1 1U +#define GPIOE_PIN2 2U +#define GPIOE_PIN3 3U +#define GPIOE_PIN4 4U +#define GPIOE_PIN5 5U +#define GPIOE_PIN6 6U +#define GPIOE_PIN7 7U +#define GPIOE_PIN8 8U +#define GPIOE_PIN9 9U +#define GPIOE_PIN10 10U +#define GPIOE_PIN11 11U +#define GPIOE_PIN12 12U +#define GPIOE_PIN13 13U +#define GPIOE_PIN14 14U +#define GPIOE_PIN15 15U + +#define GPIOF_OSC_IN 0U +#define GPIOF_OSC_OUT 1U +#define GPIOF_PIN2 2U +#define GPIOF_PIN3 3U +#define GPIOF_PIN4 4U +#define GPIOF_PIN5 5U +#define GPIOF_PIN6 6U +#define GPIOF_PIN7 7U +#define GPIOF_PIN8 8U +#define GPIOF_PIN9 9U +#define GPIOF_PIN10 10U +#define GPIOF_PIN11 11U +#define GPIOF_PIN12 12U +#define GPIOF_PIN13 13U +#define GPIOF_PIN14 14U +#define GPIOF_PIN15 15U + +/* + * IO lines assignments. + */ +#define LINE_BUTTON PAL_LINE(GPIOA, 0U) +#define LINE_USB_DM PAL_LINE(GPIOA, 11U) +#define LINE_USB_DP PAL_LINE(GPIOA, 12U) +#define LINE_SWDIO PAL_LINE(GPIOA, 13U) +#define LINE_SWCLK PAL_LINE(GPIOA, 14U) + +#define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U) +#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U) +#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U) + +#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U) +#define LINE_LED_RED PAL_LINE(GPIOC, 6U) +#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U) +#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U) +#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U) +#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) +#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) + + + +#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) +#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * Please refer to the STM32 Reference Manual for details. + */ +#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) +#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) +#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) +#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) +#define PIN_ODR_LOW(n) (0U << (n)) +#define PIN_ODR_HIGH(n) (1U << (n)) +#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) +#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) +#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) +#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) +#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) +#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) +#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) +#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) +#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) +#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) + +/* + * GPIOA setup: + * + * PA0 - BUTTON (input floating). + * PA1 - PIN1 (input pullup). + * PA2 - PIN2 (input pullup). + * PA3 - PIN3 (input pullup). + * PA4 - PIN4 (input pullup). + * PA5 - PIN5 (input pullup). + * PA6 - PIN6 (input pullup). + * PA7 - PIN7 (input pullup). + * PA8 - PIN8 (input pullup). + * PA9 - PIN9 (input pullup). + * PA10 - PIN10 (input pullup). + * PA11 - USB_DM (input floating). + * PA12 - USB_DP (input floating). + * PA13 - SWDIO (alternate 0). + * PA14 - SWCLK (alternate 0). + * PA15 - PIN15 (input pullup). + */ +#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \ + PIN_MODE_INPUT(GPIOA_PIN1) | \ + PIN_MODE_INPUT(GPIOA_PIN2) | \ + PIN_MODE_INPUT(GPIOA_PIN3) | \ + PIN_MODE_INPUT(GPIOA_PIN4) | \ + PIN_MODE_INPUT(GPIOA_PIN5) | \ + PIN_MODE_INPUT(GPIOA_PIN6) | \ + PIN_MODE_INPUT(GPIOA_PIN7) | \ + PIN_MODE_INPUT(GPIOA_PIN8) | \ + PIN_MODE_INPUT(GPIOA_PIN9) | \ + PIN_MODE_INPUT(GPIOA_PIN10) | \ + PIN_MODE_INPUT(GPIOA_USB_DM) | \ + PIN_MODE_INPUT(GPIOA_USB_DP) | \ + PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ + PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ + PIN_MODE_INPUT(GPIOA_PIN15)) +#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) +#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DM) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ + PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ + PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ + PIN_OSPEED_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ + PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ + PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN15)) +#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \ + PIN_ODR_HIGH(GPIOA_PIN1) | \ + PIN_ODR_HIGH(GPIOA_PIN2) | \ + PIN_ODR_HIGH(GPIOA_PIN3) | \ + PIN_ODR_HIGH(GPIOA_PIN4) | \ + PIN_ODR_HIGH(GPIOA_PIN5) | \ + PIN_ODR_HIGH(GPIOA_PIN6) | \ + PIN_ODR_HIGH(GPIOA_PIN7) | \ + PIN_ODR_HIGH(GPIOA_PIN8) | \ + PIN_ODR_HIGH(GPIOA_PIN9) | \ + PIN_ODR_HIGH(GPIOA_PIN10) | \ + PIN_ODR_HIGH(GPIOA_USB_DM) | \ + PIN_ODR_HIGH(GPIOA_USB_DP) | \ + PIN_ODR_HIGH(GPIOA_SWDIO) | \ + PIN_ODR_HIGH(GPIOA_SWCLK) | \ + PIN_ODR_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN7, 0U)) +#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DM, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DP, 0U) | \ + PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \ + PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN15, 0U)) + +/* + * GPIOB setup: + * + * PB0 - PIN0 (input pullup). + * PB1 - PIN1 (input pullup). + * PB2 - PIN2 (input pullup). + * PB3 - PIN3 (input pullup). + * PB4 - PIN4 (input pullup). + * PB5 - PIN5 (input pullup). + * PB6 - PIN6 (input pullup). + * PB7 - PIN7 (input pullup). + * PB8 - PIN8 (input pullup). + * PB9 - PIN9 (input pullup). + * PB10 - PIN10 (input pullup). + * PB11 - PIN11 (input pullup). + * PB12 - PIN12 (input pullup). + * PB13 - SPI2_SCK (alternate 0). + * PB14 - SPI2_MISO (alternate 0). + * PB15 - SPI2_MOSI (alternate 0). + */ +#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ + PIN_MODE_INPUT(GPIOB_PIN1) | \ + PIN_MODE_INPUT(GPIOB_PIN2) | \ + PIN_MODE_INPUT(GPIOB_PIN3) | \ + PIN_MODE_INPUT(GPIOB_PIN4) | \ + PIN_MODE_INPUT(GPIOB_PIN5) | \ + PIN_MODE_INPUT(GPIOB_PIN6) | \ + PIN_MODE_INPUT(GPIOB_PIN7) | \ + PIN_MODE_INPUT(GPIOB_PIN8) | \ + PIN_MODE_INPUT(GPIOB_PIN9) | \ + PIN_MODE_INPUT(GPIOB_PIN10) | \ + PIN_MODE_INPUT(GPIOB_PIN11) | \ + PIN_MODE_INPUT(GPIOB_PIN12) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_SCK) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_SCK) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ + PIN_OSPEED_HIGH(GPIOB_PIN2) | \ + PIN_OSPEED_HIGH(GPIOB_PIN3) | \ + PIN_OSPEED_HIGH(GPIOB_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_SCK) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_SCK) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ + PIN_ODR_HIGH(GPIOB_PIN1) | \ + PIN_ODR_HIGH(GPIOB_PIN2) | \ + PIN_ODR_HIGH(GPIOB_PIN3) | \ + PIN_ODR_HIGH(GPIOB_PIN4) | \ + PIN_ODR_HIGH(GPIOB_PIN5) | \ + PIN_ODR_HIGH(GPIOB_PIN6) | \ + PIN_ODR_HIGH(GPIOB_PIN7) | \ + PIN_ODR_HIGH(GPIOB_PIN8) | \ + PIN_ODR_HIGH(GPIOB_PIN9) | \ + PIN_ODR_HIGH(GPIOB_PIN10) | \ + PIN_ODR_HIGH(GPIOB_PIN11) | \ + PIN_ODR_HIGH(GPIOB_PIN12) | \ + PIN_ODR_HIGH(GPIOB_SPI2_SCK) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MISO) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN7, 0U)) +#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U)) + +/* + * GPIOC setup: + * + * PC0 - MEMS_CS (output pushpull maximum). + * PC1 - PIN1 (input pullup). + * PC2 - PIN2 (input pullup). + * PC3 - PIN3 (input pullup). + * PC4 - PIN4 (input pullup). + * PC5 - PIN5 (input pullup). + * PC6 - LED_RED (output pushpull maximum). + * PC7 - LED_BLUE (output pushpull maximum). + * PC8 - LED_ORANGE (output pushpull maximum). + * PC9 - LED_GREEN (output pushpull maximum). + * PC10 - PIN10 (input pullup). + * PC11 - PIN11 (input pullup). + * PC12 - PIN12 (input pullup). + * PC13 - PIN13 (input pullup). + * PC14 - OSC32_IN (input floating). + * PC15 - OSC32_OUT (input floating). + */ +#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | \ + PIN_MODE_INPUT(GPIOC_PIN1) | \ + PIN_MODE_INPUT(GPIOC_PIN2) | \ + PIN_MODE_INPUT(GPIOC_PIN3) | \ + PIN_MODE_INPUT(GPIOC_PIN4) | \ + PIN_MODE_INPUT(GPIOC_PIN5) | \ + PIN_MODE_OUTPUT(GPIOC_LED_RED) | \ + PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | \ + PIN_MODE_INPUT(GPIOC_PIN10) | \ + PIN_MODE_INPUT(GPIOC_PIN11) | \ + PIN_MODE_INPUT(GPIOC_PIN12) | \ + PIN_MODE_INPUT(GPIOC_PIN13) | \ + PIN_MODE_INPUT(GPIOC_OSC32_IN) | \ + PIN_MODE_INPUT(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_RED) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ + PIN_OSPEED_HIGH(GPIOC_LED_RED) | \ + PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_RED) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | \ + PIN_ODR_HIGH(GPIOC_PIN1) | \ + PIN_ODR_HIGH(GPIOC_PIN2) | \ + PIN_ODR_HIGH(GPIOC_PIN3) | \ + PIN_ODR_HIGH(GPIOC_PIN4) | \ + PIN_ODR_HIGH(GPIOC_PIN5) | \ + PIN_ODR_LOW(GPIOC_LED_RED) | \ + PIN_ODR_LOW(GPIOC_LED_BLUE) | \ + PIN_ODR_LOW(GPIOC_LED_ORANGE) | \ + PIN_ODR_LOW(GPIOC_LED_GREEN) | \ + PIN_ODR_HIGH(GPIOC_PIN10) | \ + PIN_ODR_HIGH(GPIOC_PIN11) | \ + PIN_ODR_HIGH(GPIOC_PIN12) | \ + PIN_ODR_HIGH(GPIOC_PIN13) | \ + PIN_ODR_HIGH(GPIOC_OSC32_IN) | \ + PIN_ODR_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_RED, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_BLUE, 0U)) +#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U)) + +/* + * GPIOD setup: + * + * PD0 - PIN0 (input pullup). + * PD1 - PIN1 (input pullup). + * PD2 - PIN2 (input pullup). + * PD3 - PIN3 (input pullup). + * PD4 - PIN4 (input pullup). + * PD5 - PIN5 (input pullup). + * PD6 - PIN6 (input pullup). + * PD7 - PIN7 (input pullup). + * PD8 - PIN8 (input pullup). + * PD9 - PIN9 (input pullup). + * PD10 - PIN10 (input pullup). + * PD11 - PIN11 (input pullup). + * PD12 - PIN12 (input pullup). + * PD13 - PIN13 (input pullup). + * PD14 - PIN14 (input pullup). + * PD15 - PIN15 (input pullup). + */ +#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ + PIN_MODE_INPUT(GPIOD_PIN1) | \ + PIN_MODE_INPUT(GPIOD_PIN2) | \ + PIN_MODE_INPUT(GPIOD_PIN3) | \ + PIN_MODE_INPUT(GPIOD_PIN4) | \ + PIN_MODE_INPUT(GPIOD_PIN5) | \ + PIN_MODE_INPUT(GPIOD_PIN6) | \ + PIN_MODE_INPUT(GPIOD_PIN7) | \ + PIN_MODE_INPUT(GPIOD_PIN8) | \ + PIN_MODE_INPUT(GPIOD_PIN9) | \ + PIN_MODE_INPUT(GPIOD_PIN10) | \ + PIN_MODE_INPUT(GPIOD_PIN11) | \ + PIN_MODE_INPUT(GPIOD_PIN12) | \ + PIN_MODE_INPUT(GPIOD_PIN13) | \ + PIN_MODE_INPUT(GPIOD_PIN14) | \ + PIN_MODE_INPUT(GPIOD_PIN15)) +#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) +#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN15)) +#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN15)) +#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ + PIN_ODR_HIGH(GPIOD_PIN1) | \ + PIN_ODR_HIGH(GPIOD_PIN2) | \ + PIN_ODR_HIGH(GPIOD_PIN3) | \ + PIN_ODR_HIGH(GPIOD_PIN4) | \ + PIN_ODR_HIGH(GPIOD_PIN5) | \ + PIN_ODR_HIGH(GPIOD_PIN6) | \ + PIN_ODR_HIGH(GPIOD_PIN7) | \ + PIN_ODR_HIGH(GPIOD_PIN8) | \ + PIN_ODR_HIGH(GPIOD_PIN9) | \ + PIN_ODR_HIGH(GPIOD_PIN10) | \ + PIN_ODR_HIGH(GPIOD_PIN11) | \ + PIN_ODR_HIGH(GPIOD_PIN12) | \ + PIN_ODR_HIGH(GPIOD_PIN13) | \ + PIN_ODR_HIGH(GPIOD_PIN14) | \ + PIN_ODR_HIGH(GPIOD_PIN15)) +#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN7, 0U)) +#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN15, 0U)) + +/* + * GPIOE setup: + * + * PE0 - PIN0 (input pullup). + * PE1 - PIN1 (input pullup). + * PE2 - PIN2 (input pullup). + * PE3 - PIN3 (input pullup). + * PE4 - PIN4 (input pullup). + * PE5 - PIN5 (input pullup). + * PE6 - PIN6 (input pullup). + * PE7 - PIN7 (input pullup). + * PE8 - PIN8 (input pullup). + * PE9 - PIN9 (input pullup). + * PE10 - PIN10 (input pullup). + * PE11 - PIN11 (input pullup). + * PE12 - PIN12 (input pullup). + * PE13 - PIN13 (input pullup). + * PE14 - PIN14 (input pullup). + * PE15 - PIN15 (input pullup). + */ +#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ + PIN_MODE_INPUT(GPIOE_PIN1) | \ + PIN_MODE_INPUT(GPIOE_PIN2) | \ + PIN_MODE_INPUT(GPIOE_PIN3) | \ + PIN_MODE_INPUT(GPIOE_PIN4) | \ + PIN_MODE_INPUT(GPIOE_PIN5) | \ + PIN_MODE_INPUT(GPIOE_PIN6) | \ + PIN_MODE_INPUT(GPIOE_PIN7) | \ + PIN_MODE_INPUT(GPIOE_PIN8) | \ + PIN_MODE_INPUT(GPIOE_PIN9) | \ + PIN_MODE_INPUT(GPIOE_PIN10) | \ + PIN_MODE_INPUT(GPIOE_PIN11) | \ + PIN_MODE_INPUT(GPIOE_PIN12) | \ + PIN_MODE_INPUT(GPIOE_PIN13) | \ + PIN_MODE_INPUT(GPIOE_PIN14) | \ + PIN_MODE_INPUT(GPIOE_PIN15)) +#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) +#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN15)) +#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN15)) +#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ + PIN_ODR_HIGH(GPIOE_PIN1) | \ + PIN_ODR_HIGH(GPIOE_PIN2) | \ + PIN_ODR_HIGH(GPIOE_PIN3) | \ + PIN_ODR_HIGH(GPIOE_PIN4) | \ + PIN_ODR_HIGH(GPIOE_PIN5) | \ + PIN_ODR_HIGH(GPIOE_PIN6) | \ + PIN_ODR_HIGH(GPIOE_PIN7) | \ + PIN_ODR_HIGH(GPIOE_PIN8) | \ + PIN_ODR_HIGH(GPIOE_PIN9) | \ + PIN_ODR_HIGH(GPIOE_PIN10) | \ + PIN_ODR_HIGH(GPIOE_PIN11) | \ + PIN_ODR_HIGH(GPIOE_PIN12) | \ + PIN_ODR_HIGH(GPIOE_PIN13) | \ + PIN_ODR_HIGH(GPIOE_PIN14) | \ + PIN_ODR_HIGH(GPIOE_PIN15)) +#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN7, 0U)) +#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN15, 0U)) + +/* + * GPIOF setup: + * + * PF0 - OSC_IN (input floating). + * PF1 - OSC_OUT (input floating). + * PF2 - PIN2 (input pullup). + * PF3 - PIN3 (input pullup). + * PF4 - PIN4 (input pullup). + * PF5 - PIN5 (input pullup). + * PF6 - PIN6 (input pullup). + * PF7 - PIN7 (input pullup). + * PF8 - PIN8 (input pullup). + * PF9 - PIN9 (input pullup). + * PF10 - PIN10 (input pullup). + * PF11 - PIN11 (input pullup). + * PF12 - PIN12 (input pullup). + * PF13 - PIN13 (input pullup). + * PF14 - PIN14 (input pullup). + * PF15 - PIN15 (input pullup). + */ +#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | \ + PIN_MODE_INPUT(GPIOF_OSC_OUT) | \ + PIN_MODE_INPUT(GPIOF_PIN2) | \ + PIN_MODE_INPUT(GPIOF_PIN3) | \ + PIN_MODE_INPUT(GPIOF_PIN4) | \ + PIN_MODE_INPUT(GPIOF_PIN5) | \ + PIN_MODE_INPUT(GPIOF_PIN6) | \ + PIN_MODE_INPUT(GPIOF_PIN7) | \ + PIN_MODE_INPUT(GPIOF_PIN8) | \ + PIN_MODE_INPUT(GPIOF_PIN9) | \ + PIN_MODE_INPUT(GPIOF_PIN10) | \ + PIN_MODE_INPUT(GPIOF_PIN11) | \ + PIN_MODE_INPUT(GPIOF_PIN12) | \ + PIN_MODE_INPUT(GPIOF_PIN13) | \ + PIN_MODE_INPUT(GPIOF_PIN14) | \ + PIN_MODE_INPUT(GPIOF_PIN15)) +#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) +#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | \ + PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN15)) +#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | \ + PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN15)) +#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | \ + PIN_ODR_HIGH(GPIOF_OSC_OUT) | \ + PIN_ODR_HIGH(GPIOF_PIN2) | \ + PIN_ODR_HIGH(GPIOF_PIN3) | \ + PIN_ODR_HIGH(GPIOF_PIN4) | \ + PIN_ODR_HIGH(GPIOF_PIN5) | \ + PIN_ODR_HIGH(GPIOF_PIN6) | \ + PIN_ODR_HIGH(GPIOF_PIN7) | \ + PIN_ODR_HIGH(GPIOF_PIN8) | \ + PIN_ODR_HIGH(GPIOF_PIN9) | \ + PIN_ODR_HIGH(GPIOF_PIN10) | \ + PIN_ODR_HIGH(GPIOF_PIN11) | \ + PIN_ODR_HIGH(GPIOF_PIN12) | \ + PIN_ODR_HIGH(GPIOF_PIN13) | \ + PIN_ODR_HIGH(GPIOF_PIN14) | \ + PIN_ODR_HIGH(GPIOF_PIN15)) +#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | \ + PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN7, 0U)) +#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN15, 0U)) + + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* BOARD_H */ diff --git a/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.mk b/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.mk new file mode 100644 index 000000000..b98dcdd26 --- /dev/null +++ b/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY diff --git a/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg b/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg new file mode 100644 index 000000000..9c7cf4fd7 --- /dev/null +++ b/keyboards/cannonkeys/an_c/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg @@ -0,0 +1,703 @@ + + + + + resources/gencfg/processors/boards/stm32f0xx/templates + .. + 3.0.x + + ST STM32F072B-Discovery + ST_STM32F072B_DISCOVERY + + STM32F072xB + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/keyboards/cannonkeys/an_c/bootloader_defs.h b/keyboards/cannonkeys/an_c/bootloader_defs.h new file mode 100644 index 000000000..02c48c4e6 --- /dev/null +++ b/keyboards/cannonkeys/an_c/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here (page 175): + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/cannonkeys/an_c/chconf.h b/keyboards/cannonkeys/an_c/chconf.h new file mode 100644 index 000000000..99fa8ce39 --- /dev/null +++ b/keyboards/cannonkeys/an_c/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 10000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE FALSE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP FALSE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS FALSE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/cannonkeys/an_c/config.h b/keyboards/cannonkeys/an_c/config.h new file mode 100644 index 000000000..f8ded7c1f --- /dev/null +++ b/keyboards/cannonkeys/an_c/config.h @@ -0,0 +1,98 @@ +/* +Copyright 2015 Jun Wako + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCA04 +#define PRODUCT_ID 0xA00C +#define DEVICE_VER 0x0001 +/* in python2: list(u"whatever".encode('utf-16-le')) */ +/* at most 32 characters or the ugly hack in usb_main.c borks */ +#define MANUFACTURER CannonKeys +#define PRODUCT AN-C +#define DESCRIPTION AN-C Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#define MATRIX_COL_PINS { B11, B10, B2, A9, A15, B3, B4, B5, B6, B7, B8, B9, C13, C14, C15 } +#define MATRIX_ROW_PINS { B1, B0, A7, A5, A4 } +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define RGBLIGHT_ANIMATIONS + +#define WS2812_LED_N 14 +#define RGBLED_NUM WS2812_LED_N +#define PORT_WS2812 GPIOB +#define PIN_WS2812 15 +#define WS2812_SPI SPID2 + + +// EEPROM usage +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 32 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x02 +#define EEPROM_VERSION_ADDR 34 + + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 +// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635 +// start + layer * rows * col * 2 +#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 +#define EEPROM_CUSTOM_BACKLIGHT 636 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 200 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 + +/* + * Feature disable options + * 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_FUNCTION diff --git a/keyboards/cannonkeys/an_c/halconf.h b/keyboards/cannonkeys/an_c/halconf.h new file mode 100644 index 000000000..38743e090 --- /dev/null +++ b/keyboards/cannonkeys/an_c/halconf.h @@ -0,0 +1,354 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C TRUE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/cannonkeys/an_c/info.json b/keyboards/cannonkeys/an_c/info.json new file mode 100644 index 000000000..712ce269e --- /dev/null +++ b/keyboards/cannonkeys/an_c/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "AN-C", + "url": "https://cannonkeys.com", + "maintainer": "awkannan", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_ansi": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_tsangan_hhkb": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + } + } +} diff --git a/keyboards/cannonkeys/an_c/keymaps/default/keymap.c b/keyboards/cannonkeys/an_c/keymaps/default/keymap.c new file mode 100644 index 000000000..d6d69ee8f --- /dev/null +++ b/keyboards/cannonkeys/an_c/keymaps/default/keymap.c @@ -0,0 +1,43 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ +#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 _BASE 0 +#define _FN1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_60_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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FN1), KC_RCTL + ), + + [_FN1] = LAYOUT_60_ansi( + KC_GESC, 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, + RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_GRV, _______, _______, _______, _______, _______, _______, RESET + ) +}; diff --git a/keyboards/cannonkeys/an_c/keymaps/tsangan/keymap.c b/keyboards/cannonkeys/an_c/keymaps/tsangan/keymap.c new file mode 100644 index 000000000..857415ad9 --- /dev/null +++ b/keyboards/cannonkeys/an_c/keymaps/tsangan/keymap.c @@ -0,0 +1,44 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ +#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 _BASE 0 +#define _FN1 1 + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_60_tsangan_hhkb( + 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_BSLS, KC_DEL, + 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_BSPC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL + ), + + [_FN1] = LAYOUT_60_tsangan_hhkb( + 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, _______, + RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, RESET + ) +}; diff --git a/keyboards/cannonkeys/an_c/keymaps/via/keymap.c b/keyboards/cannonkeys/an_c/keymaps/via/keymap.c new file mode 100644 index 000000000..b182ac5f4 --- /dev/null +++ b/keyboards/cannonkeys/an_c/keymaps/via/keymap.c @@ -0,0 +1,43 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ +#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 _BASE 0 +#define _FN1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_all( + 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_DEL, + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FN1), KC_RCTL + ), + + [_FN1] = LAYOUT_all( + 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, _______, + RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, RESET + ) +}; diff --git a/keyboards/cannonkeys/an_c/keymaps/via/rules.mk b/keyboards/cannonkeys/an_c/keymaps/via/rules.mk new file mode 100644 index 000000000..d12497792 --- /dev/null +++ b/keyboards/cannonkeys/an_c/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +# rules.mk overrides to enable VIA + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes + diff --git a/keyboards/cannonkeys/an_c/mcuconf.h b/keyboards/cannonkeys/an_c/mcuconf.h new file mode 100644 index 000000000..048eb4df6 --- /dev/null +++ b/keyboards/cannonkeys/an_c/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/cannonkeys/an_c/readme.md b/keyboards/cannonkeys/an_c/readme.md new file mode 100644 index 000000000..7d631a0a5 --- /dev/null +++ b/keyboards/cannonkeys/an_c/readme.md @@ -0,0 +1,12 @@ +# AN-C + +AN-C Keyboard + +Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan) +Hardware Supported: STM32F072CBT6 + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/an_c:default + +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). diff --git a/keyboards/cannonkeys/an_c/rules.mk b/keyboards/cannonkeys/an_c/rules.mk new file mode 100644 index 000000000..2f30956e7 --- /dev/null +++ b/keyboards/cannonkeys/an_c/rules.mk @@ -0,0 +1,59 @@ +# project specific files +# SRC = ssd1306.c +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F0xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F072xB +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f0xx +# it should exist either in /os/hal/boards/ +# or /boards +BOARD = ST_STM32F072B_DISCOVERY +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m0 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 6 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# /tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + +# Build Options +# comment out to disable the options. +# + +# project specific files +VPATH += keyboards/cannonkeys/stm32f072 +SRC = keyboard.c \ + led.c + +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave + +#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +CUSTOM_MATRIX = no # Custom matrix file +# BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason +RGBLIGHT_ENABLE = yes + +# RAW_ENABLE = yes +# DYNAMIC_KEYMAP_ENABLE = yes + +LAYOUTS = 60_ansi 60_tsangan_hhkb diff --git a/keyboards/cannonkeys/instant60/info.json b/keyboards/cannonkeys/instant60/info.json index 73a64b8b3..6d410968a 100644 --- a/keyboards/cannonkeys/instant60/info.json +++ b/keyboards/cannonkeys/instant60/info.json @@ -5,10 +5,10 @@ "width": 15, "height": 5, "layouts": { - "LAYOUT_ansi": { + "LAYOUT_60_ansi": { "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] }, - "LAYOUT_tsangan": { + "LAYOUT_60_tsangan_hhkb": { "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] } } diff --git a/keyboards/cannonkeys/instant60/readme.md b/keyboards/cannonkeys/instant60/readme.md index 9cd91e951..bee5f72eb 100644 --- a/keyboards/cannonkeys/instant60/readme.md +++ b/keyboards/cannonkeys/instant60/readme.md @@ -2,9 +2,11 @@ Instant60 Keyboard -Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan1) +Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan) Hardware Supported: STM32F072CBT6 +[PCB Support Docs](https://docs.cannonkeys.com/instant60/) + Make example for this keyboard (after setting up your build environment): make cannonkeys/instant60:default From 1a442f9989c825cb42b41845658874f7f9e90ba7 Mon Sep 17 00:00:00 2001 From: lf Date: Mon, 24 Jun 2019 01:23:27 -0600 Subject: [PATCH 253/341] [Docs] Reword confusing description of `TO(layer)` (#6174) * Reword confusing description of `TO(layer)` * Update docs/keycodes.md Co-Authored-By: Drashna Jaelre --- docs/keycodes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/keycodes.md b/docs/keycodes.md index 3ff87856e..bd4dd61a5 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -298,7 +298,7 @@ This is a reference only. Each group of keys links to the page documenting their |`LM(layer, mod)`|Momentarily turn on `layer` (like MO) with `mod` active as well. Where `mod` is a mods_bit. Mods can be viewed [here](https://docs.qmk.fm/#/feature_advanced_keycodes?id=mod-tap). Example Implementation: `LM(LAYER_1, MOD_LALT)`| |`LT(layer, kc)` |Turn on `layer` when held, `kc` when tapped | |`TG(layer)` |Toggle `layer` on or off | -|`TO(layer)` |Turn on `layer` when pressed | +|`TO(layer)` |Turns on `layer` and turns off all other layers, except the default layer | |`TT(layer)` |Normally acts like MO unless it's tapped multiple times, which toggles `layer` on | ## [Mouse Keys](feature_mouse_keys.md) From cd59fe78be54af41c9fa4e5a9474767d8b314cd6 Mon Sep 17 00:00:00 2001 From: Andrew Kannan Date: Mon, 24 Jun 2019 03:28:38 -0400 Subject: [PATCH 254/341] [Keyboard] Add Ortho75 (#6177) * Add Ortho75 * fix typo * Add dfu args to rules.mk * Update keyboards/cannonkeys/ortho75/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/cannonkeys/ortho75/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/cannonkeys/ortho75/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/cannonkeys/ortho75/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/cannonkeys/ortho75/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/cannonkeys/ortho75/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/cannonkeys/ortho75/keymaps/default/keymap.c Co-Authored-By: fauxpark --- .../ortho75/boards/GENERIC_STM32_F103/board.c | 56 ++ .../ortho75/boards/GENERIC_STM32_F103/board.h | 166 ++++++ .../boards/GENERIC_STM32_F103/board.mk | 5 + .../cannonkeys/ortho75/bootloader_defs.h | 10 + keyboards/cannonkeys/ortho75/chconf.h | 524 ++++++++++++++++++ keyboards/cannonkeys/ortho75/config.h | 82 +++ keyboards/cannonkeys/ortho75/halconf.h | 353 ++++++++++++ keyboards/cannonkeys/ortho75/info.json | 88 +++ .../ortho75/keymaps/default/keymap.c | 72 +++ .../ld/STM32F103x8_stm32duino_bootloader.ld | 88 +++ keyboards/cannonkeys/ortho75/mcuconf.h | 209 +++++++ keyboards/cannonkeys/ortho75/ortho75.c | 49 ++ keyboards/cannonkeys/ortho75/ortho75.h | 18 + keyboards/cannonkeys/ortho75/readme.md | 12 + keyboards/cannonkeys/ortho75/rules.mk | 57 ++ 15 files changed, 1789 insertions(+) create mode 100644 keyboards/cannonkeys/ortho75/boards/GENERIC_STM32_F103/board.c create mode 100644 keyboards/cannonkeys/ortho75/boards/GENERIC_STM32_F103/board.h create mode 100644 keyboards/cannonkeys/ortho75/boards/GENERIC_STM32_F103/board.mk create mode 100644 keyboards/cannonkeys/ortho75/bootloader_defs.h create mode 100644 keyboards/cannonkeys/ortho75/chconf.h create mode 100644 keyboards/cannonkeys/ortho75/config.h create mode 100644 keyboards/cannonkeys/ortho75/halconf.h create mode 100644 keyboards/cannonkeys/ortho75/info.json create mode 100644 keyboards/cannonkeys/ortho75/keymaps/default/keymap.c create mode 100644 keyboards/cannonkeys/ortho75/ld/STM32F103x8_stm32duino_bootloader.ld create mode 100644 keyboards/cannonkeys/ortho75/mcuconf.h create mode 100644 keyboards/cannonkeys/ortho75/ortho75.c create mode 100644 keyboards/cannonkeys/ortho75/ortho75.h create mode 100644 keyboards/cannonkeys/ortho75/readme.md create mode 100644 keyboards/cannonkeys/ortho75/rules.mk diff --git a/keyboards/cannonkeys/ortho75/boards/GENERIC_STM32_F103/board.c b/keyboards/cannonkeys/ortho75/boards/GENERIC_STM32_F103/board.c new file mode 100644 index 000000000..8c5a87f35 --- /dev/null +++ b/keyboards/cannonkeys/ortho75/boards/GENERIC_STM32_F103/board.c @@ -0,0 +1,56 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include "hal.h" + +// Value to place in RTC backup register 10 for persistent bootloader mode +#define RTC_BOOTLOADER_FLAG 0x424C + +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +#if HAL_USE_PAL || defined(__DOXYGEN__) +const PALConfig pal_default_config = +{ + {VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH}, + {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH}, + {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH}, + {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH}, + {VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH}, +}; +#endif + +/* + * Early initialization code. + * This initialization must be performed just after stack setup and before + * any other initialization. + */ +void __early_init(void) { + + stm32_clock_init(); +} + +/* + * Board-specific initialization code. + */ +void boardInit(void) { + //JTAG-DP Disabled and SW-DP Enabled + AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE; + //Set backup register DR10 to enter bootloader on reset + BKP->DR10 = RTC_BOOTLOADER_FLAG; +} diff --git a/keyboards/cannonkeys/ortho75/boards/GENERIC_STM32_F103/board.h b/keyboards/cannonkeys/ortho75/boards/GENERIC_STM32_F103/board.h new file mode 100644 index 000000000..9427adabf --- /dev/null +++ b/keyboards/cannonkeys/ortho75/boards/GENERIC_STM32_F103/board.h @@ -0,0 +1,166 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _BOARD_H_ +#define _BOARD_H_ + +/* + * Setup for a Generic STM32F103 board. + */ + +/* + * Board identifier. + */ +#define BOARD_GENERIC_STM32_F103 +#define BOARD_NAME "Generic STM32F103x board" + +/* + * Board frequencies. + */ +#define STM32_LSECLK 32768 +#define STM32_HSECLK 8000000 + +/* + * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h. + */ +#define STM32F103xB + +/* + * IO pins assignments + */ + +/* on-board */ + +#define GPIOA_LED 8 +#define GPIOD_OSC_IN 0 +#define GPIOD_OSC_OUT 1 + +/* In case your board has a "USB enable" hardware + controlled by a pin, define it here. (It could be just + a 1.5k resistor connected to D+ line.) +*/ +/* +#define GPIOB_USB_DISC 10 +*/ + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * + * The digits have the following meaning: + * 0 - Analog input. + * 1 - Push Pull output 10MHz. + * 2 - Push Pull output 2MHz. + * 3 - Push Pull output 50MHz. + * 4 - Digital input. + * 5 - Open Drain output 10MHz. + * 6 - Open Drain output 2MHz. + * 7 - Open Drain output 50MHz. + * 8 - Digital input with PullUp or PullDown resistor depending on ODR. + * 9 - Alternate Push Pull output 10MHz. + * A - Alternate Push Pull output 2MHz. + * B - Alternate Push Pull output 50MHz. + * C - Reserved. + * D - Alternate Open Drain output 10MHz. + * E - Alternate Open Drain output 2MHz. + * F - Alternate Open Drain output 50MHz. + * Please refer to the STM32 Reference Manual for details. + */ + +/* + * Port A setup. + * Everything input with pull-up except: + * PA2 - Alternate output (USART2 TX). + * PA3 - Normal input (USART2 RX). + * PA9 - Alternate output (USART1 TX). + * PA10 - Normal input (USART1 RX). + */ +#define VAL_GPIOACRL 0x88884B88 /* PA7...PA0 */ +#define VAL_GPIOACRH 0x888884B8 /* PA15...PA8 */ +#define VAL_GPIOAODR 0xFFFFFFFF + +/* + * Port B setup. + * Everything input with pull-up except: + * PB10 - Push Pull output (USB switch). + */ +#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */ +#define VAL_GPIOBCRH 0x88888388 /* PB15...PB8 */ +#define VAL_GPIOBODR 0xFFFFFFFF + +/* + * Port C setup. + * Everything input with pull-up except: + * PC13 - Push Pull output (LED). + */ +#define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */ +#define VAL_GPIOCCRH 0x88388888 /* PC15...PC8 */ +#define VAL_GPIOCODR 0xFFFFFFFF + +/* + * Port D setup. + * Everything input with pull-up except: + * PD0 - Normal input (XTAL). + * PD1 - Normal input (XTAL). + */ +#define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */ +#define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */ +#define VAL_GPIODODR 0xFFFFFFFF + +/* + * Port E setup. + * Everything input with pull-up except: + */ +#define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */ +#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */ +#define VAL_GPIOEODR 0xFFFFFFFF + +/* + * USB bus activation macro, required by the USB driver. + */ +/* The point is that most of the generic STM32F103* boards + have a 1.5k resistor connected on one end to the D+ line + and on the other end to some pin. Or even a slightly more + complicated "USB enable" circuit, controlled by a pin. + That should go here. + + However on some boards (e.g. one that I have), there's no + such hardware. In which case it's better to not do anything. +*/ +/* +#define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC) +*/ +#define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT); + +/* + * USB bus de-activation macro, required by the USB driver. + */ +/* +#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC) +*/ +#define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12); + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* _BOARD_H_ */ diff --git a/keyboards/cannonkeys/ortho75/boards/GENERIC_STM32_F103/board.mk b/keyboards/cannonkeys/ortho75/boards/GENERIC_STM32_F103/board.mk new file mode 100644 index 000000000..6b8b312fd --- /dev/null +++ b/keyboards/cannonkeys/ortho75/boards/GENERIC_STM32_F103/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F103/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F103 diff --git a/keyboards/cannonkeys/ortho75/bootloader_defs.h b/keyboards/cannonkeys/ortho75/bootloader_defs.h new file mode 100644 index 000000000..6b8fa9f72 --- /dev/null +++ b/keyboards/cannonkeys/ortho75/bootloader_defs.h @@ -0,0 +1,10 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here (page 175): + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ + +// STM32F103* does NOT have an USB bootloader in ROM (only serial), +// so setting anything here does not make much sense +#define STM32_BOOTLOADER_ADDRESS 0x80000000 diff --git a/keyboards/cannonkeys/ortho75/chconf.h b/keyboards/cannonkeys/ortho75/chconf.h new file mode 100644 index 000000000..bbd9b2da6 --- /dev/null +++ b/keyboards/cannonkeys/ortho75/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 100000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 0 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE TRUE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP TRUE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS FALSE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/cannonkeys/ortho75/config.h b/keyboards/cannonkeys/ortho75/config.h new file mode 100644 index 000000000..6c240e2d6 --- /dev/null +++ b/keyboards/cannonkeys/ortho75/config.h @@ -0,0 +1,82 @@ +/* +Copyright 2015 Jun Wako + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6464 +#define DEVICE_VER 0x0001 +/* in python2: list(u"whatever".encode('utf-16-le')) */ +/* at most 32 characters or the ugly hack in usb_main.c borks */ +#define MANUFACTURER CannonKeys +#define PRODUCT Ortho75 +#define DESCRIPTION Ortho75 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#define MATRIX_COL_PINS { B11, B10, B1, B0, A7, A6, A5, B14, A15, A0, C15, C14, B7, B6, B5 } +#define MATRIX_ROW_PINS { B12, C13, A2, A1, A3 } +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 + +#define NUMBER_OF_ENCODERS 1 +#define ENCODERS_PAD_A { B9 } +#define ENCODERS_PAD_B { B8 } + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define RGBLIGHT_ANIMATIONS + +#define WS2812_LED_N 16 +#define RGBLED_NUM WS2812_LED_N +#define PORT_WS2812 GPIOB +#define PIN_WS2812 15 +#define WS2812_SPI SPID2 + + +/* + * Feature disable options + * 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_FUNCTION diff --git a/keyboards/cannonkeys/ortho75/halconf.h b/keyboards/cannonkeys/ortho75/halconf.h new file mode 100644 index 000000000..72879a575 --- /dev/null +++ b/keyboards/cannonkeys/ortho75/halconf.h @@ -0,0 +1,353 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/cannonkeys/ortho75/info.json b/keyboards/cannonkeys/ortho75/info.json new file mode 100644 index 000000000..b6aaa8e7e --- /dev/null +++ b/keyboards/cannonkeys/ortho75/info.json @@ -0,0 +1,88 @@ +{ + "keyboard_name": "Ortho75", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x12": { + "layout": [ + {"label":"`", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + {"label":"7", "x":7, "y":0}, + {"label":"8", "x":8, "y":0}, + {"label":"9", "x":9, "y":0}, + {"label":"0", "x":10, "y":0}, + {"label":"Backspace", "x":11, "y":0}, + {"label":"0", "x":12, "y":0}, + {"label":"0", "x":13, "y":0}, + {"label":"0", "x":14, "y":0}, + {"label":"Tab", "x":0, "y":1}, + {"label":"Q", "x":1, "y":1}, + {"label":"W", "x":2, "y":1}, + {"label":"E", "x":3, "y":1}, + {"label":"R", "x":4, "y":1}, + {"label":"T", "x":5, "y":1}, + {"label":"Y", "x":6, "y":1}, + {"label":"U", "x":7, "y":1}, + {"label":"I", "x":8, "y":1}, + {"label":"O", "x":9, "y":1}, + {"label":"P", "x":10, "y":1}, + {"label":"Delete", "x":11, "y":1}, + {"label":"0", "x":12, "y":1}, + {"label":"0", "x":13, "y":1}, + {"label":"0", "x":14, "y":1}, + {"label":"Esc", "x":0, "y":2}, + {"label":"A", "x":1, "y":2}, + {"label":"S", "x":2, "y":2}, + {"label":"D", "x":3, "y":2}, + {"label":"F", "x":4, "y":2}, + {"label":"G", "x":5, "y":2}, + {"label":"H", "x":6, "y":2}, + {"label":"J", "x":7, "y":2}, + {"label":"K", "x":8, "y":2}, + {"label":"L", "x":9, "y":2}, + {"label":";", "x":10, "y":2}, + {"label":"'", "x":11, "y":2}, + {"label":"0", "x":12, "y":2}, + {"label":"0", "x":13, "y":2}, + {"label":"0", "x":14, "y":2}, + {"label":"Shift", "x":0, "y":3}, + {"label":"Z", "x":1, "y":3}, + {"label":"X", "x":2, "y":3}, + {"label":"C", "x":3, "y":3}, + {"label":"V", "x":4, "y":3}, + {"label":"B", "x":5, "y":3}, + {"label":"N", "x":6, "y":3}, + {"label":"M", "x":7, "y":3}, + {"label":",", "x":8, "y":3}, + {"label":".", "x":9, "y":3}, + {"label":"/", "x":10, "y":3}, + {"label":"Enter", "x":11, "y":3}, + {"label":"0", "x":12, "y":3}, + {"label":"0", "x":13, "y":3}, + {"label":"0", "x":14, "y":3}, + {"label":"Fn", "x":0, "y":4}, + {"label":"Ctrl", "x":1, "y":4}, + {"label":"Alt", "x":2, "y":4}, + {"label":"Meta", "x":3, "y":4}, + {"label":"Lower", "x":4, "y":4}, + {"label":"Space", "x":5, "y":4}, + {"label":"Space", "x":6, "y":4}, + {"label":"Raise", "x":7, "y":4}, + {"label":"Left", "x":8, "y":4}, + {"label":"Down", "x":9, "y":4}, + {"label":"Up", "x":10, "y":4}, + {"label":"Right", "x":11, "y":4}, + {"label":"0", "x":12, "y":4}, + {"label":"0", "x":13, "y":4}, + {"label":"0", "x":14, "y":4} + ] + } + } +} diff --git a/keyboards/cannonkeys/ortho75/keymaps/default/keymap.c b/keyboards/cannonkeys/ortho75/keymaps/default/keymap.c new file mode 100644 index 000000000..1aef110cb --- /dev/null +++ b/keyboards/cannonkeys/ortho75/keymaps/default/keymap.c @@ -0,0 +1,72 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ +#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 _BASE 0 +#define _FN 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | - | ` | = | 6 | 7 | 8 | 9 | 0 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | [ | \ | ] | Y | U | I | O | P | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | HOME | DEL | PG UP | H | J | K | L | ; | ENTER | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | END | UP | PG DN | N | M | , | . | / | RSHIFT | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | LGUI | LALT | FN | SPACE | SPACE | LEFT | DOWN | RIGHT | SPACE | SPACE | FN | RALT | RGUI | RCTRL | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_BASE] = LAYOUT_ortho_5x15( /* QWERTY */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_DEL, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_UP, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, KC_SPC, MO(_FN), KC_RALT, KC_RGUI, KC_RCTL + ), + +/* FUNCTION + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | NUM LK | P/ | P* | F7 | F8 | F9 | F10 | F11 | F12 | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | SELECT | CALC | MYCOMP | MAIL | RGB HD | RGB HI | P7 | P8 | P9 | - | | | PR SCR | SCR LK | PAUSE | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | PREV | PLAY | NEXT | STOP | RGB SD | RGB SI | P4 | P5 | P6 | + | | RESET | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | VOL- | MUTE | VOL+ | APP | RGB VD | RGB VI | P1 | P2 | P3 | PENT | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | RGB TG | FN | RGB RMD| RGB MD | P0 | | P. | PENT | PENT | FN | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NLCK, KC_SLSH, KC_ASTR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_MSEL, KC_CALC, KC_MYCM, KC_MAIL, RGB_HUD, RGB_HUI, KC_P7, KC_P8, KC_P9, KC_MINS, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, + KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, RGB_SAD, RGB_SAI, KC_P4, KC_P5, KC_P6, KC_PLUS, _______, RESET, _______, _______, _______, + KC_VOLD, KC_MUTE, KC_VOLU, KC_APP, RGB_VAD, RGB_VAI, KC_P1, KC_P2, KC_P3, KC_PENT, _______, _______, _______, _______, _______, + _______, _______, RGB_TOG, MO(_FN), RGB_RMOD,RGB_MOD, KC_P0, _______, KC_PDOT, KC_PENT, KC_PENT, MO(_FN), _______, _______, _______ + ) +}; diff --git a/keyboards/cannonkeys/ortho75/ld/STM32F103x8_stm32duino_bootloader.ld b/keyboards/cannonkeys/ortho75/ld/STM32F103x8_stm32duino_bootloader.ld new file mode 100644 index 000000000..d0688ef60 --- /dev/null +++ b/keyboards/cannonkeys/ortho75/ld/STM32F103x8_stm32duino_bootloader.ld @@ -0,0 +1,88 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * ST32F103xB memory setup for use with the maplemini bootloader. + * You will have to + * #define CORTEX_VTOR_INIT 0x5000 + * in your projects chconf.h + */ +MEMORY +{ + flash0 : org = 0x08002000, len = 64k - 0x2000 + flash1 : org = 0x00000000, len = 0 + flash2 : org = 0x00000000, len = 0 + flash3 : org = 0x00000000, len = 0 + flash4 : org = 0x00000000, len = 0 + flash5 : org = 0x00000000, len = 0 + flash6 : org = 0x00000000, len = 0 + flash7 : org = 0x00000000, len = 0 + ram0 : org = 0x20000000, len = 20k + ram1 : org = 0x00000000, len = 0 + ram2 : org = 0x00000000, len = 0 + ram3 : org = 0x00000000, len = 0 + ram4 : org = 0x00000000, len = 0 + ram5 : org = 0x00000000, len = 0 + ram6 : org = 0x00000000, len = 0 + ram7 : org = 0x00000000, len = 0 +} + +/* For each data/text section two region are defined, a virtual region + and a load region (_LMA suffix).*/ + +/* Flash region to be used for exception vectors.*/ +REGION_ALIAS("VECTORS_FLASH", flash0); +REGION_ALIAS("VECTORS_FLASH_LMA", flash0); + +/* Flash region to be used for constructors and destructors.*/ +REGION_ALIAS("XTORS_FLASH", flash0); +REGION_ALIAS("XTORS_FLASH_LMA", flash0); + +/* Flash region to be used for code text.*/ +REGION_ALIAS("TEXT_FLASH", flash0); +REGION_ALIAS("TEXT_FLASH_LMA", flash0); + +/* Flash region to be used for read only data.*/ +REGION_ALIAS("RODATA_FLASH", flash0); +REGION_ALIAS("RODATA_FLASH_LMA", flash0); + +/* Flash region to be used for various.*/ +REGION_ALIAS("VARIOUS_FLASH", flash0); +REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); + +/* Flash region to be used for RAM(n) initialization data.*/ +REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); + +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts.*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); + +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); + +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); +REGION_ALIAS("DATA_RAM_LMA", flash0); + +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); + +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); + +/* Generic rules inclusion.*/ +INCLUDE rules.ld diff --git a/keyboards/cannonkeys/ortho75/mcuconf.h b/keyboards/cannonkeys/ortho75/mcuconf.h new file mode 100644 index 000000000..fced27289 --- /dev/null +++ b/keyboards/cannonkeys/ortho75/mcuconf.h @@ -0,0 +1,209 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +#define STM32F103_MCUCONF + +/* + * STM32F103 drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED FALSE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_USB_CLOCK_REQUIRED TRUE +#define STM32_USBPRE STM32_USBPRE_DIV1P5 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_RTCSEL STM32_RTCSEL_HSEDIV +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC1_IRQ_PRIORITY 6 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM8 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 TRUE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 7 +#define STM32_PWM_TIM2_IRQ_PRIORITY 7 +#define STM32_PWM_TIM3_IRQ_PRIORITY 7 +#define STM32_PWM_TIM4_IRQ_PRIORITY 7 +#define STM32_PWM_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM8_IRQ_PRIORITY 7 + +/* + * RTC driver system settings. + */ +#define STM32_RTC_IRQ_PRIORITY 15 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USE_USART3 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_HP_IRQ_PRIORITY 13 +#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/cannonkeys/ortho75/ortho75.c b/keyboards/cannonkeys/ortho75/ortho75.c new file mode 100644 index 000000000..c3ceee28c --- /dev/null +++ b/keyboards/cannonkeys/ortho75/ortho75.c @@ -0,0 +1,49 @@ + +#include "ortho75.h" + +#define MEDIA_KEY_DELAY 10 + +uint8_t layer = 0; + +uint32_t layer_state_set_kb(uint32_t state) { + state = layer_state_set_user(state); + layer = biton32(state); + return state; +} + +void encoder_update_kb(uint8_t index, bool clockwise) { + uint16_t mapped_code = 0; + if (index == 0) { + if (clockwise) { + switch(layer){ + case 0: + default: + mapped_code = KC_VOLU; + break; + case 1: + mapped_code = KC_MEDIA_NEXT_TRACK; + break; + case 2: + mapped_code = KC_PGDN; + break; + } + } else { + switch(layer){ + case 0: + default: + mapped_code = KC_VOLD; + break; + case 1: + mapped_code = KC_MEDIA_PREV_TRACK; + break; + case 2: + mapped_code = KC_PGUP; + break; + } + } + uint16_t held_keycode_timer = timer_read(); + register_code(mapped_code); + while (timer_elapsed(held_keycode_timer) < MEDIA_KEY_DELAY){ /* no-op */ } + unregister_code(mapped_code); + } +} diff --git a/keyboards/cannonkeys/ortho75/ortho75.h b/keyboards/cannonkeys/ortho75/ortho75.h new file mode 100644 index 000000000..d23e06429 --- /dev/null +++ b/keyboards/cannonkeys/ortho75/ortho75.h @@ -0,0 +1,18 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_5x15( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e }, \ +} diff --git a/keyboards/cannonkeys/ortho75/readme.md b/keyboards/cannonkeys/ortho75/readme.md new file mode 100644 index 000000000..3f94c6246 --- /dev/null +++ b/keyboards/cannonkeys/ortho75/readme.md @@ -0,0 +1,12 @@ +# Ortho 75 + +A Blue Pill STM32F103C8T6-based 15x5 ortholinear keyboard. + +Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan) +Hardware Supported: Blue Pill STM32F103C8T6 + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/ortho75:default + +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). diff --git a/keyboards/cannonkeys/ortho75/rules.mk b/keyboards/cannonkeys/ortho75/rules.mk new file mode 100644 index 000000000..db155867e --- /dev/null +++ b/keyboards/cannonkeys/ortho75/rules.mk @@ -0,0 +1,57 @@ +# project specific files +VPATH += keyboards/cannonkeys/bluepill +SRC = led.c \ + keyboard.c + +# GENERIC STM32F103C8T6 board - stm32duino bootloader +OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 +MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader +BOARD = GENERIC_STM32_F103 + +# OPT_DEFS = +# MCU_LDSCRIPT = STM32F103x8 +# BOARD = GENERIC_STM32_F103 + +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F1xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f1xx +# it should exist either in /os/hal/boards/ +# or /boards +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m3 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# /tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + +DFU_ARGS = -d 1eaf:0003 -a 2 -R + +#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes +ENCODER_ENABLE = yes + +LAYOUTS = LAYOUT_ortho_5x15 From 1cdaedbedf828301b4d881e6ecdc28f136731b4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Adam=C4=8D=C3=ADk?= Date: Mon, 24 Jun 2019 09:31:47 +0200 Subject: [PATCH 255/341] [Keymap] Katana60 custom layout by josefadamcik - MacOS/Linux+Qwerty/Colemak support (#6178) --- .../katana60/keymaps/josefadamcik/config.h | 20 +++ .../katana60/keymaps/josefadamcik/keymap.c | 163 ++++++++++++++++++ .../katana60/keymaps/josefadamcik/readme.md | 23 +++ 3 files changed, 206 insertions(+) create mode 100644 keyboards/katana60/keymaps/josefadamcik/config.h create mode 100644 keyboards/katana60/keymaps/josefadamcik/keymap.c create mode 100644 keyboards/katana60/keymaps/josefadamcik/readme.md diff --git a/keyboards/katana60/keymaps/josefadamcik/config.h b/keyboards/katana60/keymaps/josefadamcik/config.h new file mode 100644 index 000000000..0054f43e6 --- /dev/null +++ b/keyboards/katana60/keymaps/josefadamcik/config.h @@ -0,0 +1,20 @@ +/* Copyright 2017 Baris Tosun + * + * 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 . + */ + +#pragma once + +// place overrides here + diff --git a/keyboards/katana60/keymaps/josefadamcik/keymap.c b/keyboards/katana60/keymaps/josefadamcik/keymap.c new file mode 100644 index 000000000..8556ee424 --- /dev/null +++ b/keyboards/katana60/keymaps/josefadamcik/keymap.c @@ -0,0 +1,163 @@ +/* Copyright 2019 Josef Adamcik + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum katana_layers { + /* _M_XYZ = Mac Os, _W_XYZ = Win/Linux */ + _M_COLEMAK, + _M_QWERTY, + _W_COLEMAK, + _W_QWERTY, + _NUMB, + _SYMB, + _M_EXT, + _W_EXT +}; + +enum katana_keycodes { + M_COLEMAK = SAFE_RANGE, + M_QWERTY, + W_COLEMAK, + W_QWERTY +}; + +#define K_SPCFN LT(_SYMB, KC_SPACE) /* Tap for space, hold for symbols layer */ +#define K_BSPFN LT(_SYMB, KC_BSPC) /* Tap for backspace, hold for symbols layer */ +/* Linux/win variants */ +#define W_LEFT_MOD MT(MOD_RCTL, KC_LEFT) +#define W_DOWN_MOD MT(MOD_RALT, KC_DOWN) +#define W_UP_MOD MT(MOD_RGUI, KC_UP) +#define W_UNDO LCTL(KC_Z) +#define W_CUT LCTL(KC_X) +#define W_COPY LCTL(KC_C) +#define W_PASTE LCTL(KC_V) +#define W_PRVWD LCTL(KC_LEFT) +#define W_NXTWD LCTL(KC_RIGHT) +#define W_LSTRT KC_HOME +#define W_LEND KC_END +/* Mac variants */ +#define M_LEFT_MOD MT(MOD_RGUI, KC_LEFT) +#define M_DOWN_MOD MT(MOD_RALT, KC_DOWN) +#define M_UP_MOD MT(MOD_RCTL, KC_UP) +#define M_UNDO LGUI(KC_Z) +#define M_CUT LGUI(KC_X) +#define M_COPY LGUI(KC_C) +#define M_PASTE LGUI(KC_V) +#define M_PRVWD LALT(KC_LEFT) +#define M_NXTWD LALT(KC_RIGHT) +#define M_LSTRT LGUI(KC_LEFT) +#define M_LEND LGUI(KC_RIGHT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_M_COLEMAK] = LAYOUT( + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_NUMB),KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + MO(_M_EXT),KC_A, KC_R, KC_S, KC_T, KC_D, KC_MINS, KC_QUOT, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_EQL, KC_DEL, KC_BSLS, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(_SYMB), KC_LCTL, KC_LALT, KC_LGUI, K_BSPFN, KC_ENT, KC_SPACE, M_LEFT_MOD,M_DOWN_MOD,M_UP_MOD, KC_RIGHT,MO(_SYMB) +), +[_M_QWERTY] = LAYOUT( + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_NUMB),KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + MO(_M_EXT),KC_A, KC_S, KC_D, KC_F, KC_G, KC_MINS, KC_QUOT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_EQL, KC_DEL, KC_BSLS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(_SYMB), KC_LCTL, KC_LALT, KC_LGUI, K_BSPFN, KC_ENT, KC_SPACE, M_LEFT_MOD,M_DOWN_MOD,M_UP_MOD, KC_RIGHT,MO(_SYMB) +), +[_W_COLEMAK] = LAYOUT( + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_NUMB),KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + MO(_W_EXT),KC_A, KC_R, KC_S, KC_T, KC_D, KC_MINS, KC_QUOT, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_EQL, KC_DEL, KC_BSLS, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(_SYMB), KC_LGUI, KC_LALT, KC_LCTL, K_BSPFN, KC_ENT, KC_SPACE, W_LEFT_MOD,W_DOWN_MOD,W_UP_MOD, KC_RIGHT,MO(_SYMB) +), +[_W_QWERTY] = LAYOUT( + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_NUMB),KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + MO(_W_EXT),KC_A, KC_S, KC_D, KC_F, KC_G, KC_MINS, KC_QUOT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_EQL, KC_DEL, KC_BSLS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(_SYMB), KC_LGUI, KC_LALT, KC_LCTL, K_BSPFN, KC_ENT, KC_SPACE, W_LEFT_MOD,W_DOWN_MOD,W_UP_MOD, KC_RIGHT,MO(_SYMB) +), +[_NUMB] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______,_______, KC_PSLS, KC_PAST, KC_PMNS, _______, _______, + _______, _______, _______, KC_MS_U, _______, _______, _______, _______,_______, KC_7, KC_8, KC_9, KC_PPLS, _______, + _______, KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______,_______, KC_4, KC_5, KC_6, KC_PPLS, _______, + _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______,_______, KC_1, KC_2, KC_3, KC_PENT, _______, + _______, _______, _______, _______, KC_BTN1, _______, KC_P0, KC_PDOT, _______, _______, _______, _______ +), +[_SYMB] = LAYOUT( + RESET, _______, 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_VOLD, KC_VOLU, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_PLUS, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_MPRV, KC_MPLY, KC_MNXT, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, + _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______, _______ +), +[_M_EXT] = LAYOUT( + RESET ,M_COLEMAK,M_QWERTY,W_COLEMAK,W_QWERTY,_______,_______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, M_PRVWD, KC_UP, M_NXTWD, _______, _______, + _______, KC_LALT, KC_LCTL, KC_LSFT, _______, KC_CAPS, _______, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, _______, + _______, M_UNDO, M_CUT, M_COPY, M_PASTE, _______, _______, _______, _______, _______, M_LSTRT, _______, M_LEND, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +[_W_EXT] = LAYOUT( + RESET ,M_COLEMAK,M_QWERTY,W_COLEMAK,W_QWERTY,_______,_______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, W_PRVWD, KC_UP, W_NXTWD, _______, _______, + _______, KC_LALT, KC_LCTL, KC_LSFT, _______, KC_CAPS, _______, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, _______, + _______, W_UNDO, W_CUT, W_COPY, W_PASTE, _______, _______, _______, _______, _______, W_LSTRT, _______, W_LEND, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case M_QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_M_QWERTY); + } + return false; + break; + case M_COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_M_COLEMAK); + } + return false; + break; + case W_QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_W_QWERTY); + } + return false; + break; + case W_COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_W_COLEMAK); + } + return false; + break; + } + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/katana60/keymaps/josefadamcik/readme.md b/keyboards/katana60/keymaps/josefadamcik/readme.md new file mode 100644 index 000000000..5d72b1def --- /dev/null +++ b/keyboards/katana60/keymaps/josefadamcik/readme.md @@ -0,0 +1,23 @@ +![Multi OS Katana60 layout image](https://i.imgur.com/1w2OA1o.png) + +# Multi OS Katana60 layout + +Based on the default Katana60 layout, customized by [Josef Adamcik](https://josef-adamcik.cz) with several basic layers (Colemak vs Qwerty, Mac OS vs Linux/Win) + +- Supports 4 default layers: Colemak Mac, Qwerty Mac, Colemak Win/Linux, Qwerty Win/Linux. Switching between default layers is persisted. For more details about Mac vs Win/Linux see below. +- There are arrows mapped to the right side of the bottom row on Katana6O. I kept this mapping but modified it a bit - when you press and hold any of the first three arrow keys it acts as a modifier (CMD, OPT, CTRL). If you just tap it, it acts as an arrow. + +## Mac versus Win/Linux layers: + +- Modifiers are ordered differently. Mac version has (from the middle to the outside): CMD, ALT, CTRL, Win/Linux version has CTRL, ALT, CMD. It's meant to make switching between platforms easier. +- Extend layer is different, so the keys which represent shortcuts ("previous/next word" and "copy", "paste", "cut", "undo") work properly. + +## More details - reasons for some choices in this layout + +I use Mac for work and Ubuntu at home. So I would like to stay compatible with both systems. The main problem is the modifiers. Firstly, they tend to be ordered differently on Mac keyboards. Secondly, the main modifier on Mac is CMD (equivalent to WIn or SUPER on other keyboards). The same role is played by CTRL on Windows and Linux. Most of IDE’s or editors (Android Studio, VS Code, SublimeText) follow this habit in their OS-specific keymaps. + +I am a user of the Colemak layout. But I would like to have the ability to switch to qwerty. That would allow my other people to use my keyboard occasionally. + +I am a heavy user of keyboard shortcuts. So I need the layout to support my needs. Some keyboard layout has modifiers only on one side of the keyboard or they hide some of them (CMD) under a key combination. I tend to press the modifiers for a key shortcut with the opposite hand to the one which presses the letter. + +Layout in [keyboard-layout-editor.com](http://www.keyboard-layout-editor.com/#/gists/14d62ee67d36621c37888783fa29b107) From 80a40807e36d89e722e9b80830d216ac3d41dfcb Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 24 Jun 2019 09:22:05 -0700 Subject: [PATCH 256/341] [Keyboard] Add idle/wakeup function calls to Ergodox EZ (#6173) --- keyboards/ergodox_ez/ergodox_ez.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c index 09443cf72..947a173e3 100644 --- a/keyboards/ergodox_ez/ergodox_ez.c +++ b/keyboards/ergodox_ez/ergodox_ez.c @@ -304,4 +304,14 @@ led_config_t g_led_config = { { 4, 4, 1, 1, 1, 1 } }; +void suspend_power_down_kb(void) { + rgb_matrix_set_suspend_state(true); + suspend_power_down_user(); +} + + void suspend_wakeup_init_kb(void) { + rgb_matrix_set_suspend_state(false); + suspend_wakeup_init_user(); +} + #endif From 0a2894fc995572e90b3b06e1de51f13503daf9ca Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 24 Jun 2019 09:42:56 -0700 Subject: [PATCH 257/341] [Keyboard] Fixup RGB Matrix functionality on Planck EZ (#6099) * [Keyboard] Allow RGB Matrix to be disabled on Planck EZ that don't have LEDs * Add function calls to enabled/disable rgb matrix on idle/wakeup --- keyboards/planck/ez/ez.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/keyboards/planck/ez/ez.c b/keyboards/planck/ez/ez.c index 3ad694c4a..e739b90b8 100644 --- a/keyboards/planck/ez/ez.c +++ b/keyboards/planck/ez/ez.c @@ -15,6 +15,7 @@ */ #include "ez.h" +#ifdef RGB_MATRIX_ENABLE const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver @@ -100,6 +101,16 @@ led_config_t g_led_config = { { 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1 } }; +void suspend_power_down_kb(void) { + rgb_matrix_set_suspend_state(true); + suspend_power_down_user(); +} + + void suspend_wakeup_init_kb(void) { + rgb_matrix_set_suspend_state(false); + suspend_wakeup_init_user(); +} +#endif void matrix_init_kb(void) { matrix_init_user(); From 1a2a54c326d0bb0dba899b3098487450d6d9dee6 Mon Sep 17 00:00:00 2001 From: Yan-Fa Li Date: Mon, 24 Jun 2019 12:29:54 -0700 Subject: [PATCH 258/341] [Keyboard] Add TA-65 PCB to QMK (#6180) * [keyboard] TA-65 by maartenwut Add ta65 to QMK with 4 layouts * Simplify config.h * Simplify keymap * Update bootloader - confirmed to be qmk-dfu by maartenwut * Update keyboards/ta65/readme.md Co-Authored-By: fauxpark * Review feedback - fauxpark recommendations - noroadsleft recommendations * Repair info.json structure JSON objects were not properly nested according to the QMK specification. * Switch info.json to "debug linting" So I can read the file more easily. * Remove k2c and k31 from LAYOUT_tsangan k2c was the Non-US Hash position, and k31 was the Non-US Backslash position, but this layout is intended for ANSI. * Correct LAYOUT_tsangan data in info.json * Update tsangan keymap to use updated LAYOUT_tsangan macro correctly * Rename LAYOUT_tsangan to LAYOUT_ansi_tsangan Increased clarity. * Rename tsangan keymap as default_ansi_tsangan Per QMK Keyboard Guidelines. * Fix object ordering for ISO layouts in info.json ISO Enter's object was out of sequence in both layouts. * Rename ISO keymaps per QMK Keyboard Guidelines - rename iso keymap as default_iso - rename iso_tsangan keymap as default_iso_tsangan * Add default_ansi keymap For user reference. * Enable Community Layout support LAYOUT_ansi and LAYOUT_iso conform to the 65_ansi and 65_iso Community Layouts, respectively. - rename LAYOUT_ansi to LAYOUT_65_ansi - rename LAYOUT_iso to LAYOUT_65_iso - update keymaps as appropriate - add LAYOUTS rule to rules.mk * Disambiguate key labels in info.json * Remove trailing white space from info.json * Update keyboards/ta65/keymaps/maartenwut/config.h Co-Authored-By: Drashna Jaelre --- keyboards/ta65/config.h | 62 +++ keyboards/ta65/info.json | 372 ++++++++++++++++++ keyboards/ta65/keymaps/default/keymap.c | 17 + keyboards/ta65/keymaps/default_ansi/keymap.c | 17 + .../keymaps/default_ansi_tsangan/keymap.c | 17 + keyboards/ta65/keymaps/default_iso/keymap.c | 17 + .../ta65/keymaps/default_iso_tsangan/keymap.c | 17 + keyboards/ta65/keymaps/maartenwut/config.h | 3 + keyboards/ta65/keymaps/maartenwut/keymap.c | 45 +++ keyboards/ta65/readme.md | 17 + keyboards/ta65/rules.mk | 65 +++ keyboards/ta65/ta65.c | 13 + keyboards/ta65/ta65.h | 82 ++++ 13 files changed, 744 insertions(+) create mode 100644 keyboards/ta65/config.h create mode 100644 keyboards/ta65/info.json create mode 100644 keyboards/ta65/keymaps/default/keymap.c create mode 100644 keyboards/ta65/keymaps/default_ansi/keymap.c create mode 100644 keyboards/ta65/keymaps/default_ansi_tsangan/keymap.c create mode 100644 keyboards/ta65/keymaps/default_iso/keymap.c create mode 100644 keyboards/ta65/keymaps/default_iso_tsangan/keymap.c create mode 100644 keyboards/ta65/keymaps/maartenwut/config.h create mode 100644 keyboards/ta65/keymaps/maartenwut/keymap.c create mode 100644 keyboards/ta65/readme.md create mode 100644 keyboards/ta65/rules.mk create mode 100644 keyboards/ta65/ta65.c create mode 100644 keyboards/ta65/ta65.h diff --git a/keyboards/ta65/config.h b/keyboards/ta65/config.h new file mode 100644 index 000000000..d54a6273d --- /dev/null +++ b/keyboards/ta65/config.h @@ -0,0 +1,62 @@ +/* +Copyright 2019 Maarten Dekkers + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4705 +#define PRODUCT_ID 0x7465 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maartenwut +#define PRODUCT TA-65 +#define DESCRIPTION A universal 65% PCB with underglow. + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS {B4,D7,D6,D4,B3} +#define MATRIX_COL_PINS {D2,D1,D0,D3,D5,C7,C6,B6,B5,F0,F1,F4,F5,F6,F7,B0} +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* Backlight configuration + */ +#define RGB_DI_PIN E6 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 8 + +#define QMK_ESC_OUTPUT D2 // usually COL +#define QMK_ESC_INPUT B4 // usually ROW +#define QMK_LED E6 diff --git a/keyboards/ta65/info.json b/keyboards/ta65/info.json new file mode 100644 index 000000000..e509521d4 --- /dev/null +++ b/keyboards/ta65/info.json @@ -0,0 +1,372 @@ +{ + "keyboard_name": "ta65", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"@", "x":2, "y":0}, + {"label":"#", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"|", "x":13, "y":0}, + {"label":"Backspace", "x":14, "y":0}, + {"label":"~", "x":15, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"Delete", "x":15, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"\"", "x":11.75, "y":2}, + {"label":"Non-US Hash", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":2, "w":1.25}, + {"label":"PgUp", "x":15, "y":2}, + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"Non-US Backslash", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"Up", "x":14, "y":3}, + {"label":"PgDn", "x":15, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4}, + {"label":"Win", "x":11, "y":4}, + {"label":"Ctrl", "x":12, "y":4}, + {"label":"Left", "x":13, "y":4}, + {"label":"Down", "x":14, "y":4}, + {"label":"Right", "x":15, "y":4} + ] + }, + "LAYOUT_65_ansi": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"@", "x":2, "y":0}, + {"label":"#", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"~", "x":15, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"Delete", "x":15, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"PgUp", "x":15, "y":2}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"Up", "x":14, "y":3}, + {"label":"PgDn", "x":15, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4}, + {"label":"Win", "x":11, "y":4}, + {"label":"Ctrl", "x":12, "y":4}, + {"label":"Left", "x":13, "y":4}, + {"label":"Down", "x":14, "y":4}, + {"label":"Right", "x":15, "y":4} + ] + }, + "LAYOUT_ansi_tsangan": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"@", "x":2, "y":0}, + {"label":"#", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"|", "x":13, "y":0}, + {"label":"Backspace", "x":14, "y":0}, + {"label":"~", "x":15, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"Delete", "x":15, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"PgUp", "x":15, "y":2}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"Up", "x":14, "y":3}, + {"label":"PgDn", "x":15, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.5}, + {"label":"Win", "x":1.5, "y":4}, + {"label":"Alt", "x":2.5, "y":4, "w":1.5}, + {"label":"Space", "x":4, "y":4, "w":7}, + {"label":"Alt", "x":11, "y":4, "w":1.5}, + {"label":"Left", "x":13, "y":4}, + {"label":"Down", "x":14, "y":4}, + {"label":"Right", "x":15, "y":4} + ] + }, + "LAYOUT_65_iso": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"\"", "x":2, "y":0}, + {"label":"\u00a3", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"\u00ac", "x":15, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"Delete", "x":15, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"@", "x":11.75, "y":2}, + {"label":"~", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"PgUp", "x":15, "y":2}, + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"|", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"Up", "x":14, "y":3}, + {"label":"PgDn", "x":15, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"AltGr", "x":10, "y":4}, + {"label":"Win", "x":11, "y":4}, + {"label":"Ctrl", "x":12, "y":4}, + {"label":"Left", "x":13, "y":4}, + {"label":"Down", "x":14, "y":4}, + {"label":"Right", "x":15, "y":4} + ] + }, + "LAYOUT_iso_tsangan": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"\"", "x":2, "y":0}, + {"label":"\u00a3", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"~", "x":13, "y":0}, + {"label":"Backspace", "x":14, "y":0}, + {"label":"\u00ac", "x":15, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"Delete", "x":15, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"@", "x":11.75, "y":2}, + {"label":"~", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"PgUp", "x":15, "y":2}, + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"|", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"Up", "x":14, "y":3}, + {"label":"PgDn", "x":15, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.5}, + {"label":"Win", "x":1.5, "y":4}, + {"label":"Alt", "x":2.5, "y":4, "w":1.5}, + {"label":"Space", "x":4, "y":4, "w":7}, + {"label":"AltGr", "x":11, "y":4, "w":1.5}, + {"label":"Left", "x":13, "y":4}, + {"label":"Down", "x":14, "y":4}, + {"label":"Right", "x":15, "y":4} + ] + } + } +} diff --git a/keyboards/ta65/keymaps/default/keymap.c b/keyboards/ta65/keymaps/default/keymap.c new file mode 100644 index 000000000..b04172c75 --- /dev/null +++ b/keyboards/ta65/keymaps/default/keymap.c @@ -0,0 +1,17 @@ +#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 _MA 0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MA] = LAYOUT_all( + KC_ESC, 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_BSLS, KC_BSPC, KC_GRV, + 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_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUBS, 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_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_APP, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT) +}; diff --git a/keyboards/ta65/keymaps/default_ansi/keymap.c b/keyboards/ta65/keymaps/default_ansi/keymap.c new file mode 100644 index 000000000..9319d5bba --- /dev/null +++ b/keyboards/ta65/keymaps/default_ansi/keymap.c @@ -0,0 +1,17 @@ +#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 _MA 0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MA] = LAYOUT_65_ansi( + KC_ESC, 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_GRV, + 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_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + 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_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT) +}; diff --git a/keyboards/ta65/keymaps/default_ansi_tsangan/keymap.c b/keyboards/ta65/keymaps/default_ansi_tsangan/keymap.c new file mode 100644 index 000000000..5e0cd0b55 --- /dev/null +++ b/keyboards/ta65/keymaps/default_ansi_tsangan/keymap.c @@ -0,0 +1,17 @@ +#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 _MA 0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MA] = LAYOUT_ansi_tsangan( + KC_ESC, 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_BSLS, KC_BSPC, KC_GRV, + 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_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + 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_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT) +}; diff --git a/keyboards/ta65/keymaps/default_iso/keymap.c b/keyboards/ta65/keymaps/default_iso/keymap.c new file mode 100644 index 000000000..1d11ff958 --- /dev/null +++ b/keyboards/ta65/keymaps/default_iso/keymap.c @@ -0,0 +1,17 @@ +#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 _MA 0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MA] = LAYOUT_65_iso( + KC_ESC, 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_GRV, + 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_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUBS, 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_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT) +}; diff --git a/keyboards/ta65/keymaps/default_iso_tsangan/keymap.c b/keyboards/ta65/keymaps/default_iso_tsangan/keymap.c new file mode 100644 index 000000000..8505d73af --- /dev/null +++ b/keyboards/ta65/keymaps/default_iso_tsangan/keymap.c @@ -0,0 +1,17 @@ +#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 _MA 0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MA] = LAYOUT_iso_tsangan( + KC_ESC, 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_BSLS, KC_BSPC, KC_GRV, + 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_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUBS, 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_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT) +}; diff --git a/keyboards/ta65/keymaps/maartenwut/config.h b/keyboards/ta65/keymaps/maartenwut/config.h new file mode 100644 index 000000000..9b18f5826 --- /dev/null +++ b/keyboards/ta65/keymaps/maartenwut/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define RETRO_TAPPING diff --git a/keyboards/ta65/keymaps/maartenwut/keymap.c b/keyboards/ta65/keymaps/maartenwut/keymap.c new file mode 100644 index 000000000..a8ce0f180 --- /dev/null +++ b/keyboards/ta65/keymaps/maartenwut/keymap.c @@ -0,0 +1,45 @@ +#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. +enum { + _MA, + _GA, + _FL, + _SP +}; + +#define SPACE LT(_SP, KC_SPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MA] = LAYOUT_65_ansi( + KC_ESC, 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_MPLY, + 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_DEL, + 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, KC_PGUP, + 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_UP, KC_PGDN, + KC_CAPS, KC_LGUI, KC_LALT, SPACE, KC_RALT, KC_RCTRL,MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + +[_GA] = LAYOUT_65_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_SPC, _______, _______, _______, _______, _______, _______), + +[_FL] = LAYOUT_65_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, RESET, KC_PSCR, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, + _______, _______, _______, _______, _______, TG(_GA), _______, _______, _______, _______, _______, _______, _______, KC_HOME, + _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_END, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +[_SP] = LAYOUT_65_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_UP, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; diff --git a/keyboards/ta65/readme.md b/keyboards/ta65/readme.md new file mode 100644 index 000000000..48ba9ee0f --- /dev/null +++ b/keyboards/ta65/readme.md @@ -0,0 +1,17 @@ +TA-65 +===== + +A 65% PCB designed to fit the TADA68, Kayak and others by [maartenwut](https://maartenwut.com). + +![kle](https://maartenwut.com/wp-content/uploads/2019/02/ta-65-layouts-768x420.png) + +Keyboard Maintainer: QMK Community
+Hardware Supported: TA-65 PCB
+Hardware Availability: [maartenwut.com](https://maartenwut.com/product/ta-65/)
+ +Make example for this keyboard (after setting up your build environment): + + make ta65:default + +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). + diff --git a/keyboards/ta65/rules.mk b/keyboards/ta65/rules.mk new file mode 100644 index 000000000..47207cd46 --- /dev/null +++ b/keyboards/ta65/rules.mk @@ -0,0 +1,65 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +BOOTLOADER = qmk-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + +LAYOUTS = 65_ansi 65_iso diff --git a/keyboards/ta65/ta65.c b/keyboards/ta65/ta65.c new file mode 100644 index 000000000..4f67a0203 --- /dev/null +++ b/keyboards/ta65/ta65.c @@ -0,0 +1,13 @@ +#include "ta65.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); +}; + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + matrix_scan_user(); +}; diff --git a/keyboards/ta65/ta65.h b/keyboards/ta65/ta65.h new file mode 100644 index 000000000..273acf9ad --- /dev/null +++ b/keyboards/ta65/ta65.h @@ -0,0 +1,82 @@ +#pragma once +#include "quantum.h" + +// readability +#define ___ KC_NO +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0f, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k42, k46, k49, k4a, k4b, k4c, k4d, k4e \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, ___}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, ___}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, ___}, \ + {k40, k41, k42, ___, ___, ___, k46, ___, ___, k49, k4a, k4b, k4c, k4d, k4e, ___} \ +} + +#define LAYOUT_65_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k42, k46, k49, k4a, k4b, k4c, k4d, k4e \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, ___}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, ___}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, ___, k2d, k2e, ___}, \ + {k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, ___}, \ + {k40, k41, k42, ___, ___, ___, k46, ___, ___, k49, k4a, k4b, k4c, k4d, k4e, ___} \ +} + +#define LAYOUT_ansi_tsangan( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0f, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k42, k46, k49, k4c, k4d, k4e \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, ___}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, ___, k2d, k2e, ___}, \ + {k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, ___}, \ + {k40, k41, k42, ___, ___, ___, k46, ___, ___, k49, ___, ___, k4c, k4d, k4e, ___} \ +} + +#define LAYOUT_iso_tsangan( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0f, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k42, k46, k49, k4c, k4d, k4e \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, ___, k1e, ___}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, ___}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, ___}, \ + {k40, k41, k42, ___, ___, ___, k46, ___, ___, k49, ___, ___, k4c, k4d, k4e, ___} \ +} + +#define LAYOUT_65_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k42, k46, k49, k4a, k4b, k4c, k4d, k4e \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, ___}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, ___}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, ___}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, ___}, \ + {k40, k41, k42, ___, ___, ___, k46, ___, ___, k49, k4a, k4b, k4c, k4d, k4e, ___} \ +} + +void matrix_init_user(void); +void matrix_scan_user(void); From 48b5903677b773940f1f92d9cb1bf278290fc075 Mon Sep 17 00:00:00 2001 From: "Agent Blu, 006" Date: Mon, 24 Jun 2019 23:11:51 -0700 Subject: [PATCH 259/341] [Keyboard] Added 3d printable, handwired numpad by tritiumfusion (#6125) * Added tritium_numpad Adding tritium numpad handwired 6x4 numpad design from thingiverse user tritiumfusion. * Updated readme with more tritiumfusion information * Changed spacing in readme * Changed blu keymap * Update keyboards/handwired/tritium_numpad/config.h Co-Authored-By: Drashna Jaelre * Update keyboards/handwired/tritium_numpad/config.h Co-Authored-By: Drashna Jaelre * Update keyboards/handwired/tritium_numpad/config.h Co-Authored-By: Drashna Jaelre * Update keyboards/handwired/tritium_numpad/keymaps/max/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/handwired/tritium_numpad/tritium_numpad.h Co-Authored-By: Drashna Jaelre * Update keyboards/handwired/tritium_numpad/tritium_numpad.h Co-Authored-By: Drashna Jaelre * Update keyboards/handwired/tritium_numpad/tritium_numpad.h Co-Authored-By: Drashna Jaelre * Update keyboards/handwired/tritium_numpad/keymaps/ortho_left/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/handwired/tritium_numpad/keymaps/ortho_right/keymap.c Co-Authored-By: Drashna Jaelre * Update keyboards/handwired/tritium_numpad/rules.mk Co-Authored-By: fauxpark * Update keyboards/handwired/tritium_numpad/rules.mk Co-Authored-By: fauxpark * Update keyboards/handwired/tritium_numpad/readme.md Co-Authored-By: fauxpark * Removed action_function(), function_id, and MODS_CTRL_MASK * Reformatted keymaps so that they look nicer. Removed hackey backslashes that were there for no reason whatsoever. * Update keyboards/handwired/tritium_numpad/readme.md Co-Authored-By: fauxpark * Removed more backslashes * Added bootmagic to tritium_numpad --- keyboards/handwired/tritium_numpad/config.h | 83 ++++++++++++++++ keyboards/handwired/tritium_numpad/info.json | 21 ++++ .../tritium_numpad/keymaps/blu/keymap.c | 40 ++++++++ .../tritium_numpad/keymaps/blu/layers.json | 1 + .../tritium_numpad/keymaps/blu/readme.md | 13 +++ .../tritium_numpad/keymaps/default/keymap.c | 59 ++++++++++++ .../tritium_numpad/keymaps/max/keymap.c | 59 ++++++++++++ .../keymaps/ortho_left/keymap.c | 59 ++++++++++++ .../keymaps/ortho_right/keymap.c | 61 ++++++++++++ keyboards/handwired/tritium_numpad/readme.md | 28 ++++++ keyboards/handwired/tritium_numpad/rules.mk | 61 ++++++++++++ .../handwired/tritium_numpad/tritium_numpad.c | 29 ++++++ .../handwired/tritium_numpad/tritium_numpad.h | 95 +++++++++++++++++++ 13 files changed, 609 insertions(+) create mode 100644 keyboards/handwired/tritium_numpad/config.h create mode 100644 keyboards/handwired/tritium_numpad/info.json create mode 100644 keyboards/handwired/tritium_numpad/keymaps/blu/keymap.c create mode 100644 keyboards/handwired/tritium_numpad/keymaps/blu/layers.json create mode 100644 keyboards/handwired/tritium_numpad/keymaps/blu/readme.md create mode 100644 keyboards/handwired/tritium_numpad/keymaps/default/keymap.c create mode 100644 keyboards/handwired/tritium_numpad/keymaps/max/keymap.c create mode 100644 keyboards/handwired/tritium_numpad/keymaps/ortho_left/keymap.c create mode 100644 keyboards/handwired/tritium_numpad/keymaps/ortho_right/keymap.c create mode 100644 keyboards/handwired/tritium_numpad/readme.md create mode 100644 keyboards/handwired/tritium_numpad/rules.mk create mode 100644 keyboards/handwired/tritium_numpad/tritium_numpad.c create mode 100644 keyboards/handwired/tritium_numpad/tritium_numpad.h diff --git a/keyboards/handwired/tritium_numpad/config.h b/keyboards/handwired/tritium_numpad/config.h new file mode 100644 index 000000000..83333c0fb --- /dev/null +++ b/keyboards/handwired/tritium_numpad/config.h @@ -0,0 +1,83 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0003 +#define MANUFACTURER Handwired +#define PRODUCT Tritium Numpad +#define DESCRIPTION QMK keyboard firmware for handwired numpad + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 4 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { D1, D0, D4, C6, D7, E6 } +#define MATRIX_COL_PINS { F4, F6, B1, B2 } +#define UNUSED_PINS + +#define BACKLIGHT_PIN B6 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* Backlight configuration + */ +#define BACKLIGHT_LEVELS 4 + +/* Underlight configuration + */ + +#define RGB_DI_PIN D2 +#define RGBLED_NUM 4 // Number of LEDs + +/* + * Feature disable options + * 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_FUNCTION + diff --git a/keyboards/handwired/tritium_numpad/info.json b/keyboards/handwired/tritium_numpad/info.json new file mode 100644 index 000000000..bc10efc82 --- /dev/null +++ b/keyboards/handwired/tritium_numpad/info.json @@ -0,0 +1,21 @@ +{ + "keyboard_name": "Tritium_numpad", + "url": "https://www.thingiverse.com/thing:2855938", + "maintainer": "qmk", + "width": 4, + "height": 6, + "layouts": { + "LAYOUT_numpad_6x4": { + "key_count": 21, + "layout": [{"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, {"label":"k03", "x":3, "y":0}, {"label":"k10", "x":0, "y":1}, {"label":"k11", "x":1, "y":1}, {"label":"k12", "x":2, "y":1}, {"label":"k13", "x":3, "y":1}, {"label":"k20", "x":0, "y":2}, {"label":"k21", "x":1, "y":2}, {"label":"k22", "x":2, "y":2}, {"label":"k30", "x":0, "y":3}, {"label":"k31", "x":1, "y":3}, {"label":"k32", "x":2, "y":3}, {"label":"k23", "x":3, "y":2, "h":2}, {"label":"k40", "x":0, "y":4}, {"label":"k41", "x":1, "y":4}, {"label":"k42", "x":2, "y":4}, {"label":"k50", "x":0, "y":5, "w":2}, {"label":"k52", "x":2, "y":5}, {"label":"k43", "x":3, "y":4, "h":2}] + }, + "LAYOUT_nontra_6x4": { + "key_count": 22, + "layout": [{"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, {"label":"k03", "x":3, "y":0}, {"label":"k10", "x":0, "y":1}, {"label":"k11", "x":1, "y":1}, {"label":"k12", "x":2, "y":1}, {"label":"k13", "x":3, "y":1}, {"label":"k20", "x":0, "y":2}, {"label":"k21", "x":1, "y":2}, {"label":"k22", "x":2, "y":2}, {"label":"k23", "x":3, "y":2, "h":2}, {"label":"k30", "x":0, "y":3}, {"label":"k31", "x":1, "y":3}, {"label":"k32", "x":2, "y":3}, {"label":"k40", "x":0, "y":4}, {"label":"k41", "x":1, "y":4}, {"label":"k42", "x":2, "y":4}, {"label":"k43", "x":3, "y":4, "h":2}, {"label":"k50", "x":0, "y":5}, {"label":"k51", "x":1, "y":5}, {"label":"k52", "x":2, "y":5}] + }, + "LAYOUT_ortho_6x4": { + "key_count": 24, + "layout": [{"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, {"label":"k03", "x":3, "y":0}, {"label":"k10", "x":0, "y":1}, {"label":"k11", "x":1, "y":1}, {"label":"k12", "x":2, "y":1}, {"label":"k13", "x":3, "y":1}, {"label":"k20", "x":0, "y":2}, {"label":"k21", "x":1, "y":2}, {"label":"k22", "x":2, "y":2}, {"label":"k23", "x":3, "y":2}, {"label":"k30", "x":0, "y":3}, {"label":"k31", "x":1, "y":3}, {"label":"k32", "x":2, "y":3}, {"label":"k33", "x":3, "y":3}, {"label":"k40", "x":0, "y":4}, {"label":"k41", "x":1, "y":4}, {"label":"k42", "x":2, "y":4}, {"label":"k43", "x":3, "y":4}, {"label":"k50", "x":0, "y":5}, {"label":"k51", "x":1, "y":5}, {"label":"k52", "x":2, "y":5}, {"label":"k53", "x":3, "y":5}] + } + } +} diff --git a/keyboards/handwired/tritium_numpad/keymaps/blu/keymap.c b/keyboards/handwired/tritium_numpad/keymaps/blu/keymap.c new file mode 100644 index 000000000..958c17e42 --- /dev/null +++ b/keyboards/handwired/tritium_numpad/keymaps/blu/keymap.c @@ -0,0 +1,40 @@ +#include QMK_KEYBOARD_H + +void keyboard_pre_init_user(void) +{ + // Set layer LED as an output + setPinOutput(B0); +} + +uint32_t layer_state_set_user(uint32_t state) +{ + // Switch layer LED accordingly + switch (biton32(state)) { + case 0: + writePinHigh(B0); + break; + case 1: + writePinLow(B0); + break; + } + return state; +} + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_6x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_BSPC, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_P0, KC_UP, KC_PDOT, TT(1), + KC_LEFT, KC_DOWN, KC_RGHT, BL_STEP + ), + [1] = LAYOUT_ortho_6x4( + KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_K, KC_NO, KC_NO, + KC_H, KC_NO, KC_L, KC_NO, + KC_NO, KC_J, KC_NO, KC_NO, + KC_LSFT, KC_Z, KC_X, KC_TRNS, + KC_NO, KC_NO, KC_NO, KC_NO + ) +}; diff --git a/keyboards/handwired/tritium_numpad/keymaps/blu/layers.json b/keyboards/handwired/tritium_numpad/keymaps/blu/layers.json new file mode 100644 index 000000000..5335c651f --- /dev/null +++ b/keyboards/handwired/tritium_numpad/keymaps/blu/layers.json @@ -0,0 +1 @@ +[["KC_NLCK", "KC_PSLS", "KC_PAST", "KC_PMNS", "KC_P7", "KC_P8", "KC_P9", "KC_PPLS", "KC_P4", "KC_P5", "KC_P6", "KC_BSPC", "KC_P1", "KC_P2", "KC_P3", "KC_PENT", "KC_P0", "KC_UP", "KC_PDOT", "TT(1)", "KC_LEFT", "KC_DOWN", "KC_RGHT", "BL_STEP"], ["KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_K", "KC_NO", "KC_NO", "KC_H", "KC_NO", "KC_L", "KC_NO", "KC_NO", "KC_J", "KC_NO", "KC_NO", "KC_LSFT", "KC_Z", "KC_X", "KC_TRNS", "KC_NO", "KC_NO", "KC_NO", "KC_NO"]] \ No newline at end of file diff --git a/keyboards/handwired/tritium_numpad/keymaps/blu/readme.md b/keyboards/handwired/tritium_numpad/keymaps/blu/readme.md new file mode 100644 index 000000000..fd07b155f --- /dev/null +++ b/keyboards/handwired/tritium_numpad/keymaps/blu/readme.md @@ -0,0 +1,13 @@ +# Generated Keymap Layout + +This layout was generated by the QMK API. You can find the JSON data used to +generate this keymap in the file layers.json. + +To make use of this file you will need follow the following steps: + +* Download or Clone QMK Firmware: +* Extract QMK Firmware to a location on your hard drive +* Copy this folder into %s +* You are now ready to compile or use your keymap with the source + +More information can be found in the QMK docs: \ No newline at end of file diff --git a/keyboards/handwired/tritium_numpad/keymaps/default/keymap.c b/keyboards/handwired/tritium_numpad/keymaps/default/keymap.c new file mode 100644 index 000000000..60430217b --- /dev/null +++ b/keyboards/handwired/tritium_numpad/keymaps/default/keymap.c @@ -0,0 +1,59 @@ +#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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,-------------------. + * |Esc |TAB |BS | = | + * |----|----|----|----| + * | NL | / | * | - | + * |----|----|----|----| + * | 7 | 8 | 9 | | + * |----|----|----| + | + * | 4 | 5 | 6 | | + * |----|----|----|----| + * | 1 | 2 | 3 | | + * |----|----|----| En | + * | 0 |./FN| | + * `-------------------' + */ + + [_BL] = LAYOUT_numpad_6x4( + KC_ESC, KC_TAB, KC_BSPC, KC_PEQL, + 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, LT(_FL,KC_PDOT), KC_PENT + ), + + /* Keymap _FL: Function Layer + * ,-------------------. + * |Esc |TAB |BS | = | + * |----|----|----|----| + * | NL | / | * | - | + * |----|----|----|----| + * | 7 | 8 | 9 | | + * |----|----|----|RST | + * | 4 | 5 | 6 | | + * |----|----|----|----| + * | 1 | 2 | 3 | | + * |----|----|----| En | + * | 0 |./FN| | + * `-------------------' + */ + [_FL] = LAYOUT_numpad_6x4( + KC_ESC, KC_TAB, KC_BSPC, KC_PEQL, + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, RESET, + KC_P1, KC_P2, KC_P3, + KC_P0, LT(_FL,KC_PDOT), KC_PENT + ), +}; diff --git a/keyboards/handwired/tritium_numpad/keymaps/max/keymap.c b/keyboards/handwired/tritium_numpad/keymaps/max/keymap.c new file mode 100644 index 000000000..bba5c43bb --- /dev/null +++ b/keyboards/handwired/tritium_numpad/keymaps/max/keymap.c @@ -0,0 +1,59 @@ +#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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,-------------------. + * |Esc |Setp| - | = | + * |----|----|----|----| + * | F1 | F2 | F3 | F4 | + * |----|----|----|----| + * | 7 | 8 | 9 | - | + * |----|----|----|----| + * | 4 | 5 | 6 | LF | + * |----|----|----|----| + * | 1 | 2 | 3 | \ | + * |----|----|----|----| + * |Left|Down| Up |Rght| + * `-------------------' + */ + + [_BL] = LAYOUT_ortho_6x4( + KC_ESC, KC_TAB, KC_MINS,KC_EQL, + KC_F1, KC_F2, KC_F3, KC_F4, + KC_P7, KC_P8, KC_P9, KC_PMNS, + KC_P4, KC_P5, KC_P6, KC_PENT, + KC_P1, KC_P2, KC_P3, KC_BSLS, + KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + + /* Keymap _FL: Function Layer + * ,-------------------. + * |Esc |TAB |BS | = | + * |----|----|----|----| + * | NL | / | * | - | + * |----|----|----|----| + * | 7 | 8 | 9 | | + * |----|----|----|RST | + * | 4 | 5 | 6 | | + * |----|----|----|----| + * | 1 | 2 | 3 | | + * |----|----|----| En | + * | 0 |./FN| | + * `-------------------' + */ + [_FL] = LAYOUT_ortho_6x4( + KC_ESC, KC_TAB, KC_BSPC, KC_PEQL, + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, RESET, + KC_P4, KC_P5, KC_P6, KC_PENT, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), +}; diff --git a/keyboards/handwired/tritium_numpad/keymaps/ortho_left/keymap.c b/keyboards/handwired/tritium_numpad/keymaps/ortho_left/keymap.c new file mode 100644 index 000000000..9d569f18a --- /dev/null +++ b/keyboards/handwired/tritium_numpad/keymaps/ortho_left/keymap.c @@ -0,0 +1,59 @@ +#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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,-------------------. + * | T | G | B |Spac| + * |----|----|----|----| + * | R | F | V | Fn | + * |----|----|----|----| + * | E | D | C | OS | + * |----|----|----|----| + * | W | S | X | Alt| + * |----|----|----|----| + * | Q | A | Z | Ctl| + * |----|----|----|----| + * | Esc| Tab|Shft| Fn2| + * `-------------------' + */ + + [_BL] = LAYOUT_ortho_6x4( + KC_T, KC_G, KC_B, KC_SPACE, + KC_R, KC_F, KC_V, MO(1), + KC_E, KC_D, KC_C, KC_LGUI, + KC_W, KC_S, KC_X, KC_LALT, + KC_Q, KC_A, KC_Z, KC_LCTL, + KC_TAB, KC_ESC, KC_LSHIFT, MO(1) + ), + + /* Keymap _FL: Function Layer + * ,-------------------. + * | 5 | F5 | F11|Spac| + * |----|----|----|----| + * | 4 | F4 | F10| | + * |----|----|----|----| + * | 3 | F3 | F9 | OS | + * |----|----|----|----| + * | 2 | F2 | F8 | Alt| + * |----|----|----|----| + * | 1 | F1 | F7 | Ctl| + * |----|----|----|----| + * | ` | Del|Shft| | + * `-------------------' + */ + [_FL] = LAYOUT_ortho_6x4( + KC_5, KC_F5, KC_F11, _______, + KC_4, KC_F4, KC_F10, _______, + KC_3, KC_F3, KC_F9, _______, + KC_2, KC_F2, KC_F8, _______, + KC_1, KC_F1, KC_F7, _______, + KC_GRV,KC_DEL, _______, _______ + ), +}; diff --git a/keyboards/handwired/tritium_numpad/keymaps/ortho_right/keymap.c b/keyboards/handwired/tritium_numpad/keymaps/ortho_right/keymap.c new file mode 100644 index 000000000..0dc2f81bc --- /dev/null +++ b/keyboards/handwired/tritium_numpad/keymaps/ortho_right/keymap.c @@ -0,0 +1,61 @@ +#include QMK_KEYBOARD_H + +#ifdef RGBLIGHT_ENABLE +#endif + +// 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,-------------------. + * |Spac| N | H | Y | + * |----|----|----|----| + * | Fn | M | J | U | + * |----|----|----|----| + * |Left| , | K | I | + * |----|----|----|----| + * |Down| . | L | O | + * |----|----|----|----| + * | Up | / | ; | P | + * |----|----|----|----| + * |Rght| Ret| " |Bspc| + * `-------------------' + */ + [_BL] = LAYOUT_ortho_6x4( + KC_SPACE, KC_N, KC_H, KC_Y, + MO(1), KC_M, KC_J, KC_U, + KC_LEFT, KC_COMM, KC_K, KC_I, + KC_DOWN, KC_DOT, KC_L, KC_O, + KC_UP, KC_SLASH, KC_SCLN, KC_P, + KC_RIGHT, KC_ENT, KC_QUOT, KC_BSPC + ), + + /* Keymap _FL: Function Layer + * ,-------------------. + * |Esc | F12| F6 | 6 | + * |----|----|----|----| + * | NL | M | - | 7 | + * |----|----|----|----| + * |Left| , | = | 8 | + * |----|----|----|----| + * |Down| . | [ | 9 | + * |----|----|----|----| + * | Up | / | ] | 0 | + * |----|----|----|----| + * |Rght| Ret| \ | Del| + * `-------------------' + */ + [_FL] = LAYOUT_ortho_6x4( + _______, KC_F12, KC_F6, KC_6, + _______, _______, KC_MINS, KC_7, + _______, _______, KC_EQL, KC_8, + _______, _______, KC_LBRC, KC_9, + _______, _______, KC_RBRC, KC_0, + _______, _______, KC_BSLS, KC_DEL + ), +}; diff --git a/keyboards/handwired/tritium_numpad/readme.md b/keyboards/handwired/tritium_numpad/readme.md new file mode 100644 index 000000000..21acfe759 --- /dev/null +++ b/keyboards/handwired/tritium_numpad/readme.md @@ -0,0 +1,28 @@ +Tritium Numpad +=== + +Keyboard Maintainer: QMK Community +Hardware Supported: Handwired 6x4 numpads using promicro controller +Hardware Availability: https://www.thingiverse.com/thing:2855938 + +Wiring is accomplished on the Pro Micro board using the following pins as rows: +* D2 : Row 1 +* D3 : Row 2 +* D4 : Row 3 +* D5 : Row 4 +* D6 : Row 5 +* D7 : Row 6 + +and the following pins as columns: +* A3 : Col 1 +* A1 : Col 2 +* D15 : Col 3 +* D16 : Col 4 + +Make example for this keyboard (after setting up your build environment): + + make tritium_numpad:default + +Bootmagic is enabled. Press the key at 0,0 (usually escape or numlock in the top left corner) while plugging the keyboard in to jump to bootloader. + +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). diff --git a/keyboards/handwired/tritium_numpad/rules.mk b/keyboards/handwired/tritium_numpad/rules.mk new file mode 100644 index 000000000..c990a6ab1 --- /dev/null +++ b/keyboards/handwired/tritium_numpad/rules.mk @@ -0,0 +1,61 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = caterina + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = lite # Key at 0,0 makes the keyboard go into bootloader(+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 +RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + +LAYOUTS = numpad_6x4 ortho_6x4 nontra_6x4 diff --git a/keyboards/handwired/tritium_numpad/tritium_numpad.c b/keyboards/handwired/tritium_numpad/tritium_numpad.c new file mode 100644 index 000000000..7193a934d --- /dev/null +++ b/keyboards/handwired/tritium_numpad/tritium_numpad.c @@ -0,0 +1,29 @@ +#include "tritium_numpad.h" +#include "led.h" + +void keyboard_pre_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + keyboard_pre_init_user(); + led_init_ports(); +}; + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + matrix_scan_user(); +}; + +void led_init_ports(void) { + // * Set our LED pins as output + // Numlock LED + setPinOutput(D5); +} + +void led_set_kb(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(D5); + } else { + writePinHigh(D5); + } +} diff --git a/keyboards/handwired/tritium_numpad/tritium_numpad.h b/keyboards/handwired/tritium_numpad/tritium_numpad.h new file mode 100644 index 000000000..8d2e78329 --- /dev/null +++ b/keyboards/handwired/tritium_numpad/tritium_numpad.h @@ -0,0 +1,95 @@ +#pragma once + +#include "quantum.h" + +// readability +#define XXX KC_NO + +/* matrix layout + * ,-------------------. + * | 00 | 01 | 02 | 03 | + * |----|----|----|----| + * | 10 | 11 | 12 | 13 | + * |----|----|----|----| + * | 20 | 21 | 22 | | + * |----|----|----| 23 | + * | 30 | 31 | 32 | | + * |----|----|----|----| + * | 40 | 41 | 42 | | + * |----|----|----| 43 | + * | 50 | 52 | | + * `-------------------' + */ +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT_numpad_6x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, k23, \ + k40, k41, k42, \ + k50, k52, k43 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, XXX}, \ + {k40, k41, k42, k43}, \ + {k50, XXX, k52, XXX} \ +} + +/* matrix layout + * ,-------------------. + * | 00 | 01 | 02 | 03 | + * |----|----|----|----| + * | 10 | 11 | 12 | 13 | + * |----|----|----|----| + * | 20 | 21 | 22 | | + * |----|----|----| 23 | + * | 30 | 31 | 32 | | + * |----|----|----|----| + * | 40 | 41 | 42 | | + * |----|----|----| 43 | + * | 50 | 51 | 52 | | + * `-------------------' + */ +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT_nontra_6x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, k23, \ + k40, k41, k42, \ + k50, k51, k52, k43 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, xxx}, \ + {k40, k41, k42, k43}, \ + {k50, k51, k52, xxx} \ +} + +#define LAYOUT_ortho_6x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43, \ + k50, k51, k52, k53 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, k33}, \ + {k40, k41, k42, k43}, \ + {k50, k51, k52, k53} \ +} + +void keyboard_pre_init_user(void); +void matrix_scan_user(void); + From 5b776cfc2daef235595e67ddc0a073490745e736 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Tue, 25 Jun 2019 07:13:40 +0100 Subject: [PATCH 260/341] [Keymap] the results of some experiments and radically simplify keymap.c (#6172) * keymap simplification and fancy alt tab behaviour * move symbols around and try ergo numbers * mess with symbol positions * f11 and f12 for volume control (for ease of remapping) * slack unread navigation * experiment with mods on home row * mods on symbol layer * dedicated tab left and tab right keys * swap next and prev * remove hold to shift on a and o * revert to simpler keymap * restore readme * point to keymap image * cmd + cmd -> cmd + ctrl * expand readme * slack unread channel navigation * Update keyboards/planck/keymaps/callum/keymap.c Co-Authored-By: Drashna Jaelre * return true from cmd handling block --- keyboards/planck/keymaps/callum/config.h | 7 - keyboards/planck/keymaps/callum/keymap.c | 542 ++++++++++------------ keyboards/planck/keymaps/callum/readme.md | 27 +- keyboards/planck/keymaps/callum/rules.mk | 2 +- 4 files changed, 257 insertions(+), 321 deletions(-) diff --git a/keyboards/planck/keymaps/callum/config.h b/keyboards/planck/keymaps/callum/config.h index e66db1d7e..e69de29bb 100644 --- a/keyboards/planck/keymaps/callum/config.h +++ b/keyboards/planck/keymaps/callum/config.h @@ -1,7 +0,0 @@ -#define MOUSEKEY_DELAY 0 -#define MOUSEKEY_INTERVAL 16 -#define MOUSEKEY_MAX_SPEED 20 -#define MOUSEKEY_TIME_TO_MAX 100 -#define MOUSEKEY_WHEEL_DELAY 0 -#define MOUSEKEY_WHEEL_MAX_SPEED 1 -#define MOUSEKEY_WHEEL_TIME_TO_MAX 100 diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 08d0c69b8..80dab2220 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -1,331 +1,259 @@ #include "planck.h" #include "action_layer.h" +#define a KC_A +#define b KC_B +#define c KC_C +#define d KC_D +#define e KC_E +#define f KC_F +#define g KC_G +#define h KC_H +#define i KC_I +#define j KC_J +#define k KC_K +#define l KC_L +#define m KC_M +#define n KC_N +#define o KC_O +#define p KC_P +#define q KC_Q +#define r KC_R +#define s KC_S +#define t KC_T +#define u KC_U +#define v KC_V +#define w KC_W +#define x KC_X +#define y KC_Y +#define z KC_Z + +#define lalt KC_LALT +#define lctl KC_LCTL +#define lsft KC_LSFT +#define ralt KC_RALT +#define rctl KC_RCTL +#define rsft KC_RSFT + +#define n0 KC_0 +#define n1 KC_1 +#define n2 KC_2 +#define n3 KC_3 +#define n4 KC_4 +#define n5 KC_5 +#define n6 KC_6 +#define n7 KC_7 +#define n8 KC_8 +#define n9 KC_9 + +#define bspc KC_BSPC +#define caps KC_CAPS +#define comm KC_COMM +#define dash A(KC_MINS) +#define scln KC_SCLN +#define slsh KC_SLSH +#define spc KC_SPC +#define tab KC_TAB +#define del KC_DEL +#define dot KC_DOT +#define ent KC_ENT +#define mins KC_MINS +#define quot KC_QUOT +#define esc KC_ESC +#define gbp A(KC_3) + +#define down KC_DOWN +#define home KC_HOME +#define end KC_END +#define up KC_UP +#define pgdn KC_PGDN +#define pgup KC_PGUP +#define left KC_LEFT +#define rght KC_RGHT + +#define tabl S(C(KC_TAB)) +#define tabr C(KC_TAB) +#define fwd G(KC_RBRC) +#define back G(KC_LBRC) +#define dtl C(KC_LEFT) +#define dtr C(KC_RGHT) +#define slup S(A(KC_UP)) +#define sldn S(A(KC_DOWN)) + +#define f1 KC_F1 +#define f2 KC_F2 +#define f3 KC_F3 +#define f4 KC_F4 +#define f5 KC_F5 +#define f6 KC_F6 +#define f7 KC_F7 +#define f8 KC_F8 +#define f9 KC_F9 +#define f10 KC_F10 +#define f11 KC_F11 +#define f12 KC_F12 +#define f13 KC_F13 +#define f14 KC_F14 +#define f15 KC_F15 +#define f16 KC_F16 +#define f17 KC_F17 +#define f18 KC_F18 +#define f19 KC_F19 +#define f20 KC_F20 + +#define mute KC_MUTE +#define next KC_MNXT +#define play KC_MPLY +#define prev KC_MPRV +#define vold KC_F11 +#define volu KC_F12 + +#define symb MO(SYMB) +#define move MO(MOVE) +#define func MO(FUNC) + +#define rset RESET +#define powr KC_POWER + +#define ____ KC_TRNS +#define xxxx KC_NO + extern keymap_config_t keymap_config; -#define AC(X) A(C(X)) -#define SC(X) S(C(X)) - enum planck_layers { - _COLEMAK, - _QWERTY, - _SYMB, - _MOVE, - _FUNC, - _MOUSE, -}; - -enum planck_keycodes { - COLEMAK = SAFE_RANGE, - QWERTY, + BASE, SYMB, MOVE, FUNC, - MOUSE, +}; + +enum planck_keycodes { + ampr = SAFE_RANGE, + astr, + at, + bsls, + circ, + dlr, + eql, + exlm, + grv, + hash, + lbrc, + lcbr, + lprn, + perc, + pipe, + plus, + rbrc, + rcbr, + rprn, + tild, + + cmd, }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* COLEMAK - * ,-----------------------------------------------------------------------. - * |Tab | Q | W | F | P | G | J | L | U | Y | ; | - | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * |Bksp | A | R | S | T | D | H | N | E | I | O | ' | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * |Shift| Z | X | C | V | B | K | M | , | . | / |Shift| - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * |Func |Ctrl | Alt |Super|Symb |Enter|Space|Move |Super| Alt |Ctrl |Func | - * `-----------------------------------------------------------------------' - */ - [_COLEMAK] = LAYOUT_planck_grid( - KC_TAB, KC_Q, KC_W, KC_F, - KC_P, KC_G, KC_J, KC_L, - KC_U, KC_Y, KC_SCLN, KC_MINS, - - KC_BSPC, 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, - - FUNC, KC_LCTL, KC_LALT, KC_LGUI, - SYMB, KC_ENT, KC_SPC, MOVE, - KC_RGUI, KC_RALT, KC_RCTL, FUNC + [BASE] = LAYOUT_planck_grid( + tab, q, w, f, p, g, j, l, u, y, scln, mins, + bspc, a, r, s, t, d, h, n, e, i, o, quot, + lsft, z, x, c, v, b, k, m, comm, dot, slsh, rsft, + func, lctl, lalt, cmd, move, ent, spc, symb, cmd, ralt, rctl, func ), - /* QWERTY - * ,-----------------------------------------------------------------------. - * |Tab | Q | W | E | R | T | Y | U | I | O | P | - | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * |Bksp | A | S | D | F | G | H | J | K | L | ; | ' | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * |Shift| Z | X | C | V | B | N | M | , | . | / |Shift| - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * |Func |Ctrl | Alt |Super|Symb |Enter|Space|Move |Super| Alt |Ctrl |Func | - * `-----------------------------------------------------------------------' - */ - [_QWERTY] = LAYOUT_planck_grid( - KC_TAB, KC_Q, KC_W, KC_E, - KC_R, KC_T, KC_Y, KC_U, - KC_I, KC_O, KC_P, KC_MINS, - - KC_BSPC, 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, - - FUNC, KC_LCTL, KC_LALT, KC_LGUI, - SYMB, KC_ENT, KC_SPC, MOVE, - KC_RGUI, KC_RALT, KC_RCTL, FUNC + [SYMB] = LAYOUT_planck_grid( + esc, n7, n5, n3, n1, n9, n8, n0, n2, n4, n6, dash, + del, bsls, hash, astr, eql, pipe, at, rprn, lprn, dlr, ampr, gbp, + caps, grv, exlm, lbrc, rbrc, circ, tild, rcbr, lcbr, plus, perc, caps, + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ ), - /* SYMB - * ,-----------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |ndash| - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | £ | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | ~ | ` | + | = | | | \ | [ | ] | { | } | | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------' - */ - [_SYMB] = LAYOUT_planck_grid( - KC_ESC, KC_1, KC_2, KC_3, - KC_4, KC_5, KC_6, KC_7, - KC_8, KC_9, KC_0, A(KC_MINS), - - KC_DEL, KC_EXLM, KC_AT, KC_HASH, - KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, - KC_ASTR, KC_LPRN, KC_RPRN, A(KC_3), - - _______, KC_TILD, KC_GRV, KC_PLUS, - KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, - KC_RBRC, KC_LCBR, KC_RCBR, _______, - - _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, _______, _______ + [MOVE] = LAYOUT_planck_grid( + esc, xxxx, slup, dtl, dtr, xxxx, xxxx, home, up, end, xxxx, xxxx, + del, xxxx, sldn, tabl, tabr, xxxx, xxxx, left, down, rght, xxxx, xxxx, + ____, xxxx, xxxx, back, fwd, xxxx, xxxx, pgdn, pgup, xxxx, xxxx, ____, + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ ), - /* MOVE - * ,-----------------------------------------------------------------------. - * | | | | | | |CtrUp|Home | Up | End |Caps |Mouse| - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | | | |CtrL |Left |Down |Right|CtrR | | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | | | |CtrDn|PgDn |PgUp |TabL |TabR | | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------' - */ - [_MOVE] = LAYOUT_planck_grid( - AC(KC_A), AC(KC_B), AC(KC_C), AC(KC_D), - AC(KC_E), AC(KC_F), C(KC_UP), KC_HOME, - KC_UP, KC_END, KC_CAPS, MOUSE, - - AC(KC_G), AC(KC_H), AC(KC_I), AC(KC_J), - AC(KC_K), AC(KC_L), C(KC_LEFT), KC_LEFT, - KC_DOWN, KC_RGHT, C(KC_RIGHT), XXXXXXX, - - _______, AC(KC_M), AC(KC_N), AC(KC_O), - AC(KC_P), AC(KC_Q), C(KC_DOWN), KC_PGDN, - KC_PGUP, SC(KC_TAB), C(KC_TAB), _______, - - _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, _______, _______ + [FUNC] = LAYOUT_planck_grid( + rset, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, volu, + powr, f11, f12, f13, f14, f15, f16, f17, f18, f19, f20, vold, + ____, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, ____, + ____, ____, ____, ____, prev, mute, play, next, ____, ____, ____, ____ ), - - /* FUNC - * ,-----------------------------------------------------------------------. - * |Reset| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 |VolUp| - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * |Power| F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 |VolDn| - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | | | | | | |Clmak|Qwrty| | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | |Prev |Mute |Play |Next | | | | | - * `-----------------------------------------------------------------------' - */ - [_FUNC] = LAYOUT_planck_grid( - RESET, KC_F1, KC_F2, KC_F3, - KC_F4, KC_F5, KC_F6, KC_F7, - KC_F8, KC_F9, KC_F10, KC_VOLU, - - KC_POWER, KC_F11, KC_F12, KC_F13, - KC_F14, KC_F15, KC_F16, KC_F17, - KC_F18, KC_F19, KC_F20, KC_VOLD, - - _______, XXXXXXX, KC_HOME, SC(KC_TAB), - C(KC_TAB), KC_END, XXXXXXX, XXXXXXX, - XXXXXXX, COLEMAK, QWERTY, _______, - - _______, _______, _______, _______, - KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT, - _______, _______, _______, _______ - ), - - /* MOUSE - * ,-----------------------------------------------------------------------. - * | | |CtrL |CtrU |CtrR | B5 |CtrU | ScL |Up | ScR | | | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | Ac0 | Ac1 | Ac2 | B4 |CtrL |Left |Down |Right|CtrR | | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | |Home | End | B3 |CtrD | ScD | ScU |TabL |TabR | | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | | | B2 | B1 | | | | | | - * `-----------------------------------------------------------------------' - */ - [_MOUSE] = LAYOUT_planck_grid( - _______, XXXXXXX, C(KC_LEFT), C(KC_UP), - C(KC_RIGHT), KC_BTN5, C(KC_UP), KC_WH_R, - KC_MS_U, KC_WH_L, XXXXXXX, XXXXXXX, - - _______, XXXXXXX, KC_ACL0, KC_ACL1, - KC_ACL2, KC_BTN4, C(KC_LEFT), KC_MS_L, - KC_MS_D, KC_MS_R, C(KC_RIGHT), XXXXXXX, - - _______, XXXXXXX, XXXXXXX, KC_HOME, - KC_END, KC_BTN3, C(KC_DOWN), KC_WH_U, - KC_WH_D, SC(KC_TAB), C(KC_TAB), _______, - - _______, _______, _______, _______, - _______, KC_BTN2, KC_BTN1, _______, - _______, _______, _______, _______ - ) }; -#ifdef AUDIO_ENABLE -float colemak_song[][2] = SONG(COLEMAK_SOUND); -float qwerty_song[][2] = SONG(QWERTY_SOUND); -#endif - -void set_colemak(void) { -#ifdef AUDIO_ENABLE - stop_all_notes(); - PLAY_SONG(colemak_song); -#endif - set_single_persistent_default_layer(_COLEMAK); -} - -void set_qwerty(void) { -#ifdef AUDIO_ENABLE - stop_all_notes(); - PLAY_SONG(qwerty_song); -#endif - set_single_persistent_default_layer(_QWERTY); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case COLEMAK: - if (record->event.pressed) { - set_colemak(); - } - return false; - case QWERTY: - if (record->event.pressed) { - set_qwerty(); - } - return false; - case SYMB: - if (record->event.pressed) { - layer_off(_MOUSE); - layer_on(_SYMB); - } else { - layer_off(_SYMB); - } - return false; - case MOVE: - if (record->event.pressed) { - layer_off(_MOUSE); - layer_on(_MOVE); - } else { - layer_off(_MOVE); - } - return false; - case FUNC: - if (record->event.pressed) { - layer_off(_MOUSE); - layer_on(_FUNC); - } else { - layer_off(_FUNC); - } - return false; - case MOUSE: - if (record->event.pressed) { - layer_on(_MOUSE); - } - return false; - - // Override the defualt auto shifted symbols to use SEND_STRING - // See https://github.com/qmk/qmk_firmware/issues/4072 - case KC_EXLM: - if (record->event.pressed) { SEND_STRING("!"); } - return false; - case KC_AT: - if (record->event.pressed) { SEND_STRING("@"); } - return false; - case KC_HASH: - if (record->event.pressed) { SEND_STRING("#"); } - return false; - case KC_DLR: - if (record->event.pressed) { SEND_STRING("$"); } - return false; - case KC_PERC: - if (record->event.pressed) { SEND_STRING("%"); } - return false; - case KC_CIRC: - if (record->event.pressed) { SEND_STRING("^"); } - return false; - case KC_AMPR: - if (record->event.pressed) { SEND_STRING("&"); } - return false; - case KC_ASTR: - if (record->event.pressed) { SEND_STRING("*"); } - return false; - case KC_LPRN: - if (record->event.pressed) { SEND_STRING("("); } - return false; - case KC_RPRN: - if (record->event.pressed) { SEND_STRING(")"); } - return false; - case KC_TILD: - if (record->event.pressed) { SEND_STRING("~"); } - return false; - case KC_GRV: - if (record->event.pressed) { SEND_STRING("`"); } - return false; - case KC_PLUS: - if (record->event.pressed) { SEND_STRING("+"); } - return false; - case KC_EQL: - if (record->event.pressed) { SEND_STRING("="); } - return false; - case KC_PIPE: - if (record->event.pressed) { SEND_STRING("|"); } - return false; - case KC_BSLS: - if (record->event.pressed) { SEND_STRING("\\"); } - return false; - case KC_LBRC: - if (record->event.pressed) { SEND_STRING("["); } - return false; - case KC_RBRC: - if (record->event.pressed) { SEND_STRING("]"); } - return false; - case KC_LCBR: - if (record->event.pressed) { SEND_STRING("{"); } - return false; - case KC_RCBR: - if (record->event.pressed) { SEND_STRING("}"); } - return false; +bool send_string_if_keydown(keyrecord_t *record, const char *s) { + if (record->event.pressed) { + SEND_STRING(s); + } + return true; +} + +int cmd_keys_down = 0; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // Override the defualt auto shifted symbols to use SEND_STRING See + // https://github.com/qmk/qmk_firmware/issues/4072 + case ampr: + return send_string_if_keydown(record, "&"); + case astr: + return send_string_if_keydown(record, "*"); + case at: + return send_string_if_keydown(record, "@"); + case bsls: + return send_string_if_keydown(record, "\\"); + case circ: + return send_string_if_keydown(record, "^"); + case dlr: + return send_string_if_keydown(record, "$"); + case eql: + return send_string_if_keydown(record, "="); + case exlm: + return send_string_if_keydown(record, "!"); + case grv: + return send_string_if_keydown(record, "`"); + case hash: + return send_string_if_keydown(record, "#"); + case lbrc: + return send_string_if_keydown(record, "["); + case lcbr: + return send_string_if_keydown(record, "{"); + case lprn: + return send_string_if_keydown(record, "("); + case perc: + return send_string_if_keydown(record, "%"); + case pipe: + return send_string_if_keydown(record, "|"); + case plus: + return send_string_if_keydown(record, "+"); + case rbrc: + return send_string_if_keydown(record, "]"); + case rcbr: + return send_string_if_keydown(record, "}"); + case rprn: + return send_string_if_keydown(record, ")"); + case tild: + return send_string_if_keydown(record, "~"); + + // cmd + cmd -> cmd + ctl + case cmd: + if (record->event.pressed) { + if (cmd_keys_down == 0) { + register_code(KC_LCMD); + } else { + register_code(KC_LCTL); + } + cmd_keys_down++; + } else { + if (cmd_keys_down == 1) { + unregister_code(KC_LCMD); + } else { + unregister_code(KC_LCTL); + } + cmd_keys_down--; + } + return true; } return true; } diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index 99b6dfbef..190c2b23a 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -1,11 +1,11 @@ -# callum’s planck layout +# callum's planck layout This is a layout for the grid planck, built with a few ideals in mind: - Consistent and minimal response times should be maintained. Keys that react differently depending on whether they are tapped or held, keys that react - differently if they are double tapped, etc. should be avoided -- they - inevitably send their keycode later than a normal key -- interrupting the + differently if they are double tapped, etc. should be avoided – they + inevitably send their keycode later than a normal key – interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording as our only means of getting more than one symbol out of a single physical key. @@ -17,7 +17,22 @@ This is a layout for the grid planck, built with a few ideals in mind: - There should be two of every modifier (one on each side), otherwise certain long key combinations become hard to make. -A layout graphic can be found [here][keyboard-layout-editor] (excludes window -management keys). +- It should be possible to do things you might want to do while using the mouse + with only the left hand (e.g. change tabs, navigate back or forwards in + browser history). -[keyboard-layout-editor]: http://www.keyboard-layout-editor.com/#/gists/ade5ec1f814bf83046489a4b632575ff +- Symbols should be arranged so that the most frequently used are easiest to + reach. This includes numbers, and lower numbers are more commonly used than + higher ones. (number arrangement borrowed from [dustypomeleau's minidox + layout][]. + +Layout rendered with [keyboard-layout-editor.com][]: + +![](https://callum-oakley.github.io/images/keymap.png) + +The only behaviour not captured in this graphic is: pressing both cmd keys will +send cmd+ctrl. See [keymap.c][] for details. + +[dustypomeleau's minidox layout]: https://github.com/qmk/qmk_firmware/tree/master/keyboards/minidox/keymaps/dustypomerleau +[keyboard-layout-editor.com]: http://www.keyboard-layout-editor.com +[keymap.c]: keymap.c diff --git a/keyboards/planck/keymaps/callum/rules.mk b/keyboards/planck/keymaps/callum/rules.mk index 182322ae2..db87d5ece 100644 --- a/keyboards/planck/keymaps/callum/rules.mk +++ b/keyboards/planck/keymaps/callum/rules.mk @@ -3,7 +3,7 @@ # the appropriate keymap folder that will get included automatically # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration From 2636464b858c081f421ba4f55e50d3794d679186 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 24 Jun 2019 23:28:09 -0700 Subject: [PATCH 261/341] [Keyboard] Cannonkeys Instant60 Configurator updates (#6186) * Rename layout macros The Instant60's info.json was updated in #6157. The intention seems to have been supporting Community Layouts, but that feature was not implemented. After checking that the layouts conform, rename the appropriate layout macros. - rename LAYOUT_ansi as LAYOUT_60_ansi - rename LAYOUT_tsangan as LAYOUT_60_tsangan_hhkb - update `default` and `tsangan` keymaps * Enable Community Layout support Supported Community Layouts: - 60_ansi (Instant60 ANSI version) - 60_tsangan_hhkb (Instant60 Tsangan version) --- keyboards/cannonkeys/instant60/instant60.h | 4 ++-- keyboards/cannonkeys/instant60/keymaps/default/keymap.c | 4 ++-- keyboards/cannonkeys/instant60/keymaps/tsangan/keymap.c | 4 ++-- keyboards/cannonkeys/instant60/rules.mk | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/keyboards/cannonkeys/instant60/instant60.h b/keyboards/cannonkeys/instant60/instant60.h index 67d5ba98f..6d2085016 100644 --- a/keyboards/cannonkeys/instant60/instant60.h +++ b/keyboards/cannonkeys/instant60/instant60.h @@ -4,7 +4,7 @@ #define KNO KC_NO -#define LAYOUT_ansi( \ +#define LAYOUT_60_ansi( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2E, \ @@ -18,7 +18,7 @@ { K40, K41, K42, KNO, KNO, K45, KNO, KNO, KNO, K49, K4A, K4B, KNO, KNO, K4E } \ } -#define LAYOUT_tsangan( \ +#define LAYOUT_60_tsangan_hhkb( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2E, \ diff --git a/keyboards/cannonkeys/instant60/keymaps/default/keymap.c b/keyboards/cannonkeys/instant60/keymaps/default/keymap.c index 7753181a4..303f30730 100644 --- a/keyboards/cannonkeys/instant60/keymaps/default/keymap.c +++ b/keyboards/cannonkeys/instant60/keymaps/default/keymap.c @@ -30,7 +30,7 @@ enum custom_keycodes { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT_ansi( + [_BASE] = LAYOUT_60_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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FN1), KC_RCTL ), - [_FN1] = LAYOUT_ansi( + [_FN1] = LAYOUT_60_ansi( KC_GESC, 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, \ RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/cannonkeys/instant60/keymaps/tsangan/keymap.c b/keyboards/cannonkeys/instant60/keymaps/tsangan/keymap.c index c16c50630..d75d9f288 100644 --- a/keyboards/cannonkeys/instant60/keymaps/tsangan/keymap.c +++ b/keyboards/cannonkeys/instant60/keymaps/tsangan/keymap.c @@ -30,7 +30,7 @@ enum custom_keycodes { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT_tsangan( + [_BASE] = LAYOUT_60_tsangan_hhkb( 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_BSLS, KC_DEL, \ 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_BSPC, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL ), - [_FN1] = LAYOUT_tsangan( + [_FN1] = LAYOUT_60_tsangan_hhkb( 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, _______,\ RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/cannonkeys/instant60/rules.mk b/keyboards/cannonkeys/instant60/rules.mk index cd366c76a..5d4fb1cf7 100644 --- a/keyboards/cannonkeys/instant60/rules.mk +++ b/keyboards/cannonkeys/instant60/rules.mk @@ -54,3 +54,4 @@ RGBLIGHT_ENABLE = yes # RAW_ENABLE = yes # DYNAMIC_KEYMAP_ENABLE = yes +LAYOUTS = 60_ansi 60_tsangan_hhkb From 8fd3f42281885346f93fff2f122569c002071c67 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Tue, 25 Jun 2019 18:13:01 +0100 Subject: [PATCH 262/341] [Keymap] use lowercase send_string for non-literals (#6193) --- keyboards/planck/keymaps/callum/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 80dab2220..2a7a53d38 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -184,7 +184,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool send_string_if_keydown(keyrecord_t *record, const char *s) { if (record->event.pressed) { - SEND_STRING(s); + send_string(s); } return true; } From 3483c51f62640c83d35a0b4c4636a5939f2c3898 Mon Sep 17 00:00:00 2001 From: Mathias Andersson Date: Wed, 26 Jun 2019 09:32:03 +0200 Subject: [PATCH 263/341] [Keyboard] Modernize KMAC (#6131) * [Keyboard] Modernize the KMAC implementation This brings the matrix implementation more in line with the current default matrix code. It also simplifies the implementation quite a bit. * [Keyboard] Add layout support to KMAC --- keyboards/kmac/config.h | 23 +- keyboards/kmac/info.json | 9 +- keyboards/kmac/keymaps/default/config.h | 2 +- keyboards/kmac/keymaps/default/keymap.c | 126 +++--- keyboards/kmac/keymaps/default/readme.md | 6 - keyboards/kmac/keymaps/default/rules.mk | 34 -- .../{winkeyless => default_tkl_ansi}/config.h | 9 +- .../kmac/keymaps/default_tkl_ansi/keymap.c | 87 +++++ .../kmac/keymaps/default_tkl_ansi/readme.md | 50 +++ .../keymaps/default_tkl_ansi_wkl/config.h | 19 + .../keymaps/default_tkl_ansi_wkl/keymap.c | 87 +++++ .../readme.md | 15 +- keyboards/kmac/keymaps/winkeyless/keymap.c | 93 ----- keyboards/kmac/keymaps/winkeyless/rules.mk | 34 -- keyboards/kmac/kmac.c | 102 ++--- keyboards/kmac/kmac.h | 73 ++-- keyboards/kmac/matrix.c | 365 +++++++----------- keyboards/kmac/readme.md | 43 +-- keyboards/kmac/rules.mk | 20 +- 19 files changed, 573 insertions(+), 624 deletions(-) delete mode 100644 keyboards/kmac/keymaps/default/rules.mk rename keyboards/kmac/keymaps/{winkeyless => default_tkl_ansi}/config.h (83%) create mode 100644 keyboards/kmac/keymaps/default_tkl_ansi/keymap.c create mode 100644 keyboards/kmac/keymaps/default_tkl_ansi/readme.md create mode 100644 keyboards/kmac/keymaps/default_tkl_ansi_wkl/config.h create mode 100644 keyboards/kmac/keymaps/default_tkl_ansi_wkl/keymap.c rename keyboards/kmac/keymaps/{winkeyless => default_tkl_ansi_wkl}/readme.md (86%) delete mode 100644 keyboards/kmac/keymaps/winkeyless/keymap.c delete mode 100644 keyboards/kmac/keymaps/winkeyless/rules.mk diff --git a/keyboards/kmac/config.h b/keyboards/kmac/config.h index 110a7ac0f..652263d2b 100644 --- a/keyboards/kmac/config.h +++ b/keyboards/kmac/config.h @@ -15,17 +15,16 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6050 -#define DEVICE_VER 0x0104 -#define MANUFACTURER KBDMania -#define PRODUCT KMAC +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6050 +#define DEVICE_VER 0x0104 +#define MANUFACTURER KBDMania +#define PRODUCT KMAC #define DESCRIPTION QMK keyboard firmware for KMAC /* key matrix size */ @@ -36,9 +35,11 @@ along with this program. If not, see . * Keyboard Matrix Assignments * The KMAC uses demultiplexers for the cols, they are only included here as documentation. * See matrix.c for more details. -*/ -#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5, B7 } -#define MATRIX_COL_PINS { C6, B6, F0, F1, C7, B5 } + */ +#define MATRIX_ROW_PINS \ + { D0, D1, D2, D3, D5, B7 } +#define MATRIX_COL_PINS \ + { B6, C6, C7, F1, F0, B5 } #define UNUSED_PINS /* COL2ROW, ROW2COL*/ @@ -169,5 +170,3 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 - -#endif diff --git a/keyboards/kmac/info.json b/keyboards/kmac/info.json index f86cfdde5..2fe0ef269 100644 --- a/keyboards/kmac/info.json +++ b/keyboards/kmac/info.json @@ -6,7 +6,8 @@ "width": 18.25, "height": 6.5, "layouts": { - "LAYOUT": { + "LAYOUT_tkl_ansi": { + "key_count": 87, "layout": [ { "label": "Esc", "x": 0, "y": 0 }, { "label": "F1", "x": 2, "y": 0 }, @@ -97,8 +98,8 @@ { "label": "\u2192", "x": 17.25, "y": 5.5 } ] }, - - "LAYOUT_WKL": { + "LAYOUT_tkl_ansi_wkl": { + "key_count": 84, "layout": [ { "label": "Esc", "x": 0, "y": 0 }, { "label": "F1", "x": 2, "y": 0 }, @@ -177,11 +178,9 @@ { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 }, { "label": "\u2191", "x": 16.25, "y": 4.5 }, { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.5 }, - { "label": "Win", "x": 1.5, "y": 5.5 }, { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.5 }, { "x": 4, "y": 5.5, "w": 7 }, { "label": "Alt", "x": 11, "y": 5.5, "w": 1.5 }, - { "label": "Win", "x": 12.5, "y": 5.5 }, { "label": "Ctrl", "x": 13.5, "y": 5.5, "w": 1.5 }, { "label": "\u2190", "x": 15.25, "y": 5.5 }, { "label": "\u2193", "x": 16.25, "y": 5.5 }, diff --git a/keyboards/kmac/keymaps/default/config.h b/keyboards/kmac/keymaps/default/config.h index 09b8f1bc7..14b43132a 100644 --- a/keyboards/kmac/keymaps/default/config.h +++ b/keyboards/kmac/keymaps/default/config.h @@ -1,4 +1,4 @@ -/* Copyright 2017 Mathias Andersson +/* Copyright 2019 Mathias Andersson * * 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 diff --git a/keyboards/kmac/keymaps/default/keymap.c b/keyboards/kmac/keymaps/default/keymap.c index 3444f3cd5..05ccd1bcb 100644 --- a/keyboards/kmac/keymaps/default/keymap.c +++ b/keyboards/kmac/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2017 Mathias Andersson +/* Copyright 2017-2019 Mathias Andersson * * 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 @@ -15,79 +15,73 @@ */ #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 +enum layer_names { + _QW, + _FN, +}; +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + MCR_01 = SAFE_RANGE, + MCR_02, + MCR_03, + MCR_04, + MCR_05, + MCR_06, + MCR_07, + MCR_08, + MCR_09, + MCR_10, + MCR_11, +}; + +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BL] = LAYOUT( - KC_ESC, 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_PSCR, KC_SLCK, KC_BRK, - KC_GRV, 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_INS, KC_HOME, 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_DEL, KC_END, KC_PGDN, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - 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_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - [_FL] = LAYOUT( - BL_STEP, M(0), M(1), M(2), M(3), M(4), M(5), M(6), M(7), M(8), M(9), M(10), M(11), _______, _______, _______, + [_QW] = LAYOUT_tkl_ansi( + KC_ESC, 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_PSCR, KC_SLCK, KC_BRK, + KC_GRV, 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_INS, KC_HOME, 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_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + 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_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + [_FN] = LAYOUT_tkl_ansi( + BL_STEP, MCR_01, MCR_02, MCR_03, MCR_03, MCR_04, MCR_05, MCR_06, MCR_07, MCR_08, MCR_09, MCR_10, MCR_11, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), }; +// clang-format on -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch (id) - { - case 0: - if (record->event.pressed) - { - SEND_STRING("The"); - return false; - } - break; - case 1: - if (record->event.pressed) - { - SEND_STRING("Custom"); - return false; - } - break; - case 2: - if (record->event.pressed) - { - SEND_STRING("Keyboard"); - return false; - } - break; - case 3: - if (record->event.pressed) - { - return MACRO(D(LCTL), T(C), U(LCTL), T(RGHT), D(LCTL), T(V), U(LCTL), END); - } - break; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case MCR_01: + if (record->event.pressed) { + SEND_STRING("The"); + } + break; + case MCR_02: + if (record->event.pressed) { + SEND_STRING("Custom"); + } + break; + case MCR_03: + if (record->event.pressed) { + SEND_STRING("Keyboard"); + } + break; + case MCR_04: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("c") SS_TAP(X_RIGHT) SS_LCTRL("v")); + } + break; } - return MACRO_NONE; + return true; }; -void matrix_init_user(void) -{ -} +void matrix_init_user(void) {} -void matrix_scan_user(void) -{ -} +void matrix_scan_user(void) {} -bool process_record_user(uint16_t keycode, keyrecord_t *record) -{ - return true; -} - -void led_set_user(uint8_t usb_led) -{ -} +void led_set_user(uint8_t usb_led) {} diff --git a/keyboards/kmac/keymaps/default/readme.md b/keyboards/kmac/keymaps/default/readme.md index aaa6f9bf2..a60840375 100644 --- a/keyboards/kmac/keymaps/default/readme.md +++ b/keyboards/kmac/keymaps/default/readme.md @@ -2,8 +2,6 @@ This is the default keymap for the winkey version of the PCB. It implements the same features as the official default KMAC firmware. -See [keymap.c](keymap.c) for details. - ## Layers The keymap have two layers. To access the functions on the second layer, hold down `Fn` and press the corresponding key. @@ -50,7 +48,3 @@ These are mostly useless and serve more like examples I guess. | 2 | Types `Custom` | | 3 | Types `Keyboard` | | 4 | Inputs `` `` `` | - -## Building - -To build the firmware with the default keymap, run `make default`. diff --git a/keyboards/kmac/keymaps/default/rules.mk b/keyboards/kmac/keymaps/default/rules.mk deleted file mode 100644 index 128487947..000000000 --- a/keyboards/kmac/keymaps/default/rules.mk +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2013 Jun Wako -# -# 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 . - - -# QMK Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -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 = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/kmac/keymaps/winkeyless/config.h b/keyboards/kmac/keymaps/default_tkl_ansi/config.h similarity index 83% rename from keyboards/kmac/keymaps/winkeyless/config.h rename to keyboards/kmac/keymaps/default_tkl_ansi/config.h index a3828f7d5..14b43132a 100644 --- a/keyboards/kmac/keymaps/winkeyless/config.h +++ b/keyboards/kmac/keymaps/default_tkl_ansi/config.h @@ -1,4 +1,4 @@ -/* Copyright 2017 Mathias Andersson +/* Copyright 2019 Mathias Andersson * * 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 @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/kmac/keymaps/default_tkl_ansi/keymap.c b/keyboards/kmac/keymaps/default_tkl_ansi/keymap.c new file mode 100644 index 000000000..05ccd1bcb --- /dev/null +++ b/keyboards/kmac/keymaps/default_tkl_ansi/keymap.c @@ -0,0 +1,87 @@ +/* Copyright 2017-2019 Mathias Andersson + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum layer_names { + _QW, + _FN, +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + MCR_01 = SAFE_RANGE, + MCR_02, + MCR_03, + MCR_04, + MCR_05, + MCR_06, + MCR_07, + MCR_08, + MCR_09, + MCR_10, + MCR_11, +}; + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = LAYOUT_tkl_ansi( + KC_ESC, 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_PSCR, KC_SLCK, KC_BRK, + KC_GRV, 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_INS, KC_HOME, 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_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + 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_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + [_FN] = LAYOUT_tkl_ansi( + BL_STEP, MCR_01, MCR_02, MCR_03, MCR_03, MCR_04, MCR_05, MCR_06, MCR_07, MCR_08, MCR_09, MCR_10, MCR_11, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; +// clang-format on + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case MCR_01: + if (record->event.pressed) { + SEND_STRING("The"); + } + break; + case MCR_02: + if (record->event.pressed) { + SEND_STRING("Custom"); + } + break; + case MCR_03: + if (record->event.pressed) { + SEND_STRING("Keyboard"); + } + break; + case MCR_04: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("c") SS_TAP(X_RIGHT) SS_LCTRL("v")); + } + break; + } + return true; +}; + +void matrix_init_user(void) {} + +void matrix_scan_user(void) {} + +void led_set_user(uint8_t usb_led) {} diff --git a/keyboards/kmac/keymaps/default_tkl_ansi/readme.md b/keyboards/kmac/keymaps/default_tkl_ansi/readme.md new file mode 100644 index 000000000..a60840375 --- /dev/null +++ b/keyboards/kmac/keymaps/default_tkl_ansi/readme.md @@ -0,0 +1,50 @@ +# Keymap for the winkey version of KMAC + +This is the default keymap for the winkey version of the PCB. It implements the same features as the official default KMAC firmware. + +## Layers + +The keymap have two layers. To access the functions on the second layer, hold down `Fn` and press the corresponding key. + +### Layer 1: Default Layer + ,---. ,---------------. ,---------------. ,---------------. ,-----------. + |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| + `---' `---------------' `---------------' `---------------' `-----------' + ,-----------------------------------------------------------. ,-----------. + |~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |Ins|Hom|PgU| + |-----------------------------------------------------------| |-----------| + |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| + |-----------------------------------------------------------| '-----------' + |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return | + |-----------------------------------------------------------| ,---. + |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | |Up | + |-----------------------------------------------------------| ,-----------. + |Ctl|Gui|Alt| Space |Alt|Gui|Fn |Ctl| |Lef|Dow|Rig| + `-----------------------------------------------------------' `-----------' + +### Layer 2: Function Layer + ,---. ,---------------. ,---------------. ,---------------. ,-----------. + |Led| |M1 |M2 |M3 |M4 | |M5 |M6 |M7 |M8 | |M9 |M10|M11|M12| | | | | + `---' `---------------' `---------------' `---------------' `-----------' + ,-----------------------------------------------------------. ,-----------. + | | | | | | | | | | | | | | | | | | | + |-----------------------------------------------------------| |-----------| + | | | | | | | | | | | | | | | | | | | + |-----------------------------------------------------------| '-----------' + | | | | | | | | | | | | | | + |-----------------------------------------------------------| ,---. + | | | | | | | | | | | | | | | + |-----------------------------------------------------------| ,-----------. + | | | | | | | | | | | | | + `-----------------------------------------------------------' `-----------' + +## Macros + +These are mostly useless and serve more like examples I guess. + +| Macro | Action | +|:-----:| -------------------------------------- | +| 1 | Types `The` | +| 2 | Types `Custom` | +| 3 | Types `Keyboard` | +| 4 | Inputs `` `` `` | diff --git a/keyboards/kmac/keymaps/default_tkl_ansi_wkl/config.h b/keyboards/kmac/keymaps/default_tkl_ansi_wkl/config.h new file mode 100644 index 000000000..14b43132a --- /dev/null +++ b/keyboards/kmac/keymaps/default_tkl_ansi_wkl/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Mathias Andersson + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/kmac/keymaps/default_tkl_ansi_wkl/keymap.c b/keyboards/kmac/keymaps/default_tkl_ansi_wkl/keymap.c new file mode 100644 index 000000000..42be54764 --- /dev/null +++ b/keyboards/kmac/keymaps/default_tkl_ansi_wkl/keymap.c @@ -0,0 +1,87 @@ +/* Copyright 2017-2019 Mathias Andersson + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum layer_names { + _QW, + _FN, +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + MCR_01 = SAFE_RANGE, + MCR_02, + MCR_03, + MCR_04, + MCR_05, + MCR_06, + MCR_07, + MCR_08, + MCR_09, + MCR_10, + MCR_11, +}; + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = LAYOUT_tkl_ansi_wkl( + KC_ESC, 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_PSCR, KC_SLCK, KC_BRK, + KC_GRV, 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_INS, KC_HOME, 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_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + 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_UP, + KC_LCTL, KC_LALT, KC_SPC, MO(_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + [_FN] = LAYOUT_tkl_ansi_wkl( + BL_STEP, MCR_01, MCR_02, MCR_03, MCR_03, MCR_04, MCR_05, MCR_06, MCR_07, MCR_08, MCR_09, MCR_10, MCR_11, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______), +}; +// clang-format on + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case MCR_01: + if (record->event.pressed) { + SEND_STRING("The"); + } + break; + case MCR_02: + if (record->event.pressed) { + SEND_STRING("Custom"); + } + break; + case MCR_03: + if (record->event.pressed) { + SEND_STRING("Keyboard"); + } + break; + case MCR_04: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("c") SS_TAP(X_RIGHT) SS_LCTRL("v")); + } + break; + } + return true; +}; + +void matrix_init_user(void) {} + +void matrix_scan_user(void) {} + +void led_set_user(uint8_t usb_led) {} diff --git a/keyboards/kmac/keymaps/winkeyless/readme.md b/keyboards/kmac/keymaps/default_tkl_ansi_wkl/readme.md similarity index 86% rename from keyboards/kmac/keymaps/winkeyless/readme.md rename to keyboards/kmac/keymaps/default_tkl_ansi_wkl/readme.md index 9c579e9f5..a66ed1090 100644 --- a/keyboards/kmac/keymaps/winkeyless/readme.md +++ b/keyboards/kmac/keymaps/default_tkl_ansi_wkl/readme.md @@ -2,9 +2,6 @@ This is the default keymap for the winkeyless version of the PCB. It implements the same features as the official default KMAC firmware. - -See [keymap.c](keymap.c) for details. - ## Layers The keymap have two layers. To access the functions on the second layer, hold down `Fn` and press the corresponding key. @@ -22,8 +19,8 @@ The keymap have two layers. To access the functions on the second layer, hold do |-----------------------------------------------------------| ,---. |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | |Up | |-----------------------------------------------------------| ,-----------. - |Ctl|Gui|Alt| Space |Alt|Fn |Ctl| |Lef|Dow|Rig| - `-----------------------------------------------------------' `-----------' + |Ctl | |Alt | Space |Fn | |Ctl | |Lef|Dow|Rig| + `----' `-----------------------------------------' `----' `-----------' ### Layer 2: Function Layer ,---. ,---------------. ,---------------. ,---------------. ,-----------. @@ -38,8 +35,8 @@ The keymap have two layers. To access the functions on the second layer, hold do |-----------------------------------------------------------| ,---. | | | | | | | | | | | | | | | |-----------------------------------------------------------| ,-----------. - | | | | | | | | | | | | - `-----------------------------------------------------------' `-----------' + | | | | | | | | | | | | + `----' `-----------------------------------------' `----' `-----------' ## Macros @@ -51,7 +48,3 @@ These are mostly useless and serve more like examples I guess. | 2 | Types `Custom` | | 3 | Types `Keyboard` | | 4 | Inputs `` `` `` | - -## Building - -To build the firmware with the keymap for the winkeyless version, run `make winkeyless`. diff --git a/keyboards/kmac/keymaps/winkeyless/keymap.c b/keyboards/kmac/keymaps/winkeyless/keymap.c deleted file mode 100644 index 0df0aaf42..000000000 --- a/keyboards/kmac/keymaps/winkeyless/keymap.c +++ /dev/null @@ -1,93 +0,0 @@ -/* Copyright 2017 Mathias Andersson - * - * 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 . - */ -#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 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BL] = LAYOUT_WKL( - KC_ESC, 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_PSCR, KC_SLCK, KC_BRK, - KC_GRV, 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_INS, KC_HOME, 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_DEL, KC_END, KC_PGDN, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - 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_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - [_FL] = LAYOUT_WKL( - BL_STEP, M(0), M(1), M(2), M(3), M(4), M(5), M(6), M(7), M(8), M(9), M(10), M(11), _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch (id) - { - case 0: - if (record->event.pressed) - { - SEND_STRING("The"); - return false; - } - break; - case 1: - if (record->event.pressed) - { - SEND_STRING("Custom"); - return false; - } - break; - case 2: - if (record->event.pressed) - { - SEND_STRING("Keyboard"); - return false; - } - break; - case 3: - if (record->event.pressed) - { - return MACRO(D(LCTL), T(C), U(LCTL), T(RGHT), D(LCTL), T(V), U(LCTL), END); - } - break; - } - return MACRO_NONE; -}; - -void matrix_init_user(void) -{ -} - -void matrix_scan_user(void) -{ -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) -{ - return true; -} - -void led_set_user(uint8_t usb_led) -{ -} diff --git a/keyboards/kmac/keymaps/winkeyless/rules.mk b/keyboards/kmac/keymaps/winkeyless/rules.mk deleted file mode 100644 index 128487947..000000000 --- a/keyboards/kmac/keymaps/winkeyless/rules.mk +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2013 Jun Wako -# -# 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 . - - -# QMK Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -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 = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/kmac/kmac.c b/keyboards/kmac/kmac.c index 6b54294b4..dcbbc2f17 100644 --- a/keyboards/kmac/kmac.c +++ b/keyboards/kmac/kmac.c @@ -1,4 +1,4 @@ -/* Copyright 2017 Mathias Andersson +/* Copyright 2017-2019 Mathias Andersson * * 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 @@ -15,61 +15,68 @@ */ #include "kmac.h" +#define CAPS_PIN B0 +#define SCROLL_PIN E6 +#define F_ROW_MASK 0b01 +#define WASD_MASK 0b10 + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up - led_init_ports(); + setPinOutput(CAPS_PIN); + setPinOutput(SCROLL_PIN); + matrix_init_user(); } -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) +/* - matrix_scan_user(); +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); } bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware - return process_record_user(keycode, record); + return process_record_user(keycode, record); } -void led_init_ports(void) { - DDRB |= (1<<0); // OUT - DDRE |= (1<<6); // OUT -} +*/ /* LED pin configuration * Scroll Lock: Low PE6 * Caps Lock: Low PB0 */ void led_set_kb(uint8_t usb_led) { - if (usb_led & (1< +/* Copyright 2017-2019 Mathias Andersson * * 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 @@ -13,41 +13,44 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef KMAC_H -#define KMAC_H +#pragma once #include "quantum.h" -// Keymap for the winkey version of the PCB. -#define LAYOUT( \ - K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4D, K4F, \ - K50, K51, K52, K55, K58, K5A, K5C, K5D, K5E, K5F, K5G) \ - { \ - /* 0 1 2 3 4 5 6 7 8 9 A B C D E F G */ \ - /* 0 */ {K00, KC_NO, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G}, \ - /* 1 */ {K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G}, \ - /* 2 */ {K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G}, \ - /* 3 */ {K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, KC_NO, KC_NO, KC_NO}, \ - /* 4 */ {K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, KC_NO, KC_NO, K4D, KC_NO, K4F, KC_NO}, \ - /* 5 */ { K50, K51, K52, KC_NO, KC_NO, K55, KC_NO, KC_NO, K58, KC_NO, K5A, KC_NO, K5C, K5D, K5E, K5F, K5G } \ - } +// clang-format off +#define LAYOUT_tkl_ansi( \ + k00, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4D, k4F, \ + k50, k51, k52, k55, k58, k5A, k5C, k5D, k5E, k5F, k5G \ +) \ +{ \ + {k00, KC_NO, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, KC_NO, k3D, KC_NO, KC_NO, KC_NO}, \ + {k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, KC_NO, KC_NO, k4D, KC_NO, k4F, KC_NO}, \ + {k50, k51, k52, KC_NO, KC_NO, k55, KC_NO, KC_NO, k58, KC_NO, k5A, KC_NO, k5C, k5D, k5E, k5F, k5G } \ +} +// clang-format on -// Keymap for the winkeyless version of the PCB. -#define LAYOUT_WKL( \ - K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4D, K4F, \ - K50, K51, K52, K55, K58, K5A, K5D, K5E, K5F, K5G) LAYOUT(K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4D, K4F, \ - K50, K51, K52, K55, K58, K5A, KC_NO, K5D, K5E, K5F, K5G) - -#endif +// clang-format off +#define LAYOUT_tkl_ansi_wkl( \ + k00, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4D, k4F, \ + k50, k52, k55, k58, k5D, k5E, k5F, k5G \ +) \ +{ \ + {k00, KC_NO, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, KC_NO, k3D, KC_NO, KC_NO, KC_NO}, \ + {k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, KC_NO, KC_NO, k4D, KC_NO, k4F, KC_NO}, \ + {k50, KC_NO, k52, KC_NO, KC_NO, k55, KC_NO, KC_NO, k58, KC_NO, KC_NO, KC_NO, KC_NO, k5D, k5E, k5F, k5G } \ +} +// clang-format on diff --git a/keyboards/kmac/matrix.c b/keyboards/kmac/matrix.c index 00da96604..2212ee076 100644 --- a/keyboards/kmac/matrix.c +++ b/keyboards/kmac/matrix.c @@ -1,5 +1,5 @@ /* -Copyright 2017 Mathias Andersson +Copyright 2017-2019 Mathias Andersson 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 @@ -16,118 +16,137 @@ along with this program. If not, see . */ #include #include -#if defined(__AVR__) -#include -#endif #include "wait.h" #include "print.h" #include "debug.h" #include "util.h" #include "matrix.h" -#include "timer.h" +#include "debounce.h" +#include "quantum.h" - -/* Set 0 if debouncing isn't needed */ -#ifndef DEBOUNCE -# define DEBOUNCE 5 +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) #endif -#define COL_SHIFTER ((uint32_t)1) - -static uint16_t debouncing_time; -static bool debouncing = false; - - -static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; /* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; +static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values +static matrix_row_t matrix[MATRIX_ROWS]; // debounced values -static void init_rows(void); -static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); -static void unselect_cols(void); -static void select_col(uint8_t col); +__attribute__((weak)) void matrix_init_quantum(void) { matrix_init_kb(); } -inline -uint8_t matrix_rows(void) { - return MATRIX_ROWS; -} +__attribute__((weak)) void matrix_scan_quantum(void) { matrix_scan_kb(); } -inline -uint8_t matrix_cols(void) { - return MATRIX_COLS; -} +__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } -void matrix_init(void) { - unselect_cols(); - init_rows(); +__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } +__attribute__((weak)) void matrix_init_user(void) {} - matrix_init_quantum(); -} +__attribute__((weak)) void matrix_scan_user(void) {} -uint8_t matrix_scan(void) -{ - // Set col, read rows - for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { - bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col); - if (matrix_changed) { - debouncing = true; - debouncing_time = timer_read(); - } - } +inline uint8_t matrix_rows(void) { return MATRIX_ROWS; } - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - debouncing = false; - } +inline uint8_t matrix_cols(void) { return MATRIX_COLS; } - matrix_scan_quantum(); - return 1; -} +inline bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & ((matrix_row_t)1 << col)); } -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<> 4) & _BV(E2 & 0xF)) == 0) - { + if (readPin(E2) == 0) { // Pin LO, set col bit - current_matrix[row_index] |= (COL_SHIFTER << current_col); - } - else - { + current_matrix[row_index] |= (ROW_SHIFTER << current_col); + } else { // Pin HI, clear col bit - current_matrix[row_index] &= ~(COL_SHIFTER << current_col); + current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); } - } - else { - if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF))) - { - // Pin HI, set col bit - current_matrix[row_index] |= (COL_SHIFTER << current_col); - } - else - { - // Pin LO, clear col bit - current_matrix[row_index] &= ~(COL_SHIFTER << current_col); + } else { + if (readPin(row_pins[row_index]) == 0) { + // Pin HI, clear col bit + current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); + } else { + // Pin LO, set col bit + current_matrix[row_index] |= (ROW_SHIFTER << current_col); } } // Determine if the matrix changed state - if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) - { + if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) { matrix_changed = true; } } @@ -181,131 +190,31 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) return matrix_changed; } -/* Row pin configuration - * row: 0 1 2 3 4 5 - * pin: D0 D1 D2 D3 D5 B7 - * - * Caps lock uses its own pin E2 - */ -static void init_rows(void) -{ - DDRD &= ~((1<<0)| (1<<1) | (1<<2) | (1<<3) | (1<<5)); // IN - PORTD &= ~((1<<0)| (1<<1) | (1<<2) | (1<<3) | (1<<5)); // LO - DDRB &= ~(1<<7); // IN - PORTB &= ~(1<<7); // LO +void matrix_init(void) { + // initialize key pins + init_pins(); - DDRE &= ~(1<<2); // IN - PORTE |= (1<<2); // HI -} - -/* Columns 0 - 15 - * These columns uses two 74HC237D 3 to 8 bit demultiplexers. - * col / pin: PC6 PB6 PF0 PF1 PC7 - * 0: 1 0 0 0 0 - * 1: 1 0 1 0 0 - * 2: 1 0 0 1 0 - * 3: 1 0 1 1 0 - * 4: 1 0 0 0 1 - * 5: 1 0 1 0 1 - * 6: 1 0 0 1 1 - * 7: 1 0 1 1 1 - * 8: 0 1 0 0 0 - * 9: 0 1 1 0 0 - * 10: 0 1 0 1 0 - * 11: 0 1 1 1 0 - * 12: 0 1 0 0 1 - * 13: 0 1 1 0 1 - * 14: 0 1 0 1 1 - * 15: 0 1 1 1 1 - * - * col: 16 - * pin: PB5 - */ -static void unselect_cols(void) -{ - DDRB |= (1<<5) | (1<<6); // OUT - PORTB &= ~((1<<5) | (1<<6)); // LO - - DDRC |= (1<<6) | (1<<7); // OUT - PORTC &= ~((1<<6) | (1<<7)); // LO - - DDRF |= (1<<0) | (1<<1); // OUT - PORTF &= ~((1<<0) | (1<<1)); // LO -} - -static void select_col(uint8_t col) -{ - switch (col) { - case 0: - PORTC |= (1<<6); // HI - break; - case 1: - PORTC |= (1<<6); // HI - PORTF |= (1<<0); // HI - break; - case 2: - PORTC |= (1<<6); // HI - PORTF |= (1<<1); // HI - break; - case 3: - PORTC |= (1<<6); // HI - PORTF |= (1<<0) | (1<<1); // HI - break; - case 4: - PORTC |= (1<<6); // HI - PORTC |= (1<<7); // HI - break; - case 5: - PORTC |= (1<<6); // HI - PORTF |= (1<<0); // HI - PORTC |= (1<<7); // HI - break; - case 6: - PORTC |= (1<<6); // HI - PORTF |= (1<<1); // HI - PORTC |= (1<<7); // HI - break; - case 7: - PORTC |= (1<<6); // HI - PORTF |= (1<<0) | (1<<1); // HI - PORTC |= (1<<7); // HI - break; - case 8: - PORTB |= (1<<6); // HI - break; - case 9: - PORTB |= (1<<6); // HI - PORTF |= (1<<0); // HI - break; - case 10: - PORTB |= (1<<6); // HI - PORTF |= (1<<1); // HI - break; - case 11: - PORTB |= (1<<6); // HI - PORTF |= (1<<0) | (1<<1); // HI - break; - case 12: - PORTB |= (1<<6); // HI - PORTC |= (1<<7); // HI - break; - case 13: - PORTB |= (1<<6); // HI - PORTF |= (1<<0); // HI - PORTC |= (1<<7); // HI - break; - case 14: - PORTB |= (1<<6); // HI - PORTF |= (1<<1); // HI - PORTC |= (1<<7); // HI - break; - case 15: - PORTB |= (1<<6); // HI - PORTF |= (1<<0) | (1<<1); // HI - PORTC |= (1<<7); // HI - break; - case 16: - PORTB |= (1<<5); // HI - break; + // initialize matrix state: all keys off + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + raw_matrix[i] = 0; + matrix[i] = 0; } + + debounce_init(MATRIX_ROWS); + + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) { + bool changed = false; + + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { + changed |= read_rows_on_col(raw_matrix, current_col); + } + + debounce(raw_matrix, matrix, MATRIX_ROWS, changed); + + matrix_scan_quantum(); + + return (uint8_t)changed; } diff --git a/keyboards/kmac/readme.md b/keyboards/kmac/readme.md index cd181a5f6..47dbaa847 100644 --- a/keyboards/kmac/readme.md +++ b/keyboards/kmac/readme.md @@ -1,44 +1,21 @@ -# KMAC keyboard firmware +# KMAC A Korean custom keyboard designed by Byungho Kim and the KBDMania community. -## Supported models +Keyboard Maintainer: [Mathias Andersson](https://github.com/wraul) +Hardware Supported: KMAC & KMAC 2 +Hardware Availability: http://www.kbdmania.net/xe/news/5232321 -All the tenkeyless models should be supported. +Make example for this keyboard (after setting up your build environment): + + make kmac:default + +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 The PCB is hardwired to run the bootloader if the key at the `Caps Lock` position is held down when connecting the keyboard. -It is also possible to use Boot Magic and Command to access the bootloader. - -## Quantum MK Firmware - -For the full Quantum feature list, see the [documentation](https://docs.qmk.fm). - -## Building +## PCB versions The KMAC are available with two different PCB layouts, a winkey version and a winkeyless version. A default keymap are provided for each versions of the PCB. - -Depending on which PCB and keymap you would like to use, you will have to compile the firmware slightly differently. All of the commands should be run in the [qmk root](https://github.com/qmk/qmk_firmware/) folder. - -### Winkey keymap - -The [default keymap](keymaps/default) are designed for the winkey version of the PCB. - -### Winkeyless Keymap - -A [keymap](keymaps/winkeyless) for the winkeyless version of the PCB are also provided. - -### Custom keymaps - -To define your own keymap, copy one of the [existing keymap](keymaps) folders and give it the name of your keymap. Then check the [keymap documentation](https://docs.qmk.fm/faq_keymap.html) for details on how to modify the keymap. - -To make it easy to define keymaps for the different versions of the PCB two macros are provided. - -| PCB | Macro | -| -------------- | -------------- | -| Winkey PCB | `LAYOUT()` | -| Winkeyless PCB | `LAYOUT_WKL()` | - -To build the firmware with a custom keymap, run `make ` diff --git a/keyboards/kmac/rules.mk b/keyboards/kmac/rules.mk index 41b16979d..dbcf540bd 100644 --- a/keyboards/kmac/rules.mk +++ b/keyboards/kmac/rules.mk @@ -1,5 +1,5 @@ # Project specific files -SRC = matrix.c +SRC += matrix.c # MCU name #MCU = at90usb1287 @@ -42,15 +42,19 @@ F_USB = $(F_CPU) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu +# Supported layouts +LAYOUTS = tkl_ansi + # Build Options # change yes to no to disable # From 4be1dfcee48daeb77e966b08ad9ca51e02253acf Mon Sep 17 00:00:00 2001 From: Manna Harbour <51143715+manna-harbour@users.noreply.github.com> Date: Wed, 26 Jun 2019 17:33:12 +1000 Subject: [PATCH 264/341] [Keymap] miryoku layout (#6171) * First release * add "#pragma once" to config.h and related docs * generate config.h with change from miryoku.org --- .../keymaps/manna-harbour_miryoku/keymap.c | 17 + .../ergodox/manna-harbour_miryoku/keymap.c | 21 + .../ortho_4x12/manna-harbour_miryoku/keymap.c | 17 + users/manna-harbour_miryoku/README.org | 1 + users/manna-harbour_miryoku/config.h | 13 + .../manna-harbour_miryoku.c | 56 ++ users/manna-harbour_miryoku/miryoku.org | 609 ++++++++++++++++++ users/manna-harbour_miryoku/rules.mk | 5 + 8 files changed, 739 insertions(+) create mode 100644 keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c create mode 100644 layouts/community/ergodox/manna-harbour_miryoku/keymap.c create mode 100644 layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c create mode 120000 users/manna-harbour_miryoku/README.org create mode 100644 users/manna-harbour_miryoku/config.h create mode 100644 users/manna-harbour_miryoku/manna-harbour_miryoku.c create mode 100644 users/manna-harbour_miryoku/miryoku.org create mode 100644 users/manna-harbour_miryoku/rules.mk diff --git a/keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c b/keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c new file mode 100644 index 000000000..56d4de25a --- /dev/null +++ b/keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c @@ -0,0 +1,17 @@ + +// generated from users/manna-harbour_miryoku/miryoku.org + +#define LAYOUT_miryoku( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \ + N30, N31, K32, K33, K34, K35, K36, K37, N38, N39 \ +) \ +LAYOUT( \ +KC_NO, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, KC_NO, \ +KC_NO, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, \ +KC_NO, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, KC_NO, \ + K32, K33, K34, K35, K36, K37 \ +) + +#include "manna-harbour_miryoku.c" diff --git a/layouts/community/ergodox/manna-harbour_miryoku/keymap.c b/layouts/community/ergodox/manna-harbour_miryoku/keymap.c new file mode 100644 index 000000000..86547df98 --- /dev/null +++ b/layouts/community/ergodox/manna-harbour_miryoku/keymap.c @@ -0,0 +1,21 @@ + +// generated from users/manna-harbour_miryoku/miryoku.org + +#define LAYOUT_miryoku(\ +K00, K01, K02, K03, K04, K05, K06, K07, K08, K09,\ +K10, K11, K12, K13, K14, K15, K16, K17, K18, K19,\ +K20, K21, K22, K23, K24, K25, K26, K27, K28, K29,\ +N30, N31, K32, K33, K34, K35, K36, K37, N38, N39\ +)\ +LAYOUT_ergodox_pretty( \ +KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ +KC_NO, K00, K01, K02, K03, K04, KC_NO, KC_NO, K05, K06, K07, K08, K09, KC_NO, \ +KC_NO, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, \ +KC_NO, K20, K21, K22, K23, K24, KC_NO, KC_NO, K25, K26, K27, K28, K29, KC_NO, \ +KC_NO, KC_NO, KC_NO, KC_NO, K32, K37, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, \ + K33, K34, KC_NO, KC_NO, K35, K36 \ +) + +#include "manna-harbour_miryoku.c" diff --git a/layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c b/layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c new file mode 100644 index 000000000..b1341d41f --- /dev/null +++ b/layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c @@ -0,0 +1,17 @@ + +// generated from users/manna-harbour_miryoku/miryoku.org + +#define LAYOUT_miryoku(\ +K00, K01, K02, K03, K04, K05, K06, K07, K08, K09,\ +K10, K11, K12, K13, K14, K15, K16, K17, K18, K19,\ +K20, K21, K22, K23, K24, K25, K26, K27, K28, K29,\ +N30, N31, K32, K33, K34, K35, K36, K37, N38, N39\ +)\ +LAYOUT_ortho_4x12(\ +KC_NO, K01, K02, K03, K04, KC_NO, KC_NO, K05, K06, K07, K08, KC_NO,\ +K00, K11, K12, K13, K14, KC_NO, KC_NO, K15, K16, K17, K18, K09,\ +K10, K21, K22, K23, K24, KC_NO, KC_NO, K25, K26, K27, K28, K19,\ +K20, KC_NO, KC_NO, K32, K33, K34, K35, K36, K37, KC_NO, KC_NO, K29\ +) + +#include "manna-harbour_miryoku.c" diff --git a/users/manna-harbour_miryoku/README.org b/users/manna-harbour_miryoku/README.org new file mode 120000 index 000000000..b6caaade1 --- /dev/null +++ b/users/manna-harbour_miryoku/README.org @@ -0,0 +1 @@ +miryoku.org \ No newline at end of file diff --git a/users/manna-harbour_miryoku/config.h b/users/manna-harbour_miryoku/config.h new file mode 100644 index 000000000..c3c513d06 --- /dev/null +++ b/users/manna-harbour_miryoku/config.h @@ -0,0 +1,13 @@ + +// generated from users/manna-harbour_miryoku/miryoku.org + +#pragma once + +// Prevent normal rollover on alphas from accidentally triggering mods. +#define IGNORE_MOD_TAP_INTERRUPT + +// Enable rapid switch from tap to hold, disables double tap hold auto-repeat. +#define TAPPING_FORCE_HOLD + +// Recommended for heavy chording. +#define QMK_KEYS_PER_SCAN 4 diff --git a/users/manna-harbour_miryoku/manna-harbour_miryoku.c b/users/manna-harbour_miryoku/manna-harbour_miryoku.c new file mode 100644 index 000000000..bb4770afc --- /dev/null +++ b/users/manna-harbour_miryoku/manna-harbour_miryoku.c @@ -0,0 +1,56 @@ + +// generated from users/manna-harbour_miryoku/miryoku.org + +#include QMK_KEYBOARD_H + +#define KC_NP KC_NO // key is not present +#define KC_NA KC_NO // present but not available for use +#define KC_NU KC_NO // available but not used +#define KC_RST RESET + +enum layers { BASE, MEDR, NAVR, MOUR, NSSL, NSL, FUNL }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_miryoku( + KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, + LGUI_T(KC_A), LALT_T(KC_R), LCTL_T(KC_S), LSFT_T(KC_T), KC_G, KC_M, LSFT_T(KC_N), LCTL_T(KC_E), LALT_T(KC_I), LGUI_T(KC_O), + KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, + KC_NP, KC_NP, LT(MEDR, KC_ESC), LT(NAVR, KC_SPC), LT(MOUR, KC_TAB), LT(NSSL, KC_ENT), LT(NSL, KC_BSPC), LT(FUNL, KC_DEL), KC_NP, KC_NP + ), + [NAVR] = LAYOUT_miryoku( + KC_RST, KC_NA, KC_NA, KC_NA, KC_NA, KC_AGIN, KC_UNDO, KC_CUT, KC_COPY, KC_PSTE, + KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, KC_NA, KC_CAPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + KC_NA, KC_NA, KC_NA, KC_NA, KC_NA, KC_INS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, + KC_NP, KC_NP, KC_NA, KC_NA, KC_NA, KC_ENT, KC_BSPC, KC_DEL, KC_NP, KC_NP + ), + [MOUR] = LAYOUT_miryoku( + KC_RST, KC_NA, KC_NA, KC_NA, KC_NA, KC_NU, KC_NU, KC_NU, KC_NU, KC_NU, + KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, KC_NA, KC_NU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, + KC_NA, KC_NA, KC_NA, KC_NA, KC_NA, KC_NU, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, + KC_NP, KC_NP, KC_NA, KC_NA, KC_NA, KC_BTN3, KC_BTN1, KC_BTN2, KC_NP, KC_NP + ), + [MEDR] = LAYOUT_miryoku( + KC_RST, KC_NA, KC_NA, KC_NA, KC_NA, KC_NU, KC_NU, KC_NU, KC_NU, KC_NU, + KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, KC_NA, KC_NU, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, + KC_NA, KC_NA, KC_NA, KC_NA, KC_NA, KC_NU, KC_NU, KC_NU, KC_NU, KC_NU, + KC_NP, KC_NP, KC_NA, KC_NA, KC_NA, KC_MSTP, KC_MPLY, KC_MUTE, KC_NP, KC_NP + ), + [FUNL] = LAYOUT_miryoku( + KC_F12, KC_F7, KC_F8, KC_F9, KC_PSCR, KC_NA, KC_NA, KC_NA, KC_NA, KC_RST, + KC_F11, KC_F4, KC_F5, KC_F6, KC_SLCK, KC_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, + KC_F10, KC_F1, KC_F2, KC_F3, KC_PAUS, KC_NA, KC_NA, KC_NA, KC_NA, KC_NA, + KC_NP, KC_NP, KC_APP, KC_SPC, KC_TAB, KC_NA, KC_NA, KC_NA, KC_NP, KC_NP + ), + [NSL] = LAYOUT_miryoku( + KC_LBRC, KC_7, KC_8, KC_9, KC_RBRC, KC_NA, KC_NA, KC_NA, KC_NA, KC_RST, + KC_SCLN, KC_4, KC_5, KC_6, KC_EQL, KC_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, + KC_GRV, KC_1, KC_2, KC_3, KC_BSLS, KC_NA, KC_NA, KC_NA, KC_NA, KC_NA, + KC_NP, KC_NP, KC_DOT, KC_0, KC_MINS, KC_NA, KC_NA, KC_NA, KC_NP, KC_NP + ), + [NSSL] = LAYOUT_miryoku( + KC_LCBR, KC_AMPR, KC_ASTR, KC_LPRN, KC_RCBR, KC_NA, KC_NA, KC_NA, KC_NA, KC_RST, + KC_COLN, KC_DLR, KC_PERC, KC_CIRC, KC_PLUS, KC_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_PIPE, KC_NA, KC_NA, KC_NA, KC_NA, KC_NA, + KC_NP, KC_NP, KC_GT, KC_RPRN, KC_UNDS, KC_NA, KC_NA, KC_NA, KC_NP, KC_NP + ) +}; diff --git a/users/manna-harbour_miryoku/miryoku.org b/users/manna-harbour_miryoku/miryoku.org new file mode 100644 index 000000000..556f95f60 --- /dev/null +++ b/users/manna-harbour_miryoku/miryoku.org @@ -0,0 +1,609 @@ +#+Title: miryoku.org + +The miryoku layout is an ergonomic, minimal, orthogonal layout for ergo or ortho +keyboards, implemented as part of the QMK firmware. The layout is maintained in +emacs org-mode tables and converted to QMK keymap data structures using embedded +python scripts. The layout is mapped onto keyboards with different physical +layouts as a subset without code duplication using the QMK userland feature and +C macros. Versions of the layout can also be seen outside of the QMK source at +[[https://github.com/manna-harbour/miryoku/]]. + +* Contents + +- [[#layout][Layout]] +- [[#code-generation][Code Generation]] +- [[#subset-mapping][Subset Mapping]] + + +* Layout +:PROPERTIES: +:CUSTOM_ID: layout +:END: + +** Info + +*** General Principles + + - Use layers instead of reaching. + - Use both hands instead of contortions. + - Use the home positions as much as possible. + - Make full use of the thumbs. + - Avoid unnecessary complication. + + +*** Specifics + + - 5 columns, 3 rows, 3 thumb keys, 2 hands. + - Can be used on almost any split or non-split ergo or ortho keyboard. + - Includes all keys found on a US layout TKL keyboard, plus media keys and + mouse emulation. + - Home row is the middle row, home thumb key is the middle thumb key. + - Maximum 1-u movement from home position for fingers and thumbs, and only + along one axis (except for the inner index finger column which is + deprioritised compared with the home columns). + - Dual-function modifiers on home row, mirrored on both hands. + - Dual-function layer change on thumbs. + - Layers are designed orthogonally with a single purpose per hand and are + accessed by holding a thumb key on the opposite hand. + - Holding layer change and modifiers on one hand combined with a single key + press on the other hand can produce any combination of modifiers and + single keys without any finger contortions. + - Single function mods are also defined on layers on the same hand as the + layer change thumb key so layer change and mods can be held in any order + or simultaneously without race conditions. + - As mods are only enabled on the opposite hand, auto-repeat is available on + the home row on layers for use with cursor and mouse keys. + - Tap-hold auto-repeat is disabled to enable faster tap-hold switching on + thumbs but thumb tap keys are mirrored onto some layers for use with + auto-repeat. + + +** Layers + +The layers are maintained in tables, with the thumb keys on the bottom row. NP +indicates the key is not present and is used to fill in the table around the +thumb keys. The grid arrangement of the tables does not imply a particular +physical layout. + +Basic keycodes are entered without the KC_ prefix. Symbols can be entered as-is +(excepting '"' (DQUO) and '|' (PIPE)). Empty cells are unused. + +The base layer has both halves of the layout joined for convenience. Other +layers are specified as a single hand. + +*** Base (BASE) + + +The base layer is maintained as separate tap and hold tables and are combined +into the corresponding tap-hold keycodes for mods and layer change. RST and +mods will be available on sub layers on the same hand as the layer change thumb +key. Unknown names are considered to be layer names. + +Base layer alphas are Colemak DHm. Thumb keys are backspace, enter, delete on +the right and space, tab, escape on the left. Dot, comma and apostrophe are +included for prose, dot and slash for file and directory names. + +#+NAME: tap +| Q | W | F | P | B | J | L | U | Y | ' | +| A | R | S | T | G | M | N | E | I | O | +| Z | X | C | D | V | K | H | , | . | / | +| NP | NP | ESC | SPC | TAB | ENT | BSPC | DEL | NP | NP | + +#+NAME: hold +| RST | | | | | | | | | RST | +| LGUI | LALT | LCTL | LSFT | | | LSFT | LCTL | LALT | LGUI | +| | | | | | | | | | | +| NP | NP | MEDR | NAVR | MOUR | NSSL | NSL | FUNL | NP | NP | + + +*** Navigation (NAVR) + +Primary right-hand layer (left home thumb) is navigation and editing. Cursor +keys are on the home position, line and page movement below, clipboard above, +caps and insert on the inner column. Thumb keys are duplicated from the base +layer to avoid having to layer change mid edit and to enable auto-repeat. + +#+NAME: navr +| AGIN | UNDO | CUT | COPY | PSTE | +| CAPS | LEFT | DOWN | UP | RGHT | +| INS | HOME | PGDN | PGUP | END | +| ENT | BSPC | DEL | NP | NP | + + +*** Mouse (MOUR) + +Secondary RH layer is mouse emulation. Mouse movement mirrors cursor navigation +on home and wheel mirrors line / page movement below. Buttons are on the +thumbs. Mouse movement, click, and drag with modifiers can be performed from +the home position. Unused keys are available for other related functions. + +#+NAME: mour +| | | | | | +| | MS_L | MS_D | MS_U | MS_R | +| | WH_L | WH_D | WH_U | WH_R | +| BTN3 | BTN1 | BTN2 | NP | NP | + + +*** Media (MEDR) + +Tertiary RH layer is media control, with volume up / down and next / prev +mirroring the navigation keys. Pause, stop and mute are on thumbs. Unused keys +are available for other related functions. + +#+NAME: medr +| | | | | | +| | MPRV | VOLD | VOLU | MNXT | +| | | | | | +| MSTP | MPLY | MUTE | NP | NP | + + +*** Numerals and Symbols (NSL) + +Primary left-hand layer (right home thumb) is numerals and symbols. Numerals +are in the standard numpad locations with symbols in the remaining positions. +Dot is duplicated from the base layer for convenience. + +#+NAME: nsl +| [ | 7 | 8 | 9 | ] | +| ; | 4 | 5 | 6 | = | +| ` | 1 | 2 | 3 | \ | +| NP | NP | . | 0 | - | + + +*** Shifted Numerals and Symbols (NSSL) + +Secondary LH layer has shifted symbols in the same locations to reduce chording +when using mods with shifted symbols. Automatically generated from unshifted +table. + + +*** Function and System (FUNL) + +Tertiary LH layer has function keys mirroring the numerals on the primary layer +with extras on the pinkie column, plus system keys on the inner column. App +(menu) is on the tertiary thumb key and other thumb keys are duplicated from the +base layer to enable auto-repeat. + + +#+NAME: funl +| F12 | F7 | F8 | F9 | PSCR | +| F11 | F4 | F5 | F6 | SLCK | +| F10 | F1 | F2 | F3 | PAUS | +| NP | NP | APP | SPC | TAB | + + +*** COMMENT Templates + +#+NAME: tem +| | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | +| | | | | | | | | | | +| | | | | | | | | | | +| NP | NP | | | | | | | NP | NP | + + +Duplicate base layer tap keys on thumbs rather than trans to enable auto-repeat. + +#+NAME: temr +| | | | | | +|------+------+------+------+------| +| | | | | | +| | | | | | +| | | | | | +| ENT | BSPC | DEL | NP | NP | + +#+NAME: teml +| | | | | | +|------+------+------+------+------| +| | | | | | +| | | | | | +| | | | | | +| NP | NP | ESC | SPC | TAB | + + +* Code Generation +:PROPERTIES: +:CUSTOM_ID: code-generation +:END: + +** Table Conversion Scripts + +*** table-layout-taphold + +Produce base layer from separate tap and hold tables. + +#+NAME: table-layout-taphold +#+BEGIN_SRC python :var tap_table=tap :var hold_table=hold :var symbol_names_table=symbol-names :var mods_list=mods :tangle no :results verbatim +width = 19 +mods_dict = dict.fromkeys(mods_list) +symbol_names_dict = {} +for symbol, name, shifted_symbol, shifted_name in symbol_names_table: + symbol_names_dict[symbol] = name + symbol_names_dict[shifted_symbol] = shifted_name +results = ' [BASE] = LAYOUT_miryoku(\n' +for tap_row, hold_row in map(None, tap_table, hold_table): + results += ' ' + for tap, hold in map(None, tap_row, hold_row): + if tap == '': + code = 'NU' + elif tap in symbol_names_dict: + code = symbol_names_dict[tap] + else: + code = tap + code = 'KC_' + str(code) + if hold in mods_dict: + code = str(hold) + '_T(' + code + ')' + elif hold != '' and hold != 'NP' and hold != 'RST': + code = 'LT(' + str(hold) + ', ' + code + ')' + results += (code + ', ').ljust(width) + results = results.rstrip(' ') + '\n' +results = results.rstrip('\n, ') + '\n )' +return results +#+END_SRC + +#+RESULTS: table-layout-taphold +: [BASE] = LAYOUT_miryoku( +: KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, +: LGUI_T(KC_A), LALT_T(KC_R), LCTL_T(KC_S), LSFT_T(KC_T), KC_G, KC_M, LSFT_T(KC_N), LCTL_T(KC_E), LALT_T(KC_I), LGUI_T(KC_O), +: KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, +: KC_NP, KC_NP, LT(MEDR, KC_ESC), LT(NAVR, KC_SPC), LT(MOUR, KC_TAB), LT(NSSL, KC_ENT), LT(NSL, KC_BSPC), LT(FUNL, KC_DEL), KC_NP, KC_NP +: ) + + +*** table-layout-half + +Produce sub layers given layer name and corresponding table for single hand and +incorporating mods and reset from base layer. Layer names must end with R or L. +A layer with shifted symbols can also be generated. + +#+NAME: table-layout-half +#+BEGIN_SRC python :var hold_table=hold :var layer_name="NSL" :var half_table=nsl :var symbol_names_table=symbol-names :var mods_list=mods :var shift="false" :tangle no :results verbatim +width = 9 +mods_dict = dict.fromkeys(mods_list) +symbol_names_dict = {} +shifted_symbol_names_dict = {} +for symbol, name, shifted_symbol, shifted_name in symbol_names_table: + symbol_names_dict[symbol] = name + symbol_names_dict[shifted_symbol] = shifted_name + shifted_symbol_names_dict[symbol] = shifted_name +length = len(half_table[0]) +mode = layer_name[-1:].lower() +results = ' [' + layer_name + '] = LAYOUT_miryoku(\n' +for half_row, hold_row in map(None, half_table, hold_table): + results += ' ' + hold_row_l, hold_row_r = hold_row[:length], hold_row[length:] + for lr, hold_row_lr in ('l', hold_row_l), ('r', hold_row_r): + if lr == mode: + for half in half_row: + if half == '': + code = 'NU' + elif shift == "true" and half in shifted_symbol_names_dict: + code = shifted_symbol_names_dict[half] + elif half in symbol_names_dict: + code = symbol_names_dict[half] + else: + code = half + results += ('KC_' + str(code) + ', ').ljust(width) + else: + for hold in hold_row_lr: + if hold == '' or hold != 'NP' and hold != 'RST' and hold not in mods_dict: + code = 'NA' + else: + code = hold + results += ('KC_' + str(code) + ', ').ljust(width) + results = results.rstrip(' ') + '\n' +results = results.rstrip('\n, ') + '\n )' +return results +#+END_SRC + +#+RESULTS: table-layout-half +: [NSL] = LAYOUT_miryoku( +: KC_LBRC, KC_7, KC_8, KC_9, KC_RBRC, KC_NA, KC_NA, KC_NA, KC_NA, KC_RST, +: KC_SCLN, KC_4, KC_5, KC_6, KC_EQL, KC_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, +: KC_GRV, KC_1, KC_2, KC_3, KC_BSLS, KC_NA, KC_NA, KC_NA, KC_NA, KC_NA, +: KC_NP, KC_NP, KC_DOT, KC_0, KC_MINS, KC_NA, KC_NA, KC_NA, KC_NP, KC_NP +: ) + + +*** table-enums + +Produce layer enums from layer names in hold table. + +#+NAME: table-enums +#+BEGIN_SRC python :var hold_table=hold :var mods_list=mods :tangle no +mods_dict = dict.fromkeys(mods_list) +results = 'enum layers { BASE, ' +for hold_row in hold_table: + for hold in hold_row: + if hold not in mods_dict and hold != '' and hold != 'NP' and hold != 'RST': + results += hold + ', ' +results = results.rstrip(', ') + ' };' +return results +#+END_SRC + +#+RESULTS: table-enums +: enum layers { BASE, MEDR, NAVR, MOUR, NSSL, NSL, FUNL }; + + +** Data + +*** symbol-names + +Symbol, name, and shifted symbol mappings for use in tables. + +#+NAME: symbol-names +| ` | GRV | ~ | TILD | +| - | MINS | _ | UNDS | +| = | EQL | + | PLUS | +| [ | LBRC | { | LCBR | +| ] | RBRC | } | RCBR | +| \ | BSLS | PIPE | PIPE | +| ; | SCLN | : | COLN | +| ' | QUOT | DQUO | DQUO | +| , | COMM | < | LT | +| . | DOT | > | GT | +| / | SLSH | ? | QUES | +| 1 | 1 | ! | EXLM | +| 2 | 2 | @ | AT | +| 3 | 3 | # | HASH | +| 4 | 4 | $ | DLR | +| 5 | 5 | % | PERC | +| 6 | 6 | ^ | CIRC | +| 7 | 7 | & | AMPR | +| 8 | 8 | * | ASTR | +| 9 | 9 | ( | LPRN | +| 0 | 0 | ) | RPRN | + + +*** mods + +Modifiers usable in hold table. Need to have the same name for KC_ and _T versions. + +#+NAME: mods +- LSFT +- LCTL +- LALT +- LGUI +- LAGR + + +** Other + +*** header + +Header for tangled src files. + +#+NAME: header +#+BEGIN_SRC C :tangle no +generated from users/manna-harbour_miryoku/miryoku.org +#+END_SRC + + +* Subset Mapping +:PROPERTIES: +:CUSTOM_ID: subset-mapping +:END: + +** Userspace + +The keymap and configuration are shared between keyboards. The keymap is +defined for LAYOUT_miryoku which is 10x4, with the outer 2 positions on the +bottom row unused and the rest of the bottom row are the thumb keys. + + +*** manna-harbour_miryoku.c + +Contains the keymap. Included from keymap.c + +[[./manna-harbour_miryoku.c][users/manna-harbour_miryoku/manna-harbour_miryoku.c]] +#+BEGIN_SRC C :noweb yes :tangle manna-harbour_miryoku.c + +// <
> + +#include QMK_KEYBOARD_H + +#define KC_NP KC_NO // key is not present +#define KC_NA KC_NO // present but not available for use +#define KC_NU KC_NO // available but not used +#define KC_RST RESET + +<> + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +<>, +<>, +<>, +<>, +<>, +<>, +<> +}; +#+END_SRC + + +*** config.h + +Config options. Automatically included. + +[[./config.h][users/manna-harbour_miryoku/config.h]] +#+BEGIN_SRC C :noweb yes :tangle config.h + +// <
> + +#pragma once + +// Prevent normal rollover on alphas from accidentally triggering mods. +#define IGNORE_MOD_TAP_INTERRUPT + +// Enable rapid switch from tap to hold, disables double tap hold auto-repeat. +#define TAPPING_FORCE_HOLD + +// Recommended for heavy chording. +#define QMK_KEYS_PER_SCAN 4 + +#+END_SRC + + +*** rules.mk + +Build options. Automatically included. + +[[./rules.mk][users/manna-harbour_miryoku/rules.mk]] +#+BEGIN_SRC makefile :noweb yes :tangle rules.mk + +# <
> + +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) + +#+END_SRC + + +** Layouts + +To use the keymap on a keyboard supporting the layouts feature, LAYOUT_miryoku +is defined as a macro mapping onto the layout's own LAYOUT macro, leaving the +unused keys as KC_NO. The userspace keymap is then included. + +*** ergodox + +For the ergodox layout, the main 5x3 alphas are used as usual. The primary and +secondary thumb keys are the inner and outer 2u thumb keys and the tertiary +thumb key is the innermost key of the partial bottom row. The remaining keys +are unused. + +[[../../layouts/community/ergodox/manna-harbour_miryoku/keymap.c][layouts/community/ergodox/manna-harbour_miryoku/keymap.c]] +#+BEGIN_SRC C :noweb yes :tangle ../../layouts/community/ergodox/manna-harbour_miryoku/keymap.c + +// <
> + +#define LAYOUT_miryoku(\ +K00, K01, K02, K03, K04, K05, K06, K07, K08, K09,\ +K10, K11, K12, K13, K14, K15, K16, K17, K18, K19,\ +K20, K21, K22, K23, K24, K25, K26, K27, K28, K29,\ +N30, N31, K32, K33, K34, K35, K36, K37, N38, N39\ +)\ +LAYOUT_ergodox_pretty( \ +KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ +KC_NO, K00, K01, K02, K03, K04, KC_NO, KC_NO, K05, K06, K07, K08, K09, KC_NO, \ +KC_NO, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, \ +KC_NO, K20, K21, K22, K23, K24, KC_NO, KC_NO, K25, K26, K27, K28, K29, KC_NO, \ +KC_NO, KC_NO, KC_NO, KC_NO, K32, K37, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, \ + K33, K34, KC_NO, KC_NO, K35, K36 \ +) + +#include "manna-harbour_miryoku.c" + +#+END_SRC + +To build for any keyboard using the this layout (ergodone, ergodox_ez, +ergodox_infinity, hotdox) e.g. the ergodox_ez, + +#+BEGIN_SRC sh :tangle no +cd ../.. && make ergodox_ez:manna-harbour_miryoku:teensy +#+END_SRC + + + +*** ortho_4x12 + +For the ortho_4x12 layout, the right half as is as follows: The rightmost column +bottom 3 rows is the pinkie column. The middle 4 columns top 3 rows are for the +remaining fingers. The bottom row left 3 columns are the thumb keys. The +remaining keys are unused. + +[[../../layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c][layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c]] +#+BEGIN_SRC C :noweb yes :tangle ../../layouts/community/ortho_4x12/manna-harbour_miryoku/keymap.c + +// <
> + +#define LAYOUT_miryoku(\ +K00, K01, K02, K03, K04, K05, K06, K07, K08, K09,\ +K10, K11, K12, K13, K14, K15, K16, K17, K18, K19,\ +K20, K21, K22, K23, K24, K25, K26, K27, K28, K29,\ +N30, N31, K32, K33, K34, K35, K36, K37, N38, N39\ +)\ +LAYOUT_ortho_4x12(\ +KC_NO, K01, K02, K03, K04, KC_NO, KC_NO, K05, K06, K07, K08, KC_NO,\ +K00, K11, K12, K13, K14, KC_NO, KC_NO, K15, K16, K17, K18, K09,\ +K10, K21, K22, K23, K24, KC_NO, KC_NO, K25, K26, K27, K28, K19,\ +K20, KC_NO, KC_NO, K32, K33, K34, K35, K36, K37, KC_NO, KC_NO, K29\ +) + +#include "manna-harbour_miryoku.c" + +#+END_SRC + +To build for any keyboard using this layout (4x4, nori, chimera_ls, contra, +divergetm2, jj40, lets_split, lets_split_eh, meira, niu_mini, planck, telophase, +vitamins_included, zinc, zlant, ortho48, kbd4x, levinson, wavelet, plaid) +e.g. the levinson, + +#+BEGIN_SRC sh :tangle no +make keebio/levinson:manna-harbour_miryoku:avrdude +#+END_SRC + + +** Keyboards + +To use the keymap on a keyboard which does not support the layouts feature, +LAYOUT_miryoku is defined as a macro mapping onto the keyboard's own LAYOUT +macro, leaving the unused keys as KC_NO. The userspace keymap is then included. + + +*** crkbd + +The outer columns are unused. + +[[../../keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c][keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c]] +#+BEGIN_SRC C :noweb yes :tangle ../../keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c + +// <
> + +#define LAYOUT_miryoku( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \ + N30, N31, K32, K33, K34, K35, K36, K37, N38, N39 \ +) \ +LAYOUT( \ +KC_NO, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, KC_NO, \ +KC_NO, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, \ +KC_NO, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, KC_NO, \ + K32, K33, K34, K35, K36, K37 \ +) + +#include "manna-harbour_miryoku.c" + +#+END_SRC + +To build for this keyboard, + +#+BEGIN_SRC sh :tangle no +cd ../.. && make crkbd:manna-harbour_miryoku:avrdude +#+END_SRC + + +* Related Documentation + +** QMK + +- https://qmk.fm/ +- https://docs.qmk.fm/#/getting_started_introduction +- https://docs.qmk.fm/#/hardware_keyboard_guidelines +- https://docs.qmk.fm/#/config_options +- https://docs.qmk.fm/#/keycodes +- https://docs.qmk.fm/#/feature_advanced_keycodes +- https://docs.qmk.fm/#/feature_layouts +- https://docs.qmk.fm/#/feature_userspace +- https://docs.qmk.fm/#/getting_started_make_guide + + +** Org Mode + +- https://orgmode.org/ +- https://orgmode.org/manual/Tables.html +- https://orgmode.org/manual/Working-with-Source-Code.html diff --git a/users/manna-harbour_miryoku/rules.mk b/users/manna-harbour_miryoku/rules.mk new file mode 100644 index 000000000..baff1431f --- /dev/null +++ b/users/manna-harbour_miryoku/rules.mk @@ -0,0 +1,5 @@ + +# generated from users/manna-harbour_miryoku/miryoku.org + +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) From be2c346edf76a049d9aa4be80ffda125eb04a6ba Mon Sep 17 00:00:00 2001 From: kakunpc <15257475+kakunpc@users.noreply.github.com> Date: Wed, 26 Jun 2019 16:39:14 +0900 Subject: [PATCH 265/341] [Keyboard] Add keyboard "suihankey" (#6184) * new keyboard suihankey * set split keyboard * set default keymap * fix keymap * update default rules.mk * I erased what I didn't need. * Fix default keymap * fix config * add keyboard image url * Update readme.md * update README.md * add info.json * Update keyboards/suihankey/readme.md Co-Authored-By: fauxpark * remove default RGBLIGHT on --- keyboards/suihankey/config.h | 248 ++++++++++++++++++ keyboards/suihankey/info.json | 12 + keyboards/suihankey/keymaps/default/config.h | 19 ++ keyboards/suihankey/keymaps/default/keymap.c | 100 +++++++ keyboards/suihankey/keymaps/default/readme.md | 1 + keyboards/suihankey/readme.md | 18 ++ keyboards/suihankey/rules.mk | 82 ++++++ keyboards/suihankey/suihankey.c | 51 ++++ keyboards/suihankey/suihankey.h | 43 +++ 9 files changed, 574 insertions(+) create mode 100644 keyboards/suihankey/config.h create mode 100644 keyboards/suihankey/info.json create mode 100644 keyboards/suihankey/keymaps/default/config.h create mode 100644 keyboards/suihankey/keymaps/default/keymap.c create mode 100644 keyboards/suihankey/keymaps/default/readme.md create mode 100644 keyboards/suihankey/readme.md create mode 100644 keyboards/suihankey/rules.mk create mode 100644 keyboards/suihankey/suihankey.c create mode 100644 keyboards/suihankey/suihankey.h diff --git a/keyboards/suihankey/config.h b/keyboards/suihankey/config.h new file mode 100644 index 000000000..ed3d971be --- /dev/null +++ b/keyboards/suihankey/config.h @@ -0,0 +1,248 @@ +/* +Copyright 2019 kakunpc + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT Suihankey +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 5 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F4, F5, F6, F7 } +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4 } +#define UNUSED_PINS +#define USE_I2C +#undef USE_SERIAL + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +#define SPLIT_HAND_PIN D2 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 18 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 + +// #define RGBLED_SPLIT {18,18} diff --git a/keyboards/suihankey/info.json b/keyboards/suihankey/info.json new file mode 100644 index 000000000..4580f0540 --- /dev/null +++ b/keyboards/suihankey/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "suihankey", + "url": "https://kakunpc.booth.pm/", + "maintainer": "kakunpc", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"label":"1", "x":0, "y":0}, {"label":"2", "x":1, "y":0}, {"label":"3", "x":2, "y":0}, {"label":"4", "x":3, "y":0}, {"label":"5", "x":4, "y":0}, {"label":"19", "x":7, "y":0}, {"label":"20", "x":8, "y":0}, {"label":"21", "x":9, "y":0}, {"label":"22", "x":10, "y":0}, {"label":"23", "x":11, "y":0}, {"label":"6", "x":0, "y":1}, {"label":"7", "x":1, "y":1}, {"label":"8", "x":2, "y":1}, {"label":"9", "x":3, "y":1}, {"label":"10", "x":4, "y":1}, {"label":"24", "x":7, "y":1}, {"label":"25", "x":8, "y":1}, {"label":"26", "x":9, "y":1}, {"label":"27", "x":10, "y":1}, {"label":"28", "x":11, "y":1}, {"label":"11", "x":0, "y":2}, {"label":"12", "x":1, "y":2}, {"label":"13", "x":2, "y":2}, {"label":"14", "x":3, "y":2}, {"label":"15", "x":4, "y":2}, {"label":"29", "x":7, "y":2}, {"label":"30", "x":8, "y":2}, {"label":"31", "x":9, "y":2}, {"label":"32", "x":10, "y":2}, {"label":"33", "x":11, "y":2}, {"label":"16", "x":2, "y":3}, {"label":"17", "x":3, "y":3}, {"label":"18", "x":4, "y":3}, {"label":"34", "x":7, "y":3}, {"label":"35", "x":8, "y":3}, {"label":"36", "x":9, "y":3}] + } + } +} diff --git a/keyboards/suihankey/keymaps/default/config.h b/keyboards/suihankey/keymaps/default/config.h new file mode 100644 index 000000000..bf1149ebc --- /dev/null +++ b/keyboards/suihankey/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/suihankey/keymaps/default/keymap.c b/keyboards/suihankey/keymaps/default/keymap.c new file mode 100644 index 000000000..a1d182a9d --- /dev/null +++ b/keyboards/suihankey/keymaps/default/keymap.c @@ -0,0 +1,100 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum layers{ + BASE = 0, + COMMAND, + NUMBER, + SETTING +}; + +#define KC_CMD_SP LT(COMMAND,KC_SPC) +#define KC_CMD_ET LT(COMMAND,KC_ENTER) +#define KC_NUM_ALT LT(NUMBER,KC_LALT) +#define KC_NUM_BS LT(NUMBER,KC_BSPC) +#define KC_SET_CTRL LT(SETTING,KC_LCTRL) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT( /* Base */ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, + KC_SET_CTRL, KC_NUM_ALT, KC_CMD_SP, KC_CMD_ET, KC_BSPC, KC_LSFT + ), + [COMMAND] = LAYOUT( /* Base */ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_B), KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + [NUMBER] = LAYOUT( /* Base */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_P7, KC_P8, KC_P9, KC_NO, KC_NO, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_P4, KC_P5, KC_P6, KC_NO, KC_NO, + KC_F11, KC_F12, KC_NO, KC_NO, KC_NO, KC_P1, KC_P2, KC_P3, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_P0, KC_PDOT, KC_NO + ), + [SETTING] = LAYOUT( /* Base */ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} + +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { + oled_write_P(PSTR("Layer: "), false); + switch (biton32(layer_state)) { + case BASE: + oled_write_P(PSTR("Defaultn"), false); + break; + case COMMAND: + oled_write_P(PSTR("COMMANDn"), false); + break; + case NUMBER: + oled_write_P(PSTR("NUMBERn"), false); + break; + case SETTING: + oled_write_P(PSTR("SETTINGn"), false); + break; + default: + // Or use the write_ln shortcut over adding 'n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); + } + + // Host Keyboard LED Status + oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); +} +#endif diff --git a/keyboards/suihankey/keymaps/default/readme.md b/keyboards/suihankey/keymaps/default/readme.md new file mode 100644 index 000000000..95eac805a --- /dev/null +++ b/keyboards/suihankey/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for suihankey \ No newline at end of file diff --git a/keyboards/suihankey/readme.md b/keyboards/suihankey/readme.md new file mode 100644 index 000000000..29d82323d --- /dev/null +++ b/keyboards/suihankey/readme.md @@ -0,0 +1,18 @@ +# suihankey + +![suihankey](https://i.gyazo.com/f798c5967f2ac457dd520ab8ff83b6ac.jpg) + +Compact with only 36 keys is a concept keyboard. +Supports OLED and RGBLED (optional) + + + +Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +Hardware Supported: suihankeyboard_alpha, promicro +Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) + +Make example for this keyboard (after setting up your build environment): + + make suihankey:default + +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). diff --git a/keyboards/suihankey/rules.mk b/keyboards/suihankey/rules.mk new file mode 100644 index 000000000..19e792378 --- /dev/null +++ b/keyboards/suihankey/rules.mk @@ -0,0 +1,82 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +OLED_DRIVER_ENABLE = no +SPLIT_KEYBOARD = yes diff --git a/keyboards/suihankey/suihankey.c b/keyboards/suihankey/suihankey.c new file mode 100644 index 000000000..621e21a7b --- /dev/null +++ b/keyboards/suihankey/suihankey.c @@ -0,0 +1,51 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#include "suihankey.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/suihankey/suihankey.h b/keyboards/suihankey/suihankey.h new file mode 100644 index 000000000..170dbe5cf --- /dev/null +++ b/keyboards/suihankey/suihankey.h @@ -0,0 +1,43 @@ +/* Copyright 2019 kakunpc + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the Leys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + L00, L01, L02, L03, L04, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, R24, R23, R22, R21, R20, \ + L30, L31, L32, R32, R31, R30 \ +) \ +{ \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { L30, L31, L32 }, \ + { R00, R01, R02, R03, R04 }, \ + { R10, R11, R12, R13, R14 }, \ + { R20, R21, R22, R23, R24 }, \ + { R30, R31, R32 }, \ +} From 01fb06af6c7d63a1338dc48d9a62e956ffcc6c3a Mon Sep 17 00:00:00 2001 From: kifinnsson Date: Wed, 26 Jun 2019 01:40:39 -0600 Subject: [PATCH 266/341] [Keymap] kifinnsson's Colemak angle mod ansi-ish layout for the dz60 (#6191) * [Keymap] kifinnsson's dz60 keymap kifinnsson's custom keymap for the dz60 * Update keyboards/dz60/keymaps/kifinnsson/readme.md Co-Authored-By: fauxpark * Fixed readme.mk cleaned up my readme.mk * fixed readme.mk --- keyboards/dz60/keymaps/kifinnsson/keymap.c | 210 ++++++++++++++++++++ keyboards/dz60/keymaps/kifinnsson/readme.md | 5 + keyboards/dz60/keymaps/kifinnsson/rules.mk | 6 + 3 files changed, 221 insertions(+) create mode 100644 keyboards/dz60/keymaps/kifinnsson/keymap.c create mode 100644 keyboards/dz60/keymaps/kifinnsson/readme.md create mode 100644 keyboards/dz60/keymaps/kifinnsson/rules.mk diff --git a/keyboards/dz60/keymaps/kifinnsson/keymap.c b/keyboards/dz60/keymaps/kifinnsson/keymap.c new file mode 100644 index 000000000..7d88b6dbb --- /dev/null +++ b/keyboards/dz60/keymaps/kifinnsson/keymap.c @@ -0,0 +1,210 @@ +#include QMK_KEYBOARD_H + +bool is_lgui_active = false; +uint16_t lgui_timer = 0; + + +//Macro Declarations +enum my_keycodes { + KI_NO = SAFE_RANGE, + KI_1, + KI_2, + KI_3, + KI_4, + KI_5, + KI_6, + KI_7, + KI_8, + KI_9, + KI_10, + KI_11, + KI_12, + KI_ESC, + KI_BKSP, + KI_BSLS, + KI_WLFT, + KI_WRGT, + }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_all( + 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, XXXXXXX, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, + MO(1), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(2), KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, KC_RSFT, XXXXXXX, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), XXXXXXX, MO(3), KC_RCTL), + + LAYOUT_all( + 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, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_UP, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, KC_TAB, KC_LSFT, KC_LCTL, XXXXXXX, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_CAPS, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,, + _______, _______, XXXXXXX, KC_ENT, KC_ENT, KC_ENT, _______, _______, _______, _______, RESET), + + LAYOUT_all( + KI_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, KI_BKSP, + _______, KI_1, KI_2, KI_3, KI_4, KI_5, KI_6, KI_7, KI_8, KI_9, KI_10, KI_11, KI_12, KI_BSLS, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, KI_WLFT, KI_WRGT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, XXXXXXX), + + LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // Keycodes Starting with KI_ are place holders for my personal macros. They are set below. Most are simple SEND_STRINGS(). + case KI_ESC: + if (record->event.pressed) { + SEND_STRING(""); + } else { + + } + return false; // Skip all further processing of this key + case KI_1: + if (record->event.pressed) { + SEND_STRING(""); + } else { + + } + return false; // Skip all further processing of this key + case KI_2: + if (record->event.pressed) { + SEND_STRING(""); + } else { + + } + return false; // Skip all further processing of this key + case KI_3: + if (record->event.pressed) { + SEND_STRING(""); + } else { + + } + return false; // Skip all further processing of this key + case KI_4: + if (record->event.pressed) { + SEND_STRING(""); + } else { + + } + return false; // Skip all further processing of this key + case KI_5: + if (record->event.pressed) { + SEND_STRING(""); + } else { + + } + return false; // Skip all further processing of this key + case KI_6: + if (record->event.pressed) { + SEND_STRING(""); + } else { + + } + return false; // Skip all further processing of this key + case KI_7: + if (record->event.pressed) { + SEND_STRING(""); + } else { + + } + return false; // Skip all further processing of this key + case KI_8: + if (record->event.pressed) { + SEND_STRING(""); + } else { + + } + return false; // Skip all further processing of this key + case KI_9: + if (record->event.pressed) { + SEND_STRING(""); + } else { + + } + return false; // Skip all further processing of this key + case KI_10: + if (record->event.pressed) { + SEND_STRING(""); + } else { + + } + return false; // Skip all further processing of this key + case KI_11: + if (record->event.pressed) { + SEND_STRING(""); + } else { + + } + return false; // Skip all further processing of this key + case KI_12: + if (record->event.pressed) { + SEND_STRING(""); + } else { + + } + return false; // Skip all further processing of this key + case KI_BKSP: + if (record->event.pressed) { + SEND_STRING(""); + } else { + + } + return false; // Skip all further processing of this key + case KI_BSLS: + if (record->event.pressed) { + SEND_STRING(""); + } else { + + } + return false; // Skip all further processing of this key + + //Windows Win+Left tap to move window without resetting KC_LGUI + //Additional code is in matrix_scan_user() + case KI_WLFT: + if (record->event.pressed) { + if (!is_lgui_active) { + is_lgui_active = true; + register_code(KC_LGUI); + } + lgui_timer = timer_read(); + tap_code(KC_LEFT); + } else { + + } + return false; // Skip all further processing of this key + //Windows Win+Right tap to move window without resetting KC_LGUI + //Additional code is in matrix_scan_user() + case KI_WRGT: + if (record->event.pressed) { + if (!is_lgui_active) { + is_lgui_active = true; + register_code(KC_LGUI); + } + lgui_timer = timer_read(); + tap_code(KC_RIGHT); + } else { + + } + return false; // Skip all further processing of this key + default: + return true; // Process all other keycodes normally + } +} + +//Check if KC_LGUI is active in KI_WLFT and KI_WRGT +void matrix_scan_user(void) { + if (is_lgui_active) { + if (timer_elapsed(lgui_timer) > 1000) { + unregister_code(KC_LGUI); + is_lgui_active = false; + } + } +} \ No newline at end of file diff --git a/keyboards/dz60/keymaps/kifinnsson/readme.md b/keyboards/dz60/keymaps/kifinnsson/readme.md new file mode 100644 index 000000000..49f559503 --- /dev/null +++ b/keyboards/dz60/keymaps/kifinnsson/readme.md @@ -0,0 +1,5 @@ +# kifinnsson's Colemak angle mod ansi-ish layout +----------------- + +Keymap for my non-standard DZ60 layout. It is an ansi layout on the right and iso on the left (ie 1.25x left shift). This is to implement the angle mod on for Colemak which is the base layer. A side effect of this is that I have an extra key on row 4, which sits between the "b" and "k" keys in Colemak. I use this key as a switch to layer 2 which is my macro layer. + diff --git a/keyboards/dz60/keymaps/kifinnsson/rules.mk b/keyboards/dz60/keymaps/kifinnsson/rules.mk new file mode 100644 index 000000000..5fb201c88 --- /dev/null +++ b/keyboards/dz60/keymaps/kifinnsson/rules.mk @@ -0,0 +1,6 @@ +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) \ No newline at end of file From 2a56b61a28dde9e8ab0a9afcd22f913f988b2a0e Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 26 Jun 2019 18:52:09 +0100 Subject: [PATCH 267/341] [Keyboard] Refactor of onekey to support multiple development boards (#6017) * Initial refactor of onekey to support multiple development boards * Fixes to get teensy lc && 3.2 working * Add pin tables * Add caveats to Teensy boards * Correct bootloader for Elite-C --- .../boards/GENERIC_STM32_F103/board.c | 56 ++ .../boards/GENERIC_STM32_F103/board.h | 166 ++++++ .../boards/GENERIC_STM32_F103/board.mk | 5 + .../onekey/bluepill/bootloader_defs.h | 10 + keyboards/handwired/onekey/bluepill/chconf.h | 524 ++++++++++++++++++ keyboards/handwired/onekey/bluepill/config.h | 23 + keyboards/handwired/onekey/bluepill/halconf.h | 353 ++++++++++++ .../ld/STM32F103x8_stm32duino_bootloader.ld | 88 +++ keyboards/handwired/onekey/bluepill/mcuconf.h | 209 +++++++ keyboards/handwired/onekey/bluepill/readme.md | 3 + keyboards/handwired/onekey/bluepill/rules.mk | 37 ++ keyboards/handwired/onekey/config.h | 13 +- keyboards/handwired/onekey/elite_c/config.h | 23 + keyboards/handwired/onekey/elite_c/readme.md | 3 + keyboards/handwired/onekey/elite_c/rules.mk | 58 ++ keyboards/handwired/onekey/onekey.h | 21 +- keyboards/handwired/onekey/promicro/config.h | 23 + keyboards/handwired/onekey/promicro/readme.md | 3 + keyboards/handwired/onekey/promicro/rules.mk | 58 ++ keyboards/handwired/onekey/proton_c/config.h | 23 + keyboards/handwired/onekey/proton_c/readme.md | 3 + keyboards/handwired/onekey/proton_c/rules.mk | 2 + keyboards/handwired/onekey/readme.md | 6 +- keyboards/handwired/onekey/rules.mk | 79 +-- keyboards/handwired/onekey/teensy_2/config.h | 23 + keyboards/handwired/onekey/teensy_2/readme.md | 3 + keyboards/handwired/onekey/teensy_2/rules.mk | 58 ++ .../handwired/onekey/teensy_2pp/config.h | 23 + .../handwired/onekey/teensy_2pp/readme.md | 3 + .../handwired/onekey/teensy_2pp/rules.mk | 58 ++ keyboards/handwired/onekey/teensy_32/chconf.h | 524 ++++++++++++++++++ keyboards/handwired/onekey/teensy_32/config.h | 24 + .../handwired/onekey/teensy_32/halconf.h | 354 ++++++++++++ .../onekey/teensy_32/ld/MK20DX256.ld | 101 ++++ .../handwired/onekey/teensy_32/mcuconf.h | 45 ++ .../handwired/onekey/teensy_32/readme.md | 40 ++ keyboards/handwired/onekey/teensy_32/rules.mk | 41 ++ keyboards/handwired/onekey/teensy_lc/chconf.h | 524 ++++++++++++++++++ keyboards/handwired/onekey/teensy_lc/config.h | 24 + .../handwired/onekey/teensy_lc/halconf.h | 354 ++++++++++++ .../handwired/onekey/teensy_lc/ld/MKL26Z64.ld | 105 ++++ .../handwired/onekey/teensy_lc/mcuconf.h | 45 ++ .../handwired/onekey/teensy_lc/readme.md | 40 ++ keyboards/handwired/onekey/teensy_lc/rules.mk | 41 ++ 44 files changed, 4142 insertions(+), 77 deletions(-) create mode 100644 keyboards/handwired/onekey/bluepill/boards/GENERIC_STM32_F103/board.c create mode 100644 keyboards/handwired/onekey/bluepill/boards/GENERIC_STM32_F103/board.h create mode 100644 keyboards/handwired/onekey/bluepill/boards/GENERIC_STM32_F103/board.mk create mode 100644 keyboards/handwired/onekey/bluepill/bootloader_defs.h create mode 100644 keyboards/handwired/onekey/bluepill/chconf.h create mode 100644 keyboards/handwired/onekey/bluepill/config.h create mode 100644 keyboards/handwired/onekey/bluepill/halconf.h create mode 100644 keyboards/handwired/onekey/bluepill/ld/STM32F103x8_stm32duino_bootloader.ld create mode 100644 keyboards/handwired/onekey/bluepill/mcuconf.h create mode 100644 keyboards/handwired/onekey/bluepill/readme.md create mode 100644 keyboards/handwired/onekey/bluepill/rules.mk create mode 100644 keyboards/handwired/onekey/elite_c/config.h create mode 100644 keyboards/handwired/onekey/elite_c/readme.md create mode 100644 keyboards/handwired/onekey/elite_c/rules.mk create mode 100644 keyboards/handwired/onekey/promicro/config.h create mode 100644 keyboards/handwired/onekey/promicro/readme.md create mode 100644 keyboards/handwired/onekey/promicro/rules.mk create mode 100644 keyboards/handwired/onekey/proton_c/config.h create mode 100644 keyboards/handwired/onekey/proton_c/readme.md create mode 100644 keyboards/handwired/onekey/proton_c/rules.mk create mode 100644 keyboards/handwired/onekey/teensy_2/config.h create mode 100644 keyboards/handwired/onekey/teensy_2/readme.md create mode 100644 keyboards/handwired/onekey/teensy_2/rules.mk create mode 100644 keyboards/handwired/onekey/teensy_2pp/config.h create mode 100644 keyboards/handwired/onekey/teensy_2pp/readme.md create mode 100644 keyboards/handwired/onekey/teensy_2pp/rules.mk create mode 100644 keyboards/handwired/onekey/teensy_32/chconf.h create mode 100644 keyboards/handwired/onekey/teensy_32/config.h create mode 100644 keyboards/handwired/onekey/teensy_32/halconf.h create mode 100644 keyboards/handwired/onekey/teensy_32/ld/MK20DX256.ld create mode 100644 keyboards/handwired/onekey/teensy_32/mcuconf.h create mode 100644 keyboards/handwired/onekey/teensy_32/readme.md create mode 100644 keyboards/handwired/onekey/teensy_32/rules.mk create mode 100644 keyboards/handwired/onekey/teensy_lc/chconf.h create mode 100644 keyboards/handwired/onekey/teensy_lc/config.h create mode 100644 keyboards/handwired/onekey/teensy_lc/halconf.h create mode 100644 keyboards/handwired/onekey/teensy_lc/ld/MKL26Z64.ld create mode 100644 keyboards/handwired/onekey/teensy_lc/mcuconf.h create mode 100644 keyboards/handwired/onekey/teensy_lc/readme.md create mode 100644 keyboards/handwired/onekey/teensy_lc/rules.mk diff --git a/keyboards/handwired/onekey/bluepill/boards/GENERIC_STM32_F103/board.c b/keyboards/handwired/onekey/bluepill/boards/GENERIC_STM32_F103/board.c new file mode 100644 index 000000000..8c5a87f35 --- /dev/null +++ b/keyboards/handwired/onekey/bluepill/boards/GENERIC_STM32_F103/board.c @@ -0,0 +1,56 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include "hal.h" + +// Value to place in RTC backup register 10 for persistent bootloader mode +#define RTC_BOOTLOADER_FLAG 0x424C + +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +#if HAL_USE_PAL || defined(__DOXYGEN__) +const PALConfig pal_default_config = +{ + {VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH}, + {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH}, + {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH}, + {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH}, + {VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH}, +}; +#endif + +/* + * Early initialization code. + * This initialization must be performed just after stack setup and before + * any other initialization. + */ +void __early_init(void) { + + stm32_clock_init(); +} + +/* + * Board-specific initialization code. + */ +void boardInit(void) { + //JTAG-DP Disabled and SW-DP Enabled + AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE; + //Set backup register DR10 to enter bootloader on reset + BKP->DR10 = RTC_BOOTLOADER_FLAG; +} diff --git a/keyboards/handwired/onekey/bluepill/boards/GENERIC_STM32_F103/board.h b/keyboards/handwired/onekey/bluepill/boards/GENERIC_STM32_F103/board.h new file mode 100644 index 000000000..9427adabf --- /dev/null +++ b/keyboards/handwired/onekey/bluepill/boards/GENERIC_STM32_F103/board.h @@ -0,0 +1,166 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _BOARD_H_ +#define _BOARD_H_ + +/* + * Setup for a Generic STM32F103 board. + */ + +/* + * Board identifier. + */ +#define BOARD_GENERIC_STM32_F103 +#define BOARD_NAME "Generic STM32F103x board" + +/* + * Board frequencies. + */ +#define STM32_LSECLK 32768 +#define STM32_HSECLK 8000000 + +/* + * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h. + */ +#define STM32F103xB + +/* + * IO pins assignments + */ + +/* on-board */ + +#define GPIOA_LED 8 +#define GPIOD_OSC_IN 0 +#define GPIOD_OSC_OUT 1 + +/* In case your board has a "USB enable" hardware + controlled by a pin, define it here. (It could be just + a 1.5k resistor connected to D+ line.) +*/ +/* +#define GPIOB_USB_DISC 10 +*/ + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * + * The digits have the following meaning: + * 0 - Analog input. + * 1 - Push Pull output 10MHz. + * 2 - Push Pull output 2MHz. + * 3 - Push Pull output 50MHz. + * 4 - Digital input. + * 5 - Open Drain output 10MHz. + * 6 - Open Drain output 2MHz. + * 7 - Open Drain output 50MHz. + * 8 - Digital input with PullUp or PullDown resistor depending on ODR. + * 9 - Alternate Push Pull output 10MHz. + * A - Alternate Push Pull output 2MHz. + * B - Alternate Push Pull output 50MHz. + * C - Reserved. + * D - Alternate Open Drain output 10MHz. + * E - Alternate Open Drain output 2MHz. + * F - Alternate Open Drain output 50MHz. + * Please refer to the STM32 Reference Manual for details. + */ + +/* + * Port A setup. + * Everything input with pull-up except: + * PA2 - Alternate output (USART2 TX). + * PA3 - Normal input (USART2 RX). + * PA9 - Alternate output (USART1 TX). + * PA10 - Normal input (USART1 RX). + */ +#define VAL_GPIOACRL 0x88884B88 /* PA7...PA0 */ +#define VAL_GPIOACRH 0x888884B8 /* PA15...PA8 */ +#define VAL_GPIOAODR 0xFFFFFFFF + +/* + * Port B setup. + * Everything input with pull-up except: + * PB10 - Push Pull output (USB switch). + */ +#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */ +#define VAL_GPIOBCRH 0x88888388 /* PB15...PB8 */ +#define VAL_GPIOBODR 0xFFFFFFFF + +/* + * Port C setup. + * Everything input with pull-up except: + * PC13 - Push Pull output (LED). + */ +#define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */ +#define VAL_GPIOCCRH 0x88388888 /* PC15...PC8 */ +#define VAL_GPIOCODR 0xFFFFFFFF + +/* + * Port D setup. + * Everything input with pull-up except: + * PD0 - Normal input (XTAL). + * PD1 - Normal input (XTAL). + */ +#define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */ +#define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */ +#define VAL_GPIODODR 0xFFFFFFFF + +/* + * Port E setup. + * Everything input with pull-up except: + */ +#define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */ +#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */ +#define VAL_GPIOEODR 0xFFFFFFFF + +/* + * USB bus activation macro, required by the USB driver. + */ +/* The point is that most of the generic STM32F103* boards + have a 1.5k resistor connected on one end to the D+ line + and on the other end to some pin. Or even a slightly more + complicated "USB enable" circuit, controlled by a pin. + That should go here. + + However on some boards (e.g. one that I have), there's no + such hardware. In which case it's better to not do anything. +*/ +/* +#define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC) +*/ +#define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT); + +/* + * USB bus de-activation macro, required by the USB driver. + */ +/* +#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC) +*/ +#define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12); + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* _BOARD_H_ */ diff --git a/keyboards/handwired/onekey/bluepill/boards/GENERIC_STM32_F103/board.mk b/keyboards/handwired/onekey/bluepill/boards/GENERIC_STM32_F103/board.mk new file mode 100644 index 000000000..6b8b312fd --- /dev/null +++ b/keyboards/handwired/onekey/bluepill/boards/GENERIC_STM32_F103/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F103/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F103 diff --git a/keyboards/handwired/onekey/bluepill/bootloader_defs.h b/keyboards/handwired/onekey/bluepill/bootloader_defs.h new file mode 100644 index 000000000..6b8fa9f72 --- /dev/null +++ b/keyboards/handwired/onekey/bluepill/bootloader_defs.h @@ -0,0 +1,10 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here (page 175): + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ + +// STM32F103* does NOT have an USB bootloader in ROM (only serial), +// so setting anything here does not make much sense +#define STM32_BOOTLOADER_ADDRESS 0x80000000 diff --git a/keyboards/handwired/onekey/bluepill/chconf.h b/keyboards/handwired/onekey/bluepill/chconf.h new file mode 100644 index 000000000..bbd9b2da6 --- /dev/null +++ b/keyboards/handwired/onekey/bluepill/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 100000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 0 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE TRUE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP TRUE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS FALSE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/handwired/onekey/bluepill/config.h b/keyboards/handwired/onekey/bluepill/config.h new file mode 100644 index 000000000..3d88ee00e --- /dev/null +++ b/keyboards/handwired/onekey/bluepill/config.h @@ -0,0 +1,23 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +#define MATRIX_COL_PINS { B0 } +#define MATRIX_ROW_PINS { A7 } +#define UNUSED_PINS diff --git a/keyboards/handwired/onekey/bluepill/halconf.h b/keyboards/handwired/onekey/bluepill/halconf.h new file mode 100644 index 000000000..72879a575 --- /dev/null +++ b/keyboards/handwired/onekey/bluepill/halconf.h @@ -0,0 +1,353 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/handwired/onekey/bluepill/ld/STM32F103x8_stm32duino_bootloader.ld b/keyboards/handwired/onekey/bluepill/ld/STM32F103x8_stm32duino_bootloader.ld new file mode 100644 index 000000000..d0688ef60 --- /dev/null +++ b/keyboards/handwired/onekey/bluepill/ld/STM32F103x8_stm32duino_bootloader.ld @@ -0,0 +1,88 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * ST32F103xB memory setup for use with the maplemini bootloader. + * You will have to + * #define CORTEX_VTOR_INIT 0x5000 + * in your projects chconf.h + */ +MEMORY +{ + flash0 : org = 0x08002000, len = 64k - 0x2000 + flash1 : org = 0x00000000, len = 0 + flash2 : org = 0x00000000, len = 0 + flash3 : org = 0x00000000, len = 0 + flash4 : org = 0x00000000, len = 0 + flash5 : org = 0x00000000, len = 0 + flash6 : org = 0x00000000, len = 0 + flash7 : org = 0x00000000, len = 0 + ram0 : org = 0x20000000, len = 20k + ram1 : org = 0x00000000, len = 0 + ram2 : org = 0x00000000, len = 0 + ram3 : org = 0x00000000, len = 0 + ram4 : org = 0x00000000, len = 0 + ram5 : org = 0x00000000, len = 0 + ram6 : org = 0x00000000, len = 0 + ram7 : org = 0x00000000, len = 0 +} + +/* For each data/text section two region are defined, a virtual region + and a load region (_LMA suffix).*/ + +/* Flash region to be used for exception vectors.*/ +REGION_ALIAS("VECTORS_FLASH", flash0); +REGION_ALIAS("VECTORS_FLASH_LMA", flash0); + +/* Flash region to be used for constructors and destructors.*/ +REGION_ALIAS("XTORS_FLASH", flash0); +REGION_ALIAS("XTORS_FLASH_LMA", flash0); + +/* Flash region to be used for code text.*/ +REGION_ALIAS("TEXT_FLASH", flash0); +REGION_ALIAS("TEXT_FLASH_LMA", flash0); + +/* Flash region to be used for read only data.*/ +REGION_ALIAS("RODATA_FLASH", flash0); +REGION_ALIAS("RODATA_FLASH_LMA", flash0); + +/* Flash region to be used for various.*/ +REGION_ALIAS("VARIOUS_FLASH", flash0); +REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); + +/* Flash region to be used for RAM(n) initialization data.*/ +REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); + +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts.*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); + +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); + +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); +REGION_ALIAS("DATA_RAM_LMA", flash0); + +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); + +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); + +/* Generic rules inclusion.*/ +INCLUDE rules.ld diff --git a/keyboards/handwired/onekey/bluepill/mcuconf.h b/keyboards/handwired/onekey/bluepill/mcuconf.h new file mode 100644 index 000000000..fced27289 --- /dev/null +++ b/keyboards/handwired/onekey/bluepill/mcuconf.h @@ -0,0 +1,209 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +#define STM32F103_MCUCONF + +/* + * STM32F103 drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED FALSE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_USB_CLOCK_REQUIRED TRUE +#define STM32_USBPRE STM32_USBPRE_DIV1P5 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_RTCSEL STM32_RTCSEL_HSEDIV +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC1_IRQ_PRIORITY 6 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM8 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 TRUE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 7 +#define STM32_PWM_TIM2_IRQ_PRIORITY 7 +#define STM32_PWM_TIM3_IRQ_PRIORITY 7 +#define STM32_PWM_TIM4_IRQ_PRIORITY 7 +#define STM32_PWM_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM8_IRQ_PRIORITY 7 + +/* + * RTC driver system settings. + */ +#define STM32_RTC_IRQ_PRIORITY 15 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USE_USART3 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_HP_IRQ_PRIORITY 13 +#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/handwired/onekey/bluepill/readme.md b/keyboards/handwired/onekey/bluepill/readme.md new file mode 100644 index 000000000..0bf1f5701 --- /dev/null +++ b/keyboards/handwired/onekey/bluepill/readme.md @@ -0,0 +1,3 @@ +# bluepill onekey + +To trigger keypress, short together pins *B0* and *A7*. diff --git a/keyboards/handwired/onekey/bluepill/rules.mk b/keyboards/handwired/onekey/bluepill/rules.mk new file mode 100644 index 000000000..46274066d --- /dev/null +++ b/keyboards/handwired/onekey/bluepill/rules.mk @@ -0,0 +1,37 @@ +# GENERIC STM32F103C8T6 board - stm32duino bootloader +OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 +MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader +BOARD = GENERIC_STM32_F103 + +# OPT_DEFS = +# MCU_LDSCRIPT = STM32F103x8 +# BOARD = GENERIC_STM32_F103 + +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F1xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f1xx +# it should exist either in /os/hal/boards/ +# or /boards +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m3 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# /tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 diff --git a/keyboards/handwired/onekey/config.h b/keyboards/handwired/onekey/config.h index 4a3042eea..6f7ec1289 100644 --- a/keyboards/handwired/onekey/config.h +++ b/keyboards/handwired/onekey/config.h @@ -15,14 +15,11 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" +#pragma once /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6464 +#define PRODUCT_ID 0x6465 #define DEVICE_VER 0x0001 #define MANUFACTURER none #define PRODUCT onekey @@ -32,10 +29,6 @@ along with this program. If not, see . #define MATRIX_ROWS 1 #define MATRIX_COLS 1 -#define MATRIX_COL_PINS { B0 } -#define MATRIX_ROW_PINS { D0 } -#define UNUSED_PINS - /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST @@ -64,5 +57,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/onekey/elite_c/config.h b/keyboards/handwired/onekey/elite_c/config.h new file mode 100644 index 000000000..fbcd630d7 --- /dev/null +++ b/keyboards/handwired/onekey/elite_c/config.h @@ -0,0 +1,23 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +#define MATRIX_COL_PINS { F4 } +#define MATRIX_ROW_PINS { F5 } +#define UNUSED_PINS diff --git a/keyboards/handwired/onekey/elite_c/readme.md b/keyboards/handwired/onekey/elite_c/readme.md new file mode 100644 index 000000000..28a0885bb --- /dev/null +++ b/keyboards/handwired/onekey/elite_c/readme.md @@ -0,0 +1,3 @@ +# Elite-C onekey + +To trigger keypress, short together pins *F4* and *F5* (marked on the PCB as *A3* and *A2*). diff --git a/keyboards/handwired/onekey/elite_c/rules.mk b/keyboards/handwired/onekey/elite_c/rules.mk new file mode 100644 index 000000000..eb7c44395 --- /dev/null +++ b/keyboards/handwired/onekey/elite_c/rules.mk @@ -0,0 +1,58 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 diff --git a/keyboards/handwired/onekey/onekey.h b/keyboards/handwired/onekey/onekey.h index 8ce6fec2d..2924ff3ff 100644 --- a/keyboards/handwired/onekey/onekey.h +++ b/keyboards/handwired/onekey/onekey.h @@ -1,5 +1,20 @@ -#ifndef ONEKEY_H -#define ONEKEY_H +/* Copyright 2019 + * + * 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 . + */ + +#pragma once #include "quantum.h" @@ -8,5 +23,3 @@ ) { \ { k00 } \ } - -#endif diff --git a/keyboards/handwired/onekey/promicro/config.h b/keyboards/handwired/onekey/promicro/config.h new file mode 100644 index 000000000..fbcd630d7 --- /dev/null +++ b/keyboards/handwired/onekey/promicro/config.h @@ -0,0 +1,23 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +#define MATRIX_COL_PINS { F4 } +#define MATRIX_ROW_PINS { F5 } +#define UNUSED_PINS diff --git a/keyboards/handwired/onekey/promicro/readme.md b/keyboards/handwired/onekey/promicro/readme.md new file mode 100644 index 000000000..260eab83d --- /dev/null +++ b/keyboards/handwired/onekey/promicro/readme.md @@ -0,0 +1,3 @@ +# Pro Micro onekey + +To trigger keypress, short together pins *F4* and *F5* (marked on the PCB as *A3* and *A2*). diff --git a/keyboards/handwired/onekey/promicro/rules.mk b/keyboards/handwired/onekey/promicro/rules.mk new file mode 100644 index 000000000..dc6f19623 --- /dev/null +++ b/keyboards/handwired/onekey/promicro/rules.mk @@ -0,0 +1,58 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 diff --git a/keyboards/handwired/onekey/proton_c/config.h b/keyboards/handwired/onekey/proton_c/config.h new file mode 100644 index 000000000..f6bedcfe6 --- /dev/null +++ b/keyboards/handwired/onekey/proton_c/config.h @@ -0,0 +1,23 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +#define MATRIX_COL_PINS { A3 } +#define MATRIX_ROW_PINS { A2 } +#define UNUSED_PINS diff --git a/keyboards/handwired/onekey/proton_c/readme.md b/keyboards/handwired/onekey/proton_c/readme.md new file mode 100644 index 000000000..0feedbbd4 --- /dev/null +++ b/keyboards/handwired/onekey/proton_c/readme.md @@ -0,0 +1,3 @@ +# Proton C onekey + +To trigger keypress, short together pins *A3* and *A2*. diff --git a/keyboards/handwired/onekey/proton_c/rules.mk b/keyboards/handwired/onekey/proton_c/rules.mk new file mode 100644 index 000000000..b17a3d031 --- /dev/null +++ b/keyboards/handwired/onekey/proton_c/rules.mk @@ -0,0 +1,2 @@ +# MCU name +MCU = STM32F303 diff --git a/keyboards/handwired/onekey/readme.md b/keyboards/handwired/onekey/readme.md index eab3b75a9..0e9d6a538 100644 --- a/keyboards/handwired/onekey/readme.md +++ b/keyboards/handwired/onekey/readme.md @@ -2,11 +2,11 @@ Custom handwired one key keyboard. -Keyboard Maintainer: -Hardware Supported: Custom handwired one key +Keyboard Maintainer: QMK Community +Hardware Supported: bluepill, Elite-C, Pro Micro, Proton C, Teensy 2.0, Teensy++ 2.0, Teensy LC, Teensy 3.2 Hardware Availability: -Switch must be connected to pins B0 and D0. +**See each individual board for pin infomation** Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/handwired/onekey/rules.mk b/keyboards/handwired/onekey/rules.mk index cfa693a73..245f9025d 100644 --- a/keyboards/handwired/onekey/rules.mk +++ b/keyboards/handwired/onekey/rules.mk @@ -1,61 +1,22 @@ - - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options -# comment out to disable the options. +# change yes to no to disable # -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 = yes # Commands for debug and configuration -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA \ No newline at end of file +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 = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = yes # 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 on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +DEFAULT_FOLDER = handwired/onekey/promicro diff --git a/keyboards/handwired/onekey/teensy_2/config.h b/keyboards/handwired/onekey/teensy_2/config.h new file mode 100644 index 000000000..fbcd630d7 --- /dev/null +++ b/keyboards/handwired/onekey/teensy_2/config.h @@ -0,0 +1,23 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +#define MATRIX_COL_PINS { F4 } +#define MATRIX_ROW_PINS { F5 } +#define UNUSED_PINS diff --git a/keyboards/handwired/onekey/teensy_2/readme.md b/keyboards/handwired/onekey/teensy_2/readme.md new file mode 100644 index 000000000..86a3114e5 --- /dev/null +++ b/keyboards/handwired/onekey/teensy_2/readme.md @@ -0,0 +1,3 @@ +# Teensy 2.0 onekey + +To trigger keypress, short together pins *F4* and *F5* diff --git a/keyboards/handwired/onekey/teensy_2/rules.mk b/keyboards/handwired/onekey/teensy_2/rules.mk new file mode 100644 index 000000000..3fb7c7e5a --- /dev/null +++ b/keyboards/handwired/onekey/teensy_2/rules.mk @@ -0,0 +1,58 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = halfkay + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 diff --git a/keyboards/handwired/onekey/teensy_2pp/config.h b/keyboards/handwired/onekey/teensy_2pp/config.h new file mode 100644 index 000000000..9d993980c --- /dev/null +++ b/keyboards/handwired/onekey/teensy_2pp/config.h @@ -0,0 +1,23 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +#define MATRIX_COL_PINS { B2 } +#define MATRIX_ROW_PINS { B1 } +#define UNUSED_PINS diff --git a/keyboards/handwired/onekey/teensy_2pp/readme.md b/keyboards/handwired/onekey/teensy_2pp/readme.md new file mode 100644 index 000000000..9cb99e118 --- /dev/null +++ b/keyboards/handwired/onekey/teensy_2pp/readme.md @@ -0,0 +1,3 @@ +# Teensy++ 2.0 onekey + +To trigger keypress, short together pins *B2* and *B1* diff --git a/keyboards/handwired/onekey/teensy_2pp/rules.mk b/keyboards/handwired/onekey/teensy_2pp/rules.mk new file mode 100644 index 000000000..e318e4b9e --- /dev/null +++ b/keyboards/handwired/onekey/teensy_2pp/rules.mk @@ -0,0 +1,58 @@ +# MCU name +MCU = at90usb1286 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = halfkay + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 diff --git a/keyboards/handwired/onekey/teensy_32/chconf.h b/keyboards/handwired/onekey/teensy_32/chconf.h new file mode 100644 index 000000000..3294ac7ee --- /dev/null +++ b/keyboards/handwired/onekey/teensy_32/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 1000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 0 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 20 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE TRUE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP TRUE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS TRUE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK TRUE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS TRUE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS TRUE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK TRUE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS TRUE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/handwired/onekey/teensy_32/config.h b/keyboards/handwired/onekey/teensy_32/config.h new file mode 100644 index 000000000..0d82a0578 --- /dev/null +++ b/keyboards/handwired/onekey/teensy_32/config.h @@ -0,0 +1,24 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once + +// TODO: including this causes "error: expected identifier before '(' token" errors +//#include "config_common.h" + +#define MATRIX_COL_PINS { D5 } +#define MATRIX_ROW_PINS { B2 } +#define UNUSED_PINS diff --git a/keyboards/handwired/onekey/teensy_32/halconf.h b/keyboards/handwired/onekey/teensy_32/halconf.h new file mode 100644 index 000000000..1b6f2adc2 --- /dev/null +++ b/keyboards/handwired/onekey/teensy_32/halconf.h @@ -0,0 +1,354 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ + diff --git a/keyboards/handwired/onekey/teensy_32/ld/MK20DX256.ld b/keyboards/handwired/onekey/teensy_32/ld/MK20DX256.ld new file mode 100644 index 000000000..66bc6b81e --- /dev/null +++ b/keyboards/handwired/onekey/teensy_32/ld/MK20DX256.ld @@ -0,0 +1,101 @@ +/* + * Copyright (C) 2013-2016 Fabio Utzig, http://fabioutzig.com + * (C) 2016 flabbergast + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* + * MK20DX256 memory setup. + */ +MEMORY +{ + flash0 : org = 0x00000000, len = 0x400 + flash1 : org = 0x00000400, len = 0x10 + flash2 : org = 0x00000410, len = 256k - 0x410 + flash3 : org = 0x00000000, len = 0 + flash4 : org = 0x00000000, len = 0 + flash5 : org = 0x00000000, len = 0 + flash6 : org = 0x00000000, len = 0 + flash7 : org = 0x00000000, len = 0 + ram0 : org = 0x1FFF8000, len = 64k + ram1 : org = 0x00000000, len = 0 + ram2 : org = 0x00000000, len = 0 + ram3 : org = 0x00000000, len = 0 + ram4 : org = 0x00000000, len = 0 + ram5 : org = 0x00000000, len = 0 + ram6 : org = 0x00000000, len = 0 + ram7 : org = 0x00000000, len = 0 +} + +/* Flash region for the configuration bytes.*/ +SECTIONS +{ + .cfmprotect : ALIGN(4) SUBALIGN(4) + { + KEEP(*(.cfmconfig)) + } > flash1 +} + +/* For each data/text section two region are defined, a virtual region + and a load region (_LMA suffix).*/ + +/* Flash region to be used for exception vectors.*/ +REGION_ALIAS("VECTORS_FLASH", flash0); +REGION_ALIAS("VECTORS_FLASH_LMA", flash0); + +/* Flash region to be used for constructors and destructors.*/ +REGION_ALIAS("XTORS_FLASH", flash2); +REGION_ALIAS("XTORS_FLASH_LMA", flash2); + +/* Flash region to be used for code text.*/ +REGION_ALIAS("TEXT_FLASH", flash2); +REGION_ALIAS("TEXT_FLASH_LMA", flash2); + +/* Flash region to be used for read only data.*/ +REGION_ALIAS("RODATA_FLASH", flash2); +REGION_ALIAS("RODATA_FLASH_LMA", flash2); + +/* Flash region to be used for various.*/ +REGION_ALIAS("VARIOUS_FLASH", flash2); +REGION_ALIAS("VARIOUS_FLASH_LMA", flash2); + +/* Flash region to be used for RAM(n) initialization data.*/ +REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2); + +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts.*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); + +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); + +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); +REGION_ALIAS("DATA_RAM_LMA", flash2); + +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); + +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); + +/* Generic rules inclusion.*/ +INCLUDE rules.ld diff --git a/keyboards/handwired/onekey/teensy_32/mcuconf.h b/keyboards/handwired/onekey/teensy_32/mcuconf.h new file mode 100644 index 000000000..13a9e3333 --- /dev/null +++ b/keyboards/handwired/onekey/teensy_32/mcuconf.h @@ -0,0 +1,45 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +#define K20x_MCUCONF + +/* + * HAL driver system settings. + */ +/* PEE mode - 48MHz system clock driven by (16 MHz) external crystal. */ +#define KINETIS_MCG_MODE KINETIS_MCG_MODE_PEE +#define KINETIS_PLLCLK_FREQUENCY 96000000UL +#define KINETIS_SYSCLK_FREQUENCY 48000000UL + +/* + * SERIAL driver system settings. + */ +#define KINETIS_SERIAL_USE_UART0 TRUE + +/* + * USB driver settings + */ +#define KINETIS_USB_USE_USB0 TRUE + +/* Need to redefine this, since the default (configured for K20x) might not apply + * 2 for Teensy LC + * 5 for Teensy 3.x */ +#define KINETIS_USB_USB0_IRQ_PRIORITY 5 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/handwired/onekey/teensy_32/readme.md b/keyboards/handwired/onekey/teensy_32/readme.md new file mode 100644 index 000000000..216aecfaf --- /dev/null +++ b/keyboards/handwired/onekey/teensy_32/readme.md @@ -0,0 +1,40 @@ +# Teensy 3.2 onekey + +To trigger keypress, short together pins *D5* and *B2* (marked on the PCB as *20* and *19*). + +## Hardware + +### Pins +When setting matrix pins, you need to use the MCU definitions instead of what is printed on the PCB. Sourced from . The following table can be used to convert between the two. + +| PCB | MCU | Notes | +|------- |-----|-----------------------------| +| 0 | B16 | | +| 1 | B17 | | +| 2 | D0 | | +| 3 | A12 | | +| 4 | A13 | | +| 5 | D7 | | +| 6 | D4 | | +| 7 | D2 | | +| 8 | D3 | | +| 9 | C3 | | +| 10 | C4 | | +| 11 | C6 | | +| 12 | C7 | | +| 13/LED | C5 | | +| 14/A0 | D1 | | +| 15/A1 | C0 | | +| 16/A2 | B0 | | +| 17/A3 | B1 | | +| 18/A4 | B3 | | +| 19/A5 | B2 | | +| 20/A6 | D5 | | +| 21/A7 | D6 | | +| 22/A8 | C1 | | +| 23/A9 | C2 | | +| 24/A10 | | ADC0_DP0 in schematic *[1]* | +| 25/A11 | | ADC0_DM0 in schematic *[1]* | +| 26/A12 | | ADC0_DP3 in schematic *[1]* | + +*[1]* - Currently not configured and may require extra work to implement. diff --git a/keyboards/handwired/onekey/teensy_32/rules.mk b/keyboards/handwired/onekey/teensy_32/rules.mk new file mode 100644 index 000000000..97171611e --- /dev/null +++ b/keyboards/handwired/onekey/teensy_32/rules.mk @@ -0,0 +1,41 @@ +## chip/board settings +# - the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +# - For Teensies, FAMILY = KINETIS and SERIES is either +# KL2x (LC) or K20x (3.0,3.1,3.2). +MCU_FAMILY = KINETIS +MCU_SERIES = K20x + +# Linker script to use +# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +# - NOTE: a custom ld script is needed for EEPROM on Teensy LC +# - LDSCRIPT = +# - MKL26Z64 for Teensy LC +# - MK20DX128 for Teensy 3.0 +# - MK20DX256 for Teensy 3.1 and 3.2 +MCU_LDSCRIPT = MK20DX256 + +# Startup code to use +# - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +# - STARTUP = +# - kl2x for Teensy LC +# - k20x5 for Teensy 3.0 +# - k20x7 for Teensy 3.1 and 3.2 +MCU_STARTUP = k20x7 + +# Board: it should exist either in /os/hal/boards/ +# or /boards +# - BOARD = +# - PJRC_TEENSY_LC for Teensy LC +# - PJRC_TEENSY_3 for Teensy 3.0 +# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2 +BOARD = PJRC_TEENSY_3_1 + +# Cortex version +# Teensy LC is cortex-m0plus; Teensy 3.x are cortex-m4 +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +# I.e. 6 for Teensy LC; 7 for Teensy 3.x +ARMV = 7 diff --git a/keyboards/handwired/onekey/teensy_lc/chconf.h b/keyboards/handwired/onekey/teensy_lc/chconf.h new file mode 100644 index 000000000..3294ac7ee --- /dev/null +++ b/keyboards/handwired/onekey/teensy_lc/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 1000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 0 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 20 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE TRUE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP TRUE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS TRUE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK TRUE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS TRUE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS TRUE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK TRUE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS TRUE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/handwired/onekey/teensy_lc/config.h b/keyboards/handwired/onekey/teensy_lc/config.h new file mode 100644 index 000000000..0d82a0578 --- /dev/null +++ b/keyboards/handwired/onekey/teensy_lc/config.h @@ -0,0 +1,24 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once + +// TODO: including this causes "error: expected identifier before '(' token" errors +//#include "config_common.h" + +#define MATRIX_COL_PINS { D5 } +#define MATRIX_ROW_PINS { B2 } +#define UNUSED_PINS diff --git a/keyboards/handwired/onekey/teensy_lc/halconf.h b/keyboards/handwired/onekey/teensy_lc/halconf.h new file mode 100644 index 000000000..1b6f2adc2 --- /dev/null +++ b/keyboards/handwired/onekey/teensy_lc/halconf.h @@ -0,0 +1,354 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ + diff --git a/keyboards/handwired/onekey/teensy_lc/ld/MKL26Z64.ld b/keyboards/handwired/onekey/teensy_lc/ld/MKL26Z64.ld new file mode 100644 index 000000000..c4ca8b874 --- /dev/null +++ b/keyboards/handwired/onekey/teensy_lc/ld/MKL26Z64.ld @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2013-2016 Fabio Utzig, http://fabioutzig.com + * (C) 2016 flabbergast + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* + * KL26Z64 memory setup. + */ +MEMORY +{ + flash0 : org = 0x00000000, len = 0x100 + flash1 : org = 0x00000400, len = 0x10 + flash2 : org = 0x00000410, len = 62k - 0x410 + flash3 : org = 0x0000F800, len = 2k + flash4 : org = 0x00000000, len = 0 + flash5 : org = 0x00000000, len = 0 + flash6 : org = 0x00000000, len = 0 + flash7 : org = 0x00000000, len = 0 + ram0 : org = 0x1FFFF800, len = 8k + ram1 : org = 0x00000000, len = 0 + ram2 : org = 0x00000000, len = 0 + ram3 : org = 0x00000000, len = 0 + ram4 : org = 0x00000000, len = 0 + ram5 : org = 0x00000000, len = 0 + ram6 : org = 0x00000000, len = 0 + ram7 : org = 0x00000000, len = 0 +} + +/* Flash region for the configuration bytes.*/ +SECTIONS +{ + .cfmprotect : ALIGN(4) SUBALIGN(4) + { + KEEP(*(.cfmconfig)) + } > flash1 +} + +/* For each data/text section two region are defined, a virtual region + and a load region (_LMA suffix).*/ + +/* Flash region to be used for exception vectors.*/ +REGION_ALIAS("VECTORS_FLASH", flash0); +REGION_ALIAS("VECTORS_FLASH_LMA", flash0); + +/* Flash region to be used for constructors and destructors.*/ +REGION_ALIAS("XTORS_FLASH", flash2); +REGION_ALIAS("XTORS_FLASH_LMA", flash2); + +/* Flash region to be used for code text.*/ +REGION_ALIAS("TEXT_FLASH", flash2); +REGION_ALIAS("TEXT_FLASH_LMA", flash2); + +/* Flash region to be used for read only data.*/ +REGION_ALIAS("RODATA_FLASH", flash2); +REGION_ALIAS("RODATA_FLASH_LMA", flash2); + +/* Flash region to be used for various.*/ +REGION_ALIAS("VARIOUS_FLASH", flash2); +REGION_ALIAS("VARIOUS_FLASH_LMA", flash2); + +/* Flash region to be used for RAM(n) initialization data.*/ +REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2); + +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts.*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); + +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); + +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); +REGION_ALIAS("DATA_RAM_LMA", flash2); + +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); + +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); + +__eeprom_workarea_start__ = ORIGIN(flash3); +__eeprom_workarea_size__ = LENGTH(flash3); +__eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__; + +/* Generic rules inclusion.*/ +INCLUDE rules.ld diff --git a/keyboards/handwired/onekey/teensy_lc/mcuconf.h b/keyboards/handwired/onekey/teensy_lc/mcuconf.h new file mode 100644 index 000000000..ea576df5b --- /dev/null +++ b/keyboards/handwired/onekey/teensy_lc/mcuconf.h @@ -0,0 +1,45 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +#define KL2x_MCUCONF + +/* + * HAL driver system settings. + */ +/* PEE mode - 48MHz system clock driven by (16 MHz) external crystal. */ +#define KINETIS_MCG_MODE KINETIS_MCG_MODE_PEE +#define KINETIS_PLLCLK_FREQUENCY 96000000UL +#define KINETIS_SYSCLK_FREQUENCY 48000000UL + +/* + * SERIAL driver system settings. + */ +#define KINETIS_SERIAL_USE_UART0 TRUE + +/* + * USB driver settings + */ +#define KINETIS_USB_USE_USB0 TRUE + +/* Need to redefine this, since the default (configured for K20x) might not apply + * 2 for Teensy LC + * 5 for Teensy 3.x */ +#define KINETIS_USB_USB0_IRQ_PRIORITY 2 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/handwired/onekey/teensy_lc/readme.md b/keyboards/handwired/onekey/teensy_lc/readme.md new file mode 100644 index 000000000..676d794d8 --- /dev/null +++ b/keyboards/handwired/onekey/teensy_lc/readme.md @@ -0,0 +1,40 @@ +# Teensy LC onekey + +To trigger keypress, short together pins *D5* and *B2* (marked on the PCB as *20* and *19*). + +## Hardware + +### Pins +When setting matrix pins, you need to use the MCU definitions instead of what is printed on the PCB. Sourced from . The following table can be used to convert between the two. + +| PCB | MCU | Notes | +|------- |-----|-------| +| 0 | B16 | | +| 1 | B17 | | +| 2 | D0 | | +| 3 | A1 | | +| 4 | A2 | | +| 5 | D7 | | +| 6 | D4 | | +| 7 | D2 | | +| 8 | D3 | | +| 9 | C3 | | +| 10 | C4 | | +| 11 | C6 | | +| 12 | C7 | | +| 13/LED | C5 | | +| 14/A0 | D1 | | +| 15/A1 | C0 | | +| 16/A2 | B0 | | +| 17/A3 | B1 | | +| 18/A4 | B3 | | +| 19/A5 | B2 | | +| 20/A6 | D5 | | +| 21/A7 | D6 | | +| 22/A8 | C1 | | +| 23/A9 | C2 | | +| 24/A10 | E2 | | +| 25/A11 | E21 | *[1]* | +| 26/A12 | E30 | *[1]* | + +*[1]* - Currently not configured and may require extra work to implement. diff --git a/keyboards/handwired/onekey/teensy_lc/rules.mk b/keyboards/handwired/onekey/teensy_lc/rules.mk new file mode 100644 index 000000000..7859f6d74 --- /dev/null +++ b/keyboards/handwired/onekey/teensy_lc/rules.mk @@ -0,0 +1,41 @@ +## chip/board settings +# - the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +# - For Teensies, FAMILY = KINETIS and SERIES is either +# KL2x (LC) or K20x (3.0,3.1,3.2). +MCU_FAMILY = KINETIS +MCU_SERIES = KL2x + +# Linker script to use +# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +# - NOTE: a custom ld script is needed for EEPROM on Teensy LC +# - LDSCRIPT = +# - MKL26Z64 for Teensy LC +# - MK20DX128 for Teensy 3.0 +# - MK20DX256 for Teensy 3.1 and 3.2 +MCU_LDSCRIPT = MKL26Z64 + +# Startup code to use +# - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +# - STARTUP = +# - kl2x for Teensy LC +# - k20x5 for Teensy 3.0 +# - k20x7 for Teensy 3.1 and 3.2 +MCU_STARTUP = kl2x + +# Board: it should exist either in /os/hal/boards/ +# or /boards +# - BOARD = +# - PJRC_TEENSY_LC for Teensy LC +# - PJRC_TEENSY_3 for Teensy 3.0 +# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2 +BOARD = PJRC_TEENSY_LC + +# Cortex version +# Teensy LC is cortex-m0plus; Teensy 3.x are cortex-m4 +MCU = cortex-m0plus + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +# I.e. 6 for Teensy LC; 7 for Teensy 3.x +ARMV = 6 From d4ff836d6449b442e6f5ddc31678a489d0f6b3d6 Mon Sep 17 00:00:00 2001 From: vuhopkep Date: Thu, 27 Jun 2019 03:41:32 +0700 Subject: [PATCH 268/341] [Keyboard] Add Hnah40 keyboard (#6183) * Add Hnah40 keyboard Adding new keyboard Hnah40, open source hardware * update infor * make code looks neater * move to handwired board move and update readme file * update * update * update image * change bootloader type * last change --- keyboards/handwired/hnah40/config.h | 220 ++++++++++ keyboards/handwired/hnah40/hnah40.c | 43 ++ keyboards/handwired/hnah40/hnah40.h | 38 ++ keyboards/handwired/hnah40/info.json | 54 +++ .../handwired/hnah40/keymaps/default/config.h | 18 + .../handwired/hnah40/keymaps/default/keymap.c | 48 +++ .../hnah40/keymaps/default/readme.md | 1 + keyboards/handwired/hnah40/readme.md | 20 + keyboards/handwired/hnah40/rules.mk | 73 ++++ keyboards/handwired/hnah40/usbconfig.h | 397 ++++++++++++++++++ 10 files changed, 912 insertions(+) create mode 100644 keyboards/handwired/hnah40/config.h create mode 100644 keyboards/handwired/hnah40/hnah40.c create mode 100644 keyboards/handwired/hnah40/hnah40.h create mode 100644 keyboards/handwired/hnah40/info.json create mode 100644 keyboards/handwired/hnah40/keymaps/default/config.h create mode 100644 keyboards/handwired/hnah40/keymaps/default/keymap.c create mode 100644 keyboards/handwired/hnah40/keymaps/default/readme.md create mode 100644 keyboards/handwired/hnah40/readme.md create mode 100644 keyboards/handwired/hnah40/rules.mk create mode 100644 keyboards/handwired/hnah40/usbconfig.h diff --git a/keyboards/handwired/hnah40/config.h b/keyboards/handwired/hnah40/config.h new file mode 100644 index 000000000..b7a4105d0 --- /dev/null +++ b/keyboards/handwired/hnah40/config.h @@ -0,0 +1,220 @@ +/* Copyright 2018 HnahKB + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0002 +#define MANUFACTURER HnahKB +#define PRODUCT hnah40 +#define DESCRIPTION Custom 40% PCB + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 11 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B4, B5, B3, D4 } +#define MATRIX_COL_PINS { B0, D7, D6, D5, B2, B1, C0, C1, C2, C3, D1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLIGHT_ANIMATIONS +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + + + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + diff --git a/keyboards/handwired/hnah40/hnah40.c b/keyboards/handwired/hnah40/hnah40.c new file mode 100644 index 000000000..0f08136c2 --- /dev/null +++ b/keyboards/handwired/hnah40/hnah40.c @@ -0,0 +1,43 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ +#include "hnah40.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/handwired/hnah40/hnah40.h b/keyboards/handwired/hnah40/hnah40.h new file mode 100644 index 000000000..28e09f668 --- /dev/null +++ b/keyboards/handwired/hnah40/hnah40.h @@ -0,0 +1,38 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +// 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 representing the physical +// layout of the board and position of the keys +// The second converts the arguments into a two-dimensional array which +// represents the switch matrix. + +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k39, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, \ + k30, k31, k32, k33, k35, k37, k38, k3A\ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A }, \ + { k30, k31, k32, k33, KC_NO, k35, KC_NO, k37, k38, k39, k3A }, \ +} diff --git a/keyboards/handwired/hnah40/info.json b/keyboards/handwired/hnah40/info.json new file mode 100644 index 000000000..6a577a520 --- /dev/null +++ b/keyboards/handwired/hnah40/info.json @@ -0,0 +1,54 @@ +{ + "keyboard_name": "Hnah40", + "url": "https://github.com/vuhopkep/PCB/tree/master/Hnah40-Atmega328p/PCB_V1/PCB", + "maintainer": "HnahKB", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"Q", "x":1, "y":0}, + {"label":"W", "x":2, "y":0}, + {"label":"E", "x":3, "y":0}, + {"label":"R", "x":4, "y":0}, + {"label":"T", "x":5, "y":0}, + {"label":"Y", "x":6, "y":0}, + {"label":"U", "x":7, "y":0}, + {"label":"I", "x":8, "y":0}, + {"label":"O", "x":9, "y":0}, + {"label":"P", "x":10, "y":0}, + {"label":"BSPC", "x":11, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"A", "x":1.5, "y":1}, + {"label":"S", "x":2.5, "y":1}, + {"label":"D", "x":3.5, "y":1}, + {"label":"F", "x":4.5, "y":1}, + {"label":"G", "x":5.5, "y":1}, + {"label":"H", "x":6.5, "y":1}, + {"label":"J", "x":7.5, "y":1}, + {"label":"K", "x":8.5, "y":1}, + {"label":"L", "x":9.5, "y":1}, + {"label":"Enter", "x":10.5, "y":1, "w":1.5}, + {"label":"Shift", "x":0, "y":2, "w":1.75}, + {"label":"Z", "x":1.75, "y":2}, + {"label":"X", "x":2.75, "y":2}, + {"label":"C", "x":3.75, "y":2}, + {"label":"V", "x":4.75, "y":2}, + {"label":"B", "x":5.75, "y":2}, + {"label":"N", "x":6.75, "y":2}, + {"label":"M", "x":7.75, "y":2}, + {"label":",", "x":8.75, "y":2}, + {"label":"Shift", "x":9.75, "y":2, "w":2.25}, + {"label":"Ctrl", "x":0, "y":3, "w":1.25}, + {"label":"Win", "x":1.25, "y":3, "w":1.5}, + {"label":"Alt", "x":2.75, "y":3, "w":1.25}, + {"label":"Space", "x":4, "y":3, "w":2}, + {"label":"Space", "x":6, "y":3, "w":2}, + {"label":"App", "x":8, "y":3, "w":1.25}, + {"label":"Fn", "x":9.25, "y":3, "w":1.5}, + {"label":"Ctrl", "x":10.75, "y":3, "w":1.25} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/handwired/hnah40/keymaps/default/config.h b/keyboards/handwired/hnah40/keymaps/default/config.h new file mode 100644 index 000000000..74412a948 --- /dev/null +++ b/keyboards/handwired/hnah40/keymaps/default/config.h @@ -0,0 +1,18 @@ +/* Copyright 2019 HnahKB + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/handwired/hnah40/keymaps/default/keymap.c b/keyboards/handwired/hnah40/keymaps/default/keymap.c new file mode 100644 index 000000000..2fc67ba5e --- /dev/null +++ b/keyboards/handwired/hnah40/keymaps/default/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2019 HnahKB + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum hnah_layers{ + _QWERTY, + _LOWER, + _RAISE +}; + + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( /* Base */ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT(RAISE, KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_APP, LOWER, KC_RCTL + ), + [_LOWER] = LAYOUT( /* Base */ + RESET, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + RAISE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, + KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_COMM, KC_DOT, KC_SLSH, KC_SLSH, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_APP, KC_TRNS, KC_RCTL + ), + [_RAISE] = LAYOUT( /* Base */ + RESET, KC_1, KC_UP, RGB_TOG, RGB_MOD, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT , RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_ENT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_SPACE, KC_SPACE, KC_LEFT, KC_DOWN, KC_RGHT + ), +}; diff --git a/keyboards/handwired/hnah40/keymaps/default/readme.md b/keyboards/handwired/hnah40/keymaps/default/readme.md new file mode 100644 index 000000000..b948ef964 --- /dev/null +++ b/keyboards/handwired/hnah40/keymaps/default/readme.md @@ -0,0 +1 @@ +![Hnah40 Layout Image](https://i.imgur.com/7LT6Vam.jpg) \ No newline at end of file diff --git a/keyboards/handwired/hnah40/readme.md b/keyboards/handwired/hnah40/readme.md new file mode 100644 index 000000000..20e2d7127 --- /dev/null +++ b/keyboards/handwired/hnah40/readme.md @@ -0,0 +1,20 @@ +# hnah40 + +![Hnah40](https://i.imgur.com/nXVmcyc.jpg) + +A custom 40% keyboard PCB, insprired by Plaid keyboard from hsgw + + +Keyboard Maintainer: [vuhopkep](https://github.com/vuhopkep) +Hardware Availability: https://github.com/vuhopkep/PCB/tree/master/Hnah40-Atmega328p + +Make example for this keyboard (after setting up your build environment): + + make handwired/hnah40:default:program + +## Bootloader +use usbasploader from hsgw. +https://github.com/hsgw/USBaspLoader/tree/plaid + + +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). diff --git a/keyboards/handwired/hnah40/rules.mk b/keyboards/handwired/hnah40/rules.mk new file mode 100644 index 000000000..efd11bfa5 --- /dev/null +++ b/keyboards/handwired/hnah40/rules.mk @@ -0,0 +1,73 @@ +# MCU name +MCU = atmega328p +PROTOCOL = VUSB + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +BOOTLOADER = bootloadHID + +# Flash program via avrdude, but default command is not suitable. +# You can use hnah40:default:program +PROGRAM_CMD = avrdude -c usbasp -p m328p -U flash:w:$(BUILD_DIR)/$(TARGET).hex + + +# disable debug code +OPT_DEFS = -DDEBUG_LEVEL=0 + + +# Build Options +# change yes to no to disable +# +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 = no # Console for debug(+400) +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +NO_UART = yes +NO_SUSPEND_POWER_DOWN = yes \ No newline at end of file diff --git a/keyboards/handwired/hnah40/usbconfig.h b/keyboards/handwired/hnah40/usbconfig.h new file mode 100644 index 000000000..cbd37c34d --- /dev/null +++ b/keyboards/handwired/hnah40/usbconfig.h @@ -0,0 +1,397 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#ifndef __usbconfig_h_included__ +#define __usbconfig_h_included__ + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +// max power draw with maxed white underglow measured at 120 mA (peaks) +#define USB_CFG_MAX_BUS_POWER 100 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 0 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x01 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'H','n','a','h','K','B' +#define USB_CFG_VENDOR_NAME_LEN 6 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'H', 'n', 'a', 'h', '4', '0' +#define USB_CFG_DEVICE_NAME_LEN 6 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +#define USB_CFG_SERIAL_NUMBER 'H','n','a','h','K','B' +#define USB_CFG_SERIAL_NUMBER_LEN 6 +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +// #define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +// /* #define USB_INTR_CFG_CLR 0 */ +// /* #define USB_INTR_ENABLE EIMSK */ +// #define USB_INTR_ENABLE_BIT INT1 +// /* #define USB_INTR_PENDING EIFR */ +// #define USB_INTR_PENDING_BIT INTF1 +// #define USB_INTR_VECTOR INT1_vect + +#endif /* __usbconfig_h_included__ */ From 49699294b63b1fd36c504d4949dd6fbb19442cf3 Mon Sep 17 00:00:00 2001 From: Max Rumpf Date: Wed, 26 Jun 2019 22:42:14 +0200 Subject: [PATCH 269/341] [Keyboard] Add Pulse 4k, a macropad by Maxr1998 (#6195) * Add Pulse 4k, a macropad by Maxr1998 * Some config tweaks * Remove image note * Add license headers * Fix media keys * Remove Play/pause again as it doesn't work on Linux --- keyboards/maxr1998/pulse4k/config.h | 76 +++++++++++++++++++ keyboards/maxr1998/pulse4k/info.json | 20 +++++ .../maxr1998/pulse4k/keymaps/default/keymap.c | 48 ++++++++++++ .../maxr1998/pulse4k/keymaps/default/rules.mk | 0 keyboards/maxr1998/pulse4k/pulse4k.c | 61 +++++++++++++++ keyboards/maxr1998/pulse4k/pulse4k.h | 33 ++++++++ keyboards/maxr1998/pulse4k/readme.md | 11 +++ keyboards/maxr1998/pulse4k/rules.mk | 33 ++++++++ 8 files changed, 282 insertions(+) create mode 100644 keyboards/maxr1998/pulse4k/config.h create mode 100644 keyboards/maxr1998/pulse4k/info.json create mode 100644 keyboards/maxr1998/pulse4k/keymaps/default/keymap.c create mode 100644 keyboards/maxr1998/pulse4k/keymaps/default/rules.mk create mode 100644 keyboards/maxr1998/pulse4k/pulse4k.c create mode 100644 keyboards/maxr1998/pulse4k/pulse4k.h create mode 100644 keyboards/maxr1998/pulse4k/readme.md create mode 100644 keyboards/maxr1998/pulse4k/rules.mk diff --git a/keyboards/maxr1998/pulse4k/config.h b/keyboards/maxr1998/pulse4k/config.h new file mode 100644 index 000000000..cb4eab699 --- /dev/null +++ b/keyboards/maxr1998/pulse4k/config.h @@ -0,0 +1,76 @@ +/* +Copyright (C) 2012-2019 Jun Wako , Maxr1998 + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maxr1998 +#define PRODUCT Pulse 4k +#define DESCRIPTION A four-key macropad + +/* Key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 3 + +/* Matrix pins */ +#define MATRIX_ROW_PINS { B4, E6 } +#define MATRIX_COL_PINS { B7, B3, F0 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Rotary encoders */ +#define NUMBER_OF_ENCODERS 2 +#define ENCODERS_PAD_A { D2, F6 } +#define ENCODERS_PAD_B { D3, F5 } +#define ENCODER_RESOLUTION 4 + +/* Combo setup */ +#define COMBO_COUNT 1 +#define COMBO_TERM 150 + +/* RGB LED Setup */ +#define RGB_DI_PIN F7 // pin the DI on the WS2812B is hooked-up to +#define RGBLIGHT_ANIMATIONS // run RGB animations +#define RGBLED_NUM 2 // number of LEDs + +/* + * Feature disable options + * 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_FUNCTION diff --git a/keyboards/maxr1998/pulse4k/info.json b/keyboards/maxr1998/pulse4k/info.json new file mode 100644 index 000000000..0ac4f063c --- /dev/null +++ b/keyboards/maxr1998/pulse4k/info.json @@ -0,0 +1,20 @@ +{ + "keyboard_name": "Pulse 4k", + "keyboard_folder": "maxr1998/pulse4k", + "url": "https://github.com/Maxr1998/Pulse_4k", + "maintainer": "Maxr1998", + "width": 3, + "height": 2, + "layouts": { + "LAYOUT_pulse4k": { + "key_count": 6, + "layout": [ + { "w": 1, "x": 0, "y": 0 }, + { "w": 1, "x": 1, "y": 0 }, + { "w": 1, "x": 2, "y": 0 }, + { "w": 1, "x": 0, "y": 1 }, + { "w": 1, "x": 1, "y": 1 }, + { "w": 1, "x": 2, "y": 1 } ] + } + } +} diff --git a/keyboards/maxr1998/pulse4k/keymaps/default/keymap.c b/keyboards/maxr1998/pulse4k/keymaps/default/keymap.c new file mode 100644 index 000000000..873c87d1f --- /dev/null +++ b/keyboards/maxr1998/pulse4k/keymaps/default/keymap.c @@ -0,0 +1,48 @@ +/* +Copyright (C) 2019 Maxr1998 + +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 . +*/ + +#include QMK_KEYBOARD_H + +enum layers { + DEFAULT +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DEFAULT] = { + { KC_END, KC_UP, KC_MUTE }, + { KC_LEFT, KC_DOWN, KC_RGHT } + } +}; + +void matrix_init_user(void) { +} + +void encoder_one_update(bool clockwise) { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } +} + +void encoder_two_update(bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} diff --git a/keyboards/maxr1998/pulse4k/keymaps/default/rules.mk b/keyboards/maxr1998/pulse4k/keymaps/default/rules.mk new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/maxr1998/pulse4k/pulse4k.c b/keyboards/maxr1998/pulse4k/pulse4k.c new file mode 100644 index 000000000..ee3d41ccd --- /dev/null +++ b/keyboards/maxr1998/pulse4k/pulse4k.c @@ -0,0 +1,61 @@ +/* +Copyright (C) 2019 Maxr1998 + +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 . +*/ + +#include "pulse4k.h" +#include "rgblight.h" + +enum combo_events { + LED_ADJUST +}; + +const uint16_t PROGMEM led_adjust_combo[] = {KC_LEFT, KC_RGHT, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + [LED_ADJUST] = COMBO_ACTION(led_adjust_combo) +}; + +bool led_adjust_active = false; + +void matrix_init_kb(void) { + matrix_init_user(); +} + +void process_combo_event(uint8_t combo_index, bool pressed) { + if (combo_index == LED_ADJUST) { + led_adjust_active = pressed; + } +} + +void encoder_update_kb(uint8_t index, bool clockwise) { + if (index == 0) { + if (led_adjust_active) { + if (clockwise) { + rgblight_increase_val(); + } else { + rgblight_decrease_val(); + } + } else encoder_one_update(clockwise); + } else if (index == 1) { + if (led_adjust_active) { + if (clockwise) { + rgblight_increase_hue(); + } else { + rgblight_decrease_hue(); + } + } else encoder_two_update(clockwise); + } +} diff --git a/keyboards/maxr1998/pulse4k/pulse4k.h b/keyboards/maxr1998/pulse4k/pulse4k.h new file mode 100644 index 000000000..7c34870d6 --- /dev/null +++ b/keyboards/maxr1998/pulse4k/pulse4k.h @@ -0,0 +1,33 @@ +/* +Copyright (C) 2019 Maxr1998 + +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 . +*/ + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + k00, k01, k02, \ + k10, k11, k12 \ +) \ +{ \ + { k00, k01, k02 }, \ + { k10, k11, k12 }, \ +} + +void encoder_one_update(bool clockwise); + +void encoder_two_update(bool clockwise); diff --git a/keyboards/maxr1998/pulse4k/readme.md b/keyboards/maxr1998/pulse4k/readme.md new file mode 100644 index 000000000..3a552188d --- /dev/null +++ b/keyboards/maxr1998/pulse4k/readme.md @@ -0,0 +1,11 @@ +# Pulse 4k +A four-key macropad with two rotary encoders, developed by Maxr1998, [fully open-source](https://github.com/Maxr1998/Pulse_4k). + +Keyboard Maintainer: [Maxr1998](https://github.com/Maxr1998) +Hardware Availability: DIY from the [open-source design files](https://github.com/Maxr1998/Pulse_4k), potential official distribution in the future + +Make example for this keyboard (after setting up your build environment): + + make maxr1998/pulse4k:default + +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). diff --git a/keyboards/maxr1998/pulse4k/rules.mk b/keyboards/maxr1998/pulse4k/rules.mk new file mode 100644 index 000000000..644666221 --- /dev/null +++ b/keyboards/maxr1998/pulse4k/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = atmel-dfu + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +ENCODER_ENABLE = yes # Rotary encoders +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +COMBO_ENABLE = yes # Key combo feature +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +API_SYSEX_ENABLE = no +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + From 8c1900a658b4f99c0201008b6832ea71e5e9396f Mon Sep 17 00:00:00 2001 From: fauxpark Date: Thu, 27 Jun 2019 11:12:27 +1000 Subject: [PATCH 270/341] Remove one more copyrighted song (#6200) --- quantum/audio/song_list.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/quantum/audio/song_list.h b/quantum/audio/song_list.h index 173cd194a..7ba57b056 100644 --- a/quantum/audio/song_list.h +++ b/quantum/audio/song_list.h @@ -22,11 +22,6 @@ #define NO_SOUND -#define LP_NUMB \ - H__NOTE(_CS5), H__NOTE(_E5), H__NOTE(_CS5), WD_NOTE(_FS5), \ - WD_NOTE(_A5), WD_NOTE(_GS5), WD_NOTE(_REST), H__NOTE(_CS5), H__NOTE(_E5), \ - H__NOTE(_CS5), WD_NOTE(_A5), WD_NOTE(_GS5), WD_NOTE(_E5), - /* Ode to Joy * Author: Friedrich Schiller + License: Public Domain @@ -349,3 +344,4 @@ #define TERRAS_THEME #define RENAI_CIRCULATION #define PLATINUM_DISCO +#define LP_NUMB From b802c0c8df4f09be322f47cbed2f595ea983929c Mon Sep 17 00:00:00 2001 From: "Michael F. Lamb" Date: Fri, 28 Jun 2019 10:50:49 -0700 Subject: [PATCH 271/341] [Keymap] mitosis:datagrok: use non-copyrighted songs, add workman ditty (#6205) --- keyboards/mitosis/keymaps/datagrok/config.h | 14 +++++++------- quantum/audio/song_list.h | 11 +++++++++++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/keyboards/mitosis/keymaps/datagrok/config.h b/keyboards/mitosis/keymaps/datagrok/config.h index 1c70a3791..0e82b628b 100644 --- a/keyboards/mitosis/keymaps/datagrok/config.h +++ b/keyboards/mitosis/keymaps/datagrok/config.h @@ -27,13 +27,13 @@ //#define NO_ACTION_FUNCTION #ifdef AUDIO_ENABLE -#define STARTUP_SONG SONG(MARIO_MUSHROOM) -#define DEFAULT_LAYER_SONGS { \ - SONG(QWERTY_SOUND), \ - SONG(COLEMAK_SOUND), \ - SONG(DVORAK_SOUND), \ - SONG(ZELDA_TREASURE), \ - } +#define STARTUP_SONG SONG(STARTUP_SOUND) +#define DEFAULT_LAYER_SONGS { \ + SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND), \ + SONG(WORKMAN_SOUND), \ + } #define AUDIO_VOICES #define AUDIO_CLICKY #define C6_AUDIO diff --git a/quantum/audio/song_list.h b/quantum/audio/song_list.h index 7ba57b056..33dbcfcb1 100644 --- a/quantum/audio/song_list.h +++ b/quantum/audio/song_list.h @@ -103,6 +103,17 @@ S__NOTE(_REST), \ E__NOTE(_E7 ), +#define WORKMAN_SOUND \ + E__NOTE(_GS6 ), \ + E__NOTE(_A6 ), \ + S__NOTE(_REST), \ + E__NOTE(_GS6 ), \ + E__NOTE(_A6 ), \ + S__NOTE(_REST), \ + ED_NOTE(_FS7 ), \ + S__NOTE(_REST), \ + ED_NOTE(_A7 ), + #define PLOVER_SOUND \ E__NOTE(_GS6 ), \ E__NOTE(_A6 ), \ From 064bdf7b6c7a603cc75121fb9a1944c9f4bcfda7 Mon Sep 17 00:00:00 2001 From: Vega Deftwing Date: Fri, 28 Jun 2019 12:52:00 -0500 Subject: [PATCH 272/341] [Keymap] Added 'Vega' ErgoDone layout (#6196) * Added 'Vega' ErgoDone layout * Changed as to Fauxpark's recomendations * removed unused custom_keycodes --- keyboards/ergodone/keymaps/vega/keymap.c | 555 +++++++++++++++++++++++ keyboards/ergodone/keymaps/vega/rules.mk | 2 + 2 files changed, 557 insertions(+) create mode 100644 keyboards/ergodone/keymaps/vega/keymap.c create mode 100644 keyboards/ergodone/keymaps/vega/rules.mk diff --git a/keyboards/ergodone/keymaps/vega/keymap.c b/keyboards/ergodone/keymaps/vega/keymap.c new file mode 100644 index 000000000..9e5229528 --- /dev/null +++ b/keyboards/ergodone/keymaps/vega/keymap.c @@ -0,0 +1,555 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + BASE, + GREL, + GREU, + SYMB, + MATH, + QWER, + FNLR +}; + +enum unicode_names { + //MATH + neq, //≠ + intgrl, //∫ + angl, //∠ + imply, //⇒ + equiv, //⇔ + porp, //∝ + exists, //∃ + nexists, //∄ + forall, //∀ + and, //∧ + or, //∨ + xor, //⊕ + apeql, //≅ + root, //√ + not, //¬ + sum, //∑ + plsminus, //± + infin, //∞ + emtyset, //∅ + Mn, //ℕ + Mz, //ℤ + Mq, //ℚ + Mr, //ℝ + Mc, //ℂ + eleof, //∈ + member, //∋ + neleof, //∉ + nmember, //∌ + subsetof, //⊂ + suprsetof, //⊃ + intersection, //∩ + Munion, //∪ + + //SYMB + arwl, + arwu, + arwr, + arwd, + + uxclm, + cent, + degree, + trade, + copy, + numero, + sect, + mdot, + rang, + + + lshade, + mshade, + dshade, + + fire, + water, + cleft, + baster, + neteen, + floppy, + + boxemp, + boxchk, + boxX, + + bbstr, + bbstl, + bbml, + bbmr, + bbmb, + bbrtr, + bbrbr, + bbrtl, + bbrbl, + bbsbr, + bbsbl, + bbmbr, + bbmbl, + + Agrave, + Aacute, + Acircm, + Atilde, + Abreve, + Adiaer, + Adacut, + + // not all ogham letters, as I + // actually intend to use them for hex + OS, + Oa, + Ob, + Oc, + Od, + Oe, + Of, + Og, + Oh, + Oi, + OA, + OB, + OC, + OD, + OE, + OF, + Os, + OED, + Ox, + gnd, + sqr, + sine, + opt, + + geq, + leq, + brkup, + brkdn, + perup, + perdn, + + //GREEL + rone, // 1:: ⅰ + rtwo, + rthree, + rfour, // 4:: ⅳ + rfive, // 5:: ⅴ + rsix, // 6:: ⅵ + rseven, // 7:: ⅶ + reight, // 8:: ⅷ + rnine, // 9:: ⅸ + rten, // 0:: ⅹ + gq, // q:: θ + gw, // w:: ω + ge, // e:: ε + gr, // r:: ρ + gt, // t:: τ + gy, // y:: ψ + gu, // u:: υ + gi, // i:: ι + go, // o:: ο + gp, // p:: π + ga, // a:: α + gs, // s:: σ + gd, // d:: δ + gf, // f:: φ + gg, // g:: γ + gh, // h:: η + gj, // j:: ϑ + gk, // k:: κ + gl, // l:: λ + gz, // z:: ζ + gx, // x:: ξ + gc, // c:: χ + gv, // v:: ς + gb, // b:: β + gn, // n:: ν + gm, // m:: μ + + //GREEU + Rone, // 1:: Ⅰ + Rtwo, // 2:: Ⅱ + Rthree, // 3:: Ⅲ + Rfour, // 4:: Ⅳ + Rfive, // 5:: Ⅴ + Rsix, // 6:: Ⅵ + Rseven, // 7:: Ⅶ + Reight, // 8:: Ⅷ + Rnine, // 9:: Ⅸ + Rten, + Gq, // Q:: Θ + Gw, // W:: Ω + Ge, // E:: Ε + Gr, // R:: Ρ + Gt, // T:: Τ + Gy, // Y:: Ψ + Gu, // U:: Υ + Gi, // I:: Ι + Go, // O:: Ο + Gp, // P:: Π + Ga, // A:: Α + Gs, // S:: Σ + Gd, // D:: Δ + Gf, // F:: Φ + Gg, // G:: Γ + Gh, // H:: Η + Gj, // J:: J + Gk, // K:: Κ + Gl, // L:: Λ + Gz, // Z:: Ζ + Gx, // X:: Ξ + Gc, // C:: Χ + Gv, // V:: V + Gb, // B:: Β + Gn, // N:: Ν + Gm, // M:: Μ +}; + +const uint32_t PROGMEM unicode_map[] = { + //MATH + [neq] = 0x2260, //≠ + [intgrl] = 0x222B, //∫ + [angl] = 0x2220, //∠ + [imply] = 0x21D2, //⇒ + [equiv] = 0x21D4, //⇔ + [porp] = 0x221D, //∝ + [exists] = 0x2203, //∃ + [nexists] = 0x2204, //∄ + [forall] = 0x2200, //∀ + [and] = 0x2227, //∧ + [or] = 0x2228, //∨ + [xor] = 0x2295, //⊕ + [apeql] = 0x2245, //≅ + [root] = 0x221A, //√ + [not] = 0x00AC, //¬ + [sum] = 0x2211, //∑ + [plsminus] = 0x00B1, //± + [infin] = 0x221E, //∞ + [emtyset] = 0x2205, //∅ + [Mn] = 0x2115, //ℕ + [Mz] = 0x2124, //ℤ + [Mq] = 0x211A, //ℚ + [Mr] = 0x211D, //ℝ + [Mc] = 0x2102, //ℂ + [eleof] = 0x2208, //∈ + [member] = 0x220B, //∋ + [neleof] = 0x2209, //∉ + [nmember] = 0x220C, //∌ + [subsetof] = 0x2282, //⊂ + [suprsetof] = 0x2283, // + [intersection] = 0x2229, //∩ + [Munion] = 0x222A, //∪ + //Symbol + [arwl] = 0x2190, //← + [arwu] = 0x2191, //↑ + [arwr] = 0x2192, //→ + [arwd] = 0x2193, //↓ + + [uxclm] = 0x00A1, //¡ + [cent] = 0x00A2, //¢ + [degree] = 0x00B0, //° + [trade] = 0x2122, //™ + [copy] = 0x00A9, //© + [numero] = 0x2116, //№ + [sect] = 0x00A7, //§ + [mdot] = 0x00B7, //· + [rang] = 0x299C, //⦜ + + + [lshade] = 0x2591,//░ + [mshade] = 0x2592,//▒ + [dshade] = 0x2593,//▓ + + [fire] = 0x1F525, //🔥 + [water] = 0x1F322, //🌢 + [cleft] = 0x1F12F, //🄯 + [baster] = 0x1F7BC, //🞼 + [neteen] = 0x1F51E, //🔞 + [floppy] = 0x1F5AB, //🖫 + + [boxemp] = 0x2610, //☐ + [boxchk] = 0x2611, //☑ + [boxX] = 0x2612, //☒ + + [bbstr] = 0x23A1, //⎡ + [bbstl] = 0x23A4, //⎤ + [bbml] = 0x23A8, //⎨ + [bbmr] = 0x23AC, //⎬ + [bbmb] = 0x23AA, //⎪ + [bbrtr] = 0x23A7, //⎧ + [bbrbr] = 0x23A9, //⎩ + [bbrtl] = 0x23AB, //⎫ + [bbrbl] = 0x23AD, //⎭ + [bbsbr] = 0x23A3, //⎣ + [bbsbl] = 0x23A6, //⎦ + [bbmbr] = 0x23A5, //⎥ + [bbmbl] = 0x23A2, //⎢ + + [Agrave] = 0x0300,//è //above [wtf] = 0x1242A, //𒐪 + [Aacute] = 0x0301,//é //1st + [Acircm] = 0x0302,//ê //2nd + [Atilde] = 0x0303,//ẽ //5th + [Abreve] = 0x0306,//ĕ //4th + [Adiaer] = 0x0308,//ë //3rd + [Adacut] = 0x030B,//e̋ + + // not all ogham letters, as I + // actually intend to use them for hex + [OS] = 0x1680,//space + [Oa] = 0x1681,//1 + [Ob] = 0x1682,//2 + [Oc] = 0x1683,//3 + [Od] = 0x1684,//4 + [Oe] = 0x1685,//5 + [Of] = 0x1686,//6 + [Og] = 0x1687,//7 + [Oh] = 0x1688,//8 + [Oi] = 0x1689,//9 + [OA] = 0x168A,//A + [OB] = 0x168B,//B + [OC] = 0x168C,//C + [OD] = 0x168D,//D + [OE] = 0x168E,//E + [OF] = 0x168F,//F + [Os] = 0x169B,//Start + [OED] = 0x169C,//End + [Ox] = 0x1695,//X + + [gnd] = 0x23DA,//⏚ + [sqr] = 0x238D,//⎍, actually monostable + [sine] = 0x223F,//∿ + [opt] = 0x2325,//⌥, actually option used for switch + + [geq] = 0x2264, //≤ + [leq] = 0x2265, //≥ + [brkup] = 0xFE38, //︸ + [brkdn] = 0xFE37, //︷ + [perup] = 0xFE35, //︵ + [perdn] = 0xFE36, //︶ + //GREEKL + [rone] = 0x2170, // 1:: ⅰ + [rtwo] = 0x2171, // 2:: ⅱ + [rthree] = 0x2172, // 3:: ⅲ + [rfour] = 0x2173, // 4:: ⅳ + [rfive] = 0x2174, // 5:: ⅴ + [rsix] = 0x2175, // 6:: ⅵ + [rseven] = 0x2176, // 7:: ⅶ + [reight] = 0x2177, // 8:: ⅷ + [rnine] = 0x2178, // 9:: ⅸ + [rten] = 0x2179, // 0:: ⅹ + [gq] = 0x03B8, // q:: θ + [gw] = 0x03C9, // w:: ω + [ge] = 0x03B5, // e:: ε + [gr] = 0x03C1, // r:: ρ + [gt] = 0x03C4, // t:: τ + [gy] = 0x03C8, // y:: ψ + [gu] = 0x03C5, // u:: υ + [gi] = 0x03B9, // i:: ι + [go] = 0x03BF, // o:: ο + [gp] = 0x03C0, // p:: π + [ga] = 0x03B1, // a:: α + [gs] = 0x03C3, // s:: σ + [gd] = 0x03B4, // d:: δ + [gf] = 0x03C6, // f:: φ + [gg] = 0x03B3, // g:: γ + [gh] = 0x03B7, // h:: η + [gj] = 0x03D1, // j:: ϑ + [gk] = 0x03BA, // k:: κ + [gl] = 0x03BB, // l:: λ + [gz] = 0x03B6, // z:: ζ + [gx] = 0x03BE, // x:: ξ + [gc] = 0x03C7, // c:: χ + [gv] = 0x03C2, // v:: ς + [gb] = 0x03B2, // b:: β + [gn] = 0x03BD, // n:: ν + [gm] = 0x03BC, // m:: μ + //GREEKU + [Rone] = 0x2160, // 1:: Ⅰ + [Rtwo] = 0x2161, // 2:: Ⅱ + [Rthree] = 0x2162, // 3:: Ⅲ + [Rfour] = 0x2163, // 4:: Ⅳ + [Rfive] = 0x2164, // 5:: Ⅴ + [Rsix] = 0x2165, // 6:: Ⅵ + [Rseven] = 0x2166, // 7:: Ⅶ + [Reight] = 0x2167, // 8:: Ⅷ + [Rnine] = 0x2168, // 9:: Ⅸ + [Rten] = 0x2169, // 0:: Ⅹ + [Gq] = 0x0398, // Q:: Θ + [Gw] = 0x03A9, // W:: Ω + [Ge] = 0x0395, // E:: Ε + [Gr] = 0x03A1, // R:: Ρ + [Gt] = 0x03A4, // T:: Τ + [Gy] = 0x03A8, // Y:: Ψ + [Gu] = 0x03A5, // U:: Υ + [Gi] = 0x0399, // I:: Ι + [Go] = 0x039F, // O:: Ο + [Gp] = 0x03A0, // P:: Π + [Ga] = 0x0391, // A:: Α + [Gs] = 0x03A3, // S:: Σ + [Gd] = 0x0394, // D:: Δ + [Gf] = 0x03A6, // F:: Φ + [Gg] = 0x0393, // G:: Γ + [Gh] = 0x0397, // H:: Η + [Gj] = 0x004A, // J:: J + [Gk] = 0x039A, // K:: Κ + [Gl] = 0x039B, // L:: Λ + [Gz] = 0x0396, // Z:: Ζ + [Gx] = 0x039E, // X:: Ξ + [Gc] = 0x03A7, // C:: Χ + [Gv] = 0x0056, // V:: V + [Gb] = 0x0392, // B:: Β + [Gn] = 0x039D, // N:: Ν + [Gm] = 0x039C, // M:: Μ +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[BASE] = LAYOUT_ergodox( // layer 0 : default + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_BSLS, + KC_EQL, KC_A, KC_O, KC_E, KC_U, KC_I, + KC_LSPO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_AMPR, + OSL(FNLR), TT(GREL), TT(MATH), KC_UP, KC_DOWN, + KC_LBRC, KC_HOME, KC_INS, KC_SPC, KC_LGUI, KC_DEL, + + OSL(FNLR), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_PGUP, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSPC, + KC_LEFT, KC_RIGHT, KC_RALT, TT(SYMB), TT(QWER), + KC_END, KC_RBRC, KC_PSCR, KC_RALT, KC_RCTL, KC_ENT +), + +[FNLR] = LAYOUT_ergodox( + // left hand + KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, + KC_NO,KC_F11, KC_F12, KC_F13,KC_F14, KC_F15, KC_NO, + KC_NO,KC_F21, KC_F22, KC_F23,KC_F24, KC_NO, + KC_NO,KC_PAUSE,KC_PSCR,KC_SLCK,KC_NO,KC_NO,KC_NO, + EEP_RST,TO(BASE),TO(BASE),TO(BASE),TO(BASE), + KC_NO,KC_NO, + KC_NO, + KC_NO,KC_NO,KC_NO, + // right hand + TO(BASE), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, UC_M_LN, + KC_NO, KC_F16, KC_F17,KC_F18, KC_F19, KC_F20, UC_M_WI, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + KC_NO, KC_RCTL, KC_NO +), + +[QWER] = LAYOUT_ergodox( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSLS, + KC_AMPR, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_QUOT, + KC_BSLS, KC_LCTL, KC_LGUI, KC_RALT, KC_APP, + KC_LBRC, KC_HOME, KC_PGUP, KC_SPC, KC_LSFT, KC_PGDN, + + OSL(FNLR), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_MINS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_SLSH, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_EQL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, TO(BASE), + KC_END, KC_INS, KC_DEL, KC_RGHT, KC_ENT, KC_SPC +), + +[MATH] = LAYOUT_ergodox( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, + KC_TAB, X(Mc), X(Munion), X(arwl), X(or), X(exists), KC_BSLASH, + X(arwr), X(root), X(and), X(imply), X(nexists), X(forall), + KC_LSPO, KC_SCLN, X(intgrl), X(Mn), X(Mz), X(member), X(arwl), + KC_MS_L, TO(BASE), TO(BASE), KC_INS, KC_DEL, + KC_LBRC, KC_HOME, KC_UP, KC_SPC, KC_LGUI, KC_DOWN, + + TT(FNLR), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_PGUP, X(plsminus), X(infin), X(neleof), X(equiv), X(Mq), KC_EQL, + X(sum), X(emtyset), X(porp), X(suprsetof), X(not), X(neq), + KC_PGDN, X(subsetof), X(intersection), X(angl), X(nmember), X(eleof), KC_RSPC, + KC_RCTL, KC_RALT, KC_APP, TO(BASE), TO(BASE), + KC_END, KC_RBRC, KC_LEFT, KC_RGHT, KC_ENT, KC_SPC +), + +[SYMB] = LAYOUT_ergodox( + X(Os), X(Oa), X(Ob), X(Oc), X(Od), X(Oe), X(mdot), + X(boxemp), X(bbstr), X(bbrtr), X(bbrtl), X(bbstl), X(degree), X(brkdn), + X(boxchk), X(bbmbl), X(bbml), X(bbmr), X(bbmbr), X(neteen), + X(boxX), X(bbsbr), X(bbrbr), X(bbrbl), X(bbsbl), X(uxclm), X(brkup), + X(floppy), TO(BASE), TO(BASE), X(arwu), X(arwd), + X(fire), X(lshade), X(mshade), KC_SPC, X(OS), X(dshade), + + X(Ox), X(Of), X(Og), X(Oh), X(Oi), X(OA), X(OB), + X(numero), X(trade), X(copy), X(cleft), X(cent), X(OED), X(OC), + X(Agrave), X(gnd), X(sqr), X(sine), X(opt), X(OD), + X(sect), X(Aacute), X(Acircm), X(Adiaer), X(Abreve), X(Atilde), X(OE), + X(arwl), X(arwr), X(geq), X(leq), X(OF), + X(rang), X(water), X(perup), X(perdn), X(baster), KC_ENT +), + +[GREL] = LAYOUT_ergodox( + KC_ESC, X(Rone), X(Rtwo), X(Rthree), X(Rfour), X(Rfive), KC_GRV, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, X(gp), X(gy), KC_SLSH, + KC_SLSH, X(ga), X(go), X(ge), X(gu), X(gi), + MO(GREU), KC_SCLN, X(gq), X(gj), X(gk), X(gx), KC_AMPR, + KC_MS_L, TO(BASE), TO(BASE), KC_INS, KC_DEL, + KC_LBRC, KC_HOME, KC_UP, KC_SPC, KC_LGUI, KC_DOWN, + + TO(BASE), X(Rsix), X(Rseven), X(Reight), X(Rnine), X(Rten), KC_BSPC, + KC_PGUP, X(gf), X(gg), X(gc), X(gr), X(gl), KC_EQL, + X(gd), X(gh), X(gt), X(gn), X(gs), KC_MINS, + KC_PGDN, X(gb), X(gm), X(gw), X(gv), X(gz), MO(GREU), + KC_RCTL, KC_RALT, KC_APP, TO(BASE), TO(BASE), + KC_END, KC_RBRC, KC_LEFT, KC_RGHT, KC_ENT, KC_SPC +), + +[GREU] = LAYOUT_ergodox( + KC_ESC, X(Rone), X(Rtwo), X(Rthree), X(Rfour), X(Rfive), KC_GRV, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, X(Gp), X(Gy), KC_SLSH, + KC_SLSH, X(Ga), X(Go), X(Ge), X(Gu), X(Gi), + KC_TRNS, KC_SCLN, X(Gq), X(Gj), X(Gk), X(Gx), KC_AMPR, + KC_MS_L, TO(BASE), TO(BASE), KC_INS, KC_DEL, + KC_LBRC, KC_HOME, KC_UP, KC_SPC, KC_LGUI, KC_DOWN, + + TO(BASE), X(Rsix), X(Rseven), X(Reight), X(Rnine), X(Rten), KC_BSPC, + KC_PGUP, X(Gf), X(Gg), X(Gc), X(Gr), X(Gl), KC_EQL, + X(Gd), X(Gh), X(Gt), X(Gn), X(Gs), KC_MINS, + KC_PGDN, X(Gb), X(Gm), X(Gw), X(Gv), X(Gz), KC_TRNS, + KC_RCTL, KC_RALT, KC_APP, TO(BASE), TO(BASE), + KC_END, KC_RBRC, KC_LEFT, KC_RGHT, KC_ENT, KC_SPC +), + +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } +}; diff --git a/keyboards/ergodone/keymaps/vega/rules.mk b/keyboards/ergodone/keymaps/vega/rules.mk new file mode 100644 index 000000000..d4b854722 --- /dev/null +++ b/keyboards/ergodone/keymaps/vega/rules.mk @@ -0,0 +1,2 @@ +UNICODE_ENABLE = no # Unicode +UNICODEMAP_ENABLE = yes From e4b91cffea3a36799abf8017a8b0c303c53a3d23 Mon Sep 17 00:00:00 2001 From: ai03 Date: Sat, 29 Jun 2019 02:52:26 +0900 Subject: [PATCH 273/341] [Keyboard] Add Quasar SSK Controller (#6201) * Begin work * Finalize files * Fix readme * Update readme.md * Add configurator support * Update keyboards/ai03/quasar/rules.mk Co-Authored-By: fauxpark * Remove tailing backslashes in keymaps --- keyboards/ai03/quasar/config.h | 251 ++++++++++++++++++ keyboards/ai03/quasar/info.json | 97 +++++++ keyboards/ai03/quasar/keymaps/ai03/keymap.c | 61 +++++ keyboards/ai03/quasar/keymaps/ai03/readme.md | 3 + .../ai03/quasar/keymaps/default/keymap.c | 61 +++++ .../ai03/quasar/keymaps/default/readme.md | 4 + keyboards/ai03/quasar/quasar.c | 51 ++++ keyboards/ai03/quasar/quasar.h | 45 ++++ keyboards/ai03/quasar/readme.md | 15 ++ keyboards/ai03/quasar/rules.mk | 80 ++++++ 10 files changed, 668 insertions(+) create mode 100644 keyboards/ai03/quasar/config.h create mode 100644 keyboards/ai03/quasar/info.json create mode 100644 keyboards/ai03/quasar/keymaps/ai03/keymap.c create mode 100644 keyboards/ai03/quasar/keymaps/ai03/readme.md create mode 100644 keyboards/ai03/quasar/keymaps/default/keymap.c create mode 100644 keyboards/ai03/quasar/keymaps/default/readme.md create mode 100644 keyboards/ai03/quasar/quasar.c create mode 100644 keyboards/ai03/quasar/quasar.h create mode 100644 keyboards/ai03/quasar/readme.md create mode 100644 keyboards/ai03/quasar/rules.mk diff --git a/keyboards/ai03/quasar/config.h b/keyboards/ai03/quasar/config.h new file mode 100644 index 000000000..7c02f91d0 --- /dev/null +++ b/keyboards/ai03/quasar/config.h @@ -0,0 +1,251 @@ +/* +Copyright 2019 Ryota Goto + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xA103 +#define PRODUCT_ID 0x0010 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Ryota Goto +#define PRODUCT Quasar +#define DESCRIPTION SSK Controller + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5, D4, D6, D7 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, B7, F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/ai03/quasar/info.json b/keyboards/ai03/quasar/info.json new file mode 100644 index 000000000..20637af55 --- /dev/null +++ b/keyboards/ai03/quasar/info.json @@ -0,0 +1,97 @@ +{ + "keyboard_name": "quasar", + "url": "https://github.com/ai03-2725/Quasar/", + "maintainer": "ai03", + "width": 18.5, + "height": 6.75, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + {"label":"PrtSc", "x":15.5, "y":0}, + {"label":"Scroll Lock", "x":16.5, "y":0}, + {"label":"Pause", "x":17.5, "y":0}, + {"label":"~", "x":0, "y":1.75}, + {"label":"!", "x":1, "y":1.75}, + {"label":"@", "x":2, "y":1.75}, + {"label":"#", "x":3, "y":1.75}, + {"label":"$", "x":4, "y":1.75}, + {"label":"%", "x":5, "y":1.75}, + {"label":"^", "x":6, "y":1.75}, + {"label":"&", "x":7, "y":1.75}, + {"label":"*", "x":8, "y":1.75}, + {"label":"(", "x":9, "y":1.75}, + {"label":")", "x":10, "y":1.75}, + {"label":"_", "x":11, "y":1.75}, + {"label":"+", "x":12, "y":1.75}, + {"label":"Backspace", "x":13, "y":1.75, "w":2}, + {"label":"Insert", "x":15.5, "y":1.75}, + {"label":"Home", "x":16.5, "y":1.75}, + {"label":"PgUp", "x":17.5, "y":1.75}, + {"label":"Tab", "x":0, "y":2.75, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.75}, + {"label":"W", "x":2.5, "y":2.75}, + {"label":"E", "x":3.5, "y":2.75}, + {"label":"R", "x":4.5, "y":2.75}, + {"label":"T", "x":5.5, "y":2.75}, + {"label":"Y", "x":6.5, "y":2.75}, + {"label":"U", "x":7.5, "y":2.75}, + {"label":"I", "x":8.5, "y":2.75}, + {"label":"O", "x":9.5, "y":2.75}, + {"label":"P", "x":10.5, "y":2.75}, + {"label":"{", "x":11.5, "y":2.75}, + {"label":"}", "x":12.5, "y":2.75}, + {"label":"|", "x":13.5, "y":2.75, "w":1.5}, + {"label":"Delete", "x":15.5, "y":2.75}, + {"label":"End", "x":16.5, "y":2.75}, + {"label":"PgDn", "x":17.5, "y":2.75}, + {"label":"Caps Lock", "x":0, "y":3.75, "w":1.25}, + {"label":"A", "x":1.75, "y":3.75}, + {"label":"S", "x":2.75, "y":3.75}, + {"label":"D", "x":3.75, "y":3.75}, + {"label":"F", "x":4.75, "y":3.75}, + {"label":"G", "x":5.75, "y":3.75}, + {"label":"H", "x":6.75, "y":3.75}, + {"label":"J", "x":7.75, "y":3.75}, + {"label":"K", "x":8.75, "y":3.75}, + {"label":"L", "x":9.75, "y":3.75}, + {"label":":", "x":10.75, "y":3.75}, + {"label":"\"", "x":11.75, "y":3.75}, + {"label":"Enter", "x":12.75, "y":3.75, "w":2.25}, + {"label":"Shift", "x":0, "y":4.75, "w":2.25}, + {"label":"Z", "x":2.25, "y":4.75}, + {"label":"X", "x":3.25, "y":4.75}, + {"label":"C", "x":4.25, "y":4.75}, + {"label":"V", "x":5.25, "y":4.75}, + {"label":"B", "x":6.25, "y":4.75}, + {"label":"N", "x":7.25, "y":4.75}, + {"label":"M", "x":8.25, "y":4.75}, + {"label":"<", "x":9.25, "y":4.75}, + {"label":">", "x":10.25, "y":4.75}, + {"label":"?", "x":11.25, "y":4.75}, + {"label":"Shift", "x":12.25, "y":4.75, "w":2.75}, + {"label":"\u2191", "x":16.5, "y":4.75}, + {"label":"Ctrl", "x":0, "y":5.75, "w":1.5}, + {"label":"Alt", "x":2.5, "y":5.75, "w":1.5}, + {"x":4, "y":5.75, "w":7}, + {"label":"Alt", "x":11, "y":5.75, "w":1.5}, + {"label":"Ctrl", "x":13.5, "y":5.75, "w":1.5}, + {"label":"\u2190", "x":15.5, "y":5.75}, + {"label":"\u2193", "x":16.5, "y":5.75}, + {"label":"\u2192", "x":17.5, "y":5.75} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/ai03/quasar/keymaps/ai03/keymap.c b/keyboards/ai03/quasar/keymaps/ai03/keymap.c new file mode 100644 index 000000000..e2dca55cd --- /dev/null +++ b/keyboards/ai03/quasar/keymaps/ai03/keymap.c @@ -0,0 +1,61 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#include QMK_KEYBOARD_H + + +/* + * K702, K503, K504, K604, K704, K706, K708, K609, K509, K506, K406, K411, K412, K415, K315, K114, \ + * K502, K402, K403, K404, K405, K505, K507, K407, K408, K409, K410, K510, K508, K606, K512, K514, K513, \ + * K602, K302, K303, K304, K305, K605, K607, K307, K308, K309, K310, K610, K608, K206, K511, K414, K413, \ + * K603, K202, K203, K204, K205, K705, K707, K207, K208, K209, K210, K710, K106, \ + * K601, K102, K103, K104, K105, K005, K007, K107, K108, K109, K010, K101, K714, \ + * K500, K715, K006, K015, K100, K014, K011, K012 \ + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, + KC_LGUI, 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_INS, KC_HOME, 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_DEL, KC_END, KC_PGDN, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + 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_UP, + KC_LCTL, KC_LALT, KC_SPC, KC_GRV, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( /* FN */ + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, 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, _______, _______, _______, + KC_CAPS, _______, KC_UP, _______, _______, _______, _______, _______, KC_PGUP, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_VOLU, KC_VOLD, KC_HOME, KC_PGDN, KC_END, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_PGUP, + _______, _______, _______, _______, KC_BSPC, KC_HOME, KC_PGDN, KC_END + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/ai03/quasar/keymaps/ai03/readme.md b/keyboards/ai03/quasar/keymaps/ai03/readme.md new file mode 100644 index 000000000..6f6a0b4fe --- /dev/null +++ b/keyboards/ai03/quasar/keymaps/ai03/readme.md @@ -0,0 +1,3 @@ +# The ai03 keymap for Quasar + +Focuses functionality mainly into the 60% cluster. \ No newline at end of file diff --git a/keyboards/ai03/quasar/keymaps/default/keymap.c b/keyboards/ai03/quasar/keymaps/default/keymap.c new file mode 100644 index 000000000..6de45951a --- /dev/null +++ b/keyboards/ai03/quasar/keymaps/default/keymap.c @@ -0,0 +1,61 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#include QMK_KEYBOARD_H + + +/* + * K702, K503, K504, K604, K704, K706, K708, K609, K509, K506, K406, K411, K412, K415, K315, K114, \ + * K502, K402, K403, K404, K405, K505, K507, K407, K408, K409, K410, K510, K508, K606, K512, K514, K513, \ + * K602, K302, K303, K304, K305, K605, K607, K307, K308, K309, K310, K610, K608, K206, K511, K414, K413, \ + * K603, K202, K203, K204, K205, K705, K707, K207, K208, K209, K210, K710, K106, \ + * K601, K102, K103, K104, K105, K005, K007, K107, K108, K109, K010, K101, K714, \ + * K500, K715, K006, K015, K100, K014, K011, K012 \ + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, 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_INS, KC_HOME, 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_DEL, KC_END, KC_PGDN, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + 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_UP, + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( /* FN */ + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/ai03/quasar/keymaps/default/readme.md b/keyboards/ai03/quasar/keymaps/default/readme.md new file mode 100644 index 000000000..bcfeda1ad --- /dev/null +++ b/keyboards/ai03/quasar/keymaps/default/readme.md @@ -0,0 +1,4 @@ +# The default keymap for Quasar + +Caps lock behaves as Fn/Layer. Press caps+esc for reset, caps+tab for caps lock. +The rest is basic WKL TKL. \ No newline at end of file diff --git a/keyboards/ai03/quasar/quasar.c b/keyboards/ai03/quasar/quasar.c new file mode 100644 index 000000000..ac8b75177 --- /dev/null +++ b/keyboards/ai03/quasar/quasar.c @@ -0,0 +1,51 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#include "quasar.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/ai03/quasar/quasar.h b/keyboards/ai03/quasar/quasar.h new file mode 100644 index 000000000..4125f81b5 --- /dev/null +++ b/keyboards/ai03/quasar/quasar.h @@ -0,0 +1,45 @@ +/* Copyright 2019 Ryota Goto + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K702, K503, K504, K604, K704, K706, K708, K609, K509, K506, K406, K411, K412, K415, K315, K114, \ + K502, K402, K403, K404, K405, K505, K507, K407, K408, K409, K410, K510, K508, K606, K512, K514, K513, \ + K602, K302, K303, K304, K305, K605, K607, K307, K308, K309, K310, K610, K608, K206, K511, K414, K413, \ + K603, K202, K203, K204, K205, K705, K707, K207, K208, K209, K210, K710, K106, \ + K601, K102, K103, K104, K105, K005, K007, K107, K108, K109, K010, K101, K714, \ + K500, K715, K006, K015, K100, K014, K011, K012 \ +) \ +{ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K005, K006, K007, KC_NO, KC_NO, K010, K011, K012, KC_NO, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, KC_NO, KC_NO, KC_NO, KC_NO, K114, KC_NO }, \ + { KC_NO, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, K302, K303, K304, K305, KC_NO, K307, K308, K309, K310, KC_NO, KC_NO, KC_NO, KC_NO, K315 }, \ + { KC_NO, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415 }, \ + { K500, KC_NO, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, KC_NO }, \ + { KC_NO, K601, K602, K603, K604, K605, K606, K607, K608, K609, K610, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, K702, KC_NO, K704, K705, K706, K707, K708, KC_NO, K710, KC_NO, KC_NO, KC_NO, K714, K715 } \ +} diff --git a/keyboards/ai03/quasar/readme.md b/keyboards/ai03/quasar/readme.md new file mode 100644 index 000000000..e0ea30ac9 --- /dev/null +++ b/keyboards/ai03/quasar/readme.md @@ -0,0 +1,15 @@ +# Quasar + +![Quasar](https://i.imgur.com/XIbX2Pw.jpg) + +Replacement controller for the IBM Model M Space Saving keyboard + +Keyboard Maintainer: [ai03](https://github.com/ai03-2725) +Hardware Supported: The Quasar PCB +Hardware Availability: [Source available on GitHub](https://github.com/ai03-2725/Quasar/) + +Make example for this keyboard (after setting up your build environment): + + make ai03/quasar:default + +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). diff --git a/keyboards/ai03/quasar/rules.mk b/keyboards/ai03/quasar/rules.mk new file mode 100644 index 000000000..afbd1de14 --- /dev/null +++ b/keyboards/ai03/quasar/rules.mk @@ -0,0 +1,80 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +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 = no # Console for debug(+400) +COMMAND_ENABLE = yes # 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) From fb6e5fd426aa54171c6e48d5207285b410842436 Mon Sep 17 00:00:00 2001 From: Oliver Ladner Date: Fri, 28 Jun 2019 22:43:33 +0200 Subject: [PATCH 274/341] L1 work --- keyboards/dz60/keymaps/weeheavy_2.25_lshift/keymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/dz60/keymaps/weeheavy_2.25_lshift/keymap.c b/keyboards/dz60/keymaps/weeheavy_2.25_lshift/keymap.c index 2ca5bc538..6100bf718 100644 --- a/keyboards/dz60/keymaps/weeheavy_2.25_lshift/keymap.c +++ b/keyboards/dz60/keymaps/weeheavy_2.25_lshift/keymap.c @@ -22,9 +22,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [L1] = LAYOUT_all( RESET, 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_B, RGB_TOG, RGB_MOD, RGB_M_K, RGB_M_R, ____, ____, KC_PSCR, ____, KC_PAUS, ____, ____, ____, RESET, - ____, RGB_HUI, RGB_HUD, ____, ____, ____, ____, KC_INS, KC_HOME, KC_PGUP, ____, ____, ____, - ____, ____, RGB_SAI, RGB_SAD, ____, ____, ____, ____, ____, KC_END, KC_PGDN, ____, KC_MPLY, KC_VOLU, KC_MUTE, - ____, RGB_VAI, RGB_VAD, ____, ____, ____, ____, ____, KC_MPRV, KC_VOLD, KC_MNXT), + ____, RGB_HUI, RGB_HUD, KC_DEL, ____, ____, ____, KC_INS, KC_HOME, KC_PGUP, ____, ____, ____, + ____, ____, RGB_SAI, RGB_SAD, ____, ____, ____, ____, ____, KC_END, KC_PGDN, ____, KC_MPLY, KC_MUTE, KC_MUTE, + ____, RGB_VAI, RGB_VAD, ____, ____, ____, ____, KC_MPRV, KC_VOLU, KC_VOLD, KC_MNXT), }; From 8638b7881908cb25a92267a6d1358c29b2bb7fbf Mon Sep 17 00:00:00 2001 From: jotix <47826561+jotix@users.noreply.github.com> Date: Sat, 29 Jun 2019 15:22:34 -0300 Subject: [PATCH 275/341] [Keymap] jotix ortho_4x12 layout match new keycaps (#6209) * jotix ortho_4x12 layout match new keycaps * Update layouts/community/ortho_4x12/jotix/keymap.c Co-Authored-By: fauxpark * Update layouts/community/ortho_4x12/jotix/keymap.c Co-Authored-By: fauxpark * Update layouts/community/ortho_4x12/jotix/keymap.c Co-Authored-By: fauxpark * get off layout_kc * update readme * get off the numpad --- layouts/community/ortho_4x12/jotix/config.h | 1 - layouts/community/ortho_4x12/jotix/keymap.c | 91 ++++++++------------ layouts/community/ortho_4x12/jotix/readme.md | 2 +- 3 files changed, 37 insertions(+), 57 deletions(-) delete mode 100644 layouts/community/ortho_4x12/jotix/config.h diff --git a/layouts/community/ortho_4x12/jotix/config.h b/layouts/community/ortho_4x12/jotix/config.h deleted file mode 100644 index 9ec4fd1a9..000000000 --- a/layouts/community/ortho_4x12/jotix/config.h +++ /dev/null @@ -1 +0,0 @@ -#define TAPPING_TOGGLE 2 diff --git a/layouts/community/ortho_4x12/jotix/keymap.c b/layouts/community/ortho_4x12/jotix/keymap.c index e5f539181..c6655afa5 100644 --- a/layouts/community/ortho_4x12/jotix/keymap.c +++ b/layouts/community/ortho_4x12/jotix/keymap.c @@ -1,15 +1,14 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; - enum layers { - _QWERTY, - _LOWER, - _RAISE, + _QWERTY, + _LOWER, + _RAISE, }; -#define LOWER TT(_LOWER) -#define RAISE TT(_RAISE) +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define TGLOWER TG(_LOWER) static bool is_ctl_pressed; static bool is_esc_pressed; @@ -17,65 +16,47 @@ static bool is_bspc_pressed; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* qwerty - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | esc | Q | W | E | R | T | Y | U | I | O | P | bspc | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | tab | A | S | D | F | G | H | J | K | L | ; | ' | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | lshift | Z | X | C | V | B | N | M | , | . | / | enter | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | lctrl | lgui | lalt | ralt | lower | space | space | raise | right | down | up | right | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - */ -[_QWERTY] = LAYOUT_ortho_4x12 ( - 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_ENT, - KC_LCTL, KC_LGUI, KC_LALT, KC_RALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -), +[_QWERTY] = LAYOUT_ortho_4x12 ( +// ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ + 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_ENT, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM, KC_DOT, KC_UP, KC_SLSH, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + KC_LCTL,KC_LGUI,KC_LALT,TGLOWER, LOWER , KC_SPC, KC_SPC, RAISE ,KC_RALT,KC_LEFT,KC_DOWN,KC_RGHT +// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ +), -/* lower - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | vol- | mute | vol+ | | | | | | | | | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | prev | play | next | | | | | | | | | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | | | | | | | | | | | | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - */ [_LOWER] = LAYOUT_ortho_4x12 ( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ + KC_GRV, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,_______, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______, KC_F1 , KC_F2 , KC_F3, KC_F4 ,_______,KC_LBRC,KC_RBRC,KC_BSLS,KC_QUOT,_______,_______, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______, KC_F5 , KC_F6 , KC_F7 , KC_F8 ,_______,KC_MINS, KC_EQL,_______,_______,_______,_______, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ +// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ ), -/* raise - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | del | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | caps | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | F7 | F8 | F9 | F10 | F11 | F12 | _ | + | { | } | | | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | | | | | | | | home | pgdn | pgup | end | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - */ [_RAISE] = LAYOUT_ortho_4x12 ( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, - KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, - _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +// ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ + KC_TILD,KC_EXLM, KC_AT ,KC_HASH, KC_DLR,KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN, KC_DEL, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + KC_CAPS, KC_F9 , KC_F10, KC_F11, KC_F12,_______,KC_LCBR,KC_RCBR,KC_PIPE,KC_DQUO,_______,_______, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______,_______,_______,_______,_______,_______,KC_UNDS,KC_PLUS,KC_HOME,KC_PGUP,KC_VOLU,_______, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______,_______,_______,_______,_______,_______,_______,_______, KC_END,KC_PGDN,KC_VOLD,KC_MUTE +// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ ), }; uint32_t layer_state_set_user(uint32_t state) { #ifdef JOTANCK_LEDS - switch (biton32(state)) { + switch (biton32(state)) { case _LOWER: writePinHigh(JOTANCK_LED1); writePinLow(JOTANCK_LED2); diff --git a/layouts/community/ortho_4x12/jotix/readme.md b/layouts/community/ortho_4x12/jotix/readme.md index ed4aa7414..ec1fb7ba9 100644 --- a/layouts/community/ortho_4x12/jotix/readme.md +++ b/layouts/community/ortho_4x12/jotix/readme.md @@ -1,6 +1,6 @@ # Jotix ortho 4x12 keymap -![keymap](https://i.imgur.com/ocZCRkN.png) +![keymap](https://i.imgur.com/CpZCcuy.png) Tested on: From 86e0420b42de1797075a88c9b34f0319cea5c1dd Mon Sep 17 00:00:00 2001 From: Isaac Elenbaas <34344969+IsaacElenbaas@users.noreply.github.com> Date: Sat, 29 Jun 2019 14:31:10 -0400 Subject: [PATCH 276/341] [Keymap] New Planck 2x2U keymap (#5519) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Initial keymapping * Removed unneccessary config files * Update readme.md * Updated symbol locations, tap dance on parentheses for brackets. * Update readme.md * Fixed layout image inconsistencies * More quality shift key layer control, swapped enter + shift enter * Keyap tweaks and config cleanup * Almost compiling, still has layout reference issues. * Finally compiling. 2x2u layout (default, not mine) had nonexistent keys on it * Super minor changes * Ctrl+Bksp after first tap * Changed bind so un/lock is explicit to work with remote un/locking * Added keyboard passwords please don't hate me * Changed backspace functionality and added em dash * Changed to send_string because it's preferred for macros * Minor fixes * Removed global redefinition and fixed possible issue between 6KRO and NKRO * Cleanup * Layer names, password layer is OSL over toggle * Hopefully now in QMK preferred format. * Blank passwords.c I realized with me excluding this it wouldn't compile - so adding a blank one. * Fixed OSLs not cancelling after tapping term * Matrix change. KC_NO instead of repeating. * Unneeded line. Co-Authored-By: IsaacElenbaas <34344969+IsaacElenbaas@users.noreply.github.com> * Fixed return statements to work with after-press functions * External image host * Removed image from github * Removed unneccessary rules.mk lines and fixed tabbing * Typos * Fixes upon part arrival. * Final changes and bug fixes * Preventing KC_NO from waking monitors. * Fix to rest of matrices In response to https://github.com/evillemez/qmk_firmware/issues/1—the rest have the same problem. The switch of k37 for k36 is just for consistency between that and the 2x2u. * Workaround for #6214, minor changes, CRLF change in passwords because it won't leave my modified no matter what I do. --- .../planck/keymaps/dvorak2space/config.h | 3 + .../planck/keymaps/dvorak2space/keymap.c | 242 ++++++++++++++++++ .../planck/keymaps/dvorak2space/passwords.c | 28 ++ .../planck/keymaps/dvorak2space/readme.md | 5 + .../planck/keymaps/dvorak2space/rules.mk | 20 ++ 5 files changed, 298 insertions(+) create mode 100644 keyboards/planck/keymaps/dvorak2space/config.h create mode 100644 keyboards/planck/keymaps/dvorak2space/keymap.c create mode 100644 keyboards/planck/keymaps/dvorak2space/passwords.c create mode 100644 keyboards/planck/keymaps/dvorak2space/readme.md create mode 100644 keyboards/planck/keymaps/dvorak2space/rules.mk diff --git a/keyboards/planck/keymaps/dvorak2space/config.h b/keyboards/planck/keymaps/dvorak2space/config.h new file mode 100644 index 000000000..0927fa016 --- /dev/null +++ b/keyboards/planck/keymaps/dvorak2space/config.h @@ -0,0 +1,3 @@ +#pragma once +#define TAPPING_TOGGLE 1 +#define PERMISSIVE_HOLD diff --git a/keyboards/planck/keymaps/dvorak2space/keymap.c b/keyboards/planck/keymaps/dvorak2space/keymap.c new file mode 100644 index 000000000..4b0775945 --- /dev/null +++ b/keyboards/planck/keymaps/dvorak2space/keymap.c @@ -0,0 +1,242 @@ +#include QMK_KEYBOARD_H +#include "passwords.c" //Instead of extern just to cut down on compile time. Holds a single array. +#define MOUSEL KC_BTN1 +#define MOUSER KC_BTN2 +#define CTRLL LCTL(KC_LEFT) +#define CTRLR LCTL(KC_RGHT) +#define CAD LCTL(LALT(KC_DEL)) + +#define BASE_L 0 +#define SHFT_L 1 +#define MOD_L 2 +#define NAV_L 3 +#define AHK_L 4 +#define LOCK_L 5 +#define PASS_L 6 + +static host_driver_t *host_driver = 0; + +enum { + HK_SLP = SAFE_RANGE, + HK_IF, + HK_ELSE, + HK_COSL +}; + +enum { + FB = 0, + LPN, + RPN, + BCK, + DSH +}; + +enum { + SINGLE_TAP = 1, + SINGLE_HOLD = 2, + DOUBLE_TAP = 3, + DOUBLE_HOLD = 4, + DOUBLE_SINGLE_TAP = 5, //Distinguishes between double tapping and typing, "tapping", for example. Not sure how accurate it is, and I have no need, so avoiding it at the moment. + TRIPLE_TAP = 6, + TRIPLE_HOLD = 7 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Base + * ,-----------------------------------------------------------------------------------. + * | Tab | ' | , | . | p | y | f | g | c | r | l | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Nav | a | o | e | u | i | d | h | t | n | s | Enter| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shft | ; | q | j | k | x | b | m | w | v | z | Shft | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | RClk | LClk | Ctrl | Space | Modifier | GUI | VolD | VolU |Macros| + * `-----------------------------------------------------------------------------------' + */ + [0] = LAYOUT_planck_2x2u( + KC_TAB, KC_QUOT,KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, TD(BCK), + MO(NAV_L),KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENT, + KC_LSFT, KC_SCLN,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_ESC, MOUSER, MOUSEL, KC_LCTL, KC_SPC, MO(MOD_L), KC_LGUI, KC_VOLD, KC_VOLU, OSL(AHK_L) + ), +/* Custom Shifts + * ,-----------------------------------------------------------------------------------. + * | | | ? | ! | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [1] = LAYOUT_planck_2x2u( + KC_TRNS,KC_TRNS,KC_SLSH,KC_1, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_NO, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS + ), +/* Modifier + * ,-----------------------------------------------------------------------------------. + * | Tab | + | - | * | / \ | if | else | ( [ | ) ] | { | } | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | = | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Enter| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | ` | < | > | & | | | _ | $ | @ | # | % | ^ | ~ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | Space | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [2] = LAYOUT_planck_2x2u( + KC_TRNS,KC_PLUS,TD(DSH),KC_ASTR,TD(FB), HK_IF, HK_ELSE,TD(LPN),TD(RPN),KC_LCBR,KC_RCBR,KC_TRNS, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + KC_GRV, KC_LT, KC_GT, KC_AMPR,KC_PIPE,KC_UNDS,KC_DLR, KC_AT, KC_HASH,KC_PERC,KC_CIRC,LSFT(KC_GRV), + KC_NO, KC_NO, KC_NO, KC_NO, KC_SPC, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO + ), +//Nav + [3] = LAYOUT_planck_2x2u( + KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME,KC_UP, KC_END, KC_NO, KC_TRNS, + KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, CTRLL, KC_LEFT,KC_DOWN,KC_RGHT, CTRLR, KC_TRNS, + KC_LSFT,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), +//AHK-Bindable Macros + [4] = LAYOUT_planck_2x2u( + KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, + LCTL(KC_F13),LCTL(KC_F14),LCTL(KC_F15),LCTL(KC_F16),LCTL(KC_F17),LCTL(KC_F18),LCTL(KC_F19),LCTL(KC_F20),LCTL(KC_F21),LCTL(KC_F22),LCTL(KC_F23),LCTL(KC_F24), + LSFT(KC_F13),LSFT(KC_F14),LSFT(KC_F15),LSFT(KC_F16),LSFT(KC_F17),LSFT(KC_F18),LSFT(KC_F19),LSFT(KC_F20),LSFT(KC_F21),LSFT(KC_F22),LSFT(KC_F23),LSFT(KC_F24), + RESET, LALT(KC_F14),LALT(KC_F15),OSL(PASS_L), CAD, LALT(KC_F19), LALT(KC_F21),LALT(KC_F22),HK_SLP, HK_COSL + ), +//Locked Screen + [5] = LAYOUT_planck_2x2u( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, HK_SLP, KC_NO + ), +//Passwords (by first letter of service name, at least better than just one) + [6] = LAYOUT_planck_2x2u( + KC_NO, KC_NO, KC_NO, KC_NO, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_NO, + KC_NO, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_NO, + KC_NO, KC_NO, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_NO, + KC_NO, KC_NO, KC_NO, HK_COSL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { //X_KEY doesn't support aliases + switch(keycode) { + //if shift pressed and not shift layer or released and other shift not pressed + //in separate things because MOD_BIT (probably?) isn't toggled until after this returns true and shift is actually toggled + case KC_LSFT: //if pressed and not shift layer or released and other shift not pressed + if((record->event.pressed && IS_LAYER_OFF(SHFT_L)) || (!record->event.pressed && !(get_mods() & MOD_BIT(KC_RSFT)))) { layer_invert(SHFT_L); } + break; + case KC_RSFT: + if((record->event.pressed && IS_LAYER_OFF(SHFT_L)) || (!record->event.pressed && !(get_mods() & MOD_BIT(KC_LSFT)))) { layer_invert(SHFT_L); } + break; + case KC_ENT: //won't repeat on hold and I can't find a solution other than hardcoding timers but I kinda prefer it anyway. Swaps enter and shift enter + if(record->event.pressed) { + (IS_LAYER_ON(SHFT_L)) //if shifted release correct shift, send, and press same shift, else send shift enter + ? (get_mods() & MOD_BIT(KC_LSFT)) + ? SEND_STRING(SS_UP(X_LSHIFT) SS_TAP(X_ENTER) SS_DOWN(X_LSHIFT)) + : SEND_STRING(SS_UP(X_RSHIFT) SS_TAP(X_ENTER) SS_DOWN(X_RSHIFT)) + : SEND_STRING(SS_LSFT(SS_TAP(X_ENTER))); + } + return false; + case HK_IF: + if(record->event.pressed) { SEND_STRING("if"); } + break; + case HK_ELSE: + if(record->event.pressed) { SEND_STRING("else"); } + break; + case HK_COSL: + clear_keyboard(); + break; + case HK_SLP: + if(record->event.pressed) { + if(IS_LAYER_OFF(LOCK_L)) { + host_driver = host_get_driver(); + SEND_STRING(SS_LALT(SS_TAP(X_F23))); + host_set_driver(0); + } + else { + host_set_driver(host_driver); + SEND_STRING(SS_LALT(SS_TAP(X_F24))); + } + return false; + } + layer_invert(LOCK_L); + if(IS_LAYER_ON(AHK_L)) + layer_invert(AHK_L); + break; + default: + if(IS_LAYER_ON(PASS_L) && keycode <= KC_Z) { + SEND_STRING(passwords[keycode - KC_A]); + layer_invert(PASS_L); + return false; + } + } + return true; +}; + +//tapdance state evaluation +int cur_dance(qk_tap_dance_state_t *state) { + int press = 0; + switch(state->count) { + case 1: + press = (state->interrupted || !state->pressed) + ? SINGLE_TAP + : SINGLE_HOLD; + break; + case 2: + press = DOUBLE_TAP; + break; + case 3: + press = TRIPLE_TAP; + } + return press; +} + +void back_tap(qk_tap_dance_state_t *state, void *user_data) { tap_code(KC_BSPACE); } + +void back_finished(qk_tap_dance_state_t *state, void *user_data) { if(!(state->interrupted || !state->pressed)) tap_code16(LCTL(KC_BSPACE)); } + +void slash_finished(qk_tap_dance_state_t *state, void *user_data) { + int td_state = cur_dance(state); + switch(td_state) { + case SINGLE_TAP: + clear_mods(); + clear_weak_mods(); + tap_code(KC_SLSH); + break; + case DOUBLE_TAP: + tap_code(KC_NUBS); + } +} + +void dash_finished(qk_tap_dance_state_t *state, void *user_data) { + int td_state = cur_dance(state); + switch(td_state) { + case SINGLE_TAP: + tap_code(KC_PMNS); + break; + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_LALT)); + tap_code(KC_KP_0); + tap_code(KC_KP_1); + tap_code(KC_KP_5); + tap_code(KC_KP_1); + unregister_mods(MOD_BIT(KC_LALT)); + break; + case DOUBLE_TAP: + tap_code(KC_PMNS); + tap_code(KC_PMNS); + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [LPN] = ACTION_TAP_DANCE_DOUBLE(KC_LPRN, KC_LBRC), + [RPN] = ACTION_TAP_DANCE_DOUBLE(KC_RPRN, KC_RBRC), + [FB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, slash_finished, NULL), + [BCK] = ACTION_TAP_DANCE_FN_ADVANCED(back_tap, back_finished, NULL), //each tap, on finished, and reset. Normally register_code on press unregister on reset so keys can be held down. + [DSH] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dash_finished, NULL) +}; diff --git a/keyboards/planck/keymaps/dvorak2space/passwords.c b/keyboards/planck/keymaps/dvorak2space/passwords.c new file mode 100644 index 000000000..161c564dd --- /dev/null +++ b/keyboards/planck/keymaps/dvorak2space/passwords.c @@ -0,0 +1,28 @@ +char *passwords[26] = { + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" +}; diff --git a/keyboards/planck/keymaps/dvorak2space/readme.md b/keyboards/planck/keymaps/dvorak2space/readme.md new file mode 100644 index 000000000..1844a57f3 --- /dev/null +++ b/keyboards/planck/keymaps/dvorak2space/readme.md @@ -0,0 +1,5 @@ +![Keyboard Layout](https://i.imgur.com/9jYjllM.png) + +# IsaacElenbaas's Planck Layout + +Split spacebar, Dvorak. Bottom right button leads to layer with lots of things to be mapped in AutoHotkey. The ones I use (of which the best are sleep, which turns off the monitors and locks all inputs, rebinding keyboard-only mouse inputs, and redirecting media keys to a specific player) can be found [here.](https://github.com/IsaacElenbaas/personal_scripts/blob/master/Keyboard.ahk) Capslock goes to a right-hand navigation layer, there is a custom layer when holding shift, holding dash gives an em dash, holding backspace deletes a word, and I have a obfuscation-based password system you probably shouldn't use, but the rest is pretty standard. diff --git a/keyboards/planck/keymaps/dvorak2space/rules.mk b/keyboards/planck/keymaps/dvorak2space/rules.mk new file mode 100644 index 000000000..59f9f1dff --- /dev/null +++ b/keyboards/planck/keymaps/dvorak2space/rules.mk @@ -0,0 +1,20 @@ +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +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 = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work. Can make windows not recognize device. +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +API_SYSEX_ENABLE = no +TAP_DANCE_ENABLE = yes + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +LAYOUTS_HAS_RGB = no From c87851fcd5bd505fa7cc87ed84fbaa9d2a4f2f38 Mon Sep 17 00:00:00 2001 From: Oliver Ladner Date: Sat, 29 Jun 2019 23:35:19 +0200 Subject: [PATCH 277/341] add play/pause and brightness to layer 1 --- keyboards/dz60/keymaps/weeheavy_2.25_lshift/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/dz60/keymaps/weeheavy_2.25_lshift/keymap.c b/keyboards/dz60/keymaps/weeheavy_2.25_lshift/keymap.c index 6100bf718..38e4519b3 100644 --- a/keyboards/dz60/keymaps/weeheavy_2.25_lshift/keymap.c +++ b/keyboards/dz60/keymaps/weeheavy_2.25_lshift/keymap.c @@ -21,9 +21,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Utility layer - RGB and multimedia control, reset and additional "b" button [L1] = LAYOUT_all( RESET, 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_B, RGB_TOG, RGB_MOD, RGB_M_K, RGB_M_R, ____, ____, KC_PSCR, ____, KC_PAUS, ____, ____, ____, RESET, + KC_B, RGB_TOG, RGB_MOD, RGB_M_K, RGB_M_R, ____, ____, KC_PSCR, ____, KC_PAUS, KC_BRID, KC_BRIU, ____, RESET, ____, RGB_HUI, RGB_HUD, KC_DEL, ____, ____, ____, KC_INS, KC_HOME, KC_PGUP, ____, ____, ____, - ____, ____, RGB_SAI, RGB_SAD, ____, ____, ____, ____, ____, KC_END, KC_PGDN, ____, KC_MPLY, KC_MUTE, KC_MUTE, + ____, ____, RGB_SAI, RGB_SAD, ____, ____, ____, ____, ____, KC_END, KC_PGDN, KC_MPLY, ____, KC_MUTE, KC_MUTE, ____, RGB_VAI, RGB_VAD, ____, ____, ____, ____, KC_MPRV, KC_VOLU, KC_VOLD, KC_MNXT), }; From c2574445095a1f06474eec38912a57ec2790b16a Mon Sep 17 00:00:00 2001 From: Oliver Ladner Date: Sat, 29 Jun 2019 23:49:14 +0200 Subject: [PATCH 278/341] update README --- keyboards/dz60/keymaps/weeheavy_2.25_lshift/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/dz60/keymaps/weeheavy_2.25_lshift/README.md b/keyboards/dz60/keymaps/weeheavy_2.25_lshift/README.md index adb1175d8..6ff8d9e67 100644 --- a/keyboards/dz60/keymaps/weeheavy_2.25_lshift/README.md +++ b/keyboards/dz60/keymaps/weeheavy_2.25_lshift/README.md @@ -1,4 +1,4 @@ -![DZ60 ANSI with arrow cluster](https://i.imgur.com/014XWvY.png) +![DZ60 ANSI with arrow cluster](https://i.imgur.com/hX6rMcm.png) # weeheavy's DZ60 layout @@ -45,9 +45,9 @@ Specialities: Specialities: -* F1-F12 keys when holding FN1 -* Movement cluster on the right hand side +* F1-F12 keys when holding FN * Multimedia cluster on the bottom right * RGB config on the left hand side * Reset key on ESC and backslash location +* Brightness control top right * Additional "B" key (a learning from my mistakes) From c1c0cf73ce0ed4301d7f3d7af0b352d9385da896 Mon Sep 17 00:00:00 2001 From: shela Date: Mon, 1 Jul 2019 15:32:59 +0900 Subject: [PATCH 279/341] fix typo --- docs/feature_advanced_keycodes.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index a6ddf458c..f748ccd70 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -256,10 +256,10 @@ If you press a Mod Tap key, tap another key (press and release) and then release For Instance: -- `SHFT_T(KC_A)` Down +- `SFT_T(KC_A)` Down - `KC_X` Down - `KC_X` Up -- `SHFT_T(KC_A)` Up +- `SFT_T(KC_A)` Up Normally, if you do all this within the `TAPPING_TERM` (default: 200ms) this will be registered as `ax` by the firmware and host system. With permissive hold enabled, this modifies how this is handled by considering the Mod Tap keys as a Mod if another key is tapped, and would registered as `X` (`SHIFT`+`x`). @@ -279,9 +279,9 @@ Setting `Ignore Mod Tap Interrupt` requires holding both keys for the `TAPPING_ For Instance: -- `SHFT_T(KC_A)` Down +- `SFT_T(KC_A)` Down - `KC_X` Down -- `SHFT_T(KC_A)` Up +- `SFT_T(KC_A)` Up - `KC_X` Up Normally, this would send `X` (`SHIFT`+`x`). With `Ignore Mod Tap Interrupt` enabled, holding both keys are required for the `TAPPING_TERM` to register the hold action. A quick tap will output `ax` in this case, while a hold on both will still output `X` (`SHIFT`+`x`). @@ -303,11 +303,11 @@ When the user holds a key after tap, this repeats the tapped key rather to hold Example: -- SHFT_T(KC_A) Down -- SHFT_T(KC_A) Up -- SHFT_T(KC_A) Down +- SFT_T(KC_A) Down +- SFT_T(KC_A) Up +- SFT_T(KC_A) Down - wait more than tapping term... -- SHFT_T(KC_A) Up +- SFT_T(KC_A) Up With default settings, `a` will be sent on the first release, then `a` will be sent on the second press allowing the computer to trigger its auto repeat function. From 64aef1f4c9296dc63d5e7b27102a276f84389a26 Mon Sep 17 00:00:00 2001 From: Franklin Harding <32021905+fharding1@users.noreply.github.com> Date: Mon, 1 Jul 2019 00:49:57 -0700 Subject: [PATCH 280/341] [Keyboard] Add PDXKBC badge keyboard (#6218) * Add PDXKBC badge * Better custom keycodes enum formatting * Remove #MCU Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Proper README spacing * Rename DEBOUNCING_DELAY to DEBOUNCE Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Fix keyboard maintainer github link * Add info.json --- keyboards/pdxkbc/config.h | 251 +++++++++++++++++++++ keyboards/pdxkbc/info.json | 12 + keyboards/pdxkbc/keymaps/default/config.h | 19 ++ keyboards/pdxkbc/keymaps/default/keymap.c | 65 ++++++ keyboards/pdxkbc/keymaps/default/readme.md | 1 + keyboards/pdxkbc/pdxkbc.c | 51 +++++ keyboards/pdxkbc/pdxkbc.h | 37 +++ keyboards/pdxkbc/readme.md | 17 ++ keyboards/pdxkbc/rules.mk | 80 +++++++ 9 files changed, 533 insertions(+) create mode 100644 keyboards/pdxkbc/config.h create mode 100644 keyboards/pdxkbc/info.json create mode 100644 keyboards/pdxkbc/keymaps/default/config.h create mode 100644 keyboards/pdxkbc/keymaps/default/keymap.c create mode 100644 keyboards/pdxkbc/keymaps/default/readme.md create mode 100644 keyboards/pdxkbc/pdxkbc.c create mode 100644 keyboards/pdxkbc/pdxkbc.h create mode 100644 keyboards/pdxkbc/readme.md create mode 100644 keyboards/pdxkbc/rules.mk diff --git a/keyboards/pdxkbc/config.h b/keyboards/pdxkbc/config.h new file mode 100644 index 000000000..c547bb090 --- /dev/null +++ b/keyboards/pdxkbc/config.h @@ -0,0 +1,251 @@ +/* +Copyright 2019 Franklin Harding + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Franklin Harding +#define PRODUCT pdxkbc +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 2 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F7, B6, F4 } +#define MATRIX_COL_PINS { D1, E6 } +#define UNUSED_PINS { D0, D4, C6, D7, B4, B5, F5, F6, B1, B3, B2 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/pdxkbc/info.json b/keyboards/pdxkbc/info.json new file mode 100644 index 000000000..6c32ea753 --- /dev/null +++ b/keyboards/pdxkbc/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "pdxkbc", + "url": "", + "maintainer": "qmk", + "width": 2, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [{"label":"reddit", "x":0, "y":0}, {"label":"discord", "x":1, "y":0}, {"label":"badge", "x":0, "y":1}, {"label":"hack", "x":1, "y":1}, {"label":"volu", "x":0, "y":2}, {"label":"vold", "x":1, "y":2}] + } + } +} \ No newline at end of file diff --git a/keyboards/pdxkbc/keymaps/default/config.h b/keyboards/pdxkbc/keymaps/default/config.h new file mode 100644 index 000000000..355f2db52 --- /dev/null +++ b/keyboards/pdxkbc/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Franklin Harding + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/pdxkbc/keymaps/default/keymap.c b/keyboards/pdxkbc/keymaps/default/keymap.c new file mode 100644 index 000000000..feb344704 --- /dev/null +++ b/keyboards/pdxkbc/keymaps/default/keymap.c @@ -0,0 +1,65 @@ +/* Copyright 2019 Franklin Harding + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + PDXKBCREDDIT = SAFE_RANGE, + PDXKBCDISCORD, + BADGELIFE, + HACKTHEPLANET +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + PDXKBCREDDIT, PDXKBCDISCORD, + BADGELIFE, HACKTHEPLANET, + KC_VOLU, KC_VOLD + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case PDXKBCREDDIT: + if (record->event.pressed) { + SEND_STRING("https://reddit.com/r/pdxkbc" SS_TAP(X_ENTER)); + } + break; + case PDXKBCDISCORD: + if (record->event.pressed) { + SEND_STRING("https://discordapp.com/invite/bHwjHXh" SS_TAP(X_ENTER)); + } + break; + case BADGELIFE: + if (record->event.pressed) { + SEND_STRING("#badgelife" SS_TAP(X_ENTER)); + } + break; + case HACKTHEPLANET: + if (record->event.pressed) { + SEND_STRING("HACK THE PLANET!" SS_TAP(X_ENTER)); + } + break; + } + + return true; +} + +void matrix_init_user(void) {} + +void matrix_scan_user(void) {} + +void led_set_user(uint8_t usb_led) {} diff --git a/keyboards/pdxkbc/keymaps/default/readme.md b/keyboards/pdxkbc/keymaps/default/readme.md new file mode 100644 index 000000000..1371be848 --- /dev/null +++ b/keyboards/pdxkbc/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for pdxkbc \ No newline at end of file diff --git a/keyboards/pdxkbc/pdxkbc.c b/keyboards/pdxkbc/pdxkbc.c new file mode 100644 index 000000000..26c2d2fe4 --- /dev/null +++ b/keyboards/pdxkbc/pdxkbc.c @@ -0,0 +1,51 @@ +/* Copyright 2019 Franklin Harding + * + * 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 . + */ +#include "pdxkbc.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/pdxkbc/pdxkbc.h b/keyboards/pdxkbc/pdxkbc.h new file mode 100644 index 000000000..4700252a6 --- /dev/null +++ b/keyboards/pdxkbc/pdxkbc.h @@ -0,0 +1,37 @@ +/* Copyright 2019 Franklin Harding + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, \ + k10, k11, \ + k20, k21 \ +) \ +{ \ + { k00, k01 }, \ + { k10, k11 }, \ + { k20, k21 }, \ +} diff --git a/keyboards/pdxkbc/readme.md b/keyboards/pdxkbc/readme.md new file mode 100644 index 000000000..cb2307465 --- /dev/null +++ b/keyboards/pdxkbc/readme.md @@ -0,0 +1,17 @@ +# pdxkbc + +![pdxkbc](https://i.imgur.com/GgNvZcW.jpg) + +A macropad made for the Portland Keyboard Club and DEF CON + +Keyboard Maintainer: [Franklin Harding](https://github.com/fharding1) + +Hardware Supported: https://github.com/fharding1/pdxkbc-badge + +Hardware Availability: https://github.com/fharding1/pdxkbc-badge + +Make example for this keyboard (after setting up your build environment): + + make pdxkbc:default + +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). diff --git a/keyboards/pdxkbc/rules.mk b/keyboards/pdxkbc/rules.mk new file mode 100644 index 000000000..bc370be03 --- /dev/null +++ b/keyboards/pdxkbc/rules.mk @@ -0,0 +1,80 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +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 = yes # 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) From 8be3c6f058698d13f4af8d57d80fed8f5eaf4093 Mon Sep 17 00:00:00 2001 From: tucznak Date: Mon, 1 Jul 2019 09:56:42 +0200 Subject: [PATCH 281/341] [Keyboard] Corrected Tanuki keymap to match physical appearance (#6216) --- keyboards/tanuki/config.h | 3 +++ keyboards/tanuki/keymaps/default/keymap.c | 30 +++++++++++------------ keyboards/tanuki/tanuki.h | 6 ++--- 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/keyboards/tanuki/config.h b/keyboards/tanuki/config.h index 6d728b595..1439ed43e 100644 --- a/keyboards/tanuki/config.h +++ b/keyboards/tanuki/config.h @@ -48,11 +48,14 @@ along with this program. If not, see . #define LOCKING_RESYNC_ENABLE #define RGB_DI_PIN D1 +#ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 5 #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 +#define RGBLIGHT_SLEEP +#endif #define TAPPING_TERM 200 /* diff --git a/keyboards/tanuki/keymaps/default/keymap.c b/keyboards/tanuki/keymaps/default/keymap.c index 29c9071bf..34ca6a639 100644 --- a/keyboards/tanuki/keymaps/default/keymap.c +++ b/keyboards/tanuki/keymaps/default/keymap.c @@ -16,34 +16,34 @@ bool lRGB = true; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BL] = LAYOUT( - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ - KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, TG(_GL), \ + 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, TG(_GL), \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_QUOT, KC_SLSH, KC_ENT, \ - KC_TAB, KC_ESC, KC_LCTL, KC_LALT, KC_COMMA, LT(_DL,KC_SPC), LT(_UL,KC_SPC), KC_DOT, KC_LGUI), + KC_LCTL, KC_LALT, KC_COMMA, LT(_DL,KC_SPC), LT(_UL,KC_SPC), KC_DOT, KC_LGUI), [_DL] = LAYOUT( - KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,\ - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,\ + 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_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,\ KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_F1, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), [_UL] = LAYOUT( - KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_PIPE, KC_BSLS, KC_PLUS, KC_UNDS, KC_MINS, KC_EQL, KC_DEL,\ - KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS, \ + KC_GRV, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_PIPE, KC_BSLS, KC_PLUS, KC_UNDS, KC_MINS, KC_EQL, KC_DEL,\ + KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS, \ KC_TRNS, KC_FN0, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAD, RGB_VAD, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_GRV, KC_TRNS, RGB_MOD, RGB_HUI, KC_TRNS, KC_TRNS, RGB_SAI, RGB_VAI), + KC_TRNS, RGB_MOD, RGB_HUI, KC_TRNS, KC_TRNS, RGB_SAI, RGB_VAI), [_GL] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_SPC, KC_TRNS, KC_TRNS), + KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_SPC, KC_TRNS, KC_TRNS), [_BK] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_FN1, KC_NO, KC_NO), + KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_FN1, KC_NO, KC_NO), }; diff --git a/keyboards/tanuki/tanuki.h b/keyboards/tanuki/tanuki.h index 6b686adaf..9615e44f3 100644 --- a/keyboards/tanuki/tanuki.h +++ b/keyboards/tanuki/tanuki.h @@ -7,10 +7,10 @@ // 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, k0a, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, \ + k31, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, \ + k30, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, \ - k30, k31, k32, k33, k34, k35, k36, k38, k39 \ + k32, k33, k34, k35, k36, k38, k39 \ ) \ { \ {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a}, \ From 2c41b69d3e253dc369006ae7ac6d2dd4193c529a Mon Sep 17 00:00:00 2001 From: Danny Date: Mon, 1 Jul 2019 15:21:09 -0400 Subject: [PATCH 282/341] [Keyboard] Fix detection of Iris rev number used to set bootloader (#6226) --- keyboards/keebio/iris/rules.mk | 2 +- keyboards/keebio/nyquist/rules.mk | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/keebio/iris/rules.mk b/keyboards/keebio/iris/rules.mk index 18d1d6550..b0012e161 100644 --- a/keyboards/keebio/iris/rules.mk +++ b/keyboards/keebio/iris/rules.mk @@ -7,7 +7,7 @@ F_USB = $(F_CPU) # This definition is optional, and if your keyboard supports multiple bootloaders of # different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. -ifeq ($(strip $(KEYBOARD)), iris/rev3) +ifneq (, $(findstring rev3, $(KEYBOARD))) BOOTLOADER = qmk-dfu else BOOTLOADER = caterina diff --git a/keyboards/keebio/nyquist/rules.mk b/keyboards/keebio/nyquist/rules.mk index 51821a482..04d92bc7e 100644 --- a/keyboards/keebio/nyquist/rules.mk +++ b/keyboards/keebio/nyquist/rules.mk @@ -38,8 +38,8 @@ F_USB = $(F_CPU) # This definition is optional, and if your keyboard supports multiple bootloaders of # different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. -ifeq ($(strip $(KEYBOARD)), nyquist/rev3) - BOOTLOADER = dfu +ifneq (, $(findstring rev3, $(KEYBOARD))) + BOOTLOADER = qmk-dfu else BOOTLOADER = caterina endif From aa587a5abbbc4910de7e8635fdb3947632148983 Mon Sep 17 00:00:00 2001 From: tucznak Date: Mon, 1 Jul 2019 21:42:17 +0200 Subject: [PATCH 283/341] [Keymap] Add personal keymaps (#6217) * TuCZnak's NIU keymap * TuCZnak's KBD75 layout * TuCZnak's KBD67 layout * Implemented suggested changes * Implemented suggested changes, cleanup * Implemented suggested changes, cleanup --- .../kbd67/rev2/keymaps/tucznak/config.h | 18 +++ .../kbd67/rev2/keymaps/tucznak/keymap.c | 90 ++++++++++++ .../kbd67/rev2/keymaps/tucznak/readme.md | 9 ++ .../kbd67/rev2/keymaps/tucznak/rules.mk | 20 +++ .../kbdfans/kbd75/keymaps/tucznak/config.h | 26 ++++ .../kbdfans/kbd75/keymaps/tucznak/keymap.c | 90 ++++++++++++ .../kbdfans/kbd75/keymaps/tucznak/readme.md | 5 + .../kbdfans/kbd75/keymaps/tucznak/rules.mk | 14 ++ keyboards/niu_mini/keymaps/tucznak/config.h | 18 +++ keyboards/niu_mini/keymaps/tucznak/keymap.c | 133 ++++++++++++++++++ keyboards/niu_mini/keymaps/tucznak/readme.md | 5 + keyboards/niu_mini/keymaps/tucznak/rules.mk | 22 +++ 12 files changed, 450 insertions(+) create mode 100644 keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/config.h create mode 100644 keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/keymap.c create mode 100644 keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/readme.md create mode 100644 keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/rules.mk create mode 100644 keyboards/kbdfans/kbd75/keymaps/tucznak/config.h create mode 100644 keyboards/kbdfans/kbd75/keymaps/tucznak/keymap.c create mode 100644 keyboards/kbdfans/kbd75/keymaps/tucznak/readme.md create mode 100644 keyboards/kbdfans/kbd75/keymaps/tucznak/rules.mk create mode 100644 keyboards/niu_mini/keymaps/tucznak/config.h create mode 100644 keyboards/niu_mini/keymaps/tucznak/keymap.c create mode 100644 keyboards/niu_mini/keymaps/tucznak/readme.md create mode 100644 keyboards/niu_mini/keymaps/tucznak/rules.mk diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/config.h b/keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/config.h new file mode 100644 index 000000000..4f5147e66 --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/config.h @@ -0,0 +1,18 @@ +#pragma once + +#undef MANUFACTURER +#undef PRODUCT +#undef DESCRIPTION + +#define MANUFACTURER Potato Inc. +#define PRODUCT Qt3.14 +#define DESCRIPTION Look, a keyboard! + +/* send tap key if no layer key was used even after tap delay */ +#define TAPPING_TERM 50 +#define RETRO_TAPPING + +/* turn off RGB when computer sleeps */ +#ifdef RGB_DI_PIN +#define RGBLIGHT_SLEEP +#endif \ No newline at end of file diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/keymap.c b/keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/keymap.c new file mode 100644 index 000000000..7c6ef155b --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/keymap.c @@ -0,0 +1,90 @@ +#include QMK_KEYBOARD_H + +enum layers { + _QWERTY, + _FUNC, + _NUM +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Keymap (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |ENu| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BS |Del | + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| {| }| Ent |PgUp| + * |------------------------------------------------------. |----| + * |CapsFn| A| S| D| F| G| H| J| K| L| ;| '| #| |PgDn| + * |----------------------------------------------------------------| + * |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift |Up |Fn | + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt |Ctrl| |Lef|Dow|Rig | + * `------------------------------------------------' `------------' + */ + [_QWERTY] = LAYOUT_all( + LT(_NUM,KC_ESC),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_BSPC, KC_DEL, + 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_PGUP, + LT(_FUNC,KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(_FUNC), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap Fn Layer + * ,----------------------------------------------------------------. + * | ` | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |Ins | + * |----------------------------------------------------------------| + * | |TOG|M+ |H+ |S+ |V+ |Sp+| |Prt|SLk|Pau| | | |Home| + * |------------------------------------------------------. |----| + * | |VLK|M- |H- |S- |V+ |Sp-| | | | | | | |End | + * |----------------------------------------------------------------| + * | |BL |BL-|BL+|BRTG| | | | | | | |PUp| | + * |----------------------------------------------------------------| + * |Sleep|Reset| | C+A+D |C+A+I|Menu| |Hom|PDn|End | + * `------------------------------------------------' `------------' + */ + [_FUNC] = LAYOUT_all( + 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_INS, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI,_______,KC_PSCR,KC_SLCK,KC_PAUS,_______,_______,_______, KC_HOME, + _______, VLK_TOG, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD,_______,_______,_______,_______,_______, _______, KC_END, + _______,_______,BL_TOGG, BL_DEC, BL_INC, BL_BRTG,_______,_______,_______,_______,_______,_______,_______, KC_PGUP,_______, + KC_SLEP,RESET ,_______, LCA(KC_DEL), LCA(KC_DEL), LCA(KC_DEL), LCA(KC_INS),KC_APP, _______,KC_HOME,KC_PGDN,KC_END), + + /* Keymap Numpad Layer + * ,----------------------------------------------------------------. + * | | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| /| | | | + * |----------------------------------------------------------------| + * | | | | | | | | 4| 5| 6| *| | | | | + * |------------------------------------------------------. |----| + * | | | | | | | | 1| 2| 3| -| | | | | + * |----------------------------------------------------------------| + * | | |NLk| | | | | | 0| | | +| | | | + * |----------------------------------------------------------------| + * | | | | | | | | | | | + * `------------------------------------------------' `------------' + */ + [_NUM] = LAYOUT_all( + _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_0, KC_KP_SLASH, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_ASTERISK, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_MINUS, _______, _______, _______, + _______, _______, KC_NLCK, _______, _______, _______, _______, _______, KC_KP_0, _______, _______, KC_KP_PLUS, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______), + }; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + rgblight_enable_noeeprom(); + } else { + rgblight_disable_noeeprom(); + } +} diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/readme.md b/keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/readme.md new file mode 100644 index 000000000..1404ceed5 --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/readme.md @@ -0,0 +1,9 @@ +# TuCZnak's modified layout + +This layout is made for the ISO configuration of KBD67 (KBD65 v2 PCB). +It has a base layer, numpad on LT and a combined +configuration / macro / media layer. + +Since the plate and PCB leak some underglow and the KBD67 case has no use +for it otherwise, containing no translucent parts, I've used the RGB OLEDs +as a capslock indicator. diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/rules.mk b/keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/rules.mk new file mode 100644 index 000000000..277af2b17 --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/rules.mk @@ -0,0 +1,20 @@ +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend \ No newline at end of file diff --git a/keyboards/kbdfans/kbd75/keymaps/tucznak/config.h b/keyboards/kbdfans/kbd75/keymaps/tucznak/config.h new file mode 100644 index 000000000..54960f7d1 --- /dev/null +++ b/keyboards/kbdfans/kbd75/keymaps/tucznak/config.h @@ -0,0 +1,26 @@ +#pragma once + +#undef MANUFACTURER +#undef PRODUCT +#undef DESCRIPTION + +#define MANUFACTURER Potato Inc. +#define PRODUCT Qt3.14 +#define DESCRIPTION Look, a keyboard! + +/* send tap key if no layer key was used even after tap delay */ +#define TAPPING_TERM 250 +#define RETRO_TAPPING + +/* turn off RGB when computer sleeps */ +#ifdef RGB_DI_PIN +#define RGBLIGHT_SLEEP +#endif + +/* number of backlight levels */ +#ifdef BACKLIGHT_LEVELS +#undef BACKLIGHT_LEVELS +#endif +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 8 +#endif diff --git a/keyboards/kbdfans/kbd75/keymaps/tucznak/keymap.c b/keyboards/kbdfans/kbd75/keymaps/tucznak/keymap.c new file mode 100644 index 000000000..ad3b6f6c5 --- /dev/null +++ b/keyboards/kbdfans/kbd75/keymaps/tucznak/keymap.c @@ -0,0 +1,90 @@ +#include QMK_KEYBOARD_H + +enum layers { + _QWERTY, + _FUNC, + _NUMPAD +}; + +enum keycodes { + QWERTY = SAFE_RANGE, + FUNC, + NUMPAD, + MACRO1, + MACRO2, + MACROTAB, + DYNAMIC_MACRO_RANGE, +}; + +#include "dynamic_macro.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_ansi_1u( + KC_ESC, 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_INS, KC_DEL, KC_PSCR, + LT(_NUMPAD, KC_GRV), 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_HOME, + 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_END, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + 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_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FUNC), KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FUNC] = LAYOUT_ansi_1u( + RESET, KC_MPLY, KC_MPRV, KC_MNXT, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLCK, KC_PAUS, + KC_TRNS, MACRO1, MACRO2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + MACROTAB, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NUBS, KC_TRNS, + KC_TRNS, VLK_TOG, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, DYN_REC_START2, DYN_MACRO_PLAY2, KC_TRNS, KC_TRNS, + KC_TRNS, BL_TOGG, BL_DEC, BL_INC, BL_BRTG, KC_TRNS, KC_TRNS, KC_TRNS, DYN_REC_STOP, DYN_REC_START1, DYN_MACRO_PLAY1, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, LCA(KC_DEL), KC_TRNS, KC_TRNS, KC_APP, KC_TRNS, KC_TRNS, KC_TRNS + ), + [_NUMPAD] = LAYOUT_ansi_1u( + KC_NUMLOCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_0, KC_KP_SLASH, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_ASTERISK, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_MINUS, KC_TRNS, KC_KP_ENTER, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_KP_0, KC_COMM, KC_DOT, KC_KP_PLUS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (!process_record_dynamic_macro(keycode, record)) { + return false; + } + + switch (keycode) { + case MACRO1: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("c") SS_DOWN(X_LALT) SS_TAP(X_TAB) SS_UP(X_LALT) SS_LCTRL("v") SS_TAP(X_TAB)); + _delay_ms(50); + SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_TAB) SS_UP(X_LALT) SS_TAP(X_TAB)); + } else { + + } + break; + case MACRO2: + if (record->event.pressed) { + SEND_STRING("GGWP"); + } else { + + } + break; + case MACROTAB: + if (record->event.pressed) { + SEND_STRING(" "); + } else { + + } + break; + } + + return true; +} + +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + setPinOutput(B2); + writePinLow(B2); + } else { + setPinInput(B2); + writePinLow(B2); + } +} diff --git a/keyboards/kbdfans/kbd75/keymaps/tucznak/readme.md b/keyboards/kbdfans/kbd75/keymaps/tucznak/readme.md new file mode 100644 index 000000000..962125844 --- /dev/null +++ b/keyboards/kbdfans/kbd75/keymaps/tucznak/readme.md @@ -0,0 +1,5 @@ +# TuCZnak's modified layout + +This layout is made for the ANSI configuration of KBD75. +It has a base layer, numpad on LT and a combined +configuration / macro / media layer. diff --git a/keyboards/kbdfans/kbd75/keymaps/tucznak/rules.mk b/keyboards/kbdfans/kbd75/keymaps/tucznak/rules.mk new file mode 100644 index 000000000..7d6400f97 --- /dev/null +++ b/keyboards/kbdfans/kbd75/keymaps/tucznak/rules.mk @@ -0,0 +1,14 @@ +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +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 keyboard backlight functionality +VELOCIKEY_ENABLE = yes # RGB memes for quickscoping teens +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes \ No newline at end of file diff --git a/keyboards/niu_mini/keymaps/tucznak/config.h b/keyboards/niu_mini/keymaps/tucznak/config.h new file mode 100644 index 000000000..5d8842ee2 --- /dev/null +++ b/keyboards/niu_mini/keymaps/tucznak/config.h @@ -0,0 +1,18 @@ +#pragma once + +#undef MANUFACTURER +#undef PRODUCT +#undef DESCRIPTION + +#define MANUFACTURER Potato Inc. +#define PRODUCT Qt3.14 +#define DESCRIPTION Look, a keyboard! + +/* turn off RGB when computer sleeps */ +#ifdef RGB_DI_PIN +#define RGBLIGHT_SLEEP +#endif + +/* send tap key if no layer key was used even after tap delay */ +#define TAPPING_TERM 50 +#define RETRO_TAPPING \ No newline at end of file diff --git a/keyboards/niu_mini/keymaps/tucznak/keymap.c b/keyboards/niu_mini/keymaps/tucznak/keymap.c new file mode 100644 index 000000000..94743fe2c --- /dev/null +++ b/keyboards/niu_mini/keymaps/tucznak/keymap.c @@ -0,0 +1,133 @@ +#include QMK_KEYBOARD_H + +enum layers { + _BASE, + _LOWER, + _RAISE, + _NUM, + _FN +}; + +enum keycodes { + QWERTY = SAFE_RANGE, + DYNAMIC_MACRO_RANGE, +}; + +#include "dynamic_macro.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base layer (0) + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |Esc/Fn| A | S | D | F | G | H | J | K | L | ; | Del | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | Up |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | \| |Lower |Sp/Num|Space |Raise |AltGr | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ + [_BASE] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT(_FN, KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_DEL, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_NUBS, MO(_LOWER), LT(_NUM, KC_SPC), KC_SPC, MO(_RAISE), KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Lower layer (1) + * Function keys, navigation + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | Ins | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |CapsLk| |PrtSc |ScrLk |Pause | | | | | PgUp | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Menu | Home | PgDn | End | + * `-----------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT_ortho_4x12( + 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_INS, + _______, KC_CAPS, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_APP, KC_HOME, KC_PGDN, KC_END + ), + + /* Raise layer (2) + * National characters, special characters + * ,-----------------------------------------------------------------------------------. + * | +1 | ě2 | š3 | č4 | ř5 | ž6 | ý7 | á8 | í9 | é0 | ´ | ˇ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ;° | | | | | | ( | ) | § | ! | ú | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | % | = | ¨ | ' | - | _ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT_ortho_4x12( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, LSFT(KC_EQL), + KC_GRV, _______, _______, _______, _______, _______, LSFT(KC_RBRC), KC_RBRC, KC_QUOT, LSFT(KC_QUOT), KC_LBRC, LSFT(KC_LBRC), + _______, _______, _______, _______, _______, _______, LSFT(KC_MINS), KC_MINS, KC_BSLS, LSFT(KC_BSLS), KC_SLSH, LSFT(KC_SLSH), + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Numbers layer - numpad (3) + * ,-----------------------------------------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | 4 | 5 | 6 | / | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |NumLk | | | | | | 1 | 2 | 3 | * | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | . | 0 | + | - | | + * `-----------------------------------------------------------------------------------' + */ + [_NUM] = LAYOUT_ortho_4x12( + _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_0, _______, + _______, _______, _______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PSLS, _______, + _______, KC_NLCK, _______, _______, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PAST, _______, + _______, _______, _______, _______, _______, _______, _______, KC_DOT, KC_KP_0, KC_PPLS, KC_PMNS, _______ + ), + + /* Function layer (4) + * Backlighting, keyboard controls, etc. + * m_ - music, r_ - RGB + backlight, f_ - macro + * ,-----------------------------------------------------------------------------------. + * | | r_BL | |Sleep | | | |f_Rec1|f_Pla1|f_Stop| |m_Vol+| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |r_VLK |r_Mod+|r_Hue+|r_Sat+|r_Bri+| |f_Rec2|f_Pla2| | |m_Vol-| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |r_TOG |r_Mod-|r_Hue-|r_Sat-|r_Bri-| | | | |m_Stop|m_Mute| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Reset| | | | |C+A+D |C+A+I | | |m_Prev|m_Paus|m_Next| + * `-----------------------------------------------------------------------------------' + */ + [_FN] = LAYOUT_ortho_4x12( + _______, BL_STEP, _______, KC_SLEP, _______, _______, _______, DYN_REC_START1, DYN_MACRO_PLAY1, DYN_REC_STOP, _______, KC_VOLU, + _______, VLK_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, DYN_REC_START2, DYN_MACRO_PLAY2, _______, _______, KC_VOLD, + _______, RGB_TOG, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, KC_MSTP, KC_MUTE, + RESET, _______, _______, _______, _______, LCA(KC_DEL), LCA(KC_INS), _______, _______, KC_MPRV, KC_MPLY, KC_MNXT + ) +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (!process_record_dynamic_macro(keycode, record)) { + return false; + } + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/niu_mini/keymaps/tucznak/readme.md b/keyboards/niu_mini/keymaps/tucznak/readme.md new file mode 100644 index 000000000..95180bc39 --- /dev/null +++ b/keyboards/niu_mini/keymaps/tucznak/readme.md @@ -0,0 +1,5 @@ +# TuCZnak's modified layout + +This layout is optimized for Czech national QWERTZ keymap. +It includes separated layers for numbers, national characters, +special characters and configuration. diff --git a/keyboards/niu_mini/keymaps/tucznak/rules.mk b/keyboards/niu_mini/keymaps/tucznak/rules.mk new file mode 100644 index 000000000..bf5a36886 --- /dev/null +++ b/keyboards/niu_mini/keymaps/tucznak/rules.mk @@ -0,0 +1,22 @@ +# Build Options +# change yes to no to disable +# +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 = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +# Userspace defines +VELOCIKEY_ENABLE = yes +LAYOUTS_HAS_RGB = no \ No newline at end of file From 7095ae10f75db62f25b231d680720a00997cb779 Mon Sep 17 00:00:00 2001 From: Garret G <45295190+TheRoyalSweatshirt@users.noreply.github.com> Date: Mon, 1 Jul 2019 14:44:02 -0500 Subject: [PATCH 284/341] [Keyboard] add support for the RoPro Keyboard (#6210) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add support for the RoPro Keyboard * Update Readme.md * update to missing keys in default keymap.c * update default.c * update formatting in ropro.h * Update formatting on Readme.md * Update rules.mk * update to bootloader * Create New File; config.h added config.h file to pull request * major transfer swap of ropro.h and config.h * Update JSON to match Keymap * Update New Layer Identifier * Update Newbs Guide Info readme + Formatting * Update Matrix Clarification * Omit Layout for Clarity * Changed default keymapbFile Title default.c —> keymap.c * Update Config.h Add Rotary Encoder pins (this May not be correct) * Add Rotary Encoder Build option * Added rotary Encoder ID to keymap.c * Update ropro.h Added Commas at end of macro lines * Update ropro.h Added 1 “,” * Update keymap.c Omit suggested Line * Update ropro.h Format of “Lower” * Apply suggestions from code review Formatting of various suggested changes Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * update ropro.h fixed rotary encoder click batch * Update keymap.c fixed rotary encoder click batch * update config.h fixed rotary encoder click batch * "Clean Up" Keymap.c * Update config.h focus on Rotary and RGB activation and routing * Update ropro.h focus on rotary click * update rules.mk add RGB "underglow" function * update readme.md formatting and picture modifications * update config.h re add pragma * Update keyboards/ropro/ropro.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/ropro/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/ropro/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/ropro/keymaps/default/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/ropro/keymaps/default/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- keyboards/ropro/config.h | 59 ++++++++++++++++ keyboards/ropro/info.json | 13 ++++ keyboards/ropro/keymaps/default/keymap.c | 85 +++++++++++++++++++++++ keyboards/ropro/keymaps/default/readme.md | 1 + keyboards/ropro/readme.md | 16 +++++ keyboards/ropro/ropro.c | 1 + keyboards/ropro/ropro.h | 39 +++++++++++ keyboards/ropro/rules.mk | 67 ++++++++++++++++++ 8 files changed, 281 insertions(+) create mode 100644 keyboards/ropro/config.h create mode 100644 keyboards/ropro/info.json create mode 100644 keyboards/ropro/keymaps/default/keymap.c create mode 100644 keyboards/ropro/keymaps/default/readme.md create mode 100644 keyboards/ropro/readme.md create mode 100644 keyboards/ropro/ropro.c create mode 100644 keyboards/ropro/ropro.h create mode 100644 keyboards/ropro/rules.mk diff --git a/keyboards/ropro/config.h b/keyboards/ropro/config.h new file mode 100644 index 000000000..0966faf54 --- /dev/null +++ b/keyboards/ropro/config.h @@ -0,0 +1,59 @@ +#pragma once + +/* Copyright 2019 Garret G. (TheRoyalSweatshirt) + * + * 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 .#pragma once + */ + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0002 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Kingly-Keys +#define PRODUCT The_RoPro +#define DESCRIPTION A 75-key ortholinear keyboard with rotary encoder + + /* key matrix size */ +#define MATRIX_ROWS 7 +#define MATRIX_COLS 14 + +#define NUMBER_OF_ENCODERS 1 +#define ENCODERS_PAD_A { B7 } +#define ENCODERS_PAD_B { D5 } + + /* key matrix pins */ +#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, F1, NO_PIN } +#define MATRIX_COL_PINS { F0, D1, D0, D4, C6, D7, E6, B4, B5, B3, B2, B6, D2, C7 } +#define UNUSED_PINS + + /* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + + /* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + + /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + + /* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED --- DIN Pin Routed to VIA on main PCB marked "RGB" */ +#define RGB_DI_PIN D3 + +#define RGBLIGHT_ANIMATIONS + +#define RGBLED_NUM 16 diff --git a/keyboards/ropro/info.json b/keyboards/ropro/info.json new file mode 100644 index 000000000..f7b62f664 --- /dev/null +++ b/keyboards/ropro/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "ropro", + "url": "https://github.com/TheRoyalSweatshirt/The_RoPro", + "maintainer": "[TheRoyalSweatshirt](https://github.com/TheRoyalSweatshirt)", + "width": 13, + "height": 6, + "layouts": { + "LAYOUT": { + "key_count": 76, + "layout": [{"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"Esc", "x":1, "y":1}, {"label":"1", "x":2, "y":1}, {"label":"2", "x":3, "y":1}, {"label":"3", "x":4, "y":1}, {"label":"4", "x":5, "y":1}, {"label":"5", "x":6, "y":1}, {"label":"6;", "x":7, "y":1}, {"label":"7", "x":8, "y":1}, {"label":"8", "x":9, "y":1}, {"label":"9", "x":10, "y":1}, {"label":"0", "x":11, "y":1}, {"label":"-", "x":12, "y":1}, {"label":"CAPS", "x":0, "y":2}, {"label":"Tab", "x":1, "y":2}, {"label":"Q", "x":2, "y":2}, {"label":"W", "x":3, "y":2}, {"label":"E", "x":4, "y":2}, {"label":"R", "x":5, "y":2}, {"label":"T", "x":6, "y":2}, {"label":"Y", "x":7, "y":2}, {"label":"U", "x":8, "y":2}, {"label":"I", "x":9, "y":2}, {"label":"O", "x":10, "y":2}, {"label":"P", "x":11, "y":2}, {"label":"Bksp", "x":12, "y":2}, {"label":"PgUp", "x":0, "y":3}, {"label":"Ctrl", "x":1, "y":3}, {"label":"A", "x":2, "y":3}, {"label":"S", "x":3, "y":3}, {"label":"D", "x":4, "y":3}, {"label":"F", "x":5, "y":3}, {"label":"G", "x":6, "y":3}, {"label":"H;", "x":7, "y":3}, {"label":"J", "x":8, "y":3}, {"label":"K", "x":9, "y":3}, {"label":"L", "x":10, "y":3}, {"label":";", "x":11, "y":3}, {"label":"'", "x":12, "y":3}, {"label":"Home", "x":0, "y":4}, {"label":"Shift", "x":1, "y":4}, {"label":"Z", "x":2, "y":4}, {"label":"X", "x":3, "y":4}, {"label":"C", "x":4, "y":4}, {"label":"V", "x":5, "y":4}, {"label":"B", "x":6, "y":4}, {"label":"N", "x":7, "y":4}, {"label":"M", "x":8, "y":4}, {"label":",", "x":9, "y":4}, {"label":".", "x":10, "y":4}, {"label":"/", "x":11, "y":4}, {"label":"Enter", "x":12, "y":4}, {"label":"PgDn", "x":0, "y":5}, {"label":"Del", "x":1, "y":5}, {"label":"Ctrl", "x":2, "y":5}, {"label":"GUI", "x":3, "y":5}, {"label":"Alt", "x":4, "y":5}, {"label":"Lower", "x":5, "y":5}, {"x":6, "y":5}, {"x":7, "y":5}, {"label":"End", "x":8, "y":5}, {"label":"Left", "x":9, "y":5}, {"label":"Down", "x":10, "y":5}, {"label":"Up", "x":11, "y":5}, {"label":"Right", "x":12, "y":5}] + } + } +} diff --git a/keyboards/ropro/keymaps/default/keymap.c b/keyboards/ropro/keymaps/default/keymap.c new file mode 100644 index 000000000..6e6da8f9a --- /dev/null +++ b/keyboards/ropro/keymaps/default/keymap.c @@ -0,0 +1,85 @@ +/* Copyright 2019 Garret G. (TheRoyalSweatshirt) + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _LOWER +}; + +#define LOWER MO(_LOWER) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* BASE + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |+------+------+------+------+-----+------+------+------+------+------+------+------|--------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | Rotary Click | + * ,------+------+------+------+------+------+------+------+------+------+------+------+------|--------------' + * | PgUp | Ctrl | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+-------------+------+------+------+------+------| + * | Lower| Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | PgDn | Del | Ctrl | GUI | ALT |Lower |SPACE |SPACE | End | Left | Down | Up |Right | + * `------------------------------------------------------------------------------------------' + */ + [_BASE] = LAYOUT( + 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, +KC_CAPS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_PGUP, KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + LOWER, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_PGDN, KC_DEL, KC_RCTRL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, KC_END, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* LOWER + * ,-----------------------------------------------------------------------------------. + * |TOGRGB| | | |Sat(-)|Hue(-)|Hue(+)|Sat(+)| | |Brght-|Brght+| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ` | | | | | | | | | | | = | + * |+------+------+------+------+-----+------+------+------+------+------+------+------|--------------. + * | | | Up | | | | | | | [ | ] | \ | NumLock | + * ,------+------+------+------+------+------+------+------+------+------+------+------+------|--------------' + * | Home | | Left | Down |Right | | | | | | | | | + * |------+------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------| + * | End | | | | | | | | | | | |PrScn | + * `------------------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT( + RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAD, RGB_HUD, RGB_HUI, RGB_SAI, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, + KC_GRAVE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_EQUAL, +KC_NLCK, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_BSLS, + KC_HOME, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_WH_L); + } else { + tap_code(KC_WH_R); + } + } +} diff --git a/keyboards/ropro/keymaps/default/readme.md b/keyboards/ropro/keymaps/default/readme.md new file mode 100644 index 000000000..5d7ff3dcc --- /dev/null +++ b/keyboards/ropro/keymaps/default/readme.md @@ -0,0 +1 @@ +# The BASE Layout for the RoPro diff --git a/keyboards/ropro/readme.md b/keyboards/ropro/readme.md new file mode 100644 index 000000000..0a90c87f8 --- /dev/null +++ b/keyboards/ropro/readme.md @@ -0,0 +1,16 @@ +The RoPro +=== + +![The_RoPro](https://i.imgur.com/hfOzBPI.jpg) + +A Compact 75-Key + Rotary Encoder Ortholinear keyboard by [Garret G.](https://github.com/TheRoyalSweatshirt) a.k.a. [/u/The_Royal](https://www.reddit.com/user/The_Royal) + +Keyboard Maintainer: [Garret G.](https://github.com/TheRoyalSweatshirt) +Hardware Supported: The_RoPro rev1.0, rev1.5, rev2.0 PCB; Elite-C & Proton-C Compatible. +Hardware Availability: [Kingly-Keys.xyz](https://kingly-keys.xyz/) - (Through GB or when in stock) + +Make example for this keyboard (after setting up your build environment): + + make ropro:default + +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) diff --git a/keyboards/ropro/ropro.c b/keyboards/ropro/ropro.c new file mode 100644 index 000000000..ccb1ed0df --- /dev/null +++ b/keyboards/ropro/ropro.c @@ -0,0 +1 @@ +#include "ropro.h" diff --git a/keyboards/ropro/ropro.h b/keyboards/ropro/ropro.h new file mode 100644 index 000000000..cb635cff3 --- /dev/null +++ b/keyboards/ropro/ropro.h @@ -0,0 +1,39 @@ +/* Copyright 2019 Garret G. (TheRoyalSweatshirt) + * + * 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 . + * + * Note: Matrix is a little wacky with the rotary encoder click mapping being + * on the opposite side of the board. Remember to pay attention to + * the 13th column where the lone key mapped for rotary encoder click (K132). +*/ + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K10, K20, K30, K40, K50, K60, K70, K80, K90, K100, K110, K120, \ + K11, K21, K31, K41, K51, K61, K71, K81, K91, K101, K111, K121, \ + K132, K12, K22, K32, K42, K52, K62, K72, K82, K92, K102, K112, K122, \ + K03, K13, K23, K33, K43, K53, K63, K73, K83, K93, K103, K113, K123, \ + K04, K14, K24, K34, K44, K54, K64, K74, K84, K94, K104, K114, K124, \ + K05, K15, K25, K35, K45, K55, K65, K75, K85, K95, K105, K115, K125 \ +) { \ + { KC_NO, K10, K20, K30, K40, K50, K60, K70, K80, K90, K100, K110, K120, KC_NO }, \ + { KC_NO, K11, K21, K31, K41, K51, K61, K71, K81, K91, K101, K111, K121, KC_NO }, \ + { KC_NO, K12, K22, K32, K42, K52, K62, K72, K82, K92, K102, K112, K122, K132 }, \ + { K03, K13, K23, K33, K43, K53, K63, K73, K83, K93, K103, K113, K123, KC_NO }, \ + { K04, K14, K24, K34, K44, K54, K64, K74, K84, K94, K104, K114, K124, KC_NO }, \ + { K05, K15, K25, K35, K45, K55, K65, K75, K85, K95, K105, K115, K125, KC_NO } \ +} diff --git a/keyboards/ropro/rules.mk b/keyboards/ropro/rules.mk new file mode 100644 index 000000000..c63f62146 --- /dev/null +++ b/keyboards/ropro/rules.mk @@ -0,0 +1,67 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + + +# Build Options +# change yes to no to disable +# +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 = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +ENCODER_ENABLE = yes +RGBLIGHT_ENABLE = yes +LAYOUTS_HAS_RGB = yes From c93954899e01e959ef6b1b01a061dd3486f2ca19 Mon Sep 17 00:00:00 2001 From: takashiski Date: Tue, 2 Jul 2019 04:45:24 +0900 Subject: [PATCH 285/341] [Keyboard] Add Otaku split (#6207) * init * update * split master left and right for qmk configurator * add * copy rev0 to rev1 * change rev1 file from rev0 * move rev0 keymap * remove root keymap * add comma * update keymap * add info.json * update readme * Update keyboards/otaku_split/rev1/rules.mk Co-Authored-By: fauxpark * Update keyboards/otaku_split/rev0/config.h Co-Authored-By: Drashna Jaelre * Update keyboards/otaku_split/rev0/readme.md Co-Authored-By: Drashna Jaelre * rename .c, .h * rename c&h files * update rev0 readme * copy default to sample * remove VA_ARGS from default, rev0 * remove otaku_split.h and fixed sample keymap * update keymaps * update readme * Update keyboards/otaku_split/rev1/config.h Co-Authored-By: fauxpark * Update keyboards/otaku_split/rev0/rules.mk Co-Authored-By: fauxpark * remove no need keycodes * add rev0 infojson * Update keyboards/otaku_split/rev0/config.h Co-Authored-By: fauxpark * Update keyboards/otaku_split/rev0/readme.md Co-Authored-By: fauxpark * Update keyboards/otaku_split/rev1/readme.md Co-Authored-By: fauxpark * remove no user custom keycodes * remove backslash * remove backslash --- keyboards/otaku_split/rev0/config.h | 251 +++++++++++++++++ keyboards/otaku_split/rev0/info.json | 12 + .../otaku_split/rev0/keymaps/default/config.h | 19 ++ .../otaku_split/rev0/keymaps/default/keymap.c | 49 ++++ .../rev0/keymaps/default/readme.md | 1 + .../otaku_split/rev0/keymaps/sample/config.h | 19 ++ .../otaku_split/rev0/keymaps/sample/keymap.c | 79 ++++++ .../otaku_split/rev0/keymaps/sample/readme.md | 1 + keyboards/otaku_split/rev0/readme.md | 16 ++ keyboards/otaku_split/rev0/rev0.c | 51 ++++ keyboards/otaku_split/rev0/rev0.h | 48 ++++ keyboards/otaku_split/rev0/rules.mk | 81 ++++++ keyboards/otaku_split/rev1/config.h | 255 ++++++++++++++++++ keyboards/otaku_split/rev1/info.json | 12 + .../otaku_split/rev1/keymaps/default/config.h | 19 ++ .../otaku_split/rev1/keymaps/default/keymap.c | 58 ++++ .../rev1/keymaps/default/readme.md | 1 + .../otaku_split/rev1/keymaps/sample/config.h | 19 ++ .../otaku_split/rev1/keymaps/sample/keymap.c | 85 ++++++ .../otaku_split/rev1/keymaps/sample/readme.md | 1 + keyboards/otaku_split/rev1/readme.md | 19 ++ keyboards/otaku_split/rev1/rev1.c | 51 ++++ keyboards/otaku_split/rev1/rev1.h | 47 ++++ keyboards/otaku_split/rev1/rules.mk | 81 ++++++ 24 files changed, 1275 insertions(+) create mode 100644 keyboards/otaku_split/rev0/config.h create mode 100644 keyboards/otaku_split/rev0/info.json create mode 100644 keyboards/otaku_split/rev0/keymaps/default/config.h create mode 100644 keyboards/otaku_split/rev0/keymaps/default/keymap.c create mode 100644 keyboards/otaku_split/rev0/keymaps/default/readme.md create mode 100644 keyboards/otaku_split/rev0/keymaps/sample/config.h create mode 100644 keyboards/otaku_split/rev0/keymaps/sample/keymap.c create mode 100644 keyboards/otaku_split/rev0/keymaps/sample/readme.md create mode 100644 keyboards/otaku_split/rev0/readme.md create mode 100644 keyboards/otaku_split/rev0/rev0.c create mode 100644 keyboards/otaku_split/rev0/rev0.h create mode 100644 keyboards/otaku_split/rev0/rules.mk create mode 100644 keyboards/otaku_split/rev1/config.h create mode 100644 keyboards/otaku_split/rev1/info.json create mode 100644 keyboards/otaku_split/rev1/keymaps/default/config.h create mode 100644 keyboards/otaku_split/rev1/keymaps/default/keymap.c create mode 100644 keyboards/otaku_split/rev1/keymaps/default/readme.md create mode 100644 keyboards/otaku_split/rev1/keymaps/sample/config.h create mode 100644 keyboards/otaku_split/rev1/keymaps/sample/keymap.c create mode 100644 keyboards/otaku_split/rev1/keymaps/sample/readme.md create mode 100644 keyboards/otaku_split/rev1/readme.md create mode 100644 keyboards/otaku_split/rev1/rev1.c create mode 100644 keyboards/otaku_split/rev1/rev1.h create mode 100644 keyboards/otaku_split/rev1/rules.mk diff --git a/keyboards/otaku_split/rev0/config.h b/keyboards/otaku_split/rev0/config.h new file mode 100644 index 000000000..5e1bfaacd --- /dev/null +++ b/keyboards/otaku_split/rev0/config.h @@ -0,0 +1,251 @@ +/* +Copyright 2019 takashiski + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER takashiski +#define PRODUCT otaku_split +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B5,B4,E6,D7,C6 } +#define MATRIX_COL_PINS { B6,B2,B3,B1,F7,F6,F5,F4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/otaku_split/rev0/info.json b/keyboards/otaku_split/rev0/info.json new file mode 100644 index 000000000..b5608cb49 --- /dev/null +++ b/keyboards/otaku_split/rev0/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Otaku split rev.0", + "url": "", + "maintainer": "takashiski", + "width": 17.75, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"\u534a\u89d2", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":9.75, "y":0}, {"label":"*", "x":10.75, "y":0}, {"label":"(", "x":11.75, "y":0}, {"label":")", "x":12.75, "y":0}, {"label":"=", "x":13.75, "y":0}, {"label":"~", "x":14.75, "y":0}, {"label":"|", "x":15.75, "y":0}, {"label":"Backspace", "x":16.75, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"7", "x":6.5, "y":1}, {"label":"Y", "x":9.25, "y":1}, {"label":"U", "x":10.25, "y":1}, {"label":"I", "x":11.25, "y":1}, {"label":"O", "x":12.25, "y":1}, {"label":"P", "x":13.25, "y":1}, {"label":"`", "x":14.25, "y":1}, {"label":"{", "x":15.25, "y":1}, {"label":"Enter", "x":16.5, "y":1, "w":1.25, "h":2}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":9.5, "y":2}, {"label":"J", "x":10.5, "y":2}, {"label":"K", "x":11.5, "y":2}, {"label":"L", "x":12.5, "y":2}, {"label":"+", "x":13.5, "y":2}, {"label":"*", "x":14.5, "y":2}, {"label":"}", "x":15.5, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"1", "x":9, "y":3}, {"label":"N", "x":10, "y":3}, {"label":"M", "x":11, "y":3}, {"label":"<", "x":12, "y":3}, {"label":">", "x":13, "y":3}, {"label":"?", "x":14, "y":3}, {"label":"_", "x":15, "y":3}, {"label":"Shift", "x":16, "y":3, "w":1.75}, {"x":0, "y":4, "w":2}, {"label":"Ctrl", "x":2, "y":4, "w":1.25}, {"label":"Alt", "x":3.25, "y":4, "w":1.25}, {"label":"\u7121\u5909\u63db", "x":4.5, "y":4}, {"label":"\u2190", "x":5.5, "y":4}, {"label":"\u2193", "x":6.5, "y":4}, {"label":"\u2191", "x":8.75, "y":4}, {"label":"\u2192", "x":9.75, "y":4}, {"label":".", "x":10.75, "y":4}, {"label":"Menu", "x":11.75, "y":4}, {"label":"\u5909\u63db", "x":12.75, "y":4, "w":1.25}, {"label":"\u30ab\u30bf\u30ab\u30ca", "x":14, "y":4, "w":1.25}, {"label":"Alt", "x":15.25, "y":4, "w":1.25}, {"label":"Ctrl", "x":16.5, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/otaku_split/rev0/keymaps/default/config.h b/keyboards/otaku_split/rev0/keymaps/default/config.h new file mode 100644 index 000000000..25cddc6bb --- /dev/null +++ b/keyboards/otaku_split/rev0/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 takashiski + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/otaku_split/rev0/keymaps/default/keymap.c b/keyboards/otaku_split/rev0/keymaps/default/keymap.c new file mode 100644 index 000000000..844e9c50e --- /dev/null +++ b/keyboards/otaku_split/rev0/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2019 takashiski + * + * 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 . + */ +#include QMK_KEYBOARD_H +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS ,KC_EQL,KC_JYEN,KC_BSPC,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_ENT, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,KC_NUHS, + KC_LSHIFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH,KC_RO,KC_RSHIFT, + KC_LCTRL, KC_LGUI,KC_LALT,KC_MHEN,KC_TAB,KC_SPC, KC_ENT,KC_BSPC,KC_HENK,KC_KANA,KC_RALT,KC_RGUI,KC_APP,KC_RCTRL + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/otaku_split/rev0/keymaps/default/readme.md b/keyboards/otaku_split/rev0/keymaps/default/readme.md new file mode 100644 index 000000000..dbaaa2eb8 --- /dev/null +++ b/keyboards/otaku_split/rev0/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for otaku_split \ No newline at end of file diff --git a/keyboards/otaku_split/rev0/keymaps/sample/config.h b/keyboards/otaku_split/rev0/keymaps/sample/config.h new file mode 100644 index 000000000..25cddc6bb --- /dev/null +++ b/keyboards/otaku_split/rev0/keymaps/sample/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 takashiski + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/otaku_split/rev0/keymaps/sample/keymap.c b/keyboards/otaku_split/rev0/keymaps/sample/keymap.c new file mode 100644 index 000000000..b1df2cef0 --- /dev/null +++ b/keyboards/otaku_split/rev0/keymaps/sample/keymap.c @@ -0,0 +1,79 @@ +/* Copyright 2019 takashiski + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) +#define _________________QWERTY_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T +#define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G +#define _________________QWERTY_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B + +#define _________________QWERTY_R1_________________ KC_Y, KC_U, KC_I, KC_O, KC_P +#define _________________QWERTY_R2_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN +#define _________________QWERTY_R3_________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH + +#define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5 +#define ________________NUMBER_RIGHT_______________ KC_6, KC_7, KC_8, KC_9, KC_0 +#define _________________FUNC_LEFT_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 +#define _________________FUNC_RIGHT________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_wrapper(\ + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS ,KC_EQL,KC_JYEN,KC_BSPC,\ + KC_TAB, _________________QWERTY_L1_________________,KC_Y, _________________QWERTY_R1_________________,KC_LBRC,KC_RBRC,KC_ENT,\ + KC_CAPS, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________,KC_QUOT,KC_NUHS,\ + KC_LSHIFT,_________________QWERTY_L3_________________, KC_B,_________________QWERTY_R3_________________,KC_RO,KC_RSHIFT,\ + KC_LCTRL, KC_LGUI,KC_LALT,KC_MHEN,KC_TAB,KC_SPC, KC_ENT,KC_BSPC,KC_HENK,KC_KANA,KC_RALT,KC_RGUI,KC_APP,KC_RCTRL\ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/otaku_split/rev0/keymaps/sample/readme.md b/keyboards/otaku_split/rev0/keymaps/sample/readme.md new file mode 100644 index 000000000..dbaaa2eb8 --- /dev/null +++ b/keyboards/otaku_split/rev0/keymaps/sample/readme.md @@ -0,0 +1 @@ +# The default keymap for otaku_split \ No newline at end of file diff --git a/keyboards/otaku_split/rev0/readme.md b/keyboards/otaku_split/rev0/readme.md new file mode 100644 index 000000000..9103843d5 --- /dev/null +++ b/keyboards/otaku_split/rev0/readme.md @@ -0,0 +1,16 @@ +# Otaku Split rev.0 + +![otaku_split](https://booth.pximg.net/c/620x620/4394ec37-d0ff-4c92-8f78-5c08d0566da6/i/1365150/9953f612-d35f-4f31-873d-2323c7b2f622_base_resized.jpg) + +Otaku Split is Japanese layout based keyboard. +rev.0 is prototype. it has MDF color plate Iron Black and Ayanami blue. + +Keyboard Maintainer: [takashiski](https://github.com/takashiski) +Hardware Supported: promicro(atmega32u4) +Hardware Availability: https://skyhigh-works.booth.pm/items/1365150 + +Make example for this keyboard (after setting up your build environment): + + make otaku_split/rev0:default + +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). diff --git a/keyboards/otaku_split/rev0/rev0.c b/keyboards/otaku_split/rev0/rev0.c new file mode 100644 index 000000000..75c24b584 --- /dev/null +++ b/keyboards/otaku_split/rev0/rev0.c @@ -0,0 +1,51 @@ +/* Copyright 2019 takashiski + * + * 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 . + */ +#include "rev0.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/otaku_split/rev0/rev0.h b/keyboards/otaku_split/rev0/rev0.h new file mode 100644 index 000000000..c3040d233 --- /dev/null +++ b/keyboards/otaku_split/rev0/rev0.h @@ -0,0 +1,48 @@ +/* Copyright 2019 takashiski + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define LAYOUT(\ +L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06,R07,\ +L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16,R17,\ +L20,L21,L22,L23,L24,L25, R20,R21,R22,R23,R24,R25,R26, \ +L30,L31,L32,L33,L34,L35, R30,R31,R32,R33,R34,R35,R36,R37,\ +L40,L41,L42,L43,L44,L45, R40,R41,R42,R43,R44,R45,R46,R47\ +) {\ +{L00,L01,L02,L03,L04,L05,L06,KC_NO},\ +{L10,L11,L12,L13,L14,L15,L16,KC_NO},\ +{L20,L21,L22,L23,L24,L25,KC_NO,KC_NO},\ +{L30,L31,L32,L33,L34,L35,KC_NO,KC_NO},\ +{L40,L41,L42,L43,L44,L45,KC_NO,KC_NO},\ +{R00,R01,R02,R03,R04,R05,R06,R07},\ +{R10,R11,R12,R13,R14,R15,R16,R17},\ +{R20,R21,R22,R23,R24,R25,R26,KC_NO},\ +{R30,R31,R32,R33,R34,R35,R36,R37},\ +{R40,R41,R42,R43,R44,R45,R46,R47}\ +} + + diff --git a/keyboards/otaku_split/rev0/rules.mk b/keyboards/otaku_split/rev0/rules.mk new file mode 100644 index 000000000..04e0aacb1 --- /dev/null +++ b/keyboards/otaku_split/rev0/rules.mk @@ -0,0 +1,81 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +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 = yes # 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +SPLIT_KEYBOARD=yes diff --git a/keyboards/otaku_split/rev1/config.h b/keyboards/otaku_split/rev1/config.h new file mode 100644 index 000000000..e15ae40d3 --- /dev/null +++ b/keyboards/otaku_split/rev1/config.h @@ -0,0 +1,255 @@ +/* +Copyright 2019 takashiski + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER takashiski +#define PRODUCT otaku_split +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { C6,D7,E6,B4,B5 } +#define MATRIX_COL_PINS { F4,F5,F6,F7,B1,B3,B2,B6 } +#define MATRIX_ROW_PINS_RIGHT { B5,B4,E6,D7,C6 } +#define MATRIX_COL_PINS_RIGHT { B6,B2,B3,B1,F7,F6,F5,F4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +#define SPLIT_HAND_PIN D2 //fix pin. HIGH is left, LOW is right + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/otaku_split/rev1/info.json b/keyboards/otaku_split/rev1/info.json new file mode 100644 index 000000000..9ee273375 --- /dev/null +++ b/keyboards/otaku_split/rev1/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "otaku split rev.1", + "url": "http", + "maintainer": "takashiski", + "width": 17.75, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"\u534a\u89d2", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"Insert", "x":8.75, "y":0}, {"label":"&", "x":9.75, "y":0}, {"label":"*", "x":10.75, "y":0}, {"label":"(", "x":11.75, "y":0}, {"label":")", "x":12.75, "y":0}, {"label":"=", "x":13.75, "y":0}, {"label":"~", "x":14.75, "y":0}, {"label":"|", "x":15.75, "y":0}, {"label":"Backspace", "x":16.75, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"7", "x":6.5, "y":1}, {"label":"Y", "x":9.25, "y":1}, {"label":"U", "x":10.25, "y":1}, {"label":"I", "x":11.25, "y":1}, {"label":"O", "x":12.25, "y":1}, {"label":"P", "x":13.25, "y":1}, {"label":"`", "x":14.25, "y":1}, {"label":"{", "x":15.25, "y":1}, {"label":"Enter", "x":16.5, "y":1, "w":1.25, "h":2}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":9.5, "y":2}, {"label":"J", "x":10.5, "y":2}, {"label":"K", "x":11.5, "y":2}, {"label":"L", "x":12.5, "y":2}, {"label":"+", "x":13.5, "y":2}, {"label":"*", "x":14.5, "y":2}, {"label":"}", "x":15.5, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"1", "x":9, "y":3}, {"label":"N", "x":10, "y":3}, {"label":"M", "x":11, "y":3}, {"label":"<", "x":12, "y":3}, {"label":">", "x":13, "y":3}, {"label":"?", "x":14, "y":3}, {"label":"_", "x":15, "y":3}, {"label":"Shift", "x":16, "y":3, "w":1.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"label":"\u7121\u5909\u63db", "x":3.5, "y":4}, {"label":"2", "x":4.5, "y":4}, {"label":"\u2190", "x":5.5, "y":4}, {"label":"\u2193", "x":6.5, "y":4}, {"label":"\u2191", "x":8.75, "y":4}, {"label":"\u2192", "x":9.75, "y":4}, {"label":".", "x":10.75, "y":4}, {"label":"\u5909\u63db", "x":11.75, "y":4, "w":1.25}, {"label":"\u30ab\u30bf\u30ab\u30ca", "x":13, "y":4, "w":1.25}, {"label":"Alt", "x":14.25, "y":4, "w":1.25}, {"label":"Menu", "x":15.5, "y":4}, {"label":"Ctrl", "x":16.5, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/otaku_split/rev1/keymaps/default/config.h b/keyboards/otaku_split/rev1/keymaps/default/config.h new file mode 100644 index 000000000..25cddc6bb --- /dev/null +++ b/keyboards/otaku_split/rev1/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 takashiski + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/otaku_split/rev1/keymaps/default/keymap.c b/keyboards/otaku_split/rev1/keymaps/default/keymap.c new file mode 100644 index 000000000..c708e53eb --- /dev/null +++ b/keyboards/otaku_split/rev1/keymaps/default/keymap.c @@ -0,0 +1,58 @@ +/* Copyright 2019 takashiski + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +enum layers{ + BASE=0, + CURSOR +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT( + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS ,KC_EQL,KC_JYEN,KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_ENT, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,KC_NUHS, + KC_LSHIFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH,KC_RO,KC_RSHIFT, + KC_LCTRL, KC_LGUI,KC_LALT,KC_MHEN,LT(CURSOR,KC_TAB),KC_SPC,KC_SPC, LT(CURSOR,KC_SPC),KC_ENT,KC_BSPC,KC_HENK,LT(CURSOR,KC_KANA),KC_RALT,KC_APP,KC_RCTRL + ), + [CURSOR] = LAYOUT( + KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_JYEN,KC_DEL, + KC_TAB, KC_Q, KC_UP, KC_E, KC_R, KC_T, KC_Y, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_PSCR, + KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_F, KC_G, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_SCLN, KC_QUOT,KC_NUHS, + KC_LSHIFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_END,KC_UP,KC_HOME, + KC_LCTRL, KC_LGUI,KC_LALT,KC_MHEN,KC_TRNS,KC_SPC,KC_SPC, KC_TRNS,KC_ENT,KC_BSPC,KC_HENK,KC_TRNS,KC_LEFT,KC_DOWN,KC_RIGHT + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/otaku_split/rev1/keymaps/default/readme.md b/keyboards/otaku_split/rev1/keymaps/default/readme.md new file mode 100644 index 000000000..dbaaa2eb8 --- /dev/null +++ b/keyboards/otaku_split/rev1/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for otaku_split \ No newline at end of file diff --git a/keyboards/otaku_split/rev1/keymaps/sample/config.h b/keyboards/otaku_split/rev1/keymaps/sample/config.h new file mode 100644 index 000000000..25cddc6bb --- /dev/null +++ b/keyboards/otaku_split/rev1/keymaps/sample/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 takashiski + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/otaku_split/rev1/keymaps/sample/keymap.c b/keyboards/otaku_split/rev1/keymaps/sample/keymap.c new file mode 100644 index 000000000..6875f462f --- /dev/null +++ b/keyboards/otaku_split/rev1/keymaps/sample/keymap.c @@ -0,0 +1,85 @@ +/* Copyright 2019 takashiski + * + * 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 . + */ + +#include QMK_KEYBOARD_H +// Defines the keycodes used by our macros in process_record_user + +#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) +#define _________________QWERTY_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T +#define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G +#define _________________QWERTY_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B + +#define _________________QWERTY_R1_________________ KC_Y, KC_U, KC_I, KC_O, KC_P +#define _________________QWERTY_R2_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN +#define _________________QWERTY_R3_________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH + +#define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5 +#define ________________NUMBER_RIGHT_______________ KC_6, KC_7, KC_8, KC_9, KC_0 +#define _________________FUNC_LEFT_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 +#define _________________FUNC_RIGHT________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 + +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +enum layers{ + BASE=0 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_wrapper(\ + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS ,KC_EQL,KC_JYEN,KC_BSPC,\ + KC_TAB, _________________QWERTY_L1_________________,KC_Y, _________________QWERTY_R1_________________,KC_LBRC,KC_RBRC,KC_ENT,\ + KC_CAPS, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________,KC_QUOT,KC_NUHS,\ + KC_LSHIFT,_________________QWERTY_L3_________________, KC_B,_________________QWERTY_R3_________________,KC_RO,KC_RSHIFT,\ + KC_LCTRL, KC_LGUI,KC_LALT,KC_MHEN,KC_TAB,KC_SPC,KC_SPC, KC_SPC,KC_ENT,KC_BSPC,KC_HENK,KC_KANA,KC_RALT,KC_APP,KC_RCTRL\ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/otaku_split/rev1/keymaps/sample/readme.md b/keyboards/otaku_split/rev1/keymaps/sample/readme.md new file mode 100644 index 000000000..dbaaa2eb8 --- /dev/null +++ b/keyboards/otaku_split/rev1/keymaps/sample/readme.md @@ -0,0 +1 @@ +# The default keymap for otaku_split \ No newline at end of file diff --git a/keyboards/otaku_split/rev1/readme.md b/keyboards/otaku_split/rev1/readme.md new file mode 100644 index 000000000..592c82641 --- /dev/null +++ b/keyboards/otaku_split/rev1/readme.md @@ -0,0 +1,19 @@ +# otaku_split + +![otaku_split](https://booth.pximg.net/c/620x620/4394ec37-d0ff-4c92-8f78-5c08d0566da6/i/1398595/511647ef-43e4-4f50-b56d-a0166c090fae_base_resized.jpg) +![otaku_split_bottom](https://booth.pximg.net/c/620x620/4394ec37-d0ff-4c92-8f78-5c08d0566da6/i/1398595/cc9eb113-46a9-42fa-aaed-c4007efbe45e_base_resized.jpg) + + +This is JP layout based split keyboards. + + + +Keyboard Maintainer: [takashiski](https://github.com/takashiski) +Hardware Supported: promicro(atmega32u4) on Otaku Split rev.1 PCB +Hardware Availability: https://skyhigh-works.booth.pm/items/1398595 + +Make example for this keyboard (after setting up your build environment): + + make otaku_split/rev1:default + +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). diff --git a/keyboards/otaku_split/rev1/rev1.c b/keyboards/otaku_split/rev1/rev1.c new file mode 100644 index 000000000..88b42eb95 --- /dev/null +++ b/keyboards/otaku_split/rev1/rev1.c @@ -0,0 +1,51 @@ +/* Copyright 2019 takashiski + * + * 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 . + */ +#include "rev1.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/otaku_split/rev1/rev1.h b/keyboards/otaku_split/rev1/rev1.h new file mode 100644 index 000000000..a1f71f033 --- /dev/null +++ b/keyboards/otaku_split/rev1/rev1.h @@ -0,0 +1,47 @@ +/* Copyright 2019 takashiski + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define LAYOUT(\ +L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06,R07,R17,\ +L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16,R27,\ +L20,L21,L22,L23,L24,L25, R20,R21,R22,R23,R24,R25,R26, \ +L30,L31,L32,L33,L34,L35, R30,R31,R32,R33,R34,R35,R36,R37,\ +L40,L41,L42,L43,L44,L45,L46, R40,R41,R42,R43,R44,R45,R46,R47\ +) {\ +{L00,L01,L02,L03,L04,L05,L06,KC_NO},\ +{L10,L11,L12,L13,L14,L15,L16,KC_NO},\ +{L20,L21,L22,L23,L24,L25,KC_NO,KC_NO},\ +{L30,L31,L32,L33,L34,L35,KC_NO,KC_NO},\ +{L40,L41,L42,L43,L44,L45,L46,KC_NO},\ +{R00,R01,R02,R03,R04,R05,R06,R07},\ +{R10,R11,R12,R13,R14,R15,R16,R17},\ +{R20,R21,R22,R23,R24,R25,R26,R27},\ +{R30,R31,R32,R33,R34,R35,R36,R37},\ +{R40,R41,R42,R43,R44,R45,R46,R47}\ +} + diff --git a/keyboards/otaku_split/rev1/rules.mk b/keyboards/otaku_split/rev1/rules.mk new file mode 100644 index 000000000..04e0aacb1 --- /dev/null +++ b/keyboards/otaku_split/rev1/rules.mk @@ -0,0 +1,81 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +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 = yes # 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +SPLIT_KEYBOARD=yes From 58641572cb478486ebd543da9eabd73eb044299f Mon Sep 17 00:00:00 2001 From: Biacco42 Date: Tue, 2 Jul 2019 04:48:34 +0900 Subject: [PATCH 286/341] [Keyboard] Add meishi2 keyboard (#6138) * Add meishi2 * Fix pin assign * Fix matrix representation macro * Remove needless mcu conf --- keyboards/meishi2/config.h | 250 ++++++++++++++++++++ keyboards/meishi2/info.json | 0 keyboards/meishi2/keymaps/default/config.h | 19 ++ keyboards/meishi2/keymaps/default/keymap.c | 35 +++ keyboards/meishi2/keymaps/default/readme.md | 1 + keyboards/meishi2/meishi2.c | 51 ++++ keyboards/meishi2/meishi2.h | 34 +++ keyboards/meishi2/readme.md | 15 ++ keyboards/meishi2/rules.mk | 80 +++++++ 9 files changed, 485 insertions(+) create mode 100644 keyboards/meishi2/config.h create mode 100644 keyboards/meishi2/info.json create mode 100644 keyboards/meishi2/keymaps/default/config.h create mode 100644 keyboards/meishi2/keymaps/default/keymap.c create mode 100644 keyboards/meishi2/keymaps/default/readme.md create mode 100644 keyboards/meishi2/meishi2.c create mode 100644 keyboards/meishi2/meishi2.h create mode 100644 keyboards/meishi2/readme.md create mode 100644 keyboards/meishi2/rules.mk diff --git a/keyboards/meishi2/config.h b/keyboards/meishi2/config.h new file mode 100644 index 000000000..f681eb500 --- /dev/null +++ b/keyboards/meishi2/config.h @@ -0,0 +1,250 @@ +/* +Copyright 2019 Biacco42 + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xBC42 +#define PRODUCT_ID 0x0003 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Biacco42 +#define PRODUCT meishi2 +#define DESCRIPTION The better micro macro keyboard + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 2 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D7, E6 } +#define MATRIX_COL_PINS { F5, F6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +//#define LCD_LINES 2 //< number of visible lines of the display +//#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display +//#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/meishi2/info.json b/keyboards/meishi2/info.json new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/meishi2/keymaps/default/config.h b/keyboards/meishi2/keymaps/default/config.h new file mode 100644 index 000000000..4e23fe7b1 --- /dev/null +++ b/keyboards/meishi2/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Biacco42 + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/meishi2/keymaps/default/keymap.c b/keyboards/meishi2/keymaps/default/keymap.c new file mode 100644 index 000000000..6eb3b5a9f --- /dev/null +++ b/keyboards/meishi2/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* Copyright 2019 Biacco42 + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V) \ + ) +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} + diff --git a/keyboards/meishi2/keymaps/default/readme.md b/keyboards/meishi2/keymaps/default/readme.md new file mode 100644 index 000000000..e03642d22 --- /dev/null +++ b/keyboards/meishi2/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for meishi2 \ No newline at end of file diff --git a/keyboards/meishi2/meishi2.c b/keyboards/meishi2/meishi2.c new file mode 100644 index 000000000..a74e6d3e6 --- /dev/null +++ b/keyboards/meishi2/meishi2.c @@ -0,0 +1,51 @@ +/* Copyright 2019 Biacco42 + * + * 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 . + */ +#include "meishi2.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/meishi2/meishi2.h b/keyboards/meishi2/meishi2.h new file mode 100644 index 000000000..776e0b0e1 --- /dev/null +++ b/keyboards/meishi2/meishi2.h @@ -0,0 +1,34 @@ +/* Copyright 2019 Biacco42 + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k02, k03 \ +) \ +{ \ + { k00, k01 }, \ + { k02, k03 } \ +} diff --git a/keyboards/meishi2/readme.md b/keyboards/meishi2/readme.md new file mode 100644 index 000000000..d80ec4418 --- /dev/null +++ b/keyboards/meishi2/readme.md @@ -0,0 +1,15 @@ +# meishi2 + +![meishi2](https://i.imgur.com/lG5iI3m.jpg) + +meishi2 - The better micro macro keyboard + +Keyboard Maintainer: [Biacco42](https://github.com/Biacco42) +Hardware Supported: The PCBs, controllers supported +Hardware Availability: [links to where you can find this hardware](https://github.com/Biacco42/meishi2) + +Make example for this keyboard (after setting up your build environment): + + make meishi2:default + +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). diff --git a/keyboards/meishi2/rules.mk b/keyboards/meishi2/rules.mk new file mode 100644 index 000000000..bc370be03 --- /dev/null +++ b/keyboards/meishi2/rules.mk @@ -0,0 +1,80 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +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 = yes # 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) From c45b751b147255229bf7afc65cb4ca9a3979c6d8 Mon Sep 17 00:00:00 2001 From: yiancar Date: Mon, 1 Jul 2019 21:11:38 +0100 Subject: [PATCH 287/341] [Keyboard] Gingham (#6212) * Initial * Prepare for final release * Final * Update keyboards/gingham/matrix.c Co-Authored-By: Drashna Jaelre * Update keyboards/gingham/rules.mk Co-Authored-By: Drashna Jaelre * Update keyboards/gingham/rules.mk Co-Authored-By: fauxpark * Update keyboards/gingham/config.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/gingham/gingham.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/hs60/v1/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/gingham/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/gingham/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/gingham/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/gingham/gingham.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/gingham/gingham.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Fixing copypastas * Update keyboards/gingham/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/gingham/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/gingham/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/gingham/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * More thingies --- keyboards/gingham/config.h | 250 ++++++++++++ keyboards/gingham/gingham.c | 40 ++ keyboards/gingham/gingham.h | 49 +++ keyboards/gingham/info.json | 15 + keyboards/gingham/keymaps/default/keymap.c | 60 +++ keyboards/gingham/keymaps/default/readme.md | 6 + keyboards/gingham/keymaps/iso/keymap.c | 60 +++ keyboards/gingham/keymaps/iso/readme.md | 6 + keyboards/gingham/matrix.c | 247 ++++++++++++ keyboards/gingham/readme.md | 22 ++ keyboards/gingham/rules.mk | 95 +++++ keyboards/gingham/usbconfig.h | 397 ++++++++++++++++++++ keyboards/hs60/v1/rules.mk | 3 +- 13 files changed, 1249 insertions(+), 1 deletion(-) create mode 100644 keyboards/gingham/config.h create mode 100644 keyboards/gingham/gingham.c create mode 100644 keyboards/gingham/gingham.h create mode 100644 keyboards/gingham/info.json create mode 100644 keyboards/gingham/keymaps/default/keymap.c create mode 100644 keyboards/gingham/keymaps/default/readme.md create mode 100644 keyboards/gingham/keymaps/iso/keymap.c create mode 100644 keyboards/gingham/keymaps/iso/readme.md create mode 100644 keyboards/gingham/matrix.c create mode 100644 keyboards/gingham/readme.md create mode 100644 keyboards/gingham/rules.mk create mode 100644 keyboards/gingham/usbconfig.h diff --git a/keyboards/gingham/config.h b/keyboards/gingham/config.h new file mode 100644 index 000000000..53601e8ca --- /dev/null +++ b/keyboards/gingham/config.h @@ -0,0 +1,250 @@ +/* +Copyright 2019 Yiancar + +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 . +*/ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0x8968 +#define PRODUCT_ID 0x4748 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Yiancar-Designs +#define PRODUCT Gingham +#define DESCRIPTION A 65 persent keyboard with only through hole components + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ + +/* A Custom matrix.c is used to poll the port expander C6 shows that the pins are hardwired there */ +#define MATRIX_ROW_PINS { D0, C3, D1, C1, C2 } +#define MATRIX_COL_PINS { D4, D4, C0, B5, D5, B4, D6, B1, B0, B2, D7, B3, D4, D4 } +#define UNUSED_PINS +#define PORT_EXPANDER_ADDRESS 0x20 + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define NO_UART 1 + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 + diff --git a/keyboards/gingham/gingham.c b/keyboards/gingham/gingham.c new file mode 100644 index 000000000..9a5ffe453 --- /dev/null +++ b/keyboards/gingham/gingham.c @@ -0,0 +1,40 @@ +/* Copyright 2019 Yiancar + * + * 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 . + */ +#include "gingham.h" +#include "i2c_master.h" + +uint8_t send_data; + +void matrix_init_kb(void) { + // Due to the way the port expander is setup both LEDs are already outputs. This is set n matrix.copy + //Turn the red LED on as power indicator. + send_data = 0x10; + i2c_writeReg((PORT_EXPANDER_ADDRESS << 1), 0x09, &send_data, 1, 20); + + matrix_init_user(); +} + +void led_set_kb(uint8_t usb_led) { + // Bit 3 is Green LED, bit 4 is Red LED. + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + send_data = 0x18; + } else { + send_data = 0x10; + } + i2c_writeReg((PORT_EXPANDER_ADDRESS << 1), 0x09, &send_data, 1, 20); + + led_set_user(usb_led); +} diff --git a/keyboards/gingham/gingham.h b/keyboards/gingham/gingham.h new file mode 100644 index 000000000..a9785b541 --- /dev/null +++ b/keyboards/gingham/gingham.h @@ -0,0 +1,49 @@ +/* Copyright 2019 Yiancar + * + * 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 . + */ + +#pragma once + +#define XXX KC_NO + +#include "quantum.h" + +#define LAYOUT_60_iso_split_bs_rshift( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D } \ +} + +#define LAYOUT_60_ansi_split_bs_rshift( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D } \ +} diff --git a/keyboards/gingham/info.json b/keyboards/gingham/info.json new file mode 100644 index 000000000..ed58ef6a6 --- /dev/null +++ b/keyboards/gingham/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "Gingham", + "url": "https://yiancar-designs.com/product/gingham/", + "maintainer": "Yiancar", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_ansi_split_bs_rshift": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Back", "x":13, "y":0}, {"label":"Delete", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Shift", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Fn", "x":11.25, "y":4, "w":1.25}, {"label":"App", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_iso_split_bs_rshift": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Back", "x":13, "y":0}, {"label":"Delete", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"ISO Hash", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"ISO \\", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Shift", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Fn", "x":11.25, "y":4, "w":1.25}, {"label":"App", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/gingham/keymaps/default/keymap.c b/keyboards/gingham/keymaps/default/keymap.c new file mode 100644 index 000000000..b5b4de5ff --- /dev/null +++ b/keyboards/gingham/keymaps/default/keymap.c @@ -0,0 +1,60 @@ +/* Copyright 2018 Yiancar + * + * 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 . + */ +#include QMK_KEYBOARD_H + +//This is the ANSI version of the PCB + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_60_ansi_split_bs_rshift( /* Base */ + 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_DEL, + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + 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_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1) , KC_APP, KC_RCTL), + +[1] = LAYOUT_60_ansi_split_bs_rshift( /* FN */ + 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_60_ansi_split_bs_rshift( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[3] = LAYOUT_60_ansi_split_bs_rshift( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} \ No newline at end of file diff --git a/keyboards/gingham/keymaps/default/readme.md b/keyboards/gingham/keymaps/default/readme.md new file mode 100644 index 000000000..2f3372492 --- /dev/null +++ b/keyboards/gingham/keymaps/default/readme.md @@ -0,0 +1,6 @@ +The default keymap for Gingham +============================== + +![Layout image](https://i.imgur.com/WwOVJTh.jpg) + +Default layer is normal ANSI and Fn layer is used for Volume control and arrow cluster. \ No newline at end of file diff --git a/keyboards/gingham/keymaps/iso/keymap.c b/keyboards/gingham/keymaps/iso/keymap.c new file mode 100644 index 000000000..2956887dd --- /dev/null +++ b/keyboards/gingham/keymaps/iso/keymap.c @@ -0,0 +1,60 @@ +/* Copyright 2018 Yiancar + * + * 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 . + */ +#include QMK_KEYBOARD_H + +//This is the ISO version of the PCB + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_60_iso_split_bs_rshift( /* Base */ + 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_DEL, + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1) , KC_APP, KC_RCTL), + +[1] = LAYOUT_60_iso_split_bs_rshift( /* FN */ + 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_60_iso_split_bs_rshift( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[3] = LAYOUT_60_iso_split_bs_rshift( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} \ No newline at end of file diff --git a/keyboards/gingham/keymaps/iso/readme.md b/keyboards/gingham/keymaps/iso/readme.md new file mode 100644 index 000000000..cd29c2890 --- /dev/null +++ b/keyboards/gingham/keymaps/iso/readme.md @@ -0,0 +1,6 @@ +The default keymap for ISO Gingham +================================== + +![Layout image](https://i.imgur.com/WwOVJTh.jpg) + +Default layer is normal ISO and Fn layer is used for Volume control and arrow cluster \ No newline at end of file diff --git a/keyboards/gingham/matrix.c b/keyboards/gingham/matrix.c new file mode 100644 index 000000000..790ba9c28 --- /dev/null +++ b/keyboards/gingham/matrix.c @@ -0,0 +1,247 @@ +/* +Copyright 2012-2019 Jun Wako, Jack Humbert, Yiancar + +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 . +*/ +#include +#include +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" +#include "i2c_master.h" + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +#ifdef MATRIX_MASKED + extern const matrix_row_t matrix_mask[]; +#endif + +static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values +static matrix_row_t matrix[MATRIX_ROWS]; //debounced values + +__attribute__ ((weak)) +void matrix_init_quantum(void) { + matrix_init_kb(); +} + +__attribute__ ((weak)) +void matrix_scan_quantum(void) { + matrix_scan_kb(); +} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +//Deprecated. +bool matrix_is_modified(void) +{ + if (debounce_active()) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1< 0) && (x < 12) ) { + setPinInputHigh(col_pins[x]); + } + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) +{ + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + wait_us(30); + + // For each col... + for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + uint8_t pin_state; + // Select the col pin to read (active low) + switch (col_index) { + case 0 : + i2c_readReg((PORT_EXPANDER_ADDRESS << 1), 0x09, &pin_state, 1, 20); + pin_state = pin_state & 0x01; + break; + case 12 : + i2c_readReg((PORT_EXPANDER_ADDRESS << 1), 0x09, &pin_state, 1, 20); + pin_state = pin_state & (1 << 2); + break; + case 13 : + i2c_readReg((PORT_EXPANDER_ADDRESS << 1), 0x09, &pin_state, 1, 20); + pin_state = pin_state & (1 << 1); + break; + default : + pin_state = readPin(col_pins[col_index]); + } + + // Populate the matrix row with the state of the col pin + current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); + } + + // Unselect row + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + +void matrix_init(void) { + + // Initialize I2C + i2c_init(); + + // initialize key pins + init_pins(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + raw_matrix[i] = 0; + matrix[i] = 0; + } + + debounce_init(MATRIX_ROWS); + + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) +{ + bool changed = false; + + // Set row, read cols + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { + changed |= read_cols_on_row(raw_matrix, current_row); + } + + debounce(raw_matrix, matrix, MATRIX_ROWS, changed); + + matrix_scan_quantum(); + return (uint8_t)changed; +} diff --git a/keyboards/gingham/readme.md b/keyboards/gingham/readme.md new file mode 100644 index 000000000..9893884e8 --- /dev/null +++ b/keyboards/gingham/readme.md @@ -0,0 +1,22 @@ +# Gingham + +![gingham](https://yiancar-designs.com/wp-content/uploads/2019/06/IMG_20190625_233619.jpg) + +A 60% keyboard with only through hole components. + +Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar) +Hardware Supported: ATMEGA328p with vusb [PCB](https://github.com/yiancar/gingham_pcb) +Hardware Availability: https://yiancar-designs.com/, https://novelkeys.xyz, https://mechboards.co.uk/ + +Make example for this keyboard (after setting up your build environment): + make gingham:default + +Flash firmware: + // In bootloader mode + make gingham:default:program + +Bootloader: +use usbasploader HSGW's my repository. +https://github.com/hsgw/USBaspLoader/tree/plaid + +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). diff --git a/keyboards/gingham/rules.mk b/keyboards/gingham/rules.mk new file mode 100644 index 000000000..b66b07129 --- /dev/null +++ b/keyboards/gingham/rules.mk @@ -0,0 +1,95 @@ +SRC = matrix.c \ + i2c_master.c + +# MCU name +MCU = atmega328p +PROTOCOL = VUSB + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +# +# This uses usbaspbootloader +# BOOTLOADER = atmel-dfu + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 +OPT_DEFS += -DBOOTLOADER_SIZE=2048 + +# Flash program via avrdude, but default command is not suitable. +# You can use plaid:default:program +PROGRAM_CMD = avrdude -c usbasp -p m328p -U flash:w:$(BUILD_DIR)/$(TARGET).hex + +# disable debug code +OPT_DEFS = -DDEBUG_LEVEL=0 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +# unsupported features for now +NO_UART = yes +NO_SUSPEND_POWER_DOWN = yes +CUSTOM_MATRIX = yes diff --git a/keyboards/gingham/usbconfig.h b/keyboards/gingham/usbconfig.h new file mode 100644 index 000000000..30cdd3698 --- /dev/null +++ b/keyboards/gingham/usbconfig.h @@ -0,0 +1,397 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#ifndef __usbconfig_h_included__ +#define __usbconfig_h_included__ + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +// max power draw with maxed white underglow measured at 120 mA (peaks) +#define USB_CFG_MAX_BUS_POWER 100 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 0 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x01, 0x00 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'Y','i','a','n','c','a','r','-','D','e', 's', 'i', 'g', 'n', 's' +#define USB_CFG_VENDOR_NAME_LEN 15 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'G', 'i', 'n', 'g', 'h', 'a', 'm' +#define USB_CFG_DEVICE_NAME_LEN 7 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +#define USB_CFG_SERIAL_NUMBER '0' +#define USB_CFG_SERIAL_NUMBER_LEN 1 +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +// #define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +// /* #define USB_INTR_CFG_CLR 0 */ +// /* #define USB_INTR_ENABLE EIMSK */ +// #define USB_INTR_ENABLE_BIT INT1 +// /* #define USB_INTR_PENDING EIFR */ +// #define USB_INTR_PENDING_BIT INTF1 +// #define USB_INTR_VECTOR INT1_vect + +#endif /* __usbconfig_h_included__ */ diff --git a/keyboards/hs60/v1/rules.mk b/keyboards/hs60/v1/rules.mk index 29e91aa24..d552fc58f 100644 --- a/keyboards/hs60/v1/rules.mk +++ b/keyboards/hs60/v1/rules.mk @@ -68,8 +68,9 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches RGB_MATRIX_ENABLE = yes # Use RGB matrix +RAW_ENABLE = yes -LAYOUTS = 60_ansi 60_iso +LAYOUTS = 60_ansi_split_bs_rshift # Experimental features for zealcmd please do no enable #RAW_ENABLE = yes From 8f3dabbf3f16f63c5e6b32f428b524c1dd73dc83 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 2 Jul 2019 15:53:28 +1000 Subject: [PATCH 288/341] [Keyboard] Remove empty led_set_kb() from crkbd/rev1 (#6230) --- keyboards/crkbd/rev1/rev1.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/keyboards/crkbd/rev1/rev1.c b/keyboards/crkbd/rev1/rev1.c index 38ab92788..b969b5e28 100644 --- a/keyboards/crkbd/rev1/rev1.c +++ b/keyboards/crkbd/rev1/rev1.c @@ -6,13 +6,6 @@ float tone_goodbye[][2] = SONG(GOODBYE_SOUND); #endif -#ifdef SSD1306OLED -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - //led_set_user(usb_led); -} -#endif - #ifdef RGB_MATRIX_ENABLE // Logical Layout From 8b58c67bbb2e7eddd679a7944effef7e91aa2347 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Tue, 2 Jul 2019 17:20:44 +0100 Subject: [PATCH 289/341] [Keymap] snowkuma Planck keymap (#6225) * Snowkuma's planck layout. Heavily influenced by both Planck and SDOTHUMs layouts. I have tried to implement a comfortable layout with a wide stagger and a minimal set of key usage. Still a work in progress, hope it is useful to others. * Adds simple readme file and images of layout * Removes unused experimental definitions * Update readme.md Adds images of layout to readme. * Removes accidentally added test keymap .swn .swo .swp files * Updates config.h replaces include guard As suggested by @noroadsleft replaces the include guard (ifndef, define and endif) with just `#pragma once`. * Replaces two extra KC with inbuilt QMK equivalents custom_keycodes.h Replaces `___f___` with the equivalent QMK alias `_______` KC_TRNS `___x___` with the equivalent QMK alias `XXXXXXX` KC_NO Updates keymap.c to reflect the changes made. * Changes keymap.c to include QMK_KEYBOARD_H Replaces planck.h and action_layer.h includes with the single inclusion of QMK_KEYBOARD_H which includes action_layer.h automatically. * Update keyboards/planck/keymaps/snowkuma/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keymap.c removes unused Coleman key code from enum planck_keycodes * Update keymap.c removes COLEMAK key code logic --- keyboards/planck/keymaps/snowkuma/config.h | 46 +++ .../planck/keymaps/snowkuma/custom_keycodes.h | 60 +++ keyboards/planck/keymaps/snowkuma/keymap.c | 373 ++++++++++++++++++ .../planck/keymaps/snowkuma/my_strings.h | 4 + keyboards/planck/keymaps/snowkuma/readme.md | 14 + keyboards/planck/keymaps/snowkuma/rules.mk | 19 + 6 files changed, 516 insertions(+) create mode 100644 keyboards/planck/keymaps/snowkuma/config.h create mode 100644 keyboards/planck/keymaps/snowkuma/custom_keycodes.h create mode 100644 keyboards/planck/keymaps/snowkuma/keymap.c create mode 100644 keyboards/planck/keymaps/snowkuma/my_strings.h create mode 100644 keyboards/planck/keymaps/snowkuma/readme.md create mode 100644 keyboards/planck/keymaps/snowkuma/rules.mk diff --git a/keyboards/planck/keymaps/snowkuma/config.h b/keyboards/planck/keymaps/snowkuma/config.h new file mode 100644 index 000000000..b41ead838 --- /dev/null +++ b/keyboards/planck/keymaps/snowkuma/config.h @@ -0,0 +1,46 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 + +// Settings for homerow mods +#define TAPPING_TERM 250 +#define IGNORE_MOD_TAP_INTERRUPT + + +// Add the leader key feature +#define LEADER_TIMEOUT 300 diff --git a/keyboards/planck/keymaps/snowkuma/custom_keycodes.h b/keyboards/planck/keymaps/snowkuma/custom_keycodes.h new file mode 100644 index 000000000..5e4353c04 --- /dev/null +++ b/keyboards/planck/keymaps/snowkuma/custom_keycodes.h @@ -0,0 +1,60 @@ +// These definitions are for convenience. +// It is not wise to put sensitive information here such as passwords +// as anyone with access to your keyboard will be able to use them! + +// magnet keycodes +#define M_LEFT LCA(KC_LEFT) +#define M_TOP LCA(KC_UP) +#define M_BOTT LCA(KC_DOWN) +#define M_RGHT LCA(KC_RGHT) + +#define M_TOPL LCA(KC_U) +#define M_TOPR LCA(KC_I) +#define M_BOTL LCA(KC_J) +#define M_BOTR LCA(KC_K) + +#define M_L13 LCA(KC_D) +#define M_L23 LCA(KC_E) +#define M_C13 LCA(KC_F) +#define M_R23 LCA(KC_T) +#define M_R13 LCA(KC_G) + +#define M_NEXT LCAG(KC_RGHT) +#define M_PREV LCAG(KC_LEFT) + +#define M_MAX LCA(KC_ENT) +#define M_CEN LCA(KC_C) +#define M_REST LCA(KC_BSPC) + +// Shortcuts +#define INPUT_L LCAG(KC_SPC) +#define TXT_PLS LGUI(KC_PLUS) +#define TXT_MIN LGUI(KC_MINS) +#define SC_CAPF LGUI(LSFT(KC_3)) // Capture the full screen to file +#define SC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen to file + +// Special Layer keycodes +#define ESC_NUM LT(_NUMBER, KC_ESC) +#define BSP_REG LT(_REGEX, KC_BSPC) +#define DEL_REG LT(_REGEX, KC_DEL) +#define MIN_ARR LT(_ARRANGE, KC_MINS) +#define TAB_SFT LSFT_T(KC_TAB) +#define SPC_SYM LT(_SYMBOL, KC_SPC) +#define ENT_THU LT(_THUMB, KC_ENT) +#define FUN_L MO(_FUNCTION) + +// HOMEROW SHIFT +#define T_SFT LSFT_T(KC_T) +#define N_SFT RSFT_T(KC_N) + +// Special Characters +#define GBP LALT(KC_3) +#define EURO LALT(S(KC_2)) + +// Modifier tap holds +#define Q_CTL LCTL_T(KC_Q) +#define W_ALT LALT_T(KC_W) +#define F_GUI LGUI_T(KC_F) +#define U_GUI LGUI_T(KC_U) +#define Y_ALT LALT_T(KC_Y) +#define SCL_CTL LCTL_T(KC_SCLN) diff --git a/keyboards/planck/keymaps/snowkuma/keymap.c b/keyboards/planck/keymaps/snowkuma/keymap.c new file mode 100644 index 000000000..eee8e1170 --- /dev/null +++ b/keyboards/planck/keymaps/snowkuma/keymap.c @@ -0,0 +1,373 @@ +/* Copyright 2015-2017 Jack Humbert + * + * 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 . + */ + +/* _ + * ___ _ __ ___ __ __ | | __ _ _ _ __ ___ __ _ + * / __| | '_ \ / _ \ \ \ /\ / / | |/ / | | | | | '_ ` _ \ / _` | + * \__ \ | | | | | (_) | \ V V / | < | |_| | | | | | | | | (_| | + * |___/ |_| |_| \___/ \_/\_/ |_|\_\ \__,_| |_| |_| |_| \__,_| + * + * https://github.com/snowkuma + * + * version 0.1 +*/ + +#include QMK_KEYBOARD_H +#include "muse.h" +#include "custom_keycodes.h" +#include "my_strings.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + _COLEMAK = 0, + _SYMBOL, + _SFT_NAV, + _REGEX, + _NUMBER, + _ARRANGE, + _FUNCTION, + _MOUSE, + _THUMB +}; + +enum planck_keycodes { + EMAIL = SAFE_RANGE, + EMOJI, + EXT_PLV, + ITERM, + LESSON, + TYPE_FU, + VS_CODE, + VIM +}; + + +// Tap Dance Declarations +enum { + TD_RESET = 0, + TD_TILD +}; + +// Tap Dance Definitions +void safe_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count >=3) { + // Reset the keyboard if you tap the key more than three times + reset_keyboard(); + reset_tap_dance(state); + } +}; void tilde_home(qk_tap_dance_state_t *state, void *user_data) { + if (state->count > 2) { + register_code(KC_LSFT); + register_code(KC_GRV); + } + else { + register_code(KC_LSFT); + register_code(KC_GRV); + if (state->count > 1) { + // Outputs ~/ if tilde tapped twice + unregister_code(KC_GRV); + unregister_code(KC_LSFT); + register_code(KC_SLSH); + } + } +} + +void tilde_reset(qk_tap_dance_state_t *state, void *user_data) +{ + if (state->count == 2) { + unregister_code(KC_SLSH); + } else { + unregister_code(KC_GRV); + unregister_code(KC_LSFT); + } +} + + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_RESET] = ACTION_TAP_DANCE_FN (safe_reset), + [TD_TILD] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, tilde_home, tilde_reset) +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* COLEMAK + * + * Base layer + * ,-----------------------------------------------------------------------------------------------------------. + * | q | w | f | p | g | | | j | l | u | y | ; | + * | CTRL | ALT | GUI | | | | | | | GUI | ALT | CTRL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | a | r | s | t | d | | | h | n | e | i | o | + * | | | | Shift | | | | | Shift | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | z | x | c | v | b | | | k | m | , | . | ' | + * | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | Esc | BkSp | - | Tab | Space | Enter | | | + * | | | | Num | Regex | Arrange| Shift | Sym | Thumb | | | | + * `--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------' + */ +[_COLEMAK] = LAYOUT_planck_grid( + Q_CTL, W_ALT, F_GUI, KC_P, KC_G, _______, _______, KC_J, KC_L, U_GUI, Y_ALT, SCL_CTL, + KC_A, KC_R, KC_S, T_SFT, KC_D, _______, _______, KC_H, N_SFT, KC_E, KC_I, KC_O, + KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, KC_K, KC_M, KC_COMM, KC_DOT, KC_QUOT, + _______, _______, _______, ESC_NUM, BSP_REG, MIN_ARR, TAB_SFT, SPC_SYM, ENT_THU, _______, _______, _______ +), + +/* Symbol & Cursor Nav layer + * ,-----------------------------------------------------------------------------------------------------------. + * | ! | @ | € | & | | | | | | Home | Up | End | PgUp | + * | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | ~ | < | % | > | + | | | | Left | Down | Right | PgDn | + * | 2x ~/ | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | ` | | £ | = | - | | | | | | | | + * | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | _ | Del | - | | f() | | | | | + * | | | | | Mouse | | | Sym |Function| | | | + * `--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------' + */ +[_SYMBOL] = LAYOUT_planck_grid( + KC_EXLM, KC_AT, EURO, KC_AMPR, KC_PIPE, _______, _______, _______, KC_HOME, KC_UP, KC_END, KC_PGUP, + TD(TD_TILD), KC_LT, KC_PERC, KC_GT, KC_PLUS, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, + KC_GRV, _______, GBP, KC_EQL, KC_MINS, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_UNDS, DEL_REG, KC_MINS, _______, _______, _______, _______, _______, _______ +), + +/* Regex layer + * ,-----------------------------------------------------------------------------------------------------------. + * | | | | | | | | * | [ | ^ | ] | : | + * | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | ? | ( | $ | ) | / | + * | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | { | # | } | \ | + * | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | f() | | | Space | | | | + * | | | | | Regex | | | Mouse | Enter | | | | + * `--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------' + */ +[_REGEX] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, KC_ASTR, KC_LBRC, KC_CIRC, KC_RBRC, KC_COLN, + _______, _______, _______, _______, _______, _______, _______, KC_QUES, KC_LPRN, KC_DLR, KC_RPRN, KC_SLSH, + _______, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_LCBR, KC_HASH, KC_RCBR, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT, _______, _______, _______ +), + +/* Number Layer + * ,-----------------------------------------------------------------------------------------------------------. + * | : | F | E | D | G | | | * | 7 | 8 | 9 | 0 | + * | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | # | C | B | A | + | | | . | 4 | 5 | 6 | / | + * | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | € | x | £ | = | - | | | , | 1 | 2 | 3 | \ | + * | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | f() | | | | | | | | | + * | | | | Number | | | | Space | Enter | | | | + * `--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------' +* +*/ +[_NUMBER] = LAYOUT_planck_grid( + KC_COLN, S(KC_F), S(KC_E), S(KC_D), S(KC_G), _______, _______, KC_ASTR, KC_7, KC_8, KC_9, KC_0, + KC_HASH, S(KC_C), S(KC_B), S(KC_A), KC_PLUS, _______, _______, KC_DOT, KC_4, KC_5, KC_6, KC_SLSH, + EURO, KC_X, GBP, KC_EQL, KC_MINS, _______, _______, KC_COMM, KC_1, KC_2, KC_3, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Mouse Layer + * ,-----------------------------------------------------------------------------------------------------------. + * | Ctrl | Alt | GUI | | | | | | | Up | | wUp | + * | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | Btn3 | Btn2 | Btn1 | Shift | | | | | Left | Down | Right | wDn | + * | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | + * | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | f() | | | f() | | | | + * | | | | | Mouse | | | Mouse | | | | | + * `--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------' +*/ +[_MOUSE] = LAYOUT_planck_grid( + KC_LCTL, KC_LALT, KC_LGUI, _______, _______, _______, _______, _______, _______, KC_MS_U, _______, KC_WH_U, + KC_BTN3, KC_BTN2, KC_BTN1, KC_LSFT, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Thumb Layer + * ,-----------------------------------------------------------------------------------------------------------. + * | Reset | | SC_CAPF| SC_CAPP| | | | |Input L | | | | + * | (3x) | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | TypeFu | CMD + | | | | Caps | emoji | iterm | | + * | | | | | | | | | Lock | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | VS_Code| Vim | CMD - | | | | | | | | + * | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | f() | | | | + * | | | | | | | | | Thumb | | | | + * `--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------' + */ +[_THUMB] = LAYOUT_planck_grid( + TD(TD_RESET), _______, SC_CAPF, SC_CAPP, _______, _______, _______, _______, INPUT_L, _______, _______, _______, + _______, _______, _______, TYPE_FU, TXT_PLS, _______, _______, _______, KC_CAPS, EMOJI, ITERM, _______, + _______, _______, VS_CODE, VIM, TXT_MIN, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Arrange Layer + * ,-----------------------------------------------------------------------------------------------------------. + * | | | Full | | | | | | Top L | Top | Top R | | + * | | | Screen | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | L 1/3 | L 2/3 | C 1/3 | R 2/3 | R 1/3 | | | Prev | Left | Bottom | Right | Next | + * | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | Restore| | Center | | | | | | Bottom | | Bottom | | + * | | | | | | | | | Left | | Right | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | f() | | | | | | + * | | | | | | Arrange| | | | | | | + * `--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------' +*/ +[_ARRANGE] = LAYOUT_planck_grid( + _______, _______, M_MAX, _______, _______, _______, _______, _______, M_TOPL, M_TOP, M_TOPR, _______, + M_L13, M_L23, M_C13, M_R23, M_R13, _______, _______, M_PREV, M_LEFT, M_BOTT, M_RGHT, M_NEXT, + M_REST, _______, M_CEN, _______, _______, _______, _______, _______, M_BOTL, _______, M_BOTR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Function Layer + * ,-----------------------------------------------------------------------------------------------------------. + * | Ctrl | Alt | GUI | | | | | | F7 | F8 | F9 | F10 | + * | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | Shift | | | | | F4 | F5 | F6 | F11 | + * | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | F1 | F2 | F3 | F12 | + * | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | f() | f() | | | | + * | | | | | | | |Function|Function| | | | + * `--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------' +*/ +[_FUNCTION] = LAYOUT_planck_grid( + KC_LCTL, KC_LALT, KC_LGUI, _______, _______, _______, _______, KC_F13, KC_F7, KC_F8, KC_F9, KC_F10, + _______, _______, _______, KC_LSFT, _______, _______, _______, KC_F14, KC_F4, KC_F5, KC_F6, KC_F11, + _______, _______, _______, _______, _______, _______, _______, KC_F15, KC_F1, KC_F2, KC_F3, KC_F12, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +uint32_t layer_state_set_user(uint32_t state) { + state = update_tri_layer_state(state, _SYMBOL, _THUMB, _FUNCTION); + state = update_tri_layer_state(state, _SYMBOL, _REGEX, _MOUSE); + return state; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case EMAIL: + if (record->event.pressed) { + SEND_STRING(MY_EMAIL); + } + return false; + break; + case ITERM: + if (record->event.pressed) { + SEND_STRING(SS_LGUI(" ")); + SEND_STRING("iterm" SS_TAP(X_ENTER)); + } + return false; + break; + case TYPE_FU: + if (record->event.pressed) { + SEND_STRING(SS_LGUI(" ")); + SEND_STRING("type fu" SS_TAP(X_ENTER)); + } + return false; + break; + case VIM: + if (record->event.pressed) { + SEND_STRING(SS_LGUI(" ")); + SEND_STRING("macvim.app" SS_TAP(X_ENTER)); + } + return false; + break; + case VS_CODE: + if (record->event.pressed) { + SEND_STRING(SS_LGUI(" ")); + SEND_STRING("visual studio code" SS_TAP(X_ENTER)); + } + return false; + break; + case EMOJI: + if (record->event.pressed) { + register_code(KC_LGUI); + register_code(KC_LCTL); + register_code(KC_SPC); + unregister_code(KC_LGUI); + unregister_code(KC_LCTL); + unregister_code(KC_SPC); + } + return false; + break; + } + return true; +} + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void matrix_scan_user(void) { + #ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } + #endif +} + +void matrix_init_user(void) { + set_unicode_input_mode(UC_OSX); +} diff --git a/keyboards/planck/keymaps/snowkuma/my_strings.h b/keyboards/planck/keymaps/snowkuma/my_strings.h new file mode 100644 index 000000000..4e2ee6f77 --- /dev/null +++ b/keyboards/planck/keymaps/snowkuma/my_strings.h @@ -0,0 +1,4 @@ +// Email address +#define MY_EMAIL "myname@email.com" +// Canned responses +#define CANNED_1 "A canned response / template for emails." diff --git a/keyboards/planck/keymaps/snowkuma/readme.md b/keyboards/planck/keymaps/snowkuma/readme.md new file mode 100644 index 000000000..b1d5ff9c9 --- /dev/null +++ b/keyboards/planck/keymaps/snowkuma/readme.md @@ -0,0 +1,14 @@ +# Snowkuma's Planck Layout v.0.1 + +Wide colemak planck layout. Heavily influenced by the ideas of sdothum and his blog. + +Aims to minimize key usage to minimal set and have hands in a comfortable position. + +![Colemak](https://i.imgur.com/4B3HdCE.png) +![Symbol](https://i.imgur.com/WYxIJqv.png) +![Regex](https://i.imgur.com/PxTCT6P.png) +![Number](https://i.imgur.com/NzhW26R.png) +![Arrange](https://i.imgur.com/BlTJjyW.png) +![Shortcuts](https://i.imgur.com/p2ooSrC.png) +![Function](https://i.imgur.com/U1F5J3R.png) +![Mouse](https://i.imgur.com/nCHabXV.png) diff --git a/keyboards/planck/keymaps/snowkuma/rules.mk b/keyboards/planck/keymaps/snowkuma/rules.mk new file mode 100644 index 000000000..4a172d286 --- /dev/null +++ b/keyboards/planck/keymaps/snowkuma/rules.mk @@ -0,0 +1,19 @@ +SRC += muse.c + +AUDIO_ENABLE = yes +BACKLIGHT_ENABLE = no +BLUETOOTH_ENABLE = no +BOOTMAGIC_ENABLE = no +COMBO_ENABLE = no +COMMAND_ENABLE = no +CONSOLE_ENABLE = no +EXTRAKEY_ENABLE = yes +LEADER_ENABLE = yes +MIDI_ENABLE = no +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes # nkey rollover +RGBLIGHT_ENABLE = no +SLEEP_LED_ENABLE = no +STENO_ENABLE = yes +TAP_DANCE_ENABLE = yes +UNICODE_ENABLE = yes From adda4e137e980d1597f7df7317a3419584e10d4f Mon Sep 17 00:00:00 2001 From: francislan Date: Tue, 2 Jul 2019 09:21:45 -0700 Subject: [PATCH 290/341] [Keymap] Replaced xxxxxxx by XXXXXXX to fix build breakage (#6228) --- .../thevankeyboards/minivan/keymaps/budi/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/thevankeyboards/minivan/keymaps/budi/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/budi/keymap.c index ee8653520..f8b42cb79 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/budi/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/budi/keymap.c @@ -164,8 +164,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MN] = LAYOUT_arrow( ALTESC, CAG1, CAG2, CAG3, CAG4, CAG5, CAG6, CAG7, CAG8, CAG9, CAG0, SWTCH, ALTX, ALT1, ALT2, ALT3, ALT4, ALT5, ALT6, ALT7, ALT8, ALT9, ALT0, _______, - ALTEQL, MEH1, MEH2, MEH3, MEH4, MEH5, MEH6, MEH7, MEH8, MEH9, MEH0, xxxxxxx, - ALTMIN, xxxxxxx, XBACK, ALTL, ALTR, XFFWD, xxxxxxx, xxxxxxx, xxxxxxx + ALTEQL, MEH1, MEH2, MEH3, MEH4, MEH5, MEH6, MEH7, MEH8, MEH9, MEH0, XXXXXXX, + ALTMIN, XXXXXXX, XBACK, ALTL, ALTR, XFFWD, XXXXXXX, XXXXXXX, XXXXXXX ), @@ -183,9 +183,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_FN] = LAYOUT_arrow( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, - _______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, xxxxxxx, - _______, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, KC_PWR, KC_SLEP, KC_WAKE, xxxxxxx, xxxxxxx, xxxxxxx, - _______, KC_CAPS, _______, xxxxxxx, SWTCH, KC_RALT, xxxxxxx, RESET, _______ + _______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PWR, KC_SLEP, KC_WAKE, XXXXXXX, XXXXXXX, XXXXXXX, + _______, KC_CAPS, _______, XXXXXXX, SWTCH, KC_RALT, XXXXXXX, RESET, _______ ) From 308275909d081398231b4aa766846b63ffe7381a Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Tue, 2 Jul 2019 09:22:56 -0700 Subject: [PATCH 291/341] [Keyboard] GH60 Configurator updates and modernization (#6232) * Convert gh60.h to #pragma once include guard * Lint gh60.h This commit only changes white space. * Convert info.json to debug linting Making this file easier to read. * Put the label keys first for LAYOUT_60_ansi * Complete and correct key labels in info.json * Duplicate LAYOUT as LAYOUT_all Doing this for backwards compatibility. Has implications for user keymaps. * Update LAYOUT_all to make sense The original macro LAYOUT submitted for the GH60 gets a couple of things wrong: - K49 is placed between Space and Right Alt, when it's actually the right half of a split Backspace - K3C is assigned before K3D, when K3C is the 1u portion of a 1.75u/1u split Right Shift, and therefore K3D is actually to the left of K3C The LAYOUT_all macro corrects these issues, but the LAYOUT macro is unchanged, so as to not break user keymaps that depend on it. This commit also updates the default keymap to use the LAYOUT_all macro, and makes a minor change to the base layer to be more as a user would expect for the corresponding physical layout. * Correct the layout data for the LAYOUT macro in info.json Gives proper Configurator rendering. * Modernize default keymap Update the default keymap to use more modern QMK conventions. * Modernize the LED management code Update the LED management functions to use the GPIO functions, and clean up the led_set_kb() function. * Update key labels in info.json for LAYOUT_60_ansi_split_rshift Makes them consistent with the the rest of the file. * Update Docs links in readme file --- keyboards/gh60/gh60.c | 24 +- keyboards/gh60/gh60.h | 91 +++--- keyboards/gh60/info.json | 410 +++++++++++++++++++++++- keyboards/gh60/keymaps/default/keymap.c | 59 ++-- keyboards/gh60/readme.md | 2 +- 5 files changed, 477 insertions(+), 109 deletions(-) diff --git a/keyboards/gh60/gh60.c b/keyboards/gh60/gh60.c index 441c799fa..10ae89359 100644 --- a/keyboards/gh60/gh60.c +++ b/keyboards/gh60/gh60.c @@ -15,25 +15,13 @@ extern inline void gh60_wasd_leds_off(void); void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - if (usb_led & (1<", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"HHKB Fn", "x":14, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Win", "x":11.25, "y":4, "w":1.25}, + {"label":"Menu", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} + ] + }, + "LAYOUT": { - "key_count": 65, - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Win", "x":11, "y":4}, {"label":"Menu", "x":12, "y":4}, {"label":"Ctrl", "x":13, "y":4}, {"x":14, "y":4}] + "key_count": 65, + "layout": [ + {"label":"~", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"@", "x":2, "y":0}, + {"label":"#", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"\"", "x":11.75, "y":2}, + {"label":"ISO Hash", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":2, "w":1.25}, + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"ISO Backslash", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"HHKB Fn", "x":14, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Backspace Extra", "x":14, "y":0}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Win", "x":11.25, "y":4, "w":1.25}, + {"label":"Menu", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} + ] }, "LAYOUT_60_ansi": { - "key_count": 61, - "layout": [{"x":0, "y":0, "label":"~"}, {"x":1, "y":0, "label":"!"}, {"x":2, "y":0, "label":"@"}, {"x":3, "y":0, "label":"#"}, {"x":4, "y":0, "label":"$"}, {"x":5, "y":0, "label":"%"}, {"x":6, "y":0, "label":"^"}, {"x":7, "y":0, "label":"&"}, {"x":8, "y":0, "label":"*"}, {"x":9, "y":0, "label":"("}, {"x":10, "y":0, "label":")"}, {"x":11, "y":0, "label":"_"}, {"x":12, "y":0, "label":"+"}, {"x":13, "y":0, "label":"Backspace", "w":2}, {"x":0, "y":1, "label":"Tab", "w":1.5}, {"x":1.5, "y":1, "label":"Q"}, {"x":2.5, "y":1, "label":"W"}, {"x":3.5, "y":1, "label":"E"}, {"x":4.5, "y":1, "label":"R"}, {"x":5.5, "y":1, "label":"T"}, {"x":6.5, "y":1, "label":"Y"}, {"x":7.5, "y":1, "label":"U"}, {"x":8.5, "y":1, "label":"I"}, {"x":9.5, "y":1, "label":"O"}, {"x":10.5, "y":1, "label":"P"}, {"x":11.5, "y":1, "label":"{"}, {"x":12.5, "y":1, "label":"}"}, {"x":13.5, "y":1, "label":"|", "w":1.5}, {"x":0, "y":2, "label":"Caps Lock", "w":1.75}, {"x":1.75, "y":2, "label":"A"}, {"x":2.75, "y":2, "label":"S"}, {"x":3.75, "y":2, "label":"D"}, {"x":4.75, "y":2, "label":"F"}, {"x":5.75, "y":2, "label":"G"}, {"x":6.75, "y":2, "label":"H"}, {"x":7.75, "y":2, "label":"J"}, {"x":8.75, "y":2, "label":"K"}, {"x":9.75, "y":2, "label":"L"}, {"x":10.75, "y":2, "label":":"}, {"x":11.75, "y":2, "label":"\""}, {"x":12.75, "y":2, "label":"Enter", "w":2.25}, {"x":0, "y":3, "label":"Shift", "w":2.25}, {"x":2.25, "y":3, "label":"Z"}, {"x":3.25, "y":3, "label":"X"}, {"x":4.25, "y":3, "label":"C"}, {"x":5.25, "y":3, "label":"V"}, {"x":6.25, "y":3, "label":"B"}, {"x":7.25, "y":3, "label":"N"}, {"x":8.25, "y":3, "label":"M"}, {"x":9.25, "y":3, "label":"<"}, {"x":10.25, "y":3, "label":">"}, {"x":11.25, "y":3, "label":"?"}, {"x":12.25, "y":3, "label":"Shift", "w":2.75}, {"x":0, "y":4, "label":"Ctrl", "w":1.25}, {"x":1.25, "y":4, "label":"Win", "w":1.25}, {"x":2.5, "y":4, "label":"Alt", "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "label":"Alt", "w":1.25}, {"x":11.25, "y":4, "label":"Win", "w":1.25}, {"x":12.5, "y":4, "label":"Menu", "w":1.25}, {"x":13.75, "y":4, "label":"Ctrl", "w":1.25}] + "key_count": 61, + "layout": [ + {"label":"~", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"@", "x":2, "y":0}, + {"label":"#", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":2.75}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Win", "x":11.25, "y":4, "w":1.25}, + {"label":"Menu", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} + ] }, "LAYOUT_60_iso": { - "key_count": 62, - "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + "key_count": 62, + "layout": [ + {"label":"\u00ac", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"\"", "x":2, "y":0}, + {"label":"\u00a3", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"@", "x":11.75, "y":2}, + {"label":"~", "x":12.75, "y":2}, + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"|", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":2.75}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"AltGr", "x":10, "y":4, "w":1.25}, + {"label":"Win", "x":11.25, "y":4, "w":1.25}, + {"label":"Menu", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} + ] }, "LAYOUT_60_ansi_split_bs_rshift": { - "key_count": 63, - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Win", "x":11.5, "y":4}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + "key_count": 63, + "layout": [ + {"label":"~", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"@", "x":2, "y":0}, + {"label":"#", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0}, + {"label":"Backspace Extra", "x":14, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"HHKB Fn", "x":14, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.5}, + {"label":"Win", "x":1.5, "y":4}, + {"label":"Alt", "x":2.5, "y":4, "w":1.5}, + {"label":"Space", "x":4, "y":4, "w":6}, + {"label":"Alt", "x":10, "y":4, "w":1.5}, + {"label":"Win", "x":11.5, "y":4}, + {"label":"Menu", "x":12.5, "y":4}, + {"label":"Ctrl", "x":13.5, "y":4, "w":1.5} + ] }, "LAYOUT_60_ansi_split_rshift": { "key_count": 62, - "layout": [{"label":"K00", "x":0, "y":0}, {"label":"K01", "x":1, "y":0}, {"label":"K02", "x":2, "y":0}, {"label":"K03", "x":3, "y":0}, {"label":"K04", "x":4, "y":0}, {"label":"K05", "x":5, "y":0}, {"label":"K06", "x":6, "y":0}, {"label":"K07", "x":7, "y":0}, {"label":"K08", "x":8, "y":0}, {"label":"K09", "x":9, "y":0}, {"label":"K0A", "x":10, "y":0}, {"label":"K0B", "x":11, "y":0}, {"label":"K0C", "x":12, "y":0}, {"label":"K0D", "x":13, "y":0, "w":2}, {"label":"K10", "x":0, "y":1, "w":1.5}, {"label":"K11", "x":1.5, "y":1}, {"label":"K12", "x":2.5, "y":1}, {"label":"K13", "x":3.5, "y":1}, {"label":"K14", "x":4.5, "y":1}, {"label":"K15", "x":5.5, "y":1}, {"label":"K16", "x":6.5, "y":1}, {"label":"K17", "x":7.5, "y":1}, {"label":"K18", "x":8.5, "y":1}, {"label":"K19", "x":9.5, "y":1}, {"label":"K1A", "x":10.5, "y":1}, {"label":"K1B", "x":11.5, "y":1}, {"label":"K1C", "x":12.5, "y":1}, {"label":"K1D", "x":13.5, "y":1, "w":1.5}, {"label":"K20", "x":0, "y":2, "w":1.75}, {"label":"K21", "x":1.75, "y":2}, {"label":"K22", "x":2.75, "y":2}, {"label":"K23", "x":3.75, "y":2}, {"label":"K24", "x":4.75, "y":2}, {"label":"K25", "x":5.75, "y":2}, {"label":"K26", "x":6.75, "y":2}, {"label":"K27", "x":7.75, "y":2}, {"label":"K28", "x":8.75, "y":2}, {"label":"K29", "x":9.75, "y":2}, {"label":"K2A", "x":10.75, "y":2}, {"label":"K2B", "x":11.75, "y":2}, {"label":"K2D", "x":12.75, "y":2, "w":2.25}, {"label":"K30", "x":0, "y":3, "w":2.25}, {"label":"K32", "x":2.25, "y":3}, {"label":"K33", "x":3.25, "y":3}, {"label":"K34", "x":4.25, "y":3}, {"label":"K35", "x":5.25, "y":3}, {"label":"K36", "x":6.25, "y":3}, {"label":"K37", "x":7.25, "y":3}, {"label":"K38", "x":8.25, "y":3}, {"label":"K39", "x":9.25, "y":3}, {"label":"K3A", "x":10.25, "y":3}, {"label":"K3B", "x":11.25, "y":3}, {"label":"K3D", "x":12.25, "y":3, "w":1.75}, {"label":"K3C", "x":14, "y":3}, {"label":"K40", "x":0, "y":4, "w":1.25}, {"label":"K41", "x":1.25, "y":4, "w":1.25}, {"label":"K42", "x":2.5, "y":4, "w":1.25}, {"label":"K45", "x":3.75, "y":4, "w":6.25}, {"label":"K4A", "x":10, "y":4, "w":1.25}, {"label":"K4B", "x":11.25, "y":4, "w":1.25}, {"label":"K4C", "x":12.5, "y":4, "w":1.25}, {"label":"K4D", "x":13.75, "y":4, "w":1.25}] + "layout": [ + {"label":"~", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"@", "x":2, "y":0}, + {"label":"#", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"HHKB Fn", "x":14, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Win", "x":11.25, "y":4, "w":1.25}, + {"label":"Menu", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} + ] } } } - - - diff --git a/keyboards/gh60/keymaps/default/keymap.c b/keyboards/gh60/keymaps/default/keymap.c index 581ba7e64..a8fd4f3c2 100644 --- a/keyboards/gh60/keymaps/default/keymap.c +++ b/keyboards/gh60/keymaps/default/keymap.c @@ -2,47 +2,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* 0: qwerty */ - LAYOUT( - KC_ESC, 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_GRV, - 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_BSPC, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, - KC_LSFT, TG(2), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(1), KC_RSFT, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_BSLS, KC_RALT, KC_RGUI, KC_APP, KC_RCTL - ), - /* 1: fn */ - LAYOUT( - KC_ESC, 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_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), + [0] = LAYOUT_all( /* 0: qwerty */ + KC_ESC, 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_BSLS, KC_GRV, + 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_BSPC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, + KC_LSFT, TG(2), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL + ), - /* 2: arrows */ - LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, - _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT - ), + [1] = LAYOUT_all( /* 1: fn */ + KC_ESC, 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_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), -}; + [2] = LAYOUT_all( /* 2: arrows */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, + _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT + ), -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; }; void matrix_scan_user(void) { diff --git a/keyboards/gh60/readme.md b/keyboards/gh60/readme.md index a1469accf..b63cce973 100644 --- a/keyboards/gh60/readme.md +++ b/keyboards/gh60/readme.md @@ -13,7 +13,7 @@ Make example for this keyboard (after setting up your build environment): make gh60: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). ## GH60 Hardware Information From b7cdd068203e509ad78f10e1d6b4ef7207e444f8 Mon Sep 17 00:00:00 2001 From: Alex Lewis Date: Wed, 3 Jul 2019 06:37:43 -0400 Subject: [PATCH 292/341] [Keymap] Add DZ60 layout that supports a hybrid hhkb layout (#6235) * adds support for dz60 with 2 function keys * fix images for readme * Update readme.md * block comment and readme cleanup --- keyboards/dz60/dz60.h | 27 +++++++++++++++++++++ keyboards/dz60/info.json | 6 ++++- keyboards/dz60/keymaps/mpaarating/keymap.c | 24 ++++++++++++++++++ keyboards/dz60/keymaps/mpaarating/readme.md | 12 +++++++++ 4 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 keyboards/dz60/keymaps/mpaarating/keymap.c create mode 100644 keyboards/dz60/keymaps/mpaarating/readme.md diff --git a/keyboards/dz60/dz60.h b/keyboards/dz60/dz60.h index 9000ba64d..de18faf62 100644 --- a/keyboards/dz60/dz60.h +++ b/keyboards/dz60/dz60.h @@ -494,4 +494,31 @@ { k40, k41, KC_NO, k43, k44, KC_NO, k46, KC_NO, k48, KC_NO, k4a, k4b, KC_NO,k4d, k4e } \ } +/* LAYOUT_60_2_function + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │0e │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │1d │1e │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │20 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │2d │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │30 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3d │3e │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┼───┤ + * │40 │41 │43 │46 │4a │4c │4d │4e │ + * └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┘ +*/ +#define LAYOUT_60_2_function( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, \ + k40, k41, k43, k46, k4a, k4c, k4d, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ + { k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ + { k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3d, k3e }, \ + { k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4a, KC_NO, k4c, k4d, k4e } \ +} + #endif diff --git a/keyboards/dz60/info.json b/keyboards/dz60/info.json index d1be70bdd..06ce36272 100644 --- a/keyboards/dz60/info.json +++ b/keyboards/dz60/info.json @@ -72,6 +72,10 @@ "LAYOUT_60_iso_split_space_bs_rshift": { "key_count": 66, "layout": [{"label":"¬", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"£", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Del", "x":13, "y":0, "w":1}, {"label":"Backspace", "x":14, "y":0, "w":1}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Print screen", "x":14, "y":3, "w":1}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"label":"FN", "x":6.00, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] - } + }, + "LAYOUT_60_2_function": { + "key_count": 63, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"GUI", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Control", "x":11.5, "y":4, "w":1.5}, {"label":"GUI", "x":13, "y":4}, {"label":"Fn2", "x":14, "y":4}] + } } } diff --git a/keyboards/dz60/keymaps/mpaarating/keymap.c b/keyboards/dz60/keymaps/mpaarating/keymap.c new file mode 100644 index 000000000..3ad32aae0 --- /dev/null +++ b/keyboards/dz60/keymaps/mpaarating/keymap.c @@ -0,0 +1,24 @@ +#include QMK_KEYBOARD_H + +// Layer definition +#define L0 0 +#define L1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [L0] = LAYOUT_60_2_function( + KC_ESC, 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_BSLASH, KC_GRAVE, + 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_BSPACE, + 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, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(L1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_RGUI, MO(L1) + ), + + [L1] = LAYOUT_60_2_function( + KC_ESC, 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_TRNS, KC_TRNS, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_UP, KC_TRNS, KC_DELETE, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_LEFT, KC_RIGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_END, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/dz60/keymaps/mpaarating/readme.md b/keyboards/dz60/keymaps/mpaarating/readme.md new file mode 100644 index 000000000..d21d26c75 --- /dev/null +++ b/keyboards/dz60/keymaps/mpaarating/readme.md @@ -0,0 +1,12 @@ +# DZ60 + +![dz60](https://i.imgur.com/nVOX9Gb.jpg) + +### Layout +**Note:** Layer 2 does not exist currently +![layer 0](https://i.imgur.com/uXFTNBs.png) +![layer 1](https://i.imgur.com/f7uTkDU.png) + +Make example for this keyboard (after setting up your build environment): + + make dz60:mpaarating From 5c381b34ea2d786d075247a619b6c444b96b322b Mon Sep 17 00:00:00 2001 From: francislan Date: Wed, 3 Jul 2019 03:38:30 -0700 Subject: [PATCH 293/341] [Keyboard] Update catalog link in the TheVanKeyboards/Minivan Readme. (#6236) Previous link was broken. --- keyboards/thevankeyboards/minivan/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/thevankeyboards/minivan/readme.md b/keyboards/thevankeyboards/minivan/readme.md index 03a868a16..2464fe7a4 100644 --- a/keyboards/thevankeyboards/minivan/readme.md +++ b/keyboards/thevankeyboards/minivan/readme.md @@ -4,7 +4,7 @@ A compact 44% keyboard. Keyboard Maintainer: QMK Community Hardware Supported: Minivan PCB -Hardware Availability: https://thevankeyboards.com/collections/catalog/products/minivan-diy?variant=609138376718 +Hardware Availability: https://thevankeyboards.com/collections/catalog Make example for this keyboard (after setting up your build environment): From d32ce9c7469f0e24664b614f206e68d25a3b45d5 Mon Sep 17 00:00:00 2001 From: yiancar Date: Wed, 3 Jul 2019 11:43:46 +0100 Subject: [PATCH 294/341] [Keyboard] Fixed ISO keymap for Gingham (#6242) --- keyboards/gingham/keymaps/iso/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/gingham/keymaps/iso/keymap.c b/keyboards/gingham/keymaps/iso/keymap.c index 2956887dd..0058df54a 100644 --- a/keyboards/gingham/keymaps/iso/keymap.c +++ b/keyboards/gingham/keymaps/iso/keymap.c @@ -28,8 +28,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [1] = LAYOUT_60_iso_split_bs_rshift( /* FN */ 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , - KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), [2] = LAYOUT_60_iso_split_bs_rshift( /* Empty for dynamic keymaps */ From c0c8b2e50d0da5813aac3c6bc69540f81b1dae04 Mon Sep 17 00:00:00 2001 From: henrikosorensen Date: Wed, 3 Jul 2019 15:00:29 +0200 Subject: [PATCH 295/341] [Keyboard] fix info.json for omnikeyish keyboards (#6189) * fix info.json for omnikeyish keyboards * Omnikey 101 obviously doesn't need a focus style backslash key, it has an ansi backslash already. --- keyboards/omnikeyish/info.json | 70 ++++++++++++++++++++++++++----- keyboards/omnikeyish/omnikeyish.h | 4 +- 2 files changed, 61 insertions(+), 13 deletions(-) diff --git a/keyboards/omnikeyish/info.json b/keyboards/omnikeyish/info.json index 0efb1270e..4a9e86d4c 100644 --- a/keyboards/omnikeyish/info.json +++ b/keyboards/omnikeyish/info.json @@ -6,31 +6,79 @@ "height": 7, "layouts": { "LAYOUT_all": { - "layout": [{"label":"P11", "x":0, "y":0}, {"label":"P12", "x":1, "y":0}, {"label":"Esc", "x":2.6667, "y":0}, {"label":"F1", "x":4.6667, "y":0}, {"label":"F2", "x":5.6667, "y":0}, {"label":"F3", "x":6.6667, "y":0}, {"label":"F4", "x":7.6667, "y":0}, {"label":"F5", "x":9.1667, "y":0}, {"label":"F6", "x":10.1667, "y":0}, {"label":"F7", "x":11.1667, "y":0}, {"label":"F8", "x":12.1667, "y":0}, {"label":"F9", "x":13.6667, "y":0}, {"label":"F10", "x":14.6667, "y":0}, {"label":"F11", "x":15.6667, "y":0}, {"label":"F12", "x":16.6667, "y":0}, {"label":"PrtSc", "x":18.1667, "y":0}, {"label":"Scroll Lock", "x":19.1667, "y":0}, {"label":"Pause", "x":20.1667, "y":0}, {"x":21.6667, "y":0}, {"x":22.6667, "y":0}, {"x":23.6667, "y":0}, {"x":24.6667, "y":0}, {"label":"P1", "x":0, "y":2}, {"label":"P2", "x":1, "y":2}, {"label":"~", "x":2.6667, "y":2}, {"label":"!", "x":3.6667, "y":2}, {"label":"@", "x":4.6667, "y":2}, {"label":"#", "x":5.6667, "y":2}, {"label":"$", "x":6.6667, "y":2}, {"label":"%", "x":7.6667, "y":2}, {"label":"^", "x":8.6667, "y":2}, {"label":"&", "x":9.6667, "y":2}, {"label":"*", "x":10.6667, "y":2}, {"label":"(", "x":11.6667, "y":2}, {"label":")", "x":12.6667, "y":2}, {"label":"_", "x":13.6667, "y":2}, {"label":"+", "x":14.6667, "y":2}, {"label":"Back Space", "x":15.6667, "y":2, "w":2}, {"label":"Insert", "x":18.1667, "y":2}, {"label":"Home", "x":19.1667, "y":2}, {"label":"PgUp", "x":20.1667, "y":2}, {"label":"Num Lock", "x":21.6667, "y":2}, {"label":"/", "x":22.6667, "y":2}, {"label":"*", "x":23.6667, "y":2}, {"label":"-", "x":24.6667, "y":2}, {"label":"P3", "x":0, "y":3}, {"label":"P4", "x":1, "y":3}, {"label":"Tab", "x":2.6667, "y":3, "w":1.5}, {"label":"Q", "x":4.1667, "y":3}, {"label":"W", "x":5.1667, "y":3}, {"label":"E", "x":6.1667, "y":3}, {"label":"R", "x":7.1667, "y":3}, {"label":"T", "x":8.1667, "y":3}, {"label":"Y", "x":9.1667, "y":3}, {"label":"U", "x":10.1667, "y":3}, {"label":"I", "x":11.1667, "y":3}, {"label":"O", "x":12.1667, "y":3}, {"label":"P", "x":13.1667, "y":3}, {"label":"{", "x":14.1667, "y":3}, {"label":"}", "x":15.1667, "y":3}, {"label":"|", "x":16.1667, "y":3, "w":1.5}, {"label":"Delete", "x":18.1667, "y":3}, {"label":"End", "x":19.1667, "y":3}, {"label":"PgDn", "x":20.1667, "y":3}, {"label":"7", "x":21.6667, "y":3}, {"label":"8", "x":22.6667, "y":3}, {"label":"9", "x":23.6667, "y":3}, {"label":"+", "x":24.6667, "y":3}, {"label":"P5", "x":0, "y":4}, {"label":"P6", "x":1, "y":4}, {"label":"Caps Lock", "x":2.6667, "y":4, "w":1.75}, {"label":"A", "x":4.4167, "y":4}, {"label":"S", "x":5.4167, "y":4}, {"label":"D", "x":6.4167, "y":4}, {"label":"F", "x":7.4167, "y":4}, {"label":"G", "x":8.4167, "y":4}, {"label":"H", "x":9.4167, "y":4}, {"label":"J", "x":10.4167, "y":4}, {"label":"K", "x":11.4167, "y":4}, {"label":"L", "x":12.4167, "y":4}, {"label":":", "x":13.4167, "y":4}, {"label":"\"", "x":14.4167, "y":4}, {"label":"~", "x":15.4167, "y":4}, {"label":"Enter", "x":16.4167, "y":4, "w":1.25}, {"x":18.1667, "y":4}, {"x":19.1667, "y":4}, {"x":20.1667, "y":4}, {"label":"4", "x":21.6667, "y":4}, {"label":"5", "x":22.6667, "y":4}, {"label":"6", "x":23.6667, "y":4}, {"label":"=", "x":24.6667, "y":4}, {"label":"P7", "x":0, "y":5}, {"label":"P8", "x":1, "y":5}, {"label":"Shift", "x":2.6667, "y":5, "w":1.25}, {"label":"|", "x":3.9167, "y":5}, {"label":"Z", "x":4.9167, "y":5}, {"label":"X", "x":5.9167, "y":5}, {"label":"C", "x":6.9167, "y":5}, {"label":"V", "x":7.9167, "y":5}, {"label":"B", "x":8.9167, "y":5}, {"label":"N", "x":9.9167, "y":5}, {"label":"M", "x":10.9167, "y":5}, {"label":"<", "x":11.9167, "y":5}, {"label":">", "x":12.9167, "y":5}, {"label":"?", "x":13.9167, "y":5}, {"label":"Shift", "x":14.9167, "y":5, "w":1.75}, {"label":"|", "x":16.6667, "y":5}, {"x":18.1667, "y":5}, {"label":"\u2191", "x":19.1667, "y":5}, {"x":20.1667, "y":5}, {"label":"1", "x":21.6667, "y":5}, {"label":"2", "x":22.6667, "y":5}, {"label":"3", "x":23.6667, "y":5}, {"label":"Enter", "x":24.6667, "y":5, "h":2}, {"label":"P9", "x":0, "y":6}, {"label":"P10", "x":1, "y":6}, {"label":"Ctrl", "x":2.6667, "y":6, "w":1.25}, {"label":"Win", "x":3.9167, "y":6, "w":1.25}, {"label":"Alt", "x":5.1667, "y":6, "w":1.25}, {"x":6.4167, "y":6, "w":6.25}, {"label":"Alt Gr", "x":12.6667, "y":6, "w":1.25}, {"label":"Win", "x":13.9167, "y":6, "w":1.25}, {"label":"Compose", "x":15.1667, "y":6, "w":1.25}, {"label":"Ctrl", "x":16.4167, "y":6, "w":1.25}, {"label":"\u2190", "x":18.1667, "y":6}, {"label":"\u2193", "x":19.1667, "y":6}, {"label":"\u2192", "x":20.1667, "y":6}, {"label":"0", "x":21.6667, "y":6, "w":2}, {"label":".", "x":23.6667, "y":6}] + "layout": [ {"label":"P11", "x":0, "y":0}, {"label":"P12", "x":1, "y":0}, {"label":"Esc", "x":2.6667, "y":0}, {"label":"F1", "x":4.6667, "y":0}, {"label":"F2", "x":5.6667, "y":0}, {"label":"F3", "x":6.6667, "y":0}, {"label":"F4", "x":7.6667, "y":0}, {"label":"F5", "x":9.1667, "y":0}, {"label":"F6", "x":10.1667, "y":0}, {"label":"F7", "x":11.1667, "y":0}, {"label":"F8", "x":12.1667, "y":0}, {"label":"F9", "x":13.6667, "y":0}, {"label":"F10", "x":14.6667, "y":0}, {"label":"F11", "x":15.6667, "y":0}, {"label":"F12", "x":16.6667, "y":0}, {"label":"PrtSc", "x":18.1667, "y":0}, {"label":"Scroll Lock", "x":19.1667, "y":0}, {"label":"Pause", "x":20.1667, "y":0}, {"x":21.6667, "y":0}, {"x":22.6667, "y":0}, {"x":23.6667, "y":0}, {"x":24.6667, "y":0}, + {"label":"P1", "x":0, "y":2}, {"label":"P2", "x":1, "y":2}, {"label":"~", "x":2.6667, "y":2}, {"label":"!", "x":3.6667, "y":2}, {"label":"@", "x":4.6667, "y":2}, {"label":"#", "x":5.6667, "y":2}, {"label":"$", "x":6.6667, "y":2}, {"label":"%", "x":7.6667, "y":2}, {"label":"^", "x":8.6667, "y":2}, {"label":"&", "x":9.6667, "y":2}, {"label":"*", "x":10.6667, "y":2}, {"label":"(", "x":11.6667, "y":2}, {"label":")", "x":12.6667, "y":2}, {"label":"_", "x":13.6667, "y":2}, {"label":"+", "x":14.6667, "y":2}, {"label":"Back Space", "x":15.6667, "y":2, "w":2}, {"label":"Insert", "x":18.1667, "y":2}, {"label":"Home", "x":19.1667, "y":2}, {"label":"PgUp", "x":20.1667, "y":2}, {"label":"Num Lock", "x":21.6667, "y":2}, {"label":"/", "x":22.6667, "y":2}, {"label":"*", "x":23.6667, "y":2}, {"label":"-", "x":24.6667, "y":2}, + {"label":"P3", "x":0, "y":3}, {"label":"P4", "x":1, "y":3}, {"label":"Tab", "x":2.6667, "y":3, "w":1.5}, {"label":"Q", "x":4.1667, "y":3}, {"label":"W", "x":5.1667, "y":3}, {"label":"E", "x":6.1667, "y":3}, {"label":"R", "x":7.1667, "y":3}, {"label":"T", "x":8.1667, "y":3}, {"label":"Y", "x":9.1667, "y":3}, {"label":"U", "x":10.1667, "y":3}, {"label":"I", "x":11.1667, "y":3}, {"label":"O", "x":12.1667, "y":3}, {"label":"P", "x":13.1667, "y":3}, {"label":"{", "x":14.1667, "y":3}, {"label":"}", "x":15.1667, "y":3}, {"label":"|", "x":16.1667, "y":3, "w":1.5}, {"label":"Delete", "x":18.1667, "y":3}, {"label":"End", "x":19.1667, "y":3}, {"label":"PgDn", "x":20.1667, "y":3}, {"label":"7", "x":21.6667, "y":3}, {"label":"8", "x":22.6667, "y":3}, {"label":"9", "x":23.6667, "y":3}, {"label":"+", "x":24.6667, "y":3}, + {"label":"P5", "x":0, "y":4}, {"label":"P6", "x":1, "y":4}, {"label":"Caps Lock", "x":2.6667, "y":4, "w":1.75}, {"label":"A", "x":4.4167, "y":4}, {"label":"S", "x":5.4167, "y":4}, {"label":"D", "x":6.4167, "y":4}, {"label":"F", "x":7.4167, "y":4}, {"label":"G", "x":8.4167, "y":4}, {"label":"H", "x":9.4167, "y":4}, {"label":"J", "x":10.4167, "y":4}, {"label":"K", "x":11.4167, "y":4}, {"label":"L", "x":12.4167, "y":4}, {"label":":", "x":13.4167, "y":4}, {"label":"\"", "x":14.4167, "y":4}, {"label":"~", "x":15.4167, "y":4}, {"label":"Enter", "x":16.4167, "y":4, "w":1.25}, {"x":18.1667, "y":4}, {"x":19.1667, "y":4}, {"x":20.1667, "y":4}, {"label":"4", "x":21.6667, "y":4}, {"label":"5", "x":22.6667, "y":4}, {"label":"6", "x":23.6667, "y":4}, {"label":"=", "x":24.6667, "y":4}, + {"label":"P7", "x":0, "y":5}, {"label":"P8", "x":1, "y":5}, {"label":"Shift", "x":2.6667, "y":5, "w":1.25}, {"label":"|", "x":3.9167, "y":5}, {"label":"Z", "x":4.9167, "y":5}, {"label":"X", "x":5.9167, "y":5}, {"label":"C", "x":6.9167, "y":5}, {"label":"V", "x":7.9167, "y":5}, {"label":"B", "x":8.9167, "y":5}, {"label":"N", "x":9.9167, "y":5}, {"label":"M", "x":10.9167, "y":5}, {"label":"<", "x":11.9167, "y":5}, {"label":">", "x":12.9167, "y":5}, {"label":"?", "x":13.9167, "y":5}, {"label":"Shift", "x":14.9167, "y":5, "w":1.75}, {"label":"|", "x":16.6667, "y":5}, {"x":18.1667, "y":5}, {"label":"\u2191", "x":19.1667, "y":5}, {"x":20.1667, "y":5}, {"label":"1", "x":21.6667, "y":5}, {"label":"2", "x":22.6667, "y":5}, {"label":"3", "x":23.6667, "y":5}, {"label":"Enter", "x":24.6667, "y":5, "h":2}, + {"label":"P9", "x":0, "y":6}, {"label":"P10", "x":1, "y":6}, {"label":"Ctrl", "x":2.6667, "y":6, "w":1.25}, {"label":"Win", "x":3.9167, "y":6, "w":1.25}, {"label":"Alt", "x":5.1667, "y":6, "w":1.25}, {"x":6.4167, "y":6, "w":6.25}, {"label":"Alt Gr", "x":12.6667, "y":6, "w":1.25}, {"label":"Win", "x":13.9167, "y":6, "w":1.25}, {"label":"Compose", "x":15.1667, "y":6, "w":1.25}, {"label":"Ctrl", "x":16.4167, "y":6, "w":1.25}, {"label":"\u2190", "x":18.1667, "y":6}, {"label":"\u2193", "x":19.1667, "y":6}, {"label":"\u2192", "x":20.1667, "y":6}, {"label":"0", "x":21.6667, "y":6, "w":2}, {"label":".", "x":23.6667, "y":6}] }, "LAYOUT_101": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Num Lock", "x":18.5, "y":1.5}, {"label":"/", "x":19.5, "y":1.5}, {"label":"*", "x":20.5, "y":1.5}, {"label":"-", "x":21.5, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"7", "x":18.5, "y":2.5}, {"label":"8", "x":19.5, "y":2.5}, {"label":"9", "x":20.5, "y":2.5}, {"label":"+", "x":21.5, "y":2.5, "h":2}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"4", "x":18.5, "y":3.5}, {"label":"5", "x":19.5, "y":3.5}, {"label":"6", "x":20.5, "y":3.5}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"1", "x":18.5, "y":4.5}, {"label":"2", "x":19.5, "y":4.5}, {"label":"3", "x":20.5, "y":4.5}, {"label":"Enter", "x":21.5, "y":4.5, "h":2}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"label":"Alt", "x":11, "y":5.5, "w":1.5}, {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}, {"label":"0", "x":18.5, "y":5.5, "w":2}, {"label":".", "x":20.5, "y":5.5}] + "layout": [ {"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, + {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Num Lock", "x":18.5, "y":1.5}, {"label":"/", "x":19.5, "y":1.5}, {"label":"*", "x":20.5, "y":1.5}, {"label":"-", "x":21.5, "y":1.5}, + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"7", "x":18.5, "y":2.5}, {"label":"8", "x":19.5, "y":2.5}, {"label":"9", "x":20.5, "y":2.5}, {"label":"+", "x":21.5, "y":2.5, "h":2}, + {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"4", "x":18.5, "y":3.5}, {"label":"5", "x":19.5, "y":3.5}, {"label":"6", "x":20.5, "y":3.5}, + {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"1", "x":18.5, "y":4.5}, {"label":"2", "x":19.5, "y":4.5}, {"label":"3", "x":20.5, "y":4.5}, {"label":"Enter", "x":21.5, "y":4.5, "h":2}, + {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"label":"Alt", "x":11, "y":5.5, "w":1.5}, {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}, {"label":"0", "x":18.5, "y":5.5, "w":2}, {"label":".", "x":20.5, "y":5.5}] + }, + "LAYOUT_ultra_t": { + "layout": [ {"label":"P11", "x":0, "y":0}, {"label":"P12", "x":1, "y":0}, {"label":"Esc", "x":2.6667, "y":0}, {"label":"F1", "x":4.6667, "y":0}, {"label":"F2", "x":5.6667, "y":0}, {"label":"F3", "x":6.6667, "y":0}, {"label":"F4", "x":7.6667, "y":0}, {"label":"F5", "x":9.1667, "y":0}, {"label":"F6", "x":10.1667, "y":0}, {"label":"F7", "x":11.1667, "y":0}, {"label":"F8", "x":12.1667, "y":0}, {"label":"F9", "x":13.6667, "y":0}, {"label":"F10", "x":14.6667, "y":0}, {"label":"F11", "x":15.6667, "y":0}, {"label":"F12", "x":16.6667, "y":0}, {"label":"PrtSc", "x":18.1667, "y":0}, {"label":"Scroll Lock", "x":19.1667, "y":0}, {"label":"Pause", "x":20.1667, "y":0}, + {"label":"P1", "x":0, "y":2}, {"label":"P2", "x":1, "y":2}, {"label":"~", "x":2.6667, "y":2}, {"label":"!", "x":3.6667, "y":2}, {"label":"@", "x":4.6667, "y":2}, {"label":"#", "x":5.6667, "y":2}, {"label":"$", "x":6.6667, "y":2}, {"label":"%", "x":7.6667, "y":2}, {"label":"^", "x":8.6667, "y":2}, {"label":"&", "x":9.6667, "y":2}, {"label":"*", "x":10.6667, "y":2}, {"label":"(", "x":11.6667, "y":2}, {"label":")", "x":12.6667, "y":2}, {"label":"_", "x":13.6667, "y":2}, {"label":"+", "x":14.6667, "y":2}, {"label":"Back Space", "x":15.6667, "y":2, "w":2}, {"label":"Insert", "x":18.1667, "y":2}, {"label":"Home", "x":19.1667, "y":2}, {"label":"PgUp", "x":20.1667, "y":2}, {"label":"Num Lock", "x":21.6667, "y":2}, {"label":"/", "x":22.6667, "y":2}, {"label":"*", "x":23.6667, "y":2}, {"label":"-", "x":24.6667, "y":2}, + {"label":"P3", "x":0, "y":3}, {"label":"P4", "x":1, "y":3}, {"label":"Tab", "x":2.6667, "y":3, "w":1.5}, {"label":"Q", "x":4.1667, "y":3}, {"label":"W", "x":5.1667, "y":3}, {"label":"E", "x":6.1667, "y":3}, {"label":"R", "x":7.1667, "y":3}, {"label":"T", "x":8.1667, "y":3}, {"label":"Y", "x":9.1667, "y":3}, {"label":"U", "x":10.1667, "y":3}, {"label":"I", "x":11.1667, "y":3}, {"label":"O", "x":12.1667, "y":3}, {"label":"P", "x":13.1667, "y":3}, {"label":"{", "x":14.1667, "y":3}, {"label":"}", "x":15.1667, "y":3}, {"label":"Enter", "x":16.1667, "y":3, "w":1.5, "h":2}, {"label":"Delete", "x":18.1667, "y":3}, {"label":"End", "x":19.1667, "y":3}, {"label":"PgDn", "x":20.1667, "y":3}, {"label":"7", "x":21.6667, "y":3}, {"label":"8", "x":22.6667, "y":3}, {"label":"9", "x":23.6667, "y":3}, {"label":"+", "x":24.6667, "y":3}, + {"label":"P5", "x":0, "y":4}, {"label":"P6", "x":1, "y":4}, {"label":"Caps Lock", "x":2.6667, "y":4, "w":1.75}, {"label":"A", "x":4.4167, "y":4}, {"label":"S", "x":5.4167, "y":4}, {"label":"D", "x":6.4167, "y":4}, {"label":"F", "x":7.4167, "y":4}, {"label":"G", "x":8.4167, "y":4}, {"label":"H", "x":9.4167, "y":4}, {"label":"J", "x":10.4167, "y":4}, {"label":"K", "x":11.4167, "y":4}, {"label":"L", "x":12.4167, "y":4}, {"label":":", "x":13.4167, "y":4}, {"label":"\"", "x":14.4167, "y":4}, {"label":"4", "x":21.6667, "y":4}, {"label":"5", "x":22.6667, "y":4}, {"label":"6", "x":23.6667, "y":4}, {"label":"=", "x":24.6667, "y":4}, + {"label":"P7", "x":0, "y":5}, {"label":"P8", "x":1, "y":5}, {"label":"Shift", "x":2.6667, "y":5, "w":2.25}, {"label":"Z", "x":4.9167, "y":5}, {"label":"X", "x":5.9167, "y":5}, {"label":"C", "x":6.9167, "y":5}, {"label":"V", "x":7.9167, "y":5}, {"label":"B", "x":8.9167, "y":5}, {"label":"N", "x":9.9167, "y":5}, {"label":"M", "x":10.9167, "y":5}, {"label":"<", "x":11.9167, "y":5}, {"label":">", "x":12.9167, "y":5}, {"label":"?", "x":13.9167, "y":5}, {"label":"Shift", "x":14.9167, "y":5, "w":1.75}, {"label":"|", "x":16.6667, "y":5}, {"label":"\u2191", "x":19.1667, "y":5}, {"label":"1", "x":21.6667, "y":5}, {"label":"2", "x":22.6667, "y":5}, {"label":"3", "x":23.6667, "y":5}, {"label":"Enter", "x":24.6667, "y":5, "h":2}, + {"label":"P9", "x":0, "y":6}, {"label":"P10", "x":1, "y":6}, {"label":"Ctrl", "x":2.6667, "y":6, "w":1.5}, {"label":"Win", "x":4.1667, "y":6}, {"label":"Alt", "x":5.1667, "y":6, "w":1.5}, {"x":6.6667, "y":6, "w":7}, {"label":"Alt Gr", "x":13.6667, "y":6, "w":1.5}, {"label":"*", "x":15.1667, "y":6}, {"label":"Ctrl", "x":16.1667, "y":6, "w":1.5}, {"label":"\u2190", "x":18.1667, "y":6}, {"label":"\u2193", "x":19.1667, "y":6}, {"label":"\u2192", "x":20.1667, "y":6}, {"label":"0", "x":21.6667, "y":6, "w":2}, {"label":".", "x":23.6667, "y":6}] + + }, "LAYOUT_ultra_rev1": { - "layout": [{"label":"P11", "x":0, "y":0}, {"label":"P12", "x":1, "y":0}, {"label":"F1", "x":2.6667, "y":0}, {"label":"F2", "x":3.6667, "y":0}, {"label":"F3", "x":4.6667, "y":0}, {"label":"F4", "x":5.6667, "y":0}, {"label":"F5", "x":8.1667, "y":0}, {"label":"F6", "x":9.1667, "y":0}, {"label":"F7", "x":10.1667, "y":0}, {"label":"F8", "x":11.1667, "y":0}, {"label":"F9", "x":13.6667, "y":0}, {"label":"F10", "x":14.6667, "y":0}, {"label":"F11", "x":15.6667, "y":0}, {"label":"F12", "x":16.6667, "y":0}, {"label":"PrtSc", "x":18.6667, "y":0}, {"label":"Scroll Lock", "x":19.6667, "y":0}, {"label":"Pause", "x":20.6667, "y":0}, {"label":"P1", "x":0, "y":2}, {"label":"P2", "x":1, "y":2}, {"label":"Esc", "x":2.6667, "y":2}, {"label":"!", "x":3.6667, "y":2}, {"label":"@", "x":4.6667, "y":2}, {"label":"#", "x":5.6667, "y":2}, {"label":"$", "x":6.6667, "y":2}, {"label":"%", "x":7.6667, "y":2}, {"label":"^", "x":8.6667, "y":2}, {"label":"&", "x":9.6667, "y":2}, {"label":"*", "x":10.6667, "y":2}, {"label":"(", "x":11.6667, "y":2}, {"label":")", "x":12.6667, "y":2}, {"label":"_", "x":13.6667, "y":2}, {"label":"+", "x":14.6667, "y":2}, {"label":"Back Space", "x":15.6667, "y":2, "w":2}, {"label":"Insert", "x":18.1667, "y":2}, {"label":"Home", "x":19.1667, "y":2}, {"label":"PgUp", "x":20.1667, "y":2}, {"label":"Num Lock", "x":21.6667, "y":2}, {"label":"/", "x":22.6667, "y":2}, {"label":"*", "x":23.6667, "y":2}, {"label":"-", "x":24.6667, "y":2}, {"label":"P3", "x":0, "y":3}, {"label":"P4", "x":1, "y":3}, {"label":"Tab", "x":2.6667, "y":3, "w":1.5}, {"label":"Q", "x":4.1667, "y":3}, {"label":"W", "x":5.1667, "y":3}, {"label":"E", "x":6.1667, "y":3}, {"label":"R", "x":7.1667, "y":3}, {"label":"T", "x":8.1667, "y":3}, {"label":"Y", "x":9.1667, "y":3}, {"label":"U", "x":10.1667, "y":3}, {"label":"I", "x":11.1667, "y":3}, {"label":"O", "x":12.1667, "y":3}, {"label":"P", "x":13.1667, "y":3}, {"label":"{", "x":14.1667, "y":3}, {"label":"}", "x":15.1667, "y":3}, {"label":"Enter", "x":16.1667, "y":3, "w":1.5, "h":2}, {"label":"Delete", "x":18.1667, "y":3}, {"label":"End", "x":19.1667, "y":3}, {"label":"PgDn", "x":20.1667, "y":3}, {"label":"7", "x":21.6667, "y":3}, {"label":"8", "x":22.6667, "y":3}, {"label":"9", "x":23.6667, "y":3}, {"label":"+", "x":24.6667, "y":3}, {"label":"P5", "x":0, "y":4}, {"label":"P6", "x":1, "y":4}, {"label":"Caps Lock", "x":2.6667, "y":4, "w":1.75}, {"label":"A", "x":4.4167, "y":4}, {"label":"S", "x":5.4167, "y":4}, {"label":"D", "x":6.4167, "y":4}, {"label":"F", "x":7.4167, "y":4}, {"label":"G", "x":8.4167, "y":4}, {"label":"H", "x":9.4167, "y":4}, {"label":"J", "x":10.4167, "y":4}, {"label":"K", "x":11.4167, "y":4}, {"label":"L", "x":12.4167, "y":4}, {"label":":", "x":13.4167, "y":4}, {"label":"\"", "x":14.4167, "y":4}, {"x":18.1667, "y":4}, {"label":"\u2191", "x":19.1667, "y":4}, {"x":20.1667, "y":4}, {"label":"4", "x":21.6667, "y":4}, {"label":"5", "x":22.6667, "y":4}, {"label":"6", "x":23.6667, "y":4}, {"label":"=", "x":24.6667, "y":4}, {"label":"P7", "x":0, "y":5}, {"label":"P8", "x":1, "y":5}, {"label":"Shift", "x":2.6667, "y":5, "w":2.25}, {"label":"Z", "x":4.9167, "y":5}, {"label":"X", "x":5.9167, "y":5}, {"label":"C", "x":6.9167, "y":5}, {"label":"V", "x":7.9167, "y":5}, {"label":"B", "x":8.9167, "y":5}, {"label":"N", "x":9.9167, "y":5}, {"label":"M", "x":10.9167, "y":5}, {"label":"<", "x":11.9167, "y":5}, {"label":">", "x":12.9167, "y":5}, {"label":"?", "x":13.9167, "y":5}, {"label":"Shift", "x":14.9167, "y":5, "w":1.75}, {"label":"|", "x":16.6667, "y":5}, {"label":"\u2190", "x":18.1667, "y":5}, {"label":"\u2193", "x":19.1667, "y":5}, {"label":"\u2192", "x":20.1667, "y":5}, {"label":"1", "x":21.6667, "y":5}, {"label":"2", "x":22.6667, "y":5}, {"label":"3", "x":23.6667, "y":5}, {"label":"Enter", "x":24.6667, "y":5, "h":2}, {"label":"P9", "x":0, "y":6}, {"label":"P10", "x":1, "y":6}, {"label":"Ctrl", "x":2.6667, "y":6, "w":1.5}, {"label":"Win", "x":4.1667, "y":6}, {"label":"Alt", "x":5.1667, "y":6, "w":1.5}, {"x":6.6667, "y":6, "w":7}, {"label":"Alt Gr", "x":13.6667, "y":6, "w":1.5}, {"label":"~", "x":15.1667, "y":6}, {"label":"Ctrl", "x":16.1667, "y":6, "w":1.5}, {"label":"Insert", "x":18.1667, "y":6, "w":1.5}, {"label":"Delete", "x":19.6667, "y":6, "w":1.5}, {"label":"0", "x":21.6667, "y":6, "w":2}, {"label":".", "x":23.6667, "y":6}] + "layout": [ {"label":"P11", "x":0, "y":0}, {"label":"P12", "x":1, "y":0}, {"label":"F1", "x":2.6667, "y":0}, {"label":"F2", "x":3.6667, "y":0}, {"label":"F3", "x":4.6667, "y":0}, {"label":"F4", "x":5.6667, "y":0}, {"label":"F5", "x":8.1667, "y":0}, {"label":"F6", "x":9.1667, "y":0}, {"label":"F7", "x":10.1667, "y":0}, {"label":"F8", "x":11.1667, "y":0}, {"label":"F9", "x":13.6667, "y":0}, {"label":"F10", "x":14.6667, "y":0}, {"label":"F11", "x":15.6667, "y":0}, {"label":"F12", "x":16.6667, "y":0}, {"label":"PrtSc", "x":18.1667, "y":0}, {"label":"Scroll Lock", "x":19.1667, "y":0}, {"label":"Pause", "x":20.1667, "y":0}, + {"label":"P1", "x":0, "y":2}, {"label":"P2", "x":1, "y":2}, {"label":"Esc", "x":2.6667, "y":2}, {"label":"!", "x":3.6667, "y":2}, {"label":"@", "x":4.6667, "y":2}, {"label":"#", "x":5.6667, "y":2}, {"label":"$", "x":6.6667, "y":2}, {"label":"%", "x":7.6667, "y":2}, {"label":"^", "x":8.6667, "y":2}, {"label":"&", "x":9.6667, "y":2}, {"label":"*", "x":10.6667, "y":2}, {"label":"(", "x":11.6667, "y":2}, {"label":")", "x":12.6667, "y":2}, {"label":"_", "x":13.6667, "y":2}, {"label":"+", "x":14.6667, "y":2}, {"label":"Back Space", "x":15.6667, "y":2, "w":2}, {"label":"Insert", "x":18.1667, "y":2}, {"label":"Home", "x":19.1667, "y":2}, {"label":"PgUp", "x":20.1667, "y":2}, {"label":"Num Lock", "x":21.6667, "y":2}, {"label":"/", "x":22.6667, "y":2}, {"label":"*", "x":23.6667, "y":2}, {"label":"-", "x":24.6667, "y":2}, + {"label":"P3", "x":0, "y":3}, {"label":"P4", "x":1, "y":3}, {"label":"Tab", "x":2.6667, "y":3, "w":1.5}, {"label":"Q", "x":4.1667, "y":3}, {"label":"W", "x":5.1667, "y":3}, {"label":"E", "x":6.1667, "y":3}, {"label":"R", "x":7.1667, "y":3}, {"label":"T", "x":8.1667, "y":3}, {"label":"Y", "x":9.1667, "y":3}, {"label":"U", "x":10.1667, "y":3}, {"label":"I", "x":11.1667, "y":3}, {"label":"O", "x":12.1667, "y":3}, {"label":"P", "x":13.1667, "y":3}, {"label":"{", "x":14.1667, "y":3}, {"label":"}", "x":15.1667, "y":3}, {"label":"Enter", "x":16.1667, "y":3, "w":1.5, "h":2}, {"label":"Delete", "x":18.1667, "y":3}, {"label":"End", "x":19.1667, "y":3}, {"label":"PgDn", "x":20.1667, "y":3}, {"label":"7", "x":21.6667, "y":3}, {"label":"8", "x":22.6667, "y":3}, {"label":"9", "x":23.6667, "y":3}, {"label":"+", "x":24.6667, "y":3}, + {"label":"P5", "x":0, "y":4}, {"label":"P6", "x":1, "y":4}, {"label":"Caps Lock", "x":2.6667, "y":4, "w":1.75}, {"label":"A", "x":4.4167, "y":4}, {"label":"S", "x":5.4167, "y":4}, {"label":"D", "x":6.4167, "y":4}, {"label":"F", "x":7.4167, "y":4}, {"label":"G", "x":8.4167, "y":4}, {"label":"H", "x":9.4167, "y":4}, {"label":"J", "x":10.4167, "y":4}, {"label":"K", "x":11.4167, "y":4}, {"label":"L", "x":12.4167, "y":4}, {"label":":", "x":13.4167, "y":4}, {"label":"\"", "x":14.4167, "y":4}, {"x":18.1667, "y":4}, {"label":"\u2191", "x":19.1667, "y":4}, {"x":20.1667, "y":4}, {"label":"4", "x":21.6667, "y":4}, {"label":"5", "x":22.6667, "y":4}, {"label":"6", "x":23.6667, "y":4}, {"label":"=", "x":24.6667, "y":4}, + {"label":"P7", "x":0, "y":5}, {"label":"P8", "x":1, "y":5}, {"label":"Shift", "x":2.6667, "y":5, "w":2.25}, {"label":"Z", "x":4.9167, "y":5}, {"label":"X", "x":5.9167, "y":5}, {"label":"C", "x":6.9167, "y":5}, {"label":"V", "x":7.9167, "y":5}, {"label":"B", "x":8.9167, "y":5}, {"label":"N", "x":9.9167, "y":5}, {"label":"M", "x":10.9167, "y":5}, {"label":"<", "x":11.9167, "y":5}, {"label":">", "x":12.9167, "y":5}, {"label":"?", "x":13.9167, "y":5}, {"label":"Shift", "x":14.9167, "y":5, "w":1.75}, {"label":"|", "x":16.6667, "y":5}, {"label":"\u2190", "x":18.1667, "y":5}, {"label":"\u2193", "x":19.1667, "y":5}, {"label":"\u2192", "x":20.1667, "y":5}, {"label":"1", "x":21.6667, "y":5}, {"label":"2", "x":22.6667, "y":5}, {"label":"3", "x":23.6667, "y":5}, {"label":"Enter", "x":24.6667, "y":5, "h":2}, + {"label":"P9", "x":0, "y":6}, {"label":"P10", "x":1, "y":6}, {"label":"Ctrl", "x":2.6667, "y":6, "w":1.5}, {"label":"Win", "x":4.1667, "y":6}, {"label":"Alt", "x":5.1667, "y":6, "w":1.5}, {"x":6.6667, "y":6, "w":7}, {"label":"Alt Gr", "x":13.6667, "y":6, "w":1.5}, {"label":"~", "x":15.1667, "y":6}, {"label":"Ctrl", "x":16.1667, "y":6, "w":1.5}, {"label":"Insert", "x":18.1667, "y":6, "w":1.5}, {"label":"Delete", "x":19.6667, "y":6, "w":1.5}, {"label":"0", "x":21.6667, "y":6, "w":2}, {"label":".", "x":23.6667, "y":6}] }, "LAYOUT_ultra_rev3": { - "layout": [{"label":"P11", "x":0, "y":0}, {"label":"P12", "x":1, "y":0}, {"label":"Esc", "x":2.6667, "y":0}, {"label":"F1", "x":4.6667, "y":0}, {"label":"F2", "x":5.6667, "y":0}, {"label":"F3", "x":6.6667, "y":0}, {"label":"F4", "x":7.6667, "y":0}, {"label":"F5", "x":9.1667, "y":0}, {"label":"F6", "x":10.1667, "y":0}, {"label":"F7", "x":11.1667, "y":0}, {"label":"F8", "x":12.1667, "y":0}, {"label":"F9", "x":13.6667, "y":0}, {"label":"F10", "x":14.6667, "y":0}, {"label":"F11", "x":15.6667, "y":0}, {"label":"F12", "x":16.6667, "y":0}, {"label":"PrtSc", "x":18.1667, "y":0}, {"label":"Scroll Lock", "x":19.1667, "y":0}, {"label":"Pause", "x":20.1667, "y":0}, {"label":"P1", "x":0, "y":2}, {"label":"P2", "x":1, "y":2}, {"label":"~", "x":2.6667, "y":2}, {"label":"!", "x":3.6667, "y":2}, {"label":"@", "x":4.6667, "y":2}, {"label":"#", "x":5.6667, "y":2}, {"label":"$", "x":6.6667, "y":2}, {"label":"%", "x":7.6667, "y":2}, {"label":"^", "x":8.6667, "y":2}, {"label":"&", "x":9.6667, "y":2}, {"label":"*", "x":10.6667, "y":2}, {"label":"(", "x":11.6667, "y":2}, {"label":")", "x":12.6667, "y":2}, {"label":"_", "x":13.6667, "y":2}, {"label":"+", "x":14.6667, "y":2}, {"label":"Back Space", "x":15.6667, "y":2, "w":2}, {"label":"Insert", "x":18.1667, "y":2}, {"label":"Home", "x":19.1667, "y":2}, {"label":"PgUp", "x":20.1667, "y":2}, {"label":"Num Lock", "x":21.6667, "y":2}, {"label":"/", "x":22.6667, "y":2}, {"label":"*", "x":23.6667, "y":2}, {"label":"-", "x":24.6667, "y":2}, {"label":"P3", "x":0, "y":3}, {"label":"P4", "x":1, "y":3}, {"label":"Tab", "x":2.6667, "y":3, "w":1.5}, {"label":"Q", "x":4.1667, "y":3}, {"label":"W", "x":5.1667, "y":3}, {"label":"E", "x":6.1667, "y":3}, {"label":"R", "x":7.1667, "y":3}, {"label":"T", "x":8.1667, "y":3}, {"label":"Y", "x":9.1667, "y":3}, {"label":"U", "x":10.1667, "y":3}, {"label":"I", "x":11.1667, "y":3}, {"label":"O", "x":12.1667, "y":3}, {"label":"P", "x":13.1667, "y":3}, {"label":"{", "x":14.1667, "y":3}, {"label":"}", "x":15.1667, "y":3}, {"label":"Enter", "x":16.1667, "y":3, "w":1.5, "h":2}, {"label":"Delete", "x":18.1667, "y":3}, {"label":"End", "x":19.1667, "y":3}, {"label":"PgDn", "x":20.1667, "y":3}, {"label":"7", "x":21.6667, "y":3}, {"label":"8", "x":22.6667, "y":3}, {"label":"9", "x":23.6667, "y":3}, {"label":"+", "x":24.6667, "y":3}, {"label":"P5", "x":0, "y":4}, {"label":"P6", "x":1, "y":4}, {"label":"Caps Lock", "x":2.6667, "y":4, "w":1.75}, {"label":"A", "x":4.4167, "y":4}, {"label":"S", "x":5.4167, "y":4}, {"label":"D", "x":6.4167, "y":4}, {"label":"F", "x":7.4167, "y":4}, {"label":"G", "x":8.4167, "y":4}, {"label":"H", "x":9.4167, "y":4}, {"label":"J", "x":10.4167, "y":4}, {"label":"K", "x":11.4167, "y":4}, {"label":"L", "x":12.4167, "y":4}, {"label":":", "x":13.4167, "y":4}, {"label":"\"", "x":14.4167, "y":4}, {"x":18.1667, "y":4}, {"label":"\u2191", "x":19.1667, "y":4}, {"x":20.1667, "y":4}, {"label":"4", "x":21.6667, "y":4}, {"label":"5", "x":22.6667, "y":4}, {"label":"6", "x":23.6667, "y":4}, {"label":"=", "x":24.6667, "y":4}, {"label":"P7", "x":0, "y":5}, {"label":"P8", "x":1, "y":5}, {"label":"Shift", "x":2.6667, "y":5, "w":2.25}, {"label":"Z", "x":4.9167, "y":5}, {"label":"X", "x":5.9167, "y":5}, {"label":"C", "x":6.9167, "y":5}, {"label":"V", "x":7.9167, "y":5}, {"label":"B", "x":8.9167, "y":5}, {"label":"N", "x":9.9167, "y":5}, {"label":"M", "x":10.9167, "y":5}, {"label":"<", "x":11.9167, "y":5}, {"label":">", "x":12.9167, "y":5}, {"label":"?", "x":13.9167, "y":5}, {"label":"Shift", "x":14.9167, "y":5, "w":1.75}, {"label":"|", "x":16.6667, "y":5}, {"label":"\u2190", "x":18.1667, "y":5}, {"label":"\u2193", "x":19.1667, "y":5}, {"label":"\u2192", "x":20.1667, "y":5}, {"label":"1", "x":21.6667, "y":5}, {"label":"2", "x":22.6667, "y":5}, {"label":"3", "x":23.6667, "y":5}, {"label":"Enter", "x":24.6667, "y":5, "h":2}, {"label":"P9", "x":0, "y":6}, {"label":"P10", "x":1, "y":6}, {"label":"Ctrl", "x":2.6667, "y":6, "w":1.5}, {"label":"Win", "x":4.1667, "y":6}, {"label":"Alt", "x":5.1667, "y":6, "w":1.5}, {"x":6.6667, "y":6, "w":7}, {"label":"Alt Gr", "x":13.6667, "y":6, "w":1.5}, {"label":"Compose", "x":15.1667, "y":6}, {"label":"Ctrl", "x":16.1667, "y":6, "w":1.5}, {"label":"Insert", "x":18.1667, "y":6, "w":1.5}, {"label":"Delete", "x":19.6667, "y":6, "w":1.5}, {"label":"0", "x":21.6667, "y":6, "w":2}, {"label":".", "x":23.6667, "y":6}] + "layout": [ {"label":"P11", "x":0, "y":0}, {"label":"P12", "x":1, "y":0}, {"label":"Esc", "x":2.6667, "y":0}, {"label":"F1", "x":4.6667, "y":0}, {"label":"F2", "x":5.6667, "y":0}, {"label":"F3", "x":6.6667, "y":0}, {"label":"F4", "x":7.6667, "y":0}, {"label":"F5", "x":9.1667, "y":0}, {"label":"F6", "x":10.1667, "y":0}, {"label":"F7", "x":11.1667, "y":0}, {"label":"F8", "x":12.1667, "y":0}, {"label":"F9", "x":13.6667, "y":0}, {"label":"F10", "x":14.6667, "y":0}, {"label":"F11", "x":15.6667, "y":0}, {"label":"F12", "x":16.6667, "y":0}, {"label":"PrtSc", "x":18.1667, "y":0}, {"label":"Scroll Lock", "x":19.1667, "y":0}, {"label":"Pause", "x":20.1667, "y":0}, + {"label":"P1", "x":0, "y":2}, {"label":"P2", "x":1, "y":2}, {"label":"~", "x":2.6667, "y":2}, {"label":"!", "x":3.6667, "y":2}, {"label":"@", "x":4.6667, "y":2}, {"label":"#", "x":5.6667, "y":2}, {"label":"$", "x":6.6667, "y":2}, {"label":"%", "x":7.6667, "y":2}, {"label":"^", "x":8.6667, "y":2}, {"label":"&", "x":9.6667, "y":2}, {"label":"*", "x":10.6667, "y":2}, {"label":"(", "x":11.6667, "y":2}, {"label":")", "x":12.6667, "y":2}, {"label":"_", "x":13.6667, "y":2}, {"label":"+", "x":14.6667, "y":2}, {"label":"Back Space", "x":15.6667, "y":2, "w":2}, {"label":"Insert", "x":18.1667, "y":2}, {"label":"Home", "x":19.1667, "y":2}, {"label":"PgUp", "x":20.1667, "y":2}, {"label":"Num Lock", "x":21.6667, "y":2}, {"label":"/", "x":22.6667, "y":2}, {"label":"*", "x":23.6667, "y":2}, {"label":"-", "x":24.6667, "y":2}, + {"label":"P3", "x":0, "y":3}, {"label":"P4", "x":1, "y":3}, {"label":"Tab", "x":2.6667, "y":3, "w":1.5}, {"label":"Q", "x":4.1667, "y":3}, {"label":"W", "x":5.1667, "y":3}, {"label":"E", "x":6.1667, "y":3}, {"label":"R", "x":7.1667, "y":3}, {"label":"T", "x":8.1667, "y":3}, {"label":"Y", "x":9.1667, "y":3}, {"label":"U", "x":10.1667, "y":3}, {"label":"I", "x":11.1667, "y":3}, {"label":"O", "x":12.1667, "y":3}, {"label":"P", "x":13.1667, "y":3}, {"label":"{", "x":14.1667, "y":3}, {"label":"}", "x":15.1667, "y":3}, {"label":"Enter", "x":16.1667, "y":3, "w":1.5, "h":2}, {"label":"Delete", "x":18.1667, "y":3}, {"label":"End", "x":19.1667, "y":3}, {"label":"PgDn", "x":20.1667, "y":3}, {"label":"7", "x":21.6667, "y":3}, {"label":"8", "x":22.6667, "y":3}, {"label":"9", "x":23.6667, "y":3}, {"label":"+", "x":24.6667, "y":3}, + {"label":"P5", "x":0, "y":4}, {"label":"P6", "x":1, "y":4}, {"label":"Caps Lock", "x":2.6667, "y":4, "w":1.75}, {"label":"A", "x":4.4167, "y":4}, {"label":"S", "x":5.4167, "y":4}, {"label":"D", "x":6.4167, "y":4}, {"label":"F", "x":7.4167, "y":4}, {"label":"G", "x":8.4167, "y":4}, {"label":"H", "x":9.4167, "y":4}, {"label":"J", "x":10.4167, "y":4}, {"label":"K", "x":11.4167, "y":4}, {"label":"L", "x":12.4167, "y":4}, {"label":":", "x":13.4167, "y":4}, {"label":"\"", "x":14.4167, "y":4}, {"x":18.1667, "y":4}, {"label":"\u2191", "x":19.1667, "y":4}, {"x":20.1667, "y":4}, {"label":"4", "x":21.6667, "y":4}, {"label":"5", "x":22.6667, "y":4}, {"label":"6", "x":23.6667, "y":4}, {"label":"=", "x":24.6667, "y":4}, + {"label":"P7", "x":0, "y":5}, {"label":"P8", "x":1, "y":5}, {"label":"Shift", "x":2.6667, "y":5, "w":2.25}, {"label":"Z", "x":4.9167, "y":5}, {"label":"X", "x":5.9167, "y":5}, {"label":"C", "x":6.9167, "y":5}, {"label":"V", "x":7.9167, "y":5}, {"label":"B", "x":8.9167, "y":5}, {"label":"N", "x":9.9167, "y":5}, {"label":"M", "x":10.9167, "y":5}, {"label":"<", "x":11.9167, "y":5}, {"label":">", "x":12.9167, "y":5}, {"label":"?", "x":13.9167, "y":5}, {"label":"Shift", "x":14.9167, "y":5, "w":1.75}, {"label":"|", "x":16.6667, "y":5}, {"label":"\u2190", "x":18.1667, "y":5}, {"label":"\u2193", "x":19.1667, "y":5}, {"label":"\u2192", "x":20.1667, "y":5}, {"label":"1", "x":21.6667, "y":5}, {"label":"2", "x":22.6667, "y":5}, {"label":"3", "x":23.6667, "y":5}, {"label":"Enter", "x":24.6667, "y":5, "h":2}, + {"label":"P9", "x":0, "y":6}, {"label":"P10", "x":1, "y":6}, {"label":"Ctrl", "x":2.6667, "y":6, "w":1.5}, {"label":"Win", "x":4.1667, "y":6}, {"label":"Alt", "x":5.1667, "y":6, "w":1.5}, {"x":6.6667, "y":6, "w":7}, {"label":"Alt Gr", "x":13.6667, "y":6, "w":1.5}, {"label":"Compose", "x":15.1667, "y":6}, {"label":"Ctrl", "x":16.1667, "y":6, "w":1.5}, {"label":"Insert", "x":18.1667, "y":6, "w":1.5}, {"label":"Delete", "x":19.6667, "y":6, "w":1.5}, {"label":"0", "x":21.6667, "y":6, "w":2}, {"label":".", "x":23.6667, "y":6}] }, "LAYOUT_plus_rev3": { - "layout": [{"label":"F11", "x":0, "y":0}, {"label":"F12", "x":1, "y":0}, {"label":"Esc", "x":2.6667, "y":0}, {"label":"PrtSc", "x":18.1667, "y":0}, {"label":"Scroll Lock", "x":19.1667, "y":0}, {"label":"Pause", "x":20.1667, "y":0}, {"label":"F1", "x":0, "y":2}, {"label":"F2", "x":1, "y":2}, {"label":"~", "x":2.6667, "y":2}, {"label":"!", "x":3.6667, "y":2}, {"label":"@", "x":4.6667, "y":2}, {"label":"#", "x":5.6667, "y":2}, {"label":"$", "x":6.6667, "y":2}, {"label":"%", "x":7.6667, "y":2}, {"label":"^", "x":8.6667, "y":2}, {"label":"&", "x":9.6667, "y":2}, {"label":"*", "x":10.6667, "y":2}, {"label":"(", "x":11.6667, "y":2}, {"label":")", "x":12.6667, "y":2}, {"label":"_", "x":13.6667, "y":2}, {"label":"+", "x":14.6667, "y":2}, {"label":"Back Space", "x":15.6667, "y":2, "w":2}, {"label":"Insert", "x":18.1667, "y":2}, {"label":"Home", "x":19.1667, "y":2}, {"label":"PgUp", "x":20.1667, "y":2}, {"label":"Num Lock", "x":21.6667, "y":2}, {"label":"/", "x":22.6667, "y":2}, {"label":"*", "x":23.6667, "y":2}, {"label":"-", "x":24.6667, "y":2}, {"label":"F3", "x":0, "y":3}, {"label":"F4", "x":1, "y":3}, {"label":"Tab", "x":2.6667, "y":3, "w":1.5}, {"label":"Q", "x":4.1667, "y":3}, {"label":"W", "x":5.1667, "y":3}, {"label":"E", "x":6.1667, "y":3}, {"label":"R", "x":7.1667, "y":3}, {"label":"T", "x":8.1667, "y":3}, {"label":"Y", "x":9.1667, "y":3}, {"label":"U", "x":10.1667, "y":3}, {"label":"I", "x":11.1667, "y":3}, {"label":"O", "x":12.1667, "y":3}, {"label":"P", "x":13.1667, "y":3}, {"label":"{", "x":14.1667, "y":3}, {"label":"}", "x":15.1667, "y":3}, {"label":"Enter", "x":16.1667, "y":3, "w":1.5, "h":2}, {"label":"Delete", "x":18.1667, "y":3}, {"label":"End", "x":19.1667, "y":3}, {"label":"PgDn", "x":20.1667, "y":3}, {"label":"7", "x":21.6667, "y":3}, {"label":"8", "x":22.6667, "y":3}, {"label":"9", "x":23.6667, "y":3}, {"label":"+", "x":24.6667, "y":3}, {"label":"F5", "x":0, "y":4}, {"label":"F6", "x":1, "y":4}, {"label":"Caps Lock", "x":2.6667, "y":4, "w":1.75}, {"label":"A", "x":4.4167, "y":4}, {"label":"S", "x":5.4167, "y":4}, {"label":"D", "x":6.4167, "y":4}, {"label":"F", "x":7.4167, "y":4}, {"label":"G", "x":8.4167, "y":4}, {"label":"H", "x":9.4167, "y":4}, {"label":"J", "x":10.4167, "y":4}, {"label":"K", "x":11.4167, "y":4}, {"label":"L", "x":12.4167, "y":4}, {"label":":", "x":13.4167, "y":4}, {"label":"\"", "x":14.4167, "y":4}, {"x":18.1667, "y":4}, {"label":"\u2191", "x":19.1667, "y":4}, {"x":20.1667, "y":4}, {"label":"4", "x":21.6667, "y":4}, {"label":"5", "x":22.6667, "y":4}, {"label":"6", "x":23.6667, "y":4}, {"label":"=", "x":24.6667, "y":4}, {"label":"F7", "x":0, "y":5}, {"label":"F8", "x":1, "y":5}, {"label":"Shift", "x":2.6667, "y":5, "w":2.25}, {"label":"Z", "x":4.9167, "y":5}, {"label":"X", "x":5.9167, "y":5}, {"label":"C", "x":6.9167, "y":5}, {"label":"V", "x":7.9167, "y":5}, {"label":"B", "x":8.9167, "y":5}, {"label":"N", "x":9.9167, "y":5}, {"label":"M", "x":10.9167, "y":5}, {"label":"<", "x":11.9167, "y":5}, {"label":">", "x":12.9167, "y":5}, {"label":"?", "x":13.9167, "y":5}, {"label":"Shift", "x":14.9167, "y":5, "w":1.75}, {"label":"|", "x":16.6667, "y":5}, {"label":"\u2190", "x":18.1667, "y":5}, {"label":"\u2193", "x":19.1667, "y":5}, {"label":"\u2192", "x":20.1667, "y":5}, {"label":"1", "x":21.6667, "y":5}, {"label":"2", "x":22.6667, "y":5}, {"label":"3", "x":23.6667, "y":5}, {"label":"Enter", "x":24.6667, "y":5, "h":2}, {"label":"F9", "x":0, "y":6}, {"label":"F10", "x":1, "y":6}, {"label":"Ctrl", "x":2.6667, "y":6, "w":1.5}, {"label":"Win", "x":4.1667, "y":6}, {"label":"Alt", "x":5.1667, "y":6, "w":1.5}, {"x":6.6667, "y":6, "w":7}, {"label":"Alt Gr", "x":13.6667, "y":6, "w":1.5}, {"label":"Compose", "x":15.1667, "y":6}, {"label":"Ctrl", "x":16.1667, "y":6, "w":1.5}, {"label":"Insert", "x":18.1667, "y":6, "w":1.5}, {"label":"Delete", "x":19.6667, "y":6, "w":1.5}, {"label":"0", "x":21.6667, "y":6, "w":2}, {"label":".", "x":23.6667, "y":6}] + "layout": [ {"label":"F11", "x":0, "y":0}, {"label":"F12", "x":1, "y":0}, {"label":"Esc", "x":2.6667, "y":0}, {"label":"PrtSc", "x":18.1667, "y":0}, {"label":"Scroll Lock", "x":19.1667, "y":0}, {"label":"Pause", "x":20.1667, "y":0}, + {"label":"F1", "x":0, "y":2}, {"label":"F2", "x":1, "y":2}, {"label":"~", "x":2.6667, "y":2}, {"label":"!", "x":3.6667, "y":2}, {"label":"@", "x":4.6667, "y":2}, {"label":"#", "x":5.6667, "y":2}, {"label":"$", "x":6.6667, "y":2}, {"label":"%", "x":7.6667, "y":2}, {"label":"^", "x":8.6667, "y":2}, {"label":"&", "x":9.6667, "y":2}, {"label":"*", "x":10.6667, "y":2}, {"label":"(", "x":11.6667, "y":2}, {"label":")", "x":12.6667, "y":2}, {"label":"_", "x":13.6667, "y":2}, {"label":"+", "x":14.6667, "y":2}, {"label":"Back Space", "x":15.6667, "y":2, "w":2}, {"label":"Insert", "x":18.1667, "y":2}, {"label":"Home", "x":19.1667, "y":2}, {"label":"PgUp", "x":20.1667, "y":2}, {"label":"Num Lock", "x":21.6667, "y":2}, {"label":"/", "x":22.6667, "y":2}, {"label":"*", "x":23.6667, "y":2}, {"label":"-", "x":24.6667, "y":2}, + {"label":"F3", "x":0, "y":3}, {"label":"F4", "x":1, "y":3}, {"label":"Tab", "x":2.6667, "y":3, "w":1.5}, {"label":"Q", "x":4.1667, "y":3}, {"label":"W", "x":5.1667, "y":3}, {"label":"E", "x":6.1667, "y":3}, {"label":"R", "x":7.1667, "y":3}, {"label":"T", "x":8.1667, "y":3}, {"label":"Y", "x":9.1667, "y":3}, {"label":"U", "x":10.1667, "y":3}, {"label":"I", "x":11.1667, "y":3}, {"label":"O", "x":12.1667, "y":3}, {"label":"P", "x":13.1667, "y":3}, {"label":"{", "x":14.1667, "y":3}, {"label":"}", "x":15.1667, "y":3}, {"label":"Enter", "x":16.1667, "y":3, "w":1.5, "h":2}, {"label":"Delete", "x":18.1667, "y":3}, {"label":"End", "x":19.1667, "y":3}, {"label":"PgDn", "x":20.1667, "y":3}, {"label":"7", "x":21.6667, "y":3}, {"label":"8", "x":22.6667, "y":3}, {"label":"9", "x":23.6667, "y":3}, {"label":"+", "x":24.6667, "y":3}, + {"label":"F5", "x":0, "y":4}, {"label":"F6", "x":1, "y":4}, {"label":"Caps Lock", "x":2.6667, "y":4, "w":1.75}, {"label":"A", "x":4.4167, "y":4}, {"label":"S", "x":5.4167, "y":4}, {"label":"D", "x":6.4167, "y":4}, {"label":"F", "x":7.4167, "y":4}, {"label":"G", "x":8.4167, "y":4}, {"label":"H", "x":9.4167, "y":4}, {"label":"J", "x":10.4167, "y":4}, {"label":"K", "x":11.4167, "y":4}, {"label":"L", "x":12.4167, "y":4}, {"label":":", "x":13.4167, "y":4}, {"label":"\"", "x":14.4167, "y":4}, {"x":18.1667, "y":4}, {"label":"\u2191", "x":19.1667, "y":4}, {"x":20.1667, "y":4}, {"label":"4", "x":21.6667, "y":4}, {"label":"5", "x":22.6667, "y":4}, {"label":"6", "x":23.6667, "y":4}, {"label":"=", "x":24.6667, "y":4}, + {"label":"F7", "x":0, "y":5}, {"label":"F8", "x":1, "y":5}, {"label":"Shift", "x":2.6667, "y":5, "w":2.25}, {"label":"Z", "x":4.9167, "y":5}, {"label":"X", "x":5.9167, "y":5}, {"label":"C", "x":6.9167, "y":5}, {"label":"V", "x":7.9167, "y":5}, {"label":"B", "x":8.9167, "y":5}, {"label":"N", "x":9.9167, "y":5}, {"label":"M", "x":10.9167, "y":5}, {"label":"<", "x":11.9167, "y":5}, {"label":">", "x":12.9167, "y":5}, {"label":"?", "x":13.9167, "y":5}, {"label":"Shift", "x":14.9167, "y":5, "w":1.75}, {"label":"|", "x":16.6667, "y":5}, {"label":"\u2190", "x":18.1667, "y":5}, {"label":"\u2193", "x":19.1667, "y":5}, {"label":"\u2192", "x":20.1667, "y":5}, {"label":"1", "x":21.6667, "y":5}, {"label":"2", "x":22.6667, "y":5}, {"label":"3", "x":23.6667, "y":5}, {"label":"Enter", "x":24.6667, "y":5, "h":2}, + {"label":"F9", "x":0, "y":6}, {"label":"F10", "x":1, "y":6}, {"label":"Ctrl", "x":2.6667, "y":6, "w":1.5}, {"label":"Win", "x":4.1667, "y":6}, {"label":"Alt", "x":5.1667, "y":6, "w":1.5}, {"x":6.6667, "y":6, "w":7}, {"label":"Alt Gr", "x":13.6667, "y":6, "w":1.5}, {"label":"Compose", "x":15.1667, "y":6}, {"label":"Ctrl", "x":16.1667, "y":6, "w":1.5}, {"label":"Insert", "x":18.1667, "y":6, "w":1.5}, {"label":"Delete", "x":19.6667, "y":6, "w":1.5}, {"label":"0", "x":21.6667, "y":6, "w":2}, {"label":".", "x":23.6667, "y":6}] }, "LAYOUT_plus_rev1": { - "layout": [{"label":"F11", "x":0, "y":0}, {"label":"F12", "x":1, "y":0}, {"label":"PrtSc", "x":18.1667, "y":0}, {"label":"Scroll Lock", "x":19.1667, "y":0}, {"label":"Pause", "x":20.1667, "y":0}, {"label":"F1", "x":0, "y":2}, {"label":"F2", "x":1, "y":2}, {"label":"Esc", "x":2.6667, "y":2}, {"label":"!", "x":3.6667, "y":2}, {"label":"@", "x":4.6667, "y":2}, {"label":"#", "x":5.6667, "y":2}, {"label":"$", "x":6.6667, "y":2}, {"label":"%", "x":7.6667, "y":2}, {"label":"^", "x":8.6667, "y":2}, {"label":"&", "x":9.6667, "y":2}, {"label":"*", "x":10.6667, "y":2}, {"label":"(", "x":11.6667, "y":2}, {"label":")", "x":12.6667, "y":2}, {"label":"_", "x":13.6667, "y":2}, {"label":"+", "x":14.6667, "y":2}, {"label":"Back Space", "x":15.6667, "y":2, "w":2}, {"label":"Insert", "x":18.1667, "y":2}, {"label":"Home", "x":19.1667, "y":2}, {"label":"PgUp", "x":20.1667, "y":2}, {"label":"Num Lock", "x":21.6667, "y":2}, {"label":"/", "x":22.6667, "y":2}, {"label":"*", "x":23.6667, "y":2}, {"label":"-", "x":24.6667, "y":2}, {"label":"F3", "x":0, "y":3}, {"label":"F4", "x":1, "y":3}, {"label":"Tab", "x":2.6667, "y":3, "w":1.5}, {"label":"Q", "x":4.1667, "y":3}, {"label":"W", "x":5.1667, "y":3}, {"label":"E", "x":6.1667, "y":3}, {"label":"R", "x":7.1667, "y":3}, {"label":"T", "x":8.1667, "y":3}, {"label":"Y", "x":9.1667, "y":3}, {"label":"U", "x":10.1667, "y":3}, {"label":"I", "x":11.1667, "y":3}, {"label":"O", "x":12.1667, "y":3}, {"label":"P", "x":13.1667, "y":3}, {"label":"{", "x":14.1667, "y":3}, {"label":"}", "x":15.1667, "y":3}, {"label":"Enter", "x":16.1667, "y":3, "w":1.5, "h":2}, {"label":"Delete", "x":18.1667, "y":3}, {"label":"End", "x":19.1667, "y":3}, {"label":"PgDn", "x":20.1667, "y":3}, {"label":"7", "x":21.6667, "y":3}, {"label":"8", "x":22.6667, "y":3}, {"label":"9", "x":23.6667, "y":3}, {"label":"+", "x":24.6667, "y":3}, {"label":"F5", "x":0, "y":4}, {"label":"F6", "x":1, "y":4}, {"label":"Caps Lock", "x":2.6667, "y":4, "w":1.75}, {"label":"A", "x":4.4167, "y":4}, {"label":"S", "x":5.4167, "y":4}, {"label":"D", "x":6.4167, "y":4}, {"label":"F", "x":7.4167, "y":4}, {"label":"G", "x":8.4167, "y":4}, {"label":"H", "x":9.4167, "y":4}, {"label":"J", "x":10.4167, "y":4}, {"label":"K", "x":11.4167, "y":4}, {"label":"L", "x":12.4167, "y":4}, {"label":":", "x":13.4167, "y":4}, {"label":"\"", "x":14.4167, "y":4}, {"x":18.1667, "y":4}, {"label":"\u2191", "x":19.1667, "y":4}, {"x":20.1667, "y":4}, {"label":"4", "x":21.6667, "y":4}, {"label":"5", "x":22.6667, "y":4}, {"label":"6", "x":23.6667, "y":4}, {"label":"=", "x":24.6667, "y":4}, {"label":"F7", "x":0, "y":5}, {"label":"F8", "x":1, "y":5}, {"label":"Shift", "x":2.6667, "y":5, "w":2.25}, {"label":"Z", "x":4.9167, "y":5}, {"label":"X", "x":5.9167, "y":5}, {"label":"C", "x":6.9167, "y":5}, {"label":"V", "x":7.9167, "y":5}, {"label":"B", "x":8.9167, "y":5}, {"label":"N", "x":9.9167, "y":5}, {"label":"M", "x":10.9167, "y":5}, {"label":"<", "x":11.9167, "y":5}, {"label":">", "x":12.9167, "y":5}, {"label":"?", "x":13.9167, "y":5}, {"label":"Shift", "x":14.9167, "y":5, "w":1.75}, {"label":"|", "x":16.6667, "y":5}, {"label":"\u2190", "x":18.1667, "y":5}, {"label":"\u2193", "x":19.1667, "y":5}, {"label":"\u2192", "x":20.1667, "y":5}, {"label":"1", "x":21.6667, "y":5}, {"label":"2", "x":22.6667, "y":5}, {"label":"3", "x":23.6667, "y":5}, {"label":"Enter", "x":24.6667, "y":5, "h":2}, {"label":"F9", "x":0, "y":6}, {"label":"F10", "x":1, "y":6}, {"label":"Ctrl", "x":2.6667, "y":6, "w":1.5}, {"label":"Win", "x":4.1667, "y":6}, {"label":"Alt", "x":5.1667, "y":6, "w":1.5}, {"x":6.6667, "y":6, "w":7}, {"label":"Alt Gr", "x":13.6667, "y":6, "w":1.5}, {"label":"~", "x":15.1667, "y":6}, {"label":"Ctrl", "x":16.1667, "y":6, "w":1.5}, {"label":"Insert", "x":18.1667, "y":6, "w":1.5}, {"label":"Delete", "x":19.6667, "y":6, "w":1.5}, {"label":"0", "x":21.6667, "y":6, "w":2}, {"label":".", "x":23.6667, "y":6}] + "layout": [ {"label":"F11", "x":0, "y":0}, {"label":"F12", "x":1, "y":0}, {"label":"PrtSc", "x":18.1667, "y":0}, {"label":"Scroll Lock", "x":19.1667, "y":0}, {"label":"Pause", "x":20.1667, "y":0}, + {"label":"F1", "x":0, "y":2}, {"label":"F2", "x":1, "y":2}, {"label":"Esc", "x":2.6667, "y":2}, {"label":"!", "x":3.6667, "y":2}, {"label":"@", "x":4.6667, "y":2}, {"label":"#", "x":5.6667, "y":2}, {"label":"$", "x":6.6667, "y":2}, {"label":"%", "x":7.6667, "y":2}, {"label":"^", "x":8.6667, "y":2}, {"label":"&", "x":9.6667, "y":2}, {"label":"*", "x":10.6667, "y":2}, {"label":"(", "x":11.6667, "y":2}, {"label":")", "x":12.6667, "y":2}, {"label":"_", "x":13.6667, "y":2}, {"label":"+", "x":14.6667, "y":2}, {"label":"Back Space", "x":15.6667, "y":2, "w":2}, {"label":"Insert", "x":18.1667, "y":2}, {"label":"Home", "x":19.1667, "y":2}, {"label":"PgUp", "x":20.1667, "y":2}, {"label":"Num Lock", "x":21.6667, "y":2}, {"label":"/", "x":22.6667, "y":2}, {"label":"*", "x":23.6667, "y":2}, {"label":"-", "x":24.6667, "y":2}, + {"label":"F3", "x":0, "y":3}, {"label":"F4", "x":1, "y":3}, {"label":"Tab", "x":2.6667, "y":3, "w":1.5}, {"label":"Q", "x":4.1667, "y":3}, {"label":"W", "x":5.1667, "y":3}, {"label":"E", "x":6.1667, "y":3}, {"label":"R", "x":7.1667, "y":3}, {"label":"T", "x":8.1667, "y":3}, {"label":"Y", "x":9.1667, "y":3}, {"label":"U", "x":10.1667, "y":3}, {"label":"I", "x":11.1667, "y":3}, {"label":"O", "x":12.1667, "y":3}, {"label":"P", "x":13.1667, "y":3}, {"label":"{", "x":14.1667, "y":3}, {"label":"}", "x":15.1667, "y":3}, {"label":"Enter", "x":16.1667, "y":3, "w":1.5, "h":2}, {"label":"Delete", "x":18.1667, "y":3}, {"label":"End", "x":19.1667, "y":3}, {"label":"PgDn", "x":20.1667, "y":3}, {"label":"7", "x":21.6667, "y":3}, {"label":"8", "x":22.6667, "y":3}, {"label":"9", "x":23.6667, "y":3}, {"label":"+", "x":24.6667, "y":3}, + {"label":"F5", "x":0, "y":4}, {"label":"F6", "x":1, "y":4}, {"label":"Caps Lock", "x":2.6667, "y":4, "w":1.75}, {"label":"A", "x":4.4167, "y":4}, {"label":"S", "x":5.4167, "y":4}, {"label":"D", "x":6.4167, "y":4}, {"label":"F", "x":7.4167, "y":4}, {"label":"G", "x":8.4167, "y":4}, {"label":"H", "x":9.4167, "y":4}, {"label":"J", "x":10.4167, "y":4}, {"label":"K", "x":11.4167, "y":4}, {"label":"L", "x":12.4167, "y":4}, {"label":":", "x":13.4167, "y":4}, {"label":"\"", "x":14.4167, "y":4}, {"x":18.1667, "y":4}, {"label":"\u2191", "x":19.1667, "y":4}, {"x":20.1667, "y":4}, {"label":"4", "x":21.6667, "y":4}, {"label":"5", "x":22.6667, "y":4}, {"label":"6", "x":23.6667, "y":4}, {"label":"=", "x":24.6667, "y":4}, + {"label":"F7", "x":0, "y":5}, {"label":"F8", "x":1, "y":5}, {"label":"Shift", "x":2.6667, "y":5, "w":2.25}, {"label":"Z", "x":4.9167, "y":5}, {"label":"X", "x":5.9167, "y":5}, {"label":"C", "x":6.9167, "y":5}, {"label":"V", "x":7.9167, "y":5}, {"label":"B", "x":8.9167, "y":5}, {"label":"N", "x":9.9167, "y":5}, {"label":"M", "x":10.9167, "y":5}, {"label":"<", "x":11.9167, "y":5}, {"label":">", "x":12.9167, "y":5}, {"label":"?", "x":13.9167, "y":5}, {"label":"Shift", "x":14.9167, "y":5, "w":1.75}, {"label":"|", "x":16.6667, "y":5}, {"label":"\u2190", "x":18.1667, "y":5}, {"label":"\u2193", "x":19.1667, "y":5}, {"label":"\u2192", "x":20.1667, "y":5}, {"label":"1", "x":21.6667, "y":5}, {"label":"2", "x":22.6667, "y":5}, {"label":"3", "x":23.6667, "y":5}, {"label":"Enter", "x":24.6667, "y":5, "h":2}, + {"label":"F9", "x":0, "y":6}, {"label":"F10", "x":1, "y":6}, {"label":"Ctrl", "x":2.6667, "y":6, "w":1.5}, {"label":"Win", "x":4.1667, "y":6}, {"label":"Alt", "x":5.1667, "y":6, "w":1.5}, {"x":6.6667, "y":6, "w":7}, {"label":"Alt Gr", "x":13.6667, "y":6, "w":1.5}, {"label":"~", "x":15.1667, "y":6}, {"label":"Ctrl", "x":16.1667, "y":6, "w":1.5}, {"label":"Insert", "x":18.1667, "y":6, "w":1.5}, {"label":"Delete", "x":19.6667, "y":6, "w":1.5}, {"label":"0", "x":21.6667, "y":6, "w":2}, {"label":".", "x":23.6667, "y":6}] }, "LAYOUT_102_rev1": { - "layout": [{"label":"F11", "x":0, "y":0}, {"label":"F12", "x":1, "y":0}, {"label":"PrtSc", "x":18.1667, "y":0}, {"label":"Scroll Lock", "x":19.1667, "y":0}, {"label":"Pause", "x":20.1667, "y":0}, {"label":"F1", "x":0, "y":2}, {"label":"F2", "x":1, "y":2}, {"label":"Esc", "x":2.6667, "y":2}, {"label":"!", "x":3.6667, "y":2}, {"label":"@", "x":4.6667, "y":2}, {"label":"#", "x":5.6667, "y":2}, {"label":"$", "x":6.6667, "y":2}, {"label":"%", "x":7.6667, "y":2}, {"label":"^", "x":8.6667, "y":2}, {"label":"&", "x":9.6667, "y":2}, {"label":"*", "x":10.6667, "y":2}, {"label":"(", "x":11.6667, "y":2}, {"label":")", "x":12.6667, "y":2}, {"label":"_", "x":13.6667, "y":2}, {"label":"+", "x":14.6667, "y":2}, {"label":"Back Space", "x":15.6667, "y":2, "w":2}, {"label":"Insert", "x":18.1667, "y":2}, {"label":"Home", "x":19.1667, "y":2}, {"label":"PgUp", "x":20.1667, "y":2}, {"label":"Num Lock", "x":21.6667, "y":2}, {"label":"/", "x":22.6667, "y":2}, {"label":"*", "x":23.6667, "y":2}, {"label":"-", "x":24.6667, "y":2}, {"label":"F3", "x":0, "y":3}, {"label":"F4", "x":1, "y":3}, {"label":"Tab", "x":2.6667, "y":3, "w":1.5}, {"label":"Q", "x":4.1667, "y":3}, {"label":"W", "x":5.1667, "y":3}, {"label":"E", "x":6.1667, "y":3}, {"label":"R", "x":7.1667, "y":3}, {"label":"T", "x":8.1667, "y":3}, {"label":"Y", "x":9.1667, "y":3}, {"label":"U", "x":10.1667, "y":3}, {"label":"I", "x":11.1667, "y":3}, {"label":"O", "x":12.1667, "y":3}, {"label":"P", "x":13.1667, "y":3}, {"label":"{", "x":14.1667, "y":3}, {"label":"}", "x":15.1667, "y":3}, {"label":"Enter", "x":16.1667, "y":3, "w":1.5, "h":2}, {"label":"Delete", "x":18.1667, "y":3}, {"label":"End", "x":19.1667, "y":3}, {"label":"PgDn", "x":20.1667, "y":3}, {"label":"7", "x":21.6667, "y":3}, {"label":"8", "x":22.6667, "y":3}, {"label":"9", "x":23.6667, "y":3}, {"label":"+", "x":24.6667, "y":3}, {"label":"F5", "x":0, "y":4}, {"label":"F6", "x":1, "y":4}, {"label":"Caps Lock", "x":2.6667, "y":4, "w":1.75}, {"label":"A", "x":4.4167, "y":4}, {"label":"S", "x":5.4167, "y":4}, {"label":"D", "x":6.4167, "y":4}, {"label":"F", "x":7.4167, "y":4}, {"label":"G", "x":8.4167, "y":4}, {"label":"H", "x":9.4167, "y":4}, {"label":"J", "x":10.4167, "y":4}, {"label":"K", "x":11.4167, "y":4}, {"label":"L", "x":12.4167, "y":4}, {"label":":", "x":13.4167, "y":4}, {"label":"\"", "x":14.4167, "y":4}, {"label":"4", "x":21.6667, "y":4}, {"label":"5", "x":22.6667, "y":4}, {"label":"6", "x":23.6667, "y":4}, {"label":"=", "x":24.6667, "y":4}, {"label":"F7", "x":0, "y":5}, {"label":"F8", "x":1, "y":5}, {"label":"Shift", "x":2.6667, "y":5, "w":2.25}, {"label":"Z", "x":4.9167, "y":5}, {"label":"X", "x":5.9167, "y":5}, {"label":"C", "x":6.9167, "y":5}, {"label":"V", "x":7.9167, "y":5}, {"label":"B", "x":8.9167, "y":5}, {"label":"N", "x":9.9167, "y":5}, {"label":"M", "x":10.9167, "y":5}, {"label":"<", "x":11.9167, "y":5}, {"label":">", "x":12.9167, "y":5}, {"label":"?", "x":13.9167, "y":5}, {"label":"Shift", "x":14.9167, "y":5, "w":1.75}, {"label":"|", "x":16.6667, "y":5}, {"label":"\u2191", "x":19.1667, "y":5}, {"label":"1", "x":21.6667, "y":5}, {"label":"2", "x":22.6667, "y":5}, {"label":"3", "x":23.6667, "y":5}, {"label":"Enter", "x":24.6667, "y":5, "h":2}, {"label":"F9", "x":0, "y":6}, {"label":"F10", "x":1, "y":6}, {"label":"Ctrl", "x":2.6667, "y":6, "w":1.5}, {"label":"Win", "x":4.1667, "y":6}, {"label":"Alt", "x":5.1667, "y":6, "w":1.5}, {"x":6.6667, "y":6, "w":7}, {"label":"Alt Gr", "x":13.6667, "y":6, "w":1.5}, {"label":"~", "x":15.1667, "y":6}, {"label":"Ctrl", "x":16.1667, "y":6, "w":1.5}, {"label":"\u2190", "x":18.1667, "y":6}, {"label":"\u2193", "x":19.1667, "y":6}, {"label":"\u2192", "x":20.1667, "y":6}, {"label":"0", "x":21.6667, "y":6, "w":2}, {"label":".", "x":23.6667, "y":6}] + "layout": [ {"label":"F11", "x":0, "y":0}, {"label":"F12", "x":1, "y":0}, {"label":"PrtSc", "x":18.1667, "y":0}, {"label":"Scroll Lock", "x":19.1667, "y":0}, {"label":"Pause", "x":20.1667, "y":0}, + {"label":"F1", "x":0, "y":2}, {"label":"F2", "x":1, "y":2},{"label":"Esc", "x":2.6667, "y":2}, {"label":"!", "x":3.6667, "y":2}, {"label":"@", "x":4.6667, "y":2}, {"label":"#", "x":5.6667, "y":2}, {"label":"$", "x":6.6667, "y":2}, {"label":"%", "x":7.6667, "y":2}, {"label":"^", "x":8.6667, "y":2}, {"label":"&", "x":9.6667, "y":2}, {"label":"*", "x":10.6667, "y":2}, {"label":"(", "x":11.6667, "y":2}, {"label":")", "x":12.6667, "y":2}, {"label":"_", "x":13.6667, "y":2}, {"label":"+", "x":14.6667, "y":2}, {"label":"Back Space", "x":15.6667, "y":2, "w":2}, {"label":"Insert", "x":18.1667, "y":2}, {"label":"Home", "x":19.1667, "y":2}, {"label":"PgUp", "x":20.1667, "y":2}, {"label":"Num Lock", "x":21.6667, "y":2}, {"label":"/", "x":22.6667, "y":2}, {"label":"*", "x":23.6667, "y":2}, {"label":"-", "x":24.6667, "y":2}, + {"label":"F3", "x":0, "y":3}, {"label":"F4", "x":1, "y":3}, {"label":"Tab", "x":2.6667, "y":3, "w":1.5}, {"label":"Q", "x":4.1667, "y":3}, {"label":"W", "x":5.1667, "y":3}, {"label":"E", "x":6.1667, "y":3}, {"label":"R", "x":7.1667, "y":3}, {"label":"T", "x":8.1667, "y":3}, {"label":"Y", "x":9.1667, "y":3}, {"label":"U", "x":10.1667, "y":3}, {"label":"I", "x":11.1667, "y":3}, {"label":"O", "x":12.1667, "y":3}, {"label":"P", "x":13.1667, "y":3}, {"label":"{", "x":14.1667, "y":3}, {"label":"}", "x":15.1667, "y":3}, {"label":"Enter", "x":16.1667, "y":3, "w":1.5, "h":2}, {"label":"Delete", "x":18.1667, "y":3}, {"label":"End", "x":19.1667, "y":3}, {"label":"PgDn", "x":20.1667, "y":3}, {"label":"7", "x":21.6667, "y":3}, {"label":"8", "x":22.6667, "y":3}, {"label":"9", "x":23.6667, "y":3}, {"label":"+", "x":24.6667, "y":3}, + {"label":"F5", "x":0, "y":4}, {"label":"F6", "x":1, "y":4}, {"label":"Caps Lock", "x":2.6667, "y":4, "w":1.75}, {"label":"A", "x":4.4167, "y":4}, {"label":"S", "x":5.4167, "y":4}, {"label":"D", "x":6.4167, "y":4}, {"label":"F", "x":7.4167, "y":4}, {"label":"G", "x":8.4167, "y":4}, {"label":"H", "x":9.4167, "y":4}, {"label":"J", "x":10.4167, "y":4}, {"label":"K", "x":11.4167, "y":4}, {"label":"L", "x":12.4167, "y":4}, {"label":":", "x":13.4167, "y":4}, {"label":"\"", "x":14.4167, "y":4}, {"label":"4", "x":21.6667, "y":4}, {"label":"5", "x":22.6667, "y":4}, {"label":"6", "x":23.6667, "y":4}, {"label":"=", "x":24.6667, "y":4}, + {"label":"F7", "x":0, "y":5}, {"label":"F8", "x":1, "y":5}, {"label":"Shift", "x":2.6667, "y":5, "w":2.25}, {"label":"Z", "x":4.9167, "y":5}, {"label":"X", "x":5.9167, "y":5}, {"label":"C", "x":6.9167, "y":5}, {"label":"V", "x":7.9167, "y":5}, {"label":"B", "x":8.9167, "y":5}, {"label":"N", "x":9.9167, "y":5}, {"label":"M", "x":10.9167, "y":5}, {"label":"<", "x":11.9167, "y":5}, {"label":">", "x":12.9167, "y":5}, {"label":"?", "x":13.9167, "y":5}, {"label":"Shift", "x":14.9167, "y":5, "w":1.75}, {"label":"|", "x":16.6667, "y":5}, {"label":"\u2191", "x":19.1667, "y":5}, {"label":"1", "x":21.6667, "y":5}, {"label":"2", "x":22.6667, "y":5}, {"label":"3", "x":23.6667, "y":5}, {"label":"Enter", "x":24.6667, "y":5, "h":2}, + {"label":"F9", "x":0, "y":6}, {"label":"F10", "x":1, "y":6}, {"label":"Ctrl", "x":2.6667, "y":6, "w":1.5}, {"label":"Win", "x":4.1667, "y":6}, {"label":"Alt", "x":5.1667, "y":6, "w":1.5}, {"x":6.6667, "y":6, "w":7}, {"label":"Alt Gr", "x":13.6667, "y":6, "w":1.5}, {"label":"~", "x":15.1667, "y":6}, {"label":"Ctrl", "x":16.1667, "y":6, "w":1.5}, {"label":"\u2190", "x":18.1667, "y":6}, {"label":"\u2193", "x":19.1667, "y":6}, {"label":"\u2192", "x":20.1667, "y":6}, {"label":"0", "x":21.6667, "y":6, "w":2}, {"label":".", "x":23.6667, "y":6}] }, "LAYOUT_102_rev3": { - "layout": [{"label":"F11", "x":0, "y":0}, {"label":"F12", "x":1, "y":0}, {"label":"Esc", "x":2.6667, "y":0}, {"label":"PrtSc", "x":18.1667, "y":0}, {"label":"Scroll Lock", "x":19.1667, "y":0}, {"label":"Pause", "x":20.1667, "y":0}, {"label":"F1", "x":0, "y":2}, {"label":"F2", "x":1, "y":2}, {"label":"~", "x":2.6667, "y":2}, {"label":"!", "x":3.6667, "y":2}, {"label":"@", "x":4.6667, "y":2}, {"label":"#", "x":5.6667, "y":2}, {"label":"$", "x":6.6667, "y":2}, {"label":"%", "x":7.6667, "y":2}, {"label":"^", "x":8.6667, "y":2}, {"label":"&", "x":9.6667, "y":2}, {"label":"*", "x":10.6667, "y":2}, {"label":"(", "x":11.6667, "y":2}, {"label":")", "x":12.6667, "y":2}, {"label":"_", "x":13.6667, "y":2}, {"label":"+", "x":14.6667, "y":2}, {"label":"Back Space", "x":15.6667, "y":2, "w":2}, {"label":"Insert", "x":18.1667, "y":2}, {"label":"Home", "x":19.1667, "y":2}, {"label":"PgUp", "x":20.1667, "y":2}, {"label":"Num Lock", "x":21.6667, "y":2}, {"label":"/", "x":22.6667, "y":2}, {"label":"*", "x":23.6667, "y":2}, {"label":"-", "x":24.6667, "y":2}, {"label":"F3", "x":0, "y":3}, {"label":"F4", "x":1, "y":3}, {"label":"Tab", "x":2.6667, "y":3, "w":1.5}, {"label":"Q", "x":4.1667, "y":3}, {"label":"W", "x":5.1667, "y":3}, {"label":"E", "x":6.1667, "y":3}, {"label":"R", "x":7.1667, "y":3}, {"label":"T", "x":8.1667, "y":3}, {"label":"Y", "x":9.1667, "y":3}, {"label":"U", "x":10.1667, "y":3}, {"label":"I", "x":11.1667, "y":3}, {"label":"O", "x":12.1667, "y":3}, {"label":"P", "x":13.1667, "y":3}, {"label":"{", "x":14.1667, "y":3}, {"label":"}", "x":15.1667, "y":3}, {"label":"Enter", "x":16.1667, "y":3, "w":1.5, "h":2}, {"label":"Delete", "x":18.1667, "y":3}, {"label":"End", "x":19.1667, "y":3}, {"label":"PgDn", "x":20.1667, "y":3}, {"label":"7", "x":21.6667, "y":3}, {"label":"8", "x":22.6667, "y":3}, {"label":"9", "x":23.6667, "y":3}, {"label":"+", "x":24.6667, "y":3}, {"label":"F5", "x":0, "y":4}, {"label":"F6", "x":1, "y":4}, {"label":"Caps Lock", "x":2.6667, "y":4, "w":1.75}, {"label":"A", "x":4.4167, "y":4}, {"label":"S", "x":5.4167, "y":4}, {"label":"D", "x":6.4167, "y":4}, {"label":"F", "x":7.4167, "y":4}, {"label":"G", "x":8.4167, "y":4}, {"label":"H", "x":9.4167, "y":4}, {"label":"J", "x":10.4167, "y":4}, {"label":"K", "x":11.4167, "y":4}, {"label":"L", "x":12.4167, "y":4}, {"label":":", "x":13.4167, "y":4}, {"label":"\"", "x":14.4167, "y":4}, {"label":"4", "x":21.6667, "y":4}, {"label":"5", "x":22.6667, "y":4}, {"label":"6", "x":23.6667, "y":4}, {"label":"=", "x":24.6667, "y":4}, {"label":"F7", "x":0, "y":5}, {"label":"F8", "x":1, "y":5}, {"label":"Shift", "x":2.6667, "y":5, "w":2.25}, {"label":"Z", "x":4.9167, "y":5}, {"label":"X", "x":5.9167, "y":5}, {"label":"C", "x":6.9167, "y":5}, {"label":"V", "x":7.9167, "y":5}, {"label":"B", "x":8.9167, "y":5}, {"label":"N", "x":9.9167, "y":5}, {"label":"M", "x":10.9167, "y":5}, {"label":"<", "x":11.9167, "y":5}, {"label":">", "x":12.9167, "y":5}, {"label":"?", "x":13.9167, "y":5}, {"label":"Shift", "x":14.9167, "y":5, "w":1.75}, {"label":"|", "x":16.6667, "y":5}, {"label":"\u2191", "x":19.1667, "y":5}, {"label":"1", "x":21.6667, "y":5}, {"label":"2", "x":22.6667, "y":5}, {"label":"3", "x":23.6667, "y":5}, {"label":"Enter", "x":24.6667, "y":5, "h":2}, {"label":"F9", "x":0, "y":6}, {"label":"F10", "x":1, "y":6}, {"label":"Ctrl", "x":2.6667, "y":6, "w":1.5}, {"label":"Win", "x":4.1667, "y":6}, {"label":"Alt", "x":5.1667, "y":6, "w":1.5}, {"x":6.6667, "y":6, "w":7}, {"label":"Alt Gr", "x":13.6667, "y":6, "w":1.5}, {"label":"*", "x":15.1667, "y":6}, {"label":"Ctrl", "x":16.1667, "y":6, "w":1.5}, {"label":"\u2190", "x":18.1667, "y":6}, {"label":"\u2193", "x":19.1667, "y":6}, {"label":"\u2192", "x":20.1667, "y":6}, {"label":"0", "x":21.6667, "y":6, "w":2}, {"label":".", "x":23.6667, "y":6}] - }, - "LAYOUT_ultra_t": { - "layout": [{"label":"P11", "x":0, "y":0}, {"label":"P12", "x":1, "y":0}, {"label":"Esc", "x":2.6667, "y":0}, {"label":"F1", "x":4.6667, "y":0}, {"label":"F2", "x":5.6667, "y":0}, {"label":"F3", "x":6.6667, "y":0}, {"label":"F4", "x":7.6667, "y":0}, {"label":"F5", "x":9.1667, "y":0}, {"label":"F6", "x":10.1667, "y":0}, {"label":"F7", "x":11.1667, "y":0}, {"label":"F8", "x":12.1667, "y":0}, {"label":"F9", "x":13.6667, "y":0}, {"label":"F10", "x":14.6667, "y":0}, {"label":"F11", "x":15.6667, "y":0}, {"label":"F12", "x":16.6667, "y":0}, {"label":"PrtSc", "x":18.1667, "y":0}, {"label":"Scroll Lock", "x":19.1667, "y":0}, {"label":"Pause", "x":20.1667, "y":0}, {"label":"P1", "x":0, "y":2}, {"label":"P2", "x":1, "y":2}, {"label":"~", "x":2.6667, "y":2}, {"label":"!", "x":3.6667, "y":2}, {"label":"@", "x":4.6667, "y":2}, {"label":"#", "x":5.6667, "y":2}, {"label":"$", "x":6.6667, "y":2}, {"label":"%", "x":7.6667, "y":2}, {"label":"^", "x":8.6667, "y":2}, {"label":"&", "x":9.6667, "y":2}, {"label":"*", "x":10.6667, "y":2}, {"label":"(", "x":11.6667, "y":2}, {"label":")", "x":12.6667, "y":2}, {"label":"_", "x":13.6667, "y":2}, {"label":"+", "x":14.6667, "y":2}, {"label":"Back Space", "x":15.6667, "y":2, "w":2}, {"label":"Insert", "x":18.1667, "y":2}, {"label":"Home", "x":19.1667, "y":2}, {"label":"PgUp", "x":20.1667, "y":2}, {"label":"Num Lock", "x":21.6667, "y":2}, {"label":"/", "x":22.6667, "y":2}, {"label":"*", "x":23.6667, "y":2}, {"label":"-", "x":24.6667, "y":2}, {"label":"P3", "x":0, "y":3}, {"label":"P4", "x":1, "y":3}, {"label":"Tab", "x":2.6667, "y":3, "w":1.5}, {"label":"Q", "x":4.1667, "y":3}, {"label":"W", "x":5.1667, "y":3}, {"label":"E", "x":6.1667, "y":3}, {"label":"R", "x":7.1667, "y":3}, {"label":"T", "x":8.1667, "y":3}, {"label":"Y", "x":9.1667, "y":3}, {"label":"U", "x":10.1667, "y":3}, {"label":"I", "x":11.1667, "y":3}, {"label":"O", "x":12.1667, "y":3}, {"label":"P", "x":13.1667, "y":3}, {"label":"{", "x":14.1667, "y":3}, {"label":"}", "x":15.1667, "y":3}, {"label":"Enter", "x":16.1667, "y":3, "w":1.5, "h":2}, {"label":"Delete", "x":18.1667, "y":3}, {"label":"End", "x":19.1667, "y":3}, {"label":"PgDn", "x":20.1667, "y":3}, {"label":"7", "x":21.6667, "y":3}, {"label":"8", "x":22.6667, "y":3}, {"label":"9", "x":23.6667, "y":3}, {"label":"+", "x":24.6667, "y":3}, {"label":"P5", "x":0, "y":4}, {"label":"P6", "x":1, "y":4}, {"label":"Caps Lock", "x":2.6667, "y":4, "w":1.75}, {"label":"A", "x":4.4167, "y":4}, {"label":"S", "x":5.4167, "y":4}, {"label":"D", "x":6.4167, "y":4}, {"label":"F", "x":7.4167, "y":4}, {"label":"G", "x":8.4167, "y":4}, {"label":"H", "x":9.4167, "y":4}, {"label":"J", "x":10.4167, "y":4}, {"label":"K", "x":11.4167, "y":4}, {"label":"L", "x":12.4167, "y":4}, {"label":":", "x":13.4167, "y":4}, {"label":"\"", "x":14.4167, "y":4}, {"label":"4", "x":21.6667, "y":4}, {"label":"5", "x":22.6667, "y":4}, {"label":"6", "x":23.6667, "y":4}, {"label":"=", "x":24.6667, "y":4}, {"label":"P7", "x":0, "y":5}, {"label":"P8", "x":1, "y":5}, {"label":"Shift", "x":2.6667, "y":5, "w":2.25}, {"label":"Z", "x":4.9167, "y":5}, {"label":"X", "x":5.9167, "y":5}, {"label":"C", "x":6.9167, "y":5}, {"label":"V", "x":7.9167, "y":5}, {"label":"B", "x":8.9167, "y":5}, {"label":"N", "x":9.9167, "y":5}, {"label":"M", "x":10.9167, "y":5}, {"label":"<", "x":11.9167, "y":5}, {"label":">", "x":12.9167, "y":5}, {"label":"?", "x":13.9167, "y":5}, {"label":"Shift", "x":14.9167, "y":5, "w":1.75}, {"label":"|", "x":16.6667, "y":5}, {"label":"\u2191", "x":19.1667, "y":5}, {"label":"1", "x":21.6667, "y":5}, {"label":"2", "x":22.6667, "y":5}, {"label":"3", "x":23.6667, "y":5}, {"label":"Enter", "x":24.6667, "y":5, "h":2}, {"label":"P9", "x":0, "y":6}, {"label":"P10", "x":1, "y":6}, {"label":"Ctrl", "x":2.6667, "y":6, "w":1.5}, {"label":"Win", "x":4.1667, "y":6}, {"label":"Alt", "x":5.1667, "y":6, "w":1.5}, {"x":6.6667, "y":6, "w":7}, {"label":"Alt Gr", "x":13.6667, "y":6, "w":1.5}, {"label":"Compose", "x":15.1667, "y":6}, {"label":"Ctrl", "x":16.1667, "y":6, "w":1.5}, {"label":"\u2190", "x":18.1667, "y":6}, {"label":"\u2193", "x":19.1667, "y":6}, {"label":"\u2192", "x":20.1667, "y":6}, {"label":"0", "x":21.6667, "y":6, "w":2}, {"label":".", "x":23.6667, "y":6}] + "layout": [ {"label":"F11", "x":0, "y":0}, {"label":"F12", "x":1, "y":0}, {"label":"Esc", "x":2.6667, "y":0}, {"label":"PrtSc", "x":18.1667, "y":0}, {"label":"Scroll Lock", "x":19.1667, "y":0}, {"label":"Pause", "x":20.1667, "y":0}, + {"label":"F1", "x":0, "y":2}, {"label":"F2", "x":1, "y":2}, {"label":"~", "x":2.6667, "y":2}, {"label":"!", "x":3.6667, "y":2}, {"label":"@", "x":4.6667, "y":2}, {"label":"#", "x":5.6667, "y":2}, {"label":"$", "x":6.6667, "y":2}, {"label":"%", "x":7.6667, "y":2}, {"label":"^", "x":8.6667, "y":2}, {"label":"&", "x":9.6667, "y":2}, {"label":"*", "x":10.6667, "y":2}, {"label":"(", "x":11.6667, "y":2}, {"label":")", "x":12.6667, "y":2}, {"label":"_", "x":13.6667, "y":2}, {"label":"+", "x":14.6667, "y":2}, {"label":"Back Space", "x":15.6667, "y":2, "w":2}, {"label":"Insert", "x":18.1667, "y":2}, {"label":"Home", "x":19.1667, "y":2}, {"label":"PgUp", "x":20.1667, "y":2}, {"label":"Num Lock", "x":21.6667, "y":2}, {"label":"/", "x":22.6667, "y":2}, {"label":"*", "x":23.6667, "y":2}, {"label":"-", "x":24.6667, "y":2}, + {"label":"F3", "x":0, "y":3}, {"label":"F4", "x":1, "y":3}, {"label":"Tab", "x":2.6667, "y":3, "w":1.5}, {"label":"Q", "x":4.1667, "y":3}, {"label":"W", "x":5.1667, "y":3}, {"label":"E", "x":6.1667, "y":3}, {"label":"R", "x":7.1667, "y":3}, {"label":"T", "x":8.1667, "y":3}, {"label":"Y", "x":9.1667, "y":3}, {"label":"U", "x":10.1667, "y":3}, {"label":"I", "x":11.1667, "y":3}, {"label":"O", "x":12.1667, "y":3}, {"label":"P", "x":13.1667, "y":3}, {"label":"{", "x":14.1667, "y":3}, {"label":"}", "x":15.1667, "y":3}, {"label":"Enter", "x":16.1667, "y":3, "w":1.5, "h":2}, {"label":"Delete", "x":18.1667, "y":3}, {"label":"End", "x":19.1667, "y":3}, {"label":"PgDn", "x":20.1667, "y":3}, {"label":"7", "x":21.6667, "y":3}, {"label":"8", "x":22.6667, "y":3}, {"label":"9", "x":23.6667, "y":3}, {"label":"+", "x":24.6667, "y":3}, + {"label":"F5", "x":0, "y":4}, {"label":"F6", "x":1, "y":4}, {"label":"Caps Lock", "x":2.6667, "y":4, "w":1.75}, {"label":"A", "x":4.4167, "y":4}, {"label":"S", "x":5.4167, "y":4}, {"label":"D", "x":6.4167, "y":4}, {"label":"F", "x":7.4167, "y":4}, {"label":"G", "x":8.4167, "y":4}, {"label":"H", "x":9.4167, "y":4}, {"label":"J", "x":10.4167, "y":4}, {"label":"K", "x":11.4167, "y":4}, {"label":"L", "x":12.4167, "y":4}, {"label":":", "x":13.4167, "y":4}, {"label":"\"", "x":14.4167, "y":4}, {"label":"4", "x":21.6667, "y":4}, {"label":"5", "x":22.6667, "y":4}, {"label":"6", "x":23.6667, "y":4}, {"label":"=", "x":24.6667, "y":4}, + {"label":"F7", "x":0, "y":5}, {"label":"F8", "x":1, "y":5}, {"label":"Shift", "x":2.6667, "y":5, "w":2.25}, {"label":"Z", "x":4.9167, "y":5}, {"label":"X", "x":5.9167, "y":5}, {"label":"C", "x":6.9167, "y":5}, {"label":"V", "x":7.9167, "y":5}, {"label":"B", "x":8.9167, "y":5}, {"label":"N", "x":9.9167, "y":5}, {"label":"M", "x":10.9167, "y":5}, {"label":"<", "x":11.9167, "y":5}, {"label":">", "x":12.9167, "y":5}, {"label":"?", "x":13.9167, "y":5}, {"label":"Shift", "x":14.9167, "y":5, "w":1.75}, {"label":"|", "x":16.6667, "y":5}, {"label":"\u2191", "x":19.1667, "y":5}, {"label":"1", "x":21.6667, "y":5}, {"label":"2", "x":22.6667, "y":5}, {"label":"3", "x":23.6667, "y":5}, {"label":"Enter", "x":24.6667, "y":5, "h":2}, + {"label":"F9", "x":0, "y":6}, {"label":"F10", "x":1, "y":6}, {"label":"Ctrl", "x":2.6667, "y":6, "w":1.5}, {"label":"Win", "x":4.1667, "y":6}, {"label":"Alt", "x":5.1667, "y":6, "w":1.5}, {"x":6.6667, "y":6, "w":7}, {"label":"Alt Gr", "x":13.6667, "y":6, "w":1.5}, {"label":"*", "x":15.1667, "y":6}, {"label":"Ctrl", "x":16.1667, "y":6, "w":1.5}, {"label":"\u2190", "x":18.1667, "y":6}, {"label":"\u2193", "x":19.1667, "y":6}, {"label":"\u2192", "x":20.1667, "y":6}, {"label":"0", "x":21.6667, "y":6, "w":2}, {"label":".", "x":23.6667, "y":6}] } + } } \ No newline at end of file diff --git a/keyboards/omnikeyish/omnikeyish.h b/keyboards/omnikeyish/omnikeyish.h index b961d7c7d..3c8192b87 100644 --- a/keyboards/omnikeyish/omnikeyish.h +++ b/keyboards/omnikeyish/omnikeyish.h @@ -34,14 +34,14 @@ enum keycodes { K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222, K223, \ K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316 K317, K318, K319, K320, K321, K322, K323, \ K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K416, K420, K421, K422, \ - K503, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516, K518, K520, K521, K522, K523, \ + K503, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K518, K520, K521, K522, K523, \ K603, K605, K610, K613, K616, K617, K618, K619, K620, K622 \ ) { \ { ____, ____, K103, ____ K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, ____, ____, ____, ____ }, \ { ____, ____, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222, K223 }, \ { ____, ____, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, K319, K320, K321, K322, K323 }, \ { ____, ____, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, ____, K416, ____, ____, ____, K420, K421, K422, ____ }, \ - { ____, ____, K503, ____, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516, ____, K518, ____, K520, K521, K522, K523 }, \ + { ____, ____, K503, ____, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, ____, ____, K518, ____, K520, K521, K522, K523 }, \ { ____, ____, K603, ____, K605, ____, ____, ____, ____, K610, ____, ____, K613, ____, ____, K616, K617, K618, K619, K620, ____, K622, ____ } \ } From f268993760cc805c95f236917251cc97ee94b2c1 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Thu, 4 Jul 2019 03:50:06 +0900 Subject: [PATCH 296/341] fix unselect_rows() in quantum/matrix.c (#6243) unselect_col() uses setPinInputHigh(), but unselect_cols() uses setPinInput(). This is not correct. unselect_cols() should also use setPinInputHigh(). --- quantum/matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/matrix.c b/quantum/matrix.c index e222a3097..7ccac3533 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -183,7 +183,7 @@ static void unselect_row(uint8_t row) static void unselect_rows(void) { for(uint8_t x = 0; x < MATRIX_ROWS; x++) { - setPinInput(row_pins[x]); + setPinInputHigh(row_pins[x]); } } From 8fb10edf97eb55b831b8ef326e075fb2c0e41e67 Mon Sep 17 00:00:00 2001 From: francislan Date: Wed, 3 Jul 2019 13:10:53 -0700 Subject: [PATCH 297/341] [Keyboard] Fix Minivan K32 and K34 inversion (#6221) --- keyboards/thevankeyboards/minivan/minivan.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/thevankeyboards/minivan/minivan.h b/keyboards/thevankeyboards/minivan/minivan.h index 27a358365..eb9aa6793 100644 --- a/keyboards/thevankeyboards/minivan/minivan.h +++ b/keyboards/thevankeyboards/minivan/minivan.h @@ -42,7 +42,7 @@ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ - K30, K31, K34, K32, K33, K37, K38, K39, K3B \ + K30, K31, K32, K34, K33, K37, K38, K39, K3B \ ) \ { \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ @@ -55,7 +55,7 @@ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ - K30, K31, K34, K32, K33, K37, K38, K39, K3A, K3B \ + K30, K31, K32, K34, K33, K37, K38, K39, K3A, K3B \ ) \ { \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ From bbd3e0533587c623bd9dd6e6db3b151faa55fda3 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 5 Jul 2019 02:05:21 +1000 Subject: [PATCH 298/341] [Keyboard] update Wasdat custom matrix (#6247) * Fix unselect_rows() for Wasdat custom matrix * Add fix for matrix_scan() return too (#5984) --- keyboards/wasdat/matrix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/wasdat/matrix.c b/keyboards/wasdat/matrix.c index b481e5394..04d221971 100644 --- a/keyboards/wasdat/matrix.c +++ b/keyboards/wasdat/matrix.c @@ -183,7 +183,7 @@ static void unselect_row(uint8_t row) static void unselect_rows(void) { for(uint8_t x = 0; x < MATRIX_ROWS; x++) { - setPinInput(row_pins[x]); + setPinInputHigh(row_pins[x]); } } @@ -480,5 +480,5 @@ uint8_t matrix_scan(void) debounce(raw_matrix, matrix, MATRIX_ROWS, changed); matrix_scan_quantum(); - return 1; + return (uint8_t)changed; } From 9eb48deb44e72036699ffa83a69ba66fd7a8f8c0 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 4 Jul 2019 11:59:02 -0700 Subject: [PATCH 299/341] Move ISO Enter to its proper place in LAYOUT_60_iso (#6240) --- keyboards/gh60/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/gh60/info.json b/keyboards/gh60/info.json index f906b78e6..e2a774645 100644 --- a/keyboards/gh60/info.json +++ b/keyboards/gh60/info.json @@ -247,7 +247,6 @@ {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, - {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, @@ -261,6 +260,7 @@ {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, From 78b9922fc427aabe5e0b2f3376982d43be878935 Mon Sep 17 00:00:00 2001 From: Kenny Hung Date: Fri, 5 Jul 2019 12:52:54 +0100 Subject: [PATCH 300/341] Fix linux_install.sh script for OpenSuse v 15.1 (#6251) --- util/linux_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/linux_install.sh b/util/linux_install.sh index efb2ee774..a1ee79205 100755 --- a/util/linux_install.sh +++ b/util/linux_install.sh @@ -118,7 +118,7 @@ elif grep ID /etc/os-release | grep -q sabayon; then elif grep ID /etc/os-release | grep -qE "opensuse|tumbleweed"; then CROSS_AVR_GCC=cross-avr-gcc8 CROSS_ARM_GCC=cross-arm-none-gcc8 - if grep ID /etc/os-release | grep -q "15.0"; then + if grep ID /etc/os-release | grep -q "15."; then CROSS_AVR_GCC=cross-avr-gcc7 CROSS_ARM_GCC=cross-arm-none-gcc7 fi From cbf76a129007d14f69fca761144c6b5fd377b150 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Fri, 5 Jul 2019 04:54:59 -0700 Subject: [PATCH 301/341] [Keyboard] Add TGR x SINGA Unikorn 60 (#6249) * initial commit, copied from singa * default 60_ansi LAYOUT implemented and tested workin * add rgb underglow support bounded by ifdefs * edit readme to provide information on reset procedure and on rgb underglow support * improve the default keymap to have a second layer with function keys and even a RESET * Add LAYOUT_all macro and discovered that split backspace uses an additional pin on the microcontroller * fix up last line in readme * Add QMK Configurator support --- keyboards/unikorn/config.h | 43 +++ keyboards/unikorn/info.json | 16 + keyboards/unikorn/keymaps/default/config.h | 19 + keyboards/unikorn/keymaps/default/keymap.c | 36 ++ keyboards/unikorn/keymaps/default/readme.md | 1 + keyboards/unikorn/keymaps/default/rules.mk | 0 keyboards/unikorn/readme.md | 57 +++ keyboards/unikorn/rules.mk | 48 +++ keyboards/unikorn/unikorn.c | 89 +++++ keyboards/unikorn/unikorn.h | 52 +++ keyboards/unikorn/usbconfig.h | 393 ++++++++++++++++++++ 11 files changed, 754 insertions(+) create mode 100644 keyboards/unikorn/config.h create mode 100644 keyboards/unikorn/info.json create mode 100644 keyboards/unikorn/keymaps/default/config.h create mode 100644 keyboards/unikorn/keymaps/default/keymap.c create mode 100644 keyboards/unikorn/keymaps/default/readme.md create mode 100644 keyboards/unikorn/keymaps/default/rules.mk create mode 100644 keyboards/unikorn/readme.md create mode 100644 keyboards/unikorn/rules.mk create mode 100644 keyboards/unikorn/unikorn.c create mode 100644 keyboards/unikorn/unikorn.h create mode 100644 keyboards/unikorn/usbconfig.h diff --git a/keyboards/unikorn/config.h b/keyboards/unikorn/config.h new file mode 100644 index 000000000..161956b88 --- /dev/null +++ b/keyboards/unikorn/config.h @@ -0,0 +1,43 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 . +*/ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +#define MANUFACTURER Singa and TGR +#define PRODUCT Unikorn 60 + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +// 0 1 2 3 4 5 6 7 8 9 A B C D E +#define MATRIX_ROW_PINS { B1, B2, B3, B4, B5 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCE 5 + +#define NO_BACKLIGHT_CLOCK +#define BACKLIGHT_LEVELS 1 +#ifdef RGBLIGHT_ENABLE +#define RGBLED_NUM 17 +#define RGBLIGHT_ANIMATIONS +#endif diff --git a/keyboards/unikorn/info.json b/keyboards/unikorn/info.json new file mode 100644 index 000000000..9c82e25b4 --- /dev/null +++ b/keyboards/unikorn/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "Unikorn 60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2}, {"x":13.75, "y":2, "w":1.25}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_ansi": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":2.75}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/unikorn/keymaps/default/config.h b/keyboards/unikorn/keymaps/default/config.h new file mode 100644 index 000000000..93b81b57b --- /dev/null +++ b/keyboards/unikorn/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 amnesia0287 + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/unikorn/keymaps/default/keymap.c b/keyboards/unikorn/keymaps/default/keymap.c new file mode 100644 index 000000000..d19d83c8a --- /dev/null +++ b/keyboards/unikorn/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_60_ansi( + KC_GRV, KC_Q, 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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL + ), + + [1] = LAYOUT_60_ansi( + KC_TRNS, 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, + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/unikorn/keymaps/default/readme.md b/keyboards/unikorn/keymaps/default/readme.md new file mode 100644 index 000000000..1f19a96b4 --- /dev/null +++ b/keyboards/unikorn/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for singa \ No newline at end of file diff --git a/keyboards/unikorn/keymaps/default/rules.mk b/keyboards/unikorn/keymaps/default/rules.mk new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/unikorn/readme.md b/keyboards/unikorn/readme.md new file mode 100644 index 000000000..953d5be79 --- /dev/null +++ b/keyboards/unikorn/readme.md @@ -0,0 +1,57 @@ +# Unikorn 60 + +60% PCB made for the TGR x SINGA Unikorn60. + + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Unikorn 60 PCB +Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=98350.0) + + +Make example for this keyboard (after setting up your build environment): + + make unikorn:default + +This PCB can support RGB underglow. There are pads on the bottom of the PCB for the LED controller chip and for 17 RGB underglow LEDs. The Unikorn 60 case does not have acrylic pieces to properly display underglow effects. + +To enable RGB lighting support, install the necessary components and set RGBLIGHT features in `rules.mk` like so: + +``` +RGBLIGHT_ENABLE = yes +RGBLIGHT_CUSTOM_DRIVER = yes +``` + + +Flashing + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +**Reset Key:** Short the two holes labeled `FW_JP` beside the Tab key. At this time there is no reset key to press. + +Windows: +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset. +3. Press the `Find Device` button and ensure that your keyboard is found. +4. Press the `Open .hex File` button and locate the `.hex` file you created. +5. Press the `Flash Device` button and wait for the process to complete. + +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python3 + pip3 install pyusb + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + +4. Place your keyboard into reset. +5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. + + +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). diff --git a/keyboards/unikorn/rules.mk b/keyboards/unikorn/rules.mk new file mode 100644 index 000000000..7d6fa14e1 --- /dev/null +++ b/keyboards/unikorn/rules.mk @@ -0,0 +1,48 @@ +# Copyright 2017 Luiz Ribeiro +# +# 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 . + +# MCU name +MCU = atmega32a +PROTOCOL = VUSB + +# unsupported features for now +NO_UART = yes +NO_SUSPEND_POWER_DOWN = yes + +# processor frequency +F_CPU = 12000000 + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = no +RGBLIGHT_CUSTOM_DRIVER = no + +OPT_DEFS = -DDEBUG_LEVEL=0 + +SRC = i2c_master.c + +# programming options +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/unikorn/unikorn.c b/keyboards/unikorn/unikorn.c new file mode 100644 index 000000000..1bd47ef9e --- /dev/null +++ b/keyboards/unikorn/unikorn.c @@ -0,0 +1,89 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ + +#include "i2c_master.h" +#include "quantum.h" + +#ifdef RGBLIGHT_ENABLE +#include "rgblight.h" +extern rgblight_config_t rgblight_config; + +void rgblight_set(void) { + if (!rgblight_config.enable) { + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; + } + } + + i2c_init(); + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); +} +#endif + +void matrix_init_kb(void) { +#ifdef RGBLIGHT_ENABLE + if (rgblight_config.enable) { + i2c_init(); + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); + } +#endif + // call user level keymaps, if any + matrix_init_user(); +} + +void matrix_scan_kb(void) { +#ifdef RGBLIGHT_ENABLE + rgblight_task(); +#endif + matrix_scan_user(); + /* Nothing else for now. */ +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +void backlight_init_ports(void) { + // initialize pins D0, D1, D4 and D6 as output + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + // turn backlight LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); +} + +void backlight_set(uint8_t level) { + if (level == 0) { + // turn backlight LEDs off + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); + } else { + // turn backlight LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); + } +} diff --git a/keyboards/unikorn/unikorn.h b/keyboards/unikorn/unikorn.h new file mode 100644 index 000000000..6824492e0 --- /dev/null +++ b/keyboards/unikorn/unikorn.h @@ -0,0 +1,52 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +// 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_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k40, k41, k42, k44, k45, k47, k48, k49, k4B, k4D \ +){ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, KC_NO }, \ + { k40, k41, k42, KC_NO, k44, k45, KC_NO, k47, k48, k49, KC_NO, k4B, KC_NO, k4D, KC_NO }, \ +} + + +#define LAYOUT_60_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, \ + k40, k41, k42, k45, k48, k49, k4B, k4D \ +){ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D, KC_NO }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, KC_NO, KC_NO }, \ + { k40, k41, k42, KC_NO, KC_NO, k45, KC_NO, KC_NO, k48, k49, KC_NO, k4B, KC_NO, k4D, KC_NO }, \ +} + diff --git a/keyboards/unikorn/usbconfig.h b/keyboards/unikorn/usbconfig.h new file mode 100644 index 000000000..41ce167a8 --- /dev/null +++ b/keyboards/unikorn/usbconfig.h @@ -0,0 +1,393 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#pragma once + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_MAX_BUS_POWER 500 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 's', 'i', 'n', 'g', 'a', 't', 'g', 'r' +#define USB_CFG_VENDOR_NAME_LEN 8 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'u', 'n', 'i', 'k', 'o', 'r', 'n' +#define USB_CFG_DEVICE_NAME_LEN 7 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect From 509a34fbabeb57d57c35ddfd0243ebee3f0618a8 Mon Sep 17 00:00:00 2001 From: Gam3cat <31171909+Gam3cat@users.noreply.github.com> Date: Fri, 5 Jul 2019 04:56:57 -0700 Subject: [PATCH 302/341] [Keymap] Fixing keymap DYNAMIC_MACRO_RANGE keycode enumeration (#6248) --- keyboards/gonnerd/keymaps/gam3cat/keymap.c | 6 +++--- keyboards/gonnerd/keymaps/gam3cat/rules.mk | 1 - keyboards/hineybush/h87a/keymaps/gam3cat/keymap.c | 10 +++++----- keyboards/jc65/v32u4/keymaps/gam3cat/keymap.c | 8 ++++---- keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk | 1 - keyboards/m10a/keymaps/gam3cat/keymap.c | 6 +++--- keyboards/m10a/keymaps/gam3cat/rules.mk | 1 - 7 files changed, 15 insertions(+), 18 deletions(-) diff --git a/keyboards/gonnerd/keymaps/gam3cat/keymap.c b/keyboards/gonnerd/keymaps/gam3cat/keymap.c index f01dd920e..3142209d6 100644 --- a/keyboards/gonnerd/keymaps/gam3cat/keymap.c +++ b/keyboards/gonnerd/keymaps/gam3cat/keymap.c @@ -12,10 +12,10 @@ enum layers { }; enum custom_keycodes { - DYNAMIC_MACRO_RANGE = SAFE_RANGE, - QMK_REV, + QMK_REV = SAFE_RANGE, KC_WEB, - KC_SP4 + KC_SP4, + DYNAMIC_MACRO_RANGE }; extern backlight_config_t backlight_config; diff --git a/keyboards/gonnerd/keymaps/gam3cat/rules.mk b/keyboards/gonnerd/keymaps/gam3cat/rules.mk index 55e681efb..6eab033cc 100644 --- a/keyboards/gonnerd/keymaps/gam3cat/rules.mk +++ b/keyboards/gonnerd/keymaps/gam3cat/rules.mk @@ -22,4 +22,3 @@ FAUXCLICKY_ENABLE = no # Uses buzzer to emulate clicky switches. By defaul API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390) KEY_LOCK_ENABLE = no # This enables key lock(+260) SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common - diff --git a/keyboards/hineybush/h87a/keymaps/gam3cat/keymap.c b/keyboards/hineybush/h87a/keymaps/gam3cat/keymap.c index 2a4e5ca41..fde263715 100644 --- a/keyboards/hineybush/h87a/keymaps/gam3cat/keymap.c +++ b/keyboards/hineybush/h87a/keymaps/gam3cat/keymap.c @@ -12,10 +12,10 @@ enum layers { }; enum custom_keycodes { - DYNAMIC_MACRO_RANGE = SAFE_RANGE, - QMK_REV, + QMK_REV = SAFE_RANGE, KC_WEB, - KC_SP4 + KC_SP4, + DYNAMIC_MACRO_RANGE }; extern backlight_config_t backlight_config; @@ -259,11 +259,11 @@ uint32_t layer_state_set_user(uint32_t state) { break; case _FL: custom_backlight_level(2); - rgblight_sethsv_noeeprom(280,255,255); + rgblight_sethsv_noeeprom(240,255,255); break; case _AL: custom_backlight_level(3); - rgblight_sethsv_noeeprom(350,255,255); + rgblight_sethsv_noeeprom(255,255,255); break; default: custom_backlight_level(0); diff --git a/keyboards/jc65/v32u4/keymaps/gam3cat/keymap.c b/keyboards/jc65/v32u4/keymaps/gam3cat/keymap.c index aa5709a37..2b13f63ed 100644 --- a/keyboards/jc65/v32u4/keymaps/gam3cat/keymap.c +++ b/keyboards/jc65/v32u4/keymaps/gam3cat/keymap.c @@ -12,10 +12,10 @@ enum layers { }; enum custom_keycodes { - DYNAMIC_MACRO_RANGE = SAFE_RANGE, - QMK_REV, + QMK_REV = SAFE_RANGE, KC_WEB, - KC_SP4 + KC_SP4, + DYNAMIC_MACRO_RANGE }; extern backlight_config_t backlight_config; @@ -251,7 +251,7 @@ uint32_t layer_state_set_user(uint32_t state) { break; case _AL: custom_backlight_level(3); - rgblight_sethsv_noeeprom(350,255,255); + rgblight_sethsv_noeeprom(250,255,255); break; default: custom_backlight_level(0); diff --git a/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk b/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk index 4086c15d4..85b2b41a6 100644 --- a/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk +++ b/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk @@ -22,4 +22,3 @@ FAUXCLICKY_ENABLE = no # Uses buzzer to emulate clicky switches. By defaul API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390) KEY_LOCK_ENABLE = no # This enables key lock(+260) SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common - diff --git a/keyboards/m10a/keymaps/gam3cat/keymap.c b/keyboards/m10a/keymaps/gam3cat/keymap.c index 8ee35d50a..2d79007fe 100644 --- a/keyboards/m10a/keymaps/gam3cat/keymap.c +++ b/keyboards/m10a/keymaps/gam3cat/keymap.c @@ -17,10 +17,10 @@ enum layers { }; enum custom_keycodes { - DYNAMIC_MACRO_RANGE = SAFE_RANGE, - QMK_REV, + QMK_REV = SAFE_RANGE, KC_WEB, - KC_WCLS + KC_WCLS, + DYNAMIC_MACRO_RANGE }; extern backlight_config_t backlight_config; diff --git a/keyboards/m10a/keymaps/gam3cat/rules.mk b/keyboards/m10a/keymaps/gam3cat/rules.mk index b09c2904f..00515a31e 100644 --- a/keyboards/m10a/keymaps/gam3cat/rules.mk +++ b/keyboards/m10a/keymaps/gam3cat/rules.mk @@ -22,4 +22,3 @@ FAUXCLICKY_ENABLE = no # Uses buzzer to emulate clicky switches. By defaul API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390) KEY_LOCK_ENABLE = no # This enables key lock(+260) SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common - From da86484027f6f5deb33799a67a5053bdaa330f51 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Thu, 4 Jul 2019 21:36:50 -0700 Subject: [PATCH 303/341] Add makeful rules to .editorconfig OMFG, why is it not set to tabs?? --- .editorconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.editorconfig b/.editorconfig index c8cb35b86..26e3a39cf 100644 --- a/.editorconfig +++ b/.editorconfig @@ -19,9 +19,11 @@ indent_size = 4 # Make these match what we have in .gitattributes [*.mk] end_of_line = lf +indent_style = tab [Makefile] end_of_line = lf +indent_style = tab [*.sh] end_of_line = lf From 853f5231d35d79aafd767a049a77a0ffd28a1c56 Mon Sep 17 00:00:00 2001 From: Michel Gotta Date: Sat, 6 Jul 2019 08:20:17 +0200 Subject: [PATCH 304/341] [Keymap] Adding new Gherkin keymap and configuration with RGB strip (#6252) --- .../40percentclub/gherkin/keymaps/michel/config.h | 13 +++++++++++++ .../40percentclub/gherkin/keymaps/michel/keymap.c | 8 ++++++++ .../40percentclub/gherkin/keymaps/michel/rules.mk | 3 +++ 3 files changed, 24 insertions(+) create mode 100644 keyboards/40percentclub/gherkin/keymaps/michel/config.h create mode 100644 keyboards/40percentclub/gherkin/keymaps/michel/keymap.c create mode 100644 keyboards/40percentclub/gherkin/keymaps/michel/rules.mk diff --git a/keyboards/40percentclub/gherkin/keymaps/michel/config.h b/keyboards/40percentclub/gherkin/keymaps/michel/config.h new file mode 100644 index 000000000..8696437a4 --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/michel/config.h @@ -0,0 +1,13 @@ +#pragma once + +#undef RGB_DI_PIN +#undef RGBLED_NUM +#define RGB_DI_PIN D3 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 10 + +/* Make layout upside down = USB port on left side */ +#undef MATRIX_ROW_PINS +#undef MATRIX_COL_PINS +#define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 } +#define MATRIX_COL_PINS { D0, D4, C6, D7, E6, B4 } diff --git a/keyboards/40percentclub/gherkin/keymaps/michel/keymap.c b/keyboards/40percentclub/gherkin/keymaps/michel/keymap.c new file mode 100644 index 000000000..dc2c13339 --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/michel/keymap.c @@ -0,0 +1,8 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_3x10(KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(1, KC_ENT), LSFT_T(KC_Z), LALT_T(KC_X), LGUI_T(KC_C), KC_V, KC_BSPC, KC_SPC, RGUI_T(KC_B), LT(3, KC_N), LT(2, KC_M), KC_RSFT), + [1] = LAYOUT_ortho_3x10(KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT), + [2] = LAYOUT_ortho_3x10(KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LBRC, KC_NO, KC_SCLN, KC_NO, KC_QUOT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_RSFT), + [3] = LAYOUT_ortho_3x10(KC_TAB, KC_UP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO) +}; diff --git a/keyboards/40percentclub/gherkin/keymaps/michel/rules.mk b/keyboards/40percentclub/gherkin/keymaps/michel/rules.mk new file mode 100644 index 000000000..77b529c0e --- /dev/null +++ b/keyboards/40percentclub/gherkin/keymaps/michel/rules.mk @@ -0,0 +1,3 @@ +BACKLIGHT_ENABLE = no +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes From 44f3c614c25048942c527e38a41ee4800e20f1fd Mon Sep 17 00:00:00 2001 From: Sid Carter Date: Sat, 6 Jul 2019 23:53:56 -0400 Subject: [PATCH 305/341] My personal keymap for the Iris Rev3 (#6271) * updates to my iris keymap * some rational updates to the keymap - let's see how this works * updates to my iris keymap * some rational updates to the keymap - let's see how this works * add mouse keys and remove unused keys and some cleanup * a little bit more cleanup * actually enable mousekeys * fix markdown lint complaints * fix capitalization * changes made per suggestions --- keyboards/keebio/iris/keymaps/osiris/config.h | 33 +++++ keyboards/keebio/iris/keymaps/osiris/keymap.c | 116 ++++++++++++++++++ .../keebio/iris/keymaps/osiris/readme.md | 9 ++ keyboards/keebio/iris/keymaps/osiris/rules.mk | 3 + 4 files changed, 161 insertions(+) create mode 100644 keyboards/keebio/iris/keymaps/osiris/config.h create mode 100644 keyboards/keebio/iris/keymaps/osiris/keymap.c create mode 100644 keyboards/keebio/iris/keymaps/osiris/readme.md create mode 100644 keyboards/keebio/iris/keymaps/osiris/rules.mk diff --git a/keyboards/keebio/iris/keymaps/osiris/config.h b/keyboards/keebio/iris/keymaps/osiris/config.h new file mode 100644 index 000000000..45d92578c --- /dev/null +++ b/keyboards/keebio/iris/keymaps/osiris/config.h @@ -0,0 +1,33 @@ +/* +Copyright 2019 Khader Syed + +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 . +*/ + +#pragma once + +#define USE_I2C +#define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +// #undef PERMISSIVE_HOLD +//#define TAPPING_FORCE_HOLD +//#define RETRO_TAPPING +#define PERMISSIVE_HOLD \ No newline at end of file diff --git a/keyboards/keebio/iris/keymaps/osiris/keymap.c b/keyboards/keebio/iris/keymaps/osiris/keymap.c new file mode 100644 index 000000000..630cd4ab8 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/osiris/keymap.c @@ -0,0 +1,116 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +enum custom_keycodes { + LOWER = SAFE_RANGE, + RAISE, +}; + +#define KC_ KC_TRNS + +#define KC_LOWR LOWER +#define KC_RASE RAISE +#define KC_RST RESET +#define KC_BL_S BL_STEP + +// left control as a left key too - makes perfect sense +#define KC_LECL LCTL_T(KC_LEFT) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + GESC, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + TAB , Q , W , E , R , T , Y , U , I , O , P ,BSLS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LCTL, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + LSFT, Z , X , C , V , B ,LBRC, RBRC, N , M ,COMM,DOT ,SLSH,RSFT, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + LGUI,LOWR,ENT , SPC ,RASE,RALT + // `----+----+----' `----+----+----' + ), + + [_LOWER] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,DEL , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , UP , , , , , ,BTN1, , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,LEFT,DOWN,RGHT, , , MS_L,MS_D,MS_U,MS_R, , , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + , , , , , , , , , , , , , , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , , , , , + // `----+----+----' `----+----+----' + +), + [_RAISE] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , ,VOLU, , ,LBRC, RBRC,UNDS,PLUS, , ,MUTE, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,MPLY,VOLD,MNXT, ,LPRN, RPRN,MINS,EQL , , , , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + , , , , , , , , , , , , , , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , , , , , + // `----+----+----' `----+----+----' + ), + + [_ADJUST] = LAYOUT( + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RESET , DEBUG , RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------| + BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------' + _______, _______, _______, _______, _______, _______ + // `--------+--------+--------' `--------+--------+--------' + ) + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/keebio/iris/keymaps/osiris/readme.md b/keyboards/keebio/iris/keymaps/osiris/readme.md new file mode 100644 index 000000000..2eb75b066 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/osiris/readme.md @@ -0,0 +1,9 @@ +# My Iris Layout + +![My Iris Rev3](https://i.imgur.com/7oXacel.jpg) + +- mouse keys enabled +- WASD as arrow keys, and same ones for media +- keys that I need, while removing keys that I don't + +See keymap.c for layouts diff --git a/keyboards/keebio/iris/keymaps/osiris/rules.mk b/keyboards/keebio/iris/keymaps/osiris/rules.mk new file mode 100644 index 000000000..45c570a3b --- /dev/null +++ b/keyboards/keebio/iris/keymaps/osiris/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes +MOUSEKEY_ENABLE = yes From dd1790c1b3a840ba541751e605106236816ba877 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sun, 7 Jul 2019 13:55:25 +1000 Subject: [PATCH 306/341] Noxary 268.2 update (#6254) * Fix Noxary 268.2 layout macros & info.json * Update Noxary 268.2 to current QMK code style --- keyboards/noxary/268_2/268_2.c | 42 +-- keyboards/noxary/268_2/268_2.h | 65 +++- keyboards/noxary/268_2/config.h | 53 +++- keyboards/noxary/268_2/info.json | 287 +++++++++++++++++- .../noxary/268_2/keymaps/default/keymap.c | 103 +++---- keyboards/noxary/268_2/readme.md | 7 +- keyboards/noxary/268_2/rules.mk | 10 - 7 files changed, 428 insertions(+), 139 deletions(-) diff --git a/keyboards/noxary/268_2/268_2.c b/keyboards/noxary/268_2/268_2.c index da4e5efb7..9e2d82236 100644 --- a/keyboards/noxary/268_2/268_2.c +++ b/keyboards/noxary/268_2/268_2.c @@ -15,40 +15,14 @@ */ #include "268_2.h" -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - led_set_user(usb_led); -} - -__attribute__((weak)) -void led_set_user(uint8_t usb_led) { - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 0); PORTB |= (1 << 0); - } - else { - DDRB &= ~(1 << 0); PORTB &= ~(1 << 0); + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + setPinOutput(B0); + writePinHigh(B0); + } else { + setPinInput(B0); + writePinLow(B0); } + + led_set_user(usb_led); } diff --git a/keyboards/noxary/268_2/268_2.h b/keyboards/noxary/268_2/268_2.h index 2f5d985a3..71fd84417 100644 --- a/keyboards/noxary/268_2/268_2.h +++ b/keyboards/noxary/268_2/268_2.h @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef N268_2_H -#define N268_2_H +#pragma once #include "quantum.h" @@ -27,17 +26,57 @@ * represents the switch matrix. */ #define LAYOUT( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K214, K215, \ - K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, K315, \ - K400, K401, K402, K406, K409, K410, K412, K414, K415 \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, K315, \ + K400, K401, K402, K406, K409, K410, K412, K414, K415 \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115, }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, KC_NO, K214, K215, }, \ - { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, K314, K315, }, \ - { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, K409, K410, KC_NO, K412, KC_NO, K414, K415, } \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, KC_NO, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, K314, K315 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, K409, K410, KC_NO, K412, KC_NO, K414, K415 } \ } -#endif +#define LAYOUT_split_bs( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, K315, \ + K400, K401, K402, K406, K409, K410, K412, K414, K415 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, KC_NO, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, K314, K315 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, K409, K410, KC_NO, K412, KC_NO, K414, K415 } \ +} + +#define LAYOUT_7u_space( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, K315, \ + K400, K401, K402, K406, K410, K412, K414, K415 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, KC_NO, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, K314, K315 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, KC_NO, K412, KC_NO, K414, K415 } \ +} + +#define LAYOUT_7u_space_split_bs( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, K315, \ + K400, K401, K402, K406, K410, K412, K414, K415 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, KC_NO, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, K314, K315 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, KC_NO, K412, KC_NO, K414, K415 } \ +} diff --git a/keyboards/noxary/268_2/config.h b/keyboards/noxary/268_2/config.h index 547c729f9..fbfb97f02 100644 --- a/keyboards/noxary/268_2/config.h +++ b/keyboards/noxary/268_2/config.h @@ -41,7 +41,6 @@ along with this program. If not, see . * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * */ -/* key matrix pins */ #define MATRIX_ROW_PINS { F7, F6, F5, F0, B5 } #define MATRIX_COL_PINS { C6, B6, C7, F4, E6, D0, D7, D1, D2, B4, D6, D4, D5, F1, D3, B1 } #define UNUSED_PINS @@ -49,11 +48,42 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -/* number of backlight levels */ +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + #define BACKLIGHT_PIN B7 -#ifdef BACKLIGHT_PIN +//define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 -#endif + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 @@ -106,6 +136,10 @@ along with this program. If not, see . * */ +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true @@ -115,8 +149,8 @@ along with this program. If not, see . //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP1 H -//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH //#define MAGIC_KEY_DEBUG D //#define MAGIC_KEY_DEBUG_MATRIX X //#define MAGIC_KEY_DEBUG_KBD K @@ -124,9 +158,8 @@ along with this program. If not, see . //#define MAGIC_KEY_VERSION V //#define MAGIC_KEY_STATUS S //#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE //#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE //#define MAGIC_KEY_LAYER1 1 //#define MAGIC_KEY_LAYER2 2 //#define MAGIC_KEY_LAYER3 3 @@ -136,9 +169,11 @@ along with this program. If not, see . //#define MAGIC_KEY_LAYER7 7 //#define MAGIC_KEY_LAYER8 8 //#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC //#define MAGIC_KEY_LOCK CAPS //#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE //#define MAGIC_KEY_NKRO N //#define MAGIC_KEY_SLEEP_LED Z diff --git a/keyboards/noxary/268_2/info.json b/keyboards/noxary/268_2/info.json index 8d227afd8..b47e2de98 100644 --- a/keyboards/noxary/268_2/info.json +++ b/keyboards/noxary/268_2/info.json @@ -5,8 +5,289 @@ "width": 16, "height": 5, "layouts": { - "LAYOUT": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] - } + "LAYOUT": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + {"x":15, "y":0}, + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + {"x":15, "y":1}, + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + {"x":15, "y":2}, + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "y":3}, + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + }, + "LAYOUT_split_bs": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + {"x":15, "y":0}, + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + {"x":15, "y":1}, + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + {"x":15, "y":2}, + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "y":3}, + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + }, + "LAYOUT_7u_space": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + {"x":15, "y":0}, + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + {"x":15, "y":1}, + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + {"x":15, "y":2}, + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "y":3}, + {"x":0, "y":4, "w":1.5}, + {"x":1.5, "y":4}, + {"x":2.5, "y":4, "w":1.5}, + {"x":4, "y":4, "w":7}, + {"x":11, "y":4, "w":1.5}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + }, + "LAYOUT_7u_space_split_bs": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + {"x":15, "y":0}, + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + {"x":15, "y":1}, + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + {"x":15, "y":2}, + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "y":3}, + {"x":0, "y":4, "w":1.5}, + {"x":1.5, "y":4}, + {"x":2.5, "y":4, "w":1.5}, + {"x":4, "y":4, "w":7}, + {"x":11, "y":4, "w":1.5}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + } } } diff --git a/keyboards/noxary/268_2/keymaps/default/keymap.c b/keyboards/noxary/268_2/keymaps/default/keymap.c index 994fe36b0..c22ec2b1d 100644 --- a/keyboards/noxary/268_2/keymaps/default/keymap.c +++ b/keyboards/noxary/268_2/keymaps/default/keymap.c @@ -4,80 +4,51 @@ // 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 _FL1 1 -#define _FL2 2 +enum layer_names { + _BL, + _FL +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* _BL: Base Layer(Default) - For ISO enter use ANSI enter - * ,----------------------------------------------------------------. - * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \|BSpc| Grv| - * |----------------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | Del| - * |----------------------------------------------------------------| - * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| Ent|PgUp| - * |----------------------------------------------------------------| - * |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn| - * |----------------------------------------------------------------| - * |Ctrl|Win |Alt | Space |Alt|Mo(1)|Ctrl|Lef|Dow|Rght| - * `----------------------------------------------------------------' + /* Base Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bspc │ ` │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │Shift │ ↑ │PgD│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │Ctrl│Win │Alt │ Space │Alt │ Fn │ │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ */ [_BL] = LAYOUT( - KC_ESC, 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_BSLS, KC_BSPC, KC_GRV, + KC_ESC, 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_GRV, 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_DEL, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, 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_UP, KC_PGDN, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL1), KC_LEFT, KC_DOWN, KC_RGHT), - /* _FL1: Function Layer 1 - For ISO enter use ANSI enter - * ,----------------------------------------------------------------. - * | `|F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |PScr| | - * |----------------------------------------------------------------| - * | | | | |RST| | | | | | | | | | Ins| - * |----------------------------------------------------------------| - * | | | | | | | | | | | | | | |Home| - * |----------------------------------------------------------------| - * | | | | | | | | | |Bl-|Bl+| |Mute|Vol+| End| - * |----------------------------------------------------------------| - * | | | | BL_Toggle | | | | |Vol-| | - * `----------------------------------------------------------------' + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Function Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ ` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ PScr │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │RST│ │ │ │ │ │ │ │ │ │Ins│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │Hom│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │Bl-│Bl+│ Mute │Vl+│End│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ BL Toggle │ │ │ │ │Vl-│ │ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ */ - [_FL1] = LAYOUT( - 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_PSCR, _______, + [_FL] = LAYOUT( + 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_PSCR, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, - _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, _______, KC_MUTE, KC_VOLU, KC_END, - _______, _______, _______, BL_TOGG, _______, _______, _______, KC_VOLD, _______), - /* _FL2: Function Layer 2 - For ISO enter use ANSI enter - * ,----------------------------------------------------------------. - * | | | | | | | | | | | | | | | | | - * |----------------------------------------------------------------| - * | | | | | | | | | | | | | | | | - * |----------------------------------------------------------------| - * | | | | | | | | | | | | | | | | - * |----------------------------------------------------------------| - * | | | | | | | | | | | | | | | | - * |----------------------------------------------------------------| - * | | | | | | | | | | | - * `----------------------------------------------------------------' - */ - [_FL2] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______), - + _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, KC_MUTE, KC_VOLU, KC_END, + _______, _______, _______, BL_TOGG, _______, _______, _______, KC_VOLD, _______ + ) }; - - -void matrix_init_user(void) { -} - -void matrix_scan_user(void) { -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - - diff --git a/keyboards/noxary/268_2/readme.md b/keyboards/noxary/268_2/readme.md index 85d1a4717..075a1d26c 100644 --- a/keyboards/noxary/268_2/readme.md +++ b/keyboards/noxary/268_2/readme.md @@ -4,10 +4,9 @@ A fully customizable 65% keyboard. -* Keyboard Maintainer: [Rozakiin](https://github.com/rozakiin) -* Hardware Supported: 268.2 PCB - * rev1 -* Hardware Availability: [Noxary](https://shop.noxary.co/collections/268-2/products/noxary-268-2-polycarbonate) +Keyboard Maintainer: [Rozakiin](https://github.com/rozakiin) +Hardware Supported: 268.2 PCB +Hardware Availability: [Noxary](https://shop.noxary.co/collections/268-2/products/noxary-268-2-polycarbonate) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/noxary/268_2/rules.mk b/keyboards/noxary/268_2/rules.mk index 9b6d7e672..a89c930a1 100644 --- a/keyboards/noxary/268_2/rules.mk +++ b/keyboards/noxary/268_2/rules.mk @@ -48,16 +48,6 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT BOOTLOADER = atmel-dfu -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - # Build Options # change yes to no to disable # From a07da6e2452cd17699a01530f5435272ab6a732f Mon Sep 17 00:00:00 2001 From: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> Date: Sat, 6 Jul 2019 20:56:23 -0700 Subject: [PATCH 307/341] keymap for idobo (#6250) * greenshadowmaker keymap for idobo xd75 massdrop * remove uneeded config.h * corrected format to match convention instead of xd75 where I accidentally started from * fixed errors and added arrows bottom right to match my other layouts * updated readme * right arrow fix * Update keyboards/idobo/keymaps/greenshadowmaker/keymap.c removing unnecessary part, copied from different keymap Co-Authored-By: fauxpark * added suggested changes * removed unneded elements --- .../keyboard-layout-editor-gsm-idobo.json | 10 +-- .../idobo/keymaps/greenshadowmaker/keymap.c | 82 ++++++++----------- .../idobo/keymaps/greenshadowmaker/readme.md | 2 + 3 files changed, 42 insertions(+), 52 deletions(-) diff --git a/keyboards/idobo/keymaps/greenshadowmaker/keyboard-layout-editor-gsm-idobo.json b/keyboards/idobo/keymaps/greenshadowmaker/keyboard-layout-editor-gsm-idobo.json index 95122075b..19c078046 100644 --- a/keyboards/idobo/keymaps/greenshadowmaker/keyboard-layout-editor-gsm-idobo.json +++ b/keyboards/idobo/keymaps/greenshadowmaker/keyboard-layout-editor-gsm-idobo.json @@ -101,7 +101,7 @@ }, "", "UP", - "", + "PrtScr", "H", "J", "K", @@ -182,9 +182,9 @@ "c": "#cccccc", "t": "#000000" }, - "", - "", - "", - "PrtScr" + "Left", + "Down", + "Up", + "Right" ] ] \ No newline at end of file diff --git a/keyboards/idobo/keymaps/greenshadowmaker/keymap.c b/keyboards/idobo/keymaps/greenshadowmaker/keymap.c index e96459da5..d23bc7c7d 100644 --- a/keyboards/idobo/keymaps/greenshadowmaker/keymap.c +++ b/keyboards/idobo/keymaps/greenshadowmaker/keymap.c @@ -1,40 +1,38 @@ #include QMK_KEYBOARD_H -extern keymap_config_t keymap_config; - -#define _QWERTY 0 -#define _LOWER 1 -#define _RAISE 2 -#define _ADJUST 16 - enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, + LOWER = SAFE_RANGE, RAISE, - ADJUST, +}; + +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* QWERTY * .--------------------------------------------------------------------------------------------------------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | BACKSP | + * | ESC | 1 | 2 | 3 | 4 | 5 | = | | - | 6 | 7 | 8 | 9 | 0 | BACKSP | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| * | TAB | Q | W | E | R | T | | | [ | Y | U | I | O | P | ] | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| - * | RAISE | A | S | D | F | G | | UP | | H | J | K | L | ; | ' | + * | RAISE | A | S | D | F | G | | UP | PrtScr | H | J | K | L | ; | ' | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| * | LSHIFT | Z | X | C | V | B | LEFT | DOWN | RIGHT | N | M | , | . | / | RSHIFT | * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| - * | ` | \ | LALT | LCTRL | LOWER | SPACE | LGUI | DEL | ENTER | SPACE | RAISE | | | | PrtScr | + * | ` | \ | LALT | LCTRL | LOWER | SPACE | LGUI | DEL | ENTER | SPACE | RAISE | LEFT | DOWN | UP | RIGHT | * '--------------------------------------------------------------------------------------------------------------------------------------' */ -[_QWERTY] = LAYOUT_ortho_5x15( \ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, XXXXXXX, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, XXXXXXX, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, \ - RAISE, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, KC_UP, XXXXXXX, 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_LEFT, KC_DOWN, KC_RGHT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_GRAVE, KC_GRAVE, KC_LALT, KC_LCTL, LOWER, KC_SPC, KC_LGUI, KC_DEL, KC_ENT, KC_SPC, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR \ +[_QWERTY] = LAYOUT_ortho_5x15( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, XXXXXXX, KC_MINS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, XXXXXXX, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, + RAISE, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, KC_UP, KC_PSCR, 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_LEFT, KC_DOWN, KC_RGHT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_GRAVE, KC_BSLS, KC_LALT, KC_LCTL, LOWER, KC_SPC, KC_LGUI, KC_DEL, KC_ENT, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), @@ -51,12 +49,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | LOWER | | APP | | | | RAISE | | | | | * '--------------------------------------------------------------------------------------------------------------------------------------' */ -[_LOWER] = LAYOUT_ortho_5x15( \ - XXXXXXX, KC_F1, KC_F2, KC_F3, XXXXXXX, KC_F5, XXXXXXX, XXXXXXX, XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, \ - XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - RAISE, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LOWER, XXXXXXX, KC_APP, XXXXXXX, XXXXXXX, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ +[_LOWER] = LAYOUT_ortho_5x15( + XXXXXXX, KC_F1, KC_F2, KC_F3, XXXXXXX, KC_F5, XXXXXXX, XXXXXXX, XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, + XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RAISE, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LOWER, XXXXXXX, KC_APP, XXXXXXX, XXXXXXX, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), /* RAISE @@ -72,12 +70,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | LOWER | | | | | | RAISE | | | | | * '--------------------------------------------------------------------------------------------------------------------------------------' */ -[_RAISE] = LAYOUT_ortho_5x15( \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - RAISE, KC_HOME, KC_PGDN, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LOWER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ +[_RAISE] = LAYOUT_ortho_5x15( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RAISE, KC_HOME, KC_PGDN, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LOWER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), @@ -94,12 +92,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | LOWER | | | | | | RAISE | | | | | * '--------------------------------------------------------------------------------------------------------------------------------------' */ -[_ADJUST] = LAYOUT_ortho_5x15( \ - RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_M_P, RGB_M_T, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, BL_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - RAISE, XXXXXXX, RGB_HUI, RGB_SAI, RGB_VAI, BL_INC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - EEP_RST, XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LOWER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ +[_ADJUST] = LAYOUT_ortho_5x15( + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_M_P, RGB_M_T, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, BL_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RAISE, XXXXXXX, RGB_HUI, RGB_SAI, RGB_VAI, BL_INC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + EEP_RST, XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LOWER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), @@ -116,7 +114,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { update_tri_layer(_LOWER, _RAISE, _ADJUST); } return false; - break; case RAISE: if (record->event.pressed) { layer_on(_RAISE); @@ -126,15 +123,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { update_tri_layer(_LOWER, _RAISE, _ADJUST); } return false; - break; - case ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - return false; - break; } return true; } diff --git a/keyboards/idobo/keymaps/greenshadowmaker/readme.md b/keyboards/idobo/keymaps/greenshadowmaker/readme.md index bdd28d4ff..7b6f654c7 100644 --- a/keyboards/idobo/keymaps/greenshadowmaker/readme.md +++ b/keyboards/idobo/keymaps/greenshadowmaker/readme.md @@ -1,3 +1,5 @@ # GreenShadowMaker keymap for idobo +make idobo:greenshadowmaker:dfu + Note: keyboard-layout-editor-gsm-idobo.json shoudl be the matching layout for http://www.keyboard-layout-editor.com From d16db6936715a98b6ae769463d5ccafab25b7203 Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Sat, 6 Jul 2019 23:00:05 -0500 Subject: [PATCH 308/341] Added mod carry over from press to release. (#5866) Update docs/feature_space_cadet.md Co-Authored-By: fauxpark --- docs/feature_space_cadet.md | 1 + quantum/process_keycode/process_space_cadet.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/docs/feature_space_cadet.md b/docs/feature_space_cadet.md index 075578522..41a44627e 100644 --- a/docs/feature_space_cadet.md +++ b/docs/feature_space_cadet.md @@ -43,6 +43,7 @@ By default Space Cadet assumes a US ANSI layout, but if your layout uses differe |`LAPO_KEYS` |`KC_LALT, KC_LSFT, KC_9` |Send `KC_LALT` when held, the mod `KC_LSFT` with the key `KC_9` when tapped. | |`RAPC_KEYS` |`KC_RALT, KC_RSFT, KC_0` |Send `KC_RALT` when held, the mod `KC_RSFT` with the key `KC_0` when tapped. | |`SFTENT_KEYS` |`KC_RSFT, KC_TRNS, SFTENT_KEY` |Send `KC_RSFT` when held, no mod with the key `SFTENT_KEY` when tapped. | +|`SPACE_CADET_MODIFIER_CARRYOVER` |*Not defined* |Store current modifiers before the hold mod is pressed and use them with the tap mod and keycode. Useful for when you frequently release a modifier before triggering Space Cadet. | ## Obsolete Configuration diff --git a/quantum/process_keycode/process_space_cadet.c b/quantum/process_keycode/process_space_cadet.c index 089199eee..c8721d446 100644 --- a/quantum/process_keycode/process_space_cadet.c +++ b/quantum/process_keycode/process_space_cadet.c @@ -81,11 +81,17 @@ static uint8_t sc_last = 0; static uint16_t sc_timer = 0; +#ifdef SPACE_CADET_MODIFIER_CARRYOVER +static uint8_t sc_mods = 0; +#endif void perform_space_cadet(keyrecord_t *record, uint8_t holdMod, uint8_t tapMod, uint8_t keycode) { if (record->event.pressed) { sc_last = holdMod; sc_timer = timer_read (); +#ifdef SPACE_CADET_MODIFIER_CARRYOVER + sc_mods = get_mods(); +#endif if (IS_MOD(holdMod)) { register_mods(MOD_BIT(holdMod)); } @@ -100,7 +106,13 @@ void perform_space_cadet(keyrecord_t *record, uint8_t holdMod, uint8_t tapMod, u register_mods(MOD_BIT(tapMod)); } } +#ifdef SPACE_CADET_MODIFIER_CARRYOVER + set_weak_mods(sc_mods); +#endif tap_code(keycode); +#ifdef SPACE_CADET_MODIFIER_CARRYOVER + clear_weak_mods(); +#endif if (IS_MOD(tapMod)) { unregister_mods(MOD_BIT(tapMod)); } From 75795186135e6d83de1ff3bb108f9c5471742ba4 Mon Sep 17 00:00:00 2001 From: skullydazed Date: Sun, 7 Jul 2019 09:08:49 -0700 Subject: [PATCH 309/341] Fix chibios so the dfu-suffix is only applied once. (#6270) --- tmk_core/chibios.mk | 6 ------ tmk_core/rules.mk | 8 ++++++++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index 11715cf34..4aebb4776 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -201,7 +201,6 @@ DFU_ARGS ?= ifneq ("$(SERIAL)","") DFU_ARGS += -S $(SERIAL) endif -DFU_SUFFIX_ARGS ?= ST_LINK_ARGS ?= @@ -209,7 +208,6 @@ ST_LINK_ARGS ?= EXTRALIBDIRS = $(RULESPATH)/ld DFU_UTIL ?= dfu-util -DFU_SUFFIX ?= dfu-suffix ST_LINK_CLI ?= st-link_cli # Generate a .qmk for the QMK-FF @@ -274,7 +272,3 @@ teensy: $(BUILD_DIR)/$(TARGET).hex cpfirmware sizeafter $(TEENSY_LOADER_CLI) -mmcu=$(MCU_LDSCRIPT) -w -v $(BUILD_DIR)/$(TARGET).hex bin: $(BUILD_DIR)/$(TARGET).bin sizeafter - if [ ! -z "$(DFU_SUFFIX_ARGS)" ]; then \ - $(DFU_SUFFIX) $(DFU_SUFFIX_ARGS) -a $(BUILD_DIR)/$(TARGET).bin 1>/dev/null ;\ - fi - $(COPY) $(BUILD_DIR)/$(TARGET).bin $(TARGET).bin; diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index 6d2bb51f0..8f876a383 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -223,6 +223,10 @@ $(foreach LOBJ, $(NO_LTO_OBJ), $(eval $(call NO_LTO,$(LOBJ)))) MOVE_DEP = mv -f $(patsubst %.o,%.td,$@) $(patsubst %.o,%.d,$@) +# Add QMK specific flags +DFU_SUFFIX ?= dfu-suffix +DFU_SUFFIX_ARGS ?= + elf: $(BUILD_DIR)/$(TARGET).elf hex: $(BUILD_DIR)/$(TARGET).hex @@ -279,6 +283,10 @@ gccversion : @$(SILENT) || printf "$(MSG_BIN) $@" | $(AWK_CMD) $(eval CMD=$(BIN) $< $@ || exit 0) @$(BUILD_CMD) + if [ ! -z "$(DFU_SUFFIX_ARGS)" ]; then \ + $(DFU_SUFFIX) $(DFU_SUFFIX_ARGS) -a $(BUILD_DIR)/$(TARGET).bin 1>/dev/null ;\ + fi + $(COPY) $(BUILD_DIR)/$(TARGET).bin $(TARGET).bin; BEGIN = gccversion sizebefore From 06ba968759041d8c6dfe1309888d21bdbc16cd24 Mon Sep 17 00:00:00 2001 From: Matthew Lyon Date: Mon, 8 Jul 2019 06:27:30 -0700 Subject: [PATCH 310/341] mattly's userspace and iris (#6279) --- keyboards/keebio/iris/keymaps/mattly/config.h | 28 +++ keyboards/keebio/iris/keymaps/mattly/keymap.c | 50 ++++++ .../keebio/iris/keymaps/mattly/readme.md | 1 + keyboards/keebio/iris/keymaps/mattly/rules.mk | 0 keyboards/planck/keymaps/mattly/keymap.c | 164 ++---------------- keyboards/planck/keymaps/mattly/readme.md | 29 +--- users/mattly/config.h | 9 + users/mattly/mattly.c | 70 ++++++++ users/mattly/mattly.h | 83 +++++++++ users/mattly/readme.md | 10 ++ users/mattly/rules.mk | 2 + 11 files changed, 270 insertions(+), 176 deletions(-) create mode 100644 keyboards/keebio/iris/keymaps/mattly/config.h create mode 100644 keyboards/keebio/iris/keymaps/mattly/keymap.c create mode 100644 keyboards/keebio/iris/keymaps/mattly/readme.md create mode 100644 keyboards/keebio/iris/keymaps/mattly/rules.mk create mode 100644 users/mattly/config.h create mode 100644 users/mattly/mattly.c create mode 100644 users/mattly/mattly.h create mode 100644 users/mattly/readme.md create mode 100644 users/mattly/rules.mk diff --git a/keyboards/keebio/iris/keymaps/mattly/config.h b/keyboards/keebio/iris/keymaps/mattly/config.h new file mode 100644 index 000000000..01bb31a6e --- /dev/null +++ b/keyboards/keebio/iris/keymaps/mattly/config.h @@ -0,0 +1,28 @@ +/* +Copyright 2017 Danny Nguyen + +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 . +*/ + +#pragma once + +// #define USE_I2C +#define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/keebio/iris/keymaps/mattly/keymap.c b/keyboards/keebio/iris/keymaps/mattly/keymap.c new file mode 100644 index 000000000..4f4ff225e --- /dev/null +++ b/keyboards/keebio/iris/keymaps/mattly/keymap.c @@ -0,0 +1,50 @@ +#include QMK_KEYBOARD_H +#include "mattly.h" + +// extern keymap_config_t keymap_config; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_SCLN, + KC_CAPS, A_CTRL, S_ALT, D_GUI, F_SHFT, KC_G, KC_H, J_SHFT, K_GUI, L_ALT, MINSCTL, KC_QUOT, + XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, SPC_SFT, BSP_NUM, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + ESC_HYP, BSP_NUM, ENT_SFT, SPC_SFT, TAB_SYM, DEL_WRP + ), + + [_SYMBOL] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_AMPR, KC_GRV, KC_TILD, KC_LBRC, KC_RBRC, KC_LABK, KC_RABK, KC_PLUS, KC_ASTR, XXXXXXX, _______, + _______, KC_DLR, KC_PERC, KC_EQL, KC_LPRN, KC_RPRN, KC_SCLN, KC_COLN, KC_EXLM, KC_AT, KC_UNDS, _______, + RESET, XXXXXXX, KC_CIRC, KC_HASH, KC_LCBR, KC_RCBR, _______, _______, KC_QUOT, KC_DQUO, KC_PIPE, KC_BSLS, KC_QUES, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_NAVNUM] = LAYOUT( + XNOTIFY, XXXXXXX, XPRVSPC, NWIN, XNXTSPC, XXXXXXX, XXXXXXX, KC_SLSH, KC_ASTR, KC_MINS, KC_PLUS, XXXXXXX, + XALLWIN, NAVFWD, BWORD, KC_UP, FWORD, KC_PGUP, KC_DLR, KC_P7, KC_P8, KC_P9, KC_DOT, XXXXXXX, + XDESKTP, NAVBACK, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_PERC, KC_P4, KC_P5, KC_P6, KC_EQL, XXXXXXX, + RESET, PTAB, KC_HOME, PWIN, KC_END, NTAB, _______, _______, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_ENT, XXXXXXX, + _______, _______, _______, _______, _______, KC_P0 + ), + + [_FUNCT] = LAYOUT( + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + RESET, XALLWIN, XPRVSPC, NWIN, XNXTSPC, XDESKTP, XXXXXXX, RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_K, RESET, + DEBUG, XNOTIFY, PTAB, PWIN, NTAB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_MUTE, KC_VOLD, KC_VOLU, KC_MRWD, KC_MFFD, KC_MPLY, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_MS_WH_UP); + } else { + tap_code(KC_MS_WH_DOWN); + } + } +} + diff --git a/keyboards/keebio/iris/keymaps/mattly/readme.md b/keyboards/keebio/iris/keymaps/mattly/readme.md new file mode 100644 index 000000000..4e8c7f17c --- /dev/null +++ b/keyboards/keebio/iris/keymaps/mattly/readme.md @@ -0,0 +1 @@ +See my readme in [users/mattly](../../../../../users/mattly/readme.md) \ No newline at end of file diff --git a/keyboards/keebio/iris/keymaps/mattly/rules.mk b/keyboards/keebio/iris/keymaps/mattly/rules.mk new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/planck/keymaps/mattly/keymap.c b/keyboards/planck/keymaps/mattly/keymap.c index baa7d9fbf..52ade8643 100644 --- a/keyboards/planck/keymaps/mattly/keymap.c +++ b/keyboards/planck/keymaps/mattly/keymap.c @@ -1,166 +1,34 @@ -/* Copyright 2015-2017 Jack Humbert - * - * 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 . - */ - #include QMK_KEYBOARD_H -#include "muse.h" - -extern keymap_config_t keymap_config; - -enum planck_layers { - _QWERTY, - _NUMBER, - _SYMBOL, - _FUNC, -}; - -enum planck_keycodes { - QWERTY = SAFE_RANGE -}; - -#define SPC_SHF MT(MOD_LSFT, KC_SPC) - -#define ESC_HYP MT(MOD_HYPR, KC_ESC) -#define TAB_NUM LT(_NUMBER, KC_TAB) -#define BSP_SYM LT(_SYMBOL, KC_BSPC) -#define DEL_WRP MT(MOD_LCTL | MOD_LALT | MOD_LGUI, KC_DEL) - -#define SYMLOCK TG(_SYMBOL) -#define NUMLOCK TG(_NUMBER) - -#define ONE_CTL OSM(MOD_LCTL) -#define ONE_ALT OSM(MOD_LALT) -#define ONE_GUI OSM(MOD_LGUI) -#define ONE_HYP OSM(MOD_HYPR) -#define ONE_MEH OSM(MOD_MEH) -#define ONE_WRP OSM(MOD_LCTL | MOD_LALT | MOD_LGUI) -#define ONE_WOA OSM(MOD_LCTL | MOD_LGUI | MOD_LSFT) -#define ONE_DER OSM(MOD_LALT | MOD_LGUI | MOD_LSFT) - -#define A_CTRL MT(MOD_LCTL, KC_A) -#define S_ALT MT(MOD_LALT, KC_S) -#define D_GUI MT(MOD_LGUI, KC_D) -#define F_SHFT MT(MOD_LSFT, KC_F) -#define J_SHFT MT(MOD_RSFT, KC_J) -#define K_GUI MT(MOD_RGUI, KC_K) -#define L_ALT MT(MOD_RALT, KC_L) -#define MINSCTL MT(MOD_RCTL, KC_MINS) - -#define ENT_CTL MT(MOD_LCTL, KC_ENT) -#define LT_ALT MT(MOD_LALT, KC_LEFT) -#define DN_GUI MT(MOD_LGUI, KC_DOWN) -#define RT_SHFT MT(MOD_LSFT, KC_RGHT) -#define N4_SHFT MT(MOD_RSFT, KC_4) -#define N5_GUI MT(MOD_RGUI, KC_5) -#define N6_ALT MT(MOD_RALT, KC_6) - -#define BWORD LALT(KC_LEFT) -#define FWORD LALT(KC_RIGHT) - -#define NWIN LGUI(KC_GRV) -#define PWIN LGUI(LSFT(KC_GRV)) -#define NTAB LGUI(LSFT(KC_RBRC)) -#define PTAB LGUI(LSFT(KC_LBRC)) -#define NAVBACK LGUI(KC_LBRC) -#define NAVFWD LGUI(KC_RBRC) - -#define XMSNCTL HYPR(KC_F14) -#define XDSKTOP HYPR(KC_F15) -#define XNXTSPC HYPR(KC_F16) -#define XPRVSPC HYPR(KC_F17) -#define XNOTIFY HYPR(KC_F18) +#include "mattly.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Querty - | # | q | w | e | r | t | y | u | i | o | p | - | - | | | | | | | | | | | | | - |------|------|------|------|------|------|------|------|------|------|------|------| - | ( | a | s | d | f | g | h | j | k | l | ; | ' | - | | CTRL | ALT | GUI | SHIFT| | | SHIFT| GUI | ALT | CTRL | | - |------|------|------|------|------|------|------|------|------|------|------|------| - | [ | z | x | c | v | b | n | m | , | . | / | > | - | | | | | | | | | | | | | - |------|------|------|------|------|------|------|------|------|------|------|------| - | ctrl | alt | gui | Esc | Tab | space | Bksp | Del | hyper| meh | warp | - | | | | FUNC |NUMBER| SHIFT |SYMBOL| | | | | - */ [_QWERTY] = LAYOUT_planck_grid( - KC_HASH, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_SCLN, - KC_LPRN, A_CTRL, S_ALT, D_GUI, F_SHFT, KC_G, KC_H, J_SHFT, K_GUI, L_ALT, MINSCTL, KC_QUOT, - KC_LBRC, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RABK, - NUMLOCK, MO(_FUNC), ONE_MEH, ESC_HYP, TAB_NUM, SPC_SHF, SPC_SHF, BSP_SYM, DEL_WRP, ONE_WRP, ONE_DER, SYMLOCK + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_SCLN, + KC_CAPS, A_CTRL, S_ALT, D_GUI, F_SHFT, KC_G, KC_H, J_SHFT, K_GUI, L_ALT, MINSCTL, KC_QUOT, + XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + XXXXXXX, NAVLOCK, XXXXXXX, ESC_HYP, BSP_NUM, ENT_SFT, SPC_SFT, TAB_SYM, DEL_WRP, XXXXXXX, SYMLOCK, XXXXXXX ), -/* Symbol - | | & | ` | ~ | [ | ] | < | > | + | | | | | - | | $ | % | = | ( | ) | ; | : | ! | @ | _ | | - | | | ^ | # | { | } | ' | " | | | \ | ? | | - | | | | | | | .... | | | | | - */ [_SYMBOL] = LAYOUT_planck_grid( - KC_ESC, KC_AMPR, KC_GRV, KC_TILD, KC_LBRC, KC_RBRC, KC_LABK, KC_RABK, KC_PLUS, KC_ASTR, XXXXXXX, KC_DEL, - KC_ENT, KC_DLR, KC_PERC, KC_EQL, KC_LPRN, KC_RPRN, KC_SCLN, KC_COLN, KC_EXLM, KC_AT, KC_UNDS, KC_BSPC, + _______, KC_AMPR, KC_GRV, KC_TILD, KC_LBRC, KC_RBRC, KC_LABK, KC_RABK, KC_PLUS, KC_ASTR, XXXXXXX, _______, + _______, KC_DLR, KC_PERC, KC_EQL, KC_LPRN, KC_RPRN, KC_SCLN, KC_COLN, KC_EXLM, KC_AT, KC_UNDS, _______, _______, XXXXXXX, KC_CIRC, KC_HASH, KC_LCBR, KC_RCBR, KC_QUOT, KC_DQUO, KC_PIPE, KC_BSLS, KC_QUES, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), -/* Number - | | |<-word| up |word->| PgUp | . | 7 | 8 | 9 | + | * | - | | Enter| left | down | right| PgDn | 0 | 4 | 5 | 6 | - | / | - | | Bksp | Home | tab | End | Del | , | 1 | 2 | 3 | = | % | - | | | | | .... | | | | : | $ | | - */ -[_NUMBER] = LAYOUT_planck_grid( - XXXXXXX, XXXXXXX, BWORD, KC_UP, FWORD, KC_PGUP, KC_DOT, KC_7, KC_8, KC_9, KC_PLUS, KC_ASTR, - KC_CAPS, ENT_CTL, LT_ALT, DN_GUI, RT_SHFT, KC_PGDN, KC_0, N4_SHFT, N5_GUI, N6_ALT, MINSCTL, KC_SLSH, - XXXXXXX, KC_BSPC, KC_HOME, KC_TAB, KC_END, KC_DEL, KC_COMM, KC_1, KC_2, KC_3, KC_EQL, KC_PERC, - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COLN, KC_DLR, _______ + +[_NAVNUM] = LAYOUT_planck_grid( + _______, XXXXXXX, BWORD, KC_UP, FWORD, KC_PGUP, KC_DOT, KC_7, KC_8, KC_9, KC_PLUS, KC_ASTR, + _______, KC_ENT, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_0, KC_4, KC_5, KC_6, KC_MINS, KC_SLSH, + _______, KC_BSPC, KC_HOME, KC_TAB, KC_END, KC_DEL, KC_COMM, KC_1, KC_2, KC_3, KC_EQL, KC_PERC, + _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_COLN, KC_DLR, _______ ), -/* Function - * | Reset| Mctl | Pspc | Nwin | Nspc | Desk | | F7 | F8 | F9 | F10 | F13 | - * | Debug| Nctr | Ptab | Pwin | Ntab | Back | Fwd | F4 | F5 | F6 | F11 | F14 | - * | Mute | Vol- | Vol+ | Trk- | Trk+ | Play | | F1 | F2 | F3 | F12 | F15 | - * | | | | | | | | | | | | | - */ -[_FUNC] = LAYOUT_planck_grid( - RESET, XMSNCTL, XPRVSPC, NWIN, XNXTSPC, XDSKTOP, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_F13, + +[_FUNCT] = LAYOUT_planck_grid( + RESET, XALLWIN, XPRVSPC, NWIN, XNXTSPC, XDESKTP, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_F13, DEBUG, XNOTIFY, PTAB, PWIN, NTAB, NAVBACK, NAVFWD, KC_F4, KC_F5, KC_F6, KC_F11, KC_F14, KC_MUTE, KC_VOLD, KC_VOLU, KC_MRWD, KC_MFFD, KC_MPLY, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F12, KC_F15, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; -#ifdef AUDIO_ENABLE -#endif - -uint32_t layer_state_set_user(uint32_t state) { - state = update_tri_layer_state(state, _SYMBOL, _NUMBER, _FUNC); - return state; -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - print("mode just switched to qwerty and this is a huge string\n"); - set_single_persistent_default_layer(_QWERTY); - } - return false; - break; - } - return true; -} - diff --git a/keyboards/planck/keymaps/mattly/readme.md b/keyboards/planck/keymaps/mattly/readme.md index 58f2b979c..4e8c7f17c 100644 --- a/keyboards/planck/keymaps/mattly/readme.md +++ b/keyboards/planck/keymaps/mattly/readme.md @@ -1,28 +1 @@ -# Mattly's Planck layout - -This planck layout is optimized for, in order: - -- moving work from my pinkies to my thumbs -- writing lisp/clojure code in my evil-mode based emacs setup -- tapping out messages in chat applications such as slack -- writing english in markdown files in said emacs -- navigating mac applications -- writing english in a web browser on a macintosh -- writing other programming languages' code in said emacs -- writing english in other contexts -- literally anything else - -## oddities: - -You may notice that `enter` is on a layer. This is an experiment and I kind of -like it so far, since many programs interpret that keystroke as a "commit" -of some kind. - -## works in progress - -I'm trying to figure out how to make some things easier to do with the mouse or -one-handed. Right now the combo of entering numbers and using a mouse with my -right hand is kind of annoying. I want to be able to toggle layers on, but only -from within that layer. - -![mattly's keymap](https://lyonheart.us/etc/mattly-keymap.png) +See my readme in [users/mattly](../../../../../users/mattly/readme.md) \ No newline at end of file diff --git a/users/mattly/config.h b/users/mattly/config.h new file mode 100644 index 000000000..25d379801 --- /dev/null +++ b/users/mattly/config.h @@ -0,0 +1,9 @@ +#pragma once + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 + +#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD +#define TAPPING_TOGGLE 2 +#define TAPPING_TERM 200 diff --git a/users/mattly/mattly.c b/users/mattly/mattly.c new file mode 100644 index 000000000..1e61e0126 --- /dev/null +++ b/users/mattly/mattly.c @@ -0,0 +1,70 @@ +#include "mattly.h" + +__attribute__ ((weak)) +layer_state_t layer_state_set_keymap (layer_state_t state) { + return state; +} + +void set_lights_default(void) { + #ifdef RGBLIGHT_ENABLE + if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { + rgblight_sethsv_noeeprom(HSV_CAPS); + } else { + rgblight_sethsv_noeeprom(HSV_DEFAULT); + } + #endif +} + +void layer_state_set_rgb(layer_state_t state) { +#ifdef RGBLIGHT_ENABLE + switch (biton32(state)) { + case _QWERTY: + set_lights_default(); + break; + case _SYMBOL: + rgblight_sethsv_noeeprom(HSV_SYMBOL); + break; + case _NAVNUM: + rgblight_sethsv_noeeprom(HSV_NAVNUM); + break; + case _FUNCT: + rgblight_sethsv_noeeprom(HSV_FUNCT); + break; + } +#endif +} + + +layer_state_t layer_state_set_user (layer_state_t state) { + state = update_tri_layer_state(state, _SYMBOL, _NAVNUM, _FUNCT); + layer_state_set_rgb(state); + return layer_state_set_keymap (state); +} + +void on_reset(void) { + #ifdef RGBLIGHT_ENABLE + rgblight_sethsv_noeeprom(HSV_RESET); + #endif +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_CAPS: + #ifdef RGBLIGHT_ENABLE + set_lights_default(); + #endif + return true; + case RESET: + on_reset(); + return true; + default: + return true; + } +} + +void keyboard_post_init_user(void) { +#ifdef RGBLIGHT_ENABLE + rgblight_enable_noeeprom(); + set_lights_default(); +#endif +} diff --git a/users/mattly/mattly.h b/users/mattly/mattly.h new file mode 100644 index 000000000..08318840d --- /dev/null +++ b/users/mattly/mattly.h @@ -0,0 +1,83 @@ +/* Copyright 2019 Matthew Lyon + * + * 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 . + */ + +#ifndef USERSPACE +#define USERSPACE + +#include "quantum.h" + +enum { + _QWERTY, + _NAVNUM, + _SYMBOL, + _FUNCT, +}; + +// left hand +#define ESC_HYP MT(MOD_HYPR, KC_ESC) +#define BSP_NUM LT(_NAVNUM, KC_BSPC) +#define ENT_SFT MT(MOD_LSFT, KC_ENT) +#define SPC_SFT MT(MOD_LSFT, KC_SPC) + +// right hand +#define SPC_SFT MT(MOD_LSFT, KC_SPC) +#define TAB_SYM LT(_SYMBOL, KC_TAB) +#define DEL_WRP MT(MOD_LCTL | MOD_LALT | MOD_LGUI, KC_DEL) + +#define NAVLOCK TG(_NAVNUM) +#define SYMLOCK TG(_SYMBOL) + + +// QWERTY + +#define A_CTRL MT(MOD_LCTL, KC_A) +#define S_ALT MT(MOD_LALT, KC_S) +#define D_GUI MT(MOD_LGUI, KC_D) +#define F_SHFT MT(MOD_LSFT, KC_F) +#define J_SHFT MT(MOD_RSFT, KC_J) +#define K_GUI MT(MOD_RGUI, KC_K) +#define L_ALT MT(MOD_RALT, KC_L) +#define MINSCTL MT(MOD_RCTL, KC_MINS) + +#define BWORD LALT(KC_LEFT) +#define FWORD LALT(KC_RIGHT) + +// OS X default keys +#define NWIN LGUI(KC_GRV) // Next Window +#define PWIN LGUI(LSFT(KC_GRV)) // Prev Window +#define NTAB LGUI(LSFT(KC_RBRC)) // Next Tab +#define PTAB LGUI(LSFT(KC_LBRC)) // Prev Tab +#define NAVBACK LGUI(KC_LBRC) // Navigate Forward +#define NAVFWD LGUI(KC_RBRC) // Navigate Back + +// my personal mappings to window manager commands +#define XALLWIN HYPR(KC_F14) +#define XDESKTP HYPR(KC_F15) +#define XNXTSPC HYPR(KC_F16) +#define XPRVSPC HYPR(KC_F17) +#define XNOTIFY HYPR(KC_F18) + +#ifdef RGBLIGHT_ENABLE +#define HSV_CAPS 42, 255, 255 +#define HSV_DEFAULT 30, 218, 255 +#define HSV_SYMBOL 22, 255, 255 +#define HSV_NAVNUM 245, 200, 255 +#define HSV_FUNCT 233, 255, 255 +#define HSV_RESET 180, 255, 255 +#endif + +#endif + diff --git a/users/mattly/readme.md b/users/mattly/readme.md new file mode 100644 index 000000000..356992534 --- /dev/null +++ b/users/mattly/readme.md @@ -0,0 +1,10 @@ +# mattly's layouts + +My layouts are based around: + +* making the most from small layouts on keyboards like the iris or planck +* moving held-modifiers from pinkies to thumbs or home row, giving many keys dual purposes via mod/layer taps +* easy home-row navigation on a layer, using standard keys, available to all programs, not just a specially-configured editor +* easy access to punctuation symbols used in the programming languages I work in + +[Here is an image](https://lyonheart.us/etc/mattly-keymap.png) with an outdated description of my keymap \ No newline at end of file diff --git a/users/mattly/rules.mk b/users/mattly/rules.mk new file mode 100644 index 000000000..6803d361d --- /dev/null +++ b/users/mattly/rules.mk @@ -0,0 +1,2 @@ +SRC += mattly.c +MOUSEKEY_ENABLE = yes From 6e6d079dd21f766191f60db062fae8889623ded1 Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Mon, 8 Jul 2019 08:28:31 -0500 Subject: [PATCH 311/341] Updated OLED Docs with notes about screen timeout. (#6276) * Updated OLED Docs with notes about screen timeout. * Update docs/feature_oled_driver.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- docs/feature_oled_driver.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md index 155dfa9d2..503e43828 100644 --- a/docs/feature_oled_driver.md +++ b/docs/feature_oled_driver.md @@ -14,7 +14,7 @@ Tested combinations: Hardware configurations using ARM-based microcontrollers or different sizes of OLED modules may be compatible, but are untested. -!> Warning: This OLED Driver currently uses the new i2c_master driver from split common code. If your split keyboard uses i2c to communication between sides this driver could cause an address conflict (serial is fine). Please contact your keyboard vendor and ask them to migrate to the latest split common code to fix this. +!> Warning: This OLED Driver currently uses the new i2c_master driver from split common code. If your split keyboard uses I2C to communicate between sides, this driver could cause an address conflict (serial is fine). Please contact your keyboard vendor and ask them to migrate to the latest split common code to fix this. In addition, the display timeout system to reduce OLED burn-in also uses split common to detect keypresses, so you will need to implement custom timeout logic for non-split common keyboards. ## Usage From 95b2364e5a58ffcece44e00095eaf209332cd55b Mon Sep 17 00:00:00 2001 From: vxid <16440823+vxid@users.noreply.github.com> Date: Mon, 8 Jul 2019 20:15:59 +0200 Subject: [PATCH 312/341] [Keymap] Add crkbd/vxid keymap (#6281) --- keyboards/crkbd/keymaps/vxid/README.md | 3 + keyboards/crkbd/keymaps/vxid/config.h | 44 +++++++++++++ keyboards/crkbd/keymaps/vxid/keymap.c | 85 ++++++++++++++++++++++++++ keyboards/crkbd/keymaps/vxid/rules.mk | 31 ++++++++++ 4 files changed, 163 insertions(+) create mode 100644 keyboards/crkbd/keymaps/vxid/README.md create mode 100644 keyboards/crkbd/keymaps/vxid/config.h create mode 100644 keyboards/crkbd/keymaps/vxid/keymap.c create mode 100644 keyboards/crkbd/keymaps/vxid/rules.mk diff --git a/keyboards/crkbd/keymaps/vxid/README.md b/keyboards/crkbd/keymaps/vxid/README.md new file mode 100644 index 000000000..7b0f9b8af --- /dev/null +++ b/keyboards/crkbd/keymaps/vxid/README.md @@ -0,0 +1,3 @@ +# Vxid crkbd layout + +Inspired by sdothum's wide planck layout. diff --git a/keyboards/crkbd/keymaps/vxid/config.h b/keyboards/crkbd/keymaps/vxid/config.h new file mode 100644 index 000000000..bbf76d705 --- /dev/null +++ b/keyboards/crkbd/keymaps/vxid/config.h @@ -0,0 +1,44 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +// #define MASTER_LEFT +#define MASTER_RIGHT +// #define EE_HANDS + +#define SSD1306OLED + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 100 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 27 +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 diff --git a/keyboards/crkbd/keymaps/vxid/keymap.c b/keyboards/crkbd/keymaps/vxid/keymap.c new file mode 100644 index 000000000..e1c73caeb --- /dev/null +++ b/keyboards/crkbd/keymaps/vxid/keymap.c @@ -0,0 +1,85 @@ +#include QMK_KEYBOARD_H +#include "bootloader.h" +#ifdef PROTOCOL_LUFA + #include "lufa.h" + #include "split_util.h" +#endif + +extern keymap_config_t keymap_config; + +extern uint8_t is_master; + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE +}; + +#define KC______ KC_TRNS +#define KC_XXXXX KC_NO +#define KC_LOWER LOWER +#define KC_RAISE RAISE + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_kc( \ + //,-----------------------------------------. ,-----------------------------------------. + Q, W, E, R, T, ESC, DEL, Y, U, I, O, P,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + A, S, D, F, G, SPC, BSPC, H, J, K, L, SCLN,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + Z, X, C, V, B, TAB, ENT, N, M, COMM, DOT, SLSH,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + LALT, LGUI, LCTL, LSFT, RAISE, LOWER \ + //`--------------------' `--------------------' + ), + + [_LOWER] = LAYOUT_kc( \ + //,-----------------------------------------. ,------------------------------------------. + 1, 2, 3, 4, 5, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|------+------+------+------+------+------| |-------+------+------+------+------+------| + 6, 7, 8, 9, 0, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|------+------+------+------+------+------| |-------+------+------+------+------+------| + EQL, PLUS, MINS, SLSH, ASTR, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|------+------+------+------+------+------+------| |------+-------+------+------+------+------+------| + LALT, LGUI, LCTL, LSFT, RAISE, LOWER \ + //`--------------------' `--------------------' + ), + + [_RAISE] = LAYOUT_kc( \ + //,-----------------------------------------. ,------------------------------------------. + EXLM, AT, HASH, DLR, PERC, LPRN, RPRN, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|------+------+------+------+------+------| |-------+------+------+------+------+------| + CIRC, AMPR, ASTR, QUOT, DQUO, LCBR, RCBR, LEFT, DOWN, UP, RIGHT, XXXXX,\ + //|------+------+------+------+------+------| |-------+------+------+------+------+------| + BSLS, TILD, GRV, UNDS, PIPE, LBRC, RBRC, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|------+------+------+------+------+------+------| |------+-------+------+------+------+------+------| + LALT, LGUI, LCTL, LSFT, RAISE, LOWER \ + //`--------------------' `--------------------' + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + } else { + layer_off(_LOWER); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + } else { + layer_off(_RAISE); + } + return false; + break; + } + return true; +} diff --git a/keyboards/crkbd/keymaps/vxid/rules.mk b/keyboards/crkbd/keymaps/vxid/rules.mk new file mode 100644 index 000000000..83e87ecf9 --- /dev/null +++ b/keyboards/crkbd/keymaps/vxid/rules.mk @@ -0,0 +1,31 @@ + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing + +# 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 you want to change the display of OLED, you need to change here +SRC += ./lib/glcdfont.c \ + ./lib/rgb_state_reader.c \ + ./lib/layer_state_reader.c \ + ./lib/logo_reader.c \ + ./lib/keylogger.c \ + # ./lib/mode_icon_reader.c \ + # ./lib/host_led_state_reader.c \ + # ./lib/timelogger.c \ From dfebfecd48ebe972e7374e9ce26c795e3ddc88ae Mon Sep 17 00:00:00 2001 From: Jason Krasavage Date: Mon, 8 Jul 2019 14:58:12 -0500 Subject: [PATCH 313/341] [Keymap] Added my own keymap folder (#6261) * added iris rev 3 keymap * stuff * Update config.h * Removed personal mapping folder so that I can branch it * Added personal Iris keymap folder * added enums, removed break after return, and removed line 3 of keymap.c * removed process record function --- .../iris/keymaps/jasonkrasavage/config.h | 25 +++++++++++ .../iris/keymaps/jasonkrasavage/keymap.c | 44 +++++++++++++++++++ .../iris/keymaps/jasonkrasavage/rules.mk | 1 + 3 files changed, 70 insertions(+) create mode 100644 keyboards/keebio/iris/keymaps/jasonkrasavage/config.h create mode 100644 keyboards/keebio/iris/keymaps/jasonkrasavage/keymap.c create mode 100644 keyboards/keebio/iris/keymaps/jasonkrasavage/rules.mk diff --git a/keyboards/keebio/iris/keymaps/jasonkrasavage/config.h b/keyboards/keebio/iris/keymaps/jasonkrasavage/config.h new file mode 100644 index 000000000..751acc643 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/jasonkrasavage/config.h @@ -0,0 +1,25 @@ +/* +Copyright 2017 Danny Nguyen + +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 . +*/ + +#pragma once + +// #define USE_I2C +#define EE_HANDS + +#undef RGBLED_NUM + +#define RGBLED_NUM 12 \ No newline at end of file diff --git a/keyboards/keebio/iris/keymaps/jasonkrasavage/keymap.c b/keyboards/keebio/iris/keymaps/jasonkrasavage/keymap.c new file mode 100644 index 000000000..6901d6db8 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/jasonkrasavage/keymap.c @@ -0,0 +1,44 @@ +#include QMK_KEYBOARD_H + + +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_CAPSLOCK, 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_LBRACKET, KC_RBRACKET, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + KC_LALT, KC_LGUI, KC_ENT, MO(_LOWER), KC_SPC, KC_RALT + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_LOWER] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, KC_LPRN, _______, _______, KC_RPRN, _______, _______, _______, _______, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, _______, _______, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ) +}; + diff --git a/keyboards/keebio/iris/keymaps/jasonkrasavage/rules.mk b/keyboards/keebio/iris/keymaps/jasonkrasavage/rules.mk new file mode 100644 index 000000000..7ad666d1a --- /dev/null +++ b/keyboards/keebio/iris/keymaps/jasonkrasavage/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes \ No newline at end of file From 8b1cdd1e3d27cce830c36f9604e5f69337b2c83e Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 9 Jul 2019 07:07:36 +1000 Subject: [PATCH 314/341] Add copyright year placeholders to new keyboard script (#6280) * Add copyright year placeholders to new keyboard script * More copyright header tweaks --- quantum/template/avr/config.h | 2 +- quantum/template/avr/template.c | 2 +- quantum/template/base/keymaps/default/config.h | 2 +- quantum/template/base/keymaps/default/keymap.c | 2 +- quantum/template/base/template.h | 2 +- quantum/template/ps2avrgb/config.h | 2 +- quantum/template/ps2avrgb/rules.mk | 15 --------------- quantum/template/ps2avrgb/template.c | 2 +- quantum/template/ps2avrgb/usbconfig.h | 10 ---------- util/new_keyboard.sh | 13 +++++++++++++ 10 files changed, 20 insertions(+), 32 deletions(-) diff --git a/quantum/template/avr/config.h b/quantum/template/avr/config.h index c13784ba1..1e41a2d31 100644 --- a/quantum/template/avr/config.h +++ b/quantum/template/avr/config.h @@ -1,5 +1,5 @@ /* -Copyright 2019 %YOUR_NAME% +Copyright %YEAR% %YOUR_NAME% 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 diff --git a/quantum/template/avr/template.c b/quantum/template/avr/template.c index 86dc69abc..e852a42c4 100644 --- a/quantum/template/avr/template.c +++ b/quantum/template/avr/template.c @@ -1,4 +1,4 @@ -/* Copyright 2019 %YOUR_NAME% +/* Copyright %YEAR% %YOUR_NAME% * * 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 diff --git a/quantum/template/base/keymaps/default/config.h b/quantum/template/base/keymaps/default/config.h index 44382016a..5b00c8956 100644 --- a/quantum/template/base/keymaps/default/config.h +++ b/quantum/template/base/keymaps/default/config.h @@ -1,4 +1,4 @@ -/* Copyright 2019 %YOUR_NAME% +/* Copyright %YEAR% %YOUR_NAME% * * 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 diff --git a/quantum/template/base/keymaps/default/keymap.c b/quantum/template/base/keymaps/default/keymap.c index 482a44544..0e9fad357 100644 --- a/quantum/template/base/keymaps/default/keymap.c +++ b/quantum/template/base/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2019 %YOUR_NAME% +/* Copyright %YEAR% %YOUR_NAME% * * 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 diff --git a/quantum/template/base/template.h b/quantum/template/base/template.h index 5b5076c47..2e531b1fd 100644 --- a/quantum/template/base/template.h +++ b/quantum/template/base/template.h @@ -1,4 +1,4 @@ -/* Copyright 2019 %YOUR_NAME% +/* Copyright %YEAR% %YOUR_NAME% * * 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 diff --git a/quantum/template/ps2avrgb/config.h b/quantum/template/ps2avrgb/config.h index d954fec96..320d71fcb 100644 --- a/quantum/template/ps2avrgb/config.h +++ b/quantum/template/ps2avrgb/config.h @@ -1,5 +1,5 @@ /* -Copyright 2017 Luiz Ribeiro +Copyright %YEAR% %YOUR_NAME% 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 diff --git a/quantum/template/ps2avrgb/rules.mk b/quantum/template/ps2avrgb/rules.mk index bd0eed052..98a920e18 100644 --- a/quantum/template/ps2avrgb/rules.mk +++ b/quantum/template/ps2avrgb/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2019 Luiz Ribeiro -# -# 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 . - # MCU name MCU = atmega32a PROTOCOL = VUSB diff --git a/quantum/template/ps2avrgb/template.c b/quantum/template/ps2avrgb/template.c index 3f920de48..07f27bbb2 100644 --- a/quantum/template/ps2avrgb/template.c +++ b/quantum/template/ps2avrgb/template.c @@ -1,4 +1,4 @@ -/* Copyright 2019 %YOUR_NAME% +/* Copyright %YEAR% %YOUR_NAME% * * 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 diff --git a/quantum/template/ps2avrgb/usbconfig.h b/quantum/template/ps2avrgb/usbconfig.h index 54a7d20f1..465db3a13 100644 --- a/quantum/template/ps2avrgb/usbconfig.h +++ b/quantum/template/ps2avrgb/usbconfig.h @@ -1,13 +1,3 @@ -/* Name: usbconfig.h - * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers - * Author: Christian Starkjohann - * Creation Date: 2005-04-01 - * Tabsize: 4 - * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH - * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) - * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ - */ - #pragma once #include "config.h" diff --git a/util/new_keyboard.sh b/util/new_keyboard.sh index e9ce30978..35d89e402 100755 --- a/util/new_keyboard.sh +++ b/util/new_keyboard.sh @@ -70,6 +70,18 @@ replace_placeholders() { echo " done" } +# Replace %YEAR% with the current year. +replace_year_placeholders() { + local replace_year_filenames=( + "${keyboard_dir}/config.h" + "${keyboard_dir}/${keyboard_name}.c" + "${keyboard_dir}/${keyboard_name}.h" + "${keyboard_dir}/keymaps/default/config.h" + "${keyboard_dir}/keymaps/default/keymap.c" + ) + replace_placeholders "%YEAR%" "$(date +%Y)" "${replace_year_filenames[@]}" +} + # Replace %KEYBOARD% with the keyboard name. replace_keyboard_placeholders() { local replace_keyboard_filenames=( @@ -149,6 +161,7 @@ echo copy_templates set_sed_i +replace_year_placeholders replace_keyboard_placeholders [ -n "$username" ] && replace_name_placeholders From 220873dfebaac06f4686f619622babcd40bc54a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Tue, 9 Jul 2019 15:52:23 +0200 Subject: [PATCH 315/341] [Keymap] Add personal Wasdat keymap, update other keymaps (#6290) * Add wasdat:konstantin keymap TODO: Move it to layouts/ * Use HHKB arrow arrangement for mouse keys on KBD6X * Move KC_APP from Ctrl to M on all boards * Use RCT_RSF on Melody96 * Set TAP_HOLD_CAPS_DELAY to 50 in userspace * Use RSF_RCT instead of RCT_RSF --- .../kbdfans/kbd6x/keymaps/konstantin/keymap.c | 16 ++-- .../melody96/keymaps/konstantin/keymap.c | 20 ++--- keyboards/wasdat/keymaps/konstantin/config.h | 4 + keyboards/wasdat/keymaps/konstantin/keymap.c | 79 +++++++++++++++++++ keyboards/wasdat/keymaps/konstantin/rules.mk | 8 ++ .../whitefox/keymaps/konstantin/keymap.c | 8 +- users/konstantin/config.h | 5 +- 7 files changed, 116 insertions(+), 24 deletions(-) create mode 100644 keyboards/wasdat/keymaps/konstantin/config.h create mode 100644 keyboards/wasdat/keymaps/konstantin/keymap.c create mode 100644 keyboards/wasdat/keymaps/konstantin/rules.mk diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c index bb8ab6b9b..d06ac1956 100644 --- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c +++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c @@ -56,20 +56,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│PSc│Ins│ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ - * │ │Hom│ ↑ │End│PgU│ │ │ │ │M1 │M↑ │M3 │M2 │ Del │ + * │ │Hom│ ↑ │End│PgU│ │ │ │ │M3 │M1 │M↑ │M2 │ Del │ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ ← │ ↓ │ → │PgD│ │ │ │MW↑│M← │M↓ │M→ │ │ + * │ │ ← │ ↓ │ → │PgD│ │ │ │ │MW↑│M← │M→ │ │ * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ - * │ │Mut│Vo-│Vo+│Ply│Prv│Nxt│MW←│MW→│M4 │M5 │ │ │ + * │ │Mut│Vo-│Vo+│Ply│Prv│Nxt│App│MW←│MW→│M↓ │ │ │ * └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘ * │ │ │ MW↓ │MAcl2│ │ * └───┴─────┴───────────────────────────┴─────┴───┘ */ [L_FN] = LAYOUT( _______, 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_PSCR, KC_INS, - _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN3, KC_BTN2, KC_DEL, - _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, _______, - _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MPRV, KC_MNXT, KC_WH_L, KC_WH_R, KC_BTN4, KC_BTN5, _______, _______, + _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, KC_BTN3, KC_BTN1, KC_MS_U, KC_BTN2, KC_DEL, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, _______, KC_WH_U, KC_MS_L, KC_MS_R, _______, + _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MPRV, KC_MNXT, KC_APP, KC_WH_L, KC_WH_R, KC_MS_D, _______, _______, XXXXXXX, _______, _______, KC_WH_D, KC_ACL2, _______, XXXXXXX ), @@ -81,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ * │ │Mv←│Mv↓│Mv→│TNx│ │ │ │ │ │ │ │ │ * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ - * │ │RTg│RV-│RV+│ │ │ │ │ │ │ │ │ │ + * │ │RTg│RV-│RV+│ │ │ │ │M4 │M5 │ │ │ │ * └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘ * │DPR│DstNA│ │ │ │ * └───┴─────┴───────────────────────────┴─────┴───┘ @@ -90,7 +90,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLEAR, _______, TOP, MV_UP, BOTTOM, TAB_PRV, _______, _______, _______, _______, _______, _______, _______, _______, DEL_NXT, _______, MV_LEFT, MV_DOWN, MV_RGHT, TAB_NXT, _______, _______, _______, _______, _______, _______, _______, _______, - _______, RGB_TOG, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_VAD, RGB_VAI, _______, _______, _______, _______, KC_BTN4, KC_BTN5, _______, _______, _______, XXXXXXX, DST_P_R, DST_N_A, _______, _______, _______, XXXXXXX ), }; diff --git a/keyboards/melody96/keymaps/konstantin/keymap.c b/keyboards/melody96/keymaps/konstantin/keymap.c index 7d65a0e98..deaffd53d 100644 --- a/keyboards/melody96/keymaps/konstantin/keymap.c +++ b/keyboards/melody96/keymaps/konstantin/keymap.c @@ -38,18 +38,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┼───┼───┤P+ │ * │FnCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │P4 │P5 │P6 │ │ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┼───┼───┼───┤ - * │LSft│RAG│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│ ↑ │P1 │P2 │P3 │ │ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┼───┼───┤PEn│ - * │LCtl│LGui│LAlt│ Space │RAG│FnL│RCt│ ← │ ↓ │ → │P0 │P. │ │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ + * │LSft│RAG│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RSfRCt│ ↑ │P1 │P2 │P3 │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┼───┼───┼───┼───┤PEn│ + * │LCtl│LGui│LAlt│ Space │RAlGu│FnLk │ ← │ ↓ │ → │P0 │P. │ │ + * └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┴───┴───┴───┘ */ [L_BASE] = LAYOUT( KC_ESC, 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_PSCR, KC_INS, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_GRV, 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_BSLS, KC_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, 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_BSPC, KC_P7, KC_P8, KC_P9, XXXXXXX, FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, - KC_LSFT, RAL_RGU, 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_P1, KC_P2, KC_P3, XXXXXXX, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, RAL_RGU, FN_FNLK, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + KC_LSFT, RAL_RGU, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSF_RCT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXXX, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, RAL_RGU, XXXXXXX, FN_FNLK, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT ), /* Function layer @@ -62,9 +62,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┼───┼───┤RSt│ * │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │RH-│RS-│RV-│ │ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┼───┼───┼───┤ - * │ │ │MA0│MA2│MW←│MW→│ │ │ │Vo-│Vo+│Mut│ │PgU│RMR│RMS│RMB│ │ + * │ │ │MA0│MA2│MW←│MW→│ │ │App│Vo-│Vo+│Mut│ │PgU│RMR│RMS│RMB│ │ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┼───┼───┤RMP│ - * │ │DtPR│DtNA│ MW↓ │ │ │App│Hom│PgD│End│RM-│RM+│ │ + * │ │DtPR│DtNA│ MW↓ │ │ │ │Hom│PgD│End│RM-│RM+│ │ * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ */ [L_FN] = LAYOUT( @@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, RGB_TOG, DIVIDE, TIMES, MINUS, KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SET, - _______, _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, RGB_M_R, RGB_M_SN,RGB_M_B, XXXXXXX, - _______, DST_P_R, DST_N_A, KC_WH_D, _______, _______, KC_APP, KC_HOME, KC_PGDN, KC_END, RGB_RMOD,RGB_MOD, RGB_M_P + _______, _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, KC_APP, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, RGB_M_R, RGB_M_SN,RGB_M_B, XXXXXXX, + _______, DST_P_R, DST_N_A, KC_WH_D, _______, XXXXXXX, _______, KC_HOME, KC_PGDN, KC_END, RGB_RMOD,RGB_MOD, RGB_M_P ), }; diff --git a/keyboards/wasdat/keymaps/konstantin/config.h b/keyboards/wasdat/keymaps/konstantin/config.h new file mode 100644 index 000000000..3c2583e2d --- /dev/null +++ b/keyboards/wasdat/keymaps/konstantin/config.h @@ -0,0 +1,4 @@ +#pragma once + +#define LAYER_FN +#define LAYER_NUMPAD diff --git a/keyboards/wasdat/keymaps/konstantin/keymap.c b/keyboards/wasdat/keymaps/konstantin/keymap.c new file mode 100644 index 000000000..4fb24a5e3 --- /dev/null +++ b/keyboards/wasdat/keymaps/konstantin/keymap.c @@ -0,0 +1,79 @@ +#include QMK_KEYBOARD_H +#include "konstantin.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base layer + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐┌───┬───┬───┐ + * │Esc│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12││PSc│SLk│Pau│ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘└───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Bspace ││Ins│Hom│PgU│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ ││Del│End│PgD│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐Ent │└───┴───┴───┘ + * │FnCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ \ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ + * │LSft│RAG│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ RShift │ │ ↑ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤┌───┼───┼───┐ + * │LCtl│LGui│LAlt│ Space │RAlt│RGui│FnLk│RCtl││ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘ + */ + [L_BASE] = LAYOUT_tkl_iso( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, 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_INS, KC_HOME, 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_DEL, KC_END, KC_PGDN, + FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, + KC_LSFT, RAL_RGU, 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_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, FN_FNLK, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Function layer + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐┌───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │Num│ │ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘└───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐ + * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ Clear ││ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤ + * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │UCM│ │Stp│Ply│Prv│Nxt│ ││ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │└───┴───┴───┘ + * │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ + * │ │ │MA0│MA2│MW←│MW→│ │ │App│Vo-│Vo+│Mut│ │ │PgU│ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤┌───┼───┼───┐ + * │ │DtPR│DtNA│ MW↓ │ │ │ │ ││Hom│PgD│End│ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘ + */ + [L_FN] = LAYOUT_tkl_iso( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NUMPAD, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, CLEAR, _______, _______, _______, + KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, _______, _______, _______, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, KC_APP, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, + _______, DST_P_R, DST_N_A, KC_WH_D, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), + + /* Numpad layer + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐┌───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │Num│ │ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘└───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐ + * │ │ │ │ │ │ │ │P7 │P8 │P9 │P- │ − │ = │ ││ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤ + * │ │ │ │ │ │ │ │P4 │P5 │P6 │P+ │ ( │ ) │ ││ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐PEnt│└───┴───┴───┘ + * │ │ │ │ │ │ │ │P1 │P2 │P3 │P* │ × │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ + * │ │ │ │ │ │ │ │P0 │P0 │ , │P. │P/ │ ÷ │ │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤┌───┼───┼───┐ + * │ │ │ │ │ │ │ │ ││ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘ + */ + [L_NUMPAD] = LAYOUT_tkl_iso( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NUMPAD, _______, + _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, MINUS, EQUALS, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, L_PAREN, R_PAREN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PAST, TIMES, _______, KC_PENT, + _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_P0, COMMA, KC_PDOT, KC_PSLS, DIVIDE, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/wasdat/keymaps/konstantin/rules.mk b/keyboards/wasdat/keymaps/konstantin/rules.mk new file mode 100644 index 000000000..4bb1ee658 --- /dev/null +++ b/keyboards/wasdat/keymaps/konstantin/rules.mk @@ -0,0 +1,8 @@ +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = yes +CONSOLE_ENABLE = yes +EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes +TAP_DANCE_ENABLE = yes +UNICODEMAP_ENABLE = yes diff --git a/keyboards/whitefox/keymaps/konstantin/keymap.c b/keyboards/whitefox/keymaps/konstantin/keymap.c index c8c8c790c..3874bcd18 100644 --- a/keyboards/whitefox/keymaps/konstantin/keymap.c +++ b/keyboards/whitefox/keymaps/konstantin/keymap.c @@ -10,7 +10,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ * │FnCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│ * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ - * │ LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RCtRSf│ ↑ │PgD│ + * │ LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RSfRCt│ ↑ │PgD│ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ * │LCtl│LGui│LAlt│ Space │RAlG│FnLk│ │ ← │ ↓ │ → │ * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ @@ -19,7 +19,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, 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_BSLS, KC_GRV, KC_PSCR, 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_BSPC, KC_DEL, FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RCT_RSF, KC_UP, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSF_RCT, KC_UP, KC_PGDN, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, RAL_RGU, FN_FNLK, KC_LEFT, KC_DOWN, KC_RGHT ), @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ * │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │Top│ * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ - * │ │MA0│MA2│MW←│MW→│ │ │ │Vo-│Vo+│Mut│ App │PgU│Btm│ + * │ │MA0│MA2│MW←│MW→│ │ │App│Vo-│Vo+│Mut│ │PgU│Btm│ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ * │ │DtPR│DtNA│ MW↓ │ │ │ │Hom│PgD│End│ * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, NUMPAD, KC_SLCK, KC_PAUS, KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, KC_INS, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, TOP, - _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_APP, KC_PGUP, BOTTOM, + _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, KC_APP, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, BOTTOM, _______, DST_P_R, DST_N_A, KC_WH_D, _______, _______, KC_HOME, KC_PGDN, KC_END ), diff --git a/users/konstantin/config.h b/users/konstantin/config.h index 4ca19f824..4edab2baa 100644 --- a/users/konstantin/config.h +++ b/users/konstantin/config.h @@ -14,8 +14,9 @@ #define NO_ACTION_ONESHOT #define PERMISSIVE_HOLD -#define TAPPING_TERM 200 -#define TAPPING_TOGGLE 2 +#define TAPPING_TERM 200 +#define TAPPING_TOGGLE 2 +#define TAP_HOLD_CAPS_DELAY 50 #define UNICODE_CYCLE_PERSIST false #define UNICODE_SELECTED_MODES UC_WINC, UC_WIN, UC_LNX From d780c2729ba10a2c5ac2dbfc3346faabed4f266b Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Tue, 9 Jul 2019 07:06:30 -0700 Subject: [PATCH 316/341] [Keyboard] Omnikeyish: fix LAYOUT_101 macro (#6285) * Fix LAYOUT_101 macro * Add default_101 keymap to prove the LAYOUT_101 macro works --- keyboards/omnikeyish/keymaps/default_101/keymap.c | 14 ++++++++++++++ keyboards/omnikeyish/omnikeyish.h | 6 +++--- 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 keyboards/omnikeyish/keymaps/default_101/keymap.c diff --git a/keyboards/omnikeyish/keymaps/default_101/keymap.c b/keyboards/omnikeyish/keymaps/default_101/keymap.c new file mode 100644 index 000000000..6e5e41cd1 --- /dev/null +++ b/keyboards/omnikeyish/keymaps/default_101/keymap.c @@ -0,0 +1,14 @@ +#include QMK_KEYBOARD_H + +#define M_PROG DYN_MACRO_PROG + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT_101( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, 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_INS, KC_HOME, KC_PGUP, M_PROG, KC_PSLS, KC_PAST, KC_PMNS, + 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, + 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_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ) +}; diff --git a/keyboards/omnikeyish/omnikeyish.h b/keyboards/omnikeyish/omnikeyish.h index 3c8192b87..8f3e69bc3 100644 --- a/keyboards/omnikeyish/omnikeyish.h +++ b/keyboards/omnikeyish/omnikeyish.h @@ -29,15 +29,15 @@ enum keycodes { } /* Northgate Factory Plates. Most are based on internet research, user beware. */ -#define LAYOUT_101 ( \ +#define LAYOUT_101( \ K103, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, \ K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222, K223, \ - K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316 K317, K318, K319, K320, K321, K322, K323, \ + K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, K319, K320, K321, K322, K323, \ K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K416, K420, K421, K422, \ K503, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K518, K520, K521, K522, K523, \ K603, K605, K610, K613, K616, K617, K618, K619, K620, K622 \ ) { \ - { ____, ____, K103, ____ K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, ____, ____, ____, ____ }, \ + { ____, ____, K103, ____, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, ____, ____, ____, ____ }, \ { ____, ____, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222, K223 }, \ { ____, ____, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, K319, K320, K321, K322, K323 }, \ { ____, ____, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, ____, K416, ____, ____, ____, K420, K421, K422, ____ }, \ From 3184303037ed3344c145d2cd8751a2c550631a78 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Tue, 9 Jul 2019 07:17:37 -0700 Subject: [PATCH 317/341] [Keyboard] Espectro: add LAYOUT_split_bs_joined_right data to QMK Configurator (#6289) --- keyboards/espectro/info.json | 111 +++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) diff --git a/keyboards/espectro/info.json b/keyboards/espectro/info.json index 7a8c9bc0a..dc8546f53 100644 --- a/keyboards/espectro/info.json +++ b/keyboards/espectro/info.json @@ -117,6 +117,117 @@ ] }, + "LAYOUT_split_bs_joined_right": { + "key_count": 100, + "layout": [ + {"label": "K00", "x": 0, "y": 0}, + {"label": "K01", "x": 1, "y": 0}, + {"label": "K02", "x": 2, "y": 0}, + {"label": "K03", "x": 3, "y": 0}, + {"label": "K04", "x": 4, "y": 0}, + {"label": "K60", "x": 5, "y": 0}, + {"label": "K61", "x": 6, "y": 0}, + {"label": "K62", "x": 7, "y": 0}, + {"label": "K63", "x": 8, "y": 0}, + {"label": "K05", "x": 9, "y": 0}, + {"label": "K06", "x": 10, "y": 0}, + {"label": "K07", "x": 11, "y": 0}, + {"label": "K08", "x": 12, "y": 0}, + {"label": "K72", "x": 13, "y": 0}, + {"label": "K09", "x": 14, "y": 0}, + {"label": "K0A", "x": 15, "y": 0}, + {"label": "K0B", "x": 16, "y": 0}, + {"label": "K0C", "x": 17, "y": 0}, + {"label": "K7C", "x": 18, "y": 0}, + + {"label": "K10", "x": 0, "y": 1}, + {"label": "K11", "x": 1, "y": 1}, + {"label": "K12", "x": 2, "y": 1}, + {"label": "K13", "x": 3, "y": 1}, + {"label": "K14", "x": 4, "y": 1}, + {"label": "K64", "x": 5, "y": 1}, + {"label": "K65", "x": 6, "y": 1}, + {"label": "K66", "x": 7, "y": 1}, + {"label": "K67", "x": 8, "y": 1}, + {"label": "K15", "x": 9, "y": 1}, + {"label": "K16", "x": 10, "y": 1}, + {"label": "K17", "x": 11, "y": 1}, + {"label": "K18", "x": 12, "y": 1}, + {"label": "K70", "x": 13, "y": 1}, + {"label": "K71", "x": 14, "y": 1}, + {"label": "K19", "x": 15, "y": 1}, + {"label": "K1A", "x": 16, "y": 1}, + {"label": "K1B", "x": 17, "y": 1}, + {"label": "K1C", "x": 18, "y": 1}, + + {"label": "K20", "x": 0, "y": 2, "w": 1.5}, + {"label": "K21", "x": 1.5, "y": 2}, + {"label": "K22", "x": 2.5, "y": 2}, + {"label": "K23", "x": 3.5, "y": 2}, + {"label": "K24", "x": 4.5, "y": 2}, + {"label": "K68", "x": 5.5, "y": 2}, + {"label": "K69", "x": 6.5, "y": 2}, + {"label": "K6A", "x": 7.5, "y": 2}, + {"label": "K6B", "x": 8.5, "y": 2}, + {"label": "K25", "x": 9.5, "y": 2}, + {"label": "K26", "x": 10.5, "y": 2}, + {"label": "K27", "x": 11.5, "y": 2}, + {"label": "K28", "x": 12.5, "y": 2}, + {"label": "K73", "x": 13.5, "y": 2, "w": 1.5}, + {"label": "K29", "x": 15, "y": 2}, + {"label": "K2A", "x": 16, "y": 2}, + {"label": "K2B", "x": 17, "y": 2}, + {"label": "K2C", "x": 18, "y": 2, "h": 2}, + + {"label": "K30", "x": 0, "y": 3, "w": 1.75}, + {"label": "K31", "x": 1.75, "y": 3}, + {"label": "K32", "x": 2.75, "y": 3}, + {"label": "K33", "x": 3.75, "y": 3}, + {"label": "K34", "x": 4.75, "y": 3}, + {"label": "K6C", "x": 5.75, "y": 3}, + {"label": "K75", "x": 6.75, "y": 3}, + {"label": "K76", "x": 7.75, "y": 3}, + {"label": "K77", "x": 8.75, "y": 3}, + {"label": "K35", "x": 9.75, "y": 3}, + {"label": "K36", "x": 10.75, "y": 3}, + {"label": "K37", "x": 11.75, "y": 3}, + {"label": "K38", "x": 12.75, "y": 3, "w": 2.25}, + {"label": "K39", "x": 15, "y": 3}, + {"label": "K3A", "x": 16, "y": 3}, + {"label": "K3B", "x": 17, "y": 3}, + + {"label": "K40", "x": 0, "y": 4, "w": 2.25}, + {"label": "K42", "x": 2.25, "y": 4}, + {"label": "K43", "x": 3.25, "y": 4}, + {"label": "K44", "x": 4.25, "y": 4}, + {"label": "K78", "x": 5.25, "y": 4}, + {"label": "K79", "x": 6.25, "y": 4}, + {"label": "K7A", "x": 7.25, "y": 4}, + {"label": "K7B", "x": 8.25, "y": 4}, + {"label": "K45", "x": 9.25, "y": 4}, + {"label": "K46", "x": 10.25, "y": 4}, + {"label": "K47", "x": 11.25, "y": 4}, + {"label": "K48", "x": 12.25, "y": 4, "w": 1.75}, + {"label": "K74", "x": 14, "y": 4}, + {"label": "K49", "x": 15, "y": 4}, + {"label": "K4A", "x": 16, "y": 4}, + {"label": "K4B", "x": 17, "y": 4}, + {"label": "K4C", "x": 18, "y": 4, "h": 2}, + + {"label": "K50", "x": 0, "y": 5, "w": 1.25}, + {"label": "K51", "x": 1.25, "y": 5, "w": 1.25}, + {"label": "K52", "x": 2.5, "y": 5, "w": 1.25}, + {"label": "K59", "x": 3.75, "y": 5, "w": 6.25}, + {"label": "K55", "x": 10, "y": 5, "w": 1.5}, + {"label": "K57", "x": 11.5, "y": 5, "w": 1.5}, + {"label": "K58", "x": 13, "y": 5}, + {"label": "K53", "x": 14, "y": 5}, + {"label": "K54", "x": 15, "y": 5}, + {"label": "K5A", "x": 16, "y": 5}, + {"label": "K5B", "x": 17, "y": 5} + ] + }, + "LAYOUT_split_shift_and_bs": { "key_count": 104, "layout": [ From 6cccc22be933d0ee59368979bc58c3a7d02e3d7b Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 9 Jul 2019 07:57:14 -0700 Subject: [PATCH 318/341] Use QUANTUM_LIB_SRC for i2c_master.c inclusion (#5617) Using QUANTUM_LIB_SRC prevents the warning when multiple sources add the i2c_master.c file. Boards such as the Ergodox EZ Glow see this warning every time they compile because the board uses the file in general, and because the RGB LED Matrix requires it, as well. --- common_features.mk | 10 +++++----- drivers/qwiic/qwiic.mk | 4 +--- keyboards/ergodox_ez/rules.mk | 6 +----- keyboards/model01/rules.mk | 4 ++-- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/common_features.mk b/common_features.mk index 7c35f07d5..3296424a1 100644 --- a/common_features.mk +++ b/common_features.mk @@ -133,7 +133,7 @@ ifeq ($(strip $(LED_MATRIX_ENABLE)), IS31FL3731) OPT_DEFS += -DIS31FL3731 COMMON_VPATH += $(DRIVER_PATH)/issi SRC += is31fl3731-simple.c - SRC += i2c_master.c + QUANTUM_LIB_SRC += i2c_master.c endif RGB_MATRIX_ENABLE ?= no @@ -157,21 +157,21 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3731) OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE COMMON_VPATH += $(DRIVER_PATH)/issi SRC += is31fl3731.c - SRC += i2c_master.c + QUANTUM_LIB_SRC += i2c_master.c endif ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3733) OPT_DEFS += -DIS31FL3733 -DSTM32_I2C -DHAL_USE_I2C=TRUE COMMON_VPATH += $(DRIVER_PATH)/issi SRC += is31fl3733.c - SRC += i2c_master.c + QUANTUM_LIB_SRC += i2c_master.c endif ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3737) OPT_DEFS += -DIS31FL3737 -DSTM32_I2C -DHAL_USE_I2C=TRUE COMMON_VPATH += $(DRIVER_PATH)/issi SRC += is31fl3737.c - SRC += i2c_master.c + QUANTUM_LIB_SRC += i2c_master.c endif ifeq ($(strip $(RGB_MATRIX_ENABLE)), WS2812) @@ -271,7 +271,7 @@ ifeq ($(strip $(HAPTIC_ENABLE)), DRV2605L) COMMON_VPATH += $(DRIVER_PATH)/haptic SRC += haptic.c SRC += DRV2605L.c - SRC += i2c_master.c + QUANTUM_LIB_SRC += i2c_master.c OPT_DEFS += -DHAPTIC_ENABLE OPT_DEFS += -DDRV2605L endif diff --git a/drivers/qwiic/qwiic.mk b/drivers/qwiic/qwiic.mk index 4ae2d78e3..b23c25657 100644 --- a/drivers/qwiic/qwiic.mk +++ b/drivers/qwiic/qwiic.mk @@ -2,9 +2,7 @@ ifneq ($(strip $(QWIIC_ENABLE)),) COMMON_VPATH += $(DRIVER_PATH)/qwiic OPT_DEFS += -DQWIIC_ENABLE SRC += qwiic.c - ifeq ($(filter "i2c_master.c", $(SRC)),) - SRC += i2c_master.c - endif + QUANTUM_LIB_SRC += i2c_master.c endif ifneq ($(filter JOYSTIIC, $(QWIIC_ENABLE)),) diff --git a/keyboards/ergodox_ez/rules.mk b/keyboards/ergodox_ez/rules.mk index e96cd2082..2882072a6 100644 --- a/keyboards/ergodox_ez/rules.mk +++ b/keyboards/ergodox_ez/rules.mk @@ -16,6 +16,7 @@ # # project specific files SRC += matrix.c +QUANTUM_LIB_SRC += i2c_master.c # MCU name MCU = atmega32u4 @@ -85,9 +86,4 @@ RGBLIGHT_ENABLE = yes RGB_MATRIX_ENABLE = no # enable later DEBOUNCE_TYPE = eager_pr -ifeq ($(strip $(RGB_MATRIX_ENABLE)), no) - SRC += i2c_master.c -endif - - LAYOUTS = ergodox diff --git a/keyboards/model01/rules.mk b/keyboards/model01/rules.mk index 49ab981d1..4345027f4 100644 --- a/keyboards/model01/rules.mk +++ b/keyboards/model01/rules.mk @@ -1,5 +1,5 @@ -SRC += i2c_master.c \ - leds.c \ +QUANTUM_LIB_SRC += i2c_master.c +SRC += leds.c \ matrix.c # MCU name From 207e50c5347adeb6d66c092d5f41d7dc52d4a166 Mon Sep 17 00:00:00 2001 From: Kaylyn Bogle Date: Tue, 9 Jul 2019 08:01:11 -0700 Subject: [PATCH 319/341] Add G35 keyboard (#6263) --- keyboards/mechllama/g35/config.h | 39 ++++++++++ keyboards/mechllama/g35/g35.c | 16 +++++ keyboards/mechllama/g35/g35.h | 33 +++++++++ keyboards/mechllama/g35/info.json | 14 ++++ .../mechllama/g35/keymaps/default/keymap.c | 72 +++++++++++++++++++ .../mechllama/g35/keymaps/default/readme.md | 4 ++ keyboards/mechllama/g35/readme.md | 15 ++++ keyboards/mechllama/g35/rules.mk | 14 ++++ keyboards/mechllama/g35/v1/config.h | 25 +++++++ keyboards/mechllama/g35/v1/rules.mk | 0 keyboards/mechllama/g35/v2/config.h | 25 +++++++ keyboards/mechllama/g35/v2/rules.mk | 0 12 files changed, 257 insertions(+) create mode 100644 keyboards/mechllama/g35/config.h create mode 100644 keyboards/mechllama/g35/g35.c create mode 100644 keyboards/mechllama/g35/g35.h create mode 100644 keyboards/mechllama/g35/info.json create mode 100644 keyboards/mechllama/g35/keymaps/default/keymap.c create mode 100644 keyboards/mechllama/g35/keymaps/default/readme.md create mode 100644 keyboards/mechllama/g35/readme.md create mode 100644 keyboards/mechllama/g35/rules.mk create mode 100644 keyboards/mechllama/g35/v1/config.h create mode 100644 keyboards/mechllama/g35/v1/rules.mk create mode 100644 keyboards/mechllama/g35/v2/config.h create mode 100644 keyboards/mechllama/g35/v2/rules.mk diff --git a/keyboards/mechllama/g35/config.h b/keyboards/mechllama/g35/config.h new file mode 100644 index 000000000..61400fe9c --- /dev/null +++ b/keyboards/mechllama/g35/config.h @@ -0,0 +1,39 @@ +/* +Copyright 2019 Kaylyn Bogle + +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 . +*/ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0xCEEB +#define PRODUCT_ID 0x0035 +#define MANUFACTURER kaylynb +#define PRODUCT MechLlama G35 +#define DESCRIPTION 35 key macropad + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 7 + +#define DIODE_DIRECTION COL2ROW + +#define QMK_ESC_OUTPUT D6 +#define QMK_ESC_INPUT F5 +#define QMK_SPEAKER D2 + +#define RGB_DI_PIN F7 + +#define FORCE_NKRO diff --git a/keyboards/mechllama/g35/g35.c b/keyboards/mechllama/g35/g35.c new file mode 100644 index 000000000..e3925674f --- /dev/null +++ b/keyboards/mechllama/g35/g35.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Kaylyn Bogle + * + * 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 . + */ +#include "g35.h" diff --git a/keyboards/mechllama/g35/g35.h b/keyboards/mechllama/g35/g35.h new file mode 100644 index 000000000..227527245 --- /dev/null +++ b/keyboards/mechllama/g35/g35.h @@ -0,0 +1,33 @@ +/* Copyright 2019 Kaylyn Bogle + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, \ + K10, K11, K12, K13, K14, K15, K16, \ + K20, K21, K22, K23, K24, K25, K26, \ + K30, K31, K32, K33, K34, K35, K36, \ + K40, K41, K42, K43, K44, K45, K46 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, }, \ + { K10, K11, K12, K13, K14, K15, K16, }, \ + { K20, K21, K22, K23, K24, K25, K26, }, \ + { K30, K31, K32, K33, K34, K35, K36, }, \ + { K40, K41, K42, K43, K44, K45, K46 } \ +} diff --git a/keyboards/mechllama/g35/info.json b/keyboards/mechllama/g35/info.json new file mode 100644 index 000000000..f37ca63b0 --- /dev/null +++ b/keyboards/mechllama/g35/info.json @@ -0,0 +1,14 @@ +{ + "keyboard_name": "G35", + "url": "https://github.com/kaylynb/MechLlama-G35", + "maintainer": "kaylynb", + "width": 7, + "height": 5.75, + "key_count": 35, + "layouts": { + "LAYOUT": { + "layout": [{"label":"F1", "x":0, "y":0.5}, {"label":"Esc", "x":1, "y":0.5}, {"label":"1", "x":2, "y":0}, {"label":"2", "x":3, "y":0.15}, {"label":"3", "x":4, "y":0}, {"label":"4", "x":5, "y":0}, {"label":"5", "x":6, "y":0}, {"label":"F2", "x":0, "y":1.5}, {"label":"Tab", "x":1, "y":1.5}, {"label":"Q", "x":2, "y":1}, {"label":"W", "x":3, "y":1.15}, {"label":"E", "x":4, "y":1}, {"label":"R", "x":5, "y":1}, {"label":"T", "x":6, "y":1}, {"label":"F3", "x":0, "y":2.5}, {"label":"Shift", "x":1, "y":2.5}, {"label":"A", "x":2, "y":2}, {"label":"S", "x":3, "y":2.15}, {"label":"D", "x":4, "y":2}, {"label":"F", "x":5, "y":2}, {"label":"G", "x":6, "y":2}, {"label":"F4", "x":0, "y":3.5}, {"label":"Ctrl", "x":1, "y":3.5}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3.15}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"F5", "x":0, "y":4.5}, {"label":"Super", "x":1, "y":4.5}, {"label":"Alt", "x":2, "y":4, "h":1.5}, {"label":"Bksp", "x":3, "y":4.25, "h":1.25}, {"label":"Enter", "x":4, "y":4, "h":1.5}, {"label":"Space", "x":5, "y":4, "h":1.75}, {"label":"Fn", "x":6, "y":4, "h":1.75}] + } + } +} +rt diff --git a/keyboards/mechllama/g35/keymaps/default/keymap.c b/keyboards/mechllama/g35/keymaps/default/keymap.c new file mode 100644 index 000000000..4b7bf7651 --- /dev/null +++ b/keyboards/mechllama/g35/keymaps/default/keymap.c @@ -0,0 +1,72 @@ +/* Copyright 2019 Kaylyn Bogle + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum layers { + _BASE = 0, + _ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + KC_F1, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_F2, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_F3, KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_F4, KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + // + MO(_ADJUST),KC_LGUI, KC_LALT, KC_BSPC, KC_ENT, KC_SPC, KC_MINUS + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + [_ADJUST] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + RGB_TOG,TO(_BASE),XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + RGB_M_K, XXXXXXX, RGB_RMOD,RGB_HUI, RGB_MOD, XXXXXXX, XXXXXXX, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX, XXXXXXX, RGB_SAD, RGB_HUD, RGB_SAI, XXXXXXX, XXXXXXX, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼ + XXXXXXX, XXXXXXX, RGB_VAD, XXXXXXX, RGB_VAI, XXXXXXX, XXXXXXX, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼ + // + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), +}; + +#if defined(OLED_DRIVER_ENABLE) +const char* get_layer_name(uint8_t layer) { + switch (layer) { + case _BASE: + return PSTR("Default"); + break; + case _ADJUST: + return PSTR("Adjust"); + break; + default: + return PSTR("Unknown"); + break; + } +} + +void oled_task_user(void) { + oled_write_ln_P(get_layer_name(biton32(layer_state)), false); +} +#endif diff --git a/keyboards/mechllama/g35/keymaps/default/readme.md b/keyboards/mechllama/g35/keymaps/default/readme.md new file mode 100644 index 000000000..200a42f19 --- /dev/null +++ b/keyboards/mechllama/g35/keymaps/default/readme.md @@ -0,0 +1,4 @@ +![G35 Layout Image](https://i.imgur.com/fDlRAN9.png) +# Default G35 Layout + +This is the default layout for the G35. diff --git a/keyboards/mechllama/g35/readme.md b/keyboards/mechllama/g35/readme.md new file mode 100644 index 000000000..e0d895b4e --- /dev/null +++ b/keyboards/mechllama/g35/readme.md @@ -0,0 +1,15 @@ +# MechLlama G35 + +![Photo](https://i.imgur.com/EvIA4t0.jpg) + +A 35 key left-handed columnar layout macropad. + +Keyboard Maintainer: [Kaylyn Bogle](https://github.com/kaylynb/) +Hardware Supported: G35 v1 & v2 +Hardware Availability: [KiCad and Gerbers](https://github.com/kaylynb/MechLlama-G35) + +Make example for this keyboard (after setting up your build environment): + + make mechllama/g35/v2:default + +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). diff --git a/keyboards/mechllama/g35/rules.mk b/keyboards/mechllama/g35/rules.mk new file mode 100644 index 000000000..1e1487513 --- /dev/null +++ b/keyboards/mechllama/g35/rules.mk @@ -0,0 +1,14 @@ +MCU = atmega32u4 +F_CPU = 16000000 +ARCH = AVR8 +F_USB = $(F_CPU) + +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +BOOTLOADER = atmel-dfu + +NKRO_ENABLE = yes +OLED_DRIVER_ENABLE = yes +RGBLIGHT_ENABLE = yes + +DEFAULT_FOLDER = mechllama/g35/v2 diff --git a/keyboards/mechllama/g35/v1/config.h b/keyboards/mechllama/g35/v1/config.h new file mode 100644 index 000000000..9e7be98ea --- /dev/null +++ b/keyboards/mechllama/g35/v1/config.h @@ -0,0 +1,25 @@ +/* +Copyright 2019 Kaylyn Bogle + +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 . +*/ + +#pragma once + +#define DEVICE_VER 0x0001 + +#define MATRIX_ROW_PINS { F5, F6, F4, F1, D4 } +#define MATRIX_COL_PINS { D6, D7, B4, B5, B6, F0, D5 } + +#define RGBLED_NUM 41 diff --git a/keyboards/mechllama/g35/v1/rules.mk b/keyboards/mechllama/g35/v1/rules.mk new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/mechllama/g35/v2/config.h b/keyboards/mechllama/g35/v2/config.h new file mode 100644 index 000000000..09d5f607d --- /dev/null +++ b/keyboards/mechllama/g35/v2/config.h @@ -0,0 +1,25 @@ +/* +Copyright 2019 Kaylyn Bogle + +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 . +*/ + +#pragma once + +#define DEVICE_VER 0x0002 + +#define MATRIX_ROW_PINS { F5, F4, F1, F0, D4 } +#define MATRIX_COL_PINS { D6, D7, B4, B5, B6, F6, D5 } + +#define RGBLED_NUM 6 diff --git a/keyboards/mechllama/g35/v2/rules.mk b/keyboards/mechllama/g35/v2/rules.mk new file mode 100644 index 000000000..e69de29bb From 37be1cb5130c5c9d93175bdd40176a84e8fe3a76 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 9 Jul 2019 11:09:54 -0700 Subject: [PATCH 320/341] Fix debouncing issue for eager algorithms (#6081) * Fix debouncing issue for eager algos * Fix up typo issue --- quantum/debounce/eager_pk.c | 16 +++++++++++----- quantum/debounce/eager_pr.c | 17 +++++++++++------ 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/quantum/debounce/eager_pk.c b/quantum/debounce/eager_pk.c index aa0f63a9d..c07be18f8 100644 --- a/quantum/debounce/eager_pk.c +++ b/quantum/debounce/eager_pk.c @@ -39,6 +39,7 @@ No further inputs are accepted until DEBOUNCE milliseconds have occurred. static debounce_counter_t *debounce_counters; static bool counters_need_update; +static bool matrix_need_update; #define DEBOUNCE_ELAPSED 251 #define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1) @@ -63,7 +64,7 @@ void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool update_debounce_counters(num_rows, current_time); } - if (changed) { + if (changed || matrix_need_update) { transfer_matrix_values(raw, cooked, num_rows, current_time); } } @@ -88,16 +89,21 @@ void update_debounce_counters(uint8_t num_rows, uint8_t current_time) { // upload from raw_matrix to final matrix; void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time) { + matrix_need_update = false; debounce_counter_t *debounce_pointer = debounce_counters; for (uint8_t row = 0; row < num_rows; row++) { matrix_row_t delta = raw[row] ^ cooked[row]; matrix_row_t existing_row = cooked[row]; for (uint8_t col = 0; col < MATRIX_COLS; col++) { matrix_row_t col_mask = (ROW_SHIFTER << col); - if ((delta & col_mask) && *debounce_pointer == DEBOUNCE_ELAPSED) { - *debounce_pointer = current_time; - counters_need_update = true; - existing_row ^= col_mask; // flip the bit. + if (delta & col_mask) { + if (*debounce_pointer == DEBOUNCE_ELAPSED) { + *debounce_pointer = current_time; + counters_need_update = true; + existing_row ^= col_mask; // flip the bit. + } else { + matrix_need_update = true; + } } debounce_pointer++; } diff --git a/quantum/debounce/eager_pr.c b/quantum/debounce/eager_pr.c index 26b17ed29..8dbfa3fcf 100644 --- a/quantum/debounce/eager_pr.c +++ b/quantum/debounce/eager_pr.c @@ -28,6 +28,7 @@ No further inputs are accepted until DEBOUNCE milliseconds have occurred. #endif #define debounce_counter_t uint8_t +static bool matrix_need_update; static debounce_counter_t *debounce_counters; static bool counters_need_update; @@ -53,7 +54,7 @@ void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool update_debounce_counters(num_rows, current_time); } - if (changed || (needed_update && !counters_need_update)) { + if (changed || (needed_update && !counters_need_update) || matrix_need_update) { transfer_matrix_values(raw, cooked, num_rows, current_time); } } @@ -76,18 +77,22 @@ void update_debounce_counters(uint8_t num_rows, uint8_t current_time) { // upload from raw_matrix to final matrix; void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time) { + matrix_need_update = false; debounce_counter_t *debounce_pointer = debounce_counters; for (uint8_t row = 0; row < num_rows; row++) { matrix_row_t existing_row = cooked[row]; matrix_row_t raw_row = raw[row]; // determine new value basd on debounce pointer + raw value - if (*debounce_pointer == DEBOUNCE_ELAPSED && (existing_row != raw_row)) { - *debounce_pointer = current_time; - cooked[row] = raw_row; - counters_need_update = true; + if (existing_row != raw_row) { + if (*debounce_pointer == DEBOUNCE_ELAPSED) { + *debounce_pointer = current_time; + cooked[row] = raw_row; + counters_need_update = true; + } else { + matrix_need_update = true; + } } - debounce_pointer++; } } From c69060465ea1ce4f77fb69e2dea7cb035f89ba4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Tue, 9 Jul 2019 20:16:24 +0200 Subject: [PATCH 321/341] Fix parentheses in macros, and in general clean up quantum.h (#5021) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix up GPIO macros * Fix up send string macros `string` arguments must not be parenthesized * Fix up miscellaneous macros * Make indentation uniform (4 spaces) * Make #ifdef vs #if defined usage consistent * Reorder standard includes * Revert indentation changes as per review comments * Revert #if defined(__AVR__) → #ifdef __AVR__ change * Change 2 space indent to 4 spaces on a couple of lines * Replace include guard with #pragma once --- quantum/quantum.h | 109 ++++++++++++++++++++-------------------------- 1 file changed, 48 insertions(+), 61 deletions(-) diff --git a/quantum/quantum.h b/quantum/quantum.h index 451dd8a4b..f089c6ef6 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef QUANTUM_H -#define QUANTUM_H +#pragma once #if defined(__AVR__) #include @@ -24,9 +23,11 @@ #if defined(PROTOCOL_CHIBIOS) #include "hal.h" #endif + #include "wait.h" #include "matrix.h" #include "keymap.h" + #ifdef BACKLIGHT_ENABLE #ifdef LED_MATRIX_ENABLE #include "ledmatrix.h" @@ -34,14 +35,13 @@ #include "backlight.h" #endif #endif -#ifdef RGBLIGHT_ENABLE - #include "rgblight.h" -#else - #ifdef RGB_MATRIX_ENABLE - /* dummy define RGBLIGHT_MODE_xxxx */ - #define RGBLIGHT_H_DUMMY_DEFINE - #include "rgblight.h" - #endif + +#if defined(RGBLIGHT_ENABLE) + #include "rgblight.h" +#elif defined(RGB_MATRIX_ENABLE) + // Dummy define RGBLIGHT_MODE_xxxx + #define RGBLIGHT_H_DUMMY_DEFINE + #include "rgblight.h" #endif #ifdef RGB_MATRIX_ENABLE @@ -50,16 +50,16 @@ #include "action_layer.h" #include "eeconfig.h" -#include #include "bootloader.h" #include "timer.h" #include "config_common.h" #include "led.h" #include "action_util.h" -#include #include "print.h" #include "send_string_keycodes.h" #include "suspend.h" +#include +#include extern layer_state_t default_layer_state; @@ -67,18 +67,16 @@ extern layer_state_t default_layer_state; extern layer_state_t layer_state; #endif -#ifdef MIDI_ENABLE -#ifdef MIDI_ADVANCED +#if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) #include "process_midi.h" #endif -#endif // MIDI_ENABLE #ifdef AUDIO_ENABLE #include "audio.h" #include "process_audio.h" #ifdef AUDIO_CLICKY #include "process_clicky.h" - #endif // AUDIO_CLICKY + #endif #endif #ifdef STENO_ENABLE @@ -106,7 +104,7 @@ extern layer_state_t default_layer_state; #endif #ifdef TAP_DANCE_ENABLE - #include "process_tap_dance.h" + #include "process_tap_dance.h" #endif #ifdef PRINTING_ENABLE @@ -132,7 +130,7 @@ extern layer_state_t default_layer_state; #endif #ifdef SPACE_CADET_ENABLE - #include "process_space_cadet.h" + #include "process_space_cadet.h" #endif #ifdef HD44780_ENABLE @@ -147,50 +145,38 @@ extern layer_state_t default_layer_state; #include "oled_driver.h" #endif -//Function substitutions to ease GPIO manipulation -#ifdef __AVR__ - #define PIN_ADDRESS(p, offset) _SFR_IO8(ADDRESS_BASE + (p >> PORT_SHIFTER) + offset) +// Function substitutions to ease GPIO manipulation +#if defined(__AVR__) + typedef uint8_t pin_t; - #define pin_t uint8_t - #define setPinInput(pin) PIN_ADDRESS(pin, 1) &= ~ _BV(pin & 0xF) - #define setPinInputHigh(pin) ({\ - PIN_ADDRESS(pin, 1) &= ~ _BV(pin & 0xF);\ - PIN_ADDRESS(pin, 2) |= _BV(pin & 0xF);\ - }) - #define setPinInputLow(pin) _Static_assert(0, "AVR Processors cannot impliment an input as pull low") - #define setPinOutput(pin) PIN_ADDRESS(pin, 1) |= _BV(pin & 0xF) + #define PIN_ADDRESS(p, offset) (_SFR_IO8(ADDRESS_BASE + ((p) >> PORT_SHIFTER) + (offset))) + #define setPinInput(pin) (PIN_ADDRESS(pin, 1) &= ~_BV((pin) & 0xF)) + #define setPinInputHigh(pin) (PIN_ADDRESS(pin, 1) &= ~_BV((pin) & 0xF), \ + PIN_ADDRESS(pin, 2) |= _BV((pin) & 0xF)) + #define setPinInputLow(pin) _Static_assert(0, "AVR processors cannot implement an input as pull low") + #define setPinOutput(pin) (PIN_ADDRESS(pin, 1) |= _BV((pin) & 0xF)) - #define writePinHigh(pin) PIN_ADDRESS(pin, 2) |= _BV(pin & 0xF) - #define writePinLow(pin) PIN_ADDRESS(pin, 2) &= ~_BV(pin & 0xF) - static inline void writePin(pin_t pin, uint8_t level){ - if (level){ - PIN_ADDRESS(pin, 2) |= _BV(pin & 0xF); - } else { - PIN_ADDRESS(pin, 2) &= ~_BV(pin & 0xF); - } - } + #define writePinHigh(pin) (PIN_ADDRESS(pin, 2) |= _BV((pin) & 0xF)) + #define writePinLow(pin) (PIN_ADDRESS(pin, 2) &= ~_BV((pin) & 0xF)) + #define writePin(pin, level) ((level) ? writePinHigh(pin) : writePinLow(pin)) - #define readPin(pin) ((bool)(PIN_ADDRESS(pin, 0) & _BV(pin & 0xF))) + #define readPin(pin) ((bool)(PIN_ADDRESS(pin, 0) & _BV((pin) & 0xF))) #elif defined(PROTOCOL_CHIBIOS) - #define pin_t ioline_t - #define setPinInput(pin) palSetLineMode(pin, PAL_MODE_INPUT) - #define setPinInputHigh(pin) palSetLineMode(pin, PAL_MODE_INPUT_PULLUP) - #define setPinInputLow(pin) palSetLineMode(pin, PAL_MODE_INPUT_PULLDOWN) - #define setPinOutput(pin) palSetLineMode(pin, PAL_MODE_OUTPUT_PUSHPULL) + typedef ioline_t pin_t; - #define writePinHigh(pin) palSetLine(pin) - #define writePinLow(pin) palClearLine(pin) - static inline void writePin(pin_t pin, uint8_t level){ - if (level){ - palSetLine(pin); - } else { - palClearLine(pin); - } - } + #define setPinInput(pin) palSetLineMode(pin, PAL_MODE_INPUT) + #define setPinInputHigh(pin) palSetLineMode(pin, PAL_MODE_INPUT_PULLUP) + #define setPinInputLow(pin) palSetLineMode(pin, PAL_MODE_INPUT_PULLDOWN) + #define setPinOutput(pin) palSetLineMode(pin, PAL_MODE_OUTPUT_PUSHPULL) - #define readPin(pin) palReadLine(pin) + #define writePinHigh(pin) palSetLine(pin) + #define writePinLow(pin) palClearLine(pin) + #define writePin(pin, level) ((level) ? writePinHigh(pin) : writePinLow(pin)) + + #define readPin(pin) palReadLine(pin) #endif +// Send string macros #define STRINGIZE(z) #z #define ADD_SLASH_X(y) STRINGIZE(\x ## y) #define SYMBOL_STR(x) ADD_SLASH_X(x) @@ -203,6 +189,7 @@ extern layer_state_t default_layer_state; #define SS_DOWN(keycode) "\2" SYMBOL_STR(keycode) #define SS_UP(keycode) "\3" SYMBOL_STR(keycode) +// `string` arguments must not be parenthesized #define SS_LCTRL(string) SS_DOWN(X_LCTRL) string SS_UP(X_LCTRL) #define SS_LGUI(string) SS_DOWN(X_LGUI) string SS_UP(X_LGUI) #define SS_LCMD(string) SS_LGUI(string) @@ -212,10 +199,12 @@ extern layer_state_t default_layer_state; #define SS_RALT(string) SS_DOWN(X_RALT) string SS_UP(X_RALT) #define SS_ALGR(string) SS_RALT(string) -#define SEND_STRING(str) send_string_P(PSTR(str)) +#define SEND_STRING(string) send_string_P(PSTR(string)) + extern const bool ascii_to_shift_lut[0x80]; extern const bool ascii_to_altgr_lut[0x80]; extern const uint8_t ascii_to_keycode_lut[0x80]; + void send_string(const char *str); void send_string_with_delay(const char *str, uint8_t interval); void send_string_P(const char *str); @@ -244,10 +233,10 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record); bool process_record_user(uint16_t keycode, keyrecord_t *record); #ifndef BOOTMAGIC_LITE_COLUMN - #define BOOTMAGIC_LITE_COLUMN 0 + #define BOOTMAGIC_LITE_COLUMN 0 #endif #ifndef BOOTMAGIC_LITE_ROW - #define BOOTMAGIC_LITE_ROW 0 + #define BOOTMAGIC_LITE_ROW 0 #endif void bootmagic_lite(void); @@ -268,7 +257,7 @@ void backlight_task_internal(void); void backlight_on(uint8_t backlight_pin); void backlight_off(uint8_t backlight_pin); -#ifdef BACKLIGHT_BREATHING + #ifdef BACKLIGHT_BREATHING void breathing_task(void); void breathing_enable(void); void breathing_pulse(void); @@ -282,9 +271,9 @@ void breathing_period_default(void); void breathing_period_set(uint8_t value); void breathing_period_inc(void); void breathing_period_dec(void); + #endif #endif -#endif void send_dword(uint32_t number); void send_word(uint16_t number); void send_byte(uint8_t number); @@ -295,5 +284,3 @@ void led_set_user(uint8_t usb_led); void led_set_kb(uint8_t usb_led); void api_send_unicode(uint32_t unicode); - -#endif From 05a97482e6a6e0b2733dc51b2fa5e7dad1166228 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 9 Jul 2019 12:59:05 -0700 Subject: [PATCH 322/341] [Keyboard] Enable LTO on Handwired/Promethium to reduce compiled size (#6227) --- keyboards/handwired/promethium/rules.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/keyboards/handwired/promethium/rules.mk b/keyboards/handwired/promethium/rules.mk index 21328b7f8..dab92e52c 100644 --- a/keyboards/handwired/promethium/rules.mk +++ b/keyboards/handwired/promethium/rules.mk @@ -47,7 +47,7 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Build Options -# change to "no" to disable the options, or define them in the Makefile in +# change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) @@ -62,7 +62,7 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode UNICODEMAP_ENABLE = yes BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. PS2_MOUSE_ENABLE = yes PS2_USE_INT = yes API_SYSEX_ENABLE = no @@ -76,3 +76,5 @@ SRC += ws2812.c SRC += rgbsps.c SRC += analog.c SRC += matrix.c + +LINK_TIME_OPTIMIZATION_ENABLE = yes From 721b3546f6216b5e33a6c4d19db367e47ddccd6c Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 10 Jul 2019 16:21:38 -0700 Subject: [PATCH 323/341] QMK Configurator support for NEK Type A (#6295) * QMK Configurator support for NEK Type A * Update labels to match default keymap --- keyboards/nek_type_a/info.json | 101 +++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/keyboards/nek_type_a/info.json b/keyboards/nek_type_a/info.json index e69de29bb..7387fe27f 100644 --- a/keyboards/nek_type_a/info.json +++ b/keyboards/nek_type_a/info.json @@ -0,0 +1,101 @@ +{ + "keyboard_name": "NEK Type A", + "url": "", + "maintainer": "ecopoesis", + "width": 19.75, + "height": 6.25, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":0.5, "y":0, "w":1.75}, + {"label":"F1", "x":2.75, "y":0}, + {"label":"F2", "x":3.75, "y":0}, + {"label":"F3", "x":4.75, "y":0}, + {"label":"F4", "x":5.75, "y":0}, + {"label":"F5", "x":8.25, "y":0}, + {"label":"F6", "x":9.25, "y":0}, + {"label":"F7", "x":10.25, "y":0}, + {"label":"F8", "x":11.25, "y":0}, + {"label":"F9", "x":12.5, "y":0}, + {"label":"F10", "x":13.5, "y":0}, + {"label":"F11", "x":14.5, "y":0}, + {"label":"F12", "x":15.5, "y":0}, + {"label":"Mute", "x":16.75, "y":0}, + {"label":"Volume Down", "x":17.75, "y":0}, + {"label":"Volume Up", "x":18.75, "y":0}, + {"label":"`", "x":0, "y":1.25}, + {"label":"1", "x":1, "y":1.25}, + {"label":"2", "x":2, "y":1.25}, + {"label":"3", "x":3, "y":1.25}, + {"label":"4", "x":4, "y":1.25}, + {"label":"5", "x":5, "y":1.25}, + {"label":"6", "x":6, "y":1.25}, + {"label":"7", "x":8, "y":1.25, "w":1.5}, + {"label":"8", "x":9.5, "y":1.25}, + {"label":"9", "x":10.5, "y":1.25}, + {"label":"0", "x":11.5, "y":1.25}, + {"label":"-", "x":12.5, "y":1.25}, + {"label":"=", "x":13.5, "y":1.25}, + {"label":"Backspace", "x":14.5, "y":1.25, "w":2}, + {"label":"Insert", "x":16.75, "y":1.25}, + {"label":"Home", "x":17.75, "y":1.25}, + {"label":"Page Up", "x":18.75, "y":1.25}, + {"label":"Tab", "x":0, "y":2.25, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.25}, + {"label":"W", "x":2.5, "y":2.25}, + {"label":"E", "x":3.5, "y":2.25}, + {"label":"R", "x":4.5, "y":2.25}, + {"label":"T", "x":5.5, "y":2.25, "w":1.5}, + {"label":"Y", "x":8, "y":2.25}, + {"label":"U", "x":9, "y":2.25}, + {"label":"I", "x":10, "y":2.25}, + {"label":"O", "x":11, "y":2.25}, + {"label":"P", "x":12, "y":2.25}, + {"label":"[", "x":13, "y":2.25}, + {"label":"]", "x":14, "y":2.25}, + {"label":"\\", "x":15, "y":2.25, "w":1.5}, + {"label":"Delete", "x":16.75, "y":2.25}, + {"label":"End", "x":17.75, "y":2.25}, + {"label":"Page Down", "x":18.75, "y":2.25}, + {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, + {"label":"A", "x":1.75, "y":3.25}, + {"label":"S", "x":2.75, "y":3.25}, + {"label":"D", "x":3.75, "y":3.25}, + {"label":"F", "x":4.75, "y":3.25}, + {"label":"G", "x":5.75, "y":3.25, "w":1.25}, + {"label":"H", "x":8, "y":3.25, "w":1.25}, + {"label":"J", "x":9.25, "y":3.25}, + {"label":"K", "x":10.25, "y":3.25}, + {"label":"L", "x":11.25, "y":3.25}, + {"label":";", "x":12.25, "y":3.25}, + {"label":"'", "x":13.25, "y":3.25}, + {"label":"Enter", "x":14.25, "y":3.25, "w":2.25}, + {"label":"Shift", "x":0, "y":4.25, "w":2}, + {"label":"Z", "x":2, "y":4.25}, + {"label":"X", "x":3, "y":4.25}, + {"label":"C", "x":4, "y":4.25}, + {"label":"V", "x":5, "y":4.25}, + {"label":"B", "x":6, "y":4.25}, + {"label":"N", "x":8, "y":4.25, "w":1.5}, + {"label":"M", "x":9.5, "y":4.25}, + {"label":",", "x":10.5, "y":4.25}, + {"label":".", "x":11.5, "y":4.25}, + {"label":"/", "x":12.5, "y":4.25}, + {"label":"Shift", "x":13.5, "y":4.25, "w":2.75}, + {"label":"Up", "x":17.75, "y":3.75}, + {"label":"Ctrl", "x":0, "y":5.25, "w":1.5}, + {"label":"Alt", "x":1.5, "y":5.25, "w":1.25}, + {"label":"Cmd", "x":2.75, "y":5.25, "w":1.5}, + {"label":"Space", "x":4.25, "y":5.25, "w":2.75}, + {"label":"Space", "x":8, "y":5.25, "w":2.75}, + {"label":"Cmd", "x":10.75, "y":5.25, "w":1.5}, + {"label":"Alt", "x":12.25, "y":5.25, "w":1.25}, + {"label":"Ctrl", "x":13.5, "y":5.25, "w":1.5}, + {"label":"Menu", "x":15, "y":5.25, "w":1.25}, + {"label":"Left", "x":16.75, "y":4.75}, + {"label":"Down", "x":17.75, "y":4.75}, + {"label":"Right", "x":18.75, "y":4.75} + ] + } + } +} From ffff0f03cb56eee97e69ec1263777f03c4be1647 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 10 Jul 2019 16:25:54 -0700 Subject: [PATCH 324/341] Fix bug in Mechllama G35 info.json (#6294) --- keyboards/mechllama/g35/info.json | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/mechllama/g35/info.json b/keyboards/mechllama/g35/info.json index f37ca63b0..6fcc2412d 100644 --- a/keyboards/mechllama/g35/info.json +++ b/keyboards/mechllama/g35/info.json @@ -11,4 +11,3 @@ } } } -rt From 607f6f5c1605afd7ed64160d4e7bb11db38c3e38 Mon Sep 17 00:00:00 2001 From: zjp Date: Wed, 10 Jul 2019 23:22:23 -0500 Subject: [PATCH 325/341] Fix typo in Gentoo docstring (#6303) --- util/linux_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/linux_install.sh b/util/linux_install.sh index a1ee79205..4731ec015 100755 --- a/util/linux_install.sh +++ b/util/linux_install.sh @@ -2,7 +2,7 @@ # Note: This file uses tabs to indent. Please don't mix tabs and spaces. -GENTOO_WARNING="This script will make a USE change in order to ensure that that QMK works on your system. All changes will be sent to the the file /etc/portage/package.use/qmk_firmware -- please review it, and read Portage's output carefully before installing any packages on your system. You will also need to ensure that your kernel is compiled with support for the keyboard chip that you are using (e.g. enable Arduino for the Pro Micro). Further information can be found on the Gentoo wiki." +GENTOO_WARNING="This script will make a USE change in order to ensure that that QMK works on your system. All changes will be sent to the the file /etc/portage/package.use/qmkfirmware -- please review it, and read Portage's output carefully before installing any packages on your system. You will also need to ensure that your kernel is compiled with support for the keyboard chip that you are using (e.g. enable Arduino for the Pro Micro). Further information can be found on the Gentoo wiki." SLACKWARE_WARNING="You will need the following packages from slackbuilds.org:\n\tarm-binutils\n\tarm-gcc\n\tavr-binutils\n\tavr-gcc\n\tavr-libc\n\tavrdude\n\tdfu-programmer\n\tdfu-util\n\tnewlib\nThese packages will be installed with sudo and sboinstall, so ensure that your user is added to sudoers and that sboinstall is configured." From 3dd2905b7bea4f1f0ebfd36c753ff760767f54b5 Mon Sep 17 00:00:00 2001 From: Stevan Milic Date: Thu, 11 Jul 2019 16:37:16 +0200 Subject: [PATCH 326/341] Add personal KBD67 keymap (#6292) * Add kbdfans/kbd67/hotswap:stevanmilic keymap * Change Fn+H, Fn+L to Ctrl+Left, Ctrl+Right * Add keymap comments --- .../hotswap/keymaps/stevanmilic/config.h | 19 +++++ .../hotswap/keymaps/stevanmilic/keymap.c | 79 +++++++++++++++++++ .../hotswap/keymaps/stevanmilic/rules.mk | 6 ++ 3 files changed, 104 insertions(+) create mode 100644 keyboards/kbdfans/kbd67/hotswap/keymaps/stevanmilic/config.h create mode 100644 keyboards/kbdfans/kbd67/hotswap/keymaps/stevanmilic/keymap.c create mode 100644 keyboards/kbdfans/kbd67/hotswap/keymaps/stevanmilic/rules.mk diff --git a/keyboards/kbdfans/kbd67/hotswap/keymaps/stevanmilic/config.h b/keyboards/kbdfans/kbd67/hotswap/keymaps/stevanmilic/config.h new file mode 100644 index 000000000..16497ddf0 --- /dev/null +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/stevanmilic/config.h @@ -0,0 +1,19 @@ +#pragma once + +#define FORCE_NKRO + +#define MOUSEKEY_DELAY 50 +#define MOUSEKEY_INTERVAL 15 +#define MOUSEKEY_MAX_SPEED 4 +#define MOUSEKEY_TIME_TO_MAX 50 +#define MOUSEKEY_WHEEL_MAX_SPEED 1 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 50 + +#define NO_ACTION_FUNCTION +#define NO_ACTION_MACRO +#define NO_ACTION_ONESHOT + +#define PERMISSIVE_HOLD +#define TAPPING_TERM 200 +#define TAPPING_TOGGLE 2 +#define TAP_HOLD_CAPS_DELAY 50 diff --git a/keyboards/kbdfans/kbd67/hotswap/keymaps/stevanmilic/keymap.c b/keyboards/kbdfans/kbd67/hotswap/keymaps/stevanmilic/keymap.c new file mode 100644 index 000000000..7e36eb783 --- /dev/null +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/stevanmilic/keymap.c @@ -0,0 +1,79 @@ +#include QMK_KEYBOARD_H + +#define FN MO(L_FN) +#define FN_CAPS LT(L_FN, KC_CAPS) +#define FN_ESC LT(L_FN, KC_ESC) +#define FN_FNLK TT(L_FN) + +#define MV_UP LCTL(KC_UP) +#define MV_DOWN LCTL(KC_DOWN) +#define MV_LEFT LCTL(KC_LEFT) +#define MV_RGHT LCTL(KC_RGHT) +#define TOP LCTL(KC_HOME) +#define BOTTOM LCTL(KC_END) + +enum keycodes { + CLEAR = SAFE_RANGE, +}; + +enum layers { + L_BASE, + L_FN, +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case CLEAR: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE)); + } + return false; + + default: + return true; + } +} + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │PSc│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │Bspc │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │FnEsc │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│ ↑ │PgD│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │LCtl│LGui│LAlt│ Space │RAlt│FnLk│ │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + [L_BASE] = LAYOUT( + KC_GRV, 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_BSLS, KC_GRV, KC_PSCR, \ + 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_BSPC, KC_DEL, \ + FN_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \ + 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_UP, KC_PGDN, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, FN_FNLK, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + + /* Function layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│NLk│SLk│Pau│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ │M2 │M↑ │M1 │M3 │ │ │ │ │Stp│Ply│Prv│Nxt│Clear│Ins│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │M← │M↓ │M→ │MW↑│ │ │Mv←│ ↓ │ ↑ │Mv→│ │ │Top│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │MA0│MA2│MW←│MW→│ │ │App│Vo-│Vo+│Mut│ │PgU│Btm│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │DtPR│DtNA│ MW↓ │ │ │ │Hom│PgD│End│ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + [L_FN] = LAYOUT( + _______, 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_NLCK, KC_SLCK, KC_PAUS, \ + _______, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, _______, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, KC_INS, \ + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, MV_LEFT, KC_DOWN, KC_UP, MV_RGHT, _______, _______, _______, TOP, \ + _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, KC_APP, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, BOTTOM, \ + _______, _______, _______, KC_WH_D, _______, _______, KC_HOME, KC_PGDN, KC_END \ + ), +}; diff --git a/keyboards/kbdfans/kbd67/hotswap/keymaps/stevanmilic/rules.mk b/keyboards/kbdfans/kbd67/hotswap/keymaps/stevanmilic/rules.mk new file mode 100644 index 000000000..16eb6cb44 --- /dev/null +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/stevanmilic/rules.mk @@ -0,0 +1,6 @@ +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = yes +CONSOLE_ENABLE = yes +EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes From 3ee062222acc40683246585fe21e3d5fe00dce0b Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Thu, 11 Jul 2019 13:29:19 -0500 Subject: [PATCH 327/341] Fixing effects to respect user sat and val levels (#6275) --- quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h | 2 +- quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h | 2 +- quantum/rgb_matrix_animations/colorband_sat_anim.h | 2 +- quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h | 2 +- quantum/rgb_matrix_animations/colorband_spiral_val_anim.h | 2 +- quantum/rgb_matrix_animations/colorband_val_anim.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h b/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h index cf9c0784a..3739cde1f 100644 --- a/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h +++ b/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h @@ -3,7 +3,7 @@ RGB_MATRIX_EFFECT(BAND_PINWHEEL_SAT) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS static void BAND_PINWHEEL_SAT_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t time) { - hsv->s = rgb_matrix_config.sat - time - atan2_8(dy, dx) * 3; + hsv->s = scale8(rgb_matrix_config.sat - time - atan2_8(dy, dx) * 3, rgb_matrix_config.sat); } bool BAND_PINWHEEL_SAT(effect_params_t* params) { diff --git a/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h b/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h index 05ad0ee32..6e5871d7e 100644 --- a/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h +++ b/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h @@ -3,7 +3,7 @@ RGB_MATRIX_EFFECT(BAND_PINWHEEL_VAL) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS static void BAND_PINWHEEL_VAL_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t time) { - hsv->v = rgb_matrix_config.val - time - atan2_8(dy, dx) * 3; + hsv->v = scale8(rgb_matrix_config.val - time - atan2_8(dy, dx) * 3, rgb_matrix_config.val); } bool BAND_PINWHEEL_VAL(effect_params_t* params) { diff --git a/quantum/rgb_matrix_animations/colorband_sat_anim.h b/quantum/rgb_matrix_animations/colorband_sat_anim.h index 8a40473e4..bfa1085cb 100644 --- a/quantum/rgb_matrix_animations/colorband_sat_anim.h +++ b/quantum/rgb_matrix_animations/colorband_sat_anim.h @@ -4,7 +4,7 @@ RGB_MATRIX_EFFECT(BAND_SAT) static void BAND_SAT_math(HSV* hsv, uint8_t i, uint8_t time) { int16_t s = rgb_matrix_config.sat - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8; - hsv->s = s < 0 ? 0 : s; + hsv->s = scale8(s < 0 ? 0 : s, rgb_matrix_config.sat); } bool BAND_SAT(effect_params_t* params) { diff --git a/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h b/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h index 4af6c60b0..7db01c5f9 100644 --- a/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h +++ b/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h @@ -3,7 +3,7 @@ RGB_MATRIX_EFFECT(BAND_SPIRAL_SAT) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS static void BAND_SPIRAL_SAT_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { - hsv->s = rgb_matrix_config.sat + dist - time - atan2_8(dy, dx); + hsv->s = scale8(rgb_matrix_config.sat + dist - time - atan2_8(dy, dx), rgb_matrix_config.sat); } bool BAND_SPIRAL_SAT(effect_params_t* params) { diff --git a/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h b/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h index e787956a7..a16f8e2ce 100644 --- a/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h +++ b/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h @@ -3,7 +3,7 @@ RGB_MATRIX_EFFECT(BAND_SPIRAL_VAL) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS static void BAND_SPIRAL_VAL_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { - hsv->v = rgb_matrix_config.val + dist - time - atan2_8(dy, dx); + hsv->v = scale8(rgb_matrix_config.val + dist - time - atan2_8(dy, dx), rgb_matrix_config.val); } bool BAND_SPIRAL_VAL(effect_params_t* params) { diff --git a/quantum/rgb_matrix_animations/colorband_val_anim.h b/quantum/rgb_matrix_animations/colorband_val_anim.h index 1e3740cea..4b76924db 100644 --- a/quantum/rgb_matrix_animations/colorband_val_anim.h +++ b/quantum/rgb_matrix_animations/colorband_val_anim.h @@ -4,7 +4,7 @@ RGB_MATRIX_EFFECT(BAND_VAL) static void BAND_VAL_math(HSV* hsv, uint8_t i, uint8_t time) { int16_t v = rgb_matrix_config.val - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8; - hsv->v = v < 0 ? 0 : v; + hsv->v = scale8(v < 0 ? 0 : v, rgb_matrix_config.val); } bool BAND_VAL(effect_params_t* params) { From e6420f0bd823fa660d217a2560a919785ccb2343 Mon Sep 17 00:00:00 2001 From: Napoleon Wulkan Date: Thu, 11 Jul 2019 20:31:36 +0200 Subject: [PATCH 328/341] [Keyboard] Add handwired Wulkan keyboard (#6282) * added handwired keyboard wulkan * added info.json for qmk configurator * fixed spelling * enum dont need to be assigned to zero * removed cflag from readme * updated rules.mk * removed unneeded rows from config * moved unicode to keymap conf * fix adjust layer and comments for keymap --- keyboards/handwired/wulkan/README.md | 14 +++ keyboards/handwired/wulkan/config.h | 23 ++++ keyboards/handwired/wulkan/info.json | 13 ++ .../handwired/wulkan/keymaps/default/keymap.c | 111 ++++++++++++++++++ .../handwired/wulkan/keymaps/default/rules.mk | 1 + keyboards/handwired/wulkan/rules.mk | 22 ++++ keyboards/handwired/wulkan/wulkan.c | 6 + keyboards/handwired/wulkan/wulkan.h | 21 ++++ 8 files changed, 211 insertions(+) create mode 100644 keyboards/handwired/wulkan/README.md create mode 100644 keyboards/handwired/wulkan/config.h create mode 100644 keyboards/handwired/wulkan/info.json create mode 100644 keyboards/handwired/wulkan/keymaps/default/keymap.c create mode 100644 keyboards/handwired/wulkan/keymaps/default/rules.mk create mode 100644 keyboards/handwired/wulkan/rules.mk create mode 100644 keyboards/handwired/wulkan/wulkan.c create mode 100644 keyboards/handwired/wulkan/wulkan.h diff --git a/keyboards/handwired/wulkan/README.md b/keyboards/handwired/wulkan/README.md new file mode 100644 index 000000000..c6ea77389 --- /dev/null +++ b/keyboards/handwired/wulkan/README.md @@ -0,0 +1,14 @@ +# wulkan + +Handwired 40% keyboard build with Proton C. + +Keyboard Maintainer: [Napoleon Wulkan](https://github.com/wulkan) +Hardware Supported: Proton C +Hardware Availability: [OLKB.com](https://olkb.com) + + +Make example for this keyboard (after setting up your build environment): + + make handwired/wulkan:default:dfu-util + +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). diff --git a/keyboards/handwired/wulkan/config.h b/keyboards/handwired/wulkan/config.h new file mode 100644 index 000000000..4a9cbada7 --- /dev/null +++ b/keyboards/handwired/wulkan/config.h @@ -0,0 +1,23 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Wulkan +#define PRODUCT Handwired48Keys +#define DESCRIPTION A compact ortholinear handwired keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +#define MATRIX_ROW_PINS { B8, A0, A1, A2 } +#define MATRIX_COL_PINS { B13, B14, B15, B9, B7, B6, B5, B4, B3, B2, B1, B0 } + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +#define FORCE_NKRO diff --git a/keyboards/handwired/wulkan/info.json b/keyboards/handwired/wulkan/info.json new file mode 100644 index 000000000..db292af3d --- /dev/null +++ b/keyboards/handwired/wulkan/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "wulkan", + "url": "", + "maintainer": "Napoleon Wulkan", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x12": { + "key_count": 48, + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}] + } + } + } diff --git a/keyboards/handwired/wulkan/keymaps/default/keymap.c b/keyboards/handwired/wulkan/keymaps/default/keymap.c new file mode 100644 index 000000000..5134fb000 --- /dev/null +++ b/keyboards/handwired/wulkan/keymaps/default/keymap.c @@ -0,0 +1,111 @@ +#include QMK_KEYBOARD_H + +enum layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum unicode_names { + SE_AA_HIGH, + SE_AE_HIGH, + SE_OE_HIGH, + SE_AA_LOW, + SE_AE_LOW, + SE_OE_LOW, +}; + +const uint32_t PROGMEM unicode_map[] = { + [SE_AA_HIGH] = 0x00C5, + [SE_AE_HIGH] = 0x00C4, + [SE_OE_HIGH] = 0x00D6, + [SE_AA_LOW] = 0x00E5, + [SE_AE_LOW] = 0x00E4, + [SE_OE_LOW] = 0x00F6, +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Ctrl | Alt | GUI |Lower |Enter |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, 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_LCTL, KC_LALT, KC_LGUI, LOWER, KC_ENT, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | Å | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | Ö | Ä | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( + _______, RESET, _______, _______, KC_WH_U, _______, _______, KC_MS_U, _______, _______, XP(SE_AA_LOW, SE_AA_HIGH), KC_DEL, + _______, _______, _______, _______, KC_WH_D, _______, KC_MS_L, KC_MS_D, KC_MS_R, XP(SE_OE_LOW, SE_OE_HIGH), XP(SE_AE_LOW, SE_AE_HIGH), _______, + _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, KC_BTN1, _______, KC_BTN2, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +void eeconfig_init_user(void) { + set_unicode_input_mode(UC_LNX); +} diff --git a/keyboards/handwired/wulkan/keymaps/default/rules.mk b/keyboards/handwired/wulkan/keymaps/default/rules.mk new file mode 100644 index 000000000..502b2def7 --- /dev/null +++ b/keyboards/handwired/wulkan/keymaps/default/rules.mk @@ -0,0 +1 @@ +UNICODEMAP_ENABLE = yes diff --git a/keyboards/handwired/wulkan/rules.mk b/keyboards/handwired/wulkan/rules.mk new file mode 100644 index 000000000..3f881b7f1 --- /dev/null +++ b/keyboards/handwired/wulkan/rules.mk @@ -0,0 +1,22 @@ +MCU = STM32F303 + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +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 +NKRO_ENABLE = yes # USB Nkey Rollover +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no +LAYOUTS = ortho_4x12 +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +NO_SUSPEND_POWER_DOWN = yes +UNICODEMAP_ENABLE = no diff --git a/keyboards/handwired/wulkan/wulkan.c b/keyboards/handwired/wulkan/wulkan.c new file mode 100644 index 000000000..5409fa5b5 --- /dev/null +++ b/keyboards/handwired/wulkan/wulkan.c @@ -0,0 +1,6 @@ +#include "wulkan.h" + +void matrix_init_kb(void) { + matrix_init_user(); +} + diff --git a/keyboards/handwired/wulkan/wulkan.h b/keyboards/handwired/wulkan/wulkan.h new file mode 100644 index 000000000..cb4882ac9 --- /dev/null +++ b/keyboards/handwired/wulkan/wulkan.h @@ -0,0 +1,21 @@ +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT_ortho_4x12( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B } \ +} + + +#define LAYOUT LAYOUT_ortho_4x12 From 676633e1f396d6ab88ef7d5465e8ffccb9f49af2 Mon Sep 17 00:00:00 2001 From: yttyx Date: Thu, 11 Jul 2019 19:32:47 +0100 Subject: [PATCH 329/341] [Keymap] Balance Twelve / Steno Keymap for Planck (#6283) * New keymap. Cursor layer does not work. * Refinements to layout over months of use. * Changes following review. * Changes following review. --- keyboards/planck/keymaps/yttyx/config.h | 5 + keyboards/planck/keymaps/yttyx/keymap.c | 146 +++++++++++++++++++++++ keyboards/planck/keymaps/yttyx/readme.md | 68 +++++++++++ keyboards/planck/keymaps/yttyx/rules.mk | 11 ++ 4 files changed, 230 insertions(+) create mode 100644 keyboards/planck/keymaps/yttyx/config.h create mode 100644 keyboards/planck/keymaps/yttyx/keymap.c create mode 100644 keyboards/planck/keymaps/yttyx/readme.md create mode 100644 keyboards/planck/keymaps/yttyx/rules.mk diff --git a/keyboards/planck/keymaps/yttyx/config.h b/keyboards/planck/keymaps/yttyx/config.h new file mode 100644 index 000000000..88d0c07e9 --- /dev/null +++ b/keyboards/planck/keymaps/yttyx/config.h @@ -0,0 +1,5 @@ +#pragma once +#define NO_ACTION_ONESHOT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION +#define TAPPING_TOGGLE 2 diff --git a/keyboards/planck/keymaps/yttyx/keymap.c b/keyboards/planck/keymaps/yttyx/keymap.c new file mode 100644 index 000000000..0fcbae892 --- /dev/null +++ b/keyboards/planck/keymaps/yttyx/keymap.c @@ -0,0 +1,146 @@ + +#include QMK_KEYBOARD_H +#include + +enum planck_layers { + _BA, // Base (Balance Twelve mirror variant) + _PL, // Plover (http://opensteno.org) + _NP, // Numeric/punctuation + _FC // Function/cursor +}; + +enum planck_keycodes { + BA = SAFE_RANGE, + PL +}; + + +// Abbreviations +#define KX_SFT_Z MT(MOD_LSFT, KC_Z) +#define KX_SFT_X MT(MOD_RSFT, KC_X) +#define LT_ESC_FC LT(_FC, KC_ESC) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* BA + .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------. + | P | L | C | D | W | | | U | O | Y | K | Q | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | N | R | S | T | M | | BS | A | E | I | H | V | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Z Sft | J | F | G | B | | Ent | ' @ | , < | . > | X Sft | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Ctl | Alt | Sup | NP | Spc | Esc/FC | Sft | Sft | Sup | Alt | Ctl | | + '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------' + */ + [_BA] = LAYOUT_planck_grid( + KC_P, KC_L, KC_C, KC_D, KC_W, XXXXXXX, XXXXXXX, KC_U, KC_O, KC_Y, KC_K, KC_Q, + KC_N, KC_R, KC_S, KC_T, KC_M, XXXXXXX, KC_BSPC, KC_A, KC_E, KC_I, KC_H, KC_V, + KX_SFT_Z, KC_J, KC_F, KC_G, KC_B, XXXXXXX, KC_ENT, KC_QUOT, KC_COMM, KC_DOT, KX_SFT_X, XXXXXXX, + KC_LCTL, KC_LALT, KC_LGUI, MO(_NP), KC_SPC, LT_ESC_FC, KC_LSFT, KC_LSFT, KC_LGUI, KC_LALT, KC_LCTL, XXXXXXX + ), + + /* Plover + .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------. + | # | # | # | # | # | BA | # | # | # | # | # | # | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | S | T | P | H | * | | * | F | P | L | T | D | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | S | K | W | R | * | | * | R | B | G | S | Z | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | | | A | O | | E | U | | | | | + '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------' + */ + [_PL] = LAYOUT_planck_grid( + STN_NUM, STN_NUM, STN_NUM, STN_NUM, STN_NUM, BA, STN_NUM, STN_NUM, STN_NUM, STN_NUM, STN_NUM, STN_NUM, + STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, XXXXXXX, STN_ST1, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, + STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, XXXXXXX, STN_ST2, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, + XXXXXXX, XXXXXXX, XXXXXXX, STN_A, STN_O, XXXXXXX, STN_E, STN_U, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + + /* Numeric/punctuation + .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------. + | 1 ! | 2 " | 3 | 4 $ | 5 % | PL | | 6 ^ | 7 & | 8 * | 9 ( | 0 ) | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Tab | Ctl-X | Ctl-C | Ctl-V | Ctl-Z | | BS | [ { | ] } | - _ | ; : | \ | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Sft | | | Del | Ins | | | / ? | = + | # ~ | ` | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Ctl | Alt | Sup | NP | Spc | | Sft | Sft | Sup | Alt | Ctl | | + '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------' + */ + [_NP] = LAYOUT_planck_grid( + KC_1, KC_2, KC_3, KC_4, KC_5, PL, XXXXXXX, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_TAB, C(KC_X), C(KC_C), C(KC_V), C(KC_Z), XXXXXXX, _______, KC_LBRC, KC_RBRC, KC_MINS, KC_SCLN, KC_NUBS, + KC_LSFT, XXXXXXX, XXXXXXX, KC_DEL, KC_INS, XXXXXXX, XXXXXXX, KC_SLSH, KC_EQL, KC_NUHS, KC_GRV, XXXXXXX, + _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, XXXXXXX + ), + + /* Function/cursor + .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------. + | F1 | F2 | F3 | F4 | F5 | | | Home | Up | End | PgUp | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | F6 | F7 | F8 | F9 | F10 | | | Left | Down | Right | PgDn | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Sft | | | F11 | F12 | | | PScr | Break | ScLk | Caps | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Ctl | Alt | Sup | | Spc | | Sft | Sft | Sup | Alt | Ctl | | + '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------' + */ + [_FC] = LAYOUT_planck_grid( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, + _______, XXXXXXX, XXXXXXX, KC_F11, KC_F12, XXXXXXX, XXXXXXX, KC_PSCR, KC_BRK, KC_SLCK, KC_CAPS, XXXXXXX, + _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, XXXXXXX + ) + +}; + + +#ifdef AUDIO_ENABLE + float plover_on[][2] = SONG(PLOVER_SOUND); + float plover_off[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case PL: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_on); + #endif + + layer_off(_NP); + layer_off(_FC); + layer_on(_PL); + + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + case BA: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_off); + #endif + + layer_off(_NP); + layer_off(_PL); + layer_off(_FC); + } + return false; + } + return true; +} + +void matrix_init_user() { + steno_set_mode(STENO_MODE_GEMINI); +} + diff --git a/keyboards/planck/keymaps/yttyx/readme.md b/keyboards/planck/keymaps/yttyx/readme.md new file mode 100644 index 000000000..6661c3170 --- /dev/null +++ b/keyboards/planck/keymaps/yttyx/readme.md @@ -0,0 +1,68 @@ +# Overview + +* Base layer uses the Balance Twelve layout ([reference](https://mathematicalmulticore.wordpress.com/the-keyboard-layout-project/)) +* Plover layer uses the same home position as the base layer ([reference](http://www.openstenoproject.org/)) + +## To build + +``` +make planck/rev6:yttyx +``` + +## To build and flash + +``` +make planck/rev6:yttyx:dfu-util +``` + +## Layers + +### Base + + .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------. + | P | L | C | D | W | | | U | O | Y | K | Q | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | N | R | S | T | M | | BS | A | E | I | H | V | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Z Sft | J | F | G | B | | Ent | ' @ | , < | . > | X Sft | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Ctl | Alt | Sup | NP | Spc | Esc/FC | Sft | Sft | Sup | Alt | Ctl | | + '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------' + +### Plover + + .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------. + | # | # | # | # | # | BA | # | # | # | # | # | # | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | S | T | P | H | * | | * | F | P | L | T | D | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | S | K | W | R | * | | * | R | B | G | S | Z | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | | | A | O | | E | U | | | | | + '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------' + +### Numeric/Punctuation + + .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------. + | 1 ! | 2 " | 3 £ | 4 $ | 5 % | PL | | 6 ^ | 7 & | 8 * | 9 ( | 0 ) | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Tab | Ctl-X | Ctl-C | Ctl-V | Ctl-Z | | BS | [ { | ] } | - _ | ; : | \ | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Sft | | | Del | Ins | | | / ? | = + | # ~ | ` | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Ctl | Alt | Sup | NP | Spc | | Sft | Sft | Sup | Alt | Ctl | | + '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------' + +### Function + + .--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------.--------. + | F1 | F2 | F3 | F4 | F5 | | | Home | Up | End | PgUp | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | F6 | F7 | F8 | F9 | F10 | | | Left | Down | Right | PgDn | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Sft | | | F11 | F12 | | | PScr | Break | ScLk | Caps | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Ctl | Alt | Sup | | Spc | | Sft | Sft | Sup | Alt | Ctl | | + '--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------'--------' + + diff --git a/keyboards/planck/keymaps/yttyx/rules.mk b/keyboards/planck/keymaps/yttyx/rules.mk new file mode 100644 index 000000000..27dac6d4d --- /dev/null +++ b/keyboards/planck/keymaps/yttyx/rules.mk @@ -0,0 +1,11 @@ +# Build Options +AUDIO_ENABLE = yes +CONSOLE_ENABLE = no +EXTRAKEY_ENABLE = no +MIDI_ENABLE = no +MOUSEKEY_ENABLE = no +NKRO_ENABLE = yes +RGBLIGHT_ENABLE = no +STENO_ENABLE = yes +VIRTSER_ENABLE = yes + From ecf0612cc8ed9458e30f7feafe6b3f7bb6985788 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 12 Jul 2019 04:33:55 +1000 Subject: [PATCH 330/341] [Docs] Clarify the rules.mk setup for Unicode (#6286) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Clarify the rules.mk setup for Unicode * code point Co-Authored-By: Konstantin Đorđević * Remove "your" Co-Authored-By: Konstantin Đorđević * Undo a line change Co-Authored-By: Konstantin Đorđević * dot the comma Co-Authored-By: Konstantin Đorđević * Update docs/feature_unicode.md Co-Authored-By: Konstantin Đorđević --- docs/feature_unicode.md | 68 +++++++++++++++++++++++++++-------------- 1 file changed, 45 insertions(+), 23 deletions(-) diff --git a/docs/feature_unicode.md b/docs/feature_unicode.md index 778cdc69c..bd1f4fa5a 100644 --- a/docs/feature_unicode.md +++ b/docs/feature_unicode.md @@ -1,28 +1,44 @@ # Unicode Support -There are three Unicode keymap definition methods available in QMK: +Unicode characters can be input straight from your keyboard! There are some limitations, however. -## `UNICODE_ENABLE` +QMK has three different methods for enabling Unicode input and defining keycodes: -Supports Unicode up to `0x7FFF`. This covers characters for most modern languages, as well as symbols, but it doesn't cover emoji. The keycode function is `UC(c)` in the keymap, where _c_ is the code point's number (preferably hexadecimal, up to 4 digits long). For example: `UC(0x45B)`, `UC(0x30C4)`. +## Basic Unicode -## `UNICODEMAP_ENABLE` +This method supports Unicode code points up to `0x7FFF`. This covers characters for most modern languages, as well as symbols, but it doesn't cover emoji. -Supports Unicode up to `0x10FFFF` (all possible code points). You need to maintain a separate mapping table `const uint32_t PROGMEM unicode_map[] = {...}` in your keymap file. The keycode function is `X(i)`, where _i_ is an array index into the mapping table. The table may contain at most 16384 entries. +Add the following to your `rules.mk`: -You may want to have an enum to make referencing easier. So, you could add something like this to your keymap file: +```make +UNICODE_ENABLE = yes +``` + +Then add `UC(c)` keycodes to your keymap, where _c_ is the code point (preferably in hexadecimal, up to 4 digits long). For example: `UC(0x45B)`, `UC(0x30C4)`. + +## Unicode Map + +This method supports all possible code points (up to `0x10FFFF`); however, you need to maintain a separate mapping table in your keymap file, which may contain at most 16384 entries. + +Add the following to your `rules.mk`: + +```make +UNICODEMAP_ENABLE = yes +``` + +Then add `X(i)` keycodes to your keymap, where _i_ is an array index into the mapping table: ```c enum unicode_names { - BANG, - IRONY, - SNEK, + BANG, + IRONY, + SNEK }; const uint32_t PROGMEM unicode_map[] = { - [BANG] = 0x203D, // ‽ - [IRONY] = 0x2E2E, // ⸮ - [SNEK] = 0x1F40D, // 🐍 + [BANG] = 0x203D, // ‽ + [IRONY] = 0x2E2E, // ⸮ + [SNEK] = 0x1F40D, // 🐍 }; ``` @@ -30,27 +46,33 @@ Then you can use `X(BANG)`, `X(SNEK)` etc. in your keymap. ### Lower and Upper Case -Characters often come in lower and upper case pairs, for example: å, Å. To make inputting these characters easier, you can use `XP(i, j)` in your keymap, where _i_ and _j_ are the mapping table indices of the lower and upper case character, respectively. If you're holding down Shift or have Caps Lock turned on when you press the key, the second (upper case) character will be inserted; otherwise, the first (lower case) version will appear. +Characters often come in lower and upper case pairs, such as å and Å. To make inputting these characters easier, you can use `XP(i, j)` in your keymap, where _i_ and _j_ are the mapping table indices of the lower and upper case character, respectively. If you're holding down Shift or have Caps Lock turned on when you press the key, the second (upper case) character will be inserted; otherwise, the first (lower case) version will appear. -This is most useful when creating a keymap for an international layout with special characters. Instead of having to put the lower and upper case versions of a character on separate keys, you can have them both on the same key by using `XP`. This blends Unicode keys in with regular alphas. +This is most useful when creating a keymap for an international layout with special characters. Instead of having to put the lower and upper case versions of a character on separate keys, you can have them both on the same key by using `XP()`. This helps blend Unicode keys in with regular alphas. Due to keycode size constraints, _i_ and _j_ can each only refer to one of the first 128 characters in your `unicode_map`. In other words, 0 ≤ _i_ ≤ 127 and 0 ≤ _j_ ≤ 127. This is enough for most use cases, but if you'd like to customize the index calculation, you can override the [`unicodemap_index()`](https://github.com/qmk/qmk_firmware/blob/71f640d47ee12c862c798e1f56392853c7b1c1a8/quantum/process_keycode/process_unicodemap.c#L40) function. This also allows you to, say, check Ctrl instead of Shift/Caps. -## `UCIS_ENABLE` +## UCIS -Supports Unicode up to `0x10FFFF` (all possible code points). As with `UNICODEMAP`, you need to maintain a mapping table in your keymap file. However, there are no built-in keycodes for this feature — you have to add a keycode or function that calls `qk_ucis_start()`. Once this function has been called, you can type the corresponding mnemonic for your character, then hit Space or Enter to complete it, or Esc to cancel. If the mnemonic matches an entry in your table, the typed text will automatically be erased and the corresponding Unicode character inserted. +This method also supports all possible code points. As with the Unicode Map method, you need to maintain a mapping table in your keymap file. However, there are no built-in keycodes for this feature — you have to create a custom keycode or function that invokes this functionality. -For instance, you could define a table like this in your keymap file: +Add the following to your `rules.mk`: + +```make +UCIS_ENABLE = yes +``` + +Then define a table like this in your keymap file: ```c const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE( - UCIS_SYM("poop", 0x1F4A9), // 💩 - UCIS_SYM("rofl", 0x1F923), // 🤣 - UCIS_SYM("kiss", 0x1F619) // 😙 + UCIS_SYM("poop", 0x1F4A9), // 💩 + UCIS_SYM("rofl", 0x1F923), // 🤣 + UCIS_SYM("kiss", 0x1F619) // 😙 ); ``` -To use it, call `qk_ucis_start()`, then type "rofl" and hit Enter. QMK should erase the "rofl" text and insert the laughing emoji. +To use it, call `qk_ucis_start()`. Then, type the mnemonic for the character (such as "rofl"), and hit Space or Enter. QMK should erase the "rofl" text and insert the laughing emoji. ### Customization @@ -68,7 +90,7 @@ Unicode input in QMK works by inputting a sequence of characters to the OS, sort The following input modes are available: -* **`UC_OSX`**: macOS built-in Unicode hex input. Supports code points up to `0xFFFF` (`0x10FFFF` with `UNICODEMAP`). +* **`UC_OSX`**: macOS built-in Unicode hex input. Supports code points up to `0xFFFF` (`0x10FFFF` with Unicode Map). To enable, go to _System Preferences > Keyboard > Input Sources_, add _Unicode Hex Input_ to the list (it's under _Other_), then activate it from the input dropdown in the Menu Bar. By default, this mode uses the left Option key (`KC_LALT`) for Unicode input, but this can be changed by defining [`UNICODE_KEY_OSX`](#input-key-configuration) with another keycode. @@ -112,7 +134,7 @@ You can also switch the input mode by calling `set_unicode_input_mode(x)` in you ```c void eeconfig_init_user(void) { - set_unicode_input_mode(UC_LNX); + set_unicode_input_mode(UC_LNX); } ``` From 2bbbfc61543053f297e38fd070d8b18ee380bff5 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 12 Jul 2019 05:04:22 +1000 Subject: [PATCH 331/341] [Keyboard] Update Felix keyboard (#6306) --- keyboards/felix/config.h | 220 +++++++++++++++++++++-- keyboards/felix/felix.h | 5 +- keyboards/felix/info.json | 23 ++- keyboards/felix/keymaps/default/keymap.c | 25 +-- keyboards/felix/readme.md | 2 +- keyboards/felix/rules.mk | 38 ++-- 6 files changed, 258 insertions(+), 55 deletions(-) diff --git a/keyboards/felix/config.h b/keyboards/felix/config.h index 0dd8eea07..19a5247d2 100644 --- a/keyboards/felix/config.h +++ b/keyboards/felix/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -9,40 +8,225 @@ #define DEVICE_VER 0x0001 #define MANUFACTURER Unikeyboard #define PRODUCT Felix -#define DESCRIPTION 4x5 number/macropad. +#define DESCRIPTION 4x5 number/macropad /* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 4 -/* key matrix pins */ +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ #define MATRIX_ROW_PINS { B2, B3, B1, F7, F6 } #define MATRIX_COL_PINS { B5, B4, E6, D7 } #define UNUSED_PINS -/* COL2ROW or ROW2COL */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL -/* number of backlight levels */ -/* Not sure what pin controls the backlighting, need help for this. */ -#define BACKLIGHT_PIN -#define BACKLIGHT_LEVELS 5 +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 -/* Set 0 if debouncing isn't needed */ +#define BACKLIGHT_PIN C6 +#define BACKLIGHT_LEVELS 5 +//#define BACKLIGHT_BREATHING + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE - /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* there is no rgb underglow by default. */ -#define RGB_DI_PIN -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 16 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line #endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/felix/felix.h b/keyboards/felix/felix.h index 86a9b4e72..f43a586c8 100644 --- a/keyboards/felix/felix.h +++ b/keyboards/felix/felix.h @@ -1,5 +1,4 @@ -#ifndef FELIX_H -#define FELIX_H +#pragma once #include "quantum.h" @@ -18,5 +17,3 @@ } #define LAYOUT LAYOUT_ortho_5x4 - -#endif \ No newline at end of file diff --git a/keyboards/felix/info.json b/keyboards/felix/info.json index a9b3c3dd0..3b1cfda2f 100644 --- a/keyboards/felix/info.json +++ b/keyboards/felix/info.json @@ -6,7 +6,28 @@ "height": 5, "layouts": { "LAYOUT_ortho_5x4": { - "layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K100", "x":0, "y":1}, {"label":"K101", "x":1, "y":1}, {"label":"K102", "x":2, "y":1}, {"label":"K103", "x":3, "y":1}, {"label":"K200", "x":0, "y":2}, {"label":"K201", "x":1, "y":2}, {"label":"K202", "x":2, "y":2}, {"label":"K203", "x":3, "y":2}, {"label":"K300", "x":0, "y":3}, {"label":"K301", "x":1, "y":3}, {"label":"K302", "x":2, "y":3}, {"label":"K303", "x":3, "y":3}, {"label":"K400", "x":0, "y":4}, {"label":"K401", "x":1, "y":4}, {"label":"K402", "x":2, "y":4}, {"label":"K403", "x":3, "y":4}] + "layout": [ + {"label":"K000", "x":0, "y":0}, + {"label":"K001", "x":1, "y":0}, + {"label":"K002", "x":2, "y":0}, + {"label":"K003", "x":3, "y":0}, + {"label":"K100", "x":0, "y":1}, + {"label":"K101", "x":1, "y":1}, + {"label":"K102", "x":2, "y":1}, + {"label":"K103", "x":3, "y":1}, + {"label":"K200", "x":0, "y":2}, + {"label":"K201", "x":1, "y":2}, + {"label":"K202", "x":2, "y":2}, + {"label":"K203", "x":3, "y":2}, + {"label":"K300", "x":0, "y":3}, + {"label":"K301", "x":1, "y":3}, + {"label":"K302", "x":2, "y":3}, + {"label":"K303", "x":3, "y":3}, + {"label":"K400", "x":0, "y":4}, + {"label":"K401", "x":1, "y":4}, + {"label":"K402", "x":2, "y":4}, + {"label":"K403", "x":3, "y":4} + ] } } } diff --git a/keyboards/felix/keymaps/default/keymap.c b/keyboards/felix/keymaps/default/keymap.c index a0093bf8e..630a46c08 100644 --- a/keyboards/felix/keymaps/default/keymap.c +++ b/keyboards/felix/keymaps/default/keymap.c @@ -1,22 +1,11 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - LAYOUT( - KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - KC_P7, KC_P8, KC_P9, KC_PPLS, - KC_P4, KC_P5, KC_P6, KC_HOME, - KC_P1, KC_P2, KC_P3, KC_END, - KC_P0, KC_PEQL, KC_PDOT, KC_PENT - ), - + LAYOUT_ortho_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_HOME, + KC_P1, KC_P2, KC_P3, KC_END, + KC_P0, KC_PEQL, KC_PDOT, KC_PENT + ) }; - -void persistant_default_layer_set(uint16_t default_layer) { -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - } - return true; -} diff --git a/keyboards/felix/readme.md b/keyboards/felix/readme.md index d671b0c01..0a3fe10a6 100644 --- a/keyboards/felix/readme.md +++ b/keyboards/felix/readme.md @@ -10,4 +10,4 @@ Make example for this keyboard (after setting up your build environment): make felix: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). diff --git a/keyboards/felix/rules.mk b/keyboards/felix/rules.mk index e8f834341..b33785b64 100644 --- a/keyboards/felix/rules.mk +++ b/keyboards/felix/rules.mk @@ -37,22 +37,34 @@ F_USB = $(F_CPU) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina # Build Options -# comment out to disable the options. +# change yes to no to disable # -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 = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -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 = no # Enable keyboard backlight functionality -AUDIO_ENABLE = no -RGBLIGHT_ENABLE = no +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 = no # Console for debug(+400) +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 +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 keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) LAYOUTS = ortho_5x4 From 8e348c427d2b8dc670a2967e6cb8d2de4f897f7a Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 12 Jul 2019 05:05:13 +1000 Subject: [PATCH 332/341] Display firmware size percentage (#6307) --- message.mk | 4 ++-- tmk_core/rules.mk | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/message.mk b/message.mk index 734de8645..ec9bacbf4 100644 --- a/message.mk +++ b/message.mk @@ -79,8 +79,8 @@ MSG_TEST = Testing $(BOLD)$(TEST_NAME)$(NO_COLOR) MSG_CHECK_FILESIZE = Checking file size of $(TARGET).hex MSG_FILE_TOO_BIG = $(ERROR_COLOR)The firmware is too large!$(NO_COLOR) $(CURRENT_SIZE)/$(MAX_SIZE) ($(OVER_SIZE) bytes over)\n MSG_FILE_TOO_SMALL = The firmware is too small! $(CURRENT_SIZE)/$(MAX_SIZE)\n -MSG_FILE_JUST_RIGHT = The firmware size is fine - $(CURRENT_SIZE)/$(MAX_SIZE) ($(FREE_SIZE) bytes free)\n -MSG_FILE_NEAR_LIMIT = The firmware size is approaching the maximum - $(CURRENT_SIZE)/$(MAX_SIZE) ($(FREE_SIZE) bytes free)\n +MSG_FILE_JUST_RIGHT = The firmware size is fine - $(CURRENT_SIZE)/$(MAX_SIZE) ($(PERCENT_SIZE)%%, $(FREE_SIZE) bytes free)\n +MSG_FILE_NEAR_LIMIT = The firmware size is approaching the maximum - $(CURRENT_SIZE)/$(MAX_SIZE) ($(PERCENT_SIZE)%%, $(FREE_SIZE) bytes free)\n MSG_PYTHON_MISSING = $(WARN_COLOR)WARNING:$(NO_COLOR)\n \ Python 3 is not installed. It will be required by a future version\n\ of qmk_firmware.\n\n\ diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index 8f876a383..96b6e3a27 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -398,6 +398,7 @@ check-size: $(eval CURRENT_SIZE=$(shell if [ -f $(BUILD_DIR)/$(TARGET).hex ]; then $(SIZE) --target=$(FORMAT) $(BUILD_DIR)/$(TARGET).hex | $(AWK) 'NR==2 {print $$4}'; else printf 0; fi)) $(eval FREE_SIZE=$(shell expr $(MAX_SIZE) - $(CURRENT_SIZE))) $(eval OVER_SIZE=$(shell expr $(CURRENT_SIZE) - $(MAX_SIZE))) + $(eval PERCENT_SIZE=$(shell expr $(CURRENT_SIZE) \* 100 / $(MAX_SIZE))) if [ $(MAX_SIZE) -gt 0 ] && [ $(CURRENT_SIZE) -gt 0 ]; then \ $(SILENT) || printf "$(MSG_CHECK_FILESIZE)" | $(AWK_CMD); \ if [ $(CURRENT_SIZE) -gt $(MAX_SIZE) ]; then \ From 901edea9275b02acd02abb8257b6b33a217fce0c Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 12 Jul 2019 05:09:48 +1000 Subject: [PATCH 333/341] [Keyboard] Fix XD96 info.json (#6309) * Fix XD96 info.json * Comma * Another comma Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- keyboards/xd96/info.json | 224 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 222 insertions(+), 2 deletions(-) diff --git a/keyboards/xd96/info.json b/keyboards/xd96/info.json index f18068273..2d678414c 100644 --- a/keyboards/xd96/info.json +++ b/keyboards/xd96/info.json @@ -7,11 +7,231 @@ "layouts": { "LAYOUT_96_ansi": { "key_count": 99, - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"Insert", "x":13, "y":0}, {"label":"Delete", "x":14, "y":0}, {"label":"Home", "x":15, "y":0}, {"label":"End", "x":16, "y":0}, {"label":"PgUp", "x":17, "y":0}, {"label":"PgDn", "x":18, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Num Lock", "x":15, "y":1}, {"label":"/", "x":16, "y":1}, {"label":"*", "x":17, "y":1}, {"label":"-", "x":18, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"7", "x":15, "y":2}, {"label":"8", "x":16, "y":2}, {"label":"9", "x":17, "y":2}, {"label":"+", "x":18, "y":2, "h":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"4", "x":15, "y":3}, {"label":"5", "x":16, "y":3}, {"label":"6", "x":17, "y":3}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"1", "x":15, "y":4}, {"label":"2", "x":16, "y":4}, {"label":"3", "x":17, "y":4}, {"label":"Enter", "x":18, "y":4, "h":2}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5, "w":1.5}, {"label":"Ctrl", "x":11.5, "y":5, "w":1.5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}, {"label":"0", "x":16, "y":5}, {"label":".", "x":17, "y":5}] + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":1, "y":0}, + {"label":"F2", "x":2, "y":0}, + {"label":"F3", "x":3, "y":0}, + {"label":"F4", "x":4, "y":0}, + {"label":"F5", "x":5, "y":0}, + {"label":"F6", "x":6, "y":0}, + {"label":"F7", "x":7, "y":0}, + {"label":"F8", "x":8, "y":0}, + {"label":"F9", "x":9, "y":0}, + {"label":"F10", "x":10, "y":0}, + {"label":"F11", "x":11, "y":0}, + {"label":"F12", "x":12, "y":0}, + {"label":"Insert", "x":13, "y":0}, + {"label":"Delete", "x":14, "y":0}, + {"label":"Home", "x":15, "y":0}, + {"label":"End", "x":16, "y":0}, + {"label":"PgUp", "x":17, "y":0}, + {"label":"PgDn", "x":18, "y":0}, + + {"label":"~", "x":0, "y":1}, + {"label":"!", "x":1, "y":1}, + {"label":"@", "x":2, "y":1}, + {"label":"#", "x":3, "y":1}, + {"label":"$", "x":4, "y":1}, + {"label":"%", "x":5, "y":1}, + {"label":"^", "x":6, "y":1}, + {"label":"&", "x":7, "y":1}, + {"label":"*", "x":8, "y":1}, + {"label":"(", "x":9, "y":1}, + {"label":")", "x":10, "y":1}, + {"label":"_", "x":11, "y":1}, + {"label":"+", "x":12, "y":1}, + {"label":"Backspace", "x":13, "y":1, "w":2}, + + {"label":"Num Lock", "x":15, "y":1}, + {"label":"/", "x":16, "y":1}, + {"label":"*", "x":17, "y":1}, + {"label":"-", "x":18, "y":1}, + + {"label":"Tab", "x":0, "y":2, "w":1.5}, + {"label":"Q", "x":1.5, "y":2}, + {"label":"W", "x":2.5, "y":2}, + {"label":"E", "x":3.5, "y":2}, + {"label":"R", "x":4.5, "y":2}, + {"label":"T", "x":5.5, "y":2}, + {"label":"Y", "x":6.5, "y":2}, + {"label":"U", "x":7.5, "y":2}, + {"label":"I", "x":8.5, "y":2}, + {"label":"O", "x":9.5, "y":2}, + {"label":"P", "x":10.5, "y":2}, + {"label":"{", "x":11.5, "y":2}, + {"label":"}", "x":12.5, "y":2}, + {"label":"|", "x":13.5, "y":2, "w":1.5}, + {"label":"7", "x":15, "y":2}, + {"label":"8", "x":16, "y":2}, + {"label":"9", "x":17, "y":2}, + + {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, + {"label":"A", "x":1.75, "y":3}, + {"label":"S", "x":2.75, "y":3}, + {"label":"D", "x":3.75, "y":3}, + {"label":"F", "x":4.75, "y":3}, + {"label":"G", "x":5.75, "y":3}, + {"label":"H", "x":6.75, "y":3}, + {"label":"J", "x":7.75, "y":3}, + {"label":"K", "x":8.75, "y":3}, + {"label":"L", "x":9.75, "y":3}, + {"label":":", "x":10.75, "y":3}, + {"label":"\"", "x":11.75, "y":3}, + {"label":"Enter", "x":12.75, "y":3, "w":2.25}, + + {"label":"4", "x":15, "y":3}, + {"label":"5", "x":16, "y":3}, + {"label":"6", "x":17, "y":3}, + {"label":"+", "x":18, "y":2, "h":2}, + + {"label":"Shift", "x":0, "y":4, "w":2.25}, + {"label":"Z", "x":2.25, "y":4}, + {"label":"X", "x":3.25, "y":4}, + {"label":"C", "x":4.25, "y":4}, + {"label":"V", "x":5.25, "y":4}, + {"label":"B", "x":6.25, "y":4}, + {"label":"N", "x":7.25, "y":4}, + {"label":"M", "x":8.25, "y":4}, + {"label":"<", "x":9.25, "y":4}, + {"label":">", "x":10.25, "y":4}, + {"label":"?", "x":11.25, "y":4}, + {"label":"Shift", "x":12.25, "y":4, "w":1.75}, + {"label":"\u2191", "x":14, "y":4}, + + {"label":"1", "x":15, "y":4}, + {"label":"2", "x":16, "y":4}, + {"label":"3", "x":17, "y":4}, + + {"label":"Ctrl", "x":0, "y":5, "w":1.25}, + {"label":"Win", "x":1.25, "y":5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5, "w":1.25}, + {"x":3.75, "y":5, "w":6.25}, + {"label":"Alt", "x":10, "y":5, "w":1.5}, + {"label":"Ctrl", "x":11.5, "y":5, "w":1.5}, + {"label":"\u2190", "x":13, "y":5}, + {"label":"\u2193", "x":14, "y":5}, + {"label":"\u2192", "x":15, "y":5}, + + {"label":"0", "x":16, "y":5}, + {"label":".", "x":17, "y":5}, + {"label":"Enter", "x":18, "y":4, "h":2} + ] }, "LAYOUT_96_iso": { "key_count": 100, - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"Insert", "x":13, "y":0}, {"label":"Delete", "x":14, "y":0}, {"label":"Home", "x":15, "y":0}, {"label":"End", "x":16, "y":0}, {"label":"PgUp", "x":17, "y":0}, {"label":"PgDn", "x":18, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"\"", "x":2, "y":1}, {"label":"\u00a3", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Num Lock", "x":15, "y":1}, {"label":"/", "x":16, "y":1}, {"label":"*", "x":17, "y":1}, {"label":"-", "x":18, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"7", "x":15, "y":2}, {"label":"8", "x":16, "y":2}, {"label":"9", "x":17, "y":2}, {"label":"+", "x":18, "y":2, "h":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"@", "x":11.75, "y":3}, {"label":"~", "x":12.75, "y":3}, {"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2}, {"label":"4", "x":15, "y":3}, {"label":"5", "x":16, "y":3}, {"label":"6", "x":17, "y":3}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"label":"|", "x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"1", "x":15, "y":4}, {"label":"2", "x":16, "y":4}, {"label":"3", "x":17, "y":4}, {"label":"Enter", "x":18, "y":4, "h":2}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5, "w":1.5}, {"label":"Ctrl", "x":11.5, "y":5, "w":1.5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}, {"label":"0", "x":16, "y":5}, {"label":".", "x":17, "y":5}] + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":1, "y":0}, + {"label":"F2", "x":2, "y":0}, + {"label":"F3", "x":3, "y":0}, + {"label":"F4", "x":4, "y":0}, + {"label":"F5", "x":5, "y":0}, + {"label":"F6", "x":6, "y":0}, + {"label":"F7", "x":7, "y":0}, + {"label":"F8", "x":8, "y":0}, + {"label":"F9", "x":9, "y":0}, + {"label":"F10", "x":10, "y":0}, + {"label":"F11", "x":11, "y":0}, + {"label":"F12", "x":12, "y":0}, + {"label":"Insert", "x":13, "y":0}, + {"label":"Delete", "x":14, "y":0}, + {"label":"Home", "x":15, "y":0}, + {"label":"End", "x":16, "y":0}, + {"label":"PgUp", "x":17, "y":0}, + {"label":"PgDn", "x":18, "y":0}, + + {"label":"~", "x":0, "y":1}, + {"label":"!", "x":1, "y":1}, + {"label":"\"", "x":2, "y":1}, + {"label":"\u00a3", "x":3, "y":1}, + {"label":"$", "x":4, "y":1}, + {"label":"%", "x":5, "y":1}, + {"label":"^", "x":6, "y":1}, + {"label":"&", "x":7, "y":1}, + {"label":"*", "x":8, "y":1}, + {"label":"(", "x":9, "y":1}, + {"label":")", "x":10, "y":1}, + {"label":"_", "x":11, "y":1}, + {"label":"+", "x":12, "y":1}, + {"label":"Backspace", "x":13, "y":1, "w":2}, + + {"label":"Num Lock", "x":15, "y":1}, + {"label":"/", "x":16, "y":1}, + {"label":"*", "x":17, "y":1}, + {"label":"-", "x":18, "y":1}, + + {"label":"Tab", "x":0, "y":2, "w":1.5}, + {"label":"Q", "x":1.5, "y":2}, + {"label":"W", "x":2.5, "y":2}, + {"label":"E", "x":3.5, "y":2}, + {"label":"R", "x":4.5, "y":2}, + {"label":"T", "x":5.5, "y":2}, + {"label":"Y", "x":6.5, "y":2}, + {"label":"U", "x":7.5, "y":2}, + {"label":"I", "x":8.5, "y":2}, + {"label":"O", "x":9.5, "y":2}, + {"label":"P", "x":10.5, "y":2}, + {"label":"{", "x":11.5, "y":2}, + {"label":"}", "x":12.5, "y":2}, + + {"label":"7", "x":15, "y":2}, + {"label":"8", "x":16, "y":2}, + {"label":"9", "x":17, "y":2}, + + {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, + {"label":"A", "x":1.75, "y":3}, + {"label":"S", "x":2.75, "y":3}, + {"label":"D", "x":3.75, "y":3}, + {"label":"F", "x":4.75, "y":3}, + {"label":"G", "x":5.75, "y":3}, + {"label":"H", "x":6.75, "y":3}, + {"label":"J", "x":7.75, "y":3}, + {"label":"K", "x":8.75, "y":3}, + {"label":"L", "x":9.75, "y":3}, + {"label":":", "x":10.75, "y":3}, + {"label":"@", "x":11.75, "y":3}, + {"label":"~", "x":12.75, "y":3}, + {"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2}, + + {"label":"4", "x":15, "y":3}, + {"label":"5", "x":16, "y":3}, + {"label":"6", "x":17, "y":3}, + {"label":"+", "x":18, "y":2, "h":2}, + + {"label":"Shift", "x":0, "y":4, "w":1.25}, + {"label":"|", "x":1.25, "y":4}, + {"label":"Z", "x":2.25, "y":4}, + {"label":"X", "x":3.25, "y":4}, + {"label":"C", "x":4.25, "y":4}, + {"label":"V", "x":5.25, "y":4}, + {"label":"B", "x":6.25, "y":4}, + {"label":"N", "x":7.25, "y":4}, + {"label":"M", "x":8.25, "y":4}, + {"label":"<", "x":9.25, "y":4}, + {"label":">", "x":10.25, "y":4}, + {"label":"?", "x":11.25, "y":4}, + {"label":"Shift", "x":12.25, "y":4, "w":1.75}, + {"label":"\u2191", "x":14, "y":4}, + + {"label":"1", "x":15, "y":4}, + {"label":"2", "x":16, "y":4}, + {"label":"3", "x":17, "y":4}, + + {"label":"Ctrl", "x":0, "y":5, "w":1.25}, + {"label":"Win", "x":1.25, "y":5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5, "w":1.25}, + {"x":3.75, "y":5, "w":6.25}, + {"label":"Alt", "x":10, "y":5, "w":1.5}, + {"label":"Ctrl", "x":11.5, "y":5, "w":1.5}, + {"label":"\u2190", "x":13, "y":5}, + {"label":"\u2193", "x":14, "y":5}, + {"label":"\u2192", "x":15, "y":5}, + + {"label":"0", "x":16, "y":5}, + {"label":".", "x":17, "y":5}, + {"label":"Enter", "x":18, "y":4, "h":2} + ] } } } From 2121de919253b52e94e66e3eae6af01c3f56f463 Mon Sep 17 00:00:00 2001 From: omkbd Date: Fri, 12 Jul 2019 04:27:13 +0900 Subject: [PATCH 334/341] [Keyboard] [runner3680] Fix the number of keys (#6302) * Fix the number of keys * add RGBLIGHT_LIMIT_VAL * fix RGBLED_NUM and COLS --- keyboards/runner3680/3x6/config.h | 9 +++++---- keyboards/runner3680/3x7/config.h | 9 +++++---- keyboards/runner3680/3x8/config.h | 7 ++++--- keyboards/runner3680/4x6/config.h | 9 +++++---- keyboards/runner3680/4x7/config.h | 9 +++++---- keyboards/runner3680/4x8/config.h | 7 ++++--- keyboards/runner3680/5x6/config.h | 7 ++++--- keyboards/runner3680/5x7/config.h | 3 ++- keyboards/runner3680/5x8/config.h | 1 + keyboards/runner3680/rules.mk | 8 ++++---- 10 files changed, 39 insertions(+), 30 deletions(-) diff --git a/keyboards/runner3680/3x6/config.h b/keyboards/runner3680/3x6/config.h index 0af32f26a..d3f3605f5 100644 --- a/keyboards/runner3680/3x6/config.h +++ b/keyboards/runner3680/3x6/config.h @@ -26,8 +26,8 @@ /* key matrix size */ // Rows are doubled-up -#define MATRIX_ROWS 10 -#define MATRIX_COLS 8 +#define MATRIX_ROWS 6 +#define MATRIX_COLS 6 // wiring of each half #define MATRIX_ROW_PINS { D4, C6, D7 } @@ -51,9 +51,10 @@ /* ws2812 RGB LED */ #define RGB_DI_PIN D3 #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 70 +#define RGBLED_NUM 36 #define RGBLIGHT_SPLIT -#define RGBLED_SPLIT { 35, 35 } // Number of LEDs +#define RGBLED_SPLIT { 18, 18 } // Number of LEDs +#define RGBLIGHT_LIMIT_VAL 100 #define SOFT_SERIAL_PIN D2 #define SELECT_SOFT_SERIAL_SPEED 1 diff --git a/keyboards/runner3680/3x7/config.h b/keyboards/runner3680/3x7/config.h index 4c864f1d0..e0e6ae8e0 100644 --- a/keyboards/runner3680/3x7/config.h +++ b/keyboards/runner3680/3x7/config.h @@ -26,8 +26,8 @@ /* key matrix size */ // Rows are doubled-up -#define MATRIX_ROWS 10 -#define MATRIX_COLS 8 +#define MATRIX_ROWS 6 +#define MATRIX_COLS 7 // wiring of each half #define MATRIX_ROW_PINS { D4, C6, D7 } @@ -51,9 +51,10 @@ /* ws2812 RGB LED */ #define RGB_DI_PIN D3 #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 70 +#define RGBLED_NUM 42 #define RGBLIGHT_SPLIT -#define RGBLED_SPLIT { 35, 35 } // Number of LEDs +#define RGBLED_SPLIT { 21, 21 } // Number of LEDs +#define RGBLIGHT_LIMIT_VAL 100 #define SOFT_SERIAL_PIN D2 #define SELECT_SOFT_SERIAL_SPEED 1 diff --git a/keyboards/runner3680/3x8/config.h b/keyboards/runner3680/3x8/config.h index 696b7f905..0d4e3296a 100644 --- a/keyboards/runner3680/3x8/config.h +++ b/keyboards/runner3680/3x8/config.h @@ -26,7 +26,7 @@ /* key matrix size */ // Rows are doubled-up -#define MATRIX_ROWS 10 +#define MATRIX_ROWS 6 #define MATRIX_COLS 8 // wiring of each half @@ -51,9 +51,10 @@ /* ws2812 RGB LED */ #define RGB_DI_PIN D3 #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 80 +#define RGBLED_NUM 48 #define RGBLIGHT_SPLIT -#define RGBLED_SPLIT { 40, 40 } // Number of LEDs +#define RGBLED_SPLIT { 24, 24 } // Number of LEDs +#define RGBLIGHT_LIMIT_VAL 100 #define SOFT_SERIAL_PIN D2 #define SELECT_SOFT_SERIAL_SPEED 1 diff --git a/keyboards/runner3680/4x6/config.h b/keyboards/runner3680/4x6/config.h index 1e3af6b52..08838d1b6 100644 --- a/keyboards/runner3680/4x6/config.h +++ b/keyboards/runner3680/4x6/config.h @@ -26,8 +26,8 @@ /* key matrix size */ // Rows are doubled-up -#define MATRIX_ROWS 10 -#define MATRIX_COLS 8 +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 // wiring of each half #define MATRIX_ROW_PINS { D4, C6, D7, E6 } @@ -51,9 +51,10 @@ /* ws2812 RGB LED */ #define RGB_DI_PIN D3 #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 70 +#define RGBLED_NUM 48 #define RGBLIGHT_SPLIT -#define RGBLED_SPLIT { 35, 35 } // Number of LEDs +#define RGBLED_SPLIT { 24, 24 } // Number of LEDs +#define RGBLIGHT_LIMIT_VAL 100 #define SOFT_SERIAL_PIN D2 #define SELECT_SOFT_SERIAL_SPEED 1 diff --git a/keyboards/runner3680/4x7/config.h b/keyboards/runner3680/4x7/config.h index c9a744d07..f33f8f9f2 100644 --- a/keyboards/runner3680/4x7/config.h +++ b/keyboards/runner3680/4x7/config.h @@ -26,8 +26,8 @@ /* key matrix size */ // Rows are doubled-up -#define MATRIX_ROWS 10 -#define MATRIX_COLS 8 +#define MATRIX_ROWS 8 +#define MATRIX_COLS 7 // wiring of each half #define MATRIX_ROW_PINS { D4, C6, D7, E6 } @@ -51,9 +51,10 @@ /* ws2812 RGB LED */ #define RGB_DI_PIN D3 #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 70 +#define RGBLED_NUM 56 #define RGBLIGHT_SPLIT -#define RGBLED_SPLIT { 35, 35 } // Number of LEDs +#define RGBLED_SPLIT { 28, 28 } // Number of LEDs +#define RGBLIGHT_LIMIT_VAL 100 #define SOFT_SERIAL_PIN D2 #define SELECT_SOFT_SERIAL_SPEED 1 diff --git a/keyboards/runner3680/4x8/config.h b/keyboards/runner3680/4x8/config.h index 55626b6bc..d85ebb29c 100644 --- a/keyboards/runner3680/4x8/config.h +++ b/keyboards/runner3680/4x8/config.h @@ -26,7 +26,7 @@ /* key matrix size */ // Rows are doubled-up -#define MATRIX_ROWS 10 +#define MATRIX_ROWS 8 #define MATRIX_COLS 8 // wiring of each half @@ -51,9 +51,10 @@ /* ws2812 RGB LED */ #define RGB_DI_PIN D3 #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 80 +#define RGBLED_NUM 64 #define RGBLIGHT_SPLIT -#define RGBLED_SPLIT { 40, 40 } // Number of LEDs +#define RGBLED_SPLIT { 32, 32 } // Number of LEDs +#define RGBLIGHT_LIMIT_VAL 100 #define SOFT_SERIAL_PIN D2 #define SELECT_SOFT_SERIAL_SPEED 1 diff --git a/keyboards/runner3680/5x6/config.h b/keyboards/runner3680/5x6/config.h index e7956555f..ae3853a8e 100644 --- a/keyboards/runner3680/5x6/config.h +++ b/keyboards/runner3680/5x6/config.h @@ -27,7 +27,7 @@ /* key matrix size */ // Rows are doubled-up #define MATRIX_ROWS 10 -#define MATRIX_COLS 8 +#define MATRIX_COLS 6 // wiring of each half #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } @@ -51,9 +51,10 @@ /* ws2812 RGB LED */ #define RGB_DI_PIN D3 #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 70 +#define RGBLED_NUM 60 #define RGBLIGHT_SPLIT -#define RGBLED_SPLIT { 35, 35 } // Number of LEDs +#define RGBLED_SPLIT { 30, 30 } // Number of LEDs +#define RGBLIGHT_LIMIT_VAL 100 #define SOFT_SERIAL_PIN D2 #define SELECT_SOFT_SERIAL_SPEED 1 diff --git a/keyboards/runner3680/5x7/config.h b/keyboards/runner3680/5x7/config.h index ba5763a8a..1d56608e6 100644 --- a/keyboards/runner3680/5x7/config.h +++ b/keyboards/runner3680/5x7/config.h @@ -27,7 +27,7 @@ /* key matrix size */ // Rows are doubled-up #define MATRIX_ROWS 10 -#define MATRIX_COLS 8 +#define MATRIX_COLS 7 // wiring of each half #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } @@ -54,6 +54,7 @@ #define RGBLED_NUM 70 #define RGBLIGHT_SPLIT #define RGBLED_SPLIT { 35, 35 } // Number of LEDs +#define RGBLIGHT_LIMIT_VAL 100 #define SOFT_SERIAL_PIN D2 #define SELECT_SOFT_SERIAL_SPEED 1 diff --git a/keyboards/runner3680/5x8/config.h b/keyboards/runner3680/5x8/config.h index 5c3066bf7..5349fa06a 100644 --- a/keyboards/runner3680/5x8/config.h +++ b/keyboards/runner3680/5x8/config.h @@ -54,6 +54,7 @@ #define RGBLED_NUM 80 #define RGBLIGHT_SPLIT #define RGBLED_SPLIT { 40, 40 } // Number of LEDs +#define RGBLIGHT_LIMIT_VAL 100 #define SOFT_SERIAL_PIN D2 #define SELECT_SOFT_SERIAL_SPEED 1 diff --git a/keyboards/runner3680/rules.mk b/keyboards/runner3680/rules.mk index 1342a9f59..624dd2e50 100644 --- a/keyboards/runner3680/rules.mk +++ b/keyboards/runner3680/rules.mk @@ -38,10 +38,10 @@ BOOTLOADER = caterina # change yes to no to disable # 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 = yes # Commands for debug and configuration +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +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 From 475d2c0c303e9f57d7034fd478ceb724fdd0df44 Mon Sep 17 00:00:00 2001 From: Cody Bender <50554676+codybender@users.noreply.github.com> Date: Thu, 11 Jul 2019 14:01:17 -0600 Subject: [PATCH 335/341] [Keyboard] Adding KeyHive Maypad (#6287) * added files for KeyHive Maypad * updated maypad files and moved honeycomb inside keyhive dir * fixed file paths, incorporated changes with fauxpark's suggestions, undid honeycomb move * updated with fixes from PR * added new lines to end of honeycomb files to fix compiling * Updated info.json to match the macro name from maypad.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * reordered layout in info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * removed KEYMAP from maypad.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * removed extraneous keymap files * pulled qmk/master for honeycomb * added ortho_5x4 and keymap cleanup * matched identities in maypad.h * added bootmagic functionality to maypad * changed bootmagic to lite --- keyboards/keyhive/maypad/config.h | 246 ++++++++++++++++++ keyboards/keyhive/maypad/info.json | 16 ++ .../keyhive/maypad/keymaps/default/config.h | 19 ++ .../keyhive/maypad/keymaps/default/keymap.c | 40 +++ .../keyhive/maypad/keymaps/default/readme.md | 1 + keyboards/keyhive/maypad/maypad.c | 51 ++++ keyboards/keyhive/maypad/maypad.h | 61 +++++ keyboards/keyhive/maypad/readme.md | 13 + keyboards/keyhive/maypad/rules.mk | 82 ++++++ 9 files changed, 529 insertions(+) create mode 100644 keyboards/keyhive/maypad/config.h create mode 100644 keyboards/keyhive/maypad/info.json create mode 100644 keyboards/keyhive/maypad/keymaps/default/config.h create mode 100644 keyboards/keyhive/maypad/keymaps/default/keymap.c create mode 100644 keyboards/keyhive/maypad/keymaps/default/readme.md create mode 100644 keyboards/keyhive/maypad/maypad.c create mode 100644 keyboards/keyhive/maypad/maypad.h create mode 100644 keyboards/keyhive/maypad/readme.md create mode 100644 keyboards/keyhive/maypad/rules.mk diff --git a/keyboards/keyhive/maypad/config.h b/keyboards/keyhive/maypad/config.h new file mode 100644 index 000000000..4fce7ffa0 --- /dev/null +++ b/keyboards/keyhive/maypad/config.h @@ -0,0 +1,246 @@ +/* +Copyright 2019 codybender +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KeyHive +#define PRODUCT maypad +#define DESCRIPTION Budget-friendly numpad + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F6, F7, B1, B3 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * 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_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/keyhive/maypad/info.json b/keyboards/keyhive/maypad/info.json new file mode 100644 index 000000000..547cc8b6e --- /dev/null +++ b/keyboards/keyhive/maypad/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "maypad", + "url": "https://keyhive.xyz/shop/may-pad", + "maintainer": "codybender", + "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}] + }, + "LAYOUT_ortho_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":"+", "x":3, "y":1}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"label":"+", "x":3, "y":2}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"Enter", "x":3, "y":3}, {"label":"0", "x":0, "y":4, "w":2}, {"label":".", "x":2, "y":4}, {"label":"Enter", "x":3, "y":4}] + } + + } +} diff --git a/keyboards/keyhive/maypad/keymaps/default/config.h b/keyboards/keyhive/maypad/keymaps/default/config.h new file mode 100644 index 000000000..867ac3066 --- /dev/null +++ b/keyboards/keyhive/maypad/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 codybender + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/keyhive/maypad/keymaps/default/keymap.c b/keyboards/keyhive/maypad/keymaps/default/keymap.c new file mode 100644 index 000000000..8ba2e4470 --- /dev/null +++ b/keyboards/keyhive/maypad/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2019 codybender + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_numpad_5x4( + 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 + ), +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/keyhive/maypad/keymaps/default/readme.md b/keyboards/keyhive/maypad/keymaps/default/readme.md new file mode 100644 index 000000000..fbd112d92 --- /dev/null +++ b/keyboards/keyhive/maypad/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for maypad \ No newline at end of file diff --git a/keyboards/keyhive/maypad/maypad.c b/keyboards/keyhive/maypad/maypad.c new file mode 100644 index 000000000..825d8c4a5 --- /dev/null +++ b/keyboards/keyhive/maypad/maypad.c @@ -0,0 +1,51 @@ +/* Copyright 2019 codybender + * + * 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 . + */ +#include "maypad.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/keyhive/maypad/maypad.h b/keyboards/keyhive/maypad/maypad.h new file mode 100644 index 000000000..ef4cfa785 --- /dev/null +++ b/keyboards/keyhive/maypad/maypad.h @@ -0,0 +1,61 @@ +/* Copyright 2019 codybender + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* maypad numpad layout + * .-------------------. + * |NLCK| /| *| -| + * |-------------------| + * | 7| 8| 9| | + * |--------------| | + * | 4| 5| 6| +| + * |-------------------| + * | 1| 2| 3| | + * |--------------| | + * | 0| .| Ent| + * '-------------------' + */ +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT_numpad_5x4( \ + k00, k01, k02, k03, \ + 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 } \ +} + +#define LAYOUT_ortho_5x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43 \ +) { \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, k33 }, \ + { k40, k41, k42, k43 } \ +} diff --git a/keyboards/keyhive/maypad/readme.md b/keyboards/keyhive/maypad/readme.md new file mode 100644 index 000000000..3467827b6 --- /dev/null +++ b/keyboards/keyhive/maypad/readme.md @@ -0,0 +1,13 @@ +# KeyHive Maypad + +![Maypad Layout](https://i.imgur.com/B7WXcfy.png) + +A budget-friendly, exposed-component numpad from [KeyHive](https://www.keyhive.xyz) + +Keyboard Maintainer: [Cody Bender](https://github.com/codybender) + +Make example for this keyboard (after setting up your build environment): + + make keyhive/maypad:default + +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). \ No newline at end of file diff --git a/keyboards/keyhive/maypad/rules.mk b/keyboards/keyhive/maypad/rules.mk new file mode 100644 index 000000000..d34236a16 --- /dev/null +++ b/keyboards/keyhive/maypad/rules.mk @@ -0,0 +1,82 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = ortho_5x4 numpad_5x4 From 37d2f6dc2aed10e35f497c269a6e988e10436268 Mon Sep 17 00:00:00 2001 From: skullydazed Date: Thu, 11 Jul 2019 22:33:25 -0700 Subject: [PATCH 336/341] Switch version incrementing to the command put together by @noroadsleft. (#6310) * Switch version incrementing to the command put together by @noroadsleft. * Update util/travis_compiled_push.sh Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> --- util/travis_compiled_push.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 25ed83fb0..04021ae7c 100755 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -29,8 +29,7 @@ NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/ if [[ $NEFM -gt 0 ]] ; then echo "Essential files modified." git fetch --tags - #lasttag=$(git describe --tags $(git rev-list --tags --max-count=10) | grep -Ev '\-' | xargs -I@ git log --format=format:"%ai @%n" -1 @ | sort -V | awk '{print $4}' | tail -1) - lasttag=$(git describe --tags $(git rev-list --tags --max-count=10) | grep -Ev '\-' | sort -V | tail -1) + lasttag=$(git tag --sort=-creatordate --no-column --list '*.*.*' | grep -E -m1 '^[0-9]+\.[0-9]+\.[0-9]+$') newtag=$(increment_version $lasttag) until git tag $newtag; do newtag=$(increment_version $newtag) From 663ca6ba9db59e05f1ba057ad4c0e3ff3cb0cff1 Mon Sep 17 00:00:00 2001 From: Phil Schalm Date: Fri, 12 Jul 2019 05:42:21 -0700 Subject: [PATCH 337/341] Documentation: Newbs Flashing: Hightlight that sudo may be needed (#6300) * Hightlight that sudo may be needed Also added "dfu-programmer: no device present" in so that anyone searching for that particular error can hopefully find the page. * Use new style of indicating a warning * Indicate that the FAQ should be read instead of blindly using sudo --- docs/newbs_flashing.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/newbs_flashing.md b/docs/newbs_flashing.md index a985e5d2b..fa0a5e2ba 100644 --- a/docs/newbs_flashing.md +++ b/docs/newbs_flashing.md @@ -127,9 +127,7 @@ Once it does this, you'll want to reset the controller. It should then show out >>> dfu-programmer atmega32u4 reset ``` -If you have any issues with this, you may need to this: - - sudo make ::dfu +?> If you have any issues with this - such as `dfu-programmer: no device present` - please see the [Frequently Asked Build Questions](faq_build.md). #### DFU commands From 38fdf7a2d2f3f0bb9c21332b81a289de94b9870a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Fri, 12 Jul 2019 15:16:28 +0200 Subject: [PATCH 338/341] [Keymap] Add missing tap dance action and fix RGB hues in personal keymaps (#6312) * Add missing TD_RSF_RCT tap dance * Use standard QMK HSV and RGB structs, fix Godspeed colors * Move PROGMEM after the type in RGB intervals * Add MODERN_DOLCH_RED color, use it on KBD6X * Use 255 instead of RGBLIGHT_LIMIT_VAL in color definitions * Remove IS_COMMAND override on Whitefox --- .../kbdfans/kbd6x/keymaps/konstantin/keymap.c | 5 +++-- keyboards/melody96/keymaps/konstantin/keymap.c | 2 +- keyboards/whitefox/keymaps/konstantin/config.h | 2 -- users/konstantin/rgb.c | 15 ++++++++------- users/konstantin/rgb.h | 17 +++-------------- users/konstantin/tap_dance.c | 1 + users/konstantin/tap_dance.h | 2 ++ 7 files changed, 18 insertions(+), 26 deletions(-) diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c index d06ac1956..b348b0b7b 100644 --- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c +++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c @@ -10,6 +10,7 @@ enum layers_keymap { }; void eeconfig_init_keymap(void) { + rgblight_sethsv(MODERN_DOLCH_RED.h, MODERN_DOLCH_RED.s, MODERN_DOLCH_RED.v); rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL); } @@ -81,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ * │ │Mv←│Mv↓│Mv→│TNx│ │ │ │ │ │ │ │ │ * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ - * │ │RTg│RV-│RV+│ │ │ │ │M4 │M5 │ │ │ │ + * │ │RTg│RV-│RV+│RMd│ │ │ │M4 │M5 │ │ │ │ * └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘ * │DPR│DstNA│ │ │ │ * └───┴─────┴───────────────────────────┴─────┴───┘ @@ -90,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLEAR, _______, TOP, MV_UP, BOTTOM, TAB_PRV, _______, _______, _______, _______, _______, _______, _______, _______, DEL_NXT, _______, MV_LEFT, MV_DOWN, MV_RGHT, TAB_NXT, _______, _______, _______, _______, _______, _______, _______, _______, - _______, RGB_TOG, RGB_VAD, RGB_VAI, _______, _______, _______, _______, KC_BTN4, KC_BTN5, _______, _______, _______, + _______, RGB_TOG, RGB_VAD, RGB_VAI, RGB_MOD, _______, _______, _______, KC_BTN4, KC_BTN5, _______, _______, _______, XXXXXXX, DST_P_R, DST_N_A, _______, _______, _______, XXXXXXX ), }; diff --git a/keyboards/melody96/keymaps/konstantin/keymap.c b/keyboards/melody96/keymaps/konstantin/keymap.c index deaffd53d..c2b043104 100644 --- a/keyboards/melody96/keymaps/konstantin/keymap.c +++ b/keyboards/melody96/keymaps/konstantin/keymap.c @@ -1,7 +1,7 @@ #include QMK_KEYBOARD_H #include "konstantin.h" -static const hsv_t *colors[] = { &GODSPEED_BLUE, &GODSPEED_YELLOW }; +static const HSV *colors[] = { &GODSPEED_BLUE, &GODSPEED_YELLOW }; static const size_t cnum = sizeof colors / sizeof *colors; static size_t cidx = 0; diff --git a/keyboards/whitefox/keymaps/konstantin/config.h b/keyboards/whitefox/keymaps/konstantin/config.h index 1364fe8a2..3c2583e2d 100644 --- a/keyboards/whitefox/keymaps/konstantin/config.h +++ b/keyboards/whitefox/keymaps/konstantin/config.h @@ -1,6 +1,4 @@ #pragma once -#define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RCTL))) - #define LAYER_FN #define LAYER_NUMPAD diff --git a/users/konstantin/rgb.c b/users/konstantin/rgb.c index 0f0c73c49..a96cad019 100644 --- a/users/konstantin/rgb.c +++ b/users/konstantin/rgb.c @@ -1,24 +1,25 @@ #include "rgb.h" #ifdef RGBLIGHT_EFFECT_BREATHING -const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {20, 30, 5, 10}; +const uint8_t PROGMEM RGBLED_BREATHING_INTERVALS[] = { 20, 30, 5, 10 }; #endif #ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD -const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {20, 50, 100}; +const uint8_t PROGMEM RGBLED_RAINBOW_MOOD_INTERVALS[] = { 20, 50, 100 }; #endif #ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL -const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {20, 50, 100}; +const uint8_t PROGMEM RGBLED_RAINBOW_SWIRL_INTERVALS[] = { 20, 50, 100 }; #endif #ifdef RGBLIGHT_EFFECT_SNAKE -const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {20, 50, 100}; +const uint8_t PROGMEM RGBLED_SNAKE_INTERVALS[] = { 20, 50, 100 }; #endif #ifdef RGBLIGHT_EFFECT_KNIGHT -const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {20, 50, 100}; +const uint8_t PROGMEM RGBLED_KNIGHT_INTERVALS[] = { 20, 50, 100 }; #endif -const hsv_t GODSPEED_BLUE = { .h = 280, .s = 68, .v = RGBLIGHT_LIMIT_VAL }; -const hsv_t GODSPEED_YELLOW = { .h = 38, .s = 153, .v = RGBLIGHT_LIMIT_VAL }; +const HSV GODSPEED_BLUE = { .h = 198, .s = 68, .v = 255 }; +const HSV GODSPEED_YELLOW = { .h = 27, .s = 153, .v = 255 }; +const HSV MODERN_DOLCH_RED = { .h = 252, .s = 255, .v = 144 }; diff --git a/users/konstantin/rgb.h b/users/konstantin/rgb.h index aed855aa0..36a9d9cd7 100644 --- a/users/konstantin/rgb.h +++ b/users/konstantin/rgb.h @@ -2,17 +2,6 @@ #include "quantum.h" -typedef struct { - uint16_t h; // 0–360 - uint8_t s; // 0–255 - uint8_t v; // 0–255 -} hsv_t; - -typedef struct { - uint8_t r; // 0–255 - uint8_t g; // 0–255 - uint8_t b; // 0–255 -} rgb_t; - -extern const hsv_t GODSPEED_BLUE; -extern const hsv_t GODSPEED_YELLOW; +extern const HSV GODSPEED_BLUE; +extern const HSV GODSPEED_YELLOW; +extern const HSV MODERN_DOLCH_RED; diff --git a/users/konstantin/tap_dance.c b/users/konstantin/tap_dance.c index fa43288ce..ba1453fc0 100644 --- a/users/konstantin/tap_dance.c +++ b/users/konstantin/tap_dance.c @@ -110,6 +110,7 @@ qk_tap_dance_action_t tap_dance_actions[] = { [TD_RAL_LAL] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RALT, KC_LALT), [TD_RAL_RGU] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RALT, KC_RGUI), [TD_RCT_RSF] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RCTL, KC_RSFT), + [TD_RSF_RCT] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RSFT, KC_RCTL), [TD_LSFT_FN] = ACTION_TAP_DANCE_MOD_LAYER(KC_LSFT, L_FN), [TD_RCTL_FN] = ACTION_TAP_DANCE_MOD_LAYER(KC_RCTL, L_FN), diff --git a/users/konstantin/tap_dance.h b/users/konstantin/tap_dance.h index 13d682a60..d2f00c8cb 100644 --- a/users/konstantin/tap_dance.h +++ b/users/konstantin/tap_dance.h @@ -7,6 +7,7 @@ #define RAL_LAL TD(TD_RAL_LAL) #define RAL_RGU TD(TD_RAL_RGU) #define RCT_RSF TD(TD_RCT_RSF) +#define RSF_RCT TD(TD_RSF_RCT) #define LSFT_FN TD(TD_LSFT_FN) #define RCTL_FN TD(TD_RCTL_FN) @@ -18,6 +19,7 @@ enum tap_dance { TD_RAL_LAL, TD_RAL_RGU, TD_RCT_RSF, + TD_RSF_RCT, TD_LSFT_FN, TD_RCTL_FN, From e717dcaa09143615ae0b46bf625621f67a7b55ce Mon Sep 17 00:00:00 2001 From: Cody Bender <50554676+codybender@users.noreply.github.com> Date: Fri, 12 Jul 2019 07:17:47 -0600 Subject: [PATCH 339/341] [Keyboard] fixed pins for numpad_5x4 layout (#6311) --- keyboards/keyhive/maypad/keymaps/default/keymap.c | 2 +- keyboards/keyhive/maypad/maypad.h | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/keyboards/keyhive/maypad/keymaps/default/keymap.c b/keyboards/keyhive/maypad/keymaps/default/keymap.c index 8ba2e4470..466a13f41 100644 --- a/keyboards/keyhive/maypad/keymaps/default/keymap.c +++ b/keyboards/keyhive/maypad/keymaps/default/keymap.c @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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 + KC_P0, KC_PDOT, KC_PENT ), }; diff --git a/keyboards/keyhive/maypad/maypad.h b/keyboards/keyhive/maypad/maypad.h index ef4cfa785..42c71f416 100644 --- a/keyboards/keyhive/maypad/maypad.h +++ b/keyboards/keyhive/maypad/maypad.h @@ -35,15 +35,15 @@ #define LAYOUT_numpad_5x4( \ k00, k01, k02, k03, \ k10, k11, k12, \ - k20, k21, k22, k13, \ + k20, k21, k22, k23, \ k30, k31, k32, \ - k40, k42, k33 \ + k41, k42, k43 \ ) { \ - { 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, KC_NO }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, KC_NO }, \ + { KC_NO, k41, k42, k43 } \ } #define LAYOUT_ortho_5x4( \ From cf215487ba35c6754cd1c52bb900a46bb52ed3a3 Mon Sep 17 00:00:00 2001 From: Ryan Caltabiano Date: Sun, 19 May 2019 23:12:29 -0500 Subject: [PATCH 340/341] Switching rgb_config_t to use HSV struct --- .../dz60rgb/keymaps/matthewrobo/keymap.c | 2 +- .../ctrl/keymaps/matthewrobo/keymap.c | 2 +- quantum/rgb_matrix.c | 36 +++++++++---------- .../rgb_matrix_animations/alpha_mods_anim.h | 2 +- .../rgb_matrix_animations/breathing_anim.h | 4 +-- .../colorband_pinwheel_sat_anim.h | 5 +-- .../colorband_pinwheel_val_anim.h | 5 +-- .../colorband_sat_anim.h | 7 ++-- .../colorband_spiral_sat_anim.h | 5 +-- .../colorband_spiral_val_anim.h | 5 +-- .../colorband_val_anim.h | 7 ++-- .../rgb_matrix_animations/cycle_all_anim.h | 6 ++-- .../cycle_left_right_anim.h | 5 +-- .../rgb_matrix_animations/cycle_out_in_anim.h | 5 +-- .../cycle_out_in_dual_anim.h | 5 +-- .../cycle_pinwheel_anim.h | 5 +-- .../rgb_matrix_animations/cycle_spiral_anim.h | 5 +-- .../cycle_up_down_anim.h | 5 +-- .../rgb_matrix_animations/dual_beacon_anim.h | 5 +-- .../gradient_up_down_anim.h | 4 +-- .../jellybean_raindrops_anim.h | 2 +- .../rainbow_beacon_anim.h | 5 +-- .../rainbow_moving_chevron_anim.h | 5 +-- .../rainbow_pinwheels_anim.h | 5 +-- .../rgb_matrix_animations/raindrops_anim.h | 6 ++-- .../rgb_matrix_animations/solid_color_anim.h | 3 +- .../solid_reactive_anim.h | 5 +-- .../solid_reactive_cross.h | 5 +-- .../solid_reactive_nexus.h | 7 ++-- .../solid_reactive_simple_anim.h | 5 +-- .../solid_reactive_wide.h | 5 +-- .../rgb_matrix_animations/solid_splash_anim.h | 5 +-- quantum/rgb_matrix_animations/splash_anim.h | 9 ++--- .../typing_heatmap_anim.h | 2 +- .../rgb_matrix_runners/effect_runner_dx_dy.h | 6 ++-- .../effect_runner_dx_dy_dist.h | 6 ++-- quantum/rgb_matrix_runners/effect_runner_i.h | 6 ++-- .../effect_runner_reactive.h | 6 ++-- .../effect_runner_reactive_splash.h | 9 +++-- .../effect_runner_sin_cos_i.h | 6 ++-- quantum/rgb_matrix_types.h | 7 ++-- users/xulkal/custom_oled.c | 4 +-- 42 files changed, 126 insertions(+), 118 deletions(-) diff --git a/keyboards/dztech/dz60rgb/keymaps/matthewrobo/keymap.c b/keyboards/dztech/dz60rgb/keymaps/matthewrobo/keymap.c index 600ac8619..a12358c8d 100644 --- a/keyboards/dztech/dz60rgb/keymaps/matthewrobo/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/matthewrobo/keymap.c @@ -146,7 +146,7 @@ void rgb_matrix_indicators_user(void) break; case _RGB: { - HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; + HSV hsv = { rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v }; HSV hui = hsv; HSV hud = hsv; HSV sai = hsv; diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c b/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c index 11b4d70ca..447b0aca1 100644 --- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c @@ -135,7 +135,7 @@ void rgb_matrix_indicators_user(void) break; case _FNC: { - HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; + HSV hsv = { rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v }; HSV hui = hsv; HSV hud = hsv; HSV sai = hsv; diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index 98baf5cb5..d20daf5e4 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c @@ -128,9 +128,7 @@ void eeconfig_update_rgb_matrix_default(void) { dprintf("eeconfig_update_rgb_matrix_default\n"); rgb_matrix_config.enable = 1; rgb_matrix_config.mode = RGB_MATRIX_STARTUP_MODE; - rgb_matrix_config.hue = 0; - rgb_matrix_config.sat = UINT8_MAX; - rgb_matrix_config.val = RGB_MATRIX_MAXIMUM_BRIGHTNESS; + rgb_matrix_config.hsv = (HSV){ 0, UINT8_MAX, RGB_MATRIX_MAXIMUM_BRIGHTNESS }; rgb_matrix_config.speed = UINT8_MAX / 2; eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } @@ -139,9 +137,9 @@ void eeconfig_debug_rgb_matrix(void) { dprintf("rgb_matrix_config eprom\n"); dprintf("rgb_matrix_config.enable = %d\n", rgb_matrix_config.enable); dprintf("rgb_matrix_config.mode = %d\n", rgb_matrix_config.mode); - dprintf("rgb_matrix_config.hue = %d\n", rgb_matrix_config.hue); - dprintf("rgb_matrix_config.sat = %d\n", rgb_matrix_config.sat); - dprintf("rgb_matrix_config.val = %d\n", rgb_matrix_config.val); + dprintf("rgb_matrix_config.hsv.h = %d\n", rgb_matrix_config.hsv.h); + dprintf("rgb_matrix_config.hsv.s = %d\n", rgb_matrix_config.hsv.s); + dprintf("rgb_matrix_config.hsv.v = %d\n", rgb_matrix_config.hsv.v); dprintf("rgb_matrix_config.speed = %d\n", rgb_matrix_config.speed); } @@ -492,34 +490,34 @@ void rgb_matrix_step_reverse(void) { } void rgb_matrix_increase_hue(void) { - rgb_matrix_config.hue += RGB_MATRIX_HUE_STEP; + rgb_matrix_config.hsv.h += RGB_MATRIX_HUE_STEP; eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_decrease_hue(void) { - rgb_matrix_config.hue -= RGB_MATRIX_HUE_STEP; + rgb_matrix_config.hsv.h -= RGB_MATRIX_HUE_STEP; eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_increase_sat(void) { - rgb_matrix_config.sat = qadd8(rgb_matrix_config.sat, RGB_MATRIX_SAT_STEP); + rgb_matrix_config.hsv.s = qadd8(rgb_matrix_config.hsv.s, RGB_MATRIX_SAT_STEP); eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_decrease_sat(void) { - rgb_matrix_config.sat = qsub8(rgb_matrix_config.sat, RGB_MATRIX_SAT_STEP); + rgb_matrix_config.hsv.s = qsub8(rgb_matrix_config.hsv.s, RGB_MATRIX_SAT_STEP); eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_increase_val(void) { - rgb_matrix_config.val = qadd8(rgb_matrix_config.val, RGB_MATRIX_VAL_STEP); - if (rgb_matrix_config.val > RGB_MATRIX_MAXIMUM_BRIGHTNESS) - rgb_matrix_config.val = RGB_MATRIX_MAXIMUM_BRIGHTNESS; + rgb_matrix_config.hsv.v = qadd8(rgb_matrix_config.hsv.v, RGB_MATRIX_VAL_STEP); + if (rgb_matrix_config.hsv.v > RGB_MATRIX_MAXIMUM_BRIGHTNESS) + rgb_matrix_config.hsv.v = RGB_MATRIX_MAXIMUM_BRIGHTNESS; eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_decrease_val(void) { - rgb_matrix_config.val = qsub8(rgb_matrix_config.val, RGB_MATRIX_VAL_STEP); + rgb_matrix_config.hsv.v = qsub8(rgb_matrix_config.hsv.v, RGB_MATRIX_VAL_STEP); eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } @@ -561,9 +559,9 @@ void rgb_matrix_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { } void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val) { - rgb_matrix_config.hue = hue; - rgb_matrix_config.sat = sat; - rgb_matrix_config.val = val; - if (rgb_matrix_config.val > RGB_MATRIX_MAXIMUM_BRIGHTNESS) - rgb_matrix_config.val = RGB_MATRIX_MAXIMUM_BRIGHTNESS; + rgb_matrix_config.hsv.h = hue; + rgb_matrix_config.hsv.s = sat; + rgb_matrix_config.hsv.v = val; + if (rgb_matrix_config.hsv.v > RGB_MATRIX_MAXIMUM_BRIGHTNESS) + rgb_matrix_config.hsv.v = RGB_MATRIX_MAXIMUM_BRIGHTNESS; } diff --git a/quantum/rgb_matrix_animations/alpha_mods_anim.h b/quantum/rgb_matrix_animations/alpha_mods_anim.h index 0fee19aef..8df3356f6 100644 --- a/quantum/rgb_matrix_animations/alpha_mods_anim.h +++ b/quantum/rgb_matrix_animations/alpha_mods_anim.h @@ -6,7 +6,7 @@ RGB_MATRIX_EFFECT(ALPHAS_MODS) bool ALPHAS_MODS(effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); - HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; + HSV hsv = rgb_matrix_config.hsv; RGB rgb1 = hsv_to_rgb(hsv); hsv.h += rgb_matrix_config.speed; RGB rgb2 = hsv_to_rgb(hsv); diff --git a/quantum/rgb_matrix_animations/breathing_anim.h b/quantum/rgb_matrix_animations/breathing_anim.h index c357b5303..0af7b42cf 100644 --- a/quantum/rgb_matrix_animations/breathing_anim.h +++ b/quantum/rgb_matrix_animations/breathing_anim.h @@ -5,9 +5,9 @@ RGB_MATRIX_EFFECT(BREATHING) bool BREATHING(effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); + HSV hsv = rgb_matrix_config.hsv; uint16_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 8); - uint8_t val = scale8(abs8(sin8(time) - 128) * 2, rgb_matrix_config.val); - HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, val }; + hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); RGB rgb = hsv_to_rgb(hsv); for (uint8_t i = led_min; i < led_max; i++) { RGB_MATRIX_TEST_LED_FLAGS(); diff --git a/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h b/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h index 3739cde1f..4585c5271 100644 --- a/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h +++ b/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h @@ -2,8 +2,9 @@ RGB_MATRIX_EFFECT(BAND_PINWHEEL_SAT) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static void BAND_PINWHEEL_SAT_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t time) { - hsv->s = scale8(rgb_matrix_config.sat - time - atan2_8(dy, dx) * 3, rgb_matrix_config.sat); +static HSV BAND_PINWHEEL_SAT_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) { + hsv.s = scale8(hsv.s - time - atan2_8(dy, dx) * 3, hsv.s); + return hsv; } bool BAND_PINWHEEL_SAT(effect_params_t* params) { diff --git a/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h b/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h index 6e5871d7e..5cdb87348 100644 --- a/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h +++ b/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h @@ -2,8 +2,9 @@ RGB_MATRIX_EFFECT(BAND_PINWHEEL_VAL) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static void BAND_PINWHEEL_VAL_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t time) { - hsv->v = scale8(rgb_matrix_config.val - time - atan2_8(dy, dx) * 3, rgb_matrix_config.val); +static HSV BAND_PINWHEEL_VAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) { + hsv.v = scale8(hsv.v - time - atan2_8(dy, dx) * 3, hsv.v); + return hsv; } bool BAND_PINWHEEL_VAL(effect_params_t* params) { diff --git a/quantum/rgb_matrix_animations/colorband_sat_anim.h b/quantum/rgb_matrix_animations/colorband_sat_anim.h index bfa1085cb..a5175f1cd 100644 --- a/quantum/rgb_matrix_animations/colorband_sat_anim.h +++ b/quantum/rgb_matrix_animations/colorband_sat_anim.h @@ -2,9 +2,10 @@ RGB_MATRIX_EFFECT(BAND_SAT) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static void BAND_SAT_math(HSV* hsv, uint8_t i, uint8_t time) { - int16_t s = rgb_matrix_config.sat - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8; - hsv->s = scale8(s < 0 ? 0 : s, rgb_matrix_config.sat); +static HSV BAND_SAT_math(HSV hsv, uint8_t i, uint8_t time) { + int16_t s = hsv.s - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8; + hsv.s = scale8(s < 0 ? 0 : s, hsv.s); + return hsv; } bool BAND_SAT(effect_params_t* params) { diff --git a/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h b/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h index 7db01c5f9..096c675de 100644 --- a/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h +++ b/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h @@ -2,8 +2,9 @@ RGB_MATRIX_EFFECT(BAND_SPIRAL_SAT) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static void BAND_SPIRAL_SAT_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { - hsv->s = scale8(rgb_matrix_config.sat + dist - time - atan2_8(dy, dx), rgb_matrix_config.sat); +static HSV BAND_SPIRAL_SAT_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { + hsv.s = scale8(hsv.s + dist - time - atan2_8(dy, dx), hsv.s); + return hsv; } bool BAND_SPIRAL_SAT(effect_params_t* params) { diff --git a/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h b/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h index a16f8e2ce..1d4cc0c84 100644 --- a/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h +++ b/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h @@ -2,8 +2,9 @@ RGB_MATRIX_EFFECT(BAND_SPIRAL_VAL) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static void BAND_SPIRAL_VAL_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { - hsv->v = scale8(rgb_matrix_config.val + dist - time - atan2_8(dy, dx), rgb_matrix_config.val); +static HSV BAND_SPIRAL_VAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { + hsv.v = scale8(hsv.v + dist - time - atan2_8(dy, dx), hsv.v); + return hsv; } bool BAND_SPIRAL_VAL(effect_params_t* params) { diff --git a/quantum/rgb_matrix_animations/colorband_val_anim.h b/quantum/rgb_matrix_animations/colorband_val_anim.h index 4b76924db..de0bbb471 100644 --- a/quantum/rgb_matrix_animations/colorband_val_anim.h +++ b/quantum/rgb_matrix_animations/colorband_val_anim.h @@ -2,9 +2,10 @@ RGB_MATRIX_EFFECT(BAND_VAL) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static void BAND_VAL_math(HSV* hsv, uint8_t i, uint8_t time) { - int16_t v = rgb_matrix_config.val - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8; - hsv->v = scale8(v < 0 ? 0 : v, rgb_matrix_config.val); +static HSV BAND_VAL_math(HSV hsv, uint8_t i, uint8_t time) { + int16_t v = hsv.v - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8; + hsv.v = scale8(v < 0 ? 0 : v, hsv.v); + return hsv; } bool BAND_VAL(effect_params_t* params) { diff --git a/quantum/rgb_matrix_animations/cycle_all_anim.h b/quantum/rgb_matrix_animations/cycle_all_anim.h index 380dbe05a..0c45aba8b 100644 --- a/quantum/rgb_matrix_animations/cycle_all_anim.h +++ b/quantum/rgb_matrix_animations/cycle_all_anim.h @@ -2,9 +2,9 @@ RGB_MATRIX_EFFECT(CYCLE_ALL) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static void CYCLE_ALL_math(HSV* hsv, uint8_t i, uint8_t time) -{ - hsv->h = time; +static HSV CYCLE_ALL_math(HSV hsv, uint8_t i, uint8_t time){ + hsv.h = time; + return hsv; } bool CYCLE_ALL(effect_params_t* params) { diff --git a/quantum/rgb_matrix_animations/cycle_left_right_anim.h b/quantum/rgb_matrix_animations/cycle_left_right_anim.h index f270fb42c..d2e5b4fbd 100644 --- a/quantum/rgb_matrix_animations/cycle_left_right_anim.h +++ b/quantum/rgb_matrix_animations/cycle_left_right_anim.h @@ -2,8 +2,9 @@ RGB_MATRIX_EFFECT(CYCLE_LEFT_RIGHT) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static void CYCLE_LEFT_RIGHT_math(HSV* hsv, uint8_t i, uint8_t time) { - hsv->h = g_led_config.point[i].x - time; +static HSV CYCLE_LEFT_RIGHT_math(HSV hsv, uint8_t i, uint8_t time) { + hsv.h = g_led_config.point[i].x - time; + return hsv; } bool CYCLE_LEFT_RIGHT(effect_params_t* params) { diff --git a/quantum/rgb_matrix_animations/cycle_out_in_anim.h b/quantum/rgb_matrix_animations/cycle_out_in_anim.h index 46c7efef2..fa7c3b09c 100644 --- a/quantum/rgb_matrix_animations/cycle_out_in_anim.h +++ b/quantum/rgb_matrix_animations/cycle_out_in_anim.h @@ -2,8 +2,9 @@ RGB_MATRIX_EFFECT(CYCLE_OUT_IN) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static void CYCLE_OUT_IN_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { - hsv->h = 3 * dist / 2 + time; +static HSV CYCLE_OUT_IN_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { + hsv.h = 3 * dist / 2 + time; + return hsv; } bool CYCLE_OUT_IN(effect_params_t* params) { diff --git a/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h b/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h index 2fdb4ba91..74a2c9aa5 100644 --- a/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h +++ b/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h @@ -2,10 +2,11 @@ RGB_MATRIX_EFFECT(CYCLE_OUT_IN_DUAL) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static void CYCLE_OUT_IN_DUAL_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t time) { +static HSV CYCLE_OUT_IN_DUAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) { dx = (k_rgb_matrix_center.x / 2) - abs8(dx); uint8_t dist = sqrt16(dx * dx + dy * dy); - hsv->h = 3 * dist + time; + hsv.h = 3 * dist + time; + return hsv; } bool CYCLE_OUT_IN_DUAL(effect_params_t* params) { diff --git a/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h b/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h index 29e2d92c9..54e222dc2 100644 --- a/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h +++ b/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h @@ -2,8 +2,9 @@ RGB_MATRIX_EFFECT(CYCLE_PINWHEEL) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static void CYCLE_PINWHEEL_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t time) { - hsv->h = atan2_8(dy, dx) + time; +static HSV CYCLE_PINWHEEL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) { + hsv.h = atan2_8(dy, dx) + time; + return hsv; } bool CYCLE_PINWHEEL(effect_params_t* params) { diff --git a/quantum/rgb_matrix_animations/cycle_spiral_anim.h b/quantum/rgb_matrix_animations/cycle_spiral_anim.h index a1354f60c..b27d7a83c 100644 --- a/quantum/rgb_matrix_animations/cycle_spiral_anim.h +++ b/quantum/rgb_matrix_animations/cycle_spiral_anim.h @@ -2,8 +2,9 @@ RGB_MATRIX_EFFECT(CYCLE_SPIRAL) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static void CYCLE_SPIRAL_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { - hsv->h = dist - time - atan2_8(dy, dx); +static HSV CYCLE_SPIRAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { + hsv.h = dist - time - atan2_8(dy, dx); + return hsv; } bool CYCLE_SPIRAL(effect_params_t* params) { diff --git a/quantum/rgb_matrix_animations/cycle_up_down_anim.h b/quantum/rgb_matrix_animations/cycle_up_down_anim.h index b3ef4cdf2..4bf8ef2ae 100644 --- a/quantum/rgb_matrix_animations/cycle_up_down_anim.h +++ b/quantum/rgb_matrix_animations/cycle_up_down_anim.h @@ -2,8 +2,9 @@ RGB_MATRIX_EFFECT(CYCLE_UP_DOWN) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static void CYCLE_UP_DOWN_math(HSV* hsv, uint8_t i, uint8_t time) { - hsv->h = g_led_config.point[i].y - time; +static HSV CYCLE_UP_DOWN_math(HSV hsv, uint8_t i, uint8_t time) { + hsv.h = g_led_config.point[i].y - time; + return hsv; } bool CYCLE_UP_DOWN(effect_params_t* params) { diff --git a/quantum/rgb_matrix_animations/dual_beacon_anim.h b/quantum/rgb_matrix_animations/dual_beacon_anim.h index d34f146a5..336a41b2c 100644 --- a/quantum/rgb_matrix_animations/dual_beacon_anim.h +++ b/quantum/rgb_matrix_animations/dual_beacon_anim.h @@ -2,8 +2,9 @@ RGB_MATRIX_EFFECT(DUAL_BEACON) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static void DUAL_BEACON_math(HSV* hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { - hsv->h = ((g_led_config.point[i].y - k_rgb_matrix_center.y) * cos + (g_led_config.point[i].x - k_rgb_matrix_center.x) * sin) / 128 + rgb_matrix_config.hue; +static HSV DUAL_BEACON_math(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { + hsv.h += ((g_led_config.point[i].y - k_rgb_matrix_center.y) * cos + (g_led_config.point[i].x - k_rgb_matrix_center.x) * sin) / 128; + return hsv; } bool DUAL_BEACON(effect_params_t* params) { diff --git a/quantum/rgb_matrix_animations/gradient_up_down_anim.h b/quantum/rgb_matrix_animations/gradient_up_down_anim.h index d9fcd4d98..12848ab4c 100644 --- a/quantum/rgb_matrix_animations/gradient_up_down_anim.h +++ b/quantum/rgb_matrix_animations/gradient_up_down_anim.h @@ -5,13 +5,13 @@ RGB_MATRIX_EFFECT(GRADIENT_UP_DOWN) bool GRADIENT_UP_DOWN(effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); - HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; + HSV hsv = rgb_matrix_config.hsv; uint8_t scale = scale8(64, rgb_matrix_config.speed); for (uint8_t i = led_min; i < led_max; i++) { RGB_MATRIX_TEST_LED_FLAGS(); // The y range will be 0..64, map this to 0..4 // Relies on hue being 8-bit and wrapping - hsv.h = rgb_matrix_config.hue + scale * (g_led_config.point[i].y >> 4); + hsv.h = rgb_matrix_config.hsv.h + scale * (g_led_config.point[i].y >> 4); RGB rgb = hsv_to_rgb(hsv); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } diff --git a/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h b/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h index 8f0b1bd91..bffa0a42d 100644 --- a/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h +++ b/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h @@ -4,7 +4,7 @@ RGB_MATRIX_EFFECT(JELLYBEAN_RAINDROPS) static void jellybean_raindrops_set_color(int i, effect_params_t* params) { if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return; - HSV hsv = { rand() & 0xFF , rand() & 0xFF, rgb_matrix_config.val }; + HSV hsv = { rand() & 0xFF , rand() & 0xFF, rgb_matrix_config.hsv.v }; RGB rgb = hsv_to_rgb(hsv); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } diff --git a/quantum/rgb_matrix_animations/rainbow_beacon_anim.h b/quantum/rgb_matrix_animations/rainbow_beacon_anim.h index 061cac837..f53c819a9 100644 --- a/quantum/rgb_matrix_animations/rainbow_beacon_anim.h +++ b/quantum/rgb_matrix_animations/rainbow_beacon_anim.h @@ -2,8 +2,9 @@ RGB_MATRIX_EFFECT(RAINBOW_BEACON) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static void RAINBOW_BEACON_math(HSV* hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { - hsv->h = ((g_led_config.point[i].y - k_rgb_matrix_center.y) * 2 * cos + (g_led_config.point[i].x - k_rgb_matrix_center.x) * 2 * sin) / 128 + rgb_matrix_config.hue; +static HSV RAINBOW_BEACON_math(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { + hsv.h += ((g_led_config.point[i].y - k_rgb_matrix_center.y) * 2 * cos + (g_led_config.point[i].x - k_rgb_matrix_center.x) * 2 * sin) / 128; + return hsv; } bool RAINBOW_BEACON(effect_params_t* params) { diff --git a/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h b/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h index f406566fa..e78c55e8d 100644 --- a/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h +++ b/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h @@ -2,8 +2,9 @@ RGB_MATRIX_EFFECT(RAINBOW_MOVING_CHEVRON) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static void RAINBOW_MOVING_CHEVRON_math(HSV* hsv, uint8_t i, uint8_t time) { - hsv->h = abs8(g_led_config.point[i].y - k_rgb_matrix_center.y) + (g_led_config.point[i].x - time) + rgb_matrix_config.hue; +static HSV RAINBOW_MOVING_CHEVRON_math(HSV hsv, uint8_t i, uint8_t time) { + hsv.h += abs8(g_led_config.point[i].y - k_rgb_matrix_center.y) + (g_led_config.point[i].x - time); + return hsv; } bool RAINBOW_MOVING_CHEVRON(effect_params_t* params) { diff --git a/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h b/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h index f19e9116d..8298fec46 100644 --- a/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h +++ b/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h @@ -2,8 +2,9 @@ RGB_MATRIX_EFFECT(PINWHEELS) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static void PINWHEELS_math(HSV* hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { - hsv->h = ((g_led_config.point[i].y - k_rgb_matrix_center.y) * 3 * cos + (56 - abs8(g_led_config.point[i].x - k_rgb_matrix_center.x)) * 3 * sin) / 128 + rgb_matrix_config.hue; +static HSV PINWHEELS_math(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { + hsv.h += ((g_led_config.point[i].y - k_rgb_matrix_center.y) * 3 * cos + (56 - abs8(g_led_config.point[i].x - k_rgb_matrix_center.x)) * 3 * sin) / 128; + return hsv; } bool PINWHEELS(effect_params_t* params) { diff --git a/quantum/rgb_matrix_animations/raindrops_anim.h b/quantum/rgb_matrix_animations/raindrops_anim.h index 09d0d1df8..a4fed5165 100644 --- a/quantum/rgb_matrix_animations/raindrops_anim.h +++ b/quantum/rgb_matrix_animations/raindrops_anim.h @@ -4,17 +4,17 @@ RGB_MATRIX_EFFECT(RAINDROPS) static void raindrops_set_color(int i, effect_params_t* params) { if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return; - HSV hsv = { 0 , rgb_matrix_config.sat, rgb_matrix_config.val }; + HSV hsv = { 0 , rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v }; // Take the shortest path between hues - int16_t deltaH = ((rgb_matrix_config.hue + 180) % 360 - rgb_matrix_config.hue) / 4; + int16_t deltaH = ((rgb_matrix_config.hsv.h + 180) % 360 - rgb_matrix_config.hsv.h) / 4; if (deltaH > 127) { deltaH -= 256; } else if (deltaH < -127) { deltaH += 256; } - hsv.h = rgb_matrix_config.hue + (deltaH * (rand() & 0x03)); + hsv.h = rgb_matrix_config.hsv.h + (deltaH * (rand() & 0x03)); RGB rgb = hsv_to_rgb(hsv); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } diff --git a/quantum/rgb_matrix_animations/solid_color_anim.h b/quantum/rgb_matrix_animations/solid_color_anim.h index 937642559..6e4063803 100644 --- a/quantum/rgb_matrix_animations/solid_color_anim.h +++ b/quantum/rgb_matrix_animations/solid_color_anim.h @@ -4,8 +4,7 @@ RGB_MATRIX_EFFECT(SOLID_COLOR) bool SOLID_COLOR(effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); - HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; - RGB rgb = hsv_to_rgb(hsv); + RGB rgb = hsv_to_rgb(rgb_matrix_config.hsv); for (uint8_t i = led_min; i < led_max; i++) { RGB_MATRIX_TEST_LED_FLAGS(); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); diff --git a/quantum/rgb_matrix_animations/solid_reactive_anim.h b/quantum/rgb_matrix_animations/solid_reactive_anim.h index 762a95db3..dd49b6530 100644 --- a/quantum/rgb_matrix_animations/solid_reactive_anim.h +++ b/quantum/rgb_matrix_animations/solid_reactive_anim.h @@ -3,8 +3,9 @@ RGB_MATRIX_EFFECT(SOLID_REACTIVE) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static void SOLID_REACTIVE_math(HSV* hsv, uint16_t offset) { - hsv->h = rgb_matrix_config.hue + qsub8(130, offset); +static HSV SOLID_REACTIVE_math(HSV hsv, uint16_t offset) { + hsv.h += qsub8(130, offset); + return hsv; } bool SOLID_REACTIVE(effect_params_t* params) { diff --git a/quantum/rgb_matrix_animations/solid_reactive_cross.h b/quantum/rgb_matrix_animations/solid_reactive_cross.h index 99f22c694..5b9cfcbd5 100644 --- a/quantum/rgb_matrix_animations/solid_reactive_cross.h +++ b/quantum/rgb_matrix_animations/solid_reactive_cross.h @@ -11,7 +11,7 @@ RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTICROSS) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static void SOLID_REACTIVE_CROSS_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { +static HSV SOLID_REACTIVE_CROSS_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { uint16_t effect = tick + dist; dx = dx < 0 ? dx * -1 : dx; dy = dy < 0 ? dy * -1 : dy; @@ -20,7 +20,8 @@ static void SOLID_REACTIVE_CROSS_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t effect += dx > dy ? dy : dx; if (effect > 255) effect = 255; - hsv->v = qadd8(hsv->v, 255 - effect); + hsv.v = qadd8(hsv.v, 255 - effect); + return hsv; } #ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS diff --git a/quantum/rgb_matrix_animations/solid_reactive_nexus.h b/quantum/rgb_matrix_animations/solid_reactive_nexus.h index 8bebd042d..e90eaf4b2 100644 --- a/quantum/rgb_matrix_animations/solid_reactive_nexus.h +++ b/quantum/rgb_matrix_animations/solid_reactive_nexus.h @@ -11,7 +11,7 @@ RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTINEXUS) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static void SOLID_REACTIVE_NEXUS_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { +static HSV SOLID_REACTIVE_NEXUS_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { uint16_t effect = tick - dist; if (effect > 255) effect = 255; @@ -19,8 +19,9 @@ static void SOLID_REACTIVE_NEXUS_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t effect = 255; if ((dx > 8 || dx < -8) && (dy > 8 || dy < -8)) effect = 255; - hsv->v = qadd8(hsv->v, 255 - effect); - hsv->h = rgb_matrix_config.hue + dy / 4; + hsv.v = qadd8(hsv.v, 255 - effect); + hsv.h = rgb_matrix_config.hsv.h + dy / 4; + return hsv; } #ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS diff --git a/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h b/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h index 36c6ec527..77c8ff672 100644 --- a/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h +++ b/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h @@ -3,8 +3,9 @@ RGB_MATRIX_EFFECT(SOLID_REACTIVE_SIMPLE) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static void SOLID_REACTIVE_SIMPLE_math(HSV* hsv, uint16_t offset) { - hsv->v = scale8(255 - offset, rgb_matrix_config.val); +static HSV SOLID_REACTIVE_SIMPLE_math(HSV hsv, uint16_t offset) { + hsv.v = scale8(255 - offset, hsv.v); + return hsv; } bool SOLID_REACTIVE_SIMPLE(effect_params_t* params) { diff --git a/quantum/rgb_matrix_animations/solid_reactive_wide.h b/quantum/rgb_matrix_animations/solid_reactive_wide.h index 36edc475c..73779dfa7 100644 --- a/quantum/rgb_matrix_animations/solid_reactive_wide.h +++ b/quantum/rgb_matrix_animations/solid_reactive_wide.h @@ -11,11 +11,12 @@ RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTIWIDE) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -static void SOLID_REACTIVE_WIDE_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { +static HSV SOLID_REACTIVE_WIDE_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { uint16_t effect = tick + dist * 5; if (effect > 255) effect = 255; - hsv->v = qadd8(hsv->v, 255 - effect); + hsv.v = qadd8(hsv.v, 255 - effect); + return hsv; } #ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE diff --git a/quantum/rgb_matrix_animations/solid_splash_anim.h b/quantum/rgb_matrix_animations/solid_splash_anim.h index 84c99ff00..441f35576 100644 --- a/quantum/rgb_matrix_animations/solid_splash_anim.h +++ b/quantum/rgb_matrix_animations/solid_splash_anim.h @@ -11,11 +11,12 @@ RGB_MATRIX_EFFECT(SOLID_MULTISPLASH) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -void SOLID_SPLASH_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { +HSV SOLID_SPLASH_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { uint16_t effect = tick - dist; if (effect > 255) effect = 255; - hsv->v = qadd8(hsv->v, 255 - effect); + hsv.v = qadd8(hsv.v, 255 - effect); + return hsv; } #ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH diff --git a/quantum/rgb_matrix_animations/splash_anim.h b/quantum/rgb_matrix_animations/splash_anim.h index c4c051653..19ccb256e 100644 --- a/quantum/rgb_matrix_animations/splash_anim.h +++ b/quantum/rgb_matrix_animations/splash_anim.h @@ -11,12 +11,13 @@ RGB_MATRIX_EFFECT(MULTISPLASH) #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -void SPLASH_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { +HSV SPLASH_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { uint16_t effect = tick - dist; - if (effect > 255) + if (effect > 255) effect = 255; - hsv->h += effect; - hsv->v = qadd8(hsv->v, 255 - effect); + hsv.h += effect; + hsv.v = qadd8(hsv.v, 255 - effect); + return hsv; } #ifndef DISABLE_RGB_MATRIX_SPLASH diff --git a/quantum/rgb_matrix_animations/typing_heatmap_anim.h b/quantum/rgb_matrix_animations/typing_heatmap_anim.h index e6b34717b..374b7fea0 100644 --- a/quantum/rgb_matrix_animations/typing_heatmap_anim.h +++ b/quantum/rgb_matrix_animations/typing_heatmap_anim.h @@ -59,7 +59,7 @@ bool TYPING_HEATMAP(effect_params_t* params) { if (!HAS_ANY_FLAGS(g_led_config.flags[led[j]], params->flags)) continue; - HSV hsv = { 170 - qsub8(val, 85), rgb_matrix_config.sat, scale8((qadd8(170, val) - 170) * 3, rgb_matrix_config.val) }; + HSV hsv = { 170 - qsub8(val, 85), rgb_matrix_config.hsv.s, scale8((qadd8(170, val) - 170) * 3, rgb_matrix_config.hsv.v) }; RGB rgb = hsv_to_rgb(hsv); rgb_matrix_set_color(led[j], rgb.r, rgb.g, rgb.b); } diff --git a/quantum/rgb_matrix_runners/effect_runner_dx_dy.h b/quantum/rgb_matrix_runners/effect_runner_dx_dy.h index 43312629d..9650c9a13 100644 --- a/quantum/rgb_matrix_runners/effect_runner_dx_dy.h +++ b/quantum/rgb_matrix_runners/effect_runner_dx_dy.h @@ -1,18 +1,16 @@ #pragma once -typedef void (*dx_dy_f)(HSV* hsv, int16_t dx, int16_t dy, uint8_t time); +typedef HSV (*dx_dy_f)(HSV hsv, int16_t dx, int16_t dy, uint8_t time); bool effect_runner_dx_dy(effect_params_t* params, dx_dy_f effect_func) { RGB_MATRIX_USE_LIMITS(led_min, led_max); - HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 2); for (uint8_t i = led_min; i < led_max; i++) { RGB_MATRIX_TEST_LED_FLAGS(); int16_t dx = g_led_config.point[i].x - k_rgb_matrix_center.x; int16_t dy = g_led_config.point[i].y - k_rgb_matrix_center.y; - effect_func(&hsv, dx, dy, time); - RGB rgb = hsv_to_rgb(hsv); + RGB rgb = hsv_to_rgb(effect_func(rgb_matrix_config.hsv, dx, dy, time)); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } return led_max < DRIVER_LED_TOTAL; diff --git a/quantum/rgb_matrix_runners/effect_runner_dx_dy_dist.h b/quantum/rgb_matrix_runners/effect_runner_dx_dy_dist.h index a7310c853..eb0c4d8dd 100644 --- a/quantum/rgb_matrix_runners/effect_runner_dx_dy_dist.h +++ b/quantum/rgb_matrix_runners/effect_runner_dx_dy_dist.h @@ -1,19 +1,17 @@ #pragma once -typedef void (*dx_dy_dist_f)(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time); +typedef HSV (*dx_dy_dist_f)(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time); bool effect_runner_dx_dy_dist(effect_params_t* params, dx_dy_dist_f effect_func) { RGB_MATRIX_USE_LIMITS(led_min, led_max); - HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 2); for (uint8_t i = led_min; i < led_max; i++) { RGB_MATRIX_TEST_LED_FLAGS(); int16_t dx = g_led_config.point[i].x - k_rgb_matrix_center.x; int16_t dy = g_led_config.point[i].y - k_rgb_matrix_center.y; uint8_t dist = sqrt16(dx * dx + dy * dy); - effect_func(&hsv, dx, dy, dist, time); - RGB rgb = hsv_to_rgb(hsv); + RGB rgb = hsv_to_rgb(effect_func(rgb_matrix_config.hsv, dx, dy, dist, time)); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } return led_max < DRIVER_LED_TOTAL; diff --git a/quantum/rgb_matrix_runners/effect_runner_i.h b/quantum/rgb_matrix_runners/effect_runner_i.h index 85405ba1b..d4a7ef392 100644 --- a/quantum/rgb_matrix_runners/effect_runner_i.h +++ b/quantum/rgb_matrix_runners/effect_runner_i.h @@ -1,16 +1,14 @@ #pragma once -typedef void (*i_f)(HSV* hsv, uint8_t i, uint8_t time); +typedef HSV (*i_f)(HSV hsv, uint8_t i, uint8_t time); bool effect_runner_i(effect_params_t* params, i_f effect_func) { RGB_MATRIX_USE_LIMITS(led_min, led_max); - HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); for (uint8_t i = led_min; i < led_max; i++) { RGB_MATRIX_TEST_LED_FLAGS(); - effect_func(&hsv, i, time); - RGB rgb = hsv_to_rgb(hsv); + RGB rgb = hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time)); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } return led_max < DRIVER_LED_TOTAL; diff --git a/quantum/rgb_matrix_runners/effect_runner_reactive.h b/quantum/rgb_matrix_runners/effect_runner_reactive.h index 94cd7d545..9da2814ce 100644 --- a/quantum/rgb_matrix_runners/effect_runner_reactive.h +++ b/quantum/rgb_matrix_runners/effect_runner_reactive.h @@ -2,12 +2,11 @@ #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED -typedef void (*reactive_f)(HSV* hsv, uint16_t offset); +typedef HSV (*reactive_f)(HSV hsv, uint16_t offset); bool effect_runner_reactive(effect_params_t* params, reactive_f effect_func) { RGB_MATRIX_USE_LIMITS(led_min, led_max); - HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; uint16_t max_tick = 65535 / rgb_matrix_config.speed; for (uint8_t i = led_min; i < led_max; i++) { RGB_MATRIX_TEST_LED_FLAGS(); @@ -21,8 +20,7 @@ bool effect_runner_reactive(effect_params_t* params, reactive_f effect_func) { } uint16_t offset = scale16by8(tick, rgb_matrix_config.speed); - effect_func(&hsv, offset); - RGB rgb = hsv_to_rgb(hsv); + RGB rgb = hsv_to_rgb(effect_func(rgb_matrix_config.hsv, offset)); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } return led_max < DRIVER_LED_TOTAL; diff --git a/quantum/rgb_matrix_runners/effect_runner_reactive_splash.h b/quantum/rgb_matrix_runners/effect_runner_reactive_splash.h index cb2b0d794..4f2059c99 100644 --- a/quantum/rgb_matrix_runners/effect_runner_reactive_splash.h +++ b/quantum/rgb_matrix_runners/effect_runner_reactive_splash.h @@ -2,25 +2,24 @@ #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED -typedef void (*reactive_splash_f)(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick); +typedef HSV (*reactive_splash_f)(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick); bool effect_runner_reactive_splash(uint8_t start, effect_params_t* params, reactive_splash_f effect_func) { RGB_MATRIX_USE_LIMITS(led_min, led_max); - HSV hsv = { 0, rgb_matrix_config.sat, 0 }; uint8_t count = g_last_hit_tracker.count; for (uint8_t i = led_min; i < led_max; i++) { RGB_MATRIX_TEST_LED_FLAGS(); - hsv.h = rgb_matrix_config.hue; + HSV hsv = rgb_matrix_config.hsv; hsv.v = 0; for (uint8_t j = start; j < count; j++) { int16_t dx = g_led_config.point[i].x - g_last_hit_tracker.x[j]; int16_t dy = g_led_config.point[i].y - g_last_hit_tracker.y[j]; uint8_t dist = sqrt16(dx * dx + dy * dy); uint16_t tick = scale16by8(g_last_hit_tracker.tick[j], rgb_matrix_config.speed); - effect_func(&hsv, dx, dy, dist, tick); + hsv = effect_func(hsv, dx, dy, dist, tick); } - hsv.v = scale8(hsv.v, rgb_matrix_config.val); + hsv.v = scale8(hsv.v, rgb_matrix_config.hsv.v); RGB rgb = hsv_to_rgb(hsv); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } diff --git a/quantum/rgb_matrix_runners/effect_runner_sin_cos_i.h b/quantum/rgb_matrix_runners/effect_runner_sin_cos_i.h index 54e4c6d86..e68a7a968 100644 --- a/quantum/rgb_matrix_runners/effect_runner_sin_cos_i.h +++ b/quantum/rgb_matrix_runners/effect_runner_sin_cos_i.h @@ -1,18 +1,16 @@ #pragma once -typedef void (*sin_cos_i_f)(HSV* hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time); +typedef HSV (*sin_cos_i_f)(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time); bool effect_runner_sin_cos_i(effect_params_t* params, sin_cos_i_f effect_func) { RGB_MATRIX_USE_LIMITS(led_min, led_max); - HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; uint16_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); int8_t cos_value = cos8(time) - 128; int8_t sin_value = sin8(time) - 128; for (uint8_t i = led_min; i < led_max; i++) { RGB_MATRIX_TEST_LED_FLAGS(); - effect_func(&hsv, cos_value, sin_value, i, time); - RGB rgb = hsv_to_rgb(hsv); + RGB rgb = hsv_to_rgb(effect_func(rgb_matrix_config.hsv, cos_value, sin_value, i, time)); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } return led_max < DRIVER_LED_TOTAL; diff --git a/quantum/rgb_matrix_types.h b/quantum/rgb_matrix_types.h index f890edd94..04a84f4ac 100644 --- a/quantum/rgb_matrix_types.h +++ b/quantum/rgb_matrix_types.h @@ -2,6 +2,7 @@ #include #include +#include "color.h" #if defined(__GNUC__) #define PACKED __attribute__ ((__packed__)) @@ -81,10 +82,8 @@ typedef union { struct PACKED { uint8_t enable :2; uint8_t mode :6; - uint8_t hue :8; - uint8_t sat :8; - uint8_t val :8; - uint8_t speed :8;//EECONFIG needs to be increased to support this + HSV hsv; + uint8_t speed; //EECONFIG needs to be increased to support this }; } rgb_config_t; diff --git a/users/xulkal/custom_oled.c b/users/xulkal/custom_oled.c index d871e96f0..7280ef701 100644 --- a/users/xulkal/custom_oled.c +++ b/users/xulkal/custom_oled.c @@ -80,7 +80,7 @@ static void render_status(void) oled_set_cursor(0, oled_max_lines() - 7); oled_write_P(PSTR("-----"), false); static char buffer[26] = {0}; - snprintf(buffer, sizeof(buffer), "h%3d s%3d v%3d s%3d m%3d\n", rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val, rgb_matrix_config.speed, rgb_matrix_config.mode); + snprintf(buffer, sizeof(buffer), "h%3d s%3d v%3d s%3d m%3d\n", rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v, rgb_matrix_config.speed, rgb_matrix_config.mode); oled_write(buffer, false); #elif defined(RGBLIGHT_ENABLE) oled_set_cursor(0, oled_max_lines() - 7); @@ -137,7 +137,7 @@ static void render_status(void) #if defined(RGB_MATRIX_ENABLE) static char buffer[20] = {0}; - snprintf(buffer, sizeof(buffer), " h%3d s%3d v%3d\n", rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val); + snprintf(buffer, sizeof(buffer), " h%3d s%3d v%3d\n", rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v); oled_write(buffer, false); #elif defined(RGBLIGHT_ENABLE) static char buffer[20] = {0}; From da1f05fbc19477c05c0c01bb07fabfaf1ece9d54 Mon Sep 17 00:00:00 2001 From: Sid Carter Date: Sat, 13 Jul 2019 02:37:48 -0400 Subject: [PATCH 341/341] [Keymap] Add workman to my iris keymap (#6319) * add workman to my iris keymap * updates for readme.md * remove redundant paths * switch up and down --- keyboards/keebio/iris/keymaps/osiris/keymap.c | 47 ++++++++++++++----- .../keebio/iris/keymaps/osiris/readme.md | 4 +- 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/keyboards/keebio/iris/keymaps/osiris/keymap.c b/keyboards/keebio/iris/keymaps/osiris/keymap.c index 630cd4ab8..4bf65dd6e 100644 --- a/keyboards/keebio/iris/keymaps/osiris/keymap.c +++ b/keyboards/keebio/iris/keymaps/osiris/keymap.c @@ -4,14 +4,17 @@ extern keymap_config_t keymap_config; enum layer_names { _QWERTY, + _WORKMAN, _LOWER, _RAISE, _ADJUST }; enum custom_keycodes { - LOWER = SAFE_RANGE, - RAISE, + QWERTY = SAFE_RANGE, + WORKMAN, + LOWER, + RAISE }; #define KC_ KC_TRNS @@ -33,9 +36,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----| |----+----+----+----+----+----| TAB , Q , W , E , R , T , Y , U , I , O , P ,BSLS, //|----+----+----+----+----+----| |----+----+----+----+----+----| - LCTL, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, + LSFT, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - LSFT, Z , X , C , V , B ,LBRC, RBRC, N , M ,COMM,DOT ,SLSH,RSFT, + LECL, Z , X , C , V , B ,LBRC, RBRC, N , M ,COMM,DOT ,SLSH,RGHT, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + LGUI,LOWR,ENT , SPC ,RASE,RALT + // `----+----+----' `----+----+----' + ), + + [_WORKMAN] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + GESC, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + TAB , Q , D , R , W , B , J , F , U , P ,SCLN,BSLS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LSFT, A , S , H , T , G , Y , N , E , O ,I ,QUOT, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + LECL, Z , X , M , C , V ,LBRC, RBRC, K , L ,COMM,DOT ,SLSH,RGHT, //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' LGUI,LOWR,ENT , SPC ,RASE,RALT // `----+----+----' `----+----+----' @@ -45,11 +62,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,----+----+----+----+----+----. ,----+----+----+----+----+----. TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,DEL , //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , UP , , , , , ,BTN1, , , , + , , , , , , , ,BTN1, , , , //|----+----+----+----+----+----| |----+----+----+----+----+----| - ,LEFT,DOWN,RGHT, , , MS_L,MS_D,MS_U,MS_R, , , + , , , , , , MS_L,MS_D,MS_U,MS_R, , , //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - , , , , , , , , , , , , , , + , , , , , UP , , , , , , , , , //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' , , , , , // `----+----+----' `----+----+----' @@ -63,7 +80,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----| |----+----+----+----+----+----| ,MPLY,VOLD,MNXT, ,LPRN, RPRN,MINS,EQL , , , , //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - , , , , , , , , , , , , , , + , , , , , , , ,DOWN, , , , , , //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' , , , , , // `----+----+----' `----+----+----' @@ -71,7 +88,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT( //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, QWERTY, WORKMAN, _______, _______, _______, _______, _______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| @@ -91,6 +108,16 @@ float tone_qwerty[][2] = SONG(QWERTY_SOUND); bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + case WORKMAN: + if (record->event.pressed) { + set_single_persistent_default_layer(_WORKMAN); + } + return false; case LOWER: if (record->event.pressed) { layer_on(_LOWER); @@ -100,7 +127,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { update_tri_layer(_LOWER, _RAISE, _ADJUST); } return false; - break; case RAISE: if (record->event.pressed) { layer_on(_RAISE); @@ -110,7 +136,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { update_tri_layer(_LOWER, _RAISE, _ADJUST); } return false; - break; } return true; } diff --git a/keyboards/keebio/iris/keymaps/osiris/readme.md b/keyboards/keebio/iris/keymaps/osiris/readme.md index 2eb75b066..7db30591e 100644 --- a/keyboards/keebio/iris/keymaps/osiris/readme.md +++ b/keyboards/keebio/iris/keymaps/osiris/readme.md @@ -3,7 +3,9 @@ ![My Iris Rev3](https://i.imgur.com/7oXacel.jpg) - mouse keys enabled -- WASD as arrow keys, and same ones for media +- includes a QWERTY and a WORKMAN layout now - keys that I need, while removing keys that I don't +- more updates with the layout coming soon + - the enter needs to move elsewhere, not yet sure where See keymap.c for layouts