From a3f1defcd40f2d53b01ace2f520ff7901a44c714 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 31 Oct 2020 05:15:26 -0700 Subject: [PATCH 001/114] [Keyboard] Fix function references IDB 60 (#10810) Co-authored-by: Ryan Co-authored-by: Thorben <34752364+itspngu@users.noreply.github.com> --- keyboards/idb/idb_60/idb_60.c | 16 ++++++++++++++++ keyboards/idb/idb_60/idb_60.h | 23 ++++++----------------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/keyboards/idb/idb_60/idb_60.c b/keyboards/idb/idb_60/idb_60.c index 18ce690431..a86606425e 100644 --- a/keyboards/idb/idb_60/idb_60.c +++ b/keyboards/idb/idb_60/idb_60.c @@ -15,3 +15,19 @@ void led_set_kb(uint8_t usb_led) { led_set_user(usb_led); } + +inline void _idb_60_caps_led_on(void) { + writePinLow(C5); +} + +inline void _idb_60_fn_led_on(void) { + writePinLow(C4); +} + +inline void _idb_60_caps_led_off(void) { + writePinHigh(C5); +} + +inline void _idb_60_fn_led_off(void) { + writePinHigh(C4); +} diff --git a/keyboards/idb/idb_60/idb_60.h b/keyboards/idb/idb_60/idb_60.h index 5d61ac464a..608c9ab7f1 100644 --- a/keyboards/idb/idb_60/idb_60.h +++ b/keyboards/idb/idb_60/idb_60.h @@ -2,24 +2,13 @@ #include "quantum.h" -inline void _idb_60_caps_led_on(void) { - writePinHigh(C5); -} +void _idb_60_caps_led_on(void); +void _idb_60_fn_led_on(void); +void _idb_60_caps_led_off(void); +void _idb_60_fn_led_off(void); -inline void _idb_60_fn_led_on(void) { - writePinHigh(C4); -} - -inline void _idb_60_caps_led_off(void) { - writePinLow(C5); -} - -inline void _idb_60_fn_led_off(void) { - writePinLow(C4); -} - -#define _idb_60_esc_led_on _idb_60_fn_led_on -#define _idb_60_esc_led_off _idb_60_fn_led_off +#define _idb_60_esc_led_on() _idb_60_fn_led_on() +#define _idb_60_esc_led_off() _idb_60_fn_led_off() #define LAYOUT( \ K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K07,\ From d705918f50b257cc12e13567fd22a64db1087705 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 1 Nov 2020 06:56:08 +1100 Subject: [PATCH 002/114] Efreet refactor (#10806) --- keyboards/efreet/config.h | 157 ++++++--------------- keyboards/efreet/efreet.c | 36 +---- keyboards/efreet/efreet.h | 65 ++++----- keyboards/efreet/info.json | 109 +++++++++++++- keyboards/efreet/keymaps/default/config.h | 19 --- keyboards/efreet/keymaps/default/keymap.c | 55 +++----- keyboards/efreet/keymaps/default/readme.md | 2 +- keyboards/efreet/keymaps/via/keymap.c | 49 +++---- keyboards/efreet/readme.md | 12 +- keyboards/efreet/rules.mk | 27 ++-- 10 files changed, 246 insertions(+), 285 deletions(-) delete mode 100644 keyboards/efreet/keymaps/default/config.h diff --git a/keyboards/efreet/config.h b/keyboards/efreet/config.h index b73ce7e052..ed5bb730a7 100644 --- a/keyboards/efreet/config.h +++ b/keyboards/efreet/config.h @@ -20,12 +20,11 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x534F // "SO" -#define PRODUCT_ID 0x0001 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Soran -#define PRODUCT Efreet -#define DESCRIPTION A 40% ortholinear keyboard. +#define VENDOR_ID 0x534F // "SO" +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Soran +#define PRODUCT Efreet /* key matrix size */ #define MATRIX_ROWS 8 @@ -40,50 +39,50 @@ along with this program. If not, see . * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * -*/ + */ #define MATRIX_ROW_PINS { B0, D6, D5, D4, D3, D2, D1, C2 } #define MATRIX_COL_PINS { B3, B4, B5, B6, B7, C7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL*/ +/* 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 SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 #define BACKLIGHT_PIN D0 -#define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 +#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 +//#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 @@ -97,9 +96,9 @@ along with this program. If not, see . #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). + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). */ -// #define GRAVE_ESC_CTRL_OVERRIDE +//#define GRAVE_ESC_CTRL_OVERRIDE /* * Force NKRO @@ -122,55 +121,6 @@ along with this program. If not, see . */ //#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_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. @@ -186,32 +136,11 @@ along with this program. If not, see . //#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 +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION /* Bootmagic Lite key configuration */ -// #define BOOTMAGIC_LITE_ROW 0 -// #define BOOTMAGIC_LITE_COLUMN 0 +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/efreet/efreet.c b/keyboards/efreet/efreet.c index a05db74a52..3c52e1cd1a 100644 --- a/keyboards/efreet/efreet.c +++ b/keyboards/efreet/efreet.c @@ -13,39 +13,5 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include "efreet.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/efreet/efreet.h b/keyboards/efreet/efreet.h index 7ad717f3de..4b0c9f552e 100644 --- a/keyboards/efreet/efreet.h +++ b/keyboards/efreet/efreet.h @@ -17,7 +17,9 @@ #include "quantum.h" -/* This a shortcut to help you visually see your layout. +#define XXX KC_NO + +/* This is 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. @@ -25,35 +27,34 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ +#define LAYOUT_ortho_4x12( \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75 \ +) { \ + { k10, k11, k12, k13, k14, k15 }, \ + { k00, k01, k02, k03, k04, k05 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k40, k41, k42, k43, k44, k45 }, \ + { k70, k71, k72, k73, k74, k75 }, \ + { k60, k61, k62, k63, k64, k65 } \ +} - #define LAYOUT_ortho_4x12( \ - K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15,\ - K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35,\ - K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55,\ - K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75\ - ) { \ - { K10, K11, K12, K13, K14, K15 }, \ - { K00, K01, K02, K03, K04, K05 }, \ - { K30, K31, K32, K33, K34, K35 }, \ - { K20, K21, K22, K23, K24, K25 }, \ - { K50, K51, K52, K53, K54, K55 }, \ - { K40, K41, K42, K43, K44, K45 }, \ - { K70, K71, K72, K73, K74, K75 }, \ - { K60, K61, K62, K63, K64, K65 } \ - } - - #define LAYOUT_planck_mit( \ - K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15,\ - K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35,\ - K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55,\ - K60, K70, K61, K71, K62, K72, K73, K64, K74, K65, K75\ - ) { \ - { K10, K11, K12, K13, K14, K15 }, \ - { K00, K01, K02, K03, K04, K05 }, \ - { K30, K31, K32, K33, K34, K35 }, \ - { K20, K21, K22, K23, K24, K25 }, \ - { K50, K51, K52, K53, K54, K55 }, \ - { K40, K41, K42, K43, K44, K45 }, \ - { K70, K71, K72, K73, K74, K75 }, \ - { K60, K61, K62, KC_NO, K64, K65 } \ - } +#define LAYOUT_planck_mit( \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, \ + k60, k70, k61, k71, k62, k72, k73, k64, k74, k65, k75 \ +) { \ + { k10, k11, k12, k13, k14, k15 }, \ + { k00, k01, k02, k03, k04, k05 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k40, k41, k42, k43, k44, k45 }, \ + { k70, k71, k72, k73, k74, k75 }, \ + { k60, k61, k62, XXX, k64, k65 } \ +} diff --git a/keyboards/efreet/info.json b/keyboards/efreet/info.json index 25b627d8ce..6766b39527 100644 --- a/keyboards/efreet/info.json +++ b/keyboards/efreet/info.json @@ -6,10 +6,113 @@ "height": 4, "layouts": { "LAYOUT_planck_mit": { - "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":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}, {"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":6, "y":1}, {"label":"J", "x":7, "y":1}, {"label":"K", "x":8, "y":1}, {"label":"L", "x":9, "y":1}, {"label":";", "x":10, "y":1}, {"label":"'", "x":11, "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":6, "y":2}, {"label":"M", "x":7, "y":2}, {"label":",", "x":8, "y":2}, {"label":".", "x":9, "y":2}, {"label":"/", "x":10, "y":2}, {"label":"Return", "x":11, "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, "w":2}, {"label":"⇑", "x":7, "y":3}, {"label":"←", "x":8, "y":3}, {"label":"↓", "x":9, "y":3}, {"label":"↑", "x":10, "y":3}, {"label":"→", "x":11, "y":3}] + "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": { - "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":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}, {"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":6, "y":1}, {"label":"J", "x":7, "y":1}, {"label":"K", "x":8, "y":1}, {"label":"L", "x":9, "y":1}, {"label":";", "x":10, "y":1}, {"label":"'", "x":11, "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":6, "y":2}, {"label":"M", "x":7, "y":2}, {"label":",", "x":8, "y":2}, {"label":".", "x":9, "y":2}, {"label":"/", "x":10, "y":2}, {"label":"Return", "x":11, "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}, {"x":6, "y":3}, {"label":"⇑", "x":7, "y":3}, {"label":"←", "x":8, "y":3}, {"label":"↓", "x":9, "y":3}, {"label":"↑", "x":10, "y":3}, {"label":"→", "x":11, "y":3}] + "LAYOUT_ortho_4x12": { + "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/efreet/keymaps/default/config.h b/keyboards/efreet/keymaps/default/config.h deleted file mode 100644 index b825835bb4..0000000000 --- a/keyboards/efreet/keymaps/default/config.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2019 Amber Holly - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General 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/efreet/keymaps/default/keymap.c b/keyboards/efreet/keymaps/default/keymap.c index 72443411b3..9f3bc08c30 100644 --- a/keyboards/efreet/keymaps/default/keymap.c +++ b/keyboards/efreet/keymaps/default/keymap.c @@ -13,43 +13,26 @@ * 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_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_ENT , - BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT - ), - [1] = 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_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 - ), - [2] = 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_HOME, KC_END, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY - ) + [0] = 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_ENT, + BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + [1] = 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_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 + ), + [2] = 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_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ) }; - -void matrix_init_user(void) { - -} - -void matrix_scan_user(void) { - -} - -void led_set_user(uint8_t usb_led) { - -} diff --git a/keyboards/efreet/keymaps/default/readme.md b/keyboards/efreet/keymaps/default/readme.md index d714acd942..08f10328c4 100644 --- a/keyboards/efreet/keymaps/default/readme.md +++ b/keyboards/efreet/keymaps/default/readme.md @@ -1 +1 @@ -# The default keymap for efreet \ No newline at end of file +# The default keymap for efreet diff --git a/keyboards/efreet/keymaps/via/keymap.c b/keyboards/efreet/keymaps/via/keymap.c index c08e3bbe08..0cd90f80d9 100644 --- a/keyboards/efreet/keymaps/via/keymap.c +++ b/keyboards/efreet/keymaps/via/keymap.c @@ -13,31 +13,32 @@ * 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_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_ENT , - BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT - ), - [1] = 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_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 - ), - [2] = 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_HOME, KC_END, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY - ), - [3] = LAYOUT_ortho_4x12( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ) + [0] = 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_ENT, + BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + [1] = 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_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 + ), + [2] = 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_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + [3] = LAYOUT_ortho_4x12( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) }; diff --git a/keyboards/efreet/readme.md b/keyboards/efreet/readme.md index 9310dacf7b..13c9cd505c 100644 --- a/keyboards/efreet/readme.md +++ b/keyboards/efreet/readme.md @@ -1,15 +1,19 @@ # Efreet -![efreet](https://i.imgur.com/Lh6WLuI.jpg) +![efreet](https://i.imgur.com/Lh6WLuIl.jpg) Custom PCB for the Efreet (as4x) keyboard. -Keyboard Maintainer: [Amber Holly](https://github.com/amberstarlight) -Hardware Supported: Efreet PCB -Hardware Availability: private group buy +* Keyboard Maintainer: [Amber Holly](https://github.com/amberstarlight) +* Hardware Supported: Efreet PCB +* Hardware Availability: private group buy Make example for this keyboard (after setting up your build environment): make efreet:default +Flashing example for this keyboard: + + make efreet:default:flash + 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/efreet/rules.mk b/keyboards/efreet/rules.mk index 4f0e32f55e..a9a438746e 100644 --- a/keyboards/efreet/rules.mk +++ b/keyboards/efreet/rules.mk @@ -2,30 +2,23 @@ MCU = atmega32u2 # Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # 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 - 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 = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output LAYOUTS = ortho_4x12 planck_mit From 7b33897b974222e9d36032f1630455bf542dee7e Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 31 Oct 2020 22:50:53 +0000 Subject: [PATCH 003/114] protect against those who develop with their fork on master (#10815) --- .github/workflows/api.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/api.yml b/.github/workflows/api.yml index 2d09089b65..dfb1b58895 100644 --- a/.github/workflows/api.yml +++ b/.github/workflows/api.yml @@ -13,6 +13,9 @@ jobs: runs-on: ubuntu-latest container: qmkfm/base_container + # protect against those who develop with their fork on master + if: github.repository == 'qmk/qmk_firmware' + steps: - uses: actions/checkout@v2 with: From 4fa1924bd7bb0d527dc66573ab48c620e011a87f Mon Sep 17 00:00:00 2001 From: Brandon Claveria <48102030+swiftrax@users.noreply.github.com> Date: Sat, 31 Oct 2020 17:13:06 -0700 Subject: [PATCH 004/114] add beegboy keyboard (#10762) * add layout macro * add beegboy keymaps * fix matrix pins * Change PID * Update keyboards/handwired/swiftrax/beegboy/config.h Co-authored-by: Ryan Co-authored-by: Swiftrax Co-authored-by: Ryan --- .../handwired/swiftrax/beegboy/beegboy.c | 16 ++++++ .../handwired/swiftrax/beegboy/beegboy.h | 42 ++++++++++++++++ keyboards/handwired/swiftrax/beegboy/config.h | 49 +++++++++++++++++++ .../handwired/swiftrax/beegboy/info.json | 12 +++++ .../swiftrax/beegboy/keymaps/default/keymap.c | 42 ++++++++++++++++ .../swiftrax/beegboy/keymaps/via/keymap.c | 41 ++++++++++++++++ .../swiftrax/beegboy/keymaps/via/rules.mk | 1 + .../handwired/swiftrax/beegboy/readme.md | 13 +++++ keyboards/handwired/swiftrax/beegboy/rules.mk | 23 +++++++++ 9 files changed, 239 insertions(+) create mode 100644 keyboards/handwired/swiftrax/beegboy/beegboy.c create mode 100644 keyboards/handwired/swiftrax/beegboy/beegboy.h create mode 100644 keyboards/handwired/swiftrax/beegboy/config.h create mode 100644 keyboards/handwired/swiftrax/beegboy/info.json create mode 100644 keyboards/handwired/swiftrax/beegboy/keymaps/default/keymap.c create mode 100644 keyboards/handwired/swiftrax/beegboy/keymaps/via/keymap.c create mode 100644 keyboards/handwired/swiftrax/beegboy/keymaps/via/rules.mk create mode 100644 keyboards/handwired/swiftrax/beegboy/readme.md create mode 100644 keyboards/handwired/swiftrax/beegboy/rules.mk diff --git a/keyboards/handwired/swiftrax/beegboy/beegboy.c b/keyboards/handwired/swiftrax/beegboy/beegboy.c new file mode 100644 index 0000000000..6923d50283 --- /dev/null +++ b/keyboards/handwired/swiftrax/beegboy/beegboy.c @@ -0,0 +1,16 @@ +/* Copyright 2020 swiftrax + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "beegboy.h" diff --git a/keyboards/handwired/swiftrax/beegboy/beegboy.h b/keyboards/handwired/swiftrax/beegboy/beegboy.h new file mode 100644 index 0000000000..0b95ddc2ce --- /dev/null +++ b/keyboards/handwired/swiftrax/beegboy/beegboy.h @@ -0,0 +1,42 @@ +/* Copyright 2020 swiftrax + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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( \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, k08, k18, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, k28, k38, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, k48, k58, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k76, k67, k77, k68, \ + k80, k90, k81, k91, k82, k92, k83, k93, k84, k94, k85, k86, k96, k87, k97, k88, k98, \ + ka0, kb0, ka1, ka2, ka4, ka5, ka6, kb6, ka7, kb7, ka8 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58 }, \ + { k60, k61, k62, k63, k64, k65, XXX, k67, k68 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, XXX }, \ + { k80, k81, k82, k83, k84, k85, k86, k87, k88 }, \ + { k90, k91, k92, k93, k94, XXX, k96, k97, k98 }, \ + { ka0, ka1, ka2, XXX, ka4, ka5, ka6, ka7, ka8 }, \ + { kb0, XXX, XXX, XXX, XXX, XXX, kb6, kb7, XXX } \ +} diff --git a/keyboards/handwired/swiftrax/beegboy/config.h b/keyboards/handwired/swiftrax/beegboy/config.h new file mode 100644 index 0000000000..a211573b75 --- /dev/null +++ b/keyboards/handwired/swiftrax/beegboy/config.h @@ -0,0 +1,49 @@ +/* +Copyright 2020 Swiftrax + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 0x04D8 +#define PRODUCT_ID 0xEAC5 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Swiftrax +#define PRODUCT Beegboy + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 9 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { B1, B0, B3, B2, D0, B7, D2, D1, B5, B4, C6, B6 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, D5, D3 } + + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/*EEPROM for via*/ +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/handwired/swiftrax/beegboy/info.json b/keyboards/handwired/swiftrax/beegboy/info.json new file mode 100644 index 0000000000..93c61628c8 --- /dev/null +++ b/keyboards/handwired/swiftrax/beegboy/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Beegboy", + "url": "https://github.com/swiftrax", + "maintainer": "swiftrax", + "width": 19.5, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"0,0", "x":0, "y":0}, {"label":"1,0", "x":1.25, "y":0}, {"label":"0,1", "x":2.25, "y":0}, {"label":"1,1", "x":3.25, "y":0}, {"label":"0,2", "x":4.25, "y":0}, {"label":"1,2", "x":5.5, "y":0}, {"label":"0,3", "x":6.5, "y":0}, {"label":"1,3", "x":7.5, "y":0}, {"label":"0,4", "x":8.5, "y":0}, {"label":"1,4", "x":9.75, "y":0}, {"label":"0,5", "x":10.75, "y":0}, {"label":"1,5", "x":11.75, "y":0}, {"label":"0,6", "x":12.75, "y":0}, {"label":"1,6", "x":14, "y":0}, {"label":"0,7", "x":15.5, "y":0}, {"label":"1,7", "x":16.5, "y":0}, {"label":"0,8", "x":17.5, "y":0}, {"label":"1,8", "x":18.5, "y":0}, {"label":"2,0", "x":0, "y":1.25}, {"label":"3,0", "x":1, "y":1.25}, {"label":"2,1", "x":2, "y":1.25}, {"label":"3,1", "x":3, "y":1.25}, {"label":"2,2", "x":4, "y":1.25}, {"label":"3,2", "x":5, "y":1.25}, {"label":"2,3", "x":6, "y":1.25}, {"label":"3,3", "x":7, "y":1.25}, {"label":"2,4", "x":8, "y":1.25}, {"label":"3,4", "x":9, "y":1.25}, {"label":"2,5", "x":10, "y":1.25}, {"label":"3,5", "x":11, "y":1.25}, {"label":"2,6", "x":12, "y":1.25}, {"label":"3,6", "x":13, "y":1.25, "w":2}, {"label":"2,7", "x":15.5, "y":1.25}, {"label":"3,7", "x":16.5, "y":1.25}, {"label":"2,8", "x":17.5, "y":1.25}, {"label":"3,8", "x":18.5, "y":1.25}, {"label":"4,0", "x":0, "y":2.25, "w":1.5}, {"label":"5,0", "x":1.5, "y":2.25}, {"label":"4,1", "x":2.5, "y":2.25}, {"label":"5,1", "x":3.5, "y":2.25}, {"label":"4,2", "x":4.5, "y":2.25}, {"label":"5,2", "x":5.5, "y":2.25}, {"label":"4,3", "x":6.5, "y":2.25}, {"label":"5,3", "x":7.5, "y":2.25}, {"label":"4,4", "x":8.5, "y":2.25}, {"label":"5,4", "x":9.5, "y":2.25}, {"label":"4,5", "x":10.5, "y":2.25}, {"label":"5,5", "x":11.5, "y":2.25}, {"label":"4,6", "x":12.5, "y":2.25}, {"label":"5,6", "x":13.5, "y":2.25, "w":1.5}, {"label":"4,7", "x":15.5, "y":2.25}, {"label":"5,7", "x":16.5, "y":2.25}, {"label":"4,8", "x":17.5, "y":2.25}, {"label":"5,8", "x":18.5, "y":2.25, "h":2}, {"label":"6,0", "x":0, "y":3.25, "w":1.75}, {"label":"7,0", "x":1.75, "y":3.25}, {"label":"6,1", "x":2.75, "y":3.25}, {"label":"7,1", "x":3.75, "y":3.25}, {"label":"6,2", "x":4.75, "y":3.25}, {"label":"7,2", "x":5.75, "y":3.25}, {"label":"6,3", "x":6.75, "y":3.25}, {"label":"7,3", "x":7.75, "y":3.25}, {"label":"6,4", "x":8.75, "y":3.25}, {"label":"7,4", "x":9.75, "y":3.25}, {"label":"6,5", "x":10.75, "y":3.25}, {"label":"7,5", "x":11.75, "y":3.25}, {"label":"7,6", "x":12.75, "y":3.25, "w":2.25}, {"label":"6,7", "x":15.5, "y":3.25}, {"label":"7,7", "x":16.5, "y":3.25}, {"label":"6,8", "x":17.5, "y":3.25}, {"label":"8,0", "x":0, "y":4.25, "w":2.25}, {"label":"9,0", "x":2.25, "y":4.25}, {"label":"8,1", "x":3.25, "y":4.25}, {"label":"9,1", "x":4.25, "y":4.25}, {"label":"8,2", "x":5.25, "y":4.25}, {"label":"9,2", "x":6.25, "y":4.25}, {"label":"8,3", "x":7.25, "y":4.25}, {"label":"9,3", "x":8.25, "y":4.25}, {"label":"8,4", "x":9.25, "y":4.25}, {"label":"9,4", "x":10.25, "y":4.25}, {"label":"8,5", "x":11.25, "y":4.25}, {"label":"8,6", "x":12.25, "y":4.25, "w":1.75}, {"label":"8,7", "x":15.5, "y":4.25}, {"label":"9,7", "x":16.5, "y":4.25}, {"label":"8,8", "x":17.5, "y":4.25}, {"label":"9,8", "x":18.5, "y":4.25, "h":2}, {"label":"9,6", "x":14.25, "y":4.5}, {"label":"10,0", "x":0, "y":5.25, "w":1.25}, {"label":"11,0", "x":1.25, "y":5.25, "w":1.25}, {"label":"10,1", "x":2.5, "y":5.25, "w":1.25}, {"label":"10,2", "x":3.75, "y":5.25, "w":6.25}, {"label":"10,4", "x":10, "y":5.25, "w":1.5}, {"label":"10,5", "x":11.5, "y":5.25, "w":1.5}, {"label":"11,7", "x":16.5, "y":5.25}, {"label":"10,8", "x":17.5, "y":5.25}, {"label":"10,6", "x":13.25, "y":5.5}, {"label":"11,6", "x":14.25, "y":5.5}, {"label":"10,7", "x":15.25, "y":5.5}] + } + } +} \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/beegboy/keymaps/default/keymap.c b/keyboards/handwired/swiftrax/beegboy/keymaps/default/keymap.c new file mode 100644 index 0000000000..b8a9b09812 --- /dev/null +++ b/keyboards/handwired/swiftrax/beegboy/keymaps/default/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2020 swiftrax + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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. +enum _layer { + _MA, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_MA] = 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_F13, KC_HOME, KC_PGUP, KC_PGDN, 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_MINS, KC_EQL, 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_PIPE, 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_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT), +[_FN] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; diff --git a/keyboards/handwired/swiftrax/beegboy/keymaps/via/keymap.c b/keyboards/handwired/swiftrax/beegboy/keymaps/via/keymap.c new file mode 100644 index 0000000000..b98f217e72 --- /dev/null +++ b/keyboards/handwired/swiftrax/beegboy/keymaps/via/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2020 swiftrax + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_F13, KC_HOME, KC_PGUP, KC_PGDN, 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_MINS, KC_EQL, 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_PIPE, 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_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT), +[1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +[2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; diff --git a/keyboards/handwired/swiftrax/beegboy/keymaps/via/rules.mk b/keyboards/handwired/swiftrax/beegboy/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/handwired/swiftrax/beegboy/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/beegboy/readme.md b/keyboards/handwired/swiftrax/beegboy/readme.md new file mode 100644 index 0000000000..3deb4a12d7 --- /dev/null +++ b/keyboards/handwired/swiftrax/beegboy/readme.md @@ -0,0 +1,13 @@ +# Beegboy + +96% with a gap + +* Keyboard Maintainer: [Swiftrax](https://github.com/swiftrax) +* Hardware Supported: beegboy +* Hardware Availability: [GitHub.com](https://github.com/swiftrax) + +Make example for this keyboard (after setting up your build environment): + + make handwired/swiftrax/beegboy: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/swiftrax/beegboy/rules.mk b/keyboards/handwired/swiftrax/beegboy/rules.mk new file mode 100644 index 0000000000..eefa7d85ef --- /dev/null +++ b/keyboards/handwired/swiftrax/beegboy/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +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 +# 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 = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = no # Rotary Encoder From f450bdbb41575e8162f41776f9fb8b2be7ab6f85 Mon Sep 17 00:00:00 2001 From: nopunin10did Date: Sun, 1 Nov 2020 13:21:09 -0500 Subject: [PATCH 005/114] [Keyboard] Add The Railroad (rev 0) (#10474) * Add The Railroad keyboard, rev 0 * Update keyboards/nopunin10did/railroad/config.h Co-authored-by: ridingqwerty * Update keyboards/nopunin10did/railroad/config.h Co-authored-by: ridingqwerty * Update config.h * Update keyboards/nopunin10did/railroad/rules.mk Co-authored-by: ridingqwerty * Update keyboards/nopunin10did/railroad/config.h Co-authored-by: ridingqwerty * Update keyboards/nopunin10did/railroad/keymaps/nopunin10did/keymap.c Co-authored-by: ridingqwerty * Update keyboards/nopunin10did/railroad/keymaps/nopunin10did/keymap.c Co-authored-by: ridingqwerty * Update keyboards/nopunin10did/railroad/keymaps/nopunin10did/keymap.c Co-authored-by: ridingqwerty * Update keyboards/nopunin10did/railroad/keymaps/default/keymap.c Co-authored-by: ridingqwerty * Update keyboards/nopunin10did/railroad/keymaps/default/keymap.c Co-authored-by: ridingqwerty * Update keyboards/nopunin10did/railroad/rules.mk Co-authored-by: ridingqwerty * Update rules.mk * Update config.h * Update keymap.c * Update keyboards/nopunin10did/railroad/railroad.h Co-authored-by: ridingqwerty * Update railroad.h * Update keyboards/nopunin10did/railroad/railroad.c Co-authored-by: ridingqwerty * Update keyboards/nopunin10did/railroad/keymaps/default/keymap.c Co-authored-by: ridingqwerty * Update keyboards/nopunin10did/railroad/rules.mk Co-authored-by: Joel Challis * Update keyboards/nopunin10did/railroad/config.h Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/nopunin10did/railroad/readme.md Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Updates from peer review to correct render * Update keyboards/nopunin10did/railroad/info.json Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/nopunin10did/railroad/readme.md Co-authored-by: Ryan * Update keyboards/nopunin10did/railroad/info.json Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Relocate most files inside rev0 Co-authored-by: ridingqwerty Co-authored-by: Joel Challis Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Ryan --- keyboards/nopunin10did/railroad/readme.md | 15 +++ keyboards/nopunin10did/railroad/rev0/config.h | 47 +++++++ .../nopunin10did/railroad/rev0/info.json | 122 ++++++++++++++++++ .../railroad/rev0/keymaps/default/keymap.c | 45 +++++++ .../rev0/keymaps/nopunin10did/keymap.c | 50 +++++++ .../nopunin10did/railroad/rev0/railroad.c | 17 +++ .../nopunin10did/railroad/rev0/railroad.h | 53 ++++++++ keyboards/nopunin10did/railroad/rules.mk | 22 ++++ 8 files changed, 371 insertions(+) create mode 100644 keyboards/nopunin10did/railroad/readme.md create mode 100644 keyboards/nopunin10did/railroad/rev0/config.h create mode 100644 keyboards/nopunin10did/railroad/rev0/info.json create mode 100644 keyboards/nopunin10did/railroad/rev0/keymaps/default/keymap.c create mode 100644 keyboards/nopunin10did/railroad/rev0/keymaps/nopunin10did/keymap.c create mode 100644 keyboards/nopunin10did/railroad/rev0/railroad.c create mode 100644 keyboards/nopunin10did/railroad/rev0/railroad.h create mode 100644 keyboards/nopunin10did/railroad/rules.mk diff --git a/keyboards/nopunin10did/railroad/readme.md b/keyboards/nopunin10did/railroad/readme.md new file mode 100644 index 0000000000..c84e3573f2 --- /dev/null +++ b/keyboards/nopunin10did/railroad/readme.md @@ -0,0 +1,15 @@ +# The Railroad + +![The Railroad](https://i.imgur.com/B8OjXmyl.jpg) + +A long keyboard with ortholinear alphas and semi-standard modifier keys. For more information, join the [NoPunIn10Key Discord](https://discord.gg/sku2Y6w). + +* Keyboard Maintainer: [Alex Ronke](diplomacyvariants.wordpress.com), also known as NoPunIn10Did. +* Hardware Supported: The Railroad: 2020-07 Prototype +* Hardware Availability: Currently by request only + +Make example for this keyboard (after setting up your build environment): + + make nopunin10did/railroad: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/nopunin10did/railroad/rev0/config.h b/keyboards/nopunin10did/railroad/rev0/config.h new file mode 100644 index 0000000000..8c6b075bf9 --- /dev/null +++ b/keyboards/nopunin10did/railroad/rev0/config.h @@ -0,0 +1,47 @@ +/* Copyright 2020 W. Alex Ronke, a.k.a. NoPunIn10Did (w.alex.ronke@gmail.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 + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4E50 // "NP" +#define PRODUCT_ID 0x9111 +#define DEVICE_VER 0x0001 +#define MANUFACTURER NoPunIn10Did +#define PRODUCT The Railroad + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 11 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D2, D3, D5, C6, C7, F6, F5, F4, F1, F0 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D4, D6, D7, B4, B5, B6 } +#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 diff --git a/keyboards/nopunin10did/railroad/rev0/info.json b/keyboards/nopunin10did/railroad/rev0/info.json new file mode 100644 index 0000000000..4305c09dca --- /dev/null +++ b/keyboards/nopunin10did/railroad/rev0/info.json @@ -0,0 +1,122 @@ +{ + "keyboard_name": "The Railroad", + "url": "https://github.com/qmk/qmk_firmware/tree/master/keyboards/nopunin10did/railroad", + "maintainer": "NoPunIn10Did", + "manufacturer": "NoPunIn10Did", + "width": 23.5, + "height": 5.25, + "layouts": { + "LAYOUT": { + "layout": [ + {"y":0, "x":0, "label":"Scroll"}, + {"y":0, "x":1, "label":"Pause"}, + {"y":0, "x":2, "label":"Esc"}, + {"y":0, "x":3, "label":"`"}, + {"y":0, "x":4, "label":"1"}, + {"y":0, "x":5, "label":"2"}, + {"y":0, "x":6, "label":"3"}, + {"y":0, "x":7, "label":"4"}, + {"y":0, "x":8, "label":"5"}, + {"y":0, "x":9, "label":"-"}, + + {"y":1, "x":0, "label":"Print"}, + {"y":1, "x":1, "label":"Backspace", "w":1.5}, + {"y":1, "x":2.5, "label":"Tab", "w":1.5}, + {"y":1, "x":4, "label":"Q"}, + {"y":1, "x":5, "label":"W"}, + {"y":1, "x":6, "label":"E"}, + {"y":1, "x":7, "label":"R"}, + {"y":1, "x":8, "label":"T"}, + {"y":1, "x":9, "label":"["}, + + {"y":2, "x":0, "label":"Caps", "w":1.25}, + {"y":2, "x":1.75, "label":"Control", "w":2.25}, + {"y":2, "x":4, "label":"A"}, + {"y":2, "x":5, "label":"S"}, + {"y":2, "x":6, "label":"D"}, + {"y":2, "x":7, "label":"F"}, + {"y":2, "x":8, "label":"G"}, + {"y":2, "x":9, "label":"PgUp"}, + + {"y":3.25, "x":0, "label":"Cut"}, + {"y":3, "x":1.25, "label":"Shift", "w":2.75}, + {"y":3, "x":4, "label":"Z"}, + {"y":3, "x":5, "label":"X"}, + {"y":3, "x":6, "label":"C"}, + {"y":3, "x":7, "label":"V"}, + {"y":3, "x":8, "label":"B"}, + {"y":3, "x":9, "label":"PgDn"}, + + {"y":4.25, "x":0, "label":"Copy"}, + {"y":4.25, "x":1, "label":"Paste"}, + {"y":4, "x":2.25, "label":"Control", "w":1.5}, + {"y":4, "x":3.75, "label":"Super", "w":1.25}, + {"y":4, "x":5, "label":"Alt", "w":1.25}, + {"y":4.25, "x":6.5, "label":"UK \\|"}, + {"y":4.25, "x":7.5, "label":"Space", "w":1.75}, + {"y":4.25, "x":9.25, "label":"Shift / Del", "w":2.75}, + + {"y":0, "x":10.25, "label":"F1"}, + {"y":0, "x":11.25, "label":"F5"}, + {"y":0, "x":12.25, "label":"F9"}, + {"y":1, "x":10.25, "label":"F2"}, + {"y":1, "x":11.25, "label":"F6"}, + {"y":1, "x":12.25, "label":"F10"}, + {"y":2, "x":10.25, "label":"F3"}, + {"y":2, "x":11.25, "label":"F7"}, + {"y":2, "x":12.25, "label":"F11"}, + {"y":3, "x":10.25, "label":"F4"}, + {"y":3, "x":11.25, "label":"F8"}, + {"y":3, "x":12.25, "label":"F12"}, + + {"y":0, "x":13.5, "label":"="}, + {"y":0, "x":14.5, "label":"6"}, + {"y":0, "x":15.5, "label":"7"}, + {"y":0, "x":16.5, "label":"8"}, + {"y":0, "x":17.5, "label":"9"}, + {"y":0, "x":18.5, "label":"0"}, + {"y":0, "x":19.5, "label":"Backspace", "w":2}, + {"y":0, "x":21.5, "label":"Ins"}, + {"y":0, "x":22.5, "label":"Esc"}, + + {"y":1, "x":13.5, "label":"]"}, + {"y":1, "x":14.5, "label":"Y"}, + {"y":1, "x":15.5, "label":"U"}, + {"y":1, "x":16.5, "label":"I"}, + {"y":1, "x":17.5, "label":"O"}, + {"y":1, "x":18.5, "label":"P"}, + {"y":1, "x":19.5, "label":"\\", "w":1.5}, + {"y":1, "x":21, "label":"Del"}, + + {"y":2, "x":13.5, "label":"Home"}, + {"y":2, "x":14.5, "label":"H"}, + {"y":2, "x":15.5, "label":"J"}, + {"y":2, "x":16.5, "label":"K"}, + {"y":2, "x":17.5, "label":"L"}, + {"y":2, "x":18.5, "label":";"}, + {"y":2, "x":19.5, "label":"'"}, + {"y":2, "x":20.5, "label":"Return", "w":1.75}, + + {"y":1, "x":22.25, "label":"ISO Enter", "h":2, "w":1.25}, + + {"y":3, "x":13.5, "label":"End"}, + {"y":3, "x":14.5, "label":"N"}, + {"y":3, "x":15.5, "label":"M"}, + {"y":3, "x":16.5, "label":","}, + {"y":3, "x":17.5, "label":"."}, + {"y":3, "x":18.5, "label":"/"}, + {"y":3, "x":19.5, "label":"Shift", "w":1.75}, + {"y":3.25, "x":21.5, "label":"Up"}, + + {"y":4.25, "x":12, "label":"LShftAlt / Calc", "w":2.25}, + {"y":4.25, "x":14.25, "label":"Space", "w":1.75}, + {"y":4.25, "x":16, "label":"UK #~"}, + {"y":4, "x":17.25, "label":"AltGr / Home", "w":1.5}, + {"y":4, "x":18.75, "label":"Ctrl / End", "w":1.5}, + {"y":4.25, "x":20.5, "label":"Left"}, + {"y":4.25, "x":21.5, "label":"Down"}, + {"y":4.25, "x":22.5, "label":"Right"} + ] + } + } +} diff --git a/keyboards/nopunin10did/railroad/rev0/keymaps/default/keymap.c b/keyboards/nopunin10did/railroad/rev0/keymaps/default/keymap.c new file mode 100644 index 0000000000..8ffcc7f5b6 --- /dev/null +++ b/keyboards/nopunin10did/railroad/rev0/keymaps/default/keymap.c @@ -0,0 +1,45 @@ +/* Copyright 2020 W. Alex Ronke, a.k.a. NoPunIn10Did (w.alex.ronke@gmail.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 + +#define CUT LCTL(KC_X) +#define COPY LCTL(KC_C) +#define PASTE LCTL(KC_V) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT( +/* Left Block */ + KC_SLCK,KC_PAUS,KC_ESC ,KC_GRV ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_MINS, + KC_PSCR,KC_BSPC, KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC, + KC_CAPS, KC_LCTL,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_PGUP, + CUT , KC_LSFT,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_PGDN, + COPY ,PASTE , KC_LCTL,KC_LGUI,KC_LALT,KC_NUBS,KC_SPC ,KC_DEL , +/* Center Block */ + KC_F1 ,KC_F5 ,KC_F9 , + KC_F2 ,KC_F6 ,KC_F10 , + KC_F3 ,KC_F7 ,KC_F11 , + KC_F4 ,KC_F8 ,KC_F12 , +/* Right Block */ + KC_EQL ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_BSPC, KC_INS ,KC_ESC , + KC_RBRC,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS, KC_DEL ,/*ISO*/ + KC_HOME,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN,KC_QUOT, KC_ENT ,KC_ENT , + KC_END ,KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_RSFT, KC_UP , + KC_CALC,KC_SPC ,KC_NUHS,KC_ALGR,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT + ) + +}; diff --git a/keyboards/nopunin10did/railroad/rev0/keymaps/nopunin10did/keymap.c b/keyboards/nopunin10did/railroad/rev0/keymaps/nopunin10did/keymap.c new file mode 100644 index 0000000000..466cd735d1 --- /dev/null +++ b/keyboards/nopunin10did/railroad/rev0/keymaps/nopunin10did/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2020 W. Alex Ronke, a.k.a. NoPunIn10Did (w.alex.ronke@gmail.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 + +#define LSHFDEL LSFT_T(KC_DEL) +#define LSACALC LSA_T(KC_CALC) +#define RALTHOM RALT_T(KC_HOME) +#define RCTLEND RCTL_T(KC_END) +#define CUT LCTL(KC_X) +#define COPY LCTL(KC_C) +#define PASTE LCTL(KC_V) +#define CTLCAPS RCTL_T(KC_CAPS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT( +/* Left Block */ + KC_ESC ,KC_PAUS,KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + KC_SLCK,KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_6, + CTLCAPS, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_PGUP, + CUT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGDN, + COPY, PASTE, KC_LCTL, KC_LGUI, KC_LALT, KC_GRV, KC_SPC, LSHFDEL, +/* Center Block */ + KC_F1, KC_F5, KC_F9, + KC_F2, KC_F6, KC_F10, + KC_F3, KC_F7, KC_F11, + KC_F4, KC_F8, KC_F12, +/* Right Block */ + KC_EQL, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_BSPC, KC_INS, KC_PSCR, + KC_EQL ,KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT , KC_DEL, /* ISO */ + KC_LBRC,KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, KC_ENT, + KC_RBRC,KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, + LSACALC, KC_NUBS, KC_NUHS, RALTHOM, RCTLEND, KC_LEFT,KC_DOWN,KC_RGHT + ) + +}; diff --git a/keyboards/nopunin10did/railroad/rev0/railroad.c b/keyboards/nopunin10did/railroad/rev0/railroad.c new file mode 100644 index 0000000000..7a0aff3d13 --- /dev/null +++ b/keyboards/nopunin10did/railroad/rev0/railroad.c @@ -0,0 +1,17 @@ +/* Copyright 2020 W. Alex Ronke, a.k.a. NoPunIn10Did (w.alex.ronke@gmail.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 "railroad.h" diff --git a/keyboards/nopunin10did/railroad/rev0/railroad.h b/keyboards/nopunin10did/railroad/rev0/railroad.h new file mode 100644 index 0000000000..44610cfb59 --- /dev/null +++ b/keyboards/nopunin10did/railroad/rev0/railroad.h @@ -0,0 +1,53 @@ +/* Copyright 2020 W. Alex Ronke, a.k.a. NoPunIn10Did (w.alex.ronke@gmail.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 + +#include "quantum.h" + +#define LAYOUT( \ +\ + K0000, K0500, K0100, K0001, K0101, K0002, K0102, K0003, K0103, K0004, \ + K0200, K0300, K0201, K0301, K0202, K0302, K0203, K0303, K0204, \ + K0400, K0401, K0501, K0402, K0502, K0403, K0503, K0404, \ + K0600, K0601, K0701, K0602, K0702, K0603, K0703, K0604, \ + K0800, K0900, K0801, K0901, K0802, K0902, K0903, K0904,\ +\ + K0104, K0005, K0105, \ + K0304, K0205, K0305, \ + K0504, K0405, K0505, \ + K0704, K0605, K0705, \ +\ + K0006, K0106, K0007, K0107, K0008, K0108, K0009, K0109, K0010, \ + K0206, K0306, K0207, K0307, K0208, K0308, K0209, K0309, \ + K0406, K0506, K0407, K0507, K0408, K0508, K0409, K0509, K0410, \ + K0606, K0706, K0607, K0707, K0608, K0708, K0609, K0709, \ + K0905, K0906, K0907, K0808, K0908, K0809, K0909, K0810 \ +) \ +{ \ + { K0000, K0001, K0002, K0003, K0004, K0005, K0006, K0007, K0008, K0009, K0010 }, \ + { K0100, K0101, K0102, K0103, K0104, K0105, K0106, K0107, K0108, K0109, KC_NO }, \ + { K0200, K0201, K0202, K0203, K0204, K0205, K0206, K0207, K0208, K0209, KC_NO }, \ + { K0300, K0301, K0302, K0303, K0304, K0305, K0306, K0307, K0308, K0309, KC_NO }, \ + { K0400, K0401, K0402, K0403, K0404, K0405, K0406, K0407, K0408, K0409, K0410 }, \ + { K0500, K0501, K0502, K0503, K0504, K0505, K0506, K0507, K0508, K0509, KC_NO }, \ + { K0600, K0601, K0602, K0603, K0604, K0605, K0606, K0607, K0608, K0609, KC_NO }, \ + { KC_NO, K0701, K0702, K0703, K0704, K0705, K0706, K0707, K0708, K0709, KC_NO }, \ + { K0800, K0801, K0802, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K0808, K0809, K0810 }, \ + { K0900, K0901, K0902, K0903, K0904, K0905, K0906, K0907, K0908, K0909, KC_NO } \ +} + + diff --git a/keyboards/nopunin10did/railroad/rules.mk b/keyboards/nopunin10did/railroad/rules.mk new file mode 100644 index 0000000000..a7facc5328 --- /dev/null +++ b/keyboards/nopunin10did/railroad/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From c731432765c17a159fd83f859a148c861769fd35 Mon Sep 17 00:00:00 2001 From: MelGeek <65591833+melgeek001365@users.noreply.github.com> Date: Mon, 2 Nov 2020 02:38:08 +0800 Subject: [PATCH 006/114] [Keyboard] Fix IIC stall bug (#10700) * Add Z70Ultra which is a Hotsawp RGB 65% keyboard * Update keyboards/melgeek/z70ultra/z70ultra.h Co-authored-by: Ryan * Update keyboards/melgeek/z70ultra/keymaps/default/keymap.c Co-authored-by: Ryan * Update keyboards/melgeek/z70ultra/keymaps/via/keymap.c Co-authored-by: Ryan * Update keyboards/melgeek/z70ultra/z70ultra.c Co-authored-by: Ryan * Update keyboards/melgeek/z70ultra/readme.md Co-authored-by: Ryan * Update keyboards/melgeek/z70ultra/rev1/rules.mk Co-authored-by: Ryan * Update keyboards/melgeek/z70ultra/z70ultra.c Co-authored-by: Ryan * Update keyboards/melgeek/z70ultra/z70ultra.c Co-authored-by: Ryan * Update keyboards/melgeek/z70ultra/z70ultra.c Co-authored-by: Ryan * Update keyboards/melgeek/z70ultra/z70ultra.h Co-authored-by: Ryan * Update readme.md * Update info.json update the name of layout to consistent the keyboard. * Update keyboards/melgeek/z70ultra/z70ultra.c Co-authored-by: Ryan * Update keyboards/melgeek/z70ultra/z70ultra.c Co-authored-by: Ryan * Update keyboards/melgeek/z70ultra/info.json Co-authored-by: Ryan * Update keyboards/melgeek/z70ultra/keymaps/default/keymap.c Co-authored-by: Ryan * Update keyboards/melgeek/z70ultra/keymaps/via/keymap.c Co-authored-by: Ryan * Add Z70Ultra * Support Z70Ultra [Modified] info.json to support two different layouts [Add] rules.mk to support default folder * Update keyboards/melgeek/z70ultra/rev1/rules.mk Co-authored-by: Ryan * Update keyboards/melgeek/z70ultra/config.h Co-authored-by: Ryan * remove excessive arguments from LAYOUT_split_space * Update keyboards/melgeek/z70ultra/info.json Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/melgeek/z70ultra/info.json Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/melgeek/z70ultra/keymaps/default/keymap.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/melgeek/z70ultra/z70ultra.h Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/melgeek/z70ultra/z70ultra.h Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/melgeek/z70ultra/keymaps/via/keymap.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/melgeek/z70ultra/keymaps/default/keymap.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/melgeek/z70ultra/rev1/rules.mk Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/melgeek/z70ultra/keymaps/via/keymap.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/melgeek/z70ultra/keymaps/default/keymap.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/melgeek/z70ultra/keymaps/via/keymap.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/melgeek/z70ultra/keymaps/via/keymap.c Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Use macro replace with the literal for CS & SW * Update keyboards/melgeek/z70ultra/z70ultra.c Co-authored-by: Drashna Jaelre * [Keyboard] Support MJ61 which is a 60% ANSI STD Hotswap RGB keyboard * Update keyboards/melgeek/mj61/mj61.c Co-authored-by: Drashna Jaelre * Update keyboards/melgeek/mj61/mj61.c Co-authored-by: Drashna Jaelre * [Keyboard] MJ61 Add license header for files and the link for readme * Update keyboards/melgeek/mj61/readme.md Co-authored-by: Ryan * Update keyboards/melgeek/mj61/rev1/config.h Co-authored-by: Ryan * Update keyboards/melgeek/mj61/rev1/rules.mk Co-authored-by: Ryan * Update keyboards/melgeek/mj61/mj61.c Co-authored-by: Ryan * Update keyboards/melgeek/mj61/mj61.c Co-authored-by: Ryan * Add GPL for files * Update keymaps/default/keymap.c * Update keymaps/via/keymap.c * Update keyboards/melgeek/z70ultra/z70ultra.c Co-authored-by: Drashna Jaelre * Update keyboards/melgeek/z70ultra/z70ultra.c Co-authored-by: Drashna Jaelre * [Fixed] remove this code cause it's useless. Co-authored-by: Ryan Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Drashna Jaelre --- keyboards/melgeek/z70ultra/z70ultra.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/keyboards/melgeek/z70ultra/z70ultra.c b/keyboards/melgeek/z70ultra/z70ultra.c index a98edd9390..740720681a 100644 --- a/keyboards/melgeek/z70ultra/z70ultra.c +++ b/keyboards/melgeek/z70ultra/z70ultra.c @@ -151,9 +151,6 @@ bool led_update_kb(led_t led_state) { IS31FL3741_set_pwm_buffer(&g_is31_indicator_leds[0], 0x00, 0x00, 0x00); IS31FL3741_set_pwm_buffer(&g_is31_indicator_leds[5], 0x00, 0x00, 0x00); } - - // flush the indicator to the buffer - IS31FL3741_update_pwm_buffers(DRIVER_ADDR_1, DRIVER_ADDR_1); } return true; } From 9f0dbc21a3bcb815877e321c974c55c5320605c6 Mon Sep 17 00:00:00 2001 From: Seth Date: Sun, 1 Nov 2020 12:46:00 -0600 Subject: [PATCH 007/114] [Keyboard] beta support for the Rocketboard-16 macro/num pad (#10688) * Firmware initial commit, still has a few bugs - mainly rotary encoders do not work and needs cleaning up * Fixed the volume control issue and limited the RGB brightness (can be really bright), added the ability to switch LED mode with left encoder click, and added via support (untested) * Remove define that should go in config.h * Removed define that should be in config.h * Removed LTO_ENABLE as suggested - has issues on ARM Co-authored-by: Drashna Jaelre * Added the correct define for OLED screen size * Applied suggested change to remove description Co-authored-by: Ryan * Made suggested change to remove backslashes Co-authored-by: Ryan * Suggested change made to rgblight Co-authored-by: Ryan * Suggested change made to rgblight Co-authored-by: Ryan * Suggested change made to remove backslashes Co-authored-by: Ryan * Suggested change made to rgblight Co-authored-by: Ryan * Update keyboards/rocketboard_16/rocketboard_16.c Co-authored-by: Ryan * Added suggested comments Co-authored-by: Ryan * Made suggested changes to rules file Co-authored-by: Ryan * Added suggested change to rgblight Co-authored-by: Ryan * Added info.json for QMK configurator * Update readme.md * This change makes the firmware work... through magic... seriously, no idea - but it works! * Updated dimming step, OLED functionality, and rules for formatting - Changed the dimming step size for smoother dimming with the reduced range - Added lots of OLED functionality - QMK logo and title at top, num/caps/scroll lock status, and backlight brightness level - Updated the rules.mk file to comply more closely with the formatting guidelines * Fixed tab issues Co-authored-by: Ryan * Updated to use bootmagic lite with the key that usually turns rgb on/off Co-authored-by: Drashna Jaelre Co-authored-by: Ryan --- keyboards/rocketboard_16/chconf.h | 714 ++++++++++++++++++ keyboards/rocketboard_16/config.h | 83 ++ keyboards/rocketboard_16/halconf.h | 525 +++++++++++++ keyboards/rocketboard_16/info.json | 35 + .../rocketboard_16/keymaps/default/keymap.c | 89 +++ keyboards/rocketboard_16/keymaps/via/keymap.c | 89 +++ keyboards/rocketboard_16/keymaps/via/rules.mk | 1 + keyboards/rocketboard_16/mcuconf.h | 209 +++++ keyboards/rocketboard_16/readme.md | 13 + keyboards/rocketboard_16/rocketboard_16.c | 1 + keyboards/rocketboard_16/rocketboard_16.h | 19 + keyboards/rocketboard_16/rules.mk | 27 + 12 files changed, 1805 insertions(+) create mode 100644 keyboards/rocketboard_16/chconf.h create mode 100644 keyboards/rocketboard_16/config.h create mode 100644 keyboards/rocketboard_16/halconf.h create mode 100644 keyboards/rocketboard_16/info.json create mode 100644 keyboards/rocketboard_16/keymaps/default/keymap.c create mode 100644 keyboards/rocketboard_16/keymaps/via/keymap.c create mode 100644 keyboards/rocketboard_16/keymaps/via/rules.mk create mode 100644 keyboards/rocketboard_16/mcuconf.h create mode 100644 keyboards/rocketboard_16/readme.md create mode 100644 keyboards/rocketboard_16/rocketboard_16.c create mode 100644 keyboards/rocketboard_16/rocketboard_16.h create mode 100644 keyboards/rocketboard_16/rules.mk diff --git a/keyboards/rocketboard_16/chconf.h b/keyboards/rocketboard_16/chconf.h new file mode 100644 index 0000000000..f5e471640c --- /dev/null +++ b/keyboards/rocketboard_16/chconf.h @@ -0,0 +1,714 @@ +/* + ChibiOS - Copyright (C) 2006..2018 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 rt/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_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_ST_RESOLUTION) +#define CH_CFG_ST_RESOLUTION 32 +#endif + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#if !defined(CH_CFG_ST_FREQUENCY) +#define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 0 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MUTEXES) +#define CH_CFG_USE_MUTEXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_EVENTS) +#define CH_CFG_USE_EVENTS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMPOOLS) +#define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_DYNAMIC) +#define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_MASK) +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) +#define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @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 _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/rocketboard_16/config.h b/keyboards/rocketboard_16/config.h new file mode 100644 index 0000000000..a82514e0b4 --- /dev/null +++ b/keyboards/rocketboard_16/config.h @@ -0,0 +1,83 @@ +/* +Copyright 2020 Seth Bonner + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 0xB034 +#define PRODUCT_ID 0xFF16 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Rocketboard +#define PRODUCT Rocketboard-16 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +#define MATRIX_ROW_PINS { A9, B13, B14, B15, B3 } +#define MATRIX_COL_PINS { B8, B9, B10, B11 } +#define DIODE_DIRECTION COL2ROW + +/* Bootmagic key - row 4, col 1 */ +#define BOOTMAGIC_LITE_ROW 4 +#define BOOTMAGIC_LITE_COLUMN 1 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +#define RGBLIGHT_ANIMATIONS +#define RGB_DI_PIN A4 +#define RGBLED_NUM 16 +#define RGBLIGHT_LIMIT_VAL 128 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_SLEEP + +// OLED stuff +#define OLED_DISPLAY_128X64 + +// Allows for rotary encoder volume control +#define TAP_CODE_DELAY 20 + +/* Encoder stuff */ +#define ENCODERS_PAD_A \ + { A0, A2 } +#define ENCODERS_PAD_B \ + { A1, A3 } + +#define LOCKING_SUPPORT_ENABLE +#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/rocketboard_16/halconf.h b/keyboards/rocketboard_16/halconf.h new file mode 100644 index 0000000000..7347a42536 --- /dev/null +++ b/keyboards/rocketboard_16/halconf.h @@ -0,0 +1,525 @@ +/* + ChibiOS - Copyright (C) 2006..2018 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 + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC 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 TRUE +#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 SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG 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 + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT 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 + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION 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 the zero-copy API. + */ +#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 + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#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 circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR 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 TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#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 + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/keyboards/rocketboard_16/info.json b/keyboards/rocketboard_16/info.json new file mode 100644 index 0000000000..3530a4b716 --- /dev/null +++ b/keyboards/rocketboard_16/info.json @@ -0,0 +1,35 @@ +{ + "keyboard_name": "Rocketboard-16", + "url": "", + "maintainer": "fl3tching101", + "width": 4, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0, "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/rocketboard_16/keymaps/default/keymap.c b/keyboards/rocketboard_16/keymaps/default/keymap.c new file mode 100644 index 0000000000..b014e50393 --- /dev/null +++ b/keyboards/rocketboard_16/keymaps/default/keymap.c @@ -0,0 +1,89 @@ +/* +Copyright 2020 Seth Bonner +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 + +// Use the following format to create custom key codes to make macros out of and such +/* +enum custom_keycodes { + FOO = SAFE_RANGE, +}; +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_default( + RGB_MODE_FORWARD, KC_NUMLOCK, + KC_KP_7, KC_KP_8, KC_KP_9, KC_DELETE, + KC_KP_4, KC_KP_5, KC_KP_6, KC_END, + KC_KP_1, KC_KP_2, KC_KP_3, KC_AUDIO_VOL_UP, + KC_KP_0, RGB_TOG, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise){ + if(index == 0) { // first encoder + if(clockwise){ + tap_code(KC_AUDIO_VOL_UP); + }else{ + tap_code(KC_AUDIO_VOL_DOWN); + } + }else if(index == 1){ // second encoder + if(clockwise){ + rgblight_increase_val(); + }else{ + rgblight_decrease_val(); + } + } +} + +#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, 0x00 + }; + + oled_write(qmk_logo, false); +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } + +void oled_task_user(void) { + uint8_t light_level = rgblight_get_val(); + light_level = (uint8_t)(100.0 * ((float)light_level/(float)RGBLIGHT_LIMIT_VAL)); // Convert to % + char c_light_level[3]; + itoa(light_level, c_light_level, 10); + + render_logo(); // Render the QMK logo + oled_write_ln(PSTR(""), false); // Add a newline + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write(led_state.num_lock ? PSTR(" |NUM|") : PSTR(" | |"), false); + oled_write(led_state.caps_lock ? PSTR("|CAP|") : PSTR("| |"), false); + oled_write(led_state.scroll_lock ? PSTR("|SCR| ") : PSTR("| | "), false); + + oled_write_ln(PSTR(""), false); // Add a newline + oled_write(PSTR(" BKLT: "), false); + oled_write(c_light_level, false); + oled_write_ln(PSTR("% "), false); +} +#endif diff --git a/keyboards/rocketboard_16/keymaps/via/keymap.c b/keyboards/rocketboard_16/keymaps/via/keymap.c new file mode 100644 index 0000000000..b014e50393 --- /dev/null +++ b/keyboards/rocketboard_16/keymaps/via/keymap.c @@ -0,0 +1,89 @@ +/* +Copyright 2020 Seth Bonner +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 + +// Use the following format to create custom key codes to make macros out of and such +/* +enum custom_keycodes { + FOO = SAFE_RANGE, +}; +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_default( + RGB_MODE_FORWARD, KC_NUMLOCK, + KC_KP_7, KC_KP_8, KC_KP_9, KC_DELETE, + KC_KP_4, KC_KP_5, KC_KP_6, KC_END, + KC_KP_1, KC_KP_2, KC_KP_3, KC_AUDIO_VOL_UP, + KC_KP_0, RGB_TOG, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise){ + if(index == 0) { // first encoder + if(clockwise){ + tap_code(KC_AUDIO_VOL_UP); + }else{ + tap_code(KC_AUDIO_VOL_DOWN); + } + }else if(index == 1){ // second encoder + if(clockwise){ + rgblight_increase_val(); + }else{ + rgblight_decrease_val(); + } + } +} + +#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, 0x00 + }; + + oled_write(qmk_logo, false); +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } + +void oled_task_user(void) { + uint8_t light_level = rgblight_get_val(); + light_level = (uint8_t)(100.0 * ((float)light_level/(float)RGBLIGHT_LIMIT_VAL)); // Convert to % + char c_light_level[3]; + itoa(light_level, c_light_level, 10); + + render_logo(); // Render the QMK logo + oled_write_ln(PSTR(""), false); // Add a newline + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write(led_state.num_lock ? PSTR(" |NUM|") : PSTR(" | |"), false); + oled_write(led_state.caps_lock ? PSTR("|CAP|") : PSTR("| |"), false); + oled_write(led_state.scroll_lock ? PSTR("|SCR| ") : PSTR("| | "), false); + + oled_write_ln(PSTR(""), false); // Add a newline + oled_write(PSTR(" BKLT: "), false); + oled_write(c_light_level, false); + oled_write_ln(PSTR("% "), false); +} +#endif diff --git a/keyboards/rocketboard_16/keymaps/via/rules.mk b/keyboards/rocketboard_16/keymaps/via/rules.mk new file mode 100644 index 0000000000..45fa68954c --- /dev/null +++ b/keyboards/rocketboard_16/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/rocketboard_16/mcuconf.h b/keyboards/rocketboard_16/mcuconf.h new file mode 100644 index 0000000000..999f345128 --- /dev/null +++ b/keyboards/rocketboard_16/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 TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED TRUE +#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 TRUE +#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 TRUE +#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 TRUE +#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 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/rocketboard_16/readme.md b/keyboards/rocketboard_16/readme.md new file mode 100644 index 0000000000..878c2b5caf --- /dev/null +++ b/keyboards/rocketboard_16/readme.md @@ -0,0 +1,13 @@ +# Rocketboard 16 + +A STM32F103 based macropad/numpad with RGB individual key underglow, dual rotary encoders, and a 128x64 OLED display. [More info on qmk.fm](http://qmk.fm/) + +* Keyboard Maintainer: [fl3tching101](https://github.com/fl3tching101) +* Hardware Supported: Rocketboard 16 PCB rev1.1 +* Hardware Availability: Group buy on r/mechmarket + +Make example for this keyboard (after setting up your build environment): + + make rocketboard_16: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/rocketboard_16/rocketboard_16.c b/keyboards/rocketboard_16/rocketboard_16.c new file mode 100644 index 0000000000..a2710083df --- /dev/null +++ b/keyboards/rocketboard_16/rocketboard_16.c @@ -0,0 +1 @@ +#include "rocketboard_16.h" diff --git a/keyboards/rocketboard_16/rocketboard_16.h b/keyboards/rocketboard_16/rocketboard_16.h new file mode 100644 index 0000000000..87965906a4 --- /dev/null +++ b/keyboards/rocketboard_16/rocketboard_16.h @@ -0,0 +1,19 @@ +#pragma once + +#include "quantum.h" + +#define KNO KC_NO + +#define LAYOUT_default( \ + K00, K01, \ + K02, K03, K04, K05, \ + K06, K07, K08, K09, \ + K0A, K0B, K0C, K0D, \ + K0E, K0F, K10, K11 \ +) { \ + { K00, KC_NO, KC_NO, K01 }, \ + { K02, K03, K04, K05 }, \ + { K06, K07, K08, K09 }, \ + { K0A, K0B, K0C, K0D }, \ + { K0E, K0F, K10, K11 } \ +} diff --git a/keyboards/rocketboard_16/rules.mk b/keyboards/rocketboard_16/rules.mk new file mode 100644 index 0000000000..eedbc33d98 --- /dev/null +++ b/keyboards/rocketboard_16/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = STM32F103 + +# Bootloader selection +BOOTLOADER = stm32duino + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB backlit keys +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +OLED_DRIVER_ENABLE = yes +ENCODER_ENABLE = yes + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE From fed9c97ddbd714c3a6981cfeb4534f286b969079 Mon Sep 17 00:00:00 2001 From: Xyverz Date: Sun, 1 Nov 2020 10:50:12 -0800 Subject: [PATCH 008/114] [Keymap] Added layout for my Keyboardio Atreus (#10726) * Adding Evan Travers' Keyboardio Atreus branch. Initial commit of my KeyboardIO Atreus layout. This is a direct copy of my default Atreus layout, with blank spaces for the two additional keys. * Added MACLOCK macro to keymap.c * Updates to Keyboardio Atreus keymap and readme. * Adding arrows to bottom row of RAISE and LOWER layers * bringing the rest of the master branch to my working branch. * Changes to my KeyboardIO Atreus keymap & readme * Changes to keymap. * Adding Evan Travers' Keyboardio Atreus branch. Initial commit of my KeyboardIO Atreus layout. This is a direct copy of my default Atreus layout, with blank spaces for the two additional keys. * Added MACLOCK macro to keymap.c * Updates to Keyboardio Atreus keymap and readme. * Adding arrows to bottom row of RAISE and LOWER layers * bringing the rest of the master branch to my working branch. * Changes to my KeyboardIO Atreus keymap & readme * Changes to keymap. * Added GPL2+ compatible license header. Co-authored-by: Ian Sterling <503326@MC02YT9K9LVCF.tld> --- .../keyboardio/atreus/keymaps/xyverz/keymap.c | 207 ++++++++++++++++++ .../atreus/keymaps/xyverz/readme.md | 105 +++++++++ 2 files changed, 312 insertions(+) create mode 100644 keyboards/keyboardio/atreus/keymaps/xyverz/keymap.c create mode 100644 keyboards/keyboardio/atreus/keymaps/xyverz/readme.md diff --git a/keyboards/keyboardio/atreus/keymaps/xyverz/keymap.c b/keyboards/keyboardio/atreus/keymaps/xyverz/keymap.c new file mode 100644 index 0000000000..2bd30bc586 --- /dev/null +++ b/keyboards/keyboardio/atreus/keymaps/xyverz/keymap.c @@ -0,0 +1,207 @@ + /* Copyright 2020 Ian Sterling + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 is the personal keymap of Ian Sterling (@xyverz). It is based on the keymap by +// Chris Gerber (@gerbercj), with the addition of persistent layers like the Planck and +// Preonic keyboards by Jack Humbert. + +#include QMK_KEYBOARD_H + +// Initial keymap for Xyverz's Keyboardio Atreus + +enum layer_names { + _DVORAK, + _QWERTY, + _COLEMAK, + _DVORMAC, + _LOWER, + _RAISE, + _ADJUST +}; + +enum planck_keycodes { + DVORAK = SAFE_RANGE, + QWERTY, + COLEMAK, + DVORMAC, + LOWER, + RAISE, + ADJUST +}; + +// Adding macros to make the keymaps below much easier to read. +#define SFTSCLN SFT_T(KC_SCLN) +#define SFTSLSH SFT_T(KC_SLSH) +#define SFTZED SFT_T(KC_Z) +#define ALTENT ALT_T(KC_ENT) +#define ESCTRL CTL_T(KC_ESC) +#define TABALT ALT_T(KC_TAB) +#define DELGUI GUI_T(KC_DEL) +#define DELCTL CTL_T(KC_DEL) +#define MACLOCK LGUI(LCTL(KC_Q)) +#define ADJUST MO(_ADJUST) +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Dvorak Layer + ,----------------------------------. ,----------------------------------. + | ' | , | . | P | Y | | F | G | C | R | L | + |------+------+------+------+------| |------+------+------+------+------| + | A | O | E | U | I | | D | H | T | N | S | + |------+------+------+------+------+------.,------+------+------+------+------+------| + |SFT/ ;| Q | J | K | X | Home || End | B | M | W | V |SFT/ Z| + |------+------+------+------+------+------||------+------+------+------+------+------| + | Esc | Tab | GUI | LOWER| BkSp |DELCTL||ALTENT| Spc | RAISE| - | / | \ | + `-----------------------------------------'`-----------------------------------------' */ + [_DVORAK] = LAYOUT( + KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L , + KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S , + SFTSCLN, KC_Q, KC_J, KC_K, KC_X, KC_HOME, KC_END, KC_B, KC_M, KC_W, KC_V, SFTZED , + ESCTRL, TABALT, KC_LGUI, LOWER, KC_BSPC, DELCTL, ALTENT, KC_SPC, RAISE, KC_MINS, KC_SLSH, KC_BSLS + ), + + /* QWERTY Layer + ,----------------------------------. ,----------------------------------. + | Q | W | E | R | T | | Y | U | I | O | P | + |------+------+------+------+------| |------+------+------+------+------| + | A | S | D | F | G | | H | J | K | L | ; | + |------+------+------+------+------+------.,------+------+------+------+------+------| + |SFT/ Z| X | C | V | B | Home || End | N | M | , | . |SFT/ /| + |------+------+------+------+------+------||------+------+------+------+------+------| + | Esc | Tab | GUI | LOWER| BkSp | LCTL ||ALTENT| Spc | RAISE| - | ' | \ | + `-----------------------------------------'`-----------------------------------------' */ + [_QWERTY] = 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, + SFTZED, KC_X, KC_C, KC_V, KC_B, KC_HOME, KC_END, KC_N, KC_M, KC_COMM, KC_DOT, SFTSLSH, + ESCTRL, TABALT, KC_LGUI, LOWER, KC_BSPC, KC_LCTL, ALTENT, KC_SPC, RAISE, KC_MINS, KC_QUOT, KC_BSLS + ), + + /* Colemak Layer + ,----------------------------------. ,----------------------------------. + | Q | W | F | P | G | | J | L | U | Y | L | + |------+------+------+------+------| |------+------+------+------+------| + | A | R | S | T | D | | H | N | E | I | S | + |------+------+------+------+------+------.,------+------+------+------+------+------| + |SFT/ Z| X | C | V | B | Home || End | K | M | , | . |SFT/ /| + |------+------+------+------+------+------||------+------+------+------+------+------| + | Esc | Tab | GUI | LOWER| BkSp | LCTL ||ALTENT| Spc | RAISE| - | ' | \ | + `-----------------------------------------'`-----------------------------------------'*/ + [_COLEMAK] = LAYOUT( + KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, + KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O , + SFTZED, KC_X, KC_C, KC_V, KC_B, KC_HOME, KC_END, KC_K, KC_M, KC_COMM, KC_DOT, SFTSLSH, + ESCTRL, TABALT, KC_LGUI, LOWER, KC_BSPC, KC_LCTL, ALTENT, KC_SPC, RAISE, KC_MINS, KC_QUOT, KC_BSLS + ), + + /* Dvorak Layer with Command key on left thumb instead of Control + ,----------------------------------. ,----------------------------------. + | ' | , | . | P | Y | | F | G | C | R | L | + |------+------+------+------+------| |------+------+------+------+------| + | A | O | E | U | I | | D | H | T | N | S | + |------+------+------+------+------+------.,------+------+------+------+------+------| + |SFT/ ;| Q | J | K | X | Home || End | B | M | W | V |SFT/ Z| + |------+------+------+------+------+------||------+------+------+------+------+------| + | Esc | Tab | GUI | LOWER| BkSp | LGUI ||ALTENT| Spc | RAISE| - | / | \ | + `-----------------------------------------'`-----------------------------------------' */ + [_DVORMAC] = LAYOUT( + KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L , + KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S , + SFTSCLN, KC_Q, KC_J, KC_K, KC_X, KC_HOME, KC_END, KC_B, KC_M, KC_W, KC_V, SFTZED , + ESCTRL, TABALT, KC_LGUI, LOWER, KC_BSPC, DELGUI, ALTENT, KC_SPC, RAISE, KC_MINS, KC_SLSH, KC_BSLS + ), + + /* LOWER Layer + ,----------------------------------. ,----------------------------------. + | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + |------+------+------+------+------| |------+------+------+------+------| + | CAPS | | UP | | Home | | PgDn | | + | { | } | + |------+------+------+------+------+------.,------+------+------+------+------+------| + | | Left | Down | Right| End | || | PgUp | Mute | Vol- | Vol+ | | + |------+------+------+------+------+------||------+------+------+------+------+------| + | ~ | | | | Del | || | Ins | | | | | + `-----------------------------------------'`-----------------------------------------'*/ + [_LOWER] = LAYOUT( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + KC_CAPS, _______, KC_UP, _______, KC_HOME, KC_PGUP, _______, KC_PLUS, KC_LCBR, KC_RCBR, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______, _______, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, _______, + KC_TILD, KC_LEFT, KC_RGHT, _______, KC_DEL, _______, _______, KC_INS, _______, KC_UP, KC_DOWN, _______ + ), + + /* RAISE Layer + ,----------------------------------. ,----------------------------------. + | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | + |------+------+------+------+------| |------+------+------+------+------| + | CAPS | | UP | | Home | | PgDn | | = | [ | ] | + |------+------+------+------+------+------.,------+------+------+------+------+------| + | | Left | Down | Right| End |MacLck|| | PgUp | Prev | Play | Next | | + |------+------+------+------+------+------||------+------+------+------+------+------| + | ` | | | | Del | || | Ins | | | | | + `-----------------------------------------'`-----------------------------------------'*/ + [_RAISE] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 , + KC_CAPS, _______, KC_UP, _______, KC_HOME, KC_PGUP, _______, KC_EQL, KC_LBRC, KC_RBRC, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, MACLOCK, _______, KC_PGDN, KC_MPRV, KC_MPLY, KC_MNXT, _______, + KC_GRV, KC_LEFT, KC_RGHT, _______, KC_DEL, _______, _______, KC_INS, _______, KC_UP, KC_DOWN, _______ + ), + + /* ADJUST Layer + ,----------------------------------. ,----------------------------------. + | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | + |------+------+------+------+------| |------+------+------+------+------| + | F11 | | | | | | | PrSc | ScLk | Paus | F12 | + |------+------+------+------+------+------.,------+------+------+------+------+------| + | |QWERTY|COLEMK|DVORAK|DVORMC| || | | | | | | + |------+------+------+------+------+------||------+------+------+------+------+------| + | | | | | | || | | | | | RESET| + `-----------------------------------------'`-----------------------------------------'*/ + [_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_PSCR, KC_SLCK, KC_PAUS, KC_F12 , + _______, QWERTY, COLEMAK, DVORAK, DVORMAC, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET + ), +}; + +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 DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + case DVORMAC: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORMAC); + } + return false; + } + return true; +} \ No newline at end of file diff --git a/keyboards/keyboardio/atreus/keymaps/xyverz/readme.md b/keyboards/keyboardio/atreus/keymaps/xyverz/readme.md new file mode 100644 index 0000000000..f9749bb3bd --- /dev/null +++ b/keyboards/keyboardio/atreus/keymaps/xyverz/readme.md @@ -0,0 +1,105 @@ +# Xyverz's Keyboardio Atreus Keymap + +## About this keymap: + +This is the first iteration of my Keyboardio Atreus keymap. This is entirely based on my original Atreus keymap +with a few changes added to reflect the extra two keys, and a code update to current standards. + +I'm using MOD_TAP quite a bit in this keymap. On all layers, R4 pinky keys use mod-tap and are SHIFT when held +and their normal keys when tapped. In addition, ESC and TAB are also set as Ctrl and ALT respectively when held, +and Enter/ALT on the right thumb key for all alpha layers. + +I've enabled persistent keymaps for Qwerty, Dvorak and Colemak layers, similar to the default Planck layouts. + +Recently added: Documentation, Formatting, and another Dvorak layer that has Command on the left thumb, instead of +Control. + +## Still to do: + + * Enjoy this revision; figure out new things later. + +### Layer 0: Dvorak layer + + ,----------------------------------. ,----------------------------------. + | ' | , | . | P | Y | | F | G | C | R | L | + |------+------+------+------+------| |------+------+------+------+------| + | A | O | E | U | I | | D | H | T | N | S | + |------+------+------+------+------+------.,------+------+------+------+------+------| + |SFT/ ;| Q | J | K | X | Home || End | B | M | W | V |SFT/ Z| + |------+------+------+------+------+------||------+------+------+------+------+------| + | Esc | Tab | GUI | LOWER| BkSp | LCTL ||ALTENT| Spc | RAISE| - | / | \ | + `-----------------------------------------'`-----------------------------------------' + +### Layer 1: QWERTY layer + + ,----------------------------------. ,----------------------------------. + | Q | W | E | R | T | | Y | U | I | O | P | + |------+------+------+------+------| |------+------+------+------+------| + | A | S | D | F | G | | H | J | K | L | ; | + |------+------+------+------+------+------.,------+------+------+------+------+------| + |SFT/ Z| X | C | V | B | Home || End | N | M | , | . |SFT/ /| + |------+------+------+------+------+------||------+------+------+------+------+------| + | Esc | Tab | GUI | LOWER| BkSp | LCTL ||ALTENT| Spc | RAISE| - | ' | \ | + `-----------------------------------------'`-----------------------------------------' + +### Layer 2: Colemak layer + + ,----------------------------------. ,----------------------------------. + | Q | W | F | P | G | | J | L | U | Y | L | + |------+------+------+------+------| |------+------+------+------+------| + | A | R | S | T | D | | H | N | E | I | S | + |------+------+------+------+------+------.,------+------+------+------+------+------| + |SFT/ Z| X | C | V | B | Home || End | K | M | , | . |SFT/ /| + |------+------+------+------+------+------||------+------+------+------+------+------| + | Esc | Tab | GUI | LOWER| BkSp | LCTL ||ALTENT| Spc | RAISE| - | ' | \ | + `-----------------------------------------'`-----------------------------------------' + +### Layer 3: Dvorak for Mac layer + + ,----------------------------------. ,----------------------------------. + | ' | , | . | P | Y | | F | G | C | R | L | + |------+------+------+------+------| |------+------+------+------+------| + | A | O | E | U | I | | D | H | T | N | S | + |------+------+------+------+------+------.,------+------+------+------+------+------| + |SFT/ ;| Q | J | K | X | Home || End | B | M | W | V |SFT/ Z| + |------+------+------+------+------+------||------+------+------+------+------+------| + | Esc | Tab | GUI | LOWER| BkSp | LGUI ||ALTENT| Spc | RAISE| - | / | \ | + `-----------------------------------------'`-----------------------------------------' + +### Layer 4: LOWER layer + + ,----------------------------------. ,----------------------------------. + | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + |------+------+------+------+------| |------+------+------+------+------| + | CAPS | | UP | | Home | | PgDn | | + | { | } | + |------+------+------+------+------+------.,------+------+------+------+------+------| + | | Left | Down | Right| End | || | PgUp | Mute | Vol- | Vol+ | | + |------+------+------+------+------+------||------+------+------+------+------+------| + | ~ | | | | Del | || | Ins | | | | | + `-----------------------------------------'`-----------------------------------------' + + +### Layer 5: RAISE layer + + ,----------------------------------. ,----------------------------------. + | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | + |------+------+------+------+------| |------+------+------+------+------| + | CAPS | | UP | | Home | | PgDn | | = | [ | ] | + |------+------+------+------+------+------.,------+------+------+------+------+------| + | | Left | Down | Right| End |MacLck|| | PgUp | Prev | Play | Next | | + |------+------+------+------+------+------||------+------+------+------+------+------| + | ` | | | | Del | || | Ins | | | | | + `-----------------------------------------'`-----------------------------------------' + +### Layer 6: ADJUST layer + + ,----------------------------------. ,----------------------------------. + | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | + |------+------+------+------+------| |------+------+------+------+------| + | F11 | | | | | | | PrSc | ScLk | Paus | F12 | + |------+------+------+------+------+------.,------+------+------+------+------+------| + | |QWERTY|COLEMK|DVORAK|DVORMC| || | | | | | | + |------+------+------+------+------+------||------+------+------+------+------+------| + | | | | | | || | | | | | RESET| + `-----------------------------------------'`-----------------------------------------' + From 76bc23550857badaa35ae68c62875dd8b1fad0ce Mon Sep 17 00:00:00 2001 From: Keys of Kings Date: Sun, 1 Nov 2020 12:53:17 -0600 Subject: [PATCH 009/114] [Keyboard] Add keysofkings folder and twokey keyboard (#10754) * Add keysofkings folder and twokey keyboard * Update readme.md * Update readme.md * Update config.h * Update config.h * Update keymap.c * Update twokey.c * Update twokey.h * Update keyboards/keysofkings/twokey/config.h Co-authored-by: Ryan * Update keyboards/keysofkings/twokey/readme.md Co-authored-by: Ryan * Update keyboards/keysofkings/twokey/rules.mk Co-authored-by: Ryan * Update keyboards/keysofkings/twokey/rules.mk Co-authored-by: Ryan * Update keyboards/keysofkings/twokey/readme.md Co-authored-by: Ryan * Update info.json * Update keymap.c * Update keyboards/keysofkings/twokey/info.json Co-authored-by: Ryan Co-authored-by: Ryan --- keyboards/keysofkings/twokey/config.h | 68 ++++++++++++++++ keyboards/keysofkings/twokey/info.json | 16 ++++ .../twokey/keymaps/default/keymap.c | 79 +++++++++++++++++++ keyboards/keysofkings/twokey/readme.md | 16 ++++ keyboards/keysofkings/twokey/rules.mk | 23 ++++++ keyboards/keysofkings/twokey/twokey.c | 17 ++++ keyboards/keysofkings/twokey/twokey.h | 28 +++++++ 7 files changed, 247 insertions(+) create mode 100755 keyboards/keysofkings/twokey/config.h create mode 100644 keyboards/keysofkings/twokey/info.json create mode 100644 keyboards/keysofkings/twokey/keymaps/default/keymap.c create mode 100644 keyboards/keysofkings/twokey/readme.md create mode 100755 keyboards/keysofkings/twokey/rules.mk create mode 100755 keyboards/keysofkings/twokey/twokey.c create mode 100755 keyboards/keysofkings/twokey/twokey.h diff --git a/keyboards/keysofkings/twokey/config.h b/keyboards/keysofkings/twokey/config.h new file mode 100755 index 0000000000..d7f4c3cf0a --- /dev/null +++ b/keyboards/keysofkings/twokey/config.h @@ -0,0 +1,68 @@ + /* Copyright 2020 Keys of Kings + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 0xAE12 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Keys of Kings +#define PRODUCT Twokey + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 2 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B4, B5 } +#define MATRIX_COL_PINS { B3, B2 } +#define UNUSED_PINS + + +#define ENCODERS_PAD_A { E6 } +#define ENCODERS_PAD_B { D7 } +#define ENCODER_RESOLUTION 1 +#define ENCODER_DIRECTION_FLIP + +/* 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 + +#ifdef RGBLIGHT_ENABLE +#define RGB_DI_PIN D3 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 5 +#define RGBLIGHT_HUE_STEP 4 +#define RGBLIGHT_SAT_STEP 4 +#define RGBLIGHT_VAL_STEP 4 +#define B6_AUDIO +#define AUDIO_CLICKY +#endif + +#ifdef AUDIO_ENABLE +#define STARTUP_SONG SONG(MAJOR_SOUND) +#endif diff --git a/keyboards/keysofkings/twokey/info.json b/keyboards/keysofkings/twokey/info.json new file mode 100644 index 0000000000..d7dabbc946 --- /dev/null +++ b/keyboards/keysofkings/twokey/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "Twokey", + "url": "", + "maintainer": "Keys of Kings", + "width": 2, + "height": 2.5, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0.5, "y": 0}, + {"x": 0, "y": 1.5}, + {"x": 1, "y": 1.5} + ] + } + } +} diff --git a/keyboards/keysofkings/twokey/keymaps/default/keymap.c b/keyboards/keysofkings/twokey/keymaps/default/keymap.c new file mode 100644 index 0000000000..eaa4f88de5 --- /dev/null +++ b/keyboards/keysofkings/twokey/keymaps/default/keymap.c @@ -0,0 +1,79 @@ + /* Copyright 2020 Keys of Kings + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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( + LT(1, KC_MUTE), + LT(4, KC_MPLY), LT(7, KC_MNXT)), + + LAYOUT( + KC_TRNS, + TO(2), TO(3)), + + LAYOUT( + TO(0), + RGB_TOG, RGB_MOD), + + LAYOUT( + TO(0), + RGB_VAI, RGB_VAD), + + LAYOUT( + TO(0), + RGB_HUI, RGB_HUD), + + LAYOUT( + TO(5), + KC_TRNS, TO(6)), + + LAYOUT( + TO(0), + RGB_SAI, RGB_SAD), + + LAYOUT( + TO(8), + TO(9), KC_TRNS), + + LAYOUT( + TO(0), + CK_TOGG, MU_TOG), + + LAYOUT( + TO(0), + RESET, EEPROM_RESET), +}; + +void matrix_init_user(void) { + debug_config.matrix = 1; + debug_config.keyboard = 1; + debug_config.enable = 1; +} + +void encoder_update_user(int8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLD); + } else { + tap_code(KC_VOLU); + } + # ifdef AUDIO_CLICKY + clockwise ? clicky_freq_up() : clicky_freq_down(); +# endif + } +} + diff --git a/keyboards/keysofkings/twokey/readme.md b/keyboards/keysofkings/twokey/readme.md new file mode 100644 index 0000000000..18394f8f80 --- /dev/null +++ b/keyboards/keysofkings/twokey/readme.md @@ -0,0 +1,16 @@ +# TWOKEY + +![Twokey](https://i.imgur.com/UiLwPldl.jpeg) + +A Two Key mini keyboard with Rotary Encoder/Switch along with Backlight keys, RGB Underglow, and Piezo Buzzer. Supports Cherry, Choc, Matias switches. + +* Keyboard Maintainer: Keys of Kings +* Keyboard Designer: King Icewind +* Hardware Supported: Twokey PCB, Pro Micro +* Hardware Availability: www.keysofkings.com + +Make example for this keyboard (after setting up your build environment): + + make keysofkings/twokey: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/keysofkings/twokey/rules.mk b/keyboards/keysofkings/twokey/rules.mk new file mode 100755 index 0000000000..d892fd2b7b --- /dev/null +++ b/keyboards/keysofkings/twokey/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +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 +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = yes # Audio output +ENCODER_ENABLE = yes diff --git a/keyboards/keysofkings/twokey/twokey.c b/keyboards/keysofkings/twokey/twokey.c new file mode 100755 index 0000000000..1668092bf4 --- /dev/null +++ b/keyboards/keysofkings/twokey/twokey.c @@ -0,0 +1,17 @@ + /* Copyright 2020 Keys of Kings + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "twokey.h" diff --git a/keyboards/keysofkings/twokey/twokey.h b/keyboards/keysofkings/twokey/twokey.h new file mode 100755 index 0000000000..169bc9eb11 --- /dev/null +++ b/keyboards/keysofkings/twokey/twokey.h @@ -0,0 +1,28 @@ + /* Copyright 2020 Keys of Kings + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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, \ + K10, K11 \ +) { \ + { K00, KC_NO }, \ + { K10, K11 } \ +} + From 78019c3e2186910aaf939937aff1e72937d38b6f Mon Sep 17 00:00:00 2001 From: Brandon Claveria <48102030+swiftrax@users.noreply.github.com> Date: Sun, 1 Nov 2020 10:57:30 -0800 Subject: [PATCH 010/114] [Keyboard] add bebol keyboard (#10763) * add bebol keyboard * Change PID * Update keyboards/handwired/swiftrax/bebol/rules.mk Co-authored-by: Drashna Jaelre Co-authored-by: Swiftrax Co-authored-by: Drashna Jaelre --- keyboards/handwired/swiftrax/bebol/bebol.c | 17 +++++++ keyboards/handwired/swiftrax/bebol/bebol.h | 35 +++++++++++++ keyboards/handwired/swiftrax/bebol/config.h | 44 +++++++++++++++++ keyboards/handwired/swiftrax/bebol/info.json | 12 +++++ .../swiftrax/bebol/keymaps/default/keymap.c | 35 +++++++++++++ .../swiftrax/bebol/keymaps/via/keymap.c | 49 +++++++++++++++++++ .../swiftrax/bebol/keymaps/via/rules.mk | 1 + keyboards/handwired/swiftrax/bebol/readme.md | 13 +++++ keyboards/handwired/swiftrax/bebol/rules.mk | 22 +++++++++ 9 files changed, 228 insertions(+) create mode 100644 keyboards/handwired/swiftrax/bebol/bebol.c create mode 100644 keyboards/handwired/swiftrax/bebol/bebol.h create mode 100644 keyboards/handwired/swiftrax/bebol/config.h create mode 100644 keyboards/handwired/swiftrax/bebol/info.json create mode 100644 keyboards/handwired/swiftrax/bebol/keymaps/default/keymap.c create mode 100644 keyboards/handwired/swiftrax/bebol/keymaps/via/keymap.c create mode 100644 keyboards/handwired/swiftrax/bebol/keymaps/via/rules.mk create mode 100644 keyboards/handwired/swiftrax/bebol/readme.md create mode 100644 keyboards/handwired/swiftrax/bebol/rules.mk diff --git a/keyboards/handwired/swiftrax/bebol/bebol.c b/keyboards/handwired/swiftrax/bebol/bebol.c new file mode 100644 index 0000000000..9894f84cb7 --- /dev/null +++ b/keyboards/handwired/swiftrax/bebol/bebol.c @@ -0,0 +1,17 @@ +/* +Copyright 2020 Swiftrax + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 "bebol.h" diff --git a/keyboards/handwired/swiftrax/bebol/bebol.h b/keyboards/handwired/swiftrax/bebol/bebol.h new file mode 100644 index 0000000000..4bd6974c23 --- /dev/null +++ b/keyboards/handwired/swiftrax/bebol/bebol.h @@ -0,0 +1,35 @@ +/* +Copyright 2020 Swiftrax + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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_all( \ + 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, k1f, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2e, k2f, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, k3f, \ + k40, k41, k42, k46, k4a, k4b, k4c, k4d, k4e, k4f \ +) { \ + { 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, XXX, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, XXX, k2e, k2f }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, XXX, k3d, k3e, k3f }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, k4c, k4d, k4e, k4f } \ +} diff --git a/keyboards/handwired/swiftrax/bebol/config.h b/keyboards/handwired/swiftrax/bebol/config.h new file mode 100644 index 0000000000..44345f81f5 --- /dev/null +++ b/keyboards/handwired/swiftrax/bebol/config.h @@ -0,0 +1,44 @@ +/* +Copyright 2020 Swiftrax + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 0x04D8 +#define PRODUCT_ID 0xEAC4 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Swiftrax +#define PRODUCT Bebol +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { B2, B3, F7, F0, B7 } +#define MATRIX_COL_PINS { B1, D2, D3, F1, F4, F5, F6, C7, C6, B6, B5, B4, D7, D6, D4, D5 } + +/* 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 diff --git a/keyboards/handwired/swiftrax/bebol/info.json b/keyboards/handwired/swiftrax/bebol/info.json new file mode 100644 index 0000000000..48e6d8d5d9 --- /dev/null +++ b/keyboards/handwired/swiftrax/bebol/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Bebol", + "url": "https://github.com/swiftrax", + "maintainer": "Swiftrax", + "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}, {"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}, {"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/handwired/swiftrax/bebol/keymaps/default/keymap.c b/keyboards/handwired/swiftrax/bebol/keymaps/default/keymap.c new file mode 100644 index 0000000000..8805ac55af --- /dev/null +++ b/keyboards/handwired/swiftrax/bebol/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* +Copyright 2020 Swiftrax + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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_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_PIPE, 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_PIPE, 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_RSFT, 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(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + +[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, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; diff --git a/keyboards/handwired/swiftrax/bebol/keymaps/via/keymap.c b/keyboards/handwired/swiftrax/bebol/keymaps/via/keymap.c new file mode 100644 index 0000000000..51f730f386 --- /dev/null +++ b/keyboards/handwired/swiftrax/bebol/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* +Copyright 2020 Swiftrax + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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_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_PIPE, 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_PIPE, 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_RSFT, 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(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + +[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, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +[2] = 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, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +[3] = 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, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; diff --git a/keyboards/handwired/swiftrax/bebol/keymaps/via/rules.mk b/keyboards/handwired/swiftrax/bebol/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/handwired/swiftrax/bebol/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/bebol/readme.md b/keyboards/handwired/swiftrax/bebol/readme.md new file mode 100644 index 0000000000..54261899d2 --- /dev/null +++ b/keyboards/handwired/swiftrax/bebol/readme.md @@ -0,0 +1,13 @@ +# Bebol + +A 65% keyboard + +* Keyboard Maintainer: Swiftrax +* Hardware Supported: Bebol +* Hardware Availability: https://github.com/swiftrax + +Make example for this keyboard (after setting up your build environment): + + make handwired/swiftrax/bebol: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/swiftrax/bebol/rules.mk b/keyboards/handwired/swiftrax/bebol/rules.mk new file mode 100644 index 0000000000..5c0d8f307c --- /dev/null +++ b/keyboards/handwired/swiftrax/bebol/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# 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 = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From c1e69bcef060d1e6152dda7866d00912e99fab26 Mon Sep 17 00:00:00 2001 From: Ole Westendorff Date: Sun, 1 Nov 2020 20:09:32 +0100 Subject: [PATCH 011/114] add 65_ansi_split_bs to default community layouts (#10770) * add 65_ansi_split_bs to default community layouts * Update layouts/default/65_ansi_split_bs/layout.json Co-authored-by: Ryan Co-authored-by: Ryan --- .../default_65_ansi_split_bs/keymap.c | 24 ++++++ layouts/default/65_ansi_split_bs/info.json | 86 +++++++++++++++++++ layouts/default/65_ansi_split_bs/layout.json | 5 ++ layouts/default/65_ansi_split_bs/readme.md | 3 + layouts/default/readme.md | 15 ++++ 5 files changed, 133 insertions(+) create mode 100644 layouts/default/65_ansi_split_bs/default_65_ansi_split_bs/keymap.c create mode 100644 layouts/default/65_ansi_split_bs/info.json create mode 100644 layouts/default/65_ansi_split_bs/layout.json create mode 100644 layouts/default/65_ansi_split_bs/readme.md diff --git a/layouts/default/65_ansi_split_bs/default_65_ansi_split_bs/keymap.c b/layouts/default/65_ansi_split_bs/default_65_ansi_split_bs/keymap.c new file mode 100644 index 0000000000..c5a142599e --- /dev/null +++ b/layouts/default/65_ansi_split_bs/default_65_ansi_split_bs/keymap.c @@ -0,0 +1,24 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = |Bsp|Bsp|Hom│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │  \  │PgU│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │  Enter │PgD│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ Shift  │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ ↑ │End│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │Ctrl│GUI │Alt │                        │Alt│GUI│Ctl│ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ + [0] = LAYOUT_65_ansi_split_bs( + 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, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ) +}; diff --git a/layouts/default/65_ansi_split_bs/info.json b/layouts/default/65_ansi_split_bs/info.json new file mode 100644 index 0000000000..565c1aea8d --- /dev/null +++ b/layouts/default/65_ansi_split_bs/info.json @@ -0,0 +1,86 @@ +{ + "keyboard_name": "65% ANSI layout with split Backspace", + "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}, + {"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}, + {"x":11, "y":4}, + {"x":12, "y":4}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + } + } +} diff --git a/layouts/default/65_ansi_split_bs/layout.json b/layouts/default/65_ansi_split_bs/layout.json new file mode 100644 index 0000000000..f6eb1ec42f --- /dev/null +++ b/layouts/default/65_ansi_split_bs/layout.json @@ -0,0 +1,5 @@ +[{a:7},"","","","","","","","","","","","","","","",""], +[{w:1.5},"","","","","","","","","","","","","",{w:1.5},"",""], +[{w:1.75},"","","","","","","","","","","","",{w:2.25},"",""], +[{w:2.25},"","","","","","","","","","","",{w:1.75},"","",""], +[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"","","","","","",""] diff --git a/layouts/default/65_ansi_split_bs/readme.md b/layouts/default/65_ansi_split_bs/readme.md new file mode 100644 index 0000000000..3051b7066a --- /dev/null +++ b/layouts/default/65_ansi_split_bs/readme.md @@ -0,0 +1,3 @@ +# 65_ansi_split_bs + + LAYOUT_65_ansi_split_bs diff --git a/layouts/default/readme.md b/layouts/default/readme.md index 9e1e7cfbbc..d053c8267f 100644 --- a/layouts/default/readme.md +++ b/layouts/default/readme.md @@ -246,6 +246,21 @@ LAYOUT_65_ansi_blocker_tsangan └─────┴───┴─────┴───────────────────────────┴─────┘ └───┴───┴───┘ ``` +``` +LAYOUT_65_ansi_split_bs +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ +``` + ``` LAYOUT_65_iso ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ From 86ac56cd7f4ade5de9d56c7e886c4d6ec531f4de Mon Sep 17 00:00:00 2001 From: KnoblesseOblige <63174954+KnoblesseOblige@users.noreply.github.com> Date: Sun, 1 Nov 2020 13:13:34 -0600 Subject: [PATCH 012/114] [Keyboard] Add keebsforall/freebird60 (#10774) * Added ad/freebird60. * Moved freebird60 keyboard. Added VIA keymap. * Updated `keebsforall/freebird60` README to include image. * Update keyboards/keebsforall/freebird60/readme.md Co-authored-by: Ryan * Update keyboards/keebsforall/freebird60/readme.md Co-authored-by: Ryan Co-authored-by: Ryan --- keyboards/keebsforall/freebird60/config.h | 54 ++++++++++++++++++ keyboards/keebsforall/freebird60/freebird60.c | 17 ++++++ keyboards/keebsforall/freebird60/freebird60.h | 57 +++++++++++++++++++ keyboards/keebsforall/freebird60/info.json | 15 +++++ .../freebird60/keymaps/default/keymap.c | 34 +++++++++++ .../freebird60/keymaps/via/keymap.c | 34 +++++++++++ .../freebird60/keymaps/via/rules.mk | 1 + keyboards/keebsforall/freebird60/readme.md | 19 +++++++ keyboards/keebsforall/freebird60/rules.mk | 22 +++++++ 9 files changed, 253 insertions(+) create mode 100644 keyboards/keebsforall/freebird60/config.h create mode 100644 keyboards/keebsforall/freebird60/freebird60.c create mode 100644 keyboards/keebsforall/freebird60/freebird60.h create mode 100644 keyboards/keebsforall/freebird60/info.json create mode 100644 keyboards/keebsforall/freebird60/keymaps/default/keymap.c create mode 100644 keyboards/keebsforall/freebird60/keymaps/via/keymap.c create mode 100644 keyboards/keebsforall/freebird60/keymaps/via/rules.mk create mode 100644 keyboards/keebsforall/freebird60/readme.md create mode 100644 keyboards/keebsforall/freebird60/rules.mk diff --git a/keyboards/keebsforall/freebird60/config.h b/keyboards/keebsforall/freebird60/config.h new file mode 100644 index 0000000000..81b468bb97 --- /dev/null +++ b/keyboards/keebsforall/freebird60/config.h @@ -0,0 +1,54 @@ +/* +Copyright 2020 KnoblesseOblige + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 0xADAD +#define PRODUCT_ID 0xFB60 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KnoblesseOblige +#define PRODUCT Freebird60 + +/* 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) + * + */ +#define MATRIX_ROW_PINS { F5, F4, F1, F0, F6 } +#define MATRIX_COL_PINS { F7, C7, C6, B6, B5, B4, D7, D6, D4, D0, D1, D2, D3, D5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define DEBOUNCE 5 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/keebsforall/freebird60/freebird60.c b/keyboards/keebsforall/freebird60/freebird60.c new file mode 100644 index 0000000000..abbb209dfd --- /dev/null +++ b/keyboards/keebsforall/freebird60/freebird60.c @@ -0,0 +1,17 @@ +/* Copyright 2020 KnoblesseOblige + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "freebird60.h" diff --git a/keyboards/keebsforall/freebird60/freebird60.h b/keyboards/keebsforall/freebird60/freebird60.h new file mode 100644 index 0000000000..84a9fa3fdb --- /dev/null +++ b/keyboards/keebsforall/freebird60/freebird60.h @@ -0,0 +1,57 @@ +/* Copyright 2020 KnoblesseOblige + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 kxx KC_NO + +/* This is 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, \ + 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, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3c, \ + k40, k41, k42, k45, k49, k4a, k4b, 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, kxx, k2d }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, kxx, k3c, kxx }, \ + { k40, k41, k42, kxx, kxx, k45, kxx, kxx, kxx, k49, k4a, k4b, kxx, k4d } \ +} + +#define LAYOUT_all( \ + 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, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3c, k3d, \ + k40, k41, k42, k45, k49, 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, kxx, k2d }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, kxx, k3c, k3d }, \ + { k40, k41, k42, kxx, kxx, k45, kxx, kxx, kxx, k49, k4a, k4b, k4c, k4d } \ +} diff --git a/keyboards/keebsforall/freebird60/info.json b/keyboards/keebsforall/freebird60/info.json new file mode 100644 index 0000000000..4f01329098 --- /dev/null +++ b/keyboards/keebsforall/freebird60/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "freebird60", + "url": "", + "maintainer": "KnoblesseOblige", + "width": 14, + "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":"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_all": { + "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, "w":1.75}, {"label":"Up", "x":13, "y":3, "w":1}, {"label":"Shift", "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}, {"label":"Ctrl", "x":11, "y":4, "w":1}, {"label":"Left", "x":12, "y":4, "w":1}, {"label":"Down", "x":13, "y":4, "w":1}, {"label":"Right", "x":14, "y":4, "w":1}] + } + } +} diff --git a/keyboards/keebsforall/freebird60/keymaps/default/keymap.c b/keyboards/keebsforall/freebird60/keymaps/default/keymap.c new file mode 100644 index 0000000000..d2540ee9b5 --- /dev/null +++ b/keyboards/keebsforall/freebird60/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2020 KnoblesseOblige + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 */ + [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_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_ENTER, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL + ), + [1] = LAYOUT( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/keebsforall/freebird60/keymaps/via/keymap.c b/keyboards/keebsforall/freebird60/keymaps/via/keymap.c new file mode 100644 index 0000000000..d2540ee9b5 --- /dev/null +++ b/keyboards/keebsforall/freebird60/keymaps/via/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2020 KnoblesseOblige + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 */ + [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_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_ENTER, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL + ), + [1] = LAYOUT( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/keebsforall/freebird60/keymaps/via/rules.mk b/keyboards/keebsforall/freebird60/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/keebsforall/freebird60/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/keebsforall/freebird60/readme.md b/keyboards/keebsforall/freebird60/readme.md new file mode 100644 index 0000000000..aaf2b64a53 --- /dev/null +++ b/keyboards/keebsforall/freebird60/readme.md @@ -0,0 +1,19 @@ +# Freebird60 + +![freebird60](https://i.imgur.com/qGtVVbyl.jpeg) + +A 60% hotswap keyboard with multiple layout compatibility. + +* Keyboard Maintainer: [KnoblesseOblige](https://github.com/KnoblesseOblige) +* Hardware Supported: Freebird60 +* Hardware Availability: TBD + +Make example for this keyboard (after setting up your build environment): + + make keebsforall/freebird60:default + +Flashing example for this keyboard: + + make keebsforall/freebird60:default:flash + +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/keebsforall/freebird60/rules.mk b/keyboards/keebsforall/freebird60/rules.mk new file mode 100644 index 0000000000..5c0d8f307c --- /dev/null +++ b/keyboards/keebsforall/freebird60/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# 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 = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From 780b7722fbb72e86395a729cc06d57492f0f1b38 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sun, 1 Nov 2020 11:50:23 -0800 Subject: [PATCH 013/114] [Keyboard] VIA Support: Exent 65% (#10797) * exent VIA support * minor cleanups * Update keyboards/exent/config.h Co-authored-by: Ryan * Update keyboards/exent/config.h Co-authored-by: Ryan Co-authored-by: Ryan --- keyboards/exent/config.h | 9 ++++---- keyboards/exent/keymaps/via/keymap.c | 33 ++++++++++++++++++++++++++++ keyboards/exent/keymaps/via/rules.mk | 2 ++ 3 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 keyboards/exent/keymaps/via/keymap.c create mode 100644 keyboards/exent/keymaps/via/rules.mk diff --git a/keyboards/exent/config.h b/keyboards/exent/config.h index 86d628c37c..6b37bdd1c8 100644 --- a/keyboards/exent/config.h +++ b/keyboards/exent/config.h @@ -19,12 +19,11 @@ along with this program. If not, see . #include "config_common.h" -#define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422D -#define DEVICE_VER 0x0001 +#define VENDOR_ID 0x5143 // "QC" +#define PRODUCT_ID 0x4558 // "EX" +#define DEVICE_VER 0x0001 #define MANUFACTURER Quadcube -#define PRODUCT Exent -#define DESCRIPTION 65% Keyboard +#define PRODUCT Exent #define RGBLED_NUM 18 diff --git a/keyboards/exent/keymaps/via/keymap.c b/keyboards/exent/keymaps/via/keymap.c new file mode 100644 index 0000000000..7b16375958 --- /dev/null +++ b/keyboards/exent/keymaps/via/keymap.c @@ -0,0 +1,33 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* layer 0: qwerty */ + [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_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, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [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_TRNS, + BL_TOGG, BL_STEP, BL_INC, BL_DEC, RESET, KC_TRNS, KC_TRNS, 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, + KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_65_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/exent/keymaps/via/rules.mk b/keyboards/exent/keymaps/via/rules.mk new file mode 100644 index 0000000000..36b7ba9cbc --- /dev/null +++ b/keyboards/exent/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes From 83eecdce223901fcc52accfc9286943bf734cc25 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Sun, 1 Nov 2020 12:42:50 -0800 Subject: [PATCH 014/114] [Keyboard] nullbitsco/nibble Configurator rework (#10814) * nullbitsco/nibble: rework LAYOUT_all ... and update via keymap accordingly. * compress info.json LAYOUT_all tree Only changes the white space. * rebuild info.json LAYOUT_all tree Note: this commit makes the visual layout the ANSI layout with a split left Shift, instead of being the same as the ISO layout. * unify code styles Make logically-unchanged code blocks similar in appearance to logically-changed blocks. * correct LAYOUT_iso key sequence Move ISO Enter's object to its proper place. --- keyboards/nullbitsco/nibble/info.json | 1329 +++-------------- .../nullbitsco/nibble/keymaps/via/keymap.c | 28 +- keyboards/nullbitsco/nibble/nibble.h | 30 +- 3 files changed, 247 insertions(+), 1140 deletions(-) diff --git a/keyboards/nullbitsco/nibble/info.json b/keyboards/nullbitsco/nibble/info.json index bd97361e7c..fe4bf59fca 100644 --- a/keyboards/nullbitsco/nibble/info.json +++ b/keyboards/nullbitsco/nibble/info.json @@ -6,1125 +6,232 @@ "layouts": { "LAYOUT_all": { "layout": [ - { - "label": "Esc", - "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, - "w": 2 - }, - { - "label": "Home", - "x": 16, - "y": 0 - }, - { - "x": 0, - "y": 1 - }, - { - "label": "Tab", - "x": 1, - "y": 1, - "w": 1.5 - }, - { - "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": "Enter", - "x": 14.75, - "y": 1, - "w": 1.25, - "h": 2 - }, - { - "label": "Delete", - "x": 16, - "y": 1 - }, - { - "x": 0, - "y": 2 - }, - { - "label": "Caps Lock", - "x": 1, - "y": 2, - "w": 1.25 - }, - { - "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": "~", - "x": 13.75, - "y": 2 - }, - { - "label": "Page Up", - "x": 16, - "y": 2 - }, - { - "x": 0, - "y": 3 - }, - { - "label": "Shift", - "x": 1, - "y": 3, - "w": 1.25 - }, - { - "label": "|", - "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", - "x": 13.25, - "y": 3, - "w": 1.75 - }, - { - "label": "\u2191", - "x": 15, - "y": 3 - }, - { - "label": "Page Down", - "x": 16, - "y": 3 - }, - { - "x": 0, - "y": 4 - }, - { - "label": "Ctrl", - "x": 1, - "y": 4, - "w": 1.25 - }, - { - "label": "Win", - "x": 2.25, - "y": 4, - "w": 1.25 - }, - { - "label": "Alt", - "x": 3.5, - "y": 4, - "w": 1.25 - }, - { - "label": "Space", - "x": 4.75, - "y": 4, - "w": 6.25 - }, - { - "label": "Alt", - "x": 11, - "y": 4 - }, - { - "label": "Fn", - "x": 12, - "y": 4 - }, - { - "label": "Ctrl", - "x": 13, - "y": 4 - }, - { - "label": "\u2190", - "x": 14, - "y": 4 - }, - { - "label": "\u2193", - "x": 15, - "y": 4 - }, - { - "label": "\u2192", - "x": 16, - "y": 4 - } + {"label":"Esc", "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, "w":2}, + {"label":"Home", "x":16, "y":0}, + {"label":"ENC", "x":0, "y":1}, + {"label":"Tab", "x":1, "y":1, "w":1.5}, + {"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":"|", "x":14.5, "y":1, "w":1.5}, + {"label":"Delete", "x":16, "y":1}, + {"label":"M1", "x":0, "y":2}, + {"label":"Caps Lock", "x":1, "y":2, "w":1.25}, + {"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", "x":13.75, "y":2, "w":2.25}, + {"label":"PgUp", "x":16, "y":2}, + {"label":"M2", "x":0, "y":3}, + {"label":"Shift", "x":1, "y":3, "w":1.25}, + {"label":"ISO \\", "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", "x":13.25, "y":3, "w":1.75}, + {"label":"\u2191", "x":15, "y":3}, + {"label":"PgDn", "x":16, "y":3}, + {"label":"M3", "x":0, "y":4}, + {"label":"Ctrl", "x":1, "y":4, "w":1.25}, + {"label":"Win", "x":2.25, "y":4, "w":1.25}, + {"label":"Alt", "x":3.5, "y":4, "w":1.25}, + {"label":"Space", "x":4.75, "y":4, "w":6.25}, + {"label":"Fn", "x":11, "y":4}, + {"label":"Alt", "x":12, "y":4}, + {"label":"Ctrl", "x":13, "y":4}, + {"label":"\u2190", "x":14, "y":4}, + {"label":"\u2193", "x":15, "y":4}, + {"label":"\u2192", "x":16, "y":4} ] }, "LAYOUT_ansi": { "layout": [ - { - "label": "Esc", - "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, - "w": 2 - }, - { - "label": "~", - "x": 16, - "y": 0 - }, - { - "x": 0, - "y": 1 - }, - { - "label": "Tab", - "x": 1, - "y": 1, - "w": 1.5 - }, - { - "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": "|", - "x": 14.5, - "y": 1, - "w": 1.5 - }, - { - "label": "Page Up", - "x": 16, - "y": 1 - }, - { - "x": 0, - "y": 2 - }, - { - "label": "Caps Lock", - "x": 1, - "y": 2, - "w": 1.25 - }, - { - "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", - "x": 13.75, - "y": 2, - "w": 2.25 - }, - { - "label": "Page Down", - "x": 16, - "y": 2 - }, - { - "x": 0, - "y": 3 - }, - { - "label": "Shift", - "x": 1, - "y": 3, - "w": 2.25 - }, - { - "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", - "x": 13.25, - "y": 3, - "w": 1.75 - }, - { - "label": "\u2191", - "x": 15, - "y": 3 - }, - { - "label": "End", - "x": 16, - "y": 3 - }, - { - "x": 0, - "y": 4 - }, - { - "label": "Ctrl", - "x": 1, - "y": 4, - "w": 1.25 - }, - { - "label": "Win", - "x": 2.25, - "y": 4, - "w": 1.25 - }, - { - "label": "Alt", - "x": 3.5, - "y": 4, - "w": 1.25 - }, - { - "label": "Space", - "x": 4.75, - "y": 4, - "w": 6.25 - }, - { - "label": "Alt", - "x": 11, - "y": 4 - }, - { - "label": "Fn", - "x": 12, - "y": 4 - }, - { - "label": "Ctrl", - "x": 13, - "y": 4 - }, - { - "label": "\u2190", - "x": 14, - "y": 4 - }, - { - "label": "\u2193", - "x": 15, - "y": 4 - }, - { - "label": "\u2192", - "x": 16, - "y": 4 - } + {"label":"Esc", "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, "w":2}, + {"label":"~", "x":16, "y":0}, + {"x":0, "y":1}, + {"label":"Tab", "x":1, "y":1, "w":1.5}, + {"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":"|", "x":14.5, "y":1, "w":1.5}, + {"label":"Page Up", "x":16, "y":1}, + {"x":0, "y":2}, + {"label":"Caps Lock", "x":1, "y":2, "w":1.25}, + {"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", "x":13.75, "y":2, "w":2.25}, + {"label":"Page Down", "x":16, "y":2}, + {"x":0, "y":3}, + {"label":"Shift", "x":1, "y":3, "w":2.25}, + {"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", "x":13.25, "y":3, "w":1.75}, + {"label":"\u2191", "x":15, "y":3}, + {"label":"End", "x":16, "y":3}, + {"x":0, "y":4}, + {"label":"Ctrl", "x":1, "y":4, "w":1.25}, + {"label":"Win", "x":2.25, "y":4, "w":1.25}, + {"label":"Alt", "x":3.5, "y":4, "w":1.25}, + {"label":"Space", "x":4.75, "y":4, "w":6.25}, + {"label":"Alt", "x":11, "y":4}, + {"label":"Fn", "x":12, "y":4}, + {"label":"Ctrl", "x":13, "y":4}, + {"label":"\u2190", "x":14, "y":4}, + {"label":"\u2193", "x":15, "y":4}, + {"label":"\u2192", "x":16, "y":4} ] }, "LAYOUT_iso": { "layout": [ - { - "label": "Esc", - "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, - "w": 2 - }, - { - "label": "Home", - "x": 16, - "y": 0 - }, - { - "x": 0, - "y": 1 - }, - { - "label": "Tab", - "x": 1, - "y": 1, - "w": 1.5 - }, - { - "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": "Enter", - "x": 14.75, - "y": 1, - "w": 1.25, - "h": 2 - }, - { - "label": "Delete", - "x": 16, - "y": 1 - }, - { - "x": 0, - "y": 2 - }, - { - "label": "Caps Lock", - "x": 1, - "y": 2, - "w": 1.25 - }, - { - "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": "~", - "x": 13.75, - "y": 2 - }, - { - "label": "Page Up", - "x": 16, - "y": 2 - }, - { - "x": 0, - "y": 3 - }, - { - "label": "Shift", - "x": 1, - "y": 3, - "w": 1.25 - }, - { - "label": "|", - "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", - "x": 13.25, - "y": 3, - "w": 1.75 - }, - { - "label": "\u2191", - "x": 15, - "y": 3 - }, - { - "label": "Page Down", - "x": 16, - "y": 3 - }, - { - "x": 0, - "y": 4 - }, - { - "label": "Ctrl", - "x": 1, - "y": 4, - "w": 1.25 - }, - { - "label": "Win", - "x": 2.25, - "y": 4, - "w": 1.25 - }, - { - "label": "Alt", - "x": 3.5, - "y": 4, - "w": 1.25 - }, - { - "label": "Space", - "x": 4.75, - "y": 4, - "w": 6.25 - }, - { - "label": "Alt", - "x": 11, - "y": 4 - }, - { - "label": "Fn", - "x": 12, - "y": 4 - }, - { - "label": "Ctrl", - "x": 13, - "y": 4 - }, - { - "label": "\u2190", - "x": 14, - "y": 4 - }, - { - "label": "\u2193", - "x": 15, - "y": 4 - }, - { - "label": "\u2192", - "x": 16, - "y": 4 - } + {"label":"Esc", "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, "w":2}, + {"label":"Home", "x":16, "y":0}, + {"x":0, "y":1}, + {"label":"Tab", "x":1, "y":1, "w":1.5}, + {"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":"Delete", "x":16, "y":1}, + {"x":0, "y":2}, + {"label":"Caps Lock", "x":1, "y":2, "w":1.25}, + {"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":"~", "x":13.75, "y":2}, + {"label":"Enter", "x":14.75, "y":1, "w":1.25, "h":2}, + {"label":"Page Up", "x":16, "y":2}, + {"x":0, "y":3}, + {"label":"Shift", "x":1, "y":3, "w":1.25}, + {"label":"|", "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", "x":13.25, "y":3, "w":1.75}, + {"label":"\u2191", "x":15, "y":3}, + {"label":"Page Down", "x":16, "y":3}, + {"x":0, "y":4}, + {"label":"Ctrl", "x":1, "y":4, "w":1.25}, + {"label":"Win", "x":2.25, "y":4, "w":1.25}, + {"label":"Alt", "x":3.5, "y":4, "w":1.25}, + {"label":"Space", "x":4.75, "y":4, "w":6.25}, + {"label":"Alt", "x":11, "y":4}, + {"label":"Fn", "x":12, "y":4}, + {"label":"Ctrl", "x":13, "y":4}, + {"label":"\u2190", "x":14, "y":4}, + {"label":"\u2193", "x":15, "y":4}, + {"label":"\u2192", "x":16, "y":4} ] } } diff --git a/keyboards/nullbitsco/nibble/keymaps/via/keymap.c b/keyboards/nullbitsco/nibble/keymaps/via/keymap.c index 1e1b0c0369..f72ffc56e1 100644 --- a/keyboards/nullbitsco/nibble/keymaps/via/keymap.c +++ b/keyboards/nullbitsco/nibble/keymaps/via/keymap.c @@ -42,35 +42,35 @@ bool deafened = false; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_all( - KC_NUBS, 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_F13, 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_F14, 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_F15, 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_F16, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_VIA1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + 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_F13, 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_F14, 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_F15, 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_F16, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_VIA1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), [_VIA1] = 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_HOME, KC_INS, + 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_HOME, KC_INS, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT ), [_VIA2] = LAYOUT_all( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [_VIA3] = LAYOUT_all( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; diff --git a/keyboards/nullbitsco/nibble/nibble.h b/keyboards/nullbitsco/nibble/nibble.h index 9744ae745c..f6537b8b31 100644 --- a/keyboards/nullbitsco/nibble/nibble.h +++ b/keyboards/nullbitsco/nibble/nibble.h @@ -21,11 +21,11 @@ #include "remote_kb.h" #define LAYOUT_all( \ - K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, K2G, \ - K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, K3G, \ - K41, K42, K43, K44, K47, K4A, K4B, K4C, K4D, K4F, K4G \ + K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, K2G, \ + K31, K32, K01, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, K3G, \ + K41, K42, K43, K44, K47, K4A, K4B, K4C, K4D, K4F, K4G \ ) { \ {K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G}, \ {K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G}, \ @@ -35,11 +35,11 @@ } #define LAYOUT_ansi( \ - K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, K2G, \ - K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, K3G, \ - K41, K42, K43, K44, K47, K4A, K4B, K4C, K4D, K4F, K4G \ + K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, K2G, \ + K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, K3G, \ + K41, K42, K43, K44, K47, K4A, K4B, K4C, K4D, K4F, K4G \ ) { \ {___, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G}, \ {K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G}, \ @@ -49,11 +49,11 @@ } #define LAYOUT_iso( \ - K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1G, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K1F, K2F, K2G, \ - K31, K32, K01, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, K3G, \ - K41, K42, K43, K44, K47, K4A, K4B, K4C, K4D, K4F, K4G \ + K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1G, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K1F, K2F, K2G, \ + K31, K32, K01, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, K3G, \ + K41, K42, K43, K44, K47, K4A, K4B, K4C, K4D, K4F, K4G \ ) { \ {K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G}, \ {K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G}, \ From c1481629fd882fcda2bbdbf236e93066eb68f89f Mon Sep 17 00:00:00 2001 From: Xelus22 <17491233+Xelus22@users.noreply.github.com> Date: Mon, 2 Nov 2020 00:44:38 +0000 Subject: [PATCH 015/114] [Keyboard] Fix keyboard matrix scan rate with F072 (#10226) * fix matrix scan rate * Update trinityxttkl.c * Update rev2.c --- keyboards/aeboards/ext65/rev2/rev2.c | 3 +++ keyboards/xelus/trinityxttkl/trinityxttkl.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/keyboards/aeboards/ext65/rev2/rev2.c b/keyboards/aeboards/ext65/rev2/rev2.c index 35e88a8b19..5d7658101e 100644 --- a/keyboards/aeboards/ext65/rev2/rev2.c +++ b/keyboards/aeboards/ext65/rev2/rev2.c @@ -1,5 +1,8 @@ #include "rev2.h" +// Tested and verified working on ext65rev2 +void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); } + #ifdef OLED_DRIVER_ENABLE void board_init(void) { SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP; diff --git a/keyboards/xelus/trinityxttkl/trinityxttkl.c b/keyboards/xelus/trinityxttkl/trinityxttkl.c index fbf38010a2..c548a10cf0 100644 --- a/keyboards/xelus/trinityxttkl/trinityxttkl.c +++ b/keyboards/xelus/trinityxttkl/trinityxttkl.c @@ -1 +1,4 @@ #include "trinityxttkl.h" + +// Tested and verified working on Trinity XT TKL +void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); } From dc40f00aafeea148d8998c594c4e414d87ee84a3 Mon Sep 17 00:00:00 2001 From: Rich Saunders <65662806+richard-saunders@users.noreply.github.com> Date: Sun, 1 Nov 2020 18:25:50 -0700 Subject: [PATCH 016/114] [Keymap] Corrected the dvorak layout for kinesis advantage (#10808) --- keyboards/kinesis/keymaps/dvorak/keymap.c | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/keyboards/kinesis/keymaps/dvorak/keymap.c b/keyboards/kinesis/keymaps/dvorak/keymap.c index 9e44c10ce5..868c9ad558 100644 --- a/keyboards/kinesis/keymaps/dvorak/keymap.c +++ b/keyboards/kinesis/keymaps/dvorak/keymap.c @@ -7,26 +7,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DVORAK] = LAYOUT( // left hand KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, - KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, + KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, - KC_ESC, KC_LBRC, KC_DOWN, KC_UP, + KC_GRV, KC_INS, KC_LEFT, KC_RIGHT, // left thumb - KC_LGUI, KC_LCTL, - KC_LALT, - KC_BSPC, KC_DEL, TG(_MEDIA), + KC_LCTL, KC_LALT, + KC_HOME, + KC_BSPC, KC_DEL, KC_END, // right hand KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_FN0, KC_1, - KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, 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_D, KC_H, KC_T, KC_N, KC_S, KC_BSLS, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, - KC_LEFT, KC_RIGHT, KC_RBRC, KC_BSLS, + KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, // right thumb - KC_RCTL, KC_RGUI, - KC_RALT, - TG(_MEDIA), KC_ENT, KC_SPC + KC_RGUI, KC_RCTL, + KC_PGUP, + KC_PGDN, KC_ENT, KC_SPC ), [_MEDIA] = LAYOUT( From e69da2db2c59a8017f0c9dee9933dd508d22b356 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 2 Nov 2020 19:41:01 +1100 Subject: [PATCH 017/114] `qmk info`: Add `--ascii` flag (#10793) * `qmk info`: Add `--ascii` flag * Fix typo * Force ASCII for Windows/MSYS2 * Make it gooder * Remove redundant windows check * ...And this too * Make pytest work on Windows --- lib/python/qmk/cli/info.py | 12 +++++--- lib/python/qmk/keyboard.py | 37 ++++++++++++++++++----- lib/python/qmk/tests/test_cli_commands.py | 17 +++++++++-- 3 files changed, 52 insertions(+), 14 deletions(-) diff --git a/lib/python/qmk/cli/info.py b/lib/python/qmk/cli/info.py index 44ce1186aa..9ab299a21e 100755 --- a/lib/python/qmk/cli/info.py +++ b/lib/python/qmk/cli/info.py @@ -3,6 +3,7 @@ Compile an info.json for a particular keyboard and pretty-print it. """ import json +import platform from milc import cli @@ -12,6 +13,8 @@ from qmk.keymap import locate_keymap from qmk.info import info_json from qmk.path import is_keyboard +platform_id = platform.platform().lower() + ROW_LETTERS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnop' COL_LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijilmnopqrstuvwxyz' @@ -36,13 +39,13 @@ def show_keymap(kb_info_json, title_caps=True): else: cli.echo('{fg_cyan}layer_%s{fg_reset}:', layer_num) - print(render_layout(kb_info_json['layouts'][layout_name]['layout'], layer)) + print(render_layout(kb_info_json['layouts'][layout_name]['layout'], cli.config.info.ascii, layer)) def show_layouts(kb_info_json, title_caps=True): """Render the layouts with info.json labels. """ - for layout_name, layout_art in render_layouts(kb_info_json).items(): + for layout_name, layout_art in render_layouts(kb_info_json, cli.config.info.ascii).items(): title = layout_name.title() if title_caps else layout_name cli.echo('{fg_cyan}%s{fg_reset}:', title) print(layout_art) # Avoid passing dirty data to cli.echo() @@ -69,7 +72,7 @@ def show_matrix(kb_info_json, title_caps=True): else: cli.echo('{fg_blue}matrix_%s{fg_reset}:', layout_name) - print(render_layout(kb_info_json['layouts'][layout_name]['layout'], labels)) + print(render_layout(kb_info_json['layouts'][layout_name]['layout'], cli.config.info.ascii, labels)) def print_friendly_output(kb_info_json): @@ -124,6 +127,7 @@ def print_text_output(kb_info_json): @cli.argument('-l', '--layouts', action='store_true', help='Render the layouts.') @cli.argument('-m', '--matrix', action='store_true', help='Render the layouts with matrix information.') @cli.argument('-f', '--format', default='friendly', arg_only=True, help='Format to display the data in (friendly, text, json) (Default: friendly).') +@cli.argument('--ascii', action='store_true', default='windows' in platform_id, help='Render layout box drawings in ASCII only.') @cli.subcommand('Keyboard information.') @automagic_keyboard @automagic_keymap @@ -132,7 +136,7 @@ def info(cli): """ # Determine our keyboard(s) if not cli.config.info.keyboard: - cli.log.error('Missing paramater: --keyboard') + cli.log.error('Missing parameter: --keyboard') cli.subcommands['info'].print_help() return False diff --git a/lib/python/qmk/keyboard.py b/lib/python/qmk/keyboard.py index 9ebb2d77d3..a4c2873757 100644 --- a/lib/python/qmk/keyboard.py +++ b/lib/python/qmk/keyboard.py @@ -9,6 +9,25 @@ from glob import glob from qmk.c_parse import parse_config_h_file from qmk.makefile import parse_rules_mk_file +BOX_DRAWING_CHARACTERS = { + "unicode": { + "tl": "┌", + "tr": "┐", + "bl": "└", + "br": "┘", + "v": "│", + "h": "─", + }, + "ascii": { + "tl": " ", + "tr": " ", + "bl": "|", + "br": "|", + "v": "|", + "h": "_", + }, +} + base_path = os.path.join(os.getcwd(), "keyboards") + os.path.sep @@ -72,10 +91,12 @@ def rules_mk(keyboard): return rules -def render_layout(layout_data, key_labels=None): +def render_layout(layout_data, render_ascii, key_labels=None): """Renders a single layout. """ textpad = [array('u', ' ' * 200) for x in range(50)] + style = 'ascii' if render_ascii else 'unicode' + box_chars = BOX_DRAWING_CHARACTERS[style] for key in layout_data: x = ceil(key.get('x', 0) * 4) @@ -97,13 +118,13 @@ def render_layout(layout_data, key_labels=None): label = label[:label_len] label_blank = ' ' * label_len - label_border = '─' * label_len + label_border = box_chars['h'] * label_len label_middle = label + ' '*label_leftover # noqa: yapf insists there be no whitespace around * - top_line = array('u', '┌' + label_border + '┐') - lab_line = array('u', '│' + label_middle + '│') - mid_line = array('u', '│' + label_blank + '│') - bot_line = array('u', '└' + label_border + "┘") + top_line = array('u', box_chars['tl'] + label_border + box_chars['tr']) + lab_line = array('u', box_chars['v'] + label_middle + box_chars['v']) + mid_line = array('u', box_chars['v'] + label_blank + box_chars['v']) + bot_line = array('u', box_chars['bl'] + label_border + box_chars['br']) textpad[y][x:x + w] = top_line textpad[y + 1][x:x + w] = lab_line @@ -119,13 +140,13 @@ def render_layout(layout_data, key_labels=None): return '\n'.join(lines) -def render_layouts(info_json): +def render_layouts(info_json, render_ascii): """Renders all the layouts from an `info_json` structure. """ layouts = {} for layout in info_json['layouts']: layout_data = info_json['layouts'][layout]['layout'] - layouts[layout] = render_layout(layout_data) + layouts[layout] = render_layout(layout_data, render_ascii) return layouts diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index 7ac0bcbde7..7c261db6cd 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -1,7 +1,11 @@ +import platform + from subprocess import STDOUT, PIPE from qmk.commands import run +is_windows = 'windows' in platform.platform().lower() + def check_subcommand(command, *args): cmd = ['bin/qmk', command] + list(args) @@ -148,7 +152,11 @@ def test_info_keymap_render(): check_returncode(result) assert 'Keyboard Name: handwired/onekey/pytest' in result.stdout assert 'Processor: STM32F303' in result.stdout - assert '│A │' in result.stdout + + if is_windows: + assert '|A |' in result.stdout + else: + assert '│A │' in result.stdout def test_info_matrix_render(): @@ -157,7 +165,12 @@ def test_info_matrix_render(): assert 'Keyboard Name: handwired/onekey/pytest' in result.stdout assert 'Processor: STM32F303' in result.stdout assert 'LAYOUT_ortho_1x1' in result.stdout - assert '│0A│' in result.stdout + + if is_windows: + assert '|0A|' in result.stdout + else: + assert '│0A│' in result.stdout + assert 'Matrix for "LAYOUT_ortho_1x1"' in result.stdout From 8e71d3d053949593d02a3c1852fd1993d2e3f573 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 2 Nov 2020 20:23:54 +1100 Subject: [PATCH 018/114] Phantom refactor (#10805) --- keyboards/phantom/config.h | 158 +- keyboards/phantom/info.json | 3441 ++++---------------- keyboards/phantom/keymaps/default/config.h | 19 - keyboards/phantom/keymaps/default/keymap.c | 55 +- keyboards/phantom/keymaps/iso_uk/keymap.c | 71 +- keyboards/phantom/keymaps/rgbmod/config.h | 24 - keyboards/phantom/keymaps/rgbmod/keymap.c | 71 +- keyboards/phantom/keymaps/rgbmod/rules.mk | 35 +- keyboards/phantom/phantom.c | 46 +- keyboards/phantom/phantom.h | 180 +- keyboards/phantom/readme.md | 15 +- keyboards/phantom/rules.mk | 18 +- 12 files changed, 880 insertions(+), 3253 deletions(-) delete mode 100644 keyboards/phantom/keymaps/default/config.h delete mode 100644 keyboards/phantom/keymaps/rgbmod/config.h diff --git a/keyboards/phantom/config.h b/keyboards/phantom/config.h index 4ca731f2d7..a5d135a4bf 100644 --- a/keyboards/phantom/config.h +++ b/keyboards/phantom/config.h @@ -15,59 +15,86 @@ 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 0x6060 -#define DEVICE_VER 0x0003 -#define MANUFACTURER bpiphany -#define PRODUCT PHANTOM -#define DESCRIPTION QMK keyboard firmware for PHANTOM +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x5B50 +#define DEVICE_VER 0x0003 +#define MANUFACTURER bpiphany +#define PRODUCT PHANTOM /* key matrix size */ #define MATRIX_ROWS 6 #define MATRIX_COLS 17 -// ROWS: Top to bottom, COLS: Left to right -/* Row pin configuration -*/ -#define MATRIX_ROW_PINS { B5, B4, B3, B2, B1, B0 } -/* Column pin configuration +/* + * 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, B3, B2, B1, B0 } #define MATRIX_COL_PINS { D5, C7, C6, D4, D0, E6, F0, F1, F4, F5, F6, F7, D7, D6, D1, D2, D3 } #define UNUSED_PINS -/* COL2ROW or ROW2COL */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION ROW2COL // #define BACKLIGHT_PIN B7 -// #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 +// #define BACKLIGHT_BREATHING -/* Underlight configuration - */ #define RGB_DI_PIN E2 -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 20 // Number of LEDs -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 +#ifdef RGB_DI_PIN +# define RGBLED_NUM 20 +# define RGBLIGHT_HUE_STEP 10 +# define RGBLIGHT_SAT_STEP 17 +# define RGBLIGHT_VAL_STEP 17 +//# 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 -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* Set 0 if debouncing isn't needed */ +/* 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 useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE + /* * Force NKRO * @@ -89,54 +116,6 @@ along with this program. If not, see . */ //#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. @@ -152,30 +131,11 @@ along with this program. If not, see . //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION -/* - * MIDI options - */ +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION -/* 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 - -#endif +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/phantom/info.json b/keyboards/phantom/info.json index 6a1e4f72f5..4cea58835d 100644 --- a/keyboards/phantom/info.json +++ b/keyboards/phantom/info.json @@ -1,2798 +1,651 @@ { - "keyboard_name": "Phantom", - "url": "https://deskthority.net/wiki/Phantom", - "maintainer": "qmk", - "width": 18.25, - "height": 6.5, - "layouts": { - "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": "\\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": "FN", - "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 + "keyboard_name": "Phantom", + "url": "https://deskthority.net/wiki/Phantom", + "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_ansi_plus_five": { + "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": 15.25, "y": 3.5}, + {"x": 16.25, "y": 3.5}, + {"x": 17.25, "y": 3.5}, + + {"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": 15.25, "y": 4.5}, + {"x": 16.25, "y": 4.5}, + {"x": 17.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_ansi_wkl": { + "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.5}, + {"x": 1.5, "y": 5.5}, + {"x": 2.5, "y": 5.5, "w": 1.5}, + {"x": 4, "y": 5.5, "w": 7}, + {"x": 11, "y": 5.5, "w": 1.5}, + {"x": 12.5, "y": 5.5}, + {"x": 13.5, "y": 5.5, "w": 1.5}, + + {"x": 15.25, "y": 5.5}, + {"x": 16.25, "y": 5.5}, + {"x": 17.25, "y": 5.5} + ] + }, + "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.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}, + {"x": 14, "y": 1.5}, + + {"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}, + {"x": 13.75, "y": 3.5, "w": 1.25}, + + {"x": 15.25, "y": 3.5}, + {"x": 16.25, "y": 3.5}, + {"x": 17.25, "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": 1.75}, + {"x": 14, "y": 4.5}, + + {"x": 15.25, "y": 4.5}, + {"x": 16.25, "y": 4.5}, + {"x": 17.25, "y": 4.5}, + + {"x": 0, "y": 5.5, "w": 1.5}, + {"x": 1.5, "y": 5.5}, + {"x": 2.5, "y": 5.5, "w": 1.5}, + {"x": 4, "y": 5.5, "w": 1.5}, + {"x": 5.5, "y": 5.5, "w": 1.5}, + {"x": 7, "y": 5.5}, + {"x": 8, "y": 5.5, "w": 1.5}, + {"x": 9.5, "y": 5.5, "w": 1.5}, + {"x": 11, "y": 5.5, "w": 1.5}, + {"x": 12.5, "y": 5.5}, + {"x": 13.5, "y": 5.5, "w": 1.5}, + + {"x": 15.25, "y": 5.5}, + {"x": 16.25, "y": 5.5}, + {"x": 17.25, "y": 5.5} + ] + }, + "LAYOUT_tkl_iso_wkl": { + "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": 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": 13.75, "y": 2.5, "w": 1.25, "h": 2}, + + {"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.5}, + {"x": 1.5, "y": 5.5}, + {"x": 2.5, "y": 5.5, "w": 1.5}, + {"x": 4, "y": 5.5, "w": 7}, + {"x": 11, "y": 5.5, "w": 1.5}, + {"x": 12.5, "y": 5.5}, + {"x": 13.5, "y": 5.5, "w": 1.5}, + + {"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": 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": 13.75, "y": 2.5, "w": 1.25, "h": 2}, + + {"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} + ] } - ] - }, - "LAYOUT_tkl_ansi_plus_five": { - "key_count": 92, - "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 - }, - { - "x": 15.25, - "y": 3.5 - }, - { - "x": 16.25, - "y": 3.5 - }, - { - "x": 17.25, - "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 - }, - { - "x": 15.25, - "y": 4.5 - }, - { - "label": "\\u2191", - "x": 16.25, - "y": 4.5 - }, - { - "x": 17.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": "FN", - "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_ansi_wkl": { - "key_count": 86, - "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": "\\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 - }, - { - "label": "\\u2192", - "x": 17.25, - "y": 5.5 - } - ] - }, - "LAYOUT_7bit": { - "key_count": 101, - "layout": [ - { - "label": "Esc", - "x": 0, - "y": 0 - }, - { - "x": 1, - "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 - }, - { - "x": 6, - "y": 0 - }, - { - "label": "F5", - "x": 7, - "y": 0 - }, - { - "label": "F6", - "x": 8, - "y": 0 - }, - { - "label": "F7", - "x": 9, - "y": 0 - }, - { - "label": "F8", - "x": 10, - "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 - }, - { - "x": 13, - "y": 1.5 - }, - { - "x": 14, - "y": 1.5 - }, - { - "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 - }, - { - "x": 12.75, - "y": 3.5 - }, - { - "label": "Enter", - "x": 13.75, - "y": 3.5, - "w": 1.25 - }, - { - "x": 15.25, - "y": 3.5 - }, - { - "x": 16.25, - "y": 3.5 - }, - { - "x": 17.25, - "y": 3.5 - }, - { - "x": 0, - "y": 4.5 - }, - { - "label": "Shift", - "x": 1, - "y": 4.5, - "w": 1.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": 1.75 - }, - { - "x": 14, - "y": 4.5 - }, - { - "x": 15.25, - "y": 4.5 - }, - { - "label": "\\u2191", - "x": 16.25, - "y": 4.5 - }, - { - "x": 17.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": 1.5 - }, - { - "x": 5.5, - "y": 5.5, - "w": 1.5 - }, - { - "x": 7, - "y": 5.5 - }, - { - "x": 8, - "y": 5.5, - "w": 1.5 - }, - { - "x": 9.5, - "y": 5.5, - "w": 1.5 - }, - { - "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 - }, - { - "label": "\\u2192", - "x": 17.25, - "y": 5.5 - } - ] - }, - "LAYOUT_tkl_iso_wkl": { - "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": "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 - }, - { - "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 - }, - { - "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.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 - }, - { - "label": "\\u2192", - "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": "¬", - "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": "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": "\\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/phantom/keymaps/default/config.h b/keyboards/phantom/keymaps/default/config.h deleted file mode 100644 index 09b8f1bc73..0000000000 --- a/keyboards/phantom/keymaps/default/config.h +++ /dev/null @@ -1,19 +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 . - */ - -#pragma once - -// place overrides here diff --git a/keyboards/phantom/keymaps/default/keymap.c b/keyboards/phantom/keymaps/default/keymap.c index d7001f0663..0871827b2f 100644 --- a/keyboards/phantom/keymaps/default/keymap.c +++ b/keyboards/phantom/keymaps/default/keymap.c @@ -13,46 +13,31 @@ * 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 +enum layer_names { + _BL, + _FL +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BL] = 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(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + 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, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), [_FL] = LAYOUT_tkl_ansi( - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MSEL, \ - _______, _______, _______, KC_CALC, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MSEL, + _______, _______, _______, KC_CALC, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) }; - -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/phantom/keymaps/iso_uk/keymap.c b/keyboards/phantom/keymaps/iso_uk/keymap.c index 43a7e55fb3..0230ccb783 100644 --- a/keyboards/phantom/keymaps/iso_uk/keymap.c +++ b/keyboards/phantom/keymaps/iso_uk/keymap.c @@ -13,62 +13,31 @@ * 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 +enum layer_names { + _BL, + _FL +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BL] = 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_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_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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + 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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), [_FL] = LAYOUT_tkl_iso( - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MSEL, \ - _______, _______, _______, _______, KC_CALC, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MSEL, + _______, _______, _______, _______, KC_CALC, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) }; - -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_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/phantom/keymaps/rgbmod/config.h b/keyboards/phantom/keymaps/rgbmod/config.h deleted file mode 100644 index a3828f7d5d..0000000000 --- a/keyboards/phantom/keymaps/rgbmod/config.h +++ /dev/null @@ -1,24 +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 . - */ - -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -// place overrides here - -#endif diff --git a/keyboards/phantom/keymaps/rgbmod/keymap.c b/keyboards/phantom/keymaps/rgbmod/keymap.c index e3a6792394..9be30fbae7 100644 --- a/keyboards/phantom/keymaps/rgbmod/keymap.c +++ b/keyboards/phantom/keymaps/rgbmod/keymap.c @@ -13,62 +13,31 @@ * 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 +enum layer_names { + _BL, + _FL +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BL] = 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, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + 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, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), [_FL] = LAYOUT_tkl_ansi( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, \ - _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) }; - -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_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/phantom/keymaps/rgbmod/rules.mk b/keyboards/phantom/keymaps/rgbmod/rules.mk index e4865902ce..1e3cebb145 100644 --- a/keyboards/phantom/keymaps/rgbmod/rules.mk +++ b/keyboards/phantom/keymaps/rgbmod/rules.mk @@ -1,34 +1 @@ -# 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 -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -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 = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support -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 this with audio at the same time. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - +RGBLIGHT_ENABLE = yes diff --git a/keyboards/phantom/phantom.c b/keyboards/phantom/phantom.c index 2bf1631b9c..1017de0093 100644 --- a/keyboards/phantom/phantom.c +++ b/keyboards/phantom/phantom.c @@ -13,51 +13,25 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include "phantom.h" -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up +void keyboard_pre_init_kb(void) { led_init_ports(); - 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); + keyboard_pre_init_user(); } void led_init_ports(void) { - DDRB |= (1<<6) | (1<<7); // OUT + setPinOutput(B6); + setPinOutput(B7); } -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1<. */ -#ifndef PHANTOM_H -#define PHANTOM_H + +#pragma once #include "quantum.h" -// Keymap utilizing all the possible keys on the PCB. -#define LAYOUT_7bit( \ - K00, K53, K02, K03, K04, K05, K56, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K01, 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, K3C, K3D, K3E, K3F, K3G, \ - K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F, K4G, \ - K50, K51, K52, K54, K55, K57, K58, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ -) { \ -/* 0 1 2 3 4 5 6 7 8 9 A B C D E F G */ \ -/* 0 */ { K00, K01, 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, K3C, K3D, K3E, K3F, K3G }, \ -/* 4 */ { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F, K4G }, \ -/* 5 */ { K50, K51, K52, K53, K54, K55, K56, K57, K58, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G } \ -} +#define XXX KC_NO +// Keymap utilizing all the possible keys on the PCB. +#define LAYOUT_all( \ + k00, k53, k02, k03, k04, k05, k56, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ + k01, 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, k3C, k3D, k3E, k3F, k3G, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G, \ + k50, k51, k52, k54, k55, k57, k58, k5A, k5B, k5C, k5D, k5E, k5F, k5G \ +) { \ + { k00, k01, 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, k3C, k3D, k3E, k3F, k3G }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, XXX, k5A, k5B, k5C, k5D, k5E, k5F, k5G } \ +} // Keymap for a standard ANSI layout. #define LAYOUT_tkl_ansi( \ - K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K01, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, 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, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4F, \ - K50, K51, K52, K57, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ -) LAYOUT_7bit( \ - K00, KC_NO, K02, K03, K04, K05, KC_NO, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K01, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, KC_NO, 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, KC_NO, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, KC_NO, K4D, KC_NO, K4F, KC_NO, \ - K50, K51, K52, KC_NO, KC_NO, K57, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ -) + k00, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ + k01, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, 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, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4D, k4F, \ + k50, k51, k52, k57, k5A, k5B, k5C, k5D, k5E, k5F, k5G \ +) { \ + { k00, k01, 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, XXX, 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, XXX, k3D, XXX, XXX, XXX }, \ + { k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, XXX, k4D, XXX, k4F, XXX }, \ + { k50, k51, k52, XXX, XXX, XXX, XXX, k57, XXX, XXX, k5A, k5B, k5C, k5D, k5E, k5F, k5G } \ +} // Keymap for a standard ANSI layout plus the five extra keys // above the arrow block. #define LAYOUT_tkl_ansi_plus_five( \ - K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K01, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, 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, K3E, K3F, K3G, \ - K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4E, K4F, K4G, \ - K50, K51, K52, K57, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ -) LAYOUT_7bit( \ - K00, KC_NO, K02, K03, K04, K05, KC_NO, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K01, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, KC_NO, 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, K3E, K3F, K3G, \ - K40, KC_NO, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, KC_NO, K4D, K4E, K4F, K4G, \ - K50, K51, K52, KC_NO, KC_NO, K57, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ -) + k00, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ + k01, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, 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, k3E, k3F, k3G, \ + k40, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4D, k4E, k4F, k4G, \ + k50, k51, k52, k57, k5A, k5B, k5C, k5D, k5E, k5F, k5G \ +) { \ + { k00, k01, 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, XXX, 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, XXX, k3D, k3E, k3F, k3G }, \ + { k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, XXX, k4D, k4E, k4F, k4G }, \ + { k50, k51, k52, XXX, XXX, XXX, XXX, k57, XXX, XXX, k5A, k5B, k5C, k5D, k5E, k5F, k5G } \ +} #define LAYOUT_tkl_ansi_wkl( \ - K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K01, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, 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, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4F, \ - K50, K51, K52, K57, K5B, K5C, K5D, K5E, K5F, K5G \ -) LAYOUT_7bit( \ - K00, KC_NO, K02, K03, K04, K05, KC_NO, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K01, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, KC_NO, 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, KC_NO, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, KC_NO, K4D, KC_NO, K4F, KC_NO, \ - K50, K51, K52, KC_NO, KC_NO, K57, KC_NO, KC_NO, K5B, K5C, K5D, K5E, K5F, K5G \ -) + k00, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ + k01, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, 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, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4D, k4F, \ + k50, k51, k52, k57, k5B, k5C, k5D, k5E, k5F, k5G \ +) { \ + { k00, k01, 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, XXX, 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, XXX, k3D, XXX, XXX, XXX }, \ + { k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, XXX, k4D, XXX, k4F, XXX }, \ + { k50, k51, k52, XXX, XXX, XXX, XXX, k57, XXX, XXX, XXX, k5B, k5C, k5D, k5E, k5F, k5G } \ +} #define LAYOUT_tkl_iso( \ - K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K01, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1D, K1E, K1F, K1G, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, K2F, K2G, \ - 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, K4D, K4F, \ - K50, K51, K52, K57, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ -) LAYOUT_7bit( \ - K00, KC_NO, K02, K03, K04, K05, KC_NO, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K01, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, KC_NO, K1D, K1E, K1F, K1G, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO, K2E, K2F, K2G, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, KC_NO, KC_NO, \ - K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, KC_NO, K4D, KC_NO, K4F, KC_NO, \ - K50, K51, K52, KC_NO, KC_NO, K57, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ -) + k00, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ + k01, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1D, k1E, k1F, k1G, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, k2F, k2G, \ + 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, k4D, k4F, \ + k50, k51, k52, k57, k5A, k5B, k5C, k5D, k5E, k5F, k5G \ +) { \ + { k00, k01, 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, XXX, k1D, k1E, k1F, k1G }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, k2E, k2F, k2G }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX, XXX, XXX }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, XXX, k4D, XXX, k4F, XXX }, \ + { k50, k51, k52, XXX, XXX, XXX, XXX, k57, XXX, XXX, k5A, k5B, k5C, k5D, k5E, k5F, k5G } \ +} #define LAYOUT_tkl_iso_wkl( \ - K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K01, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1D, K1E, K1F, K1G, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, K2F, K2G, \ - 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, K4D, K4F, \ - K50, K51, K52, K57, K5B, K5C, K5D, K5E, K5F, K5G \ -) LAYOUT_7bit( \ - K00, KC_NO, K02, K03, K04, K05, KC_NO, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K01, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, KC_NO, K1D, K1E, K1F, K1G, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO, K2E, K2F, K2G, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, KC_NO, KC_NO, \ - K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, KC_NO, K4D, KC_NO, K4F, KC_NO, \ - K50, K51, K52, KC_NO, KC_NO, K57, KC_NO, KC_NO, K5B, K5C, K5D, K5E, K5F, K5G \ -) + k00, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ + k01, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1D, k1E, k1F, k1G, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, k2F, k2G, \ + 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, k4D, k4F, \ + k50, k51, k52, k57, k5B, k5C, k5D, k5E, k5F, k5G \ +) { \ + { k00, k01, 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, XXX, k1D, k1E, k1F, k1G }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, k2E, k2F, k2G }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX, XXX, XXX }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, XXX, k4D, XXX, k4F, XXX }, \ + { k50, k51, k52, XXX, XXX, XXX, XXX, k57, XXX, XXX, XXX, k5B, k5C, k5D, k5E, k5F, k5G } \ +} -#endif +#define LAYOUT_7bit LAYOUT_all diff --git a/keyboards/phantom/readme.md b/keyboards/phantom/readme.md index b25630958b..857525d98c 100644 --- a/keyboards/phantom/readme.md +++ b/keyboards/phantom/readme.md @@ -1,16 +1,19 @@ -Phantom -======= +# Phantom A community-developed keyboard PCB designed to fit inside the case of a Filco Majestouch. See the [Deskthority wiki](https://deskthority.net/wiki/Phantom) for more information. -Keyboard Maintainer: QMK Community -Hardware Supported: Phantom PCB -Hardware Availability: https://mechanicalkeyboards.com/shop/index.php?l=product_detail&p=536 +* Keyboard Maintainer: QMK Community +* Hardware Supported: Phantom PCB +* Hardware Availability: https://mechanicalkeyboards.com/shop/index.php?l=product_detail&p=536 Make example for this keyboard (after setting up your build environment): make phantom: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. +Flashing example for this keyboard: + + make phantom:default:flash + +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/phantom/rules.mk b/keyboards/phantom/rules.mk index 79c64ac7af..53d53e46cb 100644 --- a/keyboards/phantom/rules.mk +++ b/keyboards/phantom/rules.mk @@ -2,19 +2,12 @@ MCU = atmega32u4 # Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,11 +17,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -MIDI_ENABLE = no # MIDI support -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 +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output LAYOUTS = tkl_ansi tkl_iso From 75201c73a0db37e80d67b45089d868a35ce5a8d9 Mon Sep 17 00:00:00 2001 From: Frothy Date: Mon, 2 Nov 2020 09:35:38 -0400 Subject: [PATCH 019/114] Enable media keys support for Canoe VIA keymap (#10829) --- keyboards/percent/canoe/keymaps/via/rules.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/keyboards/percent/canoe/keymaps/via/rules.mk b/keyboards/percent/canoe/keymaps/via/rules.mk index 1ebdc3e8b2..36b7ba9cbc 100644 --- a/keyboards/percent/canoe/keymaps/via/rules.mk +++ b/keyboards/percent/canoe/keymaps/via/rules.mk @@ -1,4 +1,2 @@ VIA_ENABLE = yes LTO_ENABLE = yes - -EXTRAKEY_ENABLE = no \ No newline at end of file From e041ec1655f49ce756a2949a367f8ae7c92a9635 Mon Sep 17 00:00:00 2001 From: ai03 Date: Mon, 2 Nov 2020 22:45:02 +0900 Subject: [PATCH 020/114] Add support for Noxary Vulcan (#10822) Co-authored-by: Ryan Co-authored-by: ai03 --- keyboards/noxary/vulcan/config.h | 107 ++++++++++++++++++ keyboards/noxary/vulcan/info.json | 75 ++++++++++++ .../noxary/vulcan/keymaps/default/keymap.c | 45 ++++++++ .../noxary/vulcan/keymaps/default/readme.md | 2 + keyboards/noxary/vulcan/keymaps/via/keymap.c | 63 +++++++++++ keyboards/noxary/vulcan/keymaps/via/readme.md | 2 + keyboards/noxary/vulcan/keymaps/via/rules.mk | 1 + keyboards/noxary/vulcan/readme.md | 15 +++ keyboards/noxary/vulcan/rules.mk | 22 ++++ keyboards/noxary/vulcan/vulcan.c | 17 +++ keyboards/noxary/vulcan/vulcan.h | 41 +++++++ 11 files changed, 390 insertions(+) create mode 100644 keyboards/noxary/vulcan/config.h create mode 100644 keyboards/noxary/vulcan/info.json create mode 100644 keyboards/noxary/vulcan/keymaps/default/keymap.c create mode 100644 keyboards/noxary/vulcan/keymaps/default/readme.md create mode 100644 keyboards/noxary/vulcan/keymaps/via/keymap.c create mode 100644 keyboards/noxary/vulcan/keymaps/via/readme.md create mode 100644 keyboards/noxary/vulcan/keymaps/via/rules.mk create mode 100644 keyboards/noxary/vulcan/readme.md create mode 100644 keyboards/noxary/vulcan/rules.mk create mode 100644 keyboards/noxary/vulcan/vulcan.c create mode 100644 keyboards/noxary/vulcan/vulcan.h diff --git a/keyboards/noxary/vulcan/config.h b/keyboards/noxary/vulcan/config.h new file mode 100644 index 0000000000..6281cb07d1 --- /dev/null +++ b/keyboards/noxary/vulcan/config.h @@ -0,0 +1,107 @@ +/* +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 0x0011 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Noxary +#define PRODUCT Vulcan + +/* 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) + * +*/ +#define MATRIX_ROW_PINS { D1, D0, D2, F0, F1 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3 } +#define UNUSED_PINS + +/* COL2ROW, 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 + +/* 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 + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/noxary/vulcan/info.json b/keyboards/noxary/vulcan/info.json new file mode 100644 index 0000000000..6e54519fb1 --- /dev/null +++ b/keyboards/noxary/vulcan/info.json @@ -0,0 +1,75 @@ +{ + "keyboard_name": "vulcan", + "url": "https://noxary.co/products/vulcan-pro-base", + "maintainer": "ai03", + "width": 15, + "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":"Back Space", "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.25}, + {"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} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/noxary/vulcan/keymaps/default/keymap.c b/keyboards/noxary/vulcan/keymaps/default/keymap.c new file mode 100644 index 0000000000..d80a451ff4 --- /dev/null +++ b/keyboards/noxary/vulcan/keymaps/default/keymap.c @@ -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 . + */ +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _FN +}; + +/* K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, + * 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, + * K400, K401, K402, K410, K411, K412, K413 + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = 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_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(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL + ), + [_FN] = LAYOUT( /* Fn */ + RESET, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/noxary/vulcan/keymaps/default/readme.md b/keyboards/noxary/vulcan/keymaps/default/readme.md new file mode 100644 index 0000000000..64ee9c8a3c --- /dev/null +++ b/keyboards/noxary/vulcan/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# The default keymap for Vulcan +Nothing special \ No newline at end of file diff --git a/keyboards/noxary/vulcan/keymaps/via/keymap.c b/keyboards/noxary/vulcan/keymaps/via/keymap.c new file mode 100644 index 0000000000..155d9c8f49 --- /dev/null +++ b/keyboards/noxary/vulcan/keymaps/via/keymap.c @@ -0,0 +1,63 @@ +/* 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 + +enum layer_names { + _BASE, + _FN, + _EXTRA_ONE, + _EXTRA_TWO +}; + +/* K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, + * 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, + * K400, K401, K402, K410, K411, K412, K413 + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = 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_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(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL + ), + [_FN] = LAYOUT( /* Fn */ + _______, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + [_EXTRA_ONE] = LAYOUT( /* Extra layer for via */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + [_EXTRA_TWO] = LAYOUT( /* Extra layer for via */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ) +}; + + diff --git a/keyboards/noxary/vulcan/keymaps/via/readme.md b/keyboards/noxary/vulcan/keymaps/via/readme.md new file mode 100644 index 0000000000..e4393e3fe1 --- /dev/null +++ b/keyboards/noxary/vulcan/keymaps/via/readme.md @@ -0,0 +1,2 @@ +# The via keymap for Vulcan +For use with VIA configurator \ No newline at end of file diff --git a/keyboards/noxary/vulcan/keymaps/via/rules.mk b/keyboards/noxary/vulcan/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/noxary/vulcan/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/noxary/vulcan/readme.md b/keyboards/noxary/vulcan/readme.md new file mode 100644 index 0000000000..7aacb4ecdf --- /dev/null +++ b/keyboards/noxary/vulcan/readme.md @@ -0,0 +1,15 @@ +# Vulcan + +![Vulcan](https://i.imgur.com/ZwlJ0sxl.png) + +High-end 60% keyboard + +* Keyboard Maintainer: [ai03](https://github.com/ai03-2725)/Noxary Keyboards +* Hardware Supported: The Vulcan PCB +* Hardware Availability: [Noxary Webstore](https://noxary.co/) + +Make example for this keyboard (after setting up your build environment): + + make noxary/vulcan: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/noxary/vulcan/rules.mk b/keyboards/noxary/vulcan/rules.mk new file mode 100644 index 0000000000..5f1b6954ee --- /dev/null +++ b/keyboards/noxary/vulcan/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 = 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 +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/noxary/vulcan/vulcan.c b/keyboards/noxary/vulcan/vulcan.c new file mode 100644 index 0000000000..a36569ecbd --- /dev/null +++ b/keyboards/noxary/vulcan/vulcan.c @@ -0,0 +1,17 @@ +/* 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 "vulcan.h" + diff --git a/keyboards/noxary/vulcan/vulcan.h b/keyboards/noxary/vulcan/vulcan.h new file mode 100644 index 0000000000..97ac40ff3b --- /dev/null +++ b/keyboards/noxary/vulcan/vulcan.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( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, \ + 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, \ + K400, K401, K402, K410, K411, K412, K413 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ + { 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, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413 } \ +} From 4b839db3841f001f78291373b2b6c3eca34582ed Mon Sep 17 00:00:00 2001 From: yiancar Date: Mon, 2 Nov 2020 19:09:48 +0000 Subject: [PATCH 021/114] NK65 eeprom compatibility with 128KB and 256KB (#10804) * NK65 define hack for 128kb 256kb versions of F303 * Updated to chibios define --- keyboards/nk65/config.h | 11 +++++++++++ keyboards/nk65/nk65.c | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/keyboards/nk65/config.h b/keyboards/nk65/config.h index 826e54180c..f9845f6789 100755 --- a/keyboards/nk65/config.h +++ b/keyboards/nk65/config.h @@ -144,3 +144,14 @@ along with this program. If not, see . // VIA lighting is handled by the keyboard-level code #define VIA_CUSTOM_LIGHTING_ENABLE + +/* Custom EEPROM start addressing. This is to support + * both 128kb and 256kb versions of F303. + * Register 0x1FFFF7CC holds the size of the flash memory. + */ +#define EEPROM_START_ADDRESS +#define FEE_MCU_FLASH_SIZE \ +({ \ + uint16_t (*flash_size) = (uint16_t*)FLASHSIZE_BASE; \ + *flash_size; \ +}) diff --git a/keyboards/nk65/nk65.c b/keyboards/nk65/nk65.c index 972373e1b2..fae30ac75c 100755 --- a/keyboards/nk65/nk65.c +++ b/keyboards/nk65/nk65.c @@ -20,7 +20,7 @@ #include "nk65.h" #include "drivers/issi/is31fl3733.h" -/* Indicator LEDS are part of the LED driver +/* Indicator LEDS are part of the LED driver * Top LED is blue only. LED driver 2 RGB 7 Green channel * Middle LED is blue and red. LED driver 2 RGB 6 Red and Blue channel * Bottom LED is red only LED driver 2 RGB 6 Green channel. @@ -48,7 +48,7 @@ __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { if (state & (1UL << 2)) { G = 255; } - + IS31FL3733_set_color( 6+64-1, R, G, B ); return state; } From 4ba0cb7ebc7607ba235f34c32a66ccde880ca4a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reibl=20J=C3=A1nos=20D=C3=A1niel?= Date: Mon, 2 Nov 2020 22:20:22 +0100 Subject: [PATCH 022/114] Add OLED support for Riblee F411 (#10778) * Add OLED support for Riblee F422 * Fix typo --- keyboards/handwired/riblee_f411/config.h | 6 +- keyboards/handwired/riblee_f411/halconf.h | 20 ++++++ keyboards/handwired/riblee_f411/mcuconf.h | 25 ++++++++ keyboards/handwired/riblee_f411/rules.mk | 3 + layouts/community/ortho_5x12/riblee/keymap.c | 31 ++++++++-- users/riblee/riblee.c | 64 ++++++++++++++++++++ users/riblee/riblee.h | 6 +- 7 files changed, 146 insertions(+), 9 deletions(-) create mode 100644 keyboards/handwired/riblee_f411/halconf.h create mode 100644 keyboards/handwired/riblee_f411/mcuconf.h diff --git a/keyboards/handwired/riblee_f411/config.h b/keyboards/handwired/riblee_f411/config.h index a1aa122e7d..67399aafb1 100644 --- a/keyboards/handwired/riblee_f411/config.h +++ b/keyboards/handwired/riblee_f411/config.h @@ -28,7 +28,7 @@ #define MATRIX_COLS 12 #define MATRIX_ROW_PINS { A6, A5, A4, A3, A2 } -#define MATRIX_COL_PINS { B10, B1, B0, B15, A8, B3, B4, B5, B6, B7, B8, B9 } +#define MATRIX_COL_PINS { B10, B1, B0, B15, A8, B3, B4, B5, B14, A0, B8, B9 } #define UNUSED_PINS #define DIODE_DIRECTION COL2ROW @@ -38,4 +38,6 @@ #define MOUSEKEY_INTERVAL 32 -#define TAPPING_TERM 175 \ No newline at end of file +#define TAPPING_TERM 175 + +#define OLED_DISPLAY_128X64 diff --git a/keyboards/handwired/riblee_f411/halconf.h b/keyboards/handwired/riblee_f411/halconf.h new file mode 100644 index 0000000000..d65408a1b6 --- /dev/null +++ b/keyboards/handwired/riblee_f411/halconf.h @@ -0,0 +1,20 @@ +/* Copyright 2020 Janos Daniel Reibl @riblee + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 HAL_USE_I2C TRUE + +#include_next "halconf.h" diff --git a/keyboards/handwired/riblee_f411/mcuconf.h b/keyboards/handwired/riblee_f411/mcuconf.h new file mode 100644 index 0000000000..51561d37ef --- /dev/null +++ b/keyboards/handwired/riblee_f411/mcuconf.h @@ -0,0 +1,25 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * Copyright 2020 Janos Daniel Reibl @riblee + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_next "mcuconf.h" + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE + +#undef I2C_DRIVER +#define I2C_DRIVER I2CD1 diff --git a/keyboards/handwired/riblee_f411/rules.mk b/keyboards/handwired/riblee_f411/rules.mk index 40a72bdcdb..a44b2b058b 100644 --- a/keyboards/handwired/riblee_f411/rules.mk +++ b/keyboards/handwired/riblee_f411/rules.mk @@ -24,3 +24,6 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output LAYOUTS = ortho_5x12 + +OLED_DRIVER_ENABLE = yes +RAW_ENABLE = yes diff --git a/layouts/community/ortho_5x12/riblee/keymap.c b/layouts/community/ortho_5x12/riblee/keymap.c index ba5eb07b83..a0a196ad9f 100644 --- a/layouts/community/ortho_5x12/riblee/keymap.c +++ b/layouts/community/ortho_5x12/riblee/keymap.c @@ -48,6 +48,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_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, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Hungarian +* ,-----------------------------------------------------------------------------------. +* | ` | 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 | +* |------+------+------+------+------+------+------+------+------+------+------+------| +* | Brite| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | +* `-----------------------------------------------------------------------------------' +*/ +[_HUNGARIAN] = 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, C_KC_E, KC_R, KC_T, KC_Y, C_KC_U, C_KC_I, C_KC_O, KC_P, KC_DEL, KC_ESC, C_KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, @@ -153,11 +174,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_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, COLEMAK, DVORAK, _______, _______, - _______, _______, _______, _______, _______, _______, NK_TOGG, LCG_SWP, LCG_NRM, UC_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, + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, HUNGARIAN, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, LCG_SWP, LCG_NRM, UC_MOD, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; \ No newline at end of file diff --git a/users/riblee/riblee.c b/users/riblee/riblee.c index e1fe607ef2..6e548f1d8d 100644 --- a/users/riblee/riblee.c +++ b/users/riblee/riblee.c @@ -15,6 +15,8 @@ */ #include "riblee.h" +#include "raw_hid.h" +#include const uint8_t shift = MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT); @@ -150,6 +152,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case HUNGARIAN: + if (record->event.pressed) { + set_single_persistent_default_layer(_HUNGARIAN); + } + return false; + break; case BACKLIT: if (record->event.pressed) { register_code(keycode_config(KC_LGUI)); @@ -164,3 +172,59 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; }; + +#ifdef OLED_DRIVER_ENABLE + +static char receive_buffer[128] = {}; +static uint8_t receive_buffer_length = 0; + +void oled_task_user(void) { + // Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_P(PSTR("Default\n"), false); + break; + case _LOWER: + oled_write_P(PSTR("Lower\n"), false); + break; + case _RAISE: + oled_write_P(PSTR("Raise\n"), false); + break; + case _ADJUST: + oled_write_P(PSTR("Adjust\n"), false); + break; + default: + oled_write_P(PSTR("Undefined\n"), false); + } + + // Print string received via HID RAW + oled_write_ln(receive_buffer, false); +} + +#ifdef RAW_ENABLE + +void raw_hid_receive(uint8_t *data, uint8_t length) { + + // Append data to receive_buffer, without the first byte + memcpy(receive_buffer + receive_buffer_length, data + 1, length - 1); + receive_buffer_length += (length - 1); + + // First byte indicate if we will recive more package for the current string + // If it's 1 then this was the last package and we can reset the offset + if (data[0] == 1) { + // Reset the offset for memcpy to the begining of our buffer + receive_buffer_length = 0; + } + + // Reset the offset to prevent overwriting memory outside of the buffer + if (receive_buffer_length + 32 >= 128) { + receive_buffer_length = 0; + } + +} + +#endif + +#endif \ No newline at end of file diff --git a/users/riblee/riblee.h b/users/riblee/riblee.h index bdaa9f3211..a4038765a6 100644 --- a/users/riblee/riblee.h +++ b/users/riblee/riblee.h @@ -18,8 +18,9 @@ #include QMK_KEYBOARD_H -enum preonic_layers { +enum layer_names { _QWERTY, + _HUNGARIAN, _COLEMAK, _DVORAK, _LOWER, @@ -27,8 +28,9 @@ enum preonic_layers { _ADJUST }; -enum preonic_keycodes { +enum custom_keycodes { QWERTY = SAFE_RANGE, + HUNGARIAN, COLEMAK, DVORAK, BACKLIT From e680af98d2347222ba41b5affc941e6682e0ce34 Mon Sep 17 00:00:00 2001 From: kaylanm <1063516+kaylanm@users.noreply.github.com> Date: Mon, 2 Nov 2020 16:23:05 -0500 Subject: [PATCH 023/114] Enable extrakeys, mousekeys for all VIA keymaps. (#10740) --- keyboards/1upkeyboards/1up60hse/keymaps/via/rules.mk | 3 ++- keyboards/1upkeyboards/1up60hte/keymaps/via/rules.mk | 1 - keyboards/aos/tkl/keymaps/via/rules.mk | 1 - keyboards/botanicalkeyboards/fm2u/keymaps/via/rules.mk | 2 +- keyboards/coseyfannitutti/discipad/keymaps/via/rules.mk | 1 - keyboards/coseyfannitutti/discipline/keymaps/via/rules.mk | 1 - keyboards/coseyfannitutti/romeo/keymaps/via/rules.mk | 1 - keyboards/dm9records/plaid/keymaps/via/rules.mk | 2 -- keyboards/gray_studio/space65/keymaps/via/rules.mk | 1 - .../gray_studio/think65/hotswap/keymaps/via/rules.mk | 3 ++- keyboards/gray_studio/think65/solder/keymaps/via/rules.mk | 4 +++- keyboards/jj4x4/keymaps/via/rules.mk | 2 -- keyboards/keycapsss/plaid_pad/keymaps/via/rules.mk | 2 -- keyboards/kira80/keymaps/via/rules.mk | 1 - keyboards/lazydesigners/dimple/keymaps/via/rules.mk | 8 -------- keyboards/lets_split/keymaps/via/rules.mk | 2 +- keyboards/noxary/220/keymaps/via/rules.mk | 1 - keyboards/noxary/268/keymaps/via/rules.mk | 1 - keyboards/noxary/268_2/keymaps/via/rules.mk | 3 +-- keyboards/noxary/280/keymaps/via/rules.mk | 1 - keyboards/noxary/x268/keymaps/via/rules.mk | 1 - keyboards/percent/skog_lite/keymaps/via/rules.mk | 3 --- keyboards/ramonimbao/herringbone/keymaps/via/rules.mk | 2 -- keyboards/reversestudio/decadepad/keymaps/via/rules.mk | 1 - keyboards/sck/osa/keymaps/via/rules.mk | 3 ++- keyboards/singa/keymaps/via/rules.mk | 2 -- keyboards/tgr/910/keymaps/via/rules.mk | 2 -- keyboards/tgr/910ce/keymaps/via/rules.mk | 2 -- keyboards/tgr/jane/keymaps/via/rules.mk | 3 --- keyboards/tgr/tris/keymaps/via/rules.mk | 2 -- keyboards/thevankeyboards/minivan/keymaps/via/rules.mk | 8 -------- keyboards/unikorn/keymaps/via/rules.mk | 3 --- keyboards/winkeyless/bface/keymaps/via/rules.mk | 3 --- keyboards/winkeyless/bmini/keymaps/via/rules.mk | 3 --- keyboards/winkeyless/bminiex/keymaps/via/rules.mk | 3 --- 35 files changed, 12 insertions(+), 70 deletions(-) diff --git a/keyboards/1upkeyboards/1up60hse/keymaps/via/rules.mk b/keyboards/1upkeyboards/1up60hse/keymaps/via/rules.mk index 6305f94a35..44a2bc49cc 100644 --- a/keyboards/1upkeyboards/1up60hse/keymaps/via/rules.mk +++ b/keyboards/1upkeyboards/1up60hse/keymaps/via/rules.mk @@ -1,3 +1,4 @@ VIA_ENABLE = yes LTO_ENABLE = yes -MOUSEKEY_ENABLE = no \ No newline at end of file + +CONSOLE_ENABLE = no diff --git a/keyboards/1upkeyboards/1up60hte/keymaps/via/rules.mk b/keyboards/1upkeyboards/1up60hte/keymaps/via/rules.mk index bee21da528..1e5b99807c 100644 --- a/keyboards/1upkeyboards/1up60hte/keymaps/via/rules.mk +++ b/keyboards/1upkeyboards/1up60hte/keymaps/via/rules.mk @@ -1,2 +1 @@ VIA_ENABLE = yes -MOUSEKEY_ENABLE = no \ No newline at end of file diff --git a/keyboards/aos/tkl/keymaps/via/rules.mk b/keyboards/aos/tkl/keymaps/via/rules.mk index 96d2d189b2..1e5b99807c 100644 --- a/keyboards/aos/tkl/keymaps/via/rules.mk +++ b/keyboards/aos/tkl/keymaps/via/rules.mk @@ -1,2 +1 @@ VIA_ENABLE = yes -MOUSEKEY_ENABLE = no diff --git a/keyboards/botanicalkeyboards/fm2u/keymaps/via/rules.mk b/keyboards/botanicalkeyboards/fm2u/keymaps/via/rules.mk index 7d47e6b726..44a2bc49cc 100644 --- a/keyboards/botanicalkeyboards/fm2u/keymaps/via/rules.mk +++ b/keyboards/botanicalkeyboards/fm2u/keymaps/via/rules.mk @@ -1,4 +1,4 @@ VIA_ENABLE = yes LTO_ENABLE = yes -EXTRAKEY_ENABLE = no +CONSOLE_ENABLE = no diff --git a/keyboards/coseyfannitutti/discipad/keymaps/via/rules.mk b/keyboards/coseyfannitutti/discipad/keymaps/via/rules.mk index fcb7b9eab6..36b7ba9cbc 100644 --- a/keyboards/coseyfannitutti/discipad/keymaps/via/rules.mk +++ b/keyboards/coseyfannitutti/discipad/keymaps/via/rules.mk @@ -1,3 +1,2 @@ VIA_ENABLE = yes LTO_ENABLE = yes -MOUSEKEY_ENABLE = no diff --git a/keyboards/coseyfannitutti/discipline/keymaps/via/rules.mk b/keyboards/coseyfannitutti/discipline/keymaps/via/rules.mk index fcb7b9eab6..36b7ba9cbc 100644 --- a/keyboards/coseyfannitutti/discipline/keymaps/via/rules.mk +++ b/keyboards/coseyfannitutti/discipline/keymaps/via/rules.mk @@ -1,3 +1,2 @@ VIA_ENABLE = yes LTO_ENABLE = yes -MOUSEKEY_ENABLE = no diff --git a/keyboards/coseyfannitutti/romeo/keymaps/via/rules.mk b/keyboards/coseyfannitutti/romeo/keymaps/via/rules.mk index fcb7b9eab6..36b7ba9cbc 100644 --- a/keyboards/coseyfannitutti/romeo/keymaps/via/rules.mk +++ b/keyboards/coseyfannitutti/romeo/keymaps/via/rules.mk @@ -1,3 +1,2 @@ VIA_ENABLE = yes LTO_ENABLE = yes -MOUSEKEY_ENABLE = no diff --git a/keyboards/dm9records/plaid/keymaps/via/rules.mk b/keyboards/dm9records/plaid/keymaps/via/rules.mk index 930e3552ad..1e5b99807c 100644 --- a/keyboards/dm9records/plaid/keymaps/via/rules.mk +++ b/keyboards/dm9records/plaid/keymaps/via/rules.mk @@ -1,3 +1 @@ VIA_ENABLE = yes -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = no diff --git a/keyboards/gray_studio/space65/keymaps/via/rules.mk b/keyboards/gray_studio/space65/keymaps/via/rules.mk index 96d2d189b2..1e5b99807c 100644 --- a/keyboards/gray_studio/space65/keymaps/via/rules.mk +++ b/keyboards/gray_studio/space65/keymaps/via/rules.mk @@ -1,2 +1 @@ VIA_ENABLE = yes -MOUSEKEY_ENABLE = no diff --git a/keyboards/gray_studio/think65/hotswap/keymaps/via/rules.mk b/keyboards/gray_studio/think65/hotswap/keymaps/via/rules.mk index 96d2d189b2..e9977d2fe2 100644 --- a/keyboards/gray_studio/think65/hotswap/keymaps/via/rules.mk +++ b/keyboards/gray_studio/think65/hotswap/keymaps/via/rules.mk @@ -1,2 +1,3 @@ VIA_ENABLE = yes -MOUSEKEY_ENABLE = no + +CONSOLE_ENABLE = no diff --git a/keyboards/gray_studio/think65/solder/keymaps/via/rules.mk b/keyboards/gray_studio/think65/solder/keymaps/via/rules.mk index 96d2d189b2..44a2bc49cc 100644 --- a/keyboards/gray_studio/think65/solder/keymaps/via/rules.mk +++ b/keyboards/gray_studio/think65/solder/keymaps/via/rules.mk @@ -1,2 +1,4 @@ VIA_ENABLE = yes -MOUSEKEY_ENABLE = no +LTO_ENABLE = yes + +CONSOLE_ENABLE = no diff --git a/keyboards/jj4x4/keymaps/via/rules.mk b/keyboards/jj4x4/keymaps/via/rules.mk index 82fb80d5e7..1e5b99807c 100644 --- a/keyboards/jj4x4/keymaps/via/rules.mk +++ b/keyboards/jj4x4/keymaps/via/rules.mk @@ -1,3 +1 @@ VIA_ENABLE = yes -EXTRAKEY_ENABLE = no -MOUSEKEY_ENABLE = no diff --git a/keyboards/keycapsss/plaid_pad/keymaps/via/rules.mk b/keyboards/keycapsss/plaid_pad/keymaps/via/rules.mk index 00c11acccd..36b7ba9cbc 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/via/rules.mk +++ b/keyboards/keycapsss/plaid_pad/keymaps/via/rules.mk @@ -1,4 +1,2 @@ VIA_ENABLE = yes LTO_ENABLE = yes -EXTRAKEY_ENABLE = no -MOUSEKEY_ENABLE = no diff --git a/keyboards/kira80/keymaps/via/rules.mk b/keyboards/kira80/keymaps/via/rules.mk index 981c7ad4cf..36b7ba9cbc 100644 --- a/keyboards/kira80/keymaps/via/rules.mk +++ b/keyboards/kira80/keymaps/via/rules.mk @@ -1,3 +1,2 @@ VIA_ENABLE = yes LTO_ENABLE = yes -EXTRAKEY_ENABLE = no diff --git a/keyboards/lazydesigners/dimple/keymaps/via/rules.mk b/keyboards/lazydesigners/dimple/keymaps/via/rules.mk index f2e549c7b7..36b7ba9cbc 100644 --- a/keyboards/lazydesigners/dimple/keymaps/via/rules.mk +++ b/keyboards/lazydesigners/dimple/keymaps/via/rules.mk @@ -1,10 +1,2 @@ VIA_ENABLE = yes LTO_ENABLE = yes -# These features are not (yet) supported by VIA -LEADER_ENABLE = no -FAUXCLICKY_ENABLE = no -MIDI_ENABLE = no -BLUETOOTH_ENABLE = no -KEY_LOCK_ENABLE = no -TERMINAL_ENABLE = no -MOUSEKEY_ENABLE = no diff --git a/keyboards/lets_split/keymaps/via/rules.mk b/keyboards/lets_split/keymaps/via/rules.mk index 48e7e7f25f..92725994ca 100644 --- a/keyboards/lets_split/keymaps/via/rules.mk +++ b/keyboards/lets_split/keymaps/via/rules.mk @@ -1,4 +1,4 @@ RGBLIGHT_ENABLE = yes # LED strips VIA_ENABLE = yes LTO_ENABLE = yes -MOUSEKEY_ENABLE = no +COMMAND_ENABLE = no diff --git a/keyboards/noxary/220/keymaps/via/rules.mk b/keyboards/noxary/220/keymaps/via/rules.mk index c2e96d233b..09b3a0b6fe 100644 --- a/keyboards/noxary/220/keymaps/via/rules.mk +++ b/keyboards/noxary/220/keymaps/via/rules.mk @@ -1,5 +1,4 @@ VIA_ENABLE = yes -MOUSEKEY_ENABLE = no CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration LTO_ENABLE = yes diff --git a/keyboards/noxary/268/keymaps/via/rules.mk b/keyboards/noxary/268/keymaps/via/rules.mk index c2e96d233b..09b3a0b6fe 100644 --- a/keyboards/noxary/268/keymaps/via/rules.mk +++ b/keyboards/noxary/268/keymaps/via/rules.mk @@ -1,5 +1,4 @@ VIA_ENABLE = yes -MOUSEKEY_ENABLE = no CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration LTO_ENABLE = yes diff --git a/keyboards/noxary/268_2/keymaps/via/rules.mk b/keyboards/noxary/268_2/keymaps/via/rules.mk index 1974f5d3f5..09b3a0b6fe 100644 --- a/keyboards/noxary/268_2/keymaps/via/rules.mk +++ b/keyboards/noxary/268_2/keymaps/via/rules.mk @@ -1,5 +1,4 @@ VIA_ENABLE = yes -MOUSEKEY_ENABLE = no CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration -LTO_ENABLE = yes \ No newline at end of file +LTO_ENABLE = yes diff --git a/keyboards/noxary/280/keymaps/via/rules.mk b/keyboards/noxary/280/keymaps/via/rules.mk index c2e96d233b..09b3a0b6fe 100644 --- a/keyboards/noxary/280/keymaps/via/rules.mk +++ b/keyboards/noxary/280/keymaps/via/rules.mk @@ -1,5 +1,4 @@ VIA_ENABLE = yes -MOUSEKEY_ENABLE = no CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration LTO_ENABLE = yes diff --git a/keyboards/noxary/x268/keymaps/via/rules.mk b/keyboards/noxary/x268/keymaps/via/rules.mk index c2e96d233b..09b3a0b6fe 100644 --- a/keyboards/noxary/x268/keymaps/via/rules.mk +++ b/keyboards/noxary/x268/keymaps/via/rules.mk @@ -1,5 +1,4 @@ VIA_ENABLE = yes -MOUSEKEY_ENABLE = no CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration LTO_ENABLE = yes diff --git a/keyboards/percent/skog_lite/keymaps/via/rules.mk b/keyboards/percent/skog_lite/keymaps/via/rules.mk index 97010a994b..36b7ba9cbc 100644 --- a/keyboards/percent/skog_lite/keymaps/via/rules.mk +++ b/keyboards/percent/skog_lite/keymaps/via/rules.mk @@ -1,5 +1,2 @@ VIA_ENABLE = yes LTO_ENABLE = yes - -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = no diff --git a/keyboards/ramonimbao/herringbone/keymaps/via/rules.mk b/keyboards/ramonimbao/herringbone/keymaps/via/rules.mk index 930e3552ad..1e5b99807c 100644 --- a/keyboards/ramonimbao/herringbone/keymaps/via/rules.mk +++ b/keyboards/ramonimbao/herringbone/keymaps/via/rules.mk @@ -1,3 +1 @@ VIA_ENABLE = yes -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = no diff --git a/keyboards/reversestudio/decadepad/keymaps/via/rules.mk b/keyboards/reversestudio/decadepad/keymaps/via/rules.mk index bee21da528..1e5b99807c 100644 --- a/keyboards/reversestudio/decadepad/keymaps/via/rules.mk +++ b/keyboards/reversestudio/decadepad/keymaps/via/rules.mk @@ -1,2 +1 @@ VIA_ENABLE = yes -MOUSEKEY_ENABLE = no \ No newline at end of file diff --git a/keyboards/sck/osa/keymaps/via/rules.mk b/keyboards/sck/osa/keymaps/via/rules.mk index bee21da528..e9977d2fe2 100644 --- a/keyboards/sck/osa/keymaps/via/rules.mk +++ b/keyboards/sck/osa/keymaps/via/rules.mk @@ -1,2 +1,3 @@ VIA_ENABLE = yes -MOUSEKEY_ENABLE = no \ No newline at end of file + +CONSOLE_ENABLE = no diff --git a/keyboards/singa/keymaps/via/rules.mk b/keyboards/singa/keymaps/via/rules.mk index a823f59c43..8c8ed55d78 100644 --- a/keyboards/singa/keymaps/via/rules.mk +++ b/keyboards/singa/keymaps/via/rules.mk @@ -1,8 +1,6 @@ VIA_ENABLE = yes LTO_ENABLE = yes -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = no COMMAND_ENABLE = no CONSOLE_ENABLE = no diff --git a/keyboards/tgr/910/keymaps/via/rules.mk b/keyboards/tgr/910/keymaps/via/rules.mk index 9e1952e236..36b7ba9cbc 100644 --- a/keyboards/tgr/910/keymaps/via/rules.mk +++ b/keyboards/tgr/910/keymaps/via/rules.mk @@ -1,4 +1,2 @@ VIA_ENABLE = yes LTO_ENABLE = yes - -EXTRAKEY_ENABLE = no diff --git a/keyboards/tgr/910ce/keymaps/via/rules.mk b/keyboards/tgr/910ce/keymaps/via/rules.mk index 71c94085a9..36b7ba9cbc 100644 --- a/keyboards/tgr/910ce/keymaps/via/rules.mk +++ b/keyboards/tgr/910ce/keymaps/via/rules.mk @@ -1,4 +1,2 @@ VIA_ENABLE = yes LTO_ENABLE = yes - -EXTRAKEY_ENABLE = no # Audio control and System control \ No newline at end of file diff --git a/keyboards/tgr/jane/keymaps/via/rules.mk b/keyboards/tgr/jane/keymaps/via/rules.mk index 97010a994b..36b7ba9cbc 100644 --- a/keyboards/tgr/jane/keymaps/via/rules.mk +++ b/keyboards/tgr/jane/keymaps/via/rules.mk @@ -1,5 +1,2 @@ VIA_ENABLE = yes LTO_ENABLE = yes - -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = no diff --git a/keyboards/tgr/tris/keymaps/via/rules.mk b/keyboards/tgr/tris/keymaps/via/rules.mk index 7d47e6b726..36b7ba9cbc 100644 --- a/keyboards/tgr/tris/keymaps/via/rules.mk +++ b/keyboards/tgr/tris/keymaps/via/rules.mk @@ -1,4 +1,2 @@ VIA_ENABLE = yes LTO_ENABLE = yes - -EXTRAKEY_ENABLE = no diff --git a/keyboards/thevankeyboards/minivan/keymaps/via/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/via/rules.mk index f2e549c7b7..36b7ba9cbc 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/via/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/via/rules.mk @@ -1,10 +1,2 @@ VIA_ENABLE = yes LTO_ENABLE = yes -# These features are not (yet) supported by VIA -LEADER_ENABLE = no -FAUXCLICKY_ENABLE = no -MIDI_ENABLE = no -BLUETOOTH_ENABLE = no -KEY_LOCK_ENABLE = no -TERMINAL_ENABLE = no -MOUSEKEY_ENABLE = no diff --git a/keyboards/unikorn/keymaps/via/rules.mk b/keyboards/unikorn/keymaps/via/rules.mk index 7b439d08c6..58ecfdf5c2 100644 --- a/keyboards/unikorn/keymaps/via/rules.mk +++ b/keyboards/unikorn/keymaps/via/rules.mk @@ -1,7 +1,4 @@ VIA_ENABLE = yes LTO_ENABLE = yes -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = no RGBLIGHT_ENABLE = yes - diff --git a/keyboards/winkeyless/bface/keymaps/via/rules.mk b/keyboards/winkeyless/bface/keymaps/via/rules.mk index 97010a994b..36b7ba9cbc 100644 --- a/keyboards/winkeyless/bface/keymaps/via/rules.mk +++ b/keyboards/winkeyless/bface/keymaps/via/rules.mk @@ -1,5 +1,2 @@ VIA_ENABLE = yes LTO_ENABLE = yes - -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = no diff --git a/keyboards/winkeyless/bmini/keymaps/via/rules.mk b/keyboards/winkeyless/bmini/keymaps/via/rules.mk index 97010a994b..36b7ba9cbc 100644 --- a/keyboards/winkeyless/bmini/keymaps/via/rules.mk +++ b/keyboards/winkeyless/bmini/keymaps/via/rules.mk @@ -1,5 +1,2 @@ VIA_ENABLE = yes LTO_ENABLE = yes - -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = no diff --git a/keyboards/winkeyless/bminiex/keymaps/via/rules.mk b/keyboards/winkeyless/bminiex/keymaps/via/rules.mk index 97010a994b..36b7ba9cbc 100644 --- a/keyboards/winkeyless/bminiex/keymaps/via/rules.mk +++ b/keyboards/winkeyless/bminiex/keymaps/via/rules.mk @@ -1,5 +1,2 @@ VIA_ENABLE = yes LTO_ENABLE = yes - -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = no From 38162af5a70ced55f74019b75ed1e2f1e03ff62e Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 2 Nov 2020 16:17:05 -0800 Subject: [PATCH 024/114] [Keyboard] Fixes for PloopyCo mouse and readmes (#10841) --- keyboards/ploopyco/mouse/mouse.c | 2 +- keyboards/ploopyco/mouse/readme.md | 27 +------------------------- keyboards/ploopyco/mouse/rules.mk | 2 +- keyboards/ploopyco/trackball/readme.md | 2 -- 4 files changed, 3 insertions(+), 30 deletions(-) diff --git a/keyboards/ploopyco/mouse/mouse.c b/keyboards/ploopyco/mouse/mouse.c index fad4807c78..7e44feaf74 100644 --- a/keyboards/ploopyco/mouse/mouse.c +++ b/keyboards/ploopyco/mouse/mouse.c @@ -140,7 +140,7 @@ __attribute__((weak)) void process_mouse(report_mouse_t* mouse_report) { if (debug_mouse) dprintf("Cons] X: %d, Y: %d\n", data.dx, data.dy); // dprintf("Elapsed:%u, X: %f Y: %\n", i, pgm_read_byte(firmware_data+i)); - process_mouse_user(mouse_report, data.dx, data.dy); + process_mouse_user(mouse_report, data.dx, -data.dy); } } diff --git a/keyboards/ploopyco/mouse/readme.md b/keyboards/ploopyco/mouse/readme.md index a9b4b581a3..fd0f932c62 100644 --- a/keyboards/ploopyco/mouse/readme.md +++ b/keyboards/ploopyco/mouse/readme.md @@ -2,9 +2,8 @@ ![Ploopyco Mouse](https://www.ploopy.co/uploads/1/2/7/6/127652558/s905404500980887952_p10_i19_w1414.jpeg) -It's a DIY, QMK Powered Trackball!!!! +It's a DIY, QMK Powered Mouse!!!! -Everything works. However the scroll wheel has some issues and acts very odd. * Keyboard Maintainer: [PloopyCo](https://github.com/ploopyco), [Drashna Jael're](https://github.com/drashna/), [Germ](https://github.com/germ/) * Hardware Supported: ATMega32u4 8MHz(3.3v) @@ -51,27 +50,3 @@ To configure/set your own array, there are two defines to use, `PLOOPY_DPI_OPTIO The `PLOOPY_DPI_OPTIONS` array sets the values that you want to be able to cycle through, and the order they are in. The "default" define lets the firmware know which of these options is the default and should be loaded by default. The `DPI_CONFIG` macro will cycle through the values in the array, each time you hit it. And it stores this value in persistent memory, so it will load it the next time the device powers up. - - -# Programming QMK-DFU onto the PloopyCo Mouse - -If you would rather have DFU on this board, you can use the QMK-DFU bootloader on the device. To do so, you want to run: - - make ploopyco/trackball:default:production - -Once you have that, you'll need to [ISP Flash](https://docs.qmk.fm/#/isp_flashing_guide) the chip with the new bootloader hex file created (or the production hex), and set the fuses: - - -| Fuse | Setting | -|----------|------------------| -| Low | `0xDF` | -| High | `0xD8` or `0x98` | -| Extended | `0xCB` | - -Original (Caterina) settings: - -| Fuse | Setting | -|----------|------------------| -| Low | `0xFF` | -| High | `0xD8` | -| Extended | `0xFE` | diff --git a/keyboards/ploopyco/mouse/rules.mk b/keyboards/ploopyco/mouse/rules.mk index db72641d0c..863f335c85 100644 --- a/keyboards/ploopyco/mouse/rules.mk +++ b/keyboards/ploopyco/mouse/rules.mk @@ -5,7 +5,7 @@ MCU = atmega32u4 F_CPU = 8000000 # Bootloader selection -BOOTLOADER = qmk-dfu +BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable diff --git a/keyboards/ploopyco/trackball/readme.md b/keyboards/ploopyco/trackball/readme.md index a38fec21aa..bd88d5c5aa 100644 --- a/keyboards/ploopyco/trackball/readme.md +++ b/keyboards/ploopyco/trackball/readme.md @@ -4,8 +4,6 @@ It's a DIY, QMK Powered Trackball!!!! -Everything works. However the scroll wheel has some issues and acts very odd. - * Keyboard Maintainer: [PloopyCo](https://github.com/ploopyco), [Drashna Jael're](https://github.com/drashna/), [Germ](https://github.com/germ/) * Hardware Supported: ATMega32u4 8MHz(3.3v) * Hardware Availability: [Store](https://ploopy.co), [GitHub](https://github.com/ploopyco) From c60cafae419f8fe409f9cdb3274bbf6d02973f7c Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 3 Nov 2020 11:55:22 +1100 Subject: [PATCH 025/114] KC60 refactor (#10834) --- keyboards/kc60/config.h | 92 ++++-- keyboards/kc60/info.json | 394 ++++++++++++------------ keyboards/kc60/kc60.c | 21 +- keyboards/kc60/kc60.h | 72 ++--- keyboards/kc60/keymaps/default/keymap.c | 10 +- keyboards/kc60/keymaps/via/keymap.c | 10 +- keyboards/kc60/keymaps/ws2812/config.h | 4 - keyboards/kc60/keymaps/ws2812/keymap.c | 12 +- keyboards/kc60/readme.md | 4 + keyboards/kc60/rules.mk | 14 +- 10 files changed, 338 insertions(+), 295 deletions(-) delete mode 100644 keyboards/kc60/keymaps/ws2812/config.h diff --git a/keyboards/kc60/config.h b/keyboards/kc60/config.h index 7c6e695a45..c58aedd76f 100644 --- a/keyboards/kc60/config.h +++ b/keyboards/kc60/config.h @@ -20,12 +20,11 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x530A -#define PRODUCT_ID 0x6FFC -#define DEVICE_VER 0x0001 -#define MANUFACTURER NPKC -#define PRODUCT KC60 -#define DESCRIPTION QMK Firmware: KC60 +#define VENDOR_ID 0x530A +#define PRODUCT_ID 0x6FFC +#define DEVICE_VER 0x0001 +#define MANUFACTURER NPKC +#define PRODUCT KC60 /* key matrix size */ #define MATRIX_ROWS 5 @@ -45,39 +44,39 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3 } #define UNUSED_PINS -/* COL2ROW, ROW2COL*/ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B6 -#define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 5 +#define BACKLIGHT_BREATHING -#ifdef RGBLIGHT_ENABLE -# define RGB_DI_PIN F5 -# define RGBLED_NUM 16 // Number of LEDs. Change this to match your use case. +#define RGB_DI_PIN F5 +#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 */ +# 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 +//# 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 +//# 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 */ @@ -91,9 +90,52 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful 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 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/kc60/info.json b/keyboards/kc60/info.json index bd21b6a6c5..b6bdfe870e 100644 --- a/keyboards/kc60/info.json +++ b/keyboards/kc60/info.json @@ -7,205 +7,217 @@ "layouts": { "LAYOUT_all": { "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":"=", "x":12, "y":0}, - {"label":"Backspace", "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":"\\", "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":"ISO#", "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\\", "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":"HHKBFn", "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}, - {"label":"Space", "x":3.75, "y":4, "w":6.25}, - {"label":"Alt", "x":10, "y":4, "w":1.25}, - {"label":"GUI", "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} + {"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": 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": { "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":"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":"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":"K45", "x":3.75, "y":4, "w":6.25}, - {"label":"K49", "x":14, "y":0}, - {"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} + {"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": 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": 6.25}, + {"x": 14, "y": 0}, + {"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": [ - {"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":"-", "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}, - {"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} + {"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} ] } } diff --git a/keyboards/kc60/kc60.c b/keyboards/kc60/kc60.c index 09b924b286..52059a8c40 100644 --- a/keyboards/kc60/kc60.c +++ b/keyboards/kc60/kc60.c @@ -1,16 +1,13 @@ #include "kc60.h" -void led_set_kb(uint8_t usb_led) -{ - if (usb_led & (1< Date: Wed, 4 Nov 2020 10:39:11 +1100 Subject: [PATCH 026/114] Freyr refactor (#10833) --- keyboards/freyr/config.h | 108 +++- keyboards/freyr/freyr.c | 35 +- keyboards/freyr/freyr.h | 87 ++-- keyboards/freyr/info.json | 574 ++++++++++++---------- keyboards/freyr/keymaps/default/config.h | 19 - keyboards/freyr/keymaps/default/keymap.c | 43 +- keyboards/freyr/keymaps/default/readme.md | 2 +- keyboards/freyr/readme.md | 13 +- keyboards/freyr/rules.mk | 23 +- 9 files changed, 496 insertions(+), 408 deletions(-) delete mode 100644 keyboards/freyr/keymaps/default/config.h diff --git a/keyboards/freyr/config.h b/keyboards/freyr/config.h index ce30fd5344..a4e34ea477 100644 --- a/keyboards/freyr/config.h +++ b/keyboards/freyr/config.h @@ -20,15 +20,14 @@ along with this program. If not, see . #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 Freyr -#define DESCRIPTION Custom PCB TKL keyboard +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1895 +#define DEVICE_VER 0x0002 +#define MANUFACTURER HnahKB +#define PRODUCT Freyr /* key matrix size */ -#define MATRIX_ROWS 10 +#define MATRIX_ROWS 10 #define MATRIX_COLS 10 /* @@ -40,26 +39,103 @@ along with this program. If not, see . * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * -*/ + */ #define MATRIX_ROW_PINS { D3, B2, B1, B0, E6, F0, D2, D5, F4, F1 } #define MATRIX_COL_PINS { B4, D7, D6, D4, B5, C7, C6, F5, F6, F7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL*/ +/* 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 BACKLIGHT_PIN B6 -#define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 +#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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful 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 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + /* Bootmagic Lite key configuration */ -#define BOOTMAGIC_LITE_ROW 0 -#define BOOTMAGIC_LITE_COLUMN 0 +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/freyr/freyr.c b/keyboards/freyr/freyr.c index 68c26294f5..336b327110 100644 --- a/keyboards/freyr/freyr.c +++ b/keyboards/freyr/freyr.c @@ -13,33 +13,24 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include "freyr.h" - void matrix_init_kb(void) { - matrix_init_user(); - led_init_ports(); -}; + matrix_init_user(); + led_init_ports(); +} void led_init_ports(void) { - setPinOutput(B3); - setPinOutput(B7); + setPinOutput(B3); + setPinOutput(B7); } -void led_set_kb(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - // Turn Caps Lock LED on - writePinLow(B3); - } else { - // Turn Caps Lock LED off - writePinHigh(B3); - } - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - // Turn Scroll Lock LED on - writePinLow(B7); - } else { - // Turn Scroll Lock LED off - writePinHigh(B7); - } - led_set_user(usb_led); +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(B3, !led_state.caps_lock); + writePin(B7, !led_state.scroll_lock); + } + + return true; } diff --git a/keyboards/freyr/freyr.h b/keyboards/freyr/freyr.h index f18e74432f..ce41dfd255 100644 --- a/keyboards/freyr/freyr.h +++ b/keyboards/freyr/freyr.h @@ -13,60 +13,69 @@ * 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_all( \ - k00, k01, k02, k03, k04, k06, k07, k08,k09, k60, k61, k62, k63, k64, k65, k66, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, k74, k75, k76, k67, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, k83, k78, k77, k68, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, k92, k84, \ - k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, k85, k93, k79, \ - k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ + k00, k01, k02, k03, k04, k06, k07, k08, k09, k60, k61, k62, k63, k64, k65, k66, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, k74, k75, k76, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, k83, k78, k77, k68, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, k92, k84, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, k85, k93, k79, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ ) { \ - { k00, k01, k02, k03, k04, KC_NO, k06, k07, k08, k09 }, \ + { k00, k01, k02, k03, k04, XXX, 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 }, \ - { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49}, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49 }, \ { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59 }, \ { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69 }, \ { k70, k71, k72, k73, k74, k75, k76, k77, k78, k79 }, \ - { k80, k81, k82, k83, k84, k85, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { k90, k91, k92, k93, k94, k95, KC_NO, KC_NO, KC_NO, KC_NO } \ + { k80, k81, k82, k83, k84, k85, XXX, XXX, XXX, XXX }, \ + { k90, k91, k92, k93, k94, k95, XXX, XXX, XXX, XXX } \ } #define LAYOUT_tkl_ansi( \ - k00, k01, k02, k03, k04, k06, k07, k08,k09, k60, k61, k62, k63, k64, k65, k66, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, k75, k76, k67, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, k83, k78, k77, k68, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, k84, \ - k40, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, k93, k79, \ - k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ -) LAYOUT_all( \ - k00, k01, k02, k03, k04, k06, k07, k08,k09, k60, k61, k62, k63, k64, k65, k66, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, KC_NO, k75, k76, k67, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, k83, k78, k77, k68, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, KC_NO, k84, \ - k40, KC_NO, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, KC_NO, k93, k79, \ - k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ -) + k00, k01, k02, k03, k04, k06, k07, k08, k09, k60, k61, k62, k63, k64, k65, k66, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, k75, k76, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, k83, k78, k77, k68, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, k84, \ + k40, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, k93, k79, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ +) { \ + { k00, k01, k02, k03, k04, XXX, 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 }, \ + { k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69 }, \ + { k70, k71, k72, k73, XXX, k75, k76, k77, k78, k79 }, \ + { k80, k81, k82, k83, k84, XXX, XXX, XXX, XXX, XXX }, \ + { k90, k91, XXX, k93, k94, k95, XXX, XXX, XXX, XXX } \ +} #define LAYOUT_tkl_iso( \ - k00, k01, k02, k03, k04, k06, k07, k08,k09, k60, k61, k62, k63, k64, k65, k66, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, k75, k76, k67, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, k78, k77, k68, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, k92, k84, \ - k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, k93, k79, \ - k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ -) LAYOUT_all( \ - k00, k01, k02, k03, k04, k06, k07, k08,k09, k60, k61, k62, k63, k64, k65, k66, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, KC_NO, k75, k76, k67, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, KC_NO, k78, k77, k68, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, k92, k84, \ - k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, KC_NO, k93, k79, \ - k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ -) - + k00, k01, k02, k03, k04, k06, k07, k08, k09, k60, k61, k62, k63, k64, k65, k66, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k70, k71, k72, k73, k75, k76, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k80, k81, k82, k78, k77, k68, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k90, k91, k92, k84, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k95, k94, k93, k79, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k69 \ +) { \ + { k00, k01, k02, k03, k04, XXX, 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 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69 }, \ + { k70, k71, k72, k73, XXX, k75, k76, k77, k78, k79 }, \ + { k80, k81, k82, XXX, k84, XXX, XXX, XXX, XXX, XXX }, \ + { k90, k91, k92, k93, k94, k95, XXX, XXX, XXX, XXX } \ +} diff --git a/keyboards/freyr/info.json b/keyboards/freyr/info.json index 22fc96fa24..9f1b54d494 100644 --- a/keyboards/freyr/info.json +++ b/keyboards/freyr/info.json @@ -6,284 +6,320 @@ "height": 6.25, "layouts": { "LAYOUT_all": { - "key_count": 91, "layout": [ - {"label":"Esc (k00)", "x":0, "y":0}, - {"label":"F1 (k01)", "x":2, "y":0}, - {"label":"F2 (k02)", "x":3, "y":0}, - {"label":"F3 (k03)", "x":4, "y":0}, - {"label":"F4 (k04)", "x":5, "y":0}, - {"label":"F5 (k06)", "x":6.5, "y":0}, - {"label":"F6 (k07)", "x":7.5, "y":0}, - {"label":"F7 (k08)", "x":8.5, "y":0}, - {"label":"F8 (k09)", "x":9.5, "y":0}, - {"label":"F9 (k60)", "x":11, "y":0}, - {"label":"F10 (k61)", "x":12, "y":0}, - {"label":"F11 (k62)", "x":13, "y":0}, - {"label":"F12 (k63)", "x":14, "y":0}, - {"label":"PrtSc (k64)", "x":15.25, "y":0}, - {"label":"Scroll Lock (k65)", "x":16.25, "y":0}, - {"label":"Pause (k66)", "x":17.25, "y":0}, - {"label":"~ (k10)", "x":0, "y":1.25}, - {"label":"! (k11)", "x":1, "y":1.25}, - {"label":"@ (k12)", "x":2, "y":1.25}, - {"label":"# (k13)", "x":3, "y":1.25}, - {"label":"$ (k14)", "x":4, "y":1.25}, - {"label":"% (k15)", "x":5, "y":1.25}, - {"label":"^ (k16)", "x":6, "y":1.25}, - {"label":"& (k17)", "x":7, "y":1.25}, - {"label":"* (k18)", "x":8, "y":1.25}, - {"label":"( (k19)", "x":9, "y":1.25}, - {"label":") (k70)", "x":10, "y":1.25}, - {"label":"_ (k71)", "x":11, "y":1.25}, - {"label":"+ (k72)", "x":12, "y":1.25}, - {"label":"Backspace (k73)", "x":13, "y":1.25}, - {"label":"Backspace2 (k74)", "x":14, "y":1.25}, - {"label":"Insert (k75)", "x":15.25, "y":1.25}, - {"label":"Home (k76)", "x":16.25, "y":1.25}, - {"label":"PgUp (k67)", "x":17.25, "y":1.25}, - {"label":"Tab (k20)", "x":0, "y":2.25, "w":1.5}, - {"label":"Q (k21)", "x":1.5, "y":2.25}, - {"label":"W (k22)", "x":2.5, "y":2.25}, - {"label":"E (k23)", "x":3.5, "y":2.25}, - {"label":"R (k24)", "x":4.5, "y":2.25}, - {"label":"T (k25)", "x":5.5, "y":2.25}, - {"label":"Y (k26)", "x":6.5, "y":2.25}, - {"label":"U (k27)", "x":7.5, "y":2.25}, - {"label":"I (k28)", "x":8.5, "y":2.25}, - {"label":"O (k29)", "x":9.5, "y":2.25}, - {"label":"P (k80)", "x":10.5, "y":2.25}, - {"label":"{ (k81)", "x":11.5, "y":2.25}, - {"label":"} (k82)", "x":12.5, "y":2.25}, - {"label":"| (k83)", "x":13.5, "y":2.25, "w":1.5}, - {"label":"Delete (k78)", "x":15.25, "y":2.25}, - {"label":"End (k77)", "x":16.25, "y":2.25}, - {"label":"PgDn (k68)", "x":17.25, "y":2.25}, - {"label":"Caps Lock (k30)", "x":0, "y":3.25, "w":1.75}, - {"label":"A (k31)", "x":1.75, "y":3.25}, - {"label":"S (k32)", "x":2.75, "y":3.25}, - {"label":"D (k33)", "x":3.75, "y":3.25}, - {"label":"F (k34)", "x":4.75, "y":3.25}, - {"label":"G (k35)", "x":5.75, "y":3.25}, - {"label":"H (k36)", "x":6.75, "y":3.25}, - {"label":"J (k37)", "x":7.75, "y":3.25}, - {"label":"K (k38)", "x":8.75, "y":3.25}, - {"label":"L (k39)", "x":9.75, "y":3.25}, - {"label":": (k90)", "x":10.75, "y":3.25}, - {"label":"\" (k91)", "x":11.75, "y":3.25}, - {"label":"~ (k92)", "x":12.75, "y":3.25}, - {"label":"Enter (k84)", "x":13.75, "y":3.25, "w":1.25}, - {"label":"Shift (k40)", "x":0, "y":4.25, "w":1.25}, - {"label":"| (k41)", "x":1.25, "y":4.25}, - {"label":"Z (k42)", "x":2.25, "y":4.25}, - {"label":"X (k43)", "x":3.25, "y":4.25}, - {"label":"C (k44)", "x":4.25, "y":4.25}, - {"label":"V (k45)", "x":5.25, "y":4.25}, - {"label":"B (k46)", "x":6.25, "y":4.25}, - {"label":"N (k47)", "x":7.25, "y":4.25}, - {"label":"M (k48)", "x":8.25, "y":4.25}, - {"label":"< (k49)", "x":9.25, "y":4.25}, - {"label":"> (k95)", "x":10.25, "y":4.25}, - {"label":"? (k94)", "x":11.25, "y":4.25}, - {"label":"JP Ro (k85)", "x":12.25, "y":4.25}, - {"label":"Shift (k93)", "x":13.25, "y":4.25, "w":1.75}, - {"label":"Up (k79)", "x":16.25, "y":4.25}, - {"label":"Ctrl (k50)", "x":0, "y":5.25, "w":1.25}, - {"label":"Win (k51)", "x":1.25, "y":5.25, "w":1.25}, - {"label":"Alt (k52)", "x":2.5, "y":5.25, "w":1.25}, - {"label":"Space (k53)", "x":3.75, "y":5.25, "w":6.25}, - {"label":"Alt (k54)", "x":10, "y":5.25, "w":1.25}, - {"label":"Win (k55)", "x":11.25, "y":5.25, "w":1.25}, - {"label":"Menu (k56)", "x":12.5, "y":5.25, "w":1.25}, - {"label":"Ctrl (k57)", "x":13.75, "y":5.25, "w":1.25}, - {"label":"Left (k58)", "x":15.25, "y":5.25}, - {"label":"Down (k59)", "x":16.25, "y":5.25}, - {"label":"Right (k69)", "x":17.25, "y":5.25} + {"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.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + {"x": 4, "y": 1.25}, + {"x": 5, "y": 1.25}, + {"x": 6, "y": 1.25}, + {"x": 7, "y": 1.25}, + {"x": 8, "y": 1.25}, + {"x": 9, "y": 1.25}, + {"x": 10, "y": 1.25}, + {"x": 11, "y": 1.25}, + {"x": 12, "y": 1.25}, + {"x": 13, "y": 1.25}, + {"x": 14, "y": 1.25}, + + {"x": 15.25, "y": 1.25}, + {"x": 16.25, "y": 1.25}, + {"x": 17.25, "y": 1.25}, + + {"x": 0, "y": 2.25, "w": 1.5}, + {"x": 1.5, "y": 2.25}, + {"x": 2.5, "y": 2.25}, + {"x": 3.5, "y": 2.25}, + {"x": 4.5, "y": 2.25}, + {"x": 5.5, "y": 2.25}, + {"x": 6.5, "y": 2.25}, + {"x": 7.5, "y": 2.25}, + {"x": 8.5, "y": 2.25}, + {"x": 9.5, "y": 2.25}, + {"x": 10.5, "y": 2.25}, + {"x": 11.5, "y": 2.25}, + {"x": 12.5, "y": 2.25}, + {"x": 13.5, "y": 2.25, "w": 1.5}, + + {"x": 15.25, "y": 2.25}, + {"x": 16.25, "y": 2.25}, + {"x": 17.25, "y": 2.25}, + + {"x": 0, "y": 3.25, "w": 1.75}, + {"x": 1.75, "y": 3.25}, + {"x": 2.75, "y": 3.25}, + {"x": 3.75, "y": 3.25}, + {"x": 4.75, "y": 3.25}, + {"x": 5.75, "y": 3.25}, + {"x": 6.75, "y": 3.25}, + {"x": 7.75, "y": 3.25}, + {"x": 8.75, "y": 3.25}, + {"x": 9.75, "y": 3.25}, + {"x": 10.75, "y": 3.25}, + {"x": 11.75, "y": 3.25}, + {"x": 12.75, "y": 3.25}, + {"x": 13.75, "y": 3.25, "w": 1.25}, + + {"x": 0, "y": 4.25, "w": 1.25}, + {"x": 1.25, "y": 4.25}, + {"x": 2.25, "y": 4.25}, + {"x": 3.25, "y": 4.25}, + {"x": 4.25, "y": 4.25}, + {"x": 5.25, "y": 4.25}, + {"x": 6.25, "y": 4.25}, + {"x": 7.25, "y": 4.25}, + {"x": 8.25, "y": 4.25}, + {"x": 9.25, "y": 4.25}, + {"x": 10.25, "y": 4.25}, + {"x": 11.25, "y": 4.25}, + {"x": 12.25, "y": 4.25}, + {"x": 13.25, "y": 4.25, "w": 1.75}, + + {"x": 16.25, "y": 4.25}, + + {"x": 0, "y": 5.25, "w": 1.25}, + {"x": 1.25, "y": 5.25, "w": 1.25}, + {"x": 2.5, "y": 5.25, "w": 1.25}, + {"x": 3.75, "y": 5.25, "w": 6.25}, + {"x": 10, "y": 5.25, "w": 1.25}, + {"x": 11.25, "y": 5.25, "w": 1.25}, + {"x": 12.5, "y": 5.25, "w": 1.25}, + {"x": 13.75, "y": 5.25, "w": 1.25}, + + {"x": 15.25, "y": 5.25}, + {"x": 16.25, "y": 5.25}, + {"x": 17.25, "y": 5.25} ] }, "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.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":"Backspace", "x":13, "y":1.25, "w":2}, - {"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":2.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":2.75}, - {"label":"Up", "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}, - {"label":"Space", "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":"Left", "x":15.25, "y":5.25}, - {"label":"Down", "x":16.25, "y":5.25}, - {"label":"Right", "x":17.25, "y":5.25} + {"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.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + {"x": 4, "y": 1.25}, + {"x": 5, "y": 1.25}, + {"x": 6, "y": 1.25}, + {"x": 7, "y": 1.25}, + {"x": 8, "y": 1.25}, + {"x": 9, "y": 1.25}, + {"x": 10, "y": 1.25}, + {"x": 11, "y": 1.25}, + {"x": 12, "y": 1.25}, + {"x": 13, "y": 1.25, "w": 2}, + + {"x": 15.25, "y": 1.25}, + {"x": 16.25, "y": 1.25}, + {"x": 17.25, "y": 1.25}, + + {"x": 0, "y": 2.25, "w": 1.5}, + {"x": 1.5, "y": 2.25}, + {"x": 2.5, "y": 2.25}, + {"x": 3.5, "y": 2.25}, + {"x": 4.5, "y": 2.25}, + {"x": 5.5, "y": 2.25}, + {"x": 6.5, "y": 2.25}, + {"x": 7.5, "y": 2.25}, + {"x": 8.5, "y": 2.25}, + {"x": 9.5, "y": 2.25}, + {"x": 10.5, "y": 2.25}, + {"x": 11.5, "y": 2.25}, + {"x": 12.5, "y": 2.25}, + {"x": 13.5, "y": 2.25, "w": 1.5}, + + {"x": 15.25, "y": 2.25}, + {"x": 16.25, "y": 2.25}, + {"x": 17.25, "y": 2.25}, + + {"x": 0, "y": 3.25, "w": 1.75}, + {"x": 1.75, "y": 3.25}, + {"x": 2.75, "y": 3.25}, + {"x": 3.75, "y": 3.25}, + {"x": 4.75, "y": 3.25}, + {"x": 5.75, "y": 3.25}, + {"x": 6.75, "y": 3.25}, + {"x": 7.75, "y": 3.25}, + {"x": 8.75, "y": 3.25}, + {"x": 9.75, "y": 3.25}, + {"x": 10.75, "y": 3.25}, + {"x": 11.75, "y": 3.25}, + {"x": 12.75, "y": 3.25, "w": 2.25}, + + {"x": 0, "y": 4.25, "w": 2.25}, + {"x": 2.25, "y": 4.25}, + {"x": 3.25, "y": 4.25}, + {"x": 4.25, "y": 4.25}, + {"x": 5.25, "y": 4.25}, + {"x": 6.25, "y": 4.25}, + {"x": 7.25, "y": 4.25}, + {"x": 8.25, "y": 4.25}, + {"x": 9.25, "y": 4.25}, + {"x": 10.25, "y": 4.25}, + {"x": 11.25, "y": 4.25}, + {"x": 12.25, "y": 4.25, "w": 2.75}, + + {"x": 16.25, "y": 4.25}, + + {"x": 0, "y": 5.25, "w": 1.25}, + {"x": 1.25, "y": 5.25, "w": 1.25}, + {"x": 2.5, "y": 5.25, "w": 1.25}, + {"x": 3.75, "y": 5.25, "w": 6.25}, + {"x": 10, "y": 5.25, "w": 1.25}, + {"x": 11.25, "y": 5.25, "w": 1.25}, + {"x": 12.5, "y": 5.25, "w": 1.25}, + {"x": 13.75, "y": 5.25, "w": 1.25}, + + {"x": 15.25, "y": 5.25}, + {"x": 16.25, "y": 5.25}, + {"x": 17.25, "y": 5.25} ] }, "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.25}, - {"label":"!", "x":1, "y":1.25}, - {"label":"\"", "x":2, "y":1.25}, - {"label":"\u00a3", "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":"Backspace", "x":13, "y":1.25, "w":2}, - {"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":"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":"~", "x":12.75, "y":3.25}, - {"label":"Enter", "x":13.75, "y":2.25, "w":1.25, "h":2}, - {"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":2.75}, - {"label":"Up", "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}, - {"label":"Space", "x":3.75, "y":5.25, "w":6.25}, - {"label":"AltGr", "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":"Left", "x":15.25, "y":5.25}, - {"label":"Down", "x":16.25, "y":5.25}, - {"label":"Right", "x":17.25, "y":5.25} + {"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.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + {"x": 4, "y": 1.25}, + {"x": 5, "y": 1.25}, + {"x": 6, "y": 1.25}, + {"x": 7, "y": 1.25}, + {"x": 8, "y": 1.25}, + {"x": 9, "y": 1.25}, + {"x": 10, "y": 1.25}, + {"x": 11, "y": 1.25}, + {"x": 12, "y": 1.25}, + {"x": 13, "y": 1.25, "w": 2}, + + {"x": 15.25, "y": 1.25}, + {"x": 16.25, "y": 1.25}, + {"x": 17.25, "y": 1.25}, + + {"x": 0, "y": 2.25, "w": 1.5}, + {"x": 1.5, "y": 2.25}, + {"x": 2.5, "y": 2.25}, + {"x": 3.5, "y": 2.25}, + {"x": 4.5, "y": 2.25}, + {"x": 5.5, "y": 2.25}, + {"x": 6.5, "y": 2.25}, + {"x": 7.5, "y": 2.25}, + {"x": 8.5, "y": 2.25}, + {"x": 9.5, "y": 2.25}, + {"x": 10.5, "y": 2.25}, + {"x": 11.5, "y": 2.25}, + {"x": 12.5, "y": 2.25}, + + {"x": 15.25, "y": 2.25}, + {"x": 16.25, "y": 2.25}, + {"x": 17.25, "y": 2.25}, + + {"x": 0, "y": 3.25, "w": 1.75}, + {"x": 1.75, "y": 3.25}, + {"x": 2.75, "y": 3.25}, + {"x": 3.75, "y": 3.25}, + {"x": 4.75, "y": 3.25}, + {"x": 5.75, "y": 3.25}, + {"x": 6.75, "y": 3.25}, + {"x": 7.75, "y": 3.25}, + {"x": 8.75, "y": 3.25}, + {"x": 9.75, "y": 3.25}, + {"x": 10.75, "y": 3.25}, + {"x": 11.75, "y": 3.25}, + {"x": 12.75, "y": 3.25}, + {"x": 13.75, "y": 2.25, "w": 1.25, "h": 2}, + + {"x": 0, "y": 4.25, "w": 1.25}, + {"x": 1.25, "y": 4.25}, + {"x": 2.25, "y": 4.25}, + {"x": 3.25, "y": 4.25}, + {"x": 4.25, "y": 4.25}, + {"x": 5.25, "y": 4.25}, + {"x": 6.25, "y": 4.25}, + {"x": 7.25, "y": 4.25}, + {"x": 8.25, "y": 4.25}, + {"x": 9.25, "y": 4.25}, + {"x": 10.25, "y": 4.25}, + {"x": 11.25, "y": 4.25}, + {"x": 12.25, "y": 4.25, "w": 2.75}, + + {"x": 16.25, "y": 4.25}, + + {"x": 0, "y": 5.25, "w": 1.25}, + {"x": 1.25, "y": 5.25, "w": 1.25}, + {"x": 2.5, "y": 5.25, "w": 1.25}, + {"x": 3.75, "y": 5.25, "w": 6.25}, + {"x": 10, "y": 5.25, "w": 1.25}, + {"x": 11.25, "y": 5.25, "w": 1.25}, + {"x": 12.5, "y": 5.25, "w": 1.25}, + {"x": 13.75, "y": 5.25, "w": 1.25}, + + {"x": 15.25, "y": 5.25}, + {"x": 16.25, "y": 5.25}, + {"x": 17.25, "y": 5.25} ] } } diff --git a/keyboards/freyr/keymaps/default/config.h b/keyboards/freyr/keymaps/default/config.h deleted file mode 100644 index 348d7c5513..0000000000 --- a/keyboards/freyr/keymaps/default/config.h +++ /dev/null @@ -1,19 +0,0 @@ -/* 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/freyr/keymaps/default/keymap.c b/keyboards/freyr/keymaps/default/keymap.c index 008ae47d4a..f7ade501fb 100644 --- a/keyboards/freyr/keymaps/default/keymap.c +++ b/keyboards/freyr/keymaps/default/keymap.c @@ -13,32 +13,33 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include QMK_KEYBOARD_H -enum hnah_layers{ - _QWERTY, - _LOWER +enum layer_names { + _QWERTY, + _LOWER }; #define LOWER MO(_LOWER) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = 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_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_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, KC_APP, LOWER, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ - ), - [_LOWER] = LAYOUT_tkl_iso( - 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, KC_TRNS, KC_TRNS,\ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ - KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ) -}; + [_QWERTY] = 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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_APP, LOWER, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_LOWER] = LAYOUT_tkl_iso( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/freyr/keymaps/default/readme.md b/keyboards/freyr/keymaps/default/readme.md index 7a41bdd766..dfb2794c66 100644 --- a/keyboards/freyr/keymaps/default/readme.md +++ b/keyboards/freyr/keymaps/default/readme.md @@ -1 +1 @@ -# The default keymap for freyr \ No newline at end of file +# The default keymap for freyr diff --git a/keyboards/freyr/readme.md b/keyboards/freyr/readme.md index c6ddc30411..20fa484e8c 100644 --- a/keyboards/freyr/readme.md +++ b/keyboards/freyr/readme.md @@ -1,15 +1,20 @@ # freyr -![Freyr](https://i.imgur.com/MeOrzoI.jpg) +![Freyr](https://i.imgur.com/MeOrzoIl.jpg) + +Freyr is a tenkeyless keyboard, support ansi and iso layout. -Freyr is a tenkeyless keyboard, support ansi and iso layout. [Full layout here](http://www.keyboard-layout-editor.com/#/gists/438ef0c58c46ec28c80d9894ffcff177) -Keyboard Maintainer: [HnahKB](https://github.com/vuhopkep) -Hardware Supported: Freyr.revB PCB +* Keyboard Maintainer: [HnahKB](https://github.com/vuhopkep) +* Hardware Supported: Freyr.revB PCB Make example for this keyboard (after setting up your build environment): make freyr:default +Flashing example for this keyboard: + + make freyr:default:flash + 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/freyr/rules.mk b/keyboards/freyr/rules.mk index 20f9cd1305..bfd0c52626 100644 --- a/keyboards/freyr/rules.mk +++ b/keyboards/freyr/rules.mk @@ -2,34 +2,23 @@ MCU = atmega32u4 # Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys +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 # 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 +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output -# Supported layouts LAYOUTS = tkl_ansi tkl_iso From d46fa2274cac7d1dad2e6c684d3fabf729efaa2e Mon Sep 17 00:00:00 2001 From: katawajojo Date: Tue, 3 Nov 2020 16:39:12 -0800 Subject: [PATCH 027/114] Adds support for XD84 Pro (#9750) Co-authored-by: Ryan Co-authored-by: katawajojo Co-authored-by: katawajojo --- keyboards/xd84pro/config.h | 75 +++++ keyboards/xd84pro/dev.md | 28 ++ keyboards/xd84pro/info.json | 277 ++++++++++++++++++ keyboards/xd84pro/keymaps/default/keymap.c | 52 ++++ .../xd84pro/keymaps/default_iso/keymap.c | 54 ++++ keyboards/xd84pro/keymaps/via/keymap.c | 84 ++++++ keyboards/xd84pro/keymaps/via/readme.md | 1 + keyboards/xd84pro/keymaps/via/rules.mk | 2 + keyboards/xd84pro/readme.md | 24 ++ keyboards/xd84pro/rules.mk | 24 ++ keyboards/xd84pro/xd84pro.c | 30 ++ keyboards/xd84pro/xd84pro.h | 75 +++++ 12 files changed, 726 insertions(+) create mode 100644 keyboards/xd84pro/config.h create mode 100644 keyboards/xd84pro/dev.md create mode 100644 keyboards/xd84pro/info.json create mode 100644 keyboards/xd84pro/keymaps/default/keymap.c create mode 100644 keyboards/xd84pro/keymaps/default_iso/keymap.c create mode 100644 keyboards/xd84pro/keymaps/via/keymap.c create mode 100644 keyboards/xd84pro/keymaps/via/readme.md create mode 100644 keyboards/xd84pro/keymaps/via/rules.mk create mode 100644 keyboards/xd84pro/readme.md create mode 100644 keyboards/xd84pro/rules.mk create mode 100644 keyboards/xd84pro/xd84pro.c create mode 100644 keyboards/xd84pro/xd84pro.h diff --git a/keyboards/xd84pro/config.h b/keyboards/xd84pro/config.h new file mode 100644 index 0000000000..7fd4496fe3 --- /dev/null +++ b/keyboards/xd84pro/config.h @@ -0,0 +1,75 @@ +/* Copyright 2020 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 0x7844 // "xD" +#define PRODUCT_ID 0x8450 // 84 "P" +#define DEVICE_VER 0x0001 +#define MANUFACTURER KPrepublic +#define PRODUCT XD84 Pro + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 + +#define MATRIX_ROW_PINS { F4, D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3, F7 } +#define UNUSED_PINS { B0, E2 } + +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN F6 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 12 +// #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 + +/* number of backlight levels */ +#define BACKLIGHT_PIN F5 +#define BACKLIGHT_LEVELS 10 +#define BACKLIGHT_ON_STATE 0 +// #define BACKLIGHT_BREATHING + +/* 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 NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/xd84pro/dev.md b/keyboards/xd84pro/dev.md new file mode 100644 index 0000000000..6e7f4449e7 --- /dev/null +++ b/keyboards/xd84pro/dev.md @@ -0,0 +1,28 @@ +# XD84 Pro + +Development docs covering the following: +- ATmega32u4 +- RGB +- Backlight +- Light Through Cat + +### Bootloader +Default bootloader is `atmel-dfu`. +Reboot to bootloader via bridging 2 contacts points in the icsp header. +Flash using regular dfu methods. + +# RGB +- PIN F6 +- Number of RGB LED: 12 + +# Backlight +- PIN F5 + +# Light Through Cat +- PIN F5 + +# Caps Lock LED/Indicator +- PIN B2 + +## Return to stock firmware +The original TMK firmware is available at [xd.tkg.io](https://xd.tkg.io). diff --git a/keyboards/xd84pro/info.json b/keyboards/xd84pro/info.json new file mode 100644 index 0000000000..807f73181f --- /dev/null +++ b/keyboards/xd84pro/info.json @@ -0,0 +1,277 @@ +{ + "keyboard_name": "XD84 Pro", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT_all": { + "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":"Delete", "x":15, "y":0}, + {"label":"~", "x":0, "y":1}, + {"label":"1", "x":1, "y":1}, + {"label":"2", "x":2, "y":1}, + {"label":"3", "x":3, "y":1}, + {"label":"4", "x":4, "y":1}, + {"label":"5", "x":5, "y":1}, + {"label":"6", "x":6, "y":1}, + {"label":"7", "x":7, "y":1}, + {"label":"8", "x":8, "y":1}, + {"label":"9", "x":9, "y":1}, + {"label":"0", "x":10, "y":1}, + {"label":"_", "x":11, "y":1}, + {"label":"+", "x":12, "y":1}, + {"label":"Backspace", "x":13, "y":1}, + {"label":"Backspace", "x":14, "y":1}, + {"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":"\\", "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":1.25}, + {"label":"Shift", "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":"Up", "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":"Left", "x":13, "y":5}, + {"label":"Down", "x":14, "y":5}, + {"label":"Right", "x":15, "y":5} + ] + }, + "LAYOUT_75_ansi": { + "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":"Delete", "x":15, "y":0}, + {"label":"~", "x":0, "y":1}, + {"label":"1", "x":1, "y":1}, + {"label":"2", "x":2, "y":1}, + {"label":"3", "x":3, "y":1}, + {"label":"4", "x":4, "y":1}, + {"label":"5", "x":5, "y":1}, + {"label":"6", "x":6, "y":1}, + {"label":"7", "x":7, "y":1}, + {"label":"8", "x":8, "y":1}, + {"label":"9", "x":9, "y":1}, + {"label":"0", "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":"Up", "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":"Left", "x":13, "y":5}, + {"label":"Down", "x":14, "y":5}, + {"label":"Right", "x":15, "y":5} + ] + }, + "LAYOUT_75_iso": { + "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":"Delete", "x":15, "y":0}, + {"label":"~", "x":0, "y":1}, + {"label":"1", "x":1, "y":1}, + {"label":"2", "x":2, "y":1}, + {"label":"3", "x":3, "y":1}, + {"label":"4", "x":4, "y":1}, + {"label":"5", "x":5, "y":1}, + {"label":"6", "x":6, "y":1}, + {"label":"7", "x":7, "y":1}, + {"label":"8", "x":8, "y":1}, + {"label":"9", "x":9, "y":1}, + {"label":"0", "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":"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":"~", "x":12.75, "y":3}, + {"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2}, + {"label":"Page Down", "x":15, "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":"Up", "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":"Left", "x":13, "y":5}, + {"label":"Down", "x":14, "y":5}, + {"label":"Right", "x":15, "y":5} + ] + } + } +} diff --git a/keyboards/xd84pro/keymaps/default/keymap.c b/keyboards/xd84pro/keymaps/default/keymap.c new file mode 100644 index 0000000000..5229b7462e --- /dev/null +++ b/keyboards/xd84pro/keymaps/default/keymap.c @@ -0,0 +1,52 @@ +/* Copyright 2020 katawajojo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_75_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_SLCK, 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_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_75_ansi( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, +/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┤ */ + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──────────────├─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────────────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───────────┬─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ) +}; \ No newline at end of file diff --git a/keyboards/xd84pro/keymaps/default_iso/keymap.c b/keyboards/xd84pro/keymaps/default_iso/keymap.c new file mode 100644 index 0000000000..c27c169604 --- /dev/null +++ b/keyboards/xd84pro/keymaps/default_iso/keymap.c @@ -0,0 +1,54 @@ +/* Copyright 2020 katawajojo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 L1_RGUI LM(1, MOD_RGUI) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_75_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_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_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_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_NUHS, 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_END, +/* ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, L1_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ), + + [1] = LAYOUT_75_iso( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, +/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┤ */ + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ├─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ) +}; diff --git a/keyboards/xd84pro/keymaps/via/keymap.c b/keyboards/xd84pro/keymaps/via/keymap.c new file mode 100644 index 0000000000..214fff6f60 --- /dev/null +++ b/keyboards/xd84pro/keymaps/via/keymap.c @@ -0,0 +1,84 @@ +/* Copyright 2020 katawajojo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_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_SLCK, 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_BSLS, KC_ENT, KC_PGDN, +/* ├─────────────────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───────────┼─────────┼─────────┤ */ + KC_LSFT, 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_all( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, +/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┤ */ + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──────────────├─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────────────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───────────┬─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ), + + [2] = LAYOUT_all( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──────────────├─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────────────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───────────┬─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ), + + [3] = LAYOUT_all( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──────────────├─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────────────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───────────┬─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ), +}; diff --git a/keyboards/xd84pro/keymaps/via/readme.md b/keyboards/xd84pro/keymaps/via/readme.md new file mode 100644 index 0000000000..27cb965eba --- /dev/null +++ b/keyboards/xd84pro/keymaps/via/readme.md @@ -0,0 +1 @@ +# The VIA default layout diff --git a/keyboards/xd84pro/keymaps/via/rules.mk b/keyboards/xd84pro/keymaps/via/rules.mk new file mode 100644 index 0000000000..43061db1dd --- /dev/null +++ b/keyboards/xd84pro/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/xd84pro/readme.md b/keyboards/xd84pro/readme.md new file mode 100644 index 0000000000..76e83c6c5d --- /dev/null +++ b/keyboards/xd84pro/readme.md @@ -0,0 +1,24 @@ +# XD84 Pro + +![XD84 Pro](https://cdn.shopify.com/s/files/1/2711/4238/products/Hf5d4a9571a524cb78870def7403f5acc5.jpg?v=1574416288) + +Keyboard with 84 Keys, RGB LED Underglow, and USB-C Connection +- Designed by Xiudi +- Up to 87 keys + - iso and ansi support + +The silkscreen printing on the PCB refers to this as the "XD84 v2.0". + +* Keyboard Maintainer: QMK Community +* Hardware Supported: XD84 Pro +* Hardware Availability: [KPrepublic](https://kprepublic.com/products/xd84pro-xd84-pro-custom-mechanical-keyboard-kit-75-supports-tkg-tools-support-underglow-rgb-pcb-programmed-gh84-kle-type-c) + +Make example for this keyboard (after setting up your build environment): + + make xd84pro:default + +Flashing example for this keyboard: + + make xd84pro:default:flash + +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/xd84pro/rules.mk b/keyboards/xd84pro/rules.mk new file mode 100644 index 0000000000..1c94b3a766 --- /dev/null +++ b/keyboards/xd84pro/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +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 +# 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 +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = 75_ansi 75_iso diff --git a/keyboards/xd84pro/xd84pro.c b/keyboards/xd84pro/xd84pro.c new file mode 100644 index 0000000000..cba8a57f26 --- /dev/null +++ b/keyboards/xd84pro/xd84pro.c @@ -0,0 +1,30 @@ +/* Copyright 2020 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "xd84pro.h" + +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} +void led_init_ports(void) { + setPinOutput(B2); +} +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(B2, !led_state.caps_lock); + } + return false; +} \ No newline at end of file diff --git a/keyboards/xd84pro/xd84pro.h b/keyboards/xd84pro/xd84pro.h new file mode 100644 index 0000000000..eda75eac66 --- /dev/null +++ b/keyboards/xd84pro/xd84pro.h @@ -0,0 +1,75 @@ +/* Copyright 2020 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_all( \ + K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ + K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K316, \ + K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K416, \ + K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516, \ + K601, K602, K603, K607, K611, K612, K613, K614, K615, K616 \ +) { \ + { K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K116 }, \ + { K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216 }, \ + { K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K316 }, \ + { K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K416 }, \ + { K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516 }, \ + { K601, K602, K603, ____, ____, K607, K115, ____, K613, K215, K611, K612, K614, K615, K616 } \ +} + +#define LAYOUT_75_ansi( \ + K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ + K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K316, \ + K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, K416, \ + K501, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516, \ + K601, K602, K603, K607, K611, K612, K613, K614, K615, K616 \ +) { \ + { K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K116 }, \ + { K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216 }, \ + { K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K316 }, \ + { K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, ____, K414, K416 }, \ + { K501, ____, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516 }, \ + { K601, K602, K603, ____, ____, K607, K115, ____, K613, ____, K611, K612, K614, K615, K616 } \ +} + +#define LAYOUT_75_iso( \ + K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ + K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K316, \ + K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, K415, K416, \ + K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516, \ + K601, K602, K603, K607, K611, K612, K613, K614, K615, K616 \ +) { \ + { K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K116 }, \ + { K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216 }, \ + { K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, ____, K316 }, \ + { K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, K415, K416 }, \ + { K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516 }, \ + { K601, K602, K603, ____, ____, K607, K115, ____, K613, ____, K611, K612, K614, K615, K616 } \ +} From 7ef98e7f6164afd1d825a6ce8efa20560927fcc9 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 5 Nov 2020 06:18:47 +1100 Subject: [PATCH 028/114] CLI: Add `qmk clean` (#10785) --- docs/cli_commands.md | 10 ++++++++++ lib/python/qmk/cli/__init__.py | 1 + lib/python/qmk/cli/clean.py | 16 ++++++++++++++++ lib/python/qmk/tests/test_cli_commands.py | 6 ++++++ 4 files changed, 33 insertions(+) create mode 100644 lib/python/qmk/cli/clean.py diff --git a/docs/cli_commands.md b/docs/cli_commands.md index fe6f06632a..c970b1efa6 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md @@ -212,6 +212,16 @@ This command is directory aware. It will automatically fill in KEYBOARD and/or K qmk new-keymap [-kb KEYBOARD] [-km KEYMAP] ``` +## `qmk clean` + +This command cleans up the `.build` folder. If `--all` is passed, any .hex or .bin files present in the `qmk_firmware` directory will also be deleted. + +**Usage**: + +``` +qmk clean [-a] +``` + --- # Developer Commands diff --git a/lib/python/qmk/cli/__init__.py b/lib/python/qmk/cli/__init__.py index 47e1b44351..3868f94bb2 100644 --- a/lib/python/qmk/cli/__init__.py +++ b/lib/python/qmk/cli/__init__.py @@ -8,6 +8,7 @@ from milc import cli from . import c2json from . import cformat +from . import clean from . import compile from . import config from . import docs diff --git a/lib/python/qmk/cli/clean.py b/lib/python/qmk/cli/clean.py new file mode 100644 index 0000000000..ec6501b760 --- /dev/null +++ b/lib/python/qmk/cli/clean.py @@ -0,0 +1,16 @@ +"""Clean the QMK firmware folder of build artifacts. +""" +from qmk.commands import run +from milc import cli + +import shutil + + +@cli.argument('-a', '--all', arg_only=True, action='store_true', help='Remove *.hex and *.bin files in the QMK root as well.') +@cli.subcommand('Clean the QMK firmware folder of build artifacts.') +def clean(cli): + """Runs `make clean` (or `make distclean` if --all is passed) + """ + make_cmd = 'gmake' if shutil.which('gmake') else 'make' + + run([make_cmd, 'distclean' if cli.args.all else 'clean']) diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index 7c261db6cd..df5f047da7 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -184,3 +184,9 @@ def test_c2json_nocpp(): result = check_subcommand("c2json", "--no-cpp", "-kb", "handwired/onekey/pytest", "-km", "default", "keyboards/handwired/onekey/keymaps/pytest_nocpp/keymap.c") check_returncode(result) assert result.stdout.strip() == '{"keyboard": "handwired/onekey/pytest", "documentation": "This file is a keymap.json file for handwired/onekey/pytest", "keymap": "default", "layout": "LAYOUT", "layers": [["KC_ENTER"]]}' + + +def test_clean(): + result = check_subcommand('clean', '-a') + check_returncode(result) + assert result.stdout.count('done') == 2 From 262a60733483a38ed998b6dc6495f748ba6b71b0 Mon Sep 17 00:00:00 2001 From: Endemoniada Date: Wed, 4 Nov 2020 22:49:49 +0100 Subject: [PATCH 029/114] [Keymap] add ai03/polaris:mekberg (#10508) * Add keymap for Polaris * Change back to KC_NUBS for <> key * Add GPL header from default files * Change to new way of flashing in readme --- .../ai03/polaris/keymaps/mekberg/config.h | 22 +++++ .../ai03/polaris/keymaps/mekberg/keymap.c | 97 +++++++++++++++++++ .../ai03/polaris/keymaps/mekberg/readme.md | 14 +++ .../ai03/polaris/keymaps/mekberg/rules.mk | 2 + 4 files changed, 135 insertions(+) create mode 100644 keyboards/ai03/polaris/keymaps/mekberg/config.h create mode 100644 keyboards/ai03/polaris/keymaps/mekberg/keymap.c create mode 100644 keyboards/ai03/polaris/keymaps/mekberg/readme.md create mode 100644 keyboards/ai03/polaris/keymaps/mekberg/rules.mk diff --git a/keyboards/ai03/polaris/keymaps/mekberg/config.h b/keyboards/ai03/polaris/keymaps/mekberg/config.h new file mode 100644 index 0000000000..ef8caf8709 --- /dev/null +++ b/keyboards/ai03/polaris/keymaps/mekberg/config.h @@ -0,0 +1,22 @@ +/* +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 + +// Define some configuration for modtap behavior +// #define TAPPING_TERM 150 +#define PERMISSIVE_HOLD diff --git a/keyboards/ai03/polaris/keymaps/mekberg/keymap.c b/keyboards/ai03/polaris/keymaps/mekberg/keymap.c new file mode 100644 index 0000000000..fce03adfbe --- /dev/null +++ b/keyboards/ai03/polaris/keymaps/mekberg/keymap.c @@ -0,0 +1,97 @@ +/* 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 + +enum layer_names { + _BASE, + _NAV, + _FN +}; + +#define MY_LOCK C(LCMD(KC_L)) // Mac: Custom lock hotkey in BTT (when Alt/Command have been swapped in macOS) + +/* +KBD6x ANSI physical layout +1u == 8chars + ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ + | | | | | | | | | | | | | | | | + |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| + | 1,5u | | | | | | | | | | | | | 1,5u | + |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| + | 1,75u | | | | | | | | | | | | 1,25u | + |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| + | 2,25u | | | | | | | | | | | 1,75u | | + └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ + | | 1,25u | | 1,25u | | + └────────────────────────────────────────────────────────────────────────────────────────────────────┘ +*/ + +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_NUBS, KC_RBRC, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,5u | | | | | | | | | | | | | 1,5u | + LT(_NAV,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_NUHS, KC_BSPC, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,75u | | | | | | | | | | | | 1,25u | + 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, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,25u | | | | | | | | | | | 1,75u | | + 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(_FN), +// └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +// | | 1,25u | | 1,25u | | + XXXXXXX, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, KC_RGUI, XXXXXXX +// └────────────────────────────────────────────────────────────────────────────────────────────────────┘ + ), + [_NAV] = LAYOUT_60_tsangan_hhkb( +// ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +// | | | | | | | | | | | | | | | | + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_BSPC, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,5u | | | | | | | | | | | | | 1,5u | + _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, _______, _______, KC_DEL, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,75u | | | | | | | | | | | | 1,25u | + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,25u | | | | | | | | | | | 1,75u | | + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +// | | 1,25u | | 1,25u | | + XXXXXXX, _______, _______, _______, _______, _______, XXXXXXX +// └────────────────────────────────────────────────────────────────────────────────────────────────────┘ + ), + [_FN] = 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, _______, _______, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,5u | | | | | | | | | | | | | 1,5u | + _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,75u | | | | | | | | | | | | 1,25u | + KC_RCTL, KC_VOLD, KC_VOLU, KC_MUTE, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, MY_LOCK, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,25u | | | | | | | | | | | 1,75u | | + _______, BL_TOGG, BL_INC, BL_DEC, BL_STEP, _______, _______, _______, KC_MRWD, KC_MFFD, _______, _______, _______, +// └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +// | | 1,25u | | 1,25u | | + XXXXXXX, _______, _______, KC_MPLY, _______, _______, XXXXXXX +// └────────────────────────────────────────────────────────────────────────────────────────────────────┘ + ), +}; diff --git a/keyboards/ai03/polaris/keymaps/mekberg/readme.md b/keyboards/ai03/polaris/keymaps/mekberg/readme.md new file mode 100644 index 0000000000..b9ae9642f5 --- /dev/null +++ b/keyboards/ai03/polaris/keymaps/mekberg/readme.md @@ -0,0 +1,14 @@ +# General Information + +This is more or less a HHKB base layout, but with completely different Fn layers. I don't use most of the HHKB secondary key positions because, honestly, they make no sense to me at all. + +Fn key layer is focused mostly on keyboard firmware features (like RGB) as well as some of the necessary alternate functions. It also hold media controls, F-keys and Reset. + +Left Tab-Hold layer is focused on nav cluster functionality, and turns Backspace into Delete (and moves Backspace up into the top right 1u position). + + +# Build instructions + +To simply build the firmware file: `make clean && make ai03/polaris:mekberg` + +To build and immediately flash: `make clean && make ai03/polaris:mekberg:flash` diff --git a/keyboards/ai03/polaris/keymaps/mekberg/rules.mk b/keyboards/ai03/polaris/keymaps/mekberg/rules.mk new file mode 100644 index 0000000000..e47bb9e6df --- /dev/null +++ b/keyboards/ai03/polaris/keymaps/mekberg/rules.mk @@ -0,0 +1,2 @@ +BACKLIGHT_ENABLE = no # Disable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Disable keyboard RGB underglow From f12dcb0659918657d35dc599e69f1aec43a22e97 Mon Sep 17 00:00:00 2001 From: Brandon Schlack Date: Wed, 4 Nov 2020 21:55:03 -0800 Subject: [PATCH 030/114] [Keymap] add brandonschlack userspace and keymaps (#10411) --- .../tmov2/keymaps/brandonschlack/keymap.c | 173 ++++++++ .../keymaps/brandonschlack/keymap.c | 60 +++ .../romeo/keymaps/brandonschlack/keymap.c | 111 +++++ .../solder/keymaps/brandonschlack/config.h | 20 + .../solder/keymaps/brandonschlack/keymap.c | 80 ++++ .../solder/keymaps/brandonschlack/readme.md | 9 + .../solder/keymaps/brandonschlack/rules.mk | 2 + .../hotswap/keymaps/brandonschlack/keymap.c | 102 +++++ .../hotswap/keymaps/brandonschlack/rules.mk | 2 + .../rev2/keymaps/brandonschlack/keymap.c | 102 +++++ .../rev2/keymaps/brandonschlack/rules.mk | 3 + .../bdn9/keymaps/brandonschlack/config.h | 25 ++ .../bdn9/keymaps/brandonschlack/keymap.c | 393 ++++++++++++++++++ .../bdn9/keymaps/brandonschlack/readme.md | 107 +++++ .../bdn9/keymaps/brandonschlack/rules.mk | 11 + .../romac/keymaps/brandonschlack/keymap.c | 67 +++ .../romac/keymaps/brandonschlack/rules.mk | 8 + .../launchpad/keymaps/brandonschlack/config.h | 32 ++ .../launchpad/keymaps/brandonschlack/keymap.c | 213 ++++++++++ .../keymaps/brandonschlack/readme.md | 31 ++ .../launchpad/keymaps/brandonschlack/rules.mk | 13 + .../keymaps/brandonschlack/config.h | 19 + .../keymaps/brandonschlack/keymap.c | 170 ++++++++ .../keymaps/brandonschlack/rules.mk | 8 + .../adelais/keymaps/brandonschlack/config.h | 30 ++ .../adelais/keymaps/brandonschlack/keymap.c | 270 ++++++++++++ .../adelais/keymaps/brandonschlack/readme.md | 1 + .../nightmare/keymaps/brandonschlack/keymap.c | 195 +++++++++ .../keymaps/brandonschlack/readme.md | 20 + .../prime_e/keymaps/brandonschlack/config.h | 30 ++ .../prime_e/keymaps/brandonschlack/keymap.c | 95 +++++ .../prime_e/keymaps/brandonschlack/rules.mk | 2 + .../liminal/keymaps/brandonschlack/keymap.c | 115 +++++ .../tkc/osav2/keymaps/brandonschlack/config.h | 30 ++ .../tkc/osav2/keymaps/brandonschlack/keymap.c | 243 +++++++++++ .../tkc/osav2/keymaps/brandonschlack/rules.mk | 9 + .../neuron/keymaps/brandonschlack/keymap.c | 132 ++++++ .../60_ansi/brandonschlack-ansi/keymap.c | 83 ++++ .../60_ansi/brandonschlack-ansi/rules.mk | 1 + .../brandonschlack-split/keymap.c | 83 ++++ .../brandonschlack-split/rules.mk | 1 + .../brandonschlack-tsngn/keymap.c | 84 ++++ .../brandonschlack-tsngn/readme.md | 11 + .../brandonschlack-tsngn/rules.mk | 1 + .../65_ansi_blocker/brandonschlack/config.h | 64 +++ .../65_ansi_blocker/brandonschlack/keymap.c | 117 ++++++ .../65_ansi_blocker/brandonschlack/readme.md | 15 + .../65_ansi_blocker/brandonschlack/rules.mk | 7 + .../brandonschlack-split/config.h | 64 +++ .../brandonschlack-split/keymap.c | 104 +++++ .../brandonschlack-split/readme.md | 15 + .../brandonschlack-split/rules.mk | 2 + .../community/75_ansi/brandonschlack/keymap.c | 105 +++++ .../75_ansi/brandonschlack/readme.md | 7 + .../community/75_ansi/brandonschlack/rules.mk | 5 + .../ortho_4x12/brandonschlack/config.h | 55 +++ .../ortho_4x12/brandonschlack/keymap.c | 218 ++++++++++ .../ortho_4x12/brandonschlack/readme.md | 20 + .../ortho_4x12/brandonschlack/rules.mk | 10 + .../ortho_5x12/brandonschlack/config.h | 55 +++ .../ortho_5x12/brandonschlack/keymap.c | 214 ++++++++++ .../ortho_5x12/brandonschlack/readme.md | 19 + .../ortho_5x12/brandonschlack/rules.mk | 10 + .../tkl_ansi/brandonschlack/config.h | 20 + .../tkl_ansi/brandonschlack/keymap.c | 102 +++++ .../tkl_ansi/brandonschlack/readme.md | 55 +++ .../tkl_ansi/brandonschlack/rules.mk | 4 + users/brandonschlack/brandonschlack.c | 214 ++++++++++ users/brandonschlack/brandonschlack.h | 83 ++++ users/brandonschlack/config.h | 55 +++ users/brandonschlack/process_records.c | 172 ++++++++ users/brandonschlack/process_records.h | 152 +++++++ users/brandonschlack/readme.md | 48 +++ users/brandonschlack/rgb_bs.c | 146 +++++++ users/brandonschlack/rgb_bs.h | 35 ++ users/brandonschlack/rgb_theme.h | 51 +++ users/brandonschlack/rgb_theme_user.inc | 95 +++++ users/brandonschlack/rules.mk | 34 ++ users/brandonschlack/tap_dances.c | 91 ++++ users/brandonschlack/tap_dances.h | 52 +++ 80 files changed, 5712 insertions(+) create mode 100644 keyboards/cannonkeys/tmov2/keymaps/brandonschlack/keymap.c create mode 100644 keyboards/coseyfannitutti/discipline/keymaps/brandonschlack/keymap.c create mode 100644 keyboards/coseyfannitutti/romeo/keymaps/brandonschlack/keymap.c create mode 100644 keyboards/gray_studio/think65/solder/keymaps/brandonschlack/config.h create mode 100644 keyboards/gray_studio/think65/solder/keymaps/brandonschlack/keymap.c create mode 100644 keyboards/gray_studio/think65/solder/keymaps/brandonschlack/readme.md create mode 100644 keyboards/gray_studio/think65/solder/keymaps/brandonschlack/rules.mk create mode 100644 keyboards/kbdfans/kbd67/hotswap/keymaps/brandonschlack/keymap.c create mode 100644 keyboards/kbdfans/kbd67/hotswap/keymaps/brandonschlack/rules.mk create mode 100644 keyboards/kbdfans/kbd67/rev2/keymaps/brandonschlack/keymap.c create mode 100644 keyboards/kbdfans/kbd67/rev2/keymaps/brandonschlack/rules.mk create mode 100644 keyboards/keebio/bdn9/keymaps/brandonschlack/config.h create mode 100644 keyboards/keebio/bdn9/keymaps/brandonschlack/keymap.c create mode 100644 keyboards/keebio/bdn9/keymaps/brandonschlack/readme.md create mode 100644 keyboards/keebio/bdn9/keymaps/brandonschlack/rules.mk create mode 100644 keyboards/kingly_keys/romac/keymaps/brandonschlack/keymap.c create mode 100644 keyboards/kingly_keys/romac/keymaps/brandonschlack/rules.mk create mode 100644 keyboards/launchpad/keymaps/brandonschlack/config.h create mode 100644 keyboards/launchpad/keymaps/brandonschlack/keymap.c create mode 100644 keyboards/launchpad/keymaps/brandonschlack/readme.md create mode 100644 keyboards/launchpad/keymaps/brandonschlack/rules.mk create mode 100644 keyboards/maartenwut/wonderland/keymaps/brandonschlack/config.h create mode 100755 keyboards/maartenwut/wonderland/keymaps/brandonschlack/keymap.c create mode 100755 keyboards/maartenwut/wonderland/keymaps/brandonschlack/rules.mk create mode 100644 keyboards/mechlovin/adelais/keymaps/brandonschlack/config.h create mode 100644 keyboards/mechlovin/adelais/keymaps/brandonschlack/keymap.c create mode 100644 keyboards/mechlovin/adelais/keymaps/brandonschlack/readme.md create mode 100644 keyboards/nightmare/keymaps/brandonschlack/keymap.c create mode 100644 keyboards/nightmare/keymaps/brandonschlack/readme.md create mode 100644 keyboards/primekb/prime_e/keymaps/brandonschlack/config.h create mode 100644 keyboards/primekb/prime_e/keymaps/brandonschlack/keymap.c create mode 100644 keyboards/primekb/prime_e/keymaps/brandonschlack/rules.mk create mode 100644 keyboards/the_royal/liminal/keymaps/brandonschlack/keymap.c create mode 100644 keyboards/tkc/osav2/keymaps/brandonschlack/config.h create mode 100755 keyboards/tkc/osav2/keymaps/brandonschlack/keymap.c create mode 100755 keyboards/tkc/osav2/keymaps/brandonschlack/rules.mk create mode 100644 keyboards/walletburner/neuron/keymaps/brandonschlack/keymap.c create mode 100644 layouts/community/60_ansi/brandonschlack-ansi/keymap.c create mode 100644 layouts/community/60_ansi/brandonschlack-ansi/rules.mk create mode 100644 layouts/community/60_ansi_split_bs_rshift/brandonschlack-split/keymap.c create mode 100644 layouts/community/60_ansi_split_bs_rshift/brandonschlack-split/rules.mk create mode 100644 layouts/community/60_tsangan_hhkb/brandonschlack-tsngn/keymap.c create mode 100644 layouts/community/60_tsangan_hhkb/brandonschlack-tsngn/readme.md create mode 100644 layouts/community/60_tsangan_hhkb/brandonschlack-tsngn/rules.mk create mode 100644 layouts/community/65_ansi_blocker/brandonschlack/config.h create mode 100644 layouts/community/65_ansi_blocker/brandonschlack/keymap.c create mode 100644 layouts/community/65_ansi_blocker/brandonschlack/readme.md create mode 100644 layouts/community/65_ansi_blocker/brandonschlack/rules.mk create mode 100644 layouts/community/65_ansi_blocker_split_bs/brandonschlack-split/config.h create mode 100644 layouts/community/65_ansi_blocker_split_bs/brandonschlack-split/keymap.c create mode 100644 layouts/community/65_ansi_blocker_split_bs/brandonschlack-split/readme.md create mode 100644 layouts/community/65_ansi_blocker_split_bs/brandonschlack-split/rules.mk create mode 100644 layouts/community/75_ansi/brandonschlack/keymap.c create mode 100644 layouts/community/75_ansi/brandonschlack/readme.md create mode 100644 layouts/community/75_ansi/brandonschlack/rules.mk create mode 100644 layouts/community/ortho_4x12/brandonschlack/config.h create mode 100644 layouts/community/ortho_4x12/brandonschlack/keymap.c create mode 100644 layouts/community/ortho_4x12/brandonschlack/readme.md create mode 100644 layouts/community/ortho_4x12/brandonschlack/rules.mk create mode 100644 layouts/community/ortho_5x12/brandonschlack/config.h create mode 100644 layouts/community/ortho_5x12/brandonschlack/keymap.c create mode 100644 layouts/community/ortho_5x12/brandonschlack/readme.md create mode 100644 layouts/community/ortho_5x12/brandonschlack/rules.mk create mode 100644 layouts/community/tkl_ansi/brandonschlack/config.h create mode 100644 layouts/community/tkl_ansi/brandonschlack/keymap.c create mode 100644 layouts/community/tkl_ansi/brandonschlack/readme.md create mode 100644 layouts/community/tkl_ansi/brandonschlack/rules.mk create mode 100644 users/brandonschlack/brandonschlack.c create mode 100644 users/brandonschlack/brandonschlack.h create mode 100644 users/brandonschlack/config.h create mode 100644 users/brandonschlack/process_records.c create mode 100644 users/brandonschlack/process_records.h create mode 100644 users/brandonschlack/readme.md create mode 100644 users/brandonschlack/rgb_bs.c create mode 100644 users/brandonschlack/rgb_bs.h create mode 100644 users/brandonschlack/rgb_theme.h create mode 100644 users/brandonschlack/rgb_theme_user.inc create mode 100644 users/brandonschlack/rules.mk create mode 100644 users/brandonschlack/tap_dances.c create mode 100644 users/brandonschlack/tap_dances.h diff --git a/keyboards/cannonkeys/tmov2/keymaps/brandonschlack/keymap.c b/keyboards/cannonkeys/tmov2/keymaps/brandonschlack/keymap.c new file mode 100644 index 0000000000..1d0cdf4f09 --- /dev/null +++ b/keyboards/cannonkeys/tmov2/keymaps/brandonschlack/keymap.c @@ -0,0 +1,173 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" + +/** + * Layer Names + * + * Layers mostly used for macro keys + */ +#define _REEDER _M1 +#define _NAV _M2 +#define _MOUSE _M3 + +/** + * Keycodes & Macros + */ +#define TG_BASE TO(_BASE) +#define TG_REDR TO(_REEDER) +#define TG_NAV TO(_NAV) +#define TG_MOUS TO(_MOUSE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /** + * Base + * ┌───┬┬┬─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│││Tab  │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │{ [│} ]│Bck│ + * ├───┼┼┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │PgU│││HyEsc │ A │ S │ D │ F │ G │ H │ J │ K │ L │: ;│" '│ Enter│ + * ├───┼┼┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤ + * │PgD│││Shift   │ Z │ X │ C │ V │ B │ N │ M │< ,│> .│? /│Shft│ Fn│ + * ├───┼┼┼┬┬┬┬┬┬┬┬┴──┬┴───┴┬──┴───┴─┬─┴───┴───┴┬──┴──┬┴──┬┼┬┬┬┬┼┬┬┬┤ + * │End│││││││││││Opt│Cmd  │        │          │  Cmd│Ctl│││││││││││ + * └───┴┴┴┴┴┴┴┴┴┴┴───┴─────┴────────┴──────────┴─────┴───┴┴┴┴┴┴┴┴┴┴┘ + */ + [_BASE] = LAYOUT_default( + KC_ESC, 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, HY_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_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, PLY_FN1, \ + KC_END, KC_LOPT, KC_LCMD, SPC_RAI, SPC_RAI, KC_RCMD, KC_RCTL \ + ), + /** + * Reeder + * ┌───┬┬┬─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ P │││     │   │   │   │   │   │   │   │   │   │   │   │   │   │ + * ├───┼┼┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │ K │││      │   │   │   │   │   │   │   │   │   │   │   │      │ + * ├───┼┼┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤ + * │ J │││        │   │   │   │   │   │   │   │   │   │   │    │   │ + * ├───┼┼┼┬┬┬┬┬┬┬┬┴──┬┴───┴┬──┴───┴─┬─┴───┴───┴┬──┴──┬┴──┬┼┬┬┬┬┼┬┬┬┤ + * │ N │││││││││││   │     │        │          │     │   │││││││││││ + * └───┴┴┴┴┴┴┴┴┴┴┴───┴─────┴────────┴──────────┴─────┴───┴┴┴┴┴┴┴┴┴┴┘ + */ + [_REEDER] = LAYOUT_default( \ + KC_P, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_K, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_J, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_N, _______, _______, _______, _______, _______, _______ \ + ), + /** + * Nav + * ┌───┬┬┬─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ → │││     │   │   │   │   │   │   │   │   │   │   │   │   │   │ + * ├───┼┼┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │ ↑ │││      │   │   │   │   │   │   │   │   │   │   │   │      │ + * ├───┼┼┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤ + * │ ↓ │││        │   │   │   │   │   │   │   │   │   │   │    │   │ + * ├───┼┼┼┬┬┬┬┬┬┬┬┴──┬┴───┴┬──┴───┴─┬─┴───┴───┴┬──┴──┬┴──┬┼┬┬┬┬┼┬┬┬┤ + * │ ← │││││││││││   │     │        │          │     │   │││││││││││ + * └───┴┴┴┴┴┴┴┴┴┴┴───┴─────┴────────┴──────────┴─────┴───┴┴┴┴┴┴┴┴┴┴┘ + */ + [_NAV] = LAYOUT_default( \ + KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_DOWN, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_LEFT, _______, _______, _______, _______, _______, _______ \ + ), + /** + * Mouse + * ┌───┬┬┬─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │WhU│││     │   │   │   │   │   │   │   │   │   │   │   │   │   │ + * ├───┼┼┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │ ↑ │││      │   │   │   │   │   │   │   │   │   │   │   │      │ + * ├───┼┼┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤ + * │ ↓ │││        │   │   │   │   │   │   │   │   │   │   │    │   │ + * ├───┼┼┼┬┬┬┬┬┬┬┬┴──┬┴───┴┬──┴───┴─┬─┴───┴───┴┬──┴──┬┴──┬┼┬┬┬┬┼┬┬┬┤ + * │WhD│││││││││││   │     │        │          │     │   │││││││││││ + * └───┴┴┴┴┴┴┴┴┴┴┴───┴─────┴────────┴──────────┴─────┴───┴┴┴┴┴┴┴┴┴┴┘ + */ + [_MOUSE] = LAYOUT_default( \ + MC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_DOWN, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + MC_WH_D, _______, _______, _______, _______, _______, _______ \ + ), + /** + * Lower + * ┌───┬┬┬─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Nxt│││Del  │BrD│BrU│Msn│LHP│   │   │   │   │   │   │ ↑ │Mut│SlD│ + * ├───┼┼┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │VlU│││HyCaps│   │   │NxW│PvT│Bck│Fwd│NxT│   │   │ ← │ → │ Play │ + * ├───┼┼┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤ + * │VlD│││        │   │   │   │1PX│1Ps│   │   │   │   │ ↓ │    │   │ + * ├───┼┼┼┬┬┬┬┬┬┬┬┴──┬┴───┴┬──┴───┴─┬─┴───┴───┴┬──┴──┬┴──┬┼┬┬┬┬┼┬┬┬┤ + * │Prv│││││││││││   │     │        │          │     │   │││││││││││ + * └───┴┴┴┴┴┴┴┴┴┴┴───┴─────┴────────┴──────────┴─────┴───┴┴┴┴┴┴┴┴┴┴┘ + */ + [_LOWER] = LAYOUT_default( \ + KC_MNXT, KC_DELT, KC_BRMD, KC_BRMU, MC_MSSN, MC_LHPD, _______, _______, _______, _______, _______, _______, KC_UP, KC_MUTE, MC_SLPD, \ + KC_VOLU, HY_CAPS, _______, _______, NXT_WIN, PRV_TAB, MC_BACK, MC_FWRD, NXT_TAB, _______, _______, KC_LEFT, KC_RGHT, KC_MPLY, \ + KC_VOLD, _______, XXXXXXX, _______, _______, _______, PX_AFLL, OP_AFLL, _______, _______, _______, _______, KC_DOWN, _______, _______, \ + KC_MPRV, _______, _______, _______, _______, _______, _______ \ + ), + + /** + * Raise + * ┌───┬┬┬─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Hom│││~ `  │! 1│@ 2│# 3│$ 4│% 5│^ 6│& 7│* 8│( 9│) 0│_ -│+ =│   │ + * ├───┼┼┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │PgU│││      │ F1│ F2│ F3│ F4│ F5│ F6│_ -│+ =│   │   │   │      │ + * ├───┼┼┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤ + * │PgD│││        │ F7│ F8│ F9│F10│F11│F12│   │   │   │| \│    │   │ + * ├───┼┼┼┬┬┬┬┬┬┬┬┴──┬┴───┴┬──┴───┴─┬─┴───┴───┴┬──┴──┬┴──┬┼┬┬┬┬┼┬┬┬┤ + * │End│││││││││││   │     │        │          │     │   │││││││││││ + * └───┴┴┴┴┴┴┴┴┴┴┴───┴─────┴────────┴──────────┴─────┴───┴┴┴┴┴┴┴┴┴┴┘ + */ + [_RAISE] = LAYOUT_default( \ + KC_HOME, 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_PGUP, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, _______, _______, _______, _______, \ + KC_PGDN, _______, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, KC_BSLS, _______, _______, \ + KC_END, _______, _______, _______, _______, _______, _______ \ + ), + /** + * Adjust + * ┌───┬┬┬─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Bse│││Make │   │   │EEP│RST│   │   │   │   │   │   │   │   │   │ + * ├───┼┼┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │Rdr│││      │   │   │   │   │   │   │   │   │   │   │   │      │ + * ├───┼┼┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤ + * │Nav│││        │   │   │   │   │   │   │   │   │   │   │    │   │ + * ├───┼┼┼┬┬┬┬┬┬┬┬┴──┬┴───┴┬──┴───┴─┬─┴───┴───┴┬──┴──┬┴──┬┼┬┬┬┬┼┬┬┬┤ + * │Mse│││││││││││   │     │        │          │     │   │││││││││││ + * └───┴┴┴┴┴┴┴┴┴┴┴───┴─────┴────────┴──────────┴─────┴───┴┴┴┴┴┴┴┴┴┴┘ + */ + [_ADJUST] = LAYOUT_default( \ + TG_BASE, QM_MAKE, _______, _______, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + TG_REDR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + TG_NAV, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + TG_MOUS, _______, _______, _______, _______, _______, _______ \ + ), +}; + +void keyboard_post_init_keymap(void) { + rgblight_disable_noeeprom(); +} + +layer_state_t layer_state_set_keymap(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/coseyfannitutti/discipline/keymaps/brandonschlack/keymap.c b/keyboards/coseyfannitutti/discipline/keymaps/brandonschlack/keymap.c new file mode 100644 index 0000000000..4c63a3e14a --- /dev/null +++ b/keyboards/coseyfannitutti/discipline/keymaps/brandonschlack/keymap.c @@ -0,0 +1,60 @@ +/* Copyright 2019 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Base Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │Esc│! 1│@ 2│# 3│$ 4│% 5│^ 6│& 7│* 8│( 9│) 0│_ -│+ =│ Bckspc│Hom│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │{ [│} ]│| \│PgU│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │HyCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │: ;│" '│ Enter│PgD│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │Shift │ Z │ X │ C │ V │ B │ N │ M │< ,│> .│? /│ Shift│ Up│End│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┼───┼───┤ + * │Ctrl│ Opt│ Cmd│ Space │ Cmd │FnPly│Lef│Dow│Rig│ + * └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┘ + */ +[_BASE] = LAYOUT_65_ansi_2_right_mods( \ + 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, \ + HY_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_LOPT, KC_LCMD, KC_SPC, KC_RCMD, PLY_FN1, KC_LEFT, KC_DOWN, KC_RGHT \ +), +/* Function Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │` ~│ F1│ F2│ F3│ F4│ F5│ F6│ F7│ F8│ F9│F10│F11│F12│ Del │SlD│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │F13│F14│F15│ LHP │VlU│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │VlD│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │RST│ │Mke│Prv│Nxt│Ply│ │PgU│Mut│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │Hom│PgD│End│ + * └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┘ + */ +[_FN1] = LAYOUT_65_ansi_2_right_mods( \ + 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_DELT, MC_SLPD, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_F13, KC_F14, KC_F15, MC_LHPD, KC_VOLU, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, \ + _______, _______, _______, _______, _______, RESET, _______, QM_MAKE, KC_MPRV, KC_MNXT, KC_MPLY, _______, KC_PGUP, KC_MUTE, \ + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ +) +}; diff --git a/keyboards/coseyfannitutti/romeo/keymaps/brandonschlack/keymap.c b/keyboards/coseyfannitutti/romeo/keymaps/brandonschlack/keymap.c new file mode 100644 index 0000000000..3be5d44ea3 --- /dev/null +++ b/keyboards/coseyfannitutti/romeo/keymaps/brandonschlack/keymap.c @@ -0,0 +1,111 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Base Layer +* ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ +* │Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Bspc│ +* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +* │HyEsc │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Enter│ +* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬──────┤ +* │Shift │ Z │ X │ C │ V │ B │ N │ M │< ,│> .│ ?/Sft│ +* ├────┬───┼───┼───┴───┴───┴───┴───┴───┴┬──┴─┬─┴─┬────┤ +* │Ctrl│Opt│Cmd│ Space │ Cmd│Opt│ Lwr│ +* └────┴───┴───┴────────────────────────┴────┴───┴────┘ +*/ +[_BASE] = LAYOUT_ansi_40( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + HY_ESC, 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, SF_SLSH, \ + KC_LCTL, KC_LOPT, KC_LCMD, SPC_RAI, KC_RCMD, KC_ROPT, LOWER \ +), +/* Lower +* ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ +* │Del │BrD│BrU│Msn│LHP│   │   │   │PgU│Hom│End│ SlpD│ +* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +* │HyCaps│Mut│VlU│NxW│PvT│Bck│Fwd│NxT│PgD│ ↑ │ Play│ +* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬──────┤ +* │ │Prv│VlD│Nxt│1PX│1Ps│   │ ← │ ↓ │ → │ │ +* ├────┬───┼───┼───┴───┴───┴───┴───┴───┴┬──┴─┬─┴─┬────┤ +* │ │ │ │ │ │ │ │ +* └────┴───┴───┴────────────────────────┴────┴───┴────┘ +*/ +[_LOWER] = LAYOUT_ansi_40( \ + KC_DELT, KC_BRMD, KC_BRMU, MC_MSSN, MC_LHPD, _______, _______, _______, KC_PGUP, KC_HOME, KC_END, MC_SLPD, \ + HY_CAPS, KC_MUTE, KC_VOLU, NXT_WIN, PRV_TAB, MC_BACK, MC_FWRD, NXT_TAB, KC_PGDN, KC_UP, KC_MPLY, \ + _______, KC_MPRV, KC_VOLD, KC_MNXT, PX_AFLL, OP_AFLL, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ +), +/* Raise +* ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ +* │~ `  │! 1│@ 2│# 3│$ 4│% 5│^ 6│& 7│* 8│( 9│) 0│ │ +* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +* │     │ F1│ F2│ F3│ F4│ F5│ F6│_ -│+ =│: ;│ " '│ +* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬──────┤ +* │ │ F7│ F8│ F9│F10│F11│F12│   │{ [│} ]│ |\Sft│ +* ├────┬───┼───┼───┴───┴───┴───┴───┴───┴┬──┴─┬─┴─┬────┤ +* │ │ │ │ │    │   │    │ +* └────┴───┴───┴────────────────────────┴────┴───┴────┘ +*/ +[_RAISE] = LAYOUT_ansi_40( \ + 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_F5, KC_F6, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_LBRC, KC_RBRC, SF_BSLS, \ + _______, _______, _______, _______, _______, _______, _______ \ +), +/* Adjust/Macro Layer +* ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ +* │Make │   │   │EEP│RST│ │ │ │ │ │ │     │ +* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +* │ │ │ │ │ │ │ │ │ │ │ │ +* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬──────┤ +* │ │ │ │ │ │ │ │ │ │ │ │ +* ├────┬───┼───┼───┴───┴───┴───┴───┴───┴┬──┴─┬─┴─┬────┤ +* │ │ │ │ │ │ │ │ +* └────┴───┴───┴────────────────────────┴────┴───┴────┘ +*/ +[_ADJUST] = LAYOUT_ansi_40( \ + QM_MAKE, _______, _______, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ +) +/* Blank Layer +* ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ +* │ │ │ │ │ │ │ │ │ │ │ │ │ +* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +* │ │ │ │ │ │ │ │ │ │ │ │ +* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬──────┤ +* │ │ │ │ │ │ │ │ │ │ │ │ +* ├────┬───┼───┼───┴───┴───┴───┴───┴───┴┬──┴─┬─┴─┬────┤ +* │ │ │ │ │ │ │ │ +* └────┴───┴───┴────────────────────────┴────┴───┴────┘ +*/ +/* +[BLANK] = LAYOUT_ansi_40( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ +) +*/ +}; + +layer_state_t layer_state_set_keymap(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/gray_studio/think65/solder/keymaps/brandonschlack/config.h b/keyboards/gray_studio/think65/solder/keymaps/brandonschlack/config.h new file mode 100644 index 0000000000..157b55d76d --- /dev/null +++ b/keyboards/gray_studio/think65/solder/keymaps/brandonschlack/config.h @@ -0,0 +1,20 @@ +/* Copyright 2019 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 RGBLIGHT_ANIMATIONS +#define RGBLIGHT_EFFECT_BREATHING // Only have Breathing Animation diff --git a/keyboards/gray_studio/think65/solder/keymaps/brandonschlack/keymap.c b/keyboards/gray_studio/think65/solder/keymaps/brandonschlack/keymap.c new file mode 100644 index 0000000000..5955401998 --- /dev/null +++ b/keyboards/gray_studio/think65/solder/keymaps/brandonschlack/keymap.c @@ -0,0 +1,80 @@ +/* Copyright 2019 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Base Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │Esc│! 1│@ 2│# 3│$ 4│% 5│^ 6│& 7│* 8│( 9│) 0│_ -│+ =│ Bckspc│PgU│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │{ [│} ]│| \│PgD│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │HyCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │: ;│" '│ Enter│ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ │ + * │Shift │ Z │ X │ C │ V │ B │ N │ M │< ,│> .│? /│ Shift│ Up│ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │Ctrl│ Opt│ Cmd│ Space │Cmd │FnPy│ │Lef│Dow│Rig│ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ + */ +[_BASE] = LAYOUT_65_ansi_blocker( \ + 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_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ + HY_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, \ + 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, XXXXXXX, \ + KC_LCTL, KC_LOPT, KC_LCMD, KC_SPC, KC_RCMD, PLY_FN1, KC_LEFT, KC_DOWN, KC_RGHT \ +), +/* Function Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │` ~│ F1│ F2│ F3│ F4│ F5│ F6│ F7│ F8│ F9│F10│F11│F12│ Delete│VlU│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │RMod │RH+│RS+│RV+│ │ │ │ │ │ │F13│F14│F15│ SlpD│VlD│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │RTgl │RH-│RS-│RV-│ │ │ │ │ │ │MNC│LHP│ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ │ + * │ │LYR│Thm│ │ │RST│ │Mke│Prv│Nxt│Ply│MteSft│PgU│ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │Hom│PgD│End│ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ + */ +[_FN1] = LAYOUT_65_ansi_blocker( \ + 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_DELT, KC_VOLU, \ + RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, KC_F13, KC_F14, KC_F15, MC_SLPD, KC_VOLD, \ + RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, MC_MSSN, MC_LHPD, _______, XXXXXXX, \ + _______, RGB_LYR, RGB_THM, _______, _______, RESET, _______, QM_MAKE, KC_MPRV, KC_MNXT, KC_MPLY, MUT_SFT, KC_PGUP, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ +), +/* Blank Layout + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ +[X] = LAYOUT_65_ansi_blocker( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), +*/ +}; diff --git a/keyboards/gray_studio/think65/solder/keymaps/brandonschlack/readme.md b/keyboards/gray_studio/think65/solder/keymaps/brandonschlack/readme.md new file mode 100644 index 0000000000..76174061a9 --- /dev/null +++ b/keyboards/gray_studio/think65/solder/keymaps/brandonschlack/readme.md @@ -0,0 +1,9 @@ +# brandonschlack's Think6.5 keymap + +My keymap for the Think6.5. Using the `LAYOUT_65_ansi_blocker` LAYOUT and based on my keyboard-agnostic layout, some small changes for the navigation keys not present due to the badge. + +## [Base Layer](http://www.keyboard-layout-editor.com/#/gists/b396fee9f49d6e9493876e82a8ee99ac) +![Base Layer](https://i.imgur.com/AZYVuZS.jpg) + +## [Function Layer](http://www.keyboard-layout-editor.com/#/gists/06e684133399bb63d8b72ac6982e0e68) +![Function Layer](https://i.imgur.com/GbOOxME.jpg) diff --git a/keyboards/gray_studio/think65/solder/keymaps/brandonschlack/rules.mk b/keyboards/gray_studio/think65/solder/keymaps/brandonschlack/rules.mk new file mode 100644 index 0000000000..4ce80104ef --- /dev/null +++ b/keyboards/gray_studio/think65/solder/keymaps/brandonschlack/rules.mk @@ -0,0 +1,2 @@ +# Build Options +MOUSEKEY_ENABLE = no # Don't need mouse keys diff --git a/keyboards/kbdfans/kbd67/hotswap/keymaps/brandonschlack/keymap.c b/keyboards/kbdfans/kbd67/hotswap/keymaps/brandonschlack/keymap.c new file mode 100644 index 0000000000..a73c961db0 --- /dev/null +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/brandonschlack/keymap.c @@ -0,0 +1,102 @@ +/* Copyright 2019 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Base Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│! 1│@ 2│# 3│$ 4│% 5│^ 6│& 7│* 8│( 9│) 0│_ -│+ =│| \│~ `│Hom│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │{ [│} ]│ Bspc│PgU│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │: ;│" '│ Enter│PgD│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │Shift │ Z │ X │ C │ V │ B │ N │ M │< ,│> .│? /│ Shift│ Up│End│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │Ctrl│ Opt│ Cmd│ Space │Cmd │FnPy│ │Lef│Dow│Rig│ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ + */ +[_BASE] = 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, \ + HY_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_LOPT, KC_LCMD, KC_SPC, KC_RCMD, PLY_FN1, KC_LEFT, KC_DOWN, KC_RGHT), + +/* Function Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │MKE│ F1│ F2│ F3│ F4│ F5│ F6│ F7│ F8│ F9│F10│F11│F12│LHP│MSN│SLP│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ │ │ │ │RST│ │ │ │ │ │F13│F14│F15│ Del│VlU│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │KMP│ │ │ │ Adjust │VlD│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │VRN│ │ │ │Prv│Nxt│Ply│ │PgU│Mut│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │Hom│PgD│End│ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ + */ +[_FN1] = LAYOUT( + QM_MAKE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MC_LHPD, MC_MSSN, MC_SLPD, \ + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, KC_F13, KC_F14, KC_F15, KC_DEL, KC_VOLU, \ + _______, _______, _______, _______, _______, _______, _______, _______, QM_KYMP, _______, _______, _______, TG_ADJT, KC_VOLD, \ + _______, _______, _______, _______, QM_VRSN, _______, _______, _______, KC_MPRV, KC_MNXT, KC_MPLY, _______, KC_PGUP, KC_MUTE, \ + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END ), + +/* Adjust Layer Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ │ │ │EEP│RST│ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ Adjust │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ + */ +[_ADJUST] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, EEP_RST, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG_ADJT, XXXXXXX, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, \ + _______, _______, _______, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX), +}; + +/* Blank Template + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ + */ +/* +[_BLANK] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; +*/ diff --git a/keyboards/kbdfans/kbd67/hotswap/keymaps/brandonschlack/rules.mk b/keyboards/kbdfans/kbd67/hotswap/keymaps/brandonschlack/rules.mk new file mode 100644 index 0000000000..f242464498 --- /dev/null +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/brandonschlack/rules.mk @@ -0,0 +1,2 @@ +# Build Options +BOOTMAGIC_ENABLE = full # Use full Bootmagic diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/brandonschlack/keymap.c b/keyboards/kbdfans/kbd67/rev2/keymaps/brandonschlack/keymap.c new file mode 100644 index 0000000000..235cb2e87e --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/brandonschlack/keymap.c @@ -0,0 +1,102 @@ +/* Copyright 2019 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Base Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│! 1│@ 2│# 3│$ 4│% 5│^ 6│& 7│* 8│( 9│) 0│_ -│+ =│| \│~ `│Hom│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │{ [│} ]│ Bspc│PgU│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │: ;│" '│ Enter│PgD│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │Shift │ Z │ X │ C │ V │ B │ N │ M │< ,│> .│? /│ Shift│ Up│End│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │Ctrl│ Opt│ Cmd│ Space │Cmd │FnPy│ │Lef│Dow│Rig│ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ + */ +[_BASE] = 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_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, \ + HY_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, 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_END, \ + KC_LCTL, KC_LOPT, KC_LCMD, XXXXXXX, KC_SPC, XXXXXXX, KC_RCMD, PLY_FN1, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT), + +/* Function Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │MKE│ F1│ F2│ F3│ F4│ F5│ F6│ F7│ F8│ F9│F10│F11│F12│LHP│MSN│SLP│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │RMod │RH+│RS+│RV+│RST│ │ │ │ │ │F13│F14│F15│ Del│VlU│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │RH-│RS-│RV-│ │ │ │ │KMP│ │ │ │ Adjust │VlD│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │RTg│RLy│RTh│VRN│ │ │ │Prv│Nxt│Ply│ │PgU│Mut│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │Hom│PgD│End│ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ + */ +[_FN1] = LAYOUT_all( + QM_MAKE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MC_LHPD, MC_MSSN, MC_SLPD, \ + RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RESET, _______, _______, _______, _______, _______, KC_F13, KC_F14, KC_F15, KC_DEL, KC_VOLU, \ + _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, QM_KYMP, _______, _______, _______, TG_ADJT, KC_VOLD, \ + _______, XXXXXXX, RGB_TOG, RGB_LYR, RGB_THM, QM_VRSN, _______, _______, _______, KC_MPRV, KC_MNXT, KC_MPLY, _______, KC_PGUP, KC_MUTE, \ + _______, _______, _______, XXXXXXX, _______, XXXXXXX, _______, _______, XXXXXXX, KC_HOME, KC_PGDN, KC_END ), + +/* Adjust Layer Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ │ │ │EEP│RST│ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ Adjust │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ + */ +[_ADJUST] = LAYOUT_all( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, EEP_RST, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG_ADJT, XXXXXXX, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, \ + _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX), +}; + +/* Blank Template + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ + */ +/* +[_BLANK] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; +*/ diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/brandonschlack/rules.mk b/keyboards/kbdfans/kbd67/rev2/keymaps/brandonschlack/rules.mk new file mode 100644 index 0000000000..348eeaee3d --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/brandonschlack/rules.mk @@ -0,0 +1,3 @@ +# Build Options +MOUSEKEY_ENABLE = no # Don't need mouse keys +BACKLIGHT_ENABLE = no # Backlights not installed diff --git a/keyboards/keebio/bdn9/keymaps/brandonschlack/config.h b/keyboards/keebio/bdn9/keymaps/brandonschlack/config.h new file mode 100644 index 0000000000..cde5051c8b --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/brandonschlack/config.h @@ -0,0 +1,25 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 ENCODER_DIRECTION_FLIP + +#undef RGBLIGHT_ANIMATIONS +#define RGBLIGHT_EFFECT_BREATHING // Only have Breathing Animation + +/* Mouse Keys Configuration */ +#define MK_3_SPEED +#define MK_W_INTERVAL_UNMOD 20 diff --git a/keyboards/keebio/bdn9/keymaps/brandonschlack/keymap.c b/keyboards/keebio/bdn9/keymaps/brandonschlack/keymap.c new file mode 100644 index 0000000000..443e8d0ae9 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/brandonschlack/keymap.c @@ -0,0 +1,393 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" + +/** + * Layer Names + */ +enum bdn9_layers { + _REEDER = 0, + _MEDIA, + _NAVI, + _KARABINER, + LR_NAV, + LR_REVIEW, + LR_EDIT +}; + +#define _AUDIO 13 +#define _LIGHT 14 + +/** + * Keycodes & Macros + */ +#define DF_REDR DF(_REEDER) // Set Default Layer to Reeder shortcuts +#define DF_MEDA DF(_MEDIA) // Set Default Layer to Media controls +#define DF_NAVI DF(_NAVI) // Set Default Layer to Navigation shortcuts +#define DF_KBNR DF(_KARABINER) // Set Default Layer to Basic Macro keys + +enum bdn9_keycodes { + TG_LNAV = KEYMAP_SAFE_RANGE, + TG_REVW, + TG_EDIT +}; + +/** + * Tap Dances + * + * Use tap dance for layer changes + */ +enum bdn9_dances { + TD_DTAP_ADIO = 0, + TD_DTAP_LGHT, + TD_DTAP_ADJT +}; +// Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_DTAP_ADIO] = ACTION_TAP_DANCE_TRIGGER_LAYER(DOUBLE_TAP, _AUDIO), + [TD_DTAP_LGHT] = ACTION_TAP_DANCE_TRIGGER_LAYER(DOUBLE_TAP, _LIGHT), + [TD_DTAP_ADJT] = ACTION_TAP_DANCE_TRIGGER_LAYER(DOUBLE_TAP, _ADJUST), +}; +// Tap Dance Aliases +#if defined(RGBLIGHT_ENABLE) +#define DTP_AVC TD(TD_DTAP_LGHT) // +#elif defined(AUDIO_ENABLE) +#define DTP_AVC TD(TD_DTAP_ADIO) +#endif +#define DTP_ADJ TD(TD_DTAP_ADJT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + Layer: Reeder + ┌───────────┐ ┌───────────┐ + │   Items   │  │    Subs   │ + │  Prv  Nxt │  │  Prv  Nxt │ + ├────────┬──┴──┴──┬────────┤ + │ VwBrsw │  Star  │  Sync  │ + ├────────┼────────┼────────┤ + │ CmdTab │ TgRead │  Clear │ + ├────────┼────────┼────────┤ + │ VwStard│ VwUnrd │  VwAll │ + └────────┴────────┴────────┘ + */ + [_REEDER] = LAYOUT( + KC_H, KC_S, KC_R, + CMD_TAB, KC_M, DTP_AVC, + G(KC_1), G(KC_2), DTP_ADJ + ), + /* + Layer: Media + ┌───────────┐  ┌───────────┐ + │    Vol    │  │   Track   │ + │  Prv  Nxt │  │  Prv  Nxt │ + ├────────┬──┴──┴──┬────────┤ + │  Mute  │ Player │  Sync  │ + ├────────┼────────┼────────┤ + │ YT<10s │ YT Ply │ YT>10s │ + ├────────┼────────┼────────┤ + │  Left  │  Spce  │  Rght  │ + └────────┴────────┴────────┘ + */ + [_MEDIA] = LAYOUT( + KC_MUTE, MC_PLYR, KC_MPLY, + KC_J, KC_K, DTP_AVC, + KC_LEFT, KC_SPC, DTP_ADJ + ), + /* + Layer: Navigation + ┌───────────┐  ┌───────────┐ + │  Scroll   │  │    Tab    │ + │  Up   Dn  │  │  Prv  Nxt │ + ├────────┬──┴──┴──┬────────┤ + │ ReOTab │ CmdTab │ ClsTab │ + ├────────┼────────┼────────┤ + │  PgDn  │   Up   │  PgUp  │ + ├────────┼────────┼────────┤ + │  Left  │  Down  │  Rght  │ + └────────┴────────┴────────┘ + */ + [_NAVI] = LAYOUT( + REO_TAB, CMD_TAB, CLS_TAB, + KC_PGDN, KC_UP, DTP_AVC, + KC_LEFT, KC_DOWN, DTP_ADJ + ), + /* + Layer: Macro/Karabiner + ┌───────────┐  ┌───────────┐ + │           │  │           │ + │   -    +  │  │   .    =  │ + ├────────┬──┴──┴──┬────────┤ + │    1   │    2   │    3   │ + ├────────┼────────┼────────┤ + │    4   │    5   │    6   │ + ├────────┼────────┼────────┤ + │    7   │    8   │    9   │ + └────────┴────────┴────────┘ + */ + [_KARABINER] = LAYOUT( + KC_P1, KC_P2, KC_P3, + KC_P4, KC_P5, DTP_AVC, + KC_P7, KC_P8, DTP_ADJ + ), + /* + Layer: Lightroom Navigation + ┌───────────┐  ┌───────────┐ + │ Thumbnail │  │ Scrl Grid │ + │ Dec   Inc │  │ Up     Dn │ + ├────────┬──┴──┴──┬────────┤ + │ TgRevw │CylGrdVw│ TgEdit │ + ├────────┼────────┼────────┤ + │  Start │   Up   │  End   │ + ├────────┼────────┼────────┤ + │  Left  │  Down  │  Rght  │ + └────────┴────────┴────────┘ + */ + [LR_NAV] = LAYOUT( + TG_REVW, KC_J, TG_EDIT, + KC_HOME, KC_UP, DTP_AVC, + KC_LEFT, KC_DOWN, DTP_ADJ + ), + /* + Layer: Review/Rate + ┌───────────┐  ┌───────────┐ + │   Stars   │  │   Flag    │ + │ Dec   Inc │  │ Dec   Inc │ + ├────────┬──┴──┴──┬────────┤ + │ TgLNav │ Yellow │ TgEdit │ + ├────────┼────────┼────────┤ + │ NoStar │  Green │ UnFlag │ + ├────────┼────────┼────────┤ + │  Left  │  Blue  │  Rght  │ + └────────┴────────┴────────┘ + */ + [LR_REVIEW] = LAYOUT( + TG_LNAV, KC_7, TG_EDIT, + KC_0, KC_8, DTP_AVC, + KC_LEFT, KC_6, DTP_ADJ + ), + /* + Layer: Edit/Develop + ┌───────────┐  ┌───────────┐ + │  Sliders  │  │   Value   │ + │ Prv   Nxt │  │ Dec   Inc │ + ├────────┬──┴──┴──┬────────┤ + │ TgRevw │ Bf/Aft │ TgLNav │ + ├────────┼────────┼────────┤ + │ FlgRjt │  Undo  │ FlgPkd │ + ├────────┼────────┼────────┤ + │  Left  │  Redo  │  Rght  │ + └────────┴────────┴────────┘ + */ + [LR_EDIT] = LAYOUT( + TG_REVW, KC_BSLS, TG_LNAV, + KC_X, MC_UNDO, DTP_AVC, + KC_LEFT, MC_REDO, DTP_ADJ + ), + /* + Layer: Light + ┌───────────┐  ┌───────────┐ + │  RGB Hue  │  │  RGB Sat  │ + │ Prv   Nxt │  │ Dec   Inc │ + ├────────┬──┴──┴──┬────────┤ + │ RGBTgl │  Val+  │ TgLNav │ + ├────────┼────────┼────────┤ + │  Mode- │  Val-  │  Mode+ │ + ├────────┼────────┼────────┤ + │ LyrTgl │ NxtThm │  XXXX  │ + └────────┴────────┴────────┘ + */ + [_LIGHT] = LAYOUT( + RGB_TOG, RGB_VAI, TG_LGHT, + RGB_RMOD,RGB_VAD, RGB_MOD, + RGB_LYR, RGB_THM, XXXXXXX + ), + /* + Layer: ADJUST + ┌───────────┐  ┌───────────┐ + │    XXXX   │  │   XXXX    │ + │           │  │           │ + ├────────┬──┴──┴──┬────────┤ + │  MAKE  │ Reeder │  Light │ + ├────────┼────────┼────────┤ + │  Media │  Navi  │  Macro │ + ├────────┼────────┼────────┤ + │ LR Rvw │ LR Nav │ LR Edt │ + └────────┴────────┴────────┘ + */ + [_ADJUST] = LAYOUT( + QM_MAKE, DF_REDR, TG_LGHT, + DF_MEDA, DF_NAVI, DF_KBNR, + TG_REVW, TG_LNAV, TG_EDIT + ), +}; + +void keyboard_post_init_keymap(void){ + // Debug to Console by default + debug_enable = true; +} + +/** + * Encoder + */ +const uint16_t PROGMEM encoders[][2][2] = { + [_REEDER] = {{ KC_K, KC_J }, { KC_P, KC_N }}, + [_MEDIA] = {{ KC_VOLD, KC_VOLU }, { KC_MPRV, KC_MNXT }}, + [_NAVI] = {{ MC_WH_U, MC_WH_D }, { PRV_TAB, NXT_TAB }}, + [_KARABINER] = {{ KC_PMNS, KC_PPLS }, { KC_PDOT, KC_PEQL }}, + [LR_NAV] = {{ KC_MINS, KC_EQL }, { KC_PGDN, KC_PGUP }}, + [LR_REVIEW] = {{ KC_LBRC, KC_RBRC }, { G(KC_DOWN), G(KC_UP) }}, + [LR_EDIT] = {{ KC_COMM, KC_DOT }, { KC_MINS, KC_EQL }}, +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + uint8_t layer = get_highest_layer(layer_state); + + switch (layer) { + case _AUDIO: + #ifdef AUDIO_ENABLE + #endif + break; + case _LIGHT: + #ifdef RGBLIGHT_ENABLE + switch (index) { + case 0: + if (clockwise) { + rgblight_increase_hue(); + } else { + rgblight_decrease_hue(); + } + break; + case 1: + if (clockwise) { + rgblight_increase_sat(); + } else { + rgblight_decrease_sat(); + } + break; + } + #endif + break; + default: + tap_code16(pgm_read_word(&encoders[layer][index][clockwise])); + break; + } +} + +/** + * Keycodes + */ +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case TG_LNAV: + if (!record->event.pressed) { + tap_code(KC_G); + layer_move(LR_NAV); + } + break; + case TG_REVW: + if (!record->event.pressed) { + tap_code(KC_E); + layer_move(LR_REVIEW); + } + break; + case TG_EDIT: + if (!record->event.pressed) { + tap_code(KC_D); + layer_move(LR_EDIT); + } + break; + } + return true; +} + +/** + * Layer Switch + */ +layer_state_t layer_state_set_keymap (layer_state_t state) { + switch (get_highest_layer(state)) { + case LR_NAV: + #if defined(RGBLIGHT_ENABLE) + rgb_layer_helper(HSV_TEAL); + #endif + break; + case LR_REVIEW: + #if defined(RGBLIGHT_ENABLE) + rgb_layer_helper(HSV_CYAN); + #endif + break; + case LR_EDIT: + #if defined(RGBLIGHT_ENABLE) + rgb_layer_helper(HSV_AZURE); + #endif + break; + default: + break; + } + return state; +} + +/** + * Tap Dances + */ +void process_tap_dance_keycode (bool reset, uint8_t toggle_layer) { + uint16_t keycode = 0; + switch (toggle_layer) { + case _LIGHT: + switch (get_highest_layer(layer_state)) { + case _REEDER: + case _MEDIA: + keycode = KC_L; + break; + case _NAVI: + keycode = KC_PGUP; + break; + case _KARABINER: + keycode = KC_P6; + break; + case LR_NAV: + keycode = KC_END; + case LR_REVIEW: + keycode = KC_U; + case LR_EDIT: + keycode = KC_P; + break; + } + break; + case _ADJUST: + switch (get_highest_layer(layer_state)) { + case _REEDER: + keycode = G(KC_3); + break; + case _KARABINER: + keycode = KC_P9; + break; + case _MEDIA: + case _NAVI: + case LR_NAV: + case LR_REVIEW: + case LR_EDIT: + keycode = KC_RGHT; + break; + } + break; + } + if (!reset) { + register_code16(keycode); + } else { + unregister_code16(keycode); + } +} diff --git a/keyboards/keebio/bdn9/keymaps/brandonschlack/readme.md b/keyboards/keebio/bdn9/keymaps/brandonschlack/readme.md new file mode 100644 index 0000000000..54e460c2d9 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/brandonschlack/readme.md @@ -0,0 +1,107 @@ +# brandonschlack's Macropad/Lightroom layout for BDN9 +##### 2 encoders required + +![brandonschlack BDN9](https://i.imgur.com/pai9M0m.jpg) + +I built this pad to match my Lightroom photo editing workflow using +[Lightroom Classic Keyboard shortcuts](https://helpx.adobe.com/lightroom-classic/help/keyboard-shortcuts.html), and added on general macropad layers along the way. + +I use macOS, so shortcuts and macros are configured as such. Encoder functionality is in the header of the tables, as clockwise/counterclockwise. + +--- + +## Macropad Layers + +### Reeder Layer +This layer is used for browsing [Reeder](https://reederapp.com/), an awesome RSS reader for Mac + +| Prev/Next Item | **Knobs** | Prev/Next Subscription | +| --- | --- | --- | +| Open Item in Browser | Star Item/Save for Later | Sync | +| Command+Tab | Toggle Read Status | Clear Read Items | +| Starred Items | Unread Items | All Items | + + +### Media Layer +This layer is used for media controls. Player button is a hotkey to focus the current media player with [BeardedSpice](https://beardedspice.github.io/) + +| Volume Down/Up | **Knobs** | Prev/Next Track | +| --- | --- | --- | +| Mute | Current Player | Play/Pause | +| YouTube Rewind 10s (J) | YouTube Play/Pause (K) | YouTube Forward 10s (L) | +| Left | Space | Right | + + +### Navigation Layer +This layer is used for general window navigation around macOS + +| Scroll Up/Down | **Knobs** | Next/Prev Tab | +| --- | --- | --- | +| Reopen Tab | Cmd+Tab | Close Tab | +| Page Down | Up | Page Up | +| Left | Down | Right | + + +### Macro Layer +This layer is used to send generic macro keys, meant to be remapped based on current app with [Karabiner](https://pqrs.org/osx/karabiner/) + +| +/- | **Knobs** | =/. | +| --- | --- | --- | +| 1 | 2 | 3 | +| 4 | 5 | 6 | +| 7 | 8 | 9 | + + +## Lightroom Layers + +### LR Navigation Layer +This layer is used for navigating Grid View in the Library Module. + +| Inc/Dec Thumbnail Size | **Knobs** | Scroll Up/Dn Grid Thumbnails | +| --- | --- | --- | +| Review Layer | Cycle Grid View options | Edit Layer | +| Start of Grid View | Up | End of Grid View | +| Left | Down | Right | + + +### Lightroom Review Layer +This layer is used for Reviewing, Rating, and Culling images with the Loupe View in the Library Module. + +| Inc/Dec Star Rating | **Knobs** | Inc/Dec Flag Status | +| --- | --- | --- | +| LR Navigation Layer | Yellow Label | Edit Layer | +| Remove Star Rating | Green Label | Unflag Photo | +| Left | Blue Label | Right | + + +### Lightroom Edit Layer +This layer is used for editing photos in the Develop Module + +| Next/Prev Basic Panel Settings | **Knobs** | Inc/Dec Selected Slider | +| --- | --- | --- | +| Review Layer | Toggle Before View | LR Navigation Layer | +| Flag Rejected | Undo | Flag Picked | +| Left | Redo | Right | + + +## Meta Layers + +### Light Layer +This layer is used to control lighting for the pad. Currently nothing is saved in EEPROM, so it will reset after power loss. Also currently my userspace layer colors take priority until I build out that feature. This layer is accessed with a double tap of the middle right key via [tap dance](https://docs.qmk.fm/#/feature_tap_dance). A triple tap of the middle right key will also toggle lights on/off. + +| Inc/Dec RGB Hue | **Knobs** | Inc/Dec RGB Saturation | +| --- | --- | --- | +| RGB Toggle | RGB Value Increase | Toggle Layer Off | +| RGB Mode Prev | RGB Value Decrease | RGB Mode Next | +| RGB Layer Indication | Cycle RGB Themes | XXX | + + +### Adjust Layer +This layer is used as a meta layer for the pad. This layer is accessed with a double tap of the bottom right key via [tap dance](https://docs.qmk.fm/#/feature_tap_dance). + +| XXX | **Knobs** | XXX | +| --- | --- | --- | +| MAKE | **Reeder** Layer | **Light** Layer | +| **Media** Layer | **Navigation** Layer | **Keypad** Layer | +| **Lightroom Review** Layer | **Lightroom Navigation** Layer | **Lightroom Edit** Layer | + diff --git a/keyboards/keebio/bdn9/keymaps/brandonschlack/rules.mk b/keyboards/keebio/bdn9/keymaps/brandonschlack/rules.mk new file mode 100644 index 0000000000..847ef9d368 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/brandonschlack/rules.mk @@ -0,0 +1,11 @@ +# Use macropad-specific defines, layers, functions. Flash bootloader with QM_MAKE +IS_MACROPAD = yes + +# Use dfu bootloader for Elite-C +BOOTLOADER = atmel-dfu + +# Build Options +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +COMMAND_ENABLE = no # Disable Command, breaks with Mouse Keys set to constant. +BACKLIGHT_ENABLE = no # No backlights installed +TAP_DANCE_ENABLE = yes # Use tap dance diff --git a/keyboards/kingly_keys/romac/keymaps/brandonschlack/keymap.c b/keyboards/kingly_keys/romac/keymaps/brandonschlack/keymap.c new file mode 100644 index 0000000000..b0e4d52143 --- /dev/null +++ b/keyboards/kingly_keys/romac/keymaps/brandonschlack/keymap.c @@ -0,0 +1,67 @@ +/* Copyright 2019 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" + +enum romac_layers { + NUMPAD = 0, + FN, + NUMLOCK, + KARABINER +}; + +#define DF_NMPD DF(NUMPAD) +#define DF_NMLK DF(NUMLOCK) +#undef DF_KBNR +#define DF_KBNR DF(KARABINER) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [NUMPAD] = LAYOUT( + KC_P7, KC_P8, KC_P9, \ + KC_P4, KC_P5, KC_P6, \ + KC_P1, KC_P2, KC_P3, \ + OSL(FN), KC_P0, KC_PDOT \ + ), + + [FN] = LAYOUT( + KC_PSLS, KC_PAST, KC_BSPC, \ + KC_TRNS, KC_TRNS, KC_PMNS, \ + DF_NMLK, DF_KBNR, KC_PPLS, \ + KC_TRNS, TG_ADJT, KC_PENT \ + ), + + [NUMLOCK] = LAYOUT( + KC_HOME, KC_UP, KC_PGUP, \ + KC_LEFT, CMD_TAB, KC_RGHT, \ + KC_END, KC_DOWN, KC_PGDN, \ + DF_NMPD, KC_INS, KC_DEL \ + ), + + [KARABINER] = LAYOUT( + KC_F13, KC_F14, KC_F15, \ + KC_F16, KC_F17, KC_F18, \ + KC_F19, KC_F20, KC_F21, \ + LT(_ADJUST,KC_F22), KC_F23, KC_F24 \ + ), + + [_ADJUST] = LAYOUT( + QM_MAKE, EEP_RST, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, \ + DF_NMPD, DF_NMLK, DF_KBNR, \ + KC_TRNS, XXXXXXX, XXXXXXX \ + ) +}; diff --git a/keyboards/kingly_keys/romac/keymaps/brandonschlack/rules.mk b/keyboards/kingly_keys/romac/keymaps/brandonschlack/rules.mk new file mode 100644 index 0000000000..719dbee401 --- /dev/null +++ b/keyboards/kingly_keys/romac/keymaps/brandonschlack/rules.mk @@ -0,0 +1,8 @@ +# Use macropad-specific defines, layers, functions. Flash bootloader with QM_MAKE +IS_MACROPAD = yes + +# Use dfu bootloader for Elite-C +BOOTLOADER = atmel-dfu + +# Build Options +# TAP_DANCE_ENABLE = yes # Use tap dance diff --git a/keyboards/launchpad/keymaps/brandonschlack/config.h b/keyboards/launchpad/keymaps/brandonschlack/config.h new file mode 100644 index 0000000000..6aaf996e57 --- /dev/null +++ b/keyboards/launchpad/keymaps/brandonschlack/config.h @@ -0,0 +1,32 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 + +/* Underlight Configuration */ +#ifdef RGB_DI_PIN + #undef RGB_DI_PIN + #define RGB_DI_PIN F4 + #undef RGBLED_NUM + #define RGBLED_NUM 2 // Number of LEDs +#endif +#define RGBLIGHT_EFFECT_BREATHING // Only have Breathing Animation +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* Mouse Keys Configuration */ +#define MK_3_SPEED +#define MK_W_INTERVAL_UNMOD 20 diff --git a/keyboards/launchpad/keymaps/brandonschlack/keymap.c b/keyboards/launchpad/keymaps/brandonschlack/keymap.c new file mode 100644 index 0000000000..1ef77ccc6e --- /dev/null +++ b/keyboards/launchpad/keymaps/brandonschlack/keymap.c @@ -0,0 +1,213 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" + +/** + * Layer Names + */ +#define _REEDER _BASE +enum bdn9_layers { + _MEDIA = KEYMAP_LAYERS, + _NAVI, + _KARABINER +}; + +/** + * Keycodes & Macros + */ +#define DF_REDR DF(_REEDER) // Set Default Layer to Reeder shortcuts +#define DF_MEDA DF(_MEDIA) // Set Default Layer to Media controls +#define DF_NAVI DF(_NAVI) // Set Default Layer to Navigation shortcuts +#define DF_KBNR DF(_KARABINER) // Set Default Layer to Basic Macro keys + +// Tap Dances +enum launchpad_dances { + TD_SHLD_LGHT = 0, + TD_SHLD_ADJT, + TD_REDR_H +}; +//Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_SHLD_LGHT] = ACTION_TAP_DANCE_TRIGGER_LAYER(SINGLE_HOLD, _LIGHT), + [TD_SHLD_ADJT] = ACTION_TAP_DANCE_TRIGGER_LAYER(SINGLE_HOLD, _ADJUST), + [TD_REDR_H] = ACTION_TAP_DANCE_DOUBLE(KC_H, KC_R) +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Reeder + * ┌──────┬──────┐ + * │CmdTab│ View │ + * ├──────┼──────┤ + * │PrvSub│PrvItm│ + * ├──────┼──────┤ + * │NxtSub│NxtItm│ + * ├──────┼──────┤ + * │ Clr │ Sync │ + * └──────┴──────┘ + */ +[_REEDER] = LAYOUT( \ + CMD_TAB, TD(TD_REDR_H), \ + KC_P, KC_K, \ + KC_N, KC_J, \ + TD(TD_SHLD_LGHT), TD(TD_SHLD_ADJT) \ +), + +/* Media + * ┌──────┬──────┐ + * │ Mute │ Play │ + * ├──────┼──────┤ + * │ Vol+ │PrvTrk│ + * ├──────┼──────┤ + * │ Vol- │NxtTrk│ + * ├──────┼──────┤ + * │ Spce │ Plyr │ + * └──────┴──────┘ + */ +[_MEDIA] = LAYOUT( \ + KC_MUTE, KC_MPLY, \ + KC_VOLU, KC_MNXT, \ + KC_VOLD, KC_MPRV, \ + TD(TD_SHLD_LGHT), TD(TD_SHLD_ADJT) \ +), + +/* Navigation + * ┌──────┬──────┐ + * │ PTab │ NTab │ + * ├──────┼──────┤ + * │ SclL │ SclU │ + * ├──────┼──────┤ + * │ SclR │ SclD │ + * ├──────┼──────┤ + * │LstTab│ClsTab│ + * └──────┴──────┘ + */ +[_NAVI] = LAYOUT( \ + PRV_TAB, NXT_TAB, \ + MC_WH_L, MC_WH_U, \ + MC_WH_R, MC_WH_D, \ + TD(TD_SHLD_LGHT), TD(TD_SHLD_ADJT) \ +), + +/* Macro + * ┌──────┬──────┐ + * │ 1 │ 2 │ + * ├──────┼──────┤ + * │ 3 │ 4 │ + * ├──────┼──────┤ + * │ 5 │ 6 │ + * ├──────┼──────┤ + * │ 7 │ 8 │ + * └──────┴──────┘ + */ +[_KARABINER] = LAYOUT( \ + KC_P1, KC_P2, \ + KC_P3, KC_P4, \ + KC_P5, KC_P6, \ + TD(TD_SHLD_LGHT), TD(TD_SHLD_ADJT) \ +), + +/* Lights + * ┌──────┬──────┐ + * │ THM+ │ HUE+ │ + * ├──────┼──────┤ + * │ SAT- │ SAT+ │ + * ├──────┼──────┤ + * │ VAL- │ VAL+ │ + * ├──────┼──────┤ + * │ XXXX │ Mde+ │ + * └──────┴──────┘ + */ +[_LIGHT] = LAYOUT( \ + RGB_THM, RGB_HUI, \ + RGB_SAD, RGB_SAI, \ + RGB_VAD, RGB_VAI, \ + XXXXXXX, RGB_MOD \ +), + +/* Adjust + * ┌──────┬──────┐ + * │ Make │ Rset │ + * ├──────┼──────┤ + * │ Redr │ Meda │ + * ├──────┼──────┤ + * │ Navi │ Mcro │ + * ├──────┼──────┤ + * │ Lght │ XXXX │ + * └──────┴──────┘ + */ +[_ADJUST] = LAYOUT( \ + QM_MAKE, RESET, \ + DF_REDR, DF_MEDA, \ + DF_NAVI, DF_KBNR, \ + TG_LGHT, XXXXXXX \ +) + +}; + +void matrix_init_keymap(void) { +} + +// Runs once after keyboard initializes +void keyboard_post_init_keymap(void) { +}; + +/** + * Tap Dances + */ +void process_tap_dance_keycode (bool reset, uint8_t toggle_layer) { + uint16_t keycode = 0; + switch (toggle_layer) { + case _LIGHT: + switch (get_highest_layer(layer_state)) { + case _REEDER: + keycode = KC_L; + break; + case _MEDIA: + keycode = KC_SPC; + break; + case _NAVI: + keycode = REO_TAB; + break; + case _KARABINER: + keycode = KC_P7; + break; + } + break; + case _ADJUST: + switch (get_highest_layer(layer_state)) { + case _REEDER: + keycode = KC_R; + break; + case _MEDIA: + keycode = MC_PLYR; + break; + case _NAVI: + keycode = CLS_TAB; + break; + case _KARABINER: + keycode = KC_P8; + break; + } + break; + } + if (!reset) { + register_code16(keycode); + } else { + unregister_code16(keycode); + } +} diff --git a/keyboards/launchpad/keymaps/brandonschlack/readme.md b/keyboards/launchpad/keymaps/brandonschlack/readme.md new file mode 100644 index 0000000000..a91a1b80ac --- /dev/null +++ b/keyboards/launchpad/keymaps/brandonschlack/readme.md @@ -0,0 +1,31 @@ +# brandonschlack's layout for Launchpad +Fun little macropad build, with an awesome case from [StrataKB](https://stratakb.com/store/cases/launchpad-v2-full-case). + +## Media Layer +This layer is used for media controls. Player button is a hotkey to focus the current media player with [BeardedSpice](https://beardedspice.github.io/) +| | | +|:-:|:-:| +| Mute | Play/Pause | +| Vol + | Next Track | +| Vol - | Prev Track | +| | Current Player | +--- + +## Keypad Layer +This layer is used to send keypad keys, meant to be remapped based on current app with [Karabiner](https://pqrs.org/osx/karabiner/) +| | | +|:-:|:-:| +| 1 | 2 | +| 3 | 4 | +| 5 | 6 | +| 7 | 8 | +--- + +## Magic Layer +This layer is used as a meta layer for the pad. This layer is accessed by holding key in Row 3, Col 0 +| | | +|:-:|:-:| +| MAKE | RESET | +| **Media** Layer | **Keypad** Layer| +| XXX | XXX | +| ___ | XXX | diff --git a/keyboards/launchpad/keymaps/brandonschlack/rules.mk b/keyboards/launchpad/keymaps/brandonschlack/rules.mk new file mode 100644 index 0000000000..ac92af928e --- /dev/null +++ b/keyboards/launchpad/keymaps/brandonschlack/rules.mk @@ -0,0 +1,13 @@ +# Use macropad-specific defines, layers, functions. Flash bootloader with QM_MAKE +IS_MACROPAD = yes + +# Use dfu bootloader for Elite-C +BOOTLOADER = atmel-dfu + +# Build Options +BOOTMAGIC_ENABLE = lite +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +CONSOLE_ENABLE = yes # Console for debug(+400) +MOUSEKEY_ENABLE = yes # Use mouse keys for scrolling. +COMMAND_ENABLE = no # Disable Command, breaks with Mouse Keys set to constant. +TAP_DANCE_ENABLE = yes # Use tap dance diff --git a/keyboards/maartenwut/wonderland/keymaps/brandonschlack/config.h b/keyboards/maartenwut/wonderland/keymaps/brandonschlack/config.h new file mode 100644 index 0000000000..38383cffc2 --- /dev/null +++ b/keyboards/maartenwut/wonderland/keymaps/brandonschlack/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_LEDS_FOR_LAYERS +#define STOPLIGHT_LED diff --git a/keyboards/maartenwut/wonderland/keymaps/brandonschlack/keymap.c b/keyboards/maartenwut/wonderland/keymaps/brandonschlack/keymap.c new file mode 100755 index 0000000000..ca7bd773c5 --- /dev/null +++ b/keyboards/maartenwut/wonderland/keymaps/brandonschlack/keymap.c @@ -0,0 +1,170 @@ +/* Copyright 2019 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" + +// LEDs +#define TOP_LED B1 +#define MIDDLE_LED B2 +#define BOTTOM_LED B3 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_BASE] = LAYOUT( \ + KC_HOME, 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_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_BSPC, \ + KC_PGDN, HY_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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, PLY_FN1, \ + KC_LOPT, KC_LCMD, SPC_RAI, KC_LCTL, SPC_RAI, KC_RCMD, KC_ROPT \ +), +[_FN1] = LAYOUT( \ + KC_MUTE, QM_MAKE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MC_LHPD, MC_SLPD, \ + KC_VOLU, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, KC_HOME, KC_UP, KC_END, KC_DELT, \ + KC_VOLD, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, _______, KC_MPRV, KC_MNXT, KC_PGDN, KC_UP, KC_MPLY, \ + _______, RGB_LYR, RGB_THM, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, RGT_SFT, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + +), +[_FN2] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + +), +[_ADJUST] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + +) +/* +[_BLANK] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + +) +*/ +}; + +#ifdef STOPLIGHT_LED +bool is_led_stoplight_active = false; +uint8_t led_stoplight_index = 0; +uint16_t led_stoplight_timer = 0; +void matrix_scan_led_stoplight(void); + +void led_stoplight_start(void) { + writePinHigh(TOP_LED); + writePinHigh(MIDDLE_LED); + writePinHigh(BOTTOM_LED); + + is_led_stoplight_active = true; + led_stoplight_timer = timer_read(); +}; + +void led_stoplight_set(pin_t pin) { + writePinLow(pin); +}; + +void led_stoplight_end(void) { + // Reset timer and status variables + led_stoplight_index = 0; + is_led_stoplight_active = false; + led_stoplight_timer = 0; + led_update_kb(host_keyboard_led_state()); +}; + +void matrix_scan_led_stoplight(void) { + if (is_led_stoplight_active) { + if (timer_elapsed(led_stoplight_timer) > (1000 * (led_stoplight_index + 1))) { + switch (led_stoplight_index){ + case 0: + led_stoplight_set(TOP_LED); + led_stoplight_index++; + break; + case 1: + led_stoplight_set(MIDDLE_LED); + led_stoplight_index++; + break; + case 2: + led_stoplight_set(BOTTOM_LED); + led_stoplight_index++; + break; + default: + led_stoplight_index = 0; + is_led_stoplight_active = false; + led_stoplight_timer = 0; + led_update_kb(host_keyboard_led_state()); + break; + } + } + } +}; +#endif + +void keyboard_post_init_keymap(void) { +#ifdef STOPLIGHT_LED + led_stoplight_start(); +#endif +}; + +void matrix_scan_keymap(void) { +#ifdef STOPLIGHT_LED + matrix_scan_led_stoplight(); +#endif +}; + +#ifdef USE_LEDS_FOR_LAYERS +// example of how to use LEDs as layer indicators +static uint8_t top = 0; +static uint8_t middle = 0; + +layer_state_t layer_state_set_keymap(layer_state_t state) { + top = middle = 0; + state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + + switch (get_highest_layer(state)) { + case _FN1: + top = 1; + break; + case _FN2: + middle = 1; + break; + case _ADJUST: + top = 1; + middle = 1; + break; + default: // for any other layers, or the default layer + break; + } + return state; +} + +// override kb level function +bool led_update_user(led_t usb_led) { + if (!is_led_stoplight_active) { + writePin(TOP_LED, !top); + writePin(MIDDLE_LED, !middle); + writePin(BOTTOM_LED, !usb_led.caps_lock); // still use bottom for Caps Lock + }; + return false; // we are using LEDs for something else override kb +} +#endif diff --git a/keyboards/maartenwut/wonderland/keymaps/brandonschlack/rules.mk b/keyboards/maartenwut/wonderland/keymaps/brandonschlack/rules.mk new file mode 100755 index 0000000000..80361c34fd --- /dev/null +++ b/keyboards/maartenwut/wonderland/keymaps/brandonschlack/rules.mk @@ -0,0 +1,8 @@ +# Build Options +# comment out to disable the options. +# +MOUSEKEY_ENABLE = yes # Mouse keys +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +VELOCIKEY_ENABLE = no + diff --git a/keyboards/mechlovin/adelais/keymaps/brandonschlack/config.h b/keyboards/mechlovin/adelais/keymaps/brandonschlack/config.h new file mode 100644 index 0000000000..f277bcfa3e --- /dev/null +++ b/keyboards/mechlovin/adelais/keymaps/brandonschlack/config.h @@ -0,0 +1,30 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_LEDS_FOR_LAYERS +#define STOPLIGHT_LED + +// LEDs +#define TOP_LED B2 +#define MIDDLE_LED C15 +#define BOTTOM_LED B9 +// #define LED_PIN_FLIP +#ifdef LED_PIN_FLIP + #define LED_ON(flag) !flag +#else + #define LED_ON(flag) flag +#endif diff --git a/keyboards/mechlovin/adelais/keymaps/brandonschlack/keymap.c b/keyboards/mechlovin/adelais/keymaps/brandonschlack/keymap.c new file mode 100644 index 0000000000..d3ab5ed110 --- /dev/null +++ b/keyboards/mechlovin/adelais/keymaps/brandonschlack/keymap.c @@ -0,0 +1,270 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" + +/** + * Layer Names + * + * Layers mostly used for macro keys + */ +#define _REEDER _M1 +#define _MAIL _M2 +#define _REEDER_FN _M1_FN1 +#define _MAIL_FN _M2_FN1 + +/** + * Keycodes & Macros + */ +#define TG_BASE TO(_BASE) +#define TG_REDR TO(_REEDER) +#define TG_MAIL TO(_MAIL) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Base + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │Ply│ │Esc│! 1│@ 2│# 3│$ 4│% 5│^ 6│         │& 7│* 8│( 9│) 0│_ -│+ =│| \│~ `│ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │VlU│ │Tab  │ Q │ W │ E │ R │ T │         │ Y │ U │ I │ O │ P │{ [│} ]│ Bspc│ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │VlD│ │HyCaps│ A │ S │ D │ F │ G │         │ H │ J │ K │ L │: ;│" '│   Enter│ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │LShift  │ Z │ X │ C │ V │ B │     │ B │ N │ M │< ,│> .│? /│  Shft│Fn │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │Opt  │     │Cmd  │Spc/Lwr│Ctrl│   │   Spc/Rai│  Cmd│           │  Opt│ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +[_BASE] = LAYOUT_all( \ + KC_MPLY, 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_VOLU, 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_VOLD, HY_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_B, KC_N, KC_M, KC_COMM, KC_DOT, LOWER, KC_RSFT, KC_SLSH, \ + KC_LOPT, KC_LCMD, SPC_LWR, KC_LCTL, SPC_RAI, KC_RCMD, KC_ROPT \ +), +/* Reeder + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │ H │ │   │   │   │   │   │   │   │         │   │   │   │   │   │   │   │   │ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │ K │ │     │   │   │   │   │   │         │   │   │   │   │   │   │   │     │ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ J │ │      │   │   │   │   │   │         │   │   │   │   │   │   │        │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │        │   │   │   │   │   │     │   │   │   │   │   │   │      │   │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │     │     │     │       │    │   │          │     │           │     │ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +[_REEDER] = LAYOUT_all( \ + KC_H, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_K, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_J, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + +), +/* Mail + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │Del│ │   │   │   │   │   │   │   │         │   │   │   │   │   │   │   │   │ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │It+│ │     │   │   │   │   │   │         │   │   │   │   │   │   │   │     │ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │It-│ │      │   │   │   │   │   │         │   │   │   │   │   │   │        │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │        │   │   │   │   │   │     │   │   │   │   │   │   │      │   │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │     │     │     │       │    │   │          │     │           │     │ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +[_MAIL] = LAYOUT_all( \ + G(KC_BSPC), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_DOWN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + +), +/* Lower + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │Mut│ │Mke│ F1│ F2│ F3│ F4│ F5│ F6│         │ F7│ F8│ F9│F10│F11│F12│LHP│SLP│ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │Nxt│ │RMod │RH+│RS+│RV+│Sp+│   │         │   │   │   │   │PgU│Hom│End│  Del│ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │Prv│ │RTgl  │RH-│RS-│RV-│Sp-│   │         │   │   │Prv│Nxt│PgD│ ↑ │   Play │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │        │LYR│Thm│   │   │   │     │   │   │   │   │ ← │ ↓ │→ Shft│   │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │     │     │     │       │    │   │          │     │           │     │ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +[_LOWER] = LAYOUT_all( \ + KC_MUTE, QM_MAKE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MC_LHPD, MC_SLPD, \ + KC_MNXT, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, KC_PGUP, KC_HOME, KC_END, KC_DELT, \ + KC_MPRV, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, _______, KC_MPRV, KC_MNXT, KC_PGDN, KC_UP, KC_MPLY, \ + _______, RGB_LYR, RGB_THM, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, _______, RGT_SFT, KC_DOWN, \ + _______, _______, _______, _______, _______, _______, _______ \ + +), +/* Reeder Function + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │ L │ │   │   │   │   │   │   │   │         │   │   │   │   │   │   │   │   │ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │ P │ │     │   │   │   │   │   │         │   │   │   │   │   │   │   │     │ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ N │ │      │   │   │   │   │   │         │   │   │   │   │   │   │        │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │        │   │   │   │   │   │     │   │   │   │   │   │   │      │   │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │     │     │     │       │    │   │          │     │           │     │ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +[_REEDER_FN] = LAYOUT_all( \ + KC_L, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_P, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_N, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + +), +/* Mail + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │Del│ │   │   │   │   │   │   │   │         │   │   │   │   │   │   │   │   │ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │It+│ │     │   │   │   │   │   │         │   │   │   │   │   │   │   │     │ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │It-│ │      │   │   │   │   │   │         │   │   │   │   │   │   │        │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │        │   │   │   │   │   │     │   │   │   │   │   │   │      │   │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │     │     │     │       │    │   │          │     │           │     │ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +[_MAIL_FN] = LAYOUT_all( \ + KC_BSPC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + A(G(KC_LBRC)), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + A(G(KC_RBRC)), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + +), +/* Raise + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │   │ │   │   │   │   │   │   │   │         │   │   │   │   │   │   │   │   │ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │   │ │     │   │   │   │   │   │         │   │   │   │   │   │   │   │     │ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │   │ │      │   │   │   │   │   │         │   │   │   │   │   │   │        │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │        │   │   │   │   │   │     │   │   │   │   │   │   │      │   │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │     │     │     │       │    │   │          │     │           │     │ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +[_RAISE] = LAYOUT_all( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + +), +/* Adjust + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │Bse│ │Mke│   │   │   │   │   │   │         │   │   │   │   │   │   │   │   │ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │Rdr│ │RMod │RH+│RS+│RV+│Sp+│   │         │   │   │   │   │   │   │   │     │ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │Mai│ │RTgl  │RH-│RS-│RV-│Sp-│   │         │   │   │   │   │   │   │        │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │        │LYR│Thm│   │EEP│Rst│     │Rst│   │   │   │   │   │      │   │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │     │     │     │       │    │   │          │     │           │     │ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +[_ADJUST] = LAYOUT_all( \ + TG_BASE, QM_MAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + TG_REDR, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + TG_MAIL, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, RGB_LYR, RGB_THM, _______, EEP_RST, RESET, RESET, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + +) +/* Layout + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │   │ │   │   │   │   │   │   │   │         │   │   │   │   │   │   │   │   │ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │   │ │     │   │   │   │   │   │         │   │   │   │   │   │   │   │     │ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │   │ │      │   │   │   │   │   │         │   │   │   │   │   │   │        │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │        │   │   │   │   │   │     │   │   │   │   │   │   │      │   │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │     │     │     │       │    │   │          │     │           │     │ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +/* +[_BLANK] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + +) +*/ +}; + +layer_state_t layer_state_set_keymap(layer_state_t state) { + state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + state = update_tri_layer_state(state, _REEDER, _LOWER, _REEDER_FN); + state = update_tri_layer_state(state, _MAIL, _LOWER, _MAIL_FN); + return state; +} + +#ifdef USE_LEDS_FOR_LAYERS +bool led_update_keymap(led_t led_state) { + writePin(TOP_LED, LED_ON(IS_LAYER_ON(_REEDER) || IS_LAYER_ON(_MAIL))); // Use for Macro Layer + writePin(MIDDLE_LED, LED_ON(IS_LAYER_ON(_FN1))); // Use for Layer 2 + writePin(BOTTOM_LED, LED_ON(led_state.caps_lock)); // Use for Caps Lock + return false; // Override default set by KB +} +#endif + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + else if (index == 1) { + if (clockwise) { + tap_code(KC_LEFT); + } else { + tap_code(KC_RGHT); + } + } + else if (index == 2) { + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + } +} + + #endif diff --git a/keyboards/mechlovin/adelais/keymaps/brandonschlack/readme.md b/keyboards/mechlovin/adelais/keymaps/brandonschlack/readme.md new file mode 100644 index 0000000000..54d78d873b --- /dev/null +++ b/keyboards/mechlovin/adelais/keymaps/brandonschlack/readme.md @@ -0,0 +1 @@ +# The default keymap for adelais diff --git a/keyboards/nightmare/keymaps/brandonschlack/keymap.c b/keyboards/nightmare/keymaps/brandonschlack/keymap.c new file mode 100644 index 0000000000..16da418453 --- /dev/null +++ b/keyboards/nightmare/keymaps/brandonschlack/keymap.c @@ -0,0 +1,195 @@ +/* Copyright 2019 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" + +/** + * Layer Names + * + * Layers mostly used for macro keys + */ +#define _REEDER _M1 +#define _NAV _M2 +#define _MOUSE _M3 + +/** + * Keycodes & Macros + */ +#define TG_BASE TO(_BASE) +#define TG_REDR TO(_REEDER) +#define TG_NAV TO(_NAV) +#define TG_MOUS TO(_MOUSE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/** + * Base + * ┌───┬┬┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Hom│││Esc│ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │{ [│} ]│Bck│ + * ├───┼┼┼───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │PgU│││Tab │ A │ S │ D │ F │ G │ H │ J │ K │ L │: ;│" '│ Enter│ + * ├───┼┼┼────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤ + * │PgD│││Shift │ Z │ X │ C │ V │ B │ N │ M │< ,│> .│? /│Shft│ Fn│ + * ├───┼┼┼┬┬┬┬┬─┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┼───┬┼┬┬┬┤ + * │End││││││││Opt│Cmd │                           │ Cmd│Ctl││││││ + * └───┴┴┴┴┴┴┴┴───┴────┴───────────────────────────┴────┴───┴┴┴┴┴┘ + */ +[_BASE] = LAYOUT_default( \ + KC_HOME, KC_ESC, 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, HY_TAB, 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, PLY_FN1, \ + KC_END, KC_LOPT, KC_LCMD, SPC_RAI, KC_RCMD, KC_RCTL \ +), + +/** + * Reeder + * ┌───┬┬┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ P │││   │   │   │   │   │   │   │   │   │   │   │   │   │   │ + * ├───┼┼┼───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │ K │││    │   │   │   │   │   │   │   │   │   │   │   │      │ + * ├───┼┼┼────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤ + * │ J │││      │   │   │   │   │   │   │   │   │   │   │    │   │ + * ├───┼┼┼┬┬┬┬┬─┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┼───┬┼┬┬┬┤ + * │ N ││││││││   │    │                           │    │   ││││││ + * └───┴┴┴┴┴┴┴┴───┴────┴───────────────────────────┴────┴───┴┴┴┴┴┘ + */ + +[_REEDER] = LAYOUT_default( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______ \ +), + +/** + * Nav + * ┌───┬┬┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ → │││   │   │   │   │   │   │   │   │   │   │   │   │   │   │ + * ├───┼┼┼───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │ ↑ │││    │   │   │   │   │   │   │   │   │   │   │   │      │ + * ├───┼┼┼────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤ + * │ ↓ │││      │   │   │   │   │   │   │   │   │   │   │    │   │ + * ├───┼┼┼┬┬┬┬┬─┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┼───┬┼┬┬┬┤ + * │ ← ││││││││   │    │                           │    │   ││││││ + * └───┴┴┴┴┴┴┴┴───┴────┴───────────────────────────┴────┴───┴┴┴┴┴┘ + */ +[_NAV] = LAYOUT_default( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______ \ +), + +/** + * Mouse + * ┌───┬┬┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │WhU│││   │   │   │   │   │   │   │   │   │   │   │   │   │   │ + * ├───┼┼┼───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │ ↑ │││    │   │   │   │   │   │   │   │   │   │   │   │      │ + * ├───┼┼┼────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤ + * │ ↓ │││      │   │   │   │   │   │   │   │   │   │   │    │   │ + * ├───┼┼┼┬┬┬┬┬─┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┼───┬┼┬┬┬┤ + * │WhD││││││││   │    │                           │    │   ││││││ + * └───┴┴┴┴┴┴┴┴───┴────┴───────────────────────────┴────┴───┴┴┴┴┴┘ + */ +[_MOUSE] = LAYOUT_default( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______ \ +), + +/** + * Lower + * ┌───┬┬┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Nxt│││Del│BrD│BrU│Msn│LHP│   │   │   │   │   │   │ ↑ │Mut│SlD│ + * ├───┼┼┼───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │VlU│││    │   │   │NxW│PvT│Bck│Fwd│NxT│   │   │ ← │ → │ Play │ + * ├───┼┼┼────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤ + * │VlD│││SftCap│   │   │   │1PX│1Ps│   │   │   │   │ ↓ │    │   │ + * ├───┼┼┼┬┬┬┬┬─┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┼───┬┼┬┬┬┤ + * │Prv││││││││   │    │                           │    │   ││││││ + * └───┴┴┴┴┴┴┴┴───┴────┴───────────────────────────┴────┴───┴┴┴┴┴┘ + */ +[_LOWER] = LAYOUT_default( \ + KC_MNXT, KC_DELT, KC_BRMD, KC_BRMU, MC_MSSN, MC_LHPD, _______, _______, _______, _______, _______, _______, KC_UP, KC_MUTE, MC_SLPD, \ + KC_VOLU, _______, _______, _______, NXT_WIN, PRV_TAB, MC_BACK, MC_FWRD, NXT_TAB, _______, _______, KC_LEFT, KC_RGHT, KC_MPLY, \ + KC_VOLD, SF_CAPS, _______, _______, _______, PX_AFLL, OP_AFLL, _______, _______, _______, _______, KC_DOWN, _______, _______, \ + KC_MPRV, _______, _______, _______, _______, _______ \ +), + +/** + * Raise + * ┌───┬┬┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Nxt│││~ `│! 1│@ 2│# 3│$ 4│% 5│^ 6│& 7│* 8│( 9│) 0│_ -│+ =│   │ + * ├───┼┼┼───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │VlU│││    │ F1│ F2│ F3│ F4│ F5│ F6│_ -│+ =│   │   │   │      │ + * ├───┼┼┼────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤ + * │VlD│││      │ F7│ F8│ F9│F10│F11│F12│   │   │   │| \│    │   │ + * ├───┼┼┼┬┬┬┬┬─┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┼───┬┼┬┬┬┤ + * │Prv││││││││   │    │                           │    │   ││││││ + * └───┴┴┴┴┴┴┴┴───┴────┴───────────────────────────┴────┴───┴┴┴┴┴┘ + */ +[_RAISE] = LAYOUT_default( \ + 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_MINS, KC_EQL, _______, \ + KC_VOLU, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, _______, _______, _______, _______, \ + KC_VOLD, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, KC_BSLS, _______, _______, \ + KC_MPRV, _______, _______, _______, _______, _______ \ +), + +/** + * Adjust + * ┌───┬┬┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Bse│││Mke│   │   │EEP│RST│   │   │   │   │   │   │   │   │   │ + * ├───┼┼┼───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │Rdr│││    │   │   │   │   │   │   │   │   │   │   │   │      │ + * ├───┼┼┼────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤ + * │Nav│││      │   │   │   │   │   │   │   │   │   │   │    │   │ + * ├───┼┼┼┬┬┬┬┬─┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┼───┬┼┬┬┬┤ + * │Mse││││││││   │    │                           │    │   ││││││ + * └───┴┴┴┴┴┴┴┴───┴────┴───────────────────────────┴────┴───┴┴┴┴┴┘ + */ +[_ADJUST] = LAYOUT_default( \ + TG_BASE, QM_MAKE, _______, _______, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + TG_REDR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + TG_NAV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + TG_MOUS, _______, _______, _______, _______, _______ \ +), + +/** + * Blank + * ┌───┬┬┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │   │││   │   │   │   │   │   │   │   │   │   │   │   │   │   │ + * ├───┼┼┼───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │   │││    │   │   │   │   │   │   │   │   │   │   │   │      │ + * ├───┼┼┼────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤ + * │   │││      │   │   │   │   │   │   │   │   │   │   │    │   │ + * ├───┼┼┼┬┬┬┬┬─┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┼───┬┼┬┬┬┤ + * │   ││││││││   │    │                           │    │   ││││││ + * └───┴┴┴┴┴┴┴┴───┴────┴───────────────────────────┴────┴───┴┴┴┴┴┘ + */ +/* +[] = LAYOUT_default( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______ \ +), +*/ +}; + +layer_state_t layer_state_set_keymap(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/nightmare/keymaps/brandonschlack/readme.md b/keyboards/nightmare/keymaps/brandonschlack/readme.md new file mode 100644 index 0000000000..94c77833ff --- /dev/null +++ b/keyboards/nightmare/keymaps/brandonschlack/readme.md @@ -0,0 +1,20 @@ +# brandonschlack's Nightmare Keymap + +![Base, Raise, Lower](https://i.imgur.com/08759vK.png) + +## Features +- Mod-Taps & Layer-Taps + - Spacebar is used as a Fn button when held to access missing numrow and F-keys on the **RAISE** layer. + - Holding `Tab` acts as `HYPER`, or `Shift+Control+Option+Command`. I use this set global shortcuts, such as `HYPER+w` for my **W**indow manager Moom. +- **Lower** Layer + - `Lower+Esc` for `Delete` + - `Lower+LShift` for `Caps Lock`. Holding `Lower+LShift` still acts as `LShift` + - Arrow keys as `Lower+[`,`;`,`'`,`/` for `Up`,`Left`,`Right`,`Down`. + - Media keys as `Lower+Enter`,`Home`,`End` for `Play/Pause`,`Next Track`,`Prev Track` + - Volume controls as `Lower+]`,`Page Up`,`Page Down` for `Mute`,`Volume Up`,`Volume Down` +- MacOS shortcuts on **Lower** Layer + - Display Brightness as `Lower+Q`,`W` for `Brightness Down`, `Brightness Up` + - Mission Control as `Lower+E` + - Launchpad as `Lower+R` + - Sleep Display as `Lower+Backspace` + - Browser diff --git a/keyboards/primekb/prime_e/keymaps/brandonschlack/config.h b/keyboards/primekb/prime_e/keymaps/brandonschlack/config.h new file mode 100644 index 0000000000..8a9aa040f5 --- /dev/null +++ b/keyboards/primekb/prime_e/keymaps/brandonschlack/config.h @@ -0,0 +1,30 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_LEDS_FOR_LAYERS +#define STOPLIGHT_LED + +#define TOP_LED B1 +#define MIDDLE_LED B2 +#define BOTTOM_LED B3 + +// #define LED_PIN_FLIP +#ifdef LED_PIN_FLIP + #define LED_ON(flag) !flag +#else + #define LED_ON(flag) flag +#endif diff --git a/keyboards/primekb/prime_e/keymaps/brandonschlack/keymap.c b/keyboards/primekb/prime_e/keymaps/brandonschlack/keymap.c new file mode 100644 index 0000000000..a92fcbfec6 --- /dev/null +++ b/keyboards/primekb/prime_e/keymaps/brandonschlack/keymap.c @@ -0,0 +1,95 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" + +// Tap Dance declarations +enum { + TD_LR_BRC, + TD_SD_QUOT +}; + +// Tap Dance definitions +qk_tap_dance_action_t tap_dance_actions[] = { + // Tap once for LBracket, twice for RBracket + [TD_LR_BRC] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_RBRC), + // Tap once for Single Quote, twice for Double Quote + [TD_SD_QUOT] = ACTION_TAP_DANCE_DOUBLE(KC_QUOT, KC_DQT) +}; + +#define LWR_B LT(_LOWER, KC_B) +#define LWR_EQL LT(_LOWER, KC_EQL) +#define TD_BRC TD(TD_LR_BRC) +#define TD_QUOT TD(TD_SD_QUOT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( \ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, TD_BRC, KC_BSPC, \ + HY_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, TD_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, LWR_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, LOWER, \ + KC_LCTL, KC_LOPT, KC_LCMD, SPC_RAI, SPC_RAI, KC_RCMD, KC_ROPT, KC_RCTL \ + ), + + [_LOWER] = LAYOUT( \ + KC_DELT, KC_BRMD, KC_BRMU, MC_MSSN, MC_LHPD, _______, _______, _______, _______, KC_HOME, KC_UP, KC_PGUP, MC_SLPD, \ + _______, KC_MUTE, KC_VOLU, NXT_WIN, PRV_TAB, MC_BACK, MC_FWRD, NXT_TAB, _______, KC_LEFT, KC_RGHT, KC_MPLY, \ + SF_CAPS, KC_MPRV, KC_VOLD, KC_MNXT, _______, PX_AFLL, OP_AFLL, _______, _______, KC_END, KC_DOWN, KC_PGDN, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [_RAISE] = LAYOUT( \ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_LBRC, KC_RBRC, KC_7, KC_8, KC_9, KC_0, KC_RBRC, _______, \ + _______, KC_F5, KC_F6, KC_F7, KC_F8, KC_MINS, KC_PLUS, KC_4, KC_5, KC_6, KC_SCLN, _______, \ + _______, KC_F9, KC_F10, KC_F11, KC_F12, LWR_EQL, KC_EQL, KC_1, KC_2, KC_3, _______, KC_BSLS, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [_ADJUST] = LAYOUT( \ + QM_MAKE, _______, _______, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______ \ + ) + +/* + [BLANK] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______ \ + ) + */ +}; + +void keyboard_pre_init_user(void) { + setPinOutput(TOP_LED); + setPinOutput(MIDDLE_LED); + setPinOutput(BOTTOM_LED); +} + +layer_state_t layer_state_set_keymap(layer_state_t state) { + state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + return state; +} + +#ifdef USE_LEDS_FOR_LAYERS +bool led_update_keymap(led_t led_state) { + writePin(TOP_LED, LED_ON(IS_LAYER_ON(_FN1))); // Use for Layer 1 + writePin(MIDDLE_LED, LED_ON(IS_LAYER_ON(_FN2))); // Use for Layer 2 + writePin(BOTTOM_LED, LED_ON(led_state.caps_lock)); // Use for Caps Lock + return false; // Override default set by KB +} +#endif diff --git a/keyboards/primekb/prime_e/keymaps/brandonschlack/rules.mk b/keyboards/primekb/prime_e/keymaps/brandonschlack/rules.mk new file mode 100644 index 0000000000..c1dfab0c72 --- /dev/null +++ b/keyboards/primekb/prime_e/keymaps/brandonschlack/rules.mk @@ -0,0 +1,2 @@ +BACKLIGHT_ENABLE = no +TAP_DANCE_ENABLE = yes diff --git a/keyboards/the_royal/liminal/keymaps/brandonschlack/keymap.c b/keyboards/the_royal/liminal/keymaps/brandonschlack/keymap.c new file mode 100644 index 0000000000..4180e9464f --- /dev/null +++ b/keyboards/the_royal/liminal/keymaps/brandonschlack/keymap.c @@ -0,0 +1,115 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Base + * ┌───┬─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ + * │Hom│Tab  │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │{ [│ BsPc│ + * ├───┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │PgU│HyEsc │ A │ S │ D │ F │ G │ H │ J │ K │ L │" '│   Enter│ + * ├───┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬──────┤ + * │PgD│Shift   │ Z │ X │ C │ V │ B │ N │ M │< ,│> .│? /│ ↑Shft│ + * ├───┼────┬───┼───┴┬──┴───┴───┴───┴───┴───┴───┴┬──┴─┬─┴─┬────┤ + * │End│Ctrl│Opt│Cmd │        Space-Raise        │←Cmd│↓Lw│→Opt│ + * └───┴────┴───┴────┴───────────────────────────┴────┴───┴────┘ + */ +[_BASE] = LAYOUT_base_kit_all( \ + 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_BSPC, \ + KC_PGUP, HY_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, XXXXXXX, 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, UP_RSFT, \ + KC_END, KC_LCTL, KC_LOPT, KC_LCMD, XXXXXXX, SPC_RAI, XXXXXXX, LFT_CMD, DWN_LWR, RGT_OPT \ +), + +/* Lower + * ┌───┬─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ + * │Nxt│Del  │BrD│BrU│Msn│LHP│   │   │   │   │   │ ↑ │Mut│ SlpD│ + * ├───┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │VlU│HyCaps│   │   │NxW│PvT│Bck│Fwd│NxT│   │ ← │ → │    Play│ + * ├───┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬──────┤ + * │VlD│        │   │   │   │1PX│1Ps│   │   │   │ ↓ │   │      │ + * ├───┼────┬───┼───┴┬──┴───┴───┴───┴───┴───┴───┴┬──┴─┬─┴─┬────┤ + * │Prv│    │   │    │                           │    │   │    │ + * └───┴────┴───┴────┴───────────────────────────┴────┴───┴────┘ + */ +[_LOWER] = LAYOUT_base_kit_all( \ + KC_MNXT, KC_DELT, KC_BRMD, KC_BRMU, MC_MSSN, MC_LHPD, _______, _______, _______, _______, _______, KC_UP, KC_MUTE, MC_SLPD, \ + KC_VOLU, HY_CAPS, _______, _______, NXT_WIN, PRV_TAB, MC_BACK, MC_FWRD, NXT_TAB, _______, KC_LEFT, KC_RGHT, XXXXXXX, KC_MPLY, \ + KC_VOLD, _______, XXXXXXX, _______, _______, _______, PX_AFLL, OP_AFLL, _______, _______, _______, KC_DOWN, _______, _______, \ + KC_MPRV, _______, _______, _______, XXXXXXX, _______, XXXXXXX, _______, _______, _______ \ +), + +/* Raise + * ┌───┬─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ + * │Nxt│~ `  │! 1│@ 2│# 3│$ 4│% 5│^ 6│& 7│* 8│( 9│) 0│} ]│     │ + * ├───┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │VlU│      │ F1│ F2│ F3│ F4│ F5│ F6│_ -│+ =│   │: ;│        │ + * ├───┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬──────┤ + * │VlD│        │ F7│ F8│ F9│F10│F11│F12│   │{ [│} ]│| \│ ⇞Shft│ + * ├───┼────┬───┼───┴┬──┴───┴───┴───┴───┴───┴───┴┬──┴─┬─┴─┬────┤ + * │Prv│    │   │    │                           │↖︎Cmd│⇟Fn│↘︎Opt│ + * └───┴────┴───┴────┴───────────────────────────┴────┴───┴────┘ + */ +[_RAISE] = LAYOUT_base_kit_all( \ + 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_RBRC, _______, \ + KC_VOLU, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, _______, KC_SCLN, XXXXXXX, _______, \ + KC_VOLD, _______, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_LBRC, KC_RBRC, KC_BSLS, PGU_SFT, \ + KC_MPRV, _______, _______, _______, XXXXXXX, _______, XXXXXXX, HOM_CMD, PGD_LWR, END_OPT \ +), + +/* Adjust + * ┌───┬─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ + * │   │Make │   │   │EEP│RST│   │   │   │   │   │   │   │     │ + * ├───┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │   │      │   │   │   │   │   │   │   │   │   │   │        │ + * ├───┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬──────┤ + * │   │        │   │   │   │   │   │   │   │   │   │   │      │ + * ├───┼────┬───┼───┴┬──┴───┴───┴───┴───┴───┴───┴┬──┴─┬─┴─┬────┤ + * │   │    │   │    │                           │    │   │    │ + * └───┴────┴───┴────┴───────────────────────────┴────┴───┴────┘ + */ +[_ADJUST] = LAYOUT_base_kit_all( \ + _______, QM_MAKE, _______, _______, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, \ + _______, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, XXXXXXX, _______, XXXXXXX, _______, _______, _______ \ +), + +/* Blank layer + * ┌───┬─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ + * │   │     │   │   │   │   │   │   │   │   │   │   │   │     │ + * ├───┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │   │      │   │   │   │   │   │   │   │   │   │   │        │ + * ├───┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬──────┤ + * │   │        │   │   │   │   │   │   │   │   │   │   │      │ + * ├───┼────┬───┼───┴┬──┴───┴───┴───┴───┴───┴───┴┬──┴─┬─┴─┬────┤ + * │   │    │   │    │                           │    │   │    │ + * └───┴────┴───┴────┴───────────────────────────┴────┴───┴────┘ + */ +/* +[_BLANK] = LAYOUT_base_kit_all( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, \ + _______, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, XXXXXXX, _______, XXXXXXX, _______, _______, _______ \ +), +*/ +}; + +layer_state_t layer_state_set_keymap(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/tkc/osav2/keymaps/brandonschlack/config.h b/keyboards/tkc/osav2/keymaps/brandonschlack/config.h new file mode 100644 index 0000000000..e74d93c35f --- /dev/null +++ b/keyboards/tkc/osav2/keymaps/brandonschlack/config.h @@ -0,0 +1,30 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_LEDS_FOR_LAYERS +#define STOPLIGHT_LED + +#define TOP_LED C7 +#define MIDDLE_LED C6 +#define BOTTOM_LED B6 + +// #define LED_PIN_FLIP +#ifdef LED_PIN_FLIP + #define LED_ON(flag) !flag +#else + #define LED_ON(flag) flag +#endif diff --git a/keyboards/tkc/osav2/keymaps/brandonschlack/keymap.c b/keyboards/tkc/osav2/keymaps/brandonschlack/keymap.c new file mode 100755 index 0000000000..5e3debd8d3 --- /dev/null +++ b/keyboards/tkc/osav2/keymaps/brandonschlack/keymap.c @@ -0,0 +1,243 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" + +/** + * Layer Names + * + * Layers mostly used for macro keys + */ +#define _REEDER _M1 +#define _MAIL _M2 +#define _REEDER_FN _M1_FN1 +#define _MAIL_FN _M2_FN1 + +/** + * Keycodes & Macros + */ +#define TG_BASE TO(_BASE) +#define TG_REDR TO(_REEDER) +#define TG_MAIL TO(_MAIL) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Base + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │Ply│ │Esc│! 1│@ 2│# 3│$ 4│% 5│^ 6│         │& 7│* 8│( 9│) 0│_ -│+ =│| \│~ `│ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │VlU│ │Tab  │ Q │ W │ E │ R │ T │         │ Y │ U │ I │ O │ P │{ [│} ]│ Bspc│ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │VlD│ │HyCaps│ A │ S │ D │ F │ G │         │ H │ J │ K │ L │: ;│" '│   Enter│ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │LShift  │ Z │ X │ C │ V │ B │     │ B │ N │ M │< ,│> .│? /│  Shft│Fn │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │Opt  │     │Cmd  │Spc/Lwr│Ctrl│   │   Spc/Rai│  Cmd│           │  Opt│ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +[_BASE] = LAYOUT_all( \ + KC_MPLY, 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_VOLU, 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_VOLD, HY_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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, LOWER, \ + KC_LOPT, KC_LCMD, SPC_LWR, KC_LCTL, SPC_RAI, KC_RCMD, KC_ROPT \ +), +/* Reeder + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │ H │ │   │   │   │   │   │   │   │         │   │   │   │   │   │   │   │   │ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │ K │ │     │   │   │   │   │   │         │   │   │   │   │   │   │   │     │ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ J │ │      │   │   │   │   │   │         │   │   │   │   │   │   │        │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │        │   │   │   │   │   │     │   │   │   │   │   │   │      │   │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │     │     │     │       │    │   │          │     │           │     │ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +[_REEDER] = LAYOUT_all( \ + KC_H, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_K, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_J, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + +), +/* Mail + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │Del│ │   │   │   │   │   │   │   │         │   │   │   │   │   │   │   │   │ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │It+│ │     │   │   │   │   │   │         │   │   │   │   │   │   │   │     │ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │It-│ │      │   │   │   │   │   │         │   │   │   │   │   │   │        │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │        │   │   │   │   │   │     │   │   │   │   │   │   │      │   │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │     │     │     │       │    │   │          │     │           │     │ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +[_MAIL] = LAYOUT_all( \ + G(KC_BSPC), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_DOWN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + +), +/* Lower + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │Mut│ │Mke│ F1│ F2│ F3│ F4│ F5│ F6│         │ F7│ F8│ F9│F10│F11│F12│LHP│SLP│ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │Nxt│ │RMod │RH+│RS+│RV+│Sp+│   │         │   │   │   │   │PgU│Hom│End│  Del│ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │Prv│ │RTgl  │RH-│RS-│RV-│Sp-│   │         │   │   │Prv│Nxt│PgD│ ↑ │   Play │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │        │LYR│Thm│   │   │   │     │   │   │   │   │ ← │ ↓ │→ Shft│   │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │     │     │     │       │    │   │          │     │           │     │ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +[_LOWER] = LAYOUT_all( \ + KC_MUTE, QM_MAKE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MC_LHPD, MC_SLPD, \ + KC_MNXT, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, KC_PGUP, KC_HOME, KC_END, KC_DELT, \ + KC_MPRV, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, _______, KC_MPRV, KC_MNXT, KC_PGDN, KC_UP, KC_MPLY, \ + _______, RGB_LYR, RGB_THM, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, RGT_SFT, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + +), +/* Reeder Function + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │ L │ │   │   │   │   │   │   │   │         │   │   │   │   │   │   │   │   │ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │ P │ │     │   │   │   │   │   │         │   │   │   │   │   │   │   │     │ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ N │ │      │   │   │   │   │   │         │   │   │   │   │   │   │        │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │        │   │   │   │   │   │     │   │   │   │   │   │   │      │   │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │     │     │     │       │    │   │          │     │           │     │ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +[_REEDER_FN] = LAYOUT_all( \ + KC_L, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_P, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_N, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + +), +/* Mail + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │Del│ │   │   │   │   │   │   │   │         │   │   │   │   │   │   │   │   │ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │It+│ │     │   │   │   │   │   │         │   │   │   │   │   │   │   │     │ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │It-│ │      │   │   │   │   │   │         │   │   │   │   │   │   │        │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │        │   │   │   │   │   │     │   │   │   │   │   │   │      │   │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │     │     │     │       │    │   │          │     │           │     │ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +[_MAIL_FN] = LAYOUT_all( \ + KC_BSPC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + A(G(KC_LBRC)), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + A(G(KC_RBRC)), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + +), +/* Raise + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │   │ │   │   │   │   │   │   │   │         │   │   │   │   │   │   │   │   │ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │   │ │     │   │   │   │   │   │         │   │   │   │   │   │   │   │     │ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │   │ │      │   │   │   │   │   │         │   │   │   │   │   │   │        │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │        │   │   │   │   │   │     │   │   │   │   │   │   │      │   │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │     │     │     │       │    │   │          │     │           │     │ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +[_RAISE] = LAYOUT_all( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + +), +/* Adjust + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │Bse│ │Mke│   │   │   │   │   │   │         │   │   │   │   │   │   │   │   │ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │Rdr│ │RMod │RH+│RS+│RV+│Sp+│   │         │   │   │   │   │   │   │   │     │ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │Mai│ │RTgl  │RH-│RS-│RV-│Sp-│   │         │   │   │   │   │   │   │        │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │        │LYR│Thm│   │EEP│Rst│     │Rst│   │   │   │   │   │      │   │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │     │     │     │       │    │   │          │     │           │     │ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +[_ADJUST] = LAYOUT_all( \ + TG_BASE, QM_MAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + TG_REDR, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + TG_MAIL, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, RGB_LYR, RGB_THM, _______, EEP_RST, RESET, RESET, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + +) +/* Layout + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐         ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │   │ │   │   │   │   │   │   │   │         │   │   │   │   │   │   │   │   │ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘       ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │   │ │     │   │   │   │   │   │         │   │   │   │   │   │   │   │     │ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐        └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │   │ │      │   │   │   │   │   │         │   │   │   │   │   │   │        │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐     ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + *       │        │   │   │   │   │   │     │   │   │   │   │   │   │      │   │ + *       ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐   ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + *       │     │     │     │       │    │   │          │     │           │     │ + *       └─────┘     └─────┴───────┴────┘   └──────────┴─────┘           └─────┘ + */ +/* +[_BLANK] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ + +) +*/ +}; + +layer_state_t layer_state_set_keymap(layer_state_t state) { + state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + state = update_tri_layer_state(state, _REEDER, _LOWER, _REEDER_FN); + state = update_tri_layer_state(state, _MAIL, _LOWER, _MAIL_FN); + return state; +} + +#ifdef USE_LEDS_FOR_LAYERS +bool led_update_keymap(led_t led_state) { + writePin(TOP_LED, LED_ON(IS_LAYER_ON(_REEDER) || IS_LAYER_ON(_MAIL))); // Use for Macro Layer + writePin(MIDDLE_LED, LED_ON(IS_LAYER_ON(_FN1))); // Use for Layer 2 + writePin(BOTTOM_LED, LED_ON(led_state.caps_lock)); // Use for Caps Lock + return false; // Override default set by KB +} +#endif diff --git a/keyboards/tkc/osav2/keymaps/brandonschlack/rules.mk b/keyboards/tkc/osav2/keymaps/brandonschlack/rules.mk new file mode 100755 index 0000000000..9c896e0d81 --- /dev/null +++ b/keyboards/tkc/osav2/keymaps/brandonschlack/rules.mk @@ -0,0 +1,9 @@ +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no +MOUSEKEY_ENABLE = yes # Mouse keys +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +VELOCIKEY_ENABLE = no + diff --git a/keyboards/walletburner/neuron/keymaps/brandonschlack/keymap.c b/keyboards/walletburner/neuron/keymaps/brandonschlack/keymap.c new file mode 100644 index 0000000000..1193fa32c2 --- /dev/null +++ b/keyboards/walletburner/neuron/keymaps/brandonschlack/keymap.c @@ -0,0 +1,132 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Base Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │Bsp│ + * ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │HyTb│ A │ S │ D │ F │ G │ H │ J │ K │ L │ Enter│ + * ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ + * │Shift │ Z │ X │ C │ V │ B │ N │ M │< ,│> .│?/Lw│ + * ├┬┬┬┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┼───┴┬┬┬┬┤ + * │││││Opt │Cmd │         SpcRse         │Ctrl│││││ + * └┴┴┴┴────┴────┴────────────────────────┴────┴┴┴┴┘ + */ +[_BASE] = LAYOUT( \ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + HY_TAB, 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, SLH_LWR, \ + KC_LOPT, KC_LCMD, XXXXXXX, SPC_RAI, XXXXXXX, XXXXXXX, KC_LCTL \ +), +/* Lower + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Del│BrD│BrU│Msn│LHP│   │   │   │Hom│ ↑ │PgU│SlD│ + * ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │    │Mut│VlU│NxW│PvT│Bck│Fwd│NxT│ ← │ → │  Ply │ + * ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ + * │SfCaps│Prv│VlD│Nxt│1PX│1Ps│   │End│ ↓ │PgD│    │ + * ├┬┬┬┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┼───┴┬┬┬┬┤ + * │││││    │    │                        │    │││││ + * └┴┴┴┴────┴────┴────────────────────────┴────┴┴┴┴┘ + */ +[_LOWER] = LAYOUT( \ + KC_DELT, KC_BRMD, KC_BRMU, MC_MSSN, MC_LHPD, _______, _______, _______, KC_HOME, KC_UP, KC_PGUP, MC_SLPD, \ + _______, KC_MUTE, KC_VOLU, NXT_WIN, PRV_TAB, MC_BACK, MC_FWRD, NXT_TAB, KC_LEFT, KC_RGHT, KC_MPLY, \ + SF_CAPS, KC_MPRV, KC_VOLD, KC_MNXT, PX_AFLL, OP_AFLL, _______, KC_END, KC_DOWN, KC_PGDN, _______, \ + _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______ \ +), +/* Raise + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │~ `│! 1│@ 2│# 3│$ 4│% 5│^ 6│& 7│* 8│( 9│) 0│   │ + * ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │    │ F1│ F2│ F3│ F4│ F5│ F6│_ -│+ =│: ;│   " '│ + * ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ + * │      │ F7│ F8│ F9│F10│F11│F12│   │{ [│} ]│|\Lw│ + * ├┬┬┬┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┼───┴┬┬┬┬┤ + * │││││    │    │                        │    │││││ + * └┴┴┴┴────┴────┴────────────────────────┴────┴┴┴┴┘ + */ +/* +[_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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_LBRC, KC_RBRC, BSL_LWR, \ + _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______ \ +), */ +/* Raise + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │~ `│ F1│ F2│ F3│ F4│{ [│} ]│& 7│* 8│( 9│) 0│   │ + * ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │    │ F5│ F6│ F7│ F8│_ -│ + │$ 4│% 5│^ 6│   " '│ + * ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ + * │      │ F9│F10│F11│F12│+ =│! 1│@ 2│# 3│: ;│|\Lw│ + * ├┬┬┬┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┼───┴┬┬┬┬┤ + * │││││    │    │                        │    │││││ + * └┴┴┴┴────┴────┴────────────────────────┴────┴┴┴┴┘ + */ +[_RAISE] = LAYOUT( \ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_LBRC, KC_RBRC, KC_7, KC_8, KC_9, KC_0, _______, \ + _______, KC_F5, KC_F6, KC_F7, KC_F8, KC_MINS, KC_PLUS, KC_4, KC_5, KC_6, KC_QUOT, \ + _______, KC_F9, KC_F10, KC_F11, KC_F12, KC_EQL, KC_1, KC_2, KC_3, KC_SCLN, BSL_LWR, \ + _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______ \ +), +/* Adjust/Macro + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Mke│   │   │EEP│RST│   │   │   │   │   │   │   │ + * ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │    │   │   │   │   │   │   │   │   │   │      │ + * ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ + * │      │   │   │   │   │   │   │   │   │   │    │ + * ├┬┬┬┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┼───┴┬┬┬┬┤ + * │││││    │    │                        │    │││││ + * └┴┴┴┴────┴────┴────────────────────────┴────┴┴┴┴┘ + */ + +[_ADJUST] = LAYOUT( \ + QM_MAKE, _______, _______, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______ \ +) +/* Blank Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │   │   │   │   │   │   │   │   │   │   │   │   │ + * ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │    │   │   │   │   │   │   │   │   │   │      │ + * ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬────┤ + * │      │   │   │   │   │   │   │   │   │   │    │ + * ├┬┬┬┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┼───┴┬┬┬┬┤ + * │││││    │    │                        │    │││││ + * └┴┴┴┴────┴────┴────────────────────────┴────┴┴┴┴┘ + */ +/* +[BLANK] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______ \ +) +*/ + +}; + +layer_state_t layer_state_set_keymap(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + diff --git a/layouts/community/60_ansi/brandonschlack-ansi/keymap.c b/layouts/community/60_ansi/brandonschlack-ansi/keymap.c new file mode 100644 index 0000000000..5282ff98b0 --- /dev/null +++ b/layouts/community/60_ansi/brandonschlack-ansi/keymap.c @@ -0,0 +1,83 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Base layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │Esc│! 1│@ 2│# 3│$ 4│% 5│^ 6│& 7│* 8│( 9│) 0│_ -│+ =│ Bckspc│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │{ [│} ]│| \│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │HyCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │: ;│" '│ Enter│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ + * │Shift │ Z │ X │ C │ V │ B │ N │ M │< ,│> .│? /│ ↑ Shift│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │Ctrl│ Opt│ Cmd│ Space │CmdP│←Opt│↓ Fn│→Ctl│ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +[_BASE] = LAYOUT_60_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_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, \ + HY_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, UP_RSFT, \ + KC_LCTL, KC_LOPT, KC_LCMD, KC_SPC, PLY_CMD, LFT_OPT, DWN_FN1, RGT_CTL \ +), + +/* Function Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │~ `│ F1│ F2│ F3│ F4│ F5│ F6│ F7│ F8│ F9│F10│F11│F12│ Del │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │RMod │RH+│RS+│RV+│AS+│ │ │ │F13│F14│F15│PgU│LHP│ SLP │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │RTgl │RH-│RS-│RV-│AS-│ │ │VlD│VlU│Mut│Hom│End│ PlyPse │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ + * │ │LYR│Thm│ │ │RST│ │MKE│Prv│Nxt│PgD│ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +[_FN1] = 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_DELT, \ + RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, KC_F13, KC_F14, KC_F15, KC_PGUP, MC_LHPD, MC_SLPD, \ + RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_HOME, KC_END, KC_MPLY, \ + _______, RGB_LYR, RGB_THM, _______, _______, RESET, _______, QM_MAKE, KC_MPRV, KC_MNXT, KC_PGDN, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______ \ +), +/* Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +/* +[BLANK] = LAYOUT_60_ansi( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______ \ +) +*/ +}; diff --git a/layouts/community/60_ansi/brandonschlack-ansi/rules.mk b/layouts/community/60_ansi/brandonschlack-ansi/rules.mk new file mode 100644 index 0000000000..7aaf727ad2 --- /dev/null +++ b/layouts/community/60_ansi/brandonschlack-ansi/rules.mk @@ -0,0 +1 @@ +USER_NAME := brandonschlack diff --git a/layouts/community/60_ansi_split_bs_rshift/brandonschlack-split/keymap.c b/layouts/community/60_ansi_split_bs_rshift/brandonschlack-split/keymap.c new file mode 100644 index 0000000000..906925ab96 --- /dev/null +++ b/layouts/community/60_ansi_split_bs_rshift/brandonschlack-split/keymap.c @@ -0,0 +1,83 @@ +/* Copyright 2019 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Base layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│! 1│@ 2│# 3│$ 4│% 5│^ 6│& 7│* 8│( 9│) 0│_ -│+ =│| \│~ `│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │{ [│} ]│Bspc │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │HyCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │: ;│" '│ Enter  │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │ LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │↑ Shft│FnP│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤ + * │Ctrl│Opt │Cmd │         Space          │ Cmd│←Opt│↓ Fn│→Ctl│ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +[_BASE] = 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, \ + HY_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, UP_RSFT, PLY_FN1, \ + KC_LCTL, KC_LOPT, KC_LCMD, KC_SPC, KC_RCMD, LFT_OPT, DWN_FN1, RGT_CTL \ +), + +/* Function Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │MKE│ F1│ F2│ F3│ F4│ F5│ F6│ F7│ F8│ F9│F10│F11│F12│LHP│SLP│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │RMod │RH+│RS+│RV+│AS+│   │   │   │   │   │   │ ↑ │MNC│ Del │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │RTgl  │RH-│RS-│RV-│AS-│   │   │   │VlD│VlU│ ← │ → │   Play │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │        │LYR│Thm│   │   │RST│   │Mut│Prv│Nxt│ ↓ │PgUSft│   │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤ + * │    │    │    │                        │    │HmOp│PgDF│EndC│ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +[_FN1] = LAYOUT_60_ansi_split_bs_rshift( \ + QM_MAKE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MC_LHPD, MC_SLPD, \ + RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, KC_VOLU, KC_MPRV, KC_MNXT, KC_UP, MC_MSSN, KC_DELT, \ + RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, KC_VOLD, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_MPLY, \ + _______, RGB_LYR, RGB_THM, _______, _______, RESET, _______, KC_MUTE, KC_END, KC_PGDN, KC_DOWN, PGU_SFT, _______, \ + _______, _______, _______, _______, _______, HOM_OPT, PGD_FN1, END_CTL \ +) +/* Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │   │   │   │   │   │   │   │   │   │   │   │   │   │   │   │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │     │   │   │   │   │   │   │   │   │   │   │   │   │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │      │   │   │   │   │   │   │   │   │   │   │   │        │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │        │   │   │   │   │   │   │   │   │   │   │      │   │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +/* +[BLANK] = LAYOUT_60_ansi_split_bs_rshift( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______ \ +) +*/ +}; diff --git a/layouts/community/60_ansi_split_bs_rshift/brandonschlack-split/rules.mk b/layouts/community/60_ansi_split_bs_rshift/brandonschlack-split/rules.mk new file mode 100644 index 0000000000..7aaf727ad2 --- /dev/null +++ b/layouts/community/60_ansi_split_bs_rshift/brandonschlack-split/rules.mk @@ -0,0 +1 @@ +USER_NAME := brandonschlack diff --git a/layouts/community/60_tsangan_hhkb/brandonschlack-tsngn/keymap.c b/layouts/community/60_tsangan_hhkb/brandonschlack-tsngn/keymap.c new file mode 100644 index 0000000000..b6db28ed9d --- /dev/null +++ b/layouts/community/60_tsangan_hhkb/brandonschlack-tsngn/keymap.c @@ -0,0 +1,84 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Base layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│! 1│@ 2│# 3│$ 4│% 5│^ 6│& 7│* 8│( 9│) 0│_ -│+ =│| \│~ `│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │Tab  │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │{ [│} ]│ Bspc│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │HyCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │: ;│" '│   Enter│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │LShift  │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │↑ Shft│FnP│ + * ├─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┤ + * │Ctrl │Opt│Cmd  │                           │ ←Cmd│↓Op│→Ctrl│ + * └─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ + */ +[_BASE] = 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_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, \ + HY_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, UP_RSFT, PLY_FN1, \ + KC_LCTL, KC_LOPT, KC_LCMD, KC_SPC, LFT_CMD, DWN_OPT, RGT_CTL \ +), + +/* Function Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │MKE│ F1│ F2│ F3│ F4│ F5│ F6│ F7│ F8│ F9│F10│F11│F12│LHP│SLP│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │RMod │RH+│RS+│RV+│Bl+│   │   │   │   │   │   │ ↑ │MNC│ Del │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │RTgl  │RH-│RS-│RV-│Bl-│   │   │   │VlD│Vlu│ ← │ → │   Play │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │        │LYR│Thm│BlT│   │RST│   │Mut│Prv│Nxt│ ↓ │PgUSft│   │ + * ├─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┤ + * │     │   │     │                           │HmCmd│PDO│EndCl│ + * └─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ + */ +[_FN1] = LAYOUT_60_tsangan_hhkb( \ + QM_MAKE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MC_LHPD, MC_SLPD, \ + RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, BL_INC, _______, _______, _______, _______, _______, _______, KC_UP, MC_MSSN, KC_DELT, \ + RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, _______, _______, _______, KC_VOLD, KC_VOLU, KC_LEFT, KC_RGHT, KC_MPLY, \ + _______, RGB_LYR, RGB_THM, BL_TOGG, _______, RESET, _______, KC_MUTE, KC_MPRV, KC_MNXT, KC_DOWN, PGU_SFT, _______, \ + _______, _______, _______, _______, HOM_CMD, PGD_OPT, END_CTL \ +) +/* Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │   │   │   │   │   │   │   │   │   │   │   │   │   │   │   │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │     │   │   │   │   │   │   │   │   │   │   │   │   │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │      │   │   │   │   │   │   │   │   │   │   │   │        │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │        │   │   │   │   │   │   │   │   │   │   │      │   │ + * ├─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┤ + * │     │   │     │                           │     │   │     │ + * └─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ + */ +/* +[BLANK] = LAYOUT_60_tsangan_hhkb( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ +) +*/ + +}; diff --git a/layouts/community/60_tsangan_hhkb/brandonschlack-tsngn/readme.md b/layouts/community/60_tsangan_hhkb/brandonschlack-tsngn/readme.md new file mode 100644 index 0000000000..d79cf7f07e --- /dev/null +++ b/layouts/community/60_tsangan_hhkb/brandonschlack-tsngn/readme.md @@ -0,0 +1,11 @@ +# brandonschlack's 60 Tsangan HHKB Layout + +It is used on + +* [AN-C](https://github.com/qmk/qmk_firmware/tree/master/keyboards/cannonkeys/an_c) +* [Instant60](https://github.com/qmk/qmk_firmware/tree/master/keyboards/cannonkeys/instant60) +* [Polaris](https://github.com/qmk/qmk_firmware/tree/master/keyboards/ai03/polaris) +* [Plain60](https://github.com/qmk/qmk_firmware/tree/master/keyboards/maartenwut/plain60) + +## Features +### Mod-Taps & Layer-Taps diff --git a/layouts/community/60_tsangan_hhkb/brandonschlack-tsngn/rules.mk b/layouts/community/60_tsangan_hhkb/brandonschlack-tsngn/rules.mk new file mode 100644 index 0000000000..7aaf727ad2 --- /dev/null +++ b/layouts/community/60_tsangan_hhkb/brandonschlack-tsngn/rules.mk @@ -0,0 +1 @@ +USER_NAME := brandonschlack diff --git a/layouts/community/65_ansi_blocker/brandonschlack/config.h b/layouts/community/65_ansi_blocker/brandonschlack/config.h new file mode 100644 index 0000000000..e7b09f422c --- /dev/null +++ b/layouts/community/65_ansi_blocker/brandonschlack/config.h @@ -0,0 +1,64 @@ +/* Copyright 2019 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 RGB_MATRIX_ENABLE +// Disable RGB Effects +#define DISABLE_RGB_MATRIX_ALPHAS_MODS +// #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_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_CYCLE_PINWHEEL +#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL +#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_WIDE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#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 + +#define QMK_KEYS_PER_SCAN 4 + +#define USB_LED_CAPS_LOCK_SCANCODE 30 +#endif + +#ifdef KEYBOARD_massdrop_alt +#undef USB_LED_INDICATOR_ENABLE +#endif diff --git a/layouts/community/65_ansi_blocker/brandonschlack/keymap.c b/layouts/community/65_ansi_blocker/brandonschlack/keymap.c new file mode 100644 index 0000000000..6b67cfdca5 --- /dev/null +++ b/layouts/community/65_ansi_blocker/brandonschlack/keymap.c @@ -0,0 +1,117 @@ +/* Copyright 2019 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Base Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │Esc│! 1│@ 2│# 3│$ 4│% 5│^ 6│& 7│* 8│( 9│) 0│_ -│+ =│ Bckspc│Hom│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │{ [│} ]│| \│PgU│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │HyCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │: ;│" '│ Enter│PgD│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │Shift │ Z │ X │ C │ V │ B │ N │ M │< ,│> .│? /│ Shift│ Up│End│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │Ctrl│ Opt│ Cmd│ Space │Cmd │FnPy│ │Lef│Dow│Rig│ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ + */ +[_BASE] = LAYOUT_65_ansi_blocker( \ + 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, \ + HY_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_LOPT, KC_LCMD, KC_SPC, KC_RCMD, PLY_FN1, KC_LEFT, KC_DOWN, KC_RGHT \ +), +/* Function Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │` ~│ F1│ F2│ F3│ F4│ F5│ F6│ F7│ F8│ F9│F10│F11│F12│ Delete│SlD│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │RMod │RH+│RS+│RV+│AS+│ │ │ │ │ │F13│F14│F15│ LHP │VlU│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │RTgl │RH-│RS-│RV-│AS-│ │ │ │ │ │ │ │ │VlD│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │LYR│Thm│ │ │RST│ │Mke│Prv│Nxt│Ply│ │PgU│Mut│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │Hom│PgD│End│ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ + */ +[_FN1] = LAYOUT_65_ansi_blocker( \ + 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_DELT, MC_SLPD, \ + RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, KC_F13, KC_F14, KC_F15, MC_LHPD, KC_VOLU, \ + RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, \ + _______, RGB_LYR, RGB_THM, _______, _______, RESET, _______, QM_MAKE, KC_MPRV, KC_MNXT, KC_MPLY, _______, KC_PGUP, KC_MUTE, \ + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ +), +/* Blank Layout + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴─┴───┴───┴───┘ +[X] = LAYOUT_65_ansi_blocker( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), +*/ +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_keymap(void) { +}; + +// Runs once after keyboard initializes +void keyboard_post_init_keymap(void) { +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_keymap(void) { +}; + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + #ifdef KEYBOARD_massdrop + case RGB_TOG: + if (record->event.pressed) { + rgb_matrix_cycle_flag(); + } + return false; + #endif + default: + return true; //Process all other keycodes normally + } +} + +#ifdef RGB_MATRIX_ENABLE +void rgb_matrix_indicators_user(void) { + if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { + rgb_matrix_set_color(USB_LED_CAPS_LOCK_SCANCODE, RGB_GREEN); + } else if (!HAS_ANY_FLAGS(rgb_matrix_get_flags(), LED_FLAG_KEYS)){ + rgb_matrix_set_color(USB_LED_CAPS_LOCK_SCANCODE, 0, 0, 0); + } +} +#endif + diff --git a/layouts/community/65_ansi_blocker/brandonschlack/readme.md b/layouts/community/65_ansi_blocker/brandonschlack/readme.md new file mode 100644 index 0000000000..effb008465 --- /dev/null +++ b/layouts/community/65_ansi_blocker/brandonschlack/readme.md @@ -0,0 +1,15 @@ +# brandonschlack's 65_ansi_blocker layout + +This is my preferred 65% layout. + +It is used on: + +* [Massdrop ALT](https://github.com/qmk/qmk_firmware/tree/master/keyboards/massdrop/alt) +* [KBD67 MKII](https://github.com/qmk/qmk_firmware/tree/master/keyboards/kbdfans/kbd67/mkiirgb) + +## [Base Layer](http://www.keyboard-layout-editor.com/#/gists/a820c8629394f8f4c3943e6ee518d9a8) +![Base Layer](https://i.imgur.com/gPxDZl7.jpg) + +## [Function Layer](http://www.keyboard-layout-editor.com/#/gists/8ca73a6d3bec8ce736f5db60edf31dcf) +![Function Layer](https://i.imgur.com/gNKHgWa.jpg) + diff --git a/layouts/community/65_ansi_blocker/brandonschlack/rules.mk b/layouts/community/65_ansi_blocker/brandonschlack/rules.mk new file mode 100644 index 0000000000..8584967076 --- /dev/null +++ b/layouts/community/65_ansi_blocker/brandonschlack/rules.mk @@ -0,0 +1,7 @@ +# Build Options +ifeq ($(strip $(KEYBOARD)), gray_studio/space65) + MOUSEKEY_ENABLE = no + BACKLIGHT_ENABLE = no + CONSOLE_ENABLE = yes + COMMAND_ENABLE = yes +endif diff --git a/layouts/community/65_ansi_blocker_split_bs/brandonschlack-split/config.h b/layouts/community/65_ansi_blocker_split_bs/brandonschlack-split/config.h new file mode 100644 index 0000000000..9506c7fe91 --- /dev/null +++ b/layouts/community/65_ansi_blocker_split_bs/brandonschlack-split/config.h @@ -0,0 +1,64 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 RGB_MATRIX_ENABLE +// Disable RGB Effects +#define DISABLE_RGB_MATRIX_ALPHAS_MODS +// #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_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_CYCLE_PINWHEEL +#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL +#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_WIDE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#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 + +#define QMK_KEYS_PER_SCAN 4 + +#define USB_LED_CAPS_LOCK_SCANCODE 30 +#endif + +#ifdef KEYBOARD_massdrop_alt +#undef USB_LED_INDICATOR_ENABLE +#endif diff --git a/layouts/community/65_ansi_blocker_split_bs/brandonschlack-split/keymap.c b/layouts/community/65_ansi_blocker_split_bs/brandonschlack-split/keymap.c new file mode 100644 index 0000000000..9482b12c44 --- /dev/null +++ b/layouts/community/65_ansi_blocker_split_bs/brandonschlack-split/keymap.c @@ -0,0 +1,104 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Base Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│! 1│@ 2│# 3│$ 4│% 5│^ 6│& 7│* 8│( 9│) 0│_ -│+ =│| \│~ `│Hom│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │Tab  │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │{ [│} ]│ Bspc│PgU│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │HyCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │: ;│" '│   Enter│PgD│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │Shift   │ Z │ X │ C │ V │ B │ N │ M │< ,│> .│? /│ Shift│ Up│End│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬┬┬───┼───┼───┤ + * │Ctrl│ Opt│ Cmd│          Space         │Cmd │FnPy│││Lef│Dow│Rig│ + * └────┴────┴────┴────────────────────────┴────┴────┴┴┴───┴───┴───┘ + */ +[_BASE] = LAYOUT_65_ansi_blocker_split_bs( \ + 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, \ + HY_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_LOPT, KC_LCMD, KC_SPC, KC_RCMD, PLY_FN1, KC_LEFT, KC_DOWN, KC_RGHT \ +), +/* Function Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Mke│ F1│ F2│ F3│ F4│ F5│ F6│ F7│ F8│ F9│F10│F11│F12│LHP│MNC│SlD│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │RMod │RH+│RS+│RV+│AS+│ │ │ │ │ │F13│F14│F15│  Del│VlU│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │RTgl │RH-│RS-│RV-│AS-│ │ │ │ │ │ │ │ │VlD│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │LYR│Thm│ │ │RST│ │   │Prv│Nxt│Ply│ │PgU│Mut│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬┬┬───┼───┼───┤ + * │ │ │ │ │ │ │││Hom│PgD│End│ + * └────┴────┴────┴────────────────────────┴────┴────┴┴┴───┴───┴───┘ + */ +[_FN1] = LAYOUT_65_ansi_blocker_split_bs( \ + QM_MAKE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MC_LHPD, MC_MSSN, MC_SLPD, \ + RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, KC_F13, KC_F14, KC_F15, KC_DELT, KC_VOLU, \ + RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, \ + _______, RGB_LYR, RGB_THM, _______, _______, RESET, _______, _______, KC_MPRV, KC_MNXT, KC_MPLY, _______, KC_PGUP, KC_MUTE, \ + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ +), +/* Blank Layout + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬┬┬───┼───┼───┤ + * │ │ │ │ │ │ │││ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴┴┴───┴───┴───┘ +[X] = LAYOUT_65_ansi_blocker_split_bs( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), +*/ +}; + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + #ifdef KEYBOARD_massdrop + case RGB_TOG: + if (record->event.pressed) { + rgb_matrix_cycle_flag(); + } + return false; + #endif + default: + return true; //Process all other keycodes normally + } +} + +#ifdef RGB_MATRIX_ENABLE +void rgb_matrix_indicators_user(void) { + if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { + rgb_matrix_set_color(USB_LED_CAPS_LOCK_SCANCODE, RGB_GREEN); + } else if (!HAS_ANY_FLAGS(rgb_matrix_get_flags(), LED_FLAG_KEYS)){ + rgb_matrix_set_color(USB_LED_CAPS_LOCK_SCANCODE, 0, 0, 0); + } +} +#endif diff --git a/layouts/community/65_ansi_blocker_split_bs/brandonschlack-split/readme.md b/layouts/community/65_ansi_blocker_split_bs/brandonschlack-split/readme.md new file mode 100644 index 0000000000..51c7938eb4 --- /dev/null +++ b/layouts/community/65_ansi_blocker_split_bs/brandonschlack-split/readme.md @@ -0,0 +1,15 @@ +# brandonschlack's 65% ANSI blocker split backspace layout + +This is my preferred 65% layout. + +It is used on: + +* [Massdrop ALT](https://github.com/qmk/qmk_firmware/tree/master/keyboards/massdrop/alt) +* [KBD67 MKII](https://github.com/qmk/qmk_firmware/tree/master/keyboards/kbdfans/kbd67/mkiirgb) + +## [Base Layer](http://www.keyboard-layout-editor.com/#/gists/a820c8629394f8f4c3943e6ee518d9a8) +![Base Layer](https://i.imgur.com/gPxDZl7.jpg) + +## [Function Layer](http://www.keyboard-layout-editor.com/#/gists/8ca73a6d3bec8ce736f5db60edf31dcf) +![Function Layer](https://i.imgur.com/gNKHgWa.jpg) + diff --git a/layouts/community/65_ansi_blocker_split_bs/brandonschlack-split/rules.mk b/layouts/community/65_ansi_blocker_split_bs/brandonschlack-split/rules.mk new file mode 100644 index 0000000000..d12f9d5d32 --- /dev/null +++ b/layouts/community/65_ansi_blocker_split_bs/brandonschlack-split/rules.mk @@ -0,0 +1,2 @@ +# Build Options +USER_NAME := brandonschlack diff --git a/layouts/community/75_ansi/brandonschlack/keymap.c b/layouts/community/75_ansi/brandonschlack/keymap.c new file mode 100644 index 0000000000..0f9d63c7c0 --- /dev/null +++ b/layouts/community/75_ansi/brandonschlack/keymap.c @@ -0,0 +1,105 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* LAYOUT + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ 2.0U │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │1.5U │ │ │ │ │ │ │ │ │ │ │ │ │1.5U │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │1.75U │ │ │ │ │ │ │ │ │ │ │ │2.25U │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │2.25U │ │ │ │ │ │ │ │ │ │ │1.75U │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │1.25│1.25│1.25│6.25U │1U │1U │1U │1U │1U │1U │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ + + /* Base Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│ F1│ F2│ F3│ F4│ F5│ F6│ F7│ F8│ F9│F10│F11│F12│F13│F14│F15│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┤ + * │~ `│! 1│@ 2│# 3│$ 4│% 5│^ 6│& 7│* 8│( 9│) 0│_ -│+ =│ Bckspc│Hom│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │{ [│} ]│| \│PgU│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │: ;│" '│ Enter│PgD│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │Shift │ Z │ X │ C │ V │ B │ N │ M │< ,│> .│? /│ Shift│ Up│End│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │Ctrl│ Opt│ Cmd│ Space │Cmd│Opt│Fn │Lef│Dow│Rig│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ +[_BASE] = LAYOUT_75_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_F13, KC_F14, KC_F15, \ + 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_PGUP, \ + HY_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_LOPT, KC_LCMD, KC_SPC, RWD_CMD, FFD_OPT, PLY_FN1, KC_LEFT, KC_DOWN, KC_RGHT \ +), +/* Function Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Mke│BrD│BrU│Msn│LHP│RV-│RV+│ │ │ │ │ │ │Prv│Nxt│Ply│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ Del │SlD│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │RMod │RH+│RS+│RV+│AS+│ │ │ │ │ │ │ │ │ │VlU│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │RTgl │RH-│RS-│RV-│AS-│ │ │ │ │ │ │ │ │VlD│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │LYR│Thm│ │ │RST│ │ │ │ │ │ │PgU│Mte│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │Hom│PgD│End│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ +[_FN1] = LAYOUT_75_ansi( \ + QM_MAKE, KC_BRMD, KC_BRMU, MC_MSSN, MC_LHPD, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_MPLY, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DELT, MC_SLPD, \ + RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \ + RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, \ + _______, RGB_LYR, RGB_THM, _______, _______, RESET, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_MUTE, \ + _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ +), +/* Blank Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ +[X] = LAYOUT_75_ansi( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), +*/ +}; diff --git a/layouts/community/75_ansi/brandonschlack/readme.md b/layouts/community/75_ansi/brandonschlack/readme.md new file mode 100644 index 0000000000..0dfb081ba7 --- /dev/null +++ b/layouts/community/75_ansi/brandonschlack/readme.md @@ -0,0 +1,7 @@ +# brandonschlack's 75_ansi layout + +This is my preferred 75% layout. + +It is currently used on: + +* [KBD75](https://github.com/qmk/qmk_firmware/tree/master/keyboards/kbdfans/kbd75) diff --git a/layouts/community/75_ansi/brandonschlack/rules.mk b/layouts/community/75_ansi/brandonschlack/rules.mk new file mode 100644 index 0000000000..104063ed44 --- /dev/null +++ b/layouts/community/75_ansi/brandonschlack/rules.mk @@ -0,0 +1,5 @@ +# Build Options +ifneq (, $(findstring kbd75, $(KEYBOARD))) + MOUSEKEY_ENABLE = no +endif +BACKLIGHT_ENABLE = no # No backlights installed diff --git a/layouts/community/ortho_4x12/brandonschlack/config.h b/layouts/community/ortho_4x12/brandonschlack/config.h new file mode 100644 index 0000000000..9b6789c1c9 --- /dev/null +++ b/layouts/community/ortho_4x12/brandonschlack/config.h @@ -0,0 +1,55 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_planck_rev6 +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * 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 +#endif diff --git a/layouts/community/ortho_4x12/brandonschlack/keymap.c b/layouts/community/ortho_4x12/brandonschlack/keymap.c new file mode 100644 index 0000000000..d4c1a4a867 --- /dev/null +++ b/layouts/community/ortho_4x12/brandonschlack/keymap.c @@ -0,0 +1,218 @@ +/* Copyright 2019 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 KEYBOARD_planck_rev6 + #include "muse.h" +#endif +#include "brandonschlack.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty */ +[_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, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┴────────┼────────┼────────┼────────┼────────┼────────┤ + HY_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_ENT, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┴────────┼────────┼────────┼────────┼────────┼────────┤ + MCO_LYR, KC_LCTL, KC_LOPT, KC_LCMD, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +// └────────┴────────┴────────┴────────┴────────┴─────────────────┴────────┴────────┴────────┴────────┴────────┘ +), + +/* Lower */ +[_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_DELT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┴────────┼────────┼────────┼────────┼────────┼────────┤ + SF_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, KC_PGUP, KC_PGDN, KC_END, _______, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┴────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, KC_MUTE, KC_MUTE, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT \ +// └────────┴────────┴────────┴────────┴────────┴─────────────────┴────────┴────────┴────────┴────────┴────────┘ +), + +/* Raise */ +[_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_BSPC, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┴────────┼────────┼────────┼────────┼────────┼────────┤ + KC_DELT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┴────────┼────────┼────────┼────────┼────────┼────────┤ + SF_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, KC_PGUP, KC_PGDN, KC_END, _______, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┴────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, KC_MPLY, KC_MPLY, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT \ +// └────────┴────────┴────────┴────────┴────────┴─────────────────┴────────┴────────┴────────┴────────┴────────┘ +), + +/* Macros */ +[_MACRO] = LAYOUT_ortho_4x12( \ +// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + _______, _______, _______, _______, _______, _______, _______, KC_BRMD, KC_BRMU, MC_MSSN, MC_LHPD, MC_SLPD, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┴────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, MC_BACK, MC_FWRD, PRV_TAB, NXT_TAB, NXT_WIN, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┴────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, PX_AFLL, OP_AFLL, _______, _______, _______, _______, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┴────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +// └────────┴────────┴────────┴────────┴────────┴─────────────────┴────────┴────────┴────────┴────────┴────────┘ +), + +/* Adjust (Lower + Raise) */ +[_ADJUST] = LAYOUT_ortho_4x12( \ +// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + QM_MAKE, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, MC_SLPD, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┴────────┼────────┼────────┼────────┼────────┼────────┤ + QM_FLSH, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┴────────┼────────┼────────┼────────┼────────┼────────┤ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, RGB_RTHM,RGB_THM, _______, _______, _______, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┴────────┼────────┼────────┼────────┼────────┼────────┤ + EEP_RST, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +// └────────┴────────┴────────┴────────┴────────┴─────────────────┴────────┴────────┴────────┴────────┴────────┘ +) + +}; + +layer_state_t layer_state_set_keymap(layer_state_t state) { + state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + return state; +} + +#ifdef KEYBOARD_plaid +// Turn on Red LED when initialized +void keyboard_post_init_keymap(void) { + writePinHigh(LED_RED); +} + +// Use Green LED for Caps Lock +void led_set_user(uint8_t usb_led) { + if (IS_LED_OFF(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(LED_GREEN); + } else { + writePinHigh(LED_GREEN); + } +} +#endif + +#ifdef KEYBOARD_planck_rev6 +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +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_keymap(uint8_t index, 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(MC_WH_U); + #else + tap_code(KC_VOLU); + #endif + } else { + #ifdef MOUSEKEY_ENABLE + tap_code(MC_WH_D); + #else + tap_code(KC_VOLD); + #endif + } + } +} + +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: { +#ifdef AUDIO_ENABLE + static bool play_sound = false; +#endif + if (active) { +#ifdef AUDIO_ENABLE + if (play_sound) { PLAY_SONG(plover_song); } +#endif + layer_on(_ADJUST); + } else { +#ifdef AUDIO_ENABLE + if (play_sound) { PLAY_SONG(plover_gb_song); } +#endif + layer_off(_ADJUST); + } +#ifdef AUDIO_ENABLE + play_sound = true; +#endif + break; + } + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + } + } +} + +void matrix_scan_keymap(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; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; + } + } +#endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + case MCO_LYR: + return false; + default: + return true; + } +} +#endif diff --git a/layouts/community/ortho_4x12/brandonschlack/readme.md b/layouts/community/ortho_4x12/brandonschlack/readme.md new file mode 100644 index 0000000000..847851329f --- /dev/null +++ b/layouts/community/ortho_4x12/brandonschlack/readme.md @@ -0,0 +1,20 @@ +# brandonschlack's 4x12 Ortho Keymap + +This layout is based on the Planck layout. It is macOS-centric, with Colemak and DVORAK removed as I don't use them. + +## Keyboards Using This Layout + +* [Planck](https://github.com/qmk/qmk_firmware/tree/master/keyboards/planck) +* [Plaid](https://github.com/qmk/qmk_firmware/tree/master/keyboards/plaid) +* [JNAO](https://github.com/qmk/qmk_firmware/tree/master/keyboards/planck) (FORCE_LAYOUT=ortho_4x12) + +## Features + +* *Enter* acts as *Right Shift* when held +* On either **LOWER** or **RAISE** layers, tapping *Shift* will toggle *Caps Lock*, hold for Shift. +* Bottom left key is *Hyper* (Shift+Control+Option+Command) which I use to map global shortcuts in macOS. + * Holding *Esc* will also act as Hyper. +* **ADJUST** Layer + * Make command for compiling keyboard firmmware, a Reset key, and Debug toggle. + * Mission Control, Launchpad, and Sleep Display macOS macros + * Alt-Gui swapping diff --git a/layouts/community/ortho_4x12/brandonschlack/rules.mk b/layouts/community/ortho_4x12/brandonschlack/rules.mk new file mode 100644 index 0000000000..e36b073d22 --- /dev/null +++ b/layouts/community/ortho_4x12/brandonschlack/rules.mk @@ -0,0 +1,10 @@ +ifeq ($(strip $(KEYBOARD)), planck/rev6) + SRC += muse.c +endif + +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +BACKLIGHT_ENABLE = no # No backlights installed + +ifeq ($(strip $(KEYBOARD)), jnao) + BOOTMAGIC_ENABLE = lite +endif diff --git a/layouts/community/ortho_5x12/brandonschlack/config.h b/layouts/community/ortho_5x12/brandonschlack/config.h new file mode 100644 index 0000000000..9968297363 --- /dev/null +++ b/layouts/community/ortho_5x12/brandonschlack/config.h @@ -0,0 +1,55 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_preonic_rev3 +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PREONIC_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * 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 +#endif diff --git a/layouts/community/ortho_5x12/brandonschlack/keymap.c b/layouts/community/ortho_5x12/brandonschlack/keymap.c new file mode 100644 index 0000000000..4d7b7483ad --- /dev/null +++ b/layouts/community/ortho_5x12/brandonschlack/keymap.c @@ -0,0 +1,214 @@ +/* Copyright 2019 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 KEYBOARD_preonic_rev3 + #include "muse.h" +#endif +#include "brandonschlack.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty */ +[_BASE] = 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_BSLS, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + HY_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_ENT, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┴────────┼────────┼────────┼────────┼────────┼────────┤ + MCO_LYR, KC_LCTL, KC_LOPT, KC_LCMD, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +// └────────┴────────┴────────┴────────┴────────┴─────────────────┴────────┴────────┴────────┴────────┴────────┘ +), + +/* Lower */ +[_LOWER] = 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_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + SF_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┴────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, KC_MUTE, KC_MUTE, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT \ +// └────────┴────────┴────────┴────────┴────────┴─────────────────┴────────┴────────┴────────┴────────┴────────┘ +), + +/* Raise */ +[_RAISE] = LAYOUT_ortho_5x12( \ +// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELT, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + SF_CAPS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┴────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, KC_MPLY, KC_MPLY, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT \ +// └────────┴────────┴────────┴────────┴────────┴─────────────────┴────────┴────────┴────────┴────────┴────────┘ +), + +/* Function */ +[_MACRO] = LAYOUT_ortho_5x12( \ +// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + _______, _______, _______, _______, _______, _______, _______, KC_BRMD, KC_BRMU, MC_MSSN, MC_LHPD, MC_SLPD, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, MC_BACK, MC_FWRD, PRV_TAB, NXT_TAB, NXT_WIN, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, PX_AFLL, OP_AFLL, _______, _______, _______, _______, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┴────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +// └────────┴────────┴────────┴────────┴────────┴─────────────────┴────────┴────────┴────────┴────────┴────────┘ +), + +/* Adjust (Lower + Raise) */ +[_ADJUST] = LAYOUT_ortho_5x12( \ +// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MC_SLPD, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + QM_MAKE, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + QM_FLSH, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, RGB_RTHM,RGB_THM, _______, _______, _______, \ +// ├────────┼────────┼────────┼────────┼────────┼────────┴────────┼────────┼────────┼────────┼────────┼────────┤ + EEP_RST, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +// └────────┴────────┴────────┴────────┴────────┴─────────────────┴────────┴────────┴────────┴────────┴────────┘ +) + + +}; + +layer_state_t layer_state_set_keymap(layer_state_t state) { + state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + return state; +} + +#ifdef KEYBOARD_preonic_rev3 +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +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_keymap(uint8_t index, 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(MC_WH_U); + #else + tap_code(KC_VOLU); + #endif + } else { + #ifdef MOUSEKEY_ENABLE + tap_code(MC_WH_D); + #else + tap_code(KC_VOLD); + #endif + } + } +} + +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: { +#ifdef AUDIO_ENABLE + static bool play_sound = false; +#endif + if (active) { +#ifdef AUDIO_ENABLE + if (play_sound) { PLAY_SONG(plover_song); } +#endif + layer_on(_ADJUST); + } else { +#ifdef AUDIO_ENABLE + if (play_sound) { PLAY_SONG(plover_gb_song); } +#endif + layer_off(_ADJUST); + } +#ifdef AUDIO_ENABLE + play_sound = true; +#endif + break; + } + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + } + } +} + + +void matrix_scan_keymap(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; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; + } + } +#endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + case MCO_LYR: + return false; + default: + return true; + } +} +#endif diff --git a/layouts/community/ortho_5x12/brandonschlack/readme.md b/layouts/community/ortho_5x12/brandonschlack/readme.md new file mode 100644 index 0000000000..787fbb8207 --- /dev/null +++ b/layouts/community/ortho_5x12/brandonschlack/readme.md @@ -0,0 +1,19 @@ +# brandonschlack's 5x12 Ortho Keymap + +This layout takes inspiration from the Preonic and JNAO. It is macOS-centric, with Colemak and DVORAK removed as I don't use them. + +## Keyboards Using This Layout + +* [Preonic](https://github.com/qmk/qmk_firmware/tree/master/keyboards/planck) +* [JNAO](https://github.com/qmk/qmk_firmware/tree/master/keyboards/planck) (FORCE_LAYOUT=ortho_5x12) + +## Features + +* *Enter* acts as *Right Shift* when held +* On either **LOWER** or **RAISE** layers, tapping *Shift* will toggle *Caps Lock*, hold for Shift. +* Bottom left key is *Hyper* (Shift+Control+Option+Command) which I use to map global shortcuts in macOS. + * Holding *Esc* will also act as Hyper. +* **ADJUST** Layer + * Make command for compiling keyboard firmmware, a Reset key, and Debug toggle. + * Mission Control, Launchpad, and Sleep Display macOS macros + * Alt-Gui swapping diff --git a/layouts/community/ortho_5x12/brandonschlack/rules.mk b/layouts/community/ortho_5x12/brandonschlack/rules.mk new file mode 100644 index 0000000000..dacfc28b23 --- /dev/null +++ b/layouts/community/ortho_5x12/brandonschlack/rules.mk @@ -0,0 +1,10 @@ +ifeq ($(strip $(KEYBOARD)), preonic/rev3) + SRC += muse.c +endif + +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +BACKLIGHT_ENABLE = no # No backlights installed + +ifeq ($(strip $(KEYBOARD)), jnao) + BOOTMAGIC_ENABLE = lite +endif diff --git a/layouts/community/tkl_ansi/brandonschlack/config.h b/layouts/community/tkl_ansi/brandonschlack/config.h new file mode 100644 index 0000000000..df29654049 --- /dev/null +++ b/layouts/community/tkl_ansi/brandonschlack/config.h @@ -0,0 +1,20 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 + +// Explicit RGB Animation Mode Include +#undef RGBLIGHT_ANIMATIONS +#define RGBLIGHT_EFFECT_BREATHING // Only have Breathing Animation diff --git a/layouts/community/tkl_ansi/brandonschlack/keymap.c b/layouts/community/tkl_ansi/brandonschlack/keymap.c new file mode 100644 index 0000000000..6f13d33b4a --- /dev/null +++ b/layouts/community/tkl_ansi/brandonschlack/keymap.c @@ -0,0 +1,102 @@ +/* Copyright 2019 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.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│ │F13│F14│F15│ + * ├───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┤ + * ├───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┤ + * │~ `│! 1│@ 2│# 3│$ 4│% 5│^ 6│& 7│* 8│( 9│) 0│_ -│+ =│ Bckspc│ │Ins│Hom│PgU│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ + * │Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │{ [│} ]│| \│ │Del│End│PgD│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┤ + * │HyCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │: ;│" '│ Enter│ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┐ │ + * │Shift │ Z │ X │ C │ V │ B │ N │ M │< ,│> .│? /│ Shift│ │ Up│ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┤ + * │Ctrl│ Opt│ Cmd│ Space │Cmd │Opt │Fn │Ctrl│ │Lef│Dow│Rig│ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┴─┴───┴───┴───┘ + */ +[_BASE] = 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_F13, KC_F14, KC_F15, \ + 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, \ + HY_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_LOPT, KC_LCMD, KC_SPC, RWD_CMD, FFD_OPT, PLY_FN1, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ +), +/* Function Layer + * ┌───┬───┬───┬───┬───┬───┬─┬───┬───┬───┬───┬─┬───┬───┬───┬───┬─┬───┬───┬───┐ + * │Mke│ │BrD│BrU│Msn│LHP│ │RV-│RV+│ │ │ │ │ │ │ │ │ │ │Mut│ + * ├───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┤ + * ├───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ Del │ │Ply│Slp│VlU│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ + * │RMod │RH+│RS+│RV+│AS+│ │ │ │ │ │ │ │ │ │ │Prv│Nxt│VlD│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┤ + * │RTgl │RH-│RS-│RV-│AS-│ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┐ │ + * │ │LYR│Thm│ │ │RST│ │ │ │ │ │ │ │PgU│ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │Hom│PgD│End│ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┴─┴───┴───┴───┘ + */ +[_FN1] = LAYOUT_tkl_ansi( \ + QM_MAKE, KC_BRMD, KC_BRMU, MC_MSSN, MC_LHPD, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DELT, KC_MPLY, MC_SLPD, KC_VOLU, \ + RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ + RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, RGB_LYR, RGB_THM, _______, _______, RESET, _______, _______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ +) +/* Blank Template + * ┌───┬───┬───┬───┬───┬───┬─┬───┬───┬───┬───┬─┬───┬───┬───┬───┬─┬───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┤ + * ├───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┐ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┴─┴───┴───┴───┘ + */ +/* +[BLANK] = LAYOUT_tkl_ansi( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) +*/ +}; + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/layouts/community/tkl_ansi/brandonschlack/readme.md b/layouts/community/tkl_ansi/brandonschlack/readme.md new file mode 100644 index 0000000000..e8885a13ca --- /dev/null +++ b/layouts/community/tkl_ansi/brandonschlack/readme.md @@ -0,0 +1,55 @@ +# brandonschlack's TKL ANSI layout + +A mostly typical Mac setup, with some personal QMK touches. + +## Base Layer + +The base layer has a standard macOS modifier layout, with **F13-F15** in the F row, in place of **Print Screen**, **Scroll Lock**, and **Pause/Break**. + +### [Mod-Taps](https://docs.qmk.fm/#/feature_advanced_keycodes?id=mod-tap) + +* Hyper Caps Lock + * Hold **Caps Lock** for '**Hyper**' (**Shift**+**Control**+**Option**+**Command**). I use it for mapping global shortcuts for apps. + * Tapping **Caps Lock** functions normally +* Media controls mapped to Right Modifiers + * **Right Command** for **Prev Track** + * **Right Option** for **Next Track** + * **Fn** for **Play/Pause** + +## Function Layer + +The Function layer is a mix of [Apple's *Fn* shortcuts](https://support.apple.com/en-us/HT201236), [WASD Keyboard's Media shortcuts](https://codekeyboards.com/#multimedia), and some QMK functionality. + +### [Apple's *Fn* shortcuts](https://support.apple.com/en-us/HT201236) + +* **Home/Page Down/Page Up/End** as **Fn+Left/Down/Up/Right** +* **Foward Delete** as **Fn+Backspace** +* **Display Brightness Down/Up** as **Fn+F1/F2** +* **Misson Control** (*KC_FIND, but use [Karabiner-Elements](https://pqrs.org/osx/karabiner/index.html) as find -> mission_control*) as **Fn+F3** +* **Launchpad** (*KC_MENU, but use [Karabiner-Elements](https://pqrs.org/osx/karabiner/index.html) as menu -> launchpad*) as **Fn+F4** +* Keyboard Illumination Down/Up used as **RGB Underglow Value Decrease/Increase** on **Fn+F5/F6** + +### [WASD Keyboard's Media shortcuts](https://codekeyboards.com/#multimedia) + +* **Play/Pause** as **Fn+Insert** +* **Prev/Next Track** as **Fn+Delete/End** +* **Volume Up/Down** as **Fn+Page Up/Page Down** +* **Volume Mute** as **Fn+F15** + +### Personal & QMK shortcuts + +* **Sleep Display** (Shift+Control+Power) as **Fn+Home**. +* **QMK Make** as **Fn+Esc**. Sends make command to command line. Holding **Shift** will also append `:flash` target and put keyboard into bootloader. +* **Reset** as **Fn+B** + +### RGB Controls + +* **RGB Toggle** as **Fn+Caps Lock** +* **RGB Hue Increase/Decrease** as **Fn+Q/A** +* **RGB Saturation Increase/Decrease** as **Fn+W/S** +* **RGB Value Increase/Decrease** as **Fn+E/D** +* **RGB Mode Next/Previous** as **Fn+Tab/Shift+Tab** +* **RGB Toggle Layer Indication** as **Fn+Z** + * Changes RGB Color with Layer change (*uses custom RGB_THEME*). +* **RGB Cycle Next Theme** as **Fn+X** + diff --git a/layouts/community/tkl_ansi/brandonschlack/rules.mk b/layouts/community/tkl_ansi/brandonschlack/rules.mk new file mode 100644 index 0000000000..5ce3c8ee43 --- /dev/null +++ b/layouts/community/tkl_ansi/brandonschlack/rules.mk @@ -0,0 +1,4 @@ +# Build Options +CONSOLE_ENABLE = yes # Enable Console for Debugging +MOUSEKEY_ENABLE = no # Don't need Mouse Keys +BACKLIGHT_ENABLE = no # Backlights not installed diff --git a/users/brandonschlack/brandonschlack.c b/users/brandonschlack/brandonschlack.c new file mode 100644 index 0000000000..1e52bd6452 --- /dev/null +++ b/users/brandonschlack/brandonschlack.c @@ -0,0 +1,214 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" + +user_config_t user_config; +#ifdef STOPLIGHT_LED +static stoplight_led_t stoplight_led; +#endif + +/** + * Resets user config in EEPROM + * + * Default is use rgb for layer indication + */ +void eeconfig_init_user(void) { + user_config.raw = 0; + user_config.rgb_layer_change = true; + user_config.rgb_theme = 0; + eeconfig_update_user(user_config.raw); +} + +__attribute__((weak)) +void matrix_init_keymap(void){ } + +void matrix_init_user(void) { + matrix_init_keymap(); +} + +__attribute__((weak)) +void keyboard_post_init_keymap(void){ } + +/** + * Reads user config from EEPROM, + * calls RGB init if RGBs enabled + */ +void keyboard_post_init_user(void){ + // Read the user config from EEPROM + user_config.raw = eeconfig_read_user(); + // Do Stoplight Animation if enabled +#ifdef STOPLIGHT_LED + led_stoplight_start(); +#endif + // Do RGB things if RGBs enabled +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) + keyboard_post_init_rgb(); +#endif + keyboard_post_init_keymap(); +} + +__attribute__ ((weak)) +void shutdown_keymap(void) {} + +/** + * On shutdown, + * If RGBs enabled, + * then set RGB color to Red + */ +void shutdown_user (void) { +#ifdef RGBLIGHT_ENABLE + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + rgblight_sethsv_noeeprom(0, 255, 127); +#endif // RGBLIGHT_ENABLE +#ifdef RGB_MATRIX_ENABLE + rgb_matrix_set_color_all( 0xFF, 0x00, 0x00 ); +#endif //RGB_MATRIX_ENABLE + shutdown_keymap(); +} + +__attribute__ ((weak)) +void suspend_power_down_keymap(void) {} + +/** + * Set rgb_matrix suspend state to true if not already + */ +void suspend_power_down_user(void) { +#ifdef RGB_MATRIX_ENABLE + if (!g_suspend_state) { + rgb_matrix_set_suspend_state(true); + } +#endif //RGB_MATRIX_ENABLE + suspend_power_down_keymap(); +} + +__attribute__ ((weak)) +void suspend_wakeup_init_keymap(void) {} + +/** + * Set rgb_matrix suspend state to false if not already + */ +void suspend_wakeup_init_user(void) { +#ifdef RGB_MATRIX_ENABLE + if (g_suspend_state) { + rgb_matrix_set_suspend_state(false); + } +#endif //RGB_MATRIX_ENABLE + suspend_wakeup_init_keymap(); +} + +__attribute__ ((weak)) +void matrix_scan_keymap(void) {} + +/** + * Checks for Super CMD↯TAB + */ +void matrix_scan_user(void) { + matrix_scan_cmd_tab(); +#ifdef STOPLIGHT_LED + matrix_scan_led_stoplight(); +#endif + matrix_scan_keymap(); +} + +__attribute__ ((weak)) +layer_state_t default_layer_state_set_keymap(layer_state_t state) { + return state; +} + +/** + * For macropads, if a new default layer is set from DF() + * then automatically set that layer with layer_move() + */ +layer_state_t default_layer_state_set_user(layer_state_t state) { +#if defined(IS_MACROPAD) + layer_move(get_highest_layer(state)); +#endif + return default_layer_state_set_keymap(state); +} + +__attribute__ ((weak)) +layer_state_t layer_state_set_keymap(layer_state_t state) { + return state; +} + +/** + * Do RGB things (like layer indication) on layer change + */ +layer_state_t layer_state_set_user(layer_state_t state) { +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) + state = layer_state_set_rgb(state); +#endif // RGBLIGHT_ENABLE + return layer_state_set_keymap(state); +} + +__attribute__((weak)) bool led_update_keymap(led_t led_state) { return true; } + +bool led_update_user(led_t led_state) { +#ifdef STOPLIGHT_LED + if (stoplight_led.is_active) { + return false; + } +#endif + return led_update_keymap(led_state); +} + +#ifdef STOPLIGHT_LED +void led_stoplight_start(void) { + writePin(TOP_LED, LED_ON(false)); + writePin(MIDDLE_LED, LED_ON(false)); + writePin(BOTTOM_LED, LED_ON(false)); + + stoplight_led.is_active = true; + stoplight_led.timer = timer_read(); +}; + +void led_stoplight_set(pin_t pin) { + writePin(pin, LED_ON(true)); +}; + +void led_stoplight_end(void) { + // Reset timer and status variables + stoplight_led.is_active = false; + stoplight_led.index = 0; + stoplight_led.timer = 0; + led_update_kb(host_keyboard_led_state()); +}; + +void matrix_scan_led_stoplight(void) { + if (stoplight_led.is_active) { + if (timer_elapsed(stoplight_led.timer) > (1000 * (stoplight_led.index + 1))) { + switch (stoplight_led.index){ + case 0: + led_stoplight_set(TOP_LED); + stoplight_led.index++; + break; + case 1: + led_stoplight_set(MIDDLE_LED); + stoplight_led.index++; + break; + case 2: + led_stoplight_set(BOTTOM_LED); + stoplight_led.index++; + break; + default: + led_stoplight_end(); + break; + } + } + } +}; +#endif diff --git a/users/brandonschlack/brandonschlack.h b/users/brandonschlack/brandonschlack.h new file mode 100644 index 0000000000..d7dbc0ea4b --- /dev/null +++ b/users/brandonschlack/brandonschlack.h @@ -0,0 +1,83 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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" +#include "version.h" +#include "eeprom.h" +#include "process_records.h" +#ifdef TAP_DANCE_ENABLE +# include "tap_dances.h" +#endif // TAP_DANCE_ENABLE +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) +# include "rgb_bs.h" +#endif + +/* TODO Layer Names */ +enum bs_layers { + _BASE = 0, + _M1 = 1, + _M2 = 2, + _M3 = 3, + _M4 = 4, + _FN1 = 5, + _M1_FN1 = 6, + _M2_FN1 = 7, + _M3_FN1 = 8, + _M4_FN1 = 9, + _FN2 = 10, + _M1_FN2 = 11, + _M2_FN2 = 12, + _M3_FN2 = 13, + _M4_FN2 = 14, + _ADJUST = 15 // 15: Change keyboard settings +}; + +#define _LOWER _FN1 +#define _RAISE _FN2 + +/* TODO User EECONFIG */ +typedef union { + uint32_t raw; + struct { + bool rgb_layer_change :1; + uint8_t rgb_theme :4; + }; +} user_config_t; +extern user_config_t user_config; + +void matrix_init_keymap(void); +void keyboard_post_init_keymap(void); +void shutdown_keymap(void); +void suspend_power_down_keymap(void); +void suspend_wakeup_init_keymap(void); +void matrix_scan_keymap(void); +layer_state_t default_layer_state_set_keymap(layer_state_t state); +layer_state_t layer_state_set_keymap(layer_state_t state); +bool led_update_keymap(led_t led_state); + +#ifdef STOPLIGHT_LED +typedef struct { + bool is_active :1; + uint8_t index :7; + uint16_t timer :16; +} stoplight_led_t; + +void led_stoplight_start(void); +void led_stoplight_set(pin_t pin); +void led_stoplight_end(void); +void matrix_scan_led_stoplight(void); +#endif diff --git a/users/brandonschlack/config.h b/users/brandonschlack/config.h new file mode 100644 index 0000000000..8f09adef3e --- /dev/null +++ b/users/brandonschlack/config.h @@ -0,0 +1,55 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 TAPPING_TOGGLE 2 +#define TAPPING_TERM 200 +#define PERMISSIVE_HOLD +#define TAP_HOLD_CAPS_DELAY 200 + +#ifdef RGBLIGHT_ENABLE +# define RGBLIGHT_SLEEP +#endif + +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) && !defined(RGBLIGHT_LAYERS) +# define RGB_THEME_ENABLE +#endif + +#ifdef RGB_THEME_ENABLE +# define DISABLE_RGB_THEME_JAMON +# define DISABLE_RGB_THEME_OBLIQUE +#endif + +#ifdef ENCODER_ENABLE +# define TAP_CODE_DELAY 10 +#else +# define TAP_CODE_DELAY 5 +#endif + +/* Disable unused and unneeded features to reduce on firmware size */ +#ifndef NO_ACTION_MACRO +# define NO_ACTION_MACRO +#endif +#ifndef NO_ACTION_FUNCTION +# define NO_ACTION_FUNCTION +#endif + +#ifdef LOCKING_SUPPORT_ENABLE +# undef LOCKING_SUPPORT_ENABLE +#endif +#ifdef LOCKING_RESYNC_ENABLE +# undef LOCKING_RESYNC_ENABLE +#endif diff --git a/users/brandonschlack/process_records.c b/users/brandonschlack/process_records.c new file mode 100644 index 0000000000..dfd427bdc1 --- /dev/null +++ b/users/brandonschlack/process_records.c @@ -0,0 +1,172 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" + +// Super CMD↯TAB +bool is_cmd_tab_active = false; +uint16_t cmd_tab_timer = 0; + +__attribute__ ((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + +// Consolidated Macros +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QM_MAKE: // Sends 'qmk compile' or 'qmk flash' + if (record->event.pressed) { + bool flash = false; + // If is a keyboard and auto-flash is not set in rules.mk, + // then Shift will trigger the flash command + #if !defined(FLASH_BOOTLOADER) && !defined(IS_MACROPAD) + uint8_t temp_mod = get_mods(); + uint8_t temp_osm = get_oneshot_mods(); + clear_mods(); + clear_oneshot_mods(); + if ( (temp_mod | temp_osm) & MOD_MASK_SHIFT ) + #endif + { + flash = true; + } + send_make_command(flash); + } + break; + case QM_FLSH: // Sends flash command instead of compile + if (record->event.pressed) { + clear_mods(); + clear_oneshot_mods(); + send_make_command(true); + } + break; + case QM_VRSN: // Prints firmware version + if (record->event.pressed) { + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE); + } + break; + case QM_KYBD: // Prints keyboard path + if (record->event.pressed) { + SEND_STRING("keyboards/" QMK_KEYBOARD "/"); + } + break; + case QM_KYMP: // Prints keymap path + if (record->event.pressed) { + SEND_STRING("keyboards/" QMK_KEYBOARD "/keymaps/" QMK_KEYMAP "/keymap.c"); + } + break; + case CMD_TAB: // Super CMD↯TAB + if (record->event.pressed) { + if (!is_cmd_tab_active) { + is_cmd_tab_active = true; + register_code(KC_LGUI); + } + cmd_tab_timer = timer_read(); + register_code(KC_TAB); + } else { + unregister_code(KC_TAB); + } + break; + #if defined(RGB_THEME_ENABLE) + case RGB_LYR: + if (record->event.pressed) { + user_config.rgb_layer_change ^= 1; + dprintf("rgb layer change [EEPROM]: %u\n", user_config.rgb_layer_change); + eeconfig_update_user(user_config.raw); + if (user_config.rgb_layer_change) { + layer_state_set(layer_state); + } + } + break; + case RGB_HUI ... RGB_SAD: + if (record->event.pressed) { + if (user_config.rgb_layer_change) { + user_config.rgb_layer_change = false; + dprintf("rgb layer change [EEPROM]: %u\n", user_config.rgb_layer_change); + eeconfig_update_user(user_config.raw); + } + } + break; + case RGB_THEME_FORWARD: + if (record->event.pressed) { + uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)); + if(shifted) { + rgb_theme_step_reverse(); + } else { + rgb_theme_step(); + } + layer_state_set(layer_state); + } + break; + case RGB_THEME_REVERSE: + if (record->event.pressed) { + uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)); + if(shifted) { + rgb_theme_step(); + } else { + rgb_theme_step_reverse(); + } + layer_state_set(layer_state); + } + break; + #endif + } + return process_record_keymap(keycode, record); +} + +// Super CMD↯TAB +void matrix_scan_cmd_tab(void) { + if (is_cmd_tab_active) { + if (timer_elapsed(cmd_tab_timer) > 500) { + unregister_code(KC_LGUI); + is_cmd_tab_active = false; + } + } +} + +/** + * Send Make Command + * + * Sends 'qmk compile -kb keyboard -km keymap' command to compile firmware + * Uses 'qmk flash' and resets keyboard, if flash_bootloader set to true + * Sends CTPC and/or FORCE_LAYOUT parameters if built with those options + */ +void send_make_command(bool flash_bootloader) { +#ifdef FORCE_LAYOUT // Add layout string if built with FORCE_LAYOUT + SEND_STRING("FORCE_LAYOUT=" FORCE_LAYOUT " "); +#endif +#ifdef CONVERT_TO_PROTON_C // Add CTPC if built with CONVERT_TO_PROTON_C + SEND_STRING("CTPC=yes "); +#endif + SEND_STRING("qmk "); + if (flash_bootloader) { +#ifndef KEYBOARD_massdrop // Don't run flash for Massdrop boards + SEND_STRING("flash "); + } else { +#endif + SEND_STRING("compile "); + } + SEND_STRING("-kb " QMK_KEYBOARD " "); + SEND_STRING("-km " QMK_KEYMAP); + if (flash_bootloader) { +#if defined(KEYBOARD_massdrop) // only run for Massdrop boards + SEND_STRING(" && mdlflash " QMK_KEYBOARD " " QMK_KEYMAP); +#endif + } + SEND_STRING(SS_TAP(X_ENTER)); + if (flash_bootloader) { + reset_keyboard(); + } +} diff --git a/users/brandonschlack/process_records.h b/users/brandonschlack/process_records.h new file mode 100644 index 0000000000..057233fb0e --- /dev/null +++ b/users/brandonschlack/process_records.h @@ -0,0 +1,152 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" + +// Macros +enum custom_keycodes { + QM_MAKE = SAFE_RANGE, + QM_FLSH, + QM_VRSN, + QM_KYBD, + QM_KYMP, + CMD_TAB, + RGB_LYR, + RGB_THEME_FORWARD, + RGB_THEME_REVERSE, + KEYMAP_SAFE_RANGE +}; + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record); +void matrix_scan_cmd_tab(void); + +/** + * QMK Defines + * Some meta aliases for QMK features such as Mod-Taps + * and for cleaner looking Layer Toggles + */ +/* Control Mod-Tap */ +#define CTL_ESC CTL_T(KC_ESC) // Hold Escape for Control +#define CTL_TAB CTL_T(KC_TAB) // Hold Tab for Control +#define CTL_CAP CTL_T(KC_CAPS) // Hold Caps Lock for Control +/* Command Mod-Tap */ +#define CMD_ESC CMD_T(KC_ESC) // Hold Escape for Command +#define CMD_CAP CMD_T(KC_CAPS) // Hold Caps Lock for Command +#define CMD_SPC CMD_T(KC_SPC) // Hold Space for Command +/* Hyper Mod-Tap */ +#define HY_ESC ALL_T(KC_ESC) // Hold Escape for Hyper (Shift-Control-Option-Command) +#define HY_TAB ALL_T(KC_TAB) // Hold Tab for Hyper (Shift-Control-Option-Command) +#define HY_CAPS ALL_T(KC_CAPS) // Hold Caps Lock for Hyper (Shift-Control-Option-Command) +/* Shift Mod-Tap */ +#define SF_CAPS LSFT_T(KC_CAPS) // Hold Caps Lock for Left Shift +#define SFT_ENT RSFT_T(KC_ENT) // Hold Enter for Right Shift +#define SF_SLSH RSFT_T(KC_SLSH) // Tap Right Shift for Slash (/) +#define SF_BSLS RSFT_T(KC_BSLS) // Tap Right Shift for Back Slash (\) +/* Layer Aliases */ +#define FN_LYR MO(_FN1) // Hold for FN Layer +#define FN2_LYR MO(_FN2) // Hold for FN2 Layer +#define LOWER MO(_LOWER) // Hold for LOWER Layer +#define RAISE MO(_RAISE) // Hold for RAISE Layer +#define TT_FN TT(_FN1) // Hold for FN Layer, or Double-Tap to Toggle +#define TT_FN2 TT(_FN2) // Hold for FN2 Layer, or Double-Tap to Toggle +#define TT_LWR TT(_LOWER) // Hold for LOWER Layer, or Double-Tap to Toggle +#define TT_RAI TT(_RAISE) // Hold for RAISE Layer, or Double-Tap to Toggle +#define SPC_LWR LT(_LOWER, KC_SPC) // Tap for Space, Hold for LOWER Layer +#define SPC_RAI LT(_RAISE, KC_SPC) // Tap for Space, Hold for RAISE Layer +#define SLH_LWR LT(_LOWER, KC_SLSH) // Tap for /, Hold for LOWER Layer +#define BSL_LWR LT(_LOWER, KC_BSLS) // Tap for \, Hold for LOWER Layer +#define MCO_LYR MO(_MACRO) // Hold for MACRO Layer +#define TG_ADJT TG(_ADJUST) // Toggle ADJUST Layer +#define TG_LGHT TG(_LIGHT) // Toggle LIGHT Layer +/** + * Media Mod-Tap + * Use the Mod-Tap feature for easy media controls + * Used with >=65% layouts + */ +#define RWD_CMD RCMD_T(KC_MPRV) // Tap Right Command for Prev Track +#define PLY_CMD RCMD_T(KC_MPLY) // Tap Right Command for Play/Pause +#define FFD_OPT ROPT_T(KC_MNXT) // Tap Right Option for Next Track +#define PLY_FN1 LT(_FN1, KC_MPLY) // Tap Fn for Play/Pause +#define PLY_FN2 LT(_FN2, KC_MPLY) // Tap Fn2 for Play/Pause +#define MUT_SFT RSFT_T(KC_MUTE) // Tap Right Shift for Mute +/** + * Arrow Mod-Tap + * Use the Mod-Tap feature for arrow keys + * Mostly used for 40-60% layouts + */ +#define UP_RSFT RSFT_T(KC_UP) // Tap Right Shift for Up +#define LFT_OPT ROPT_T(KC_LEFT) // Tap Right Option for Left +#define LFT_CMD RCMD_T(KC_LEFT) // Tap Right Command for Left +#define DWN_FN1 LT(1, KC_DOWN) // Tap Fn for Down +#define DWN_LWR DWN_FN1 // Tap Lower for Down +#define DWN_FN2 LT(2, KC_DOWN) // Tap Fn2 for Down +#define DWN_RAI DWN_FN2 // Tap Raise for Down +#define DWN_OPT ROPT_T(KC_DOWN) // Tap Right Option for Down +#define RGT_SFT RSFT_T(KC_RGHT) // Tap Right Shift for Right +#define RGT_OPT ROPT_T(KC_RGHT) // Tap Right Option for Right +#define RGT_CTL RCTL_T(KC_RGHT) // Tap Right Ctrl for Right +/** + * Nav Mod-Tap + * Use the Mod-Tap feature for nav keys (Home/End, Page Up/Down) + * Mostly used for 40-60% layouts, on a function layer + */ +#define PGU_SFT RSFT_T(KC_PGUP) // Tap Right Shift for Page Up +#define HOM_OPT ROPT_T(KC_HOME) // Tap Right Option for Home +#define HOM_CMD RCMD_T(KC_HOME) // Tap Right Command for Home +#define PGD_OPT ROPT_T(KC_PGDN) // Tap Right Option for Page Down +#define PGD_FN1 LT(1, KC_PGDN) // Tap Fn for Page Down +#define PGD_LWR PGD_FN1 // Tap Lower for Page Down +#define PGD_FN2 LT(2, KC_PGDN) // Tap Fn2 for Page Down +#define PGD_RAI PGD_FN2 // Tap Raise for Page Down +#define END_OPT ROPT_T(KC_END) // Tap Right Option for End +#define END_CTL RCTL_T(KC_END) // Tap Right Control for End + +/** + * MacOS + * Common shortcuts used in macOS + * Reference: https://support.apple.com/en-us/HT201236 + */ +#define MC_POWR KC_POWER // Power (KC_POWER) +#define MC_SLEP LOPT(LCMD(KC_POWER)) // Sleep (Option-Command-Power) +#define MC_SLPD LCTL(LSFT(KC_POWER)) // Sleep Display (Control-Shift-Power) +#define MC_LOCK LCTL(LCMD(KC_Q)) // Lock Screen (Control-Command-Q) +#define MC_MSSN KC_FIND // Mission Control: Configure karabiner for find -> mission_control +#define MC_LHPD KC_MENU // Launchpad: Configure karabiner for menu -> launchpad +#define MC_CMTB LCMD(KC_TAB) // Command-Tab +#define MC_BACK LCMD(KC_LBRC) // Back (Command–Left Bracket) +#define MC_FWRD LCMD(KC_RBRC) // Forward (Command–Right Bracket) +#define CLS_TAB LCMD(KC_W) // Close Tab (Command–W) +#define REO_TAB LSFT(LCMD(KC_T)) // Reopen Last Tab (Shift-Command-T) +#define NXT_TAB LCTL(KC_TAB) // Next Tab (Control-Tab) +#define PRV_TAB LSFT(LCTL(KC_TAB)) // Previous Tab (Shift-Control-Tab) +#define NXT_WIN LCMD(KC_GRV) // Next Window (Control-Grave) +#define PRV_WIN LCMD(KC_TILD) // Previous Window (Shift-Control-Grave) +#define MC_PLYR LCMD(KC_F8) // Focuses current Media Player +#define MC_UNDO LCMD(KC_Z) // Undo (Command-Z) +#define MC_REDO LSFT(LCMD(KC_Z)) // Redo (Shift-Command-Z) +#define OP_AFLL HYPR(KC_BSLS) // 1Password Autofill (Shift-Control-Option-Command-\) +#define PX_AFLL LSFT(LOPT(KC_X)) // 1PasswordX Autofill (Shift-Option-X) +// Reverse scrolling for using with macOS Natural Scrolling. +#define MC_WH_U KC_WH_D // Mouse Wheel Up +#define MC_WH_D KC_WH_U // Mouse Wheel Down +#define MC_WH_L KC_WH_R // Mouse Wheel Left +#define MC_WH_R KC_WH_L // Mouse Wheel Right + +// RGB Theme +#define RGB_THM RGB_THEME_FORWARD // Cycle next RGB_THEME +#define RGB_RTHM RGB_THEME_REVERSE // Cycle previous RGB_THEME + +void send_make_command(bool flash_bootloader); diff --git a/users/brandonschlack/readme.md b/users/brandonschlack/readme.md new file mode 100644 index 0000000000..84f216f9f8 --- /dev/null +++ b/users/brandonschlack/readme.md @@ -0,0 +1,48 @@ +# Overview + +My QMK home. I feel as though I stand on the shoulders of giants, for a lot of my code here is borrowed and adapted from so many contributors here, and that I hope my code here can help or inspire others. + +## Layers, Handlers, and Macros +### Layers + +I have some predefined layer names for keyboards: +* **_BASE**: Default Layer, QWERTY layout. +* **_FN1**: Function Layer for 60% and above, and additional macros and shortcuts on 50% and below. +* **_LOWER** and **_RAISE**: Function layers for 40% + +and macropads: +* **_REEDER**: Shortcuts for [Reeder.app](https://reederapp.com/), my RSS feed reader +* **_MEDIA**: Media controls +* **_NAVI**: Navigation macros, for changing tabs and scrolling +* **_KARABINER**: Generic macro keys, meant to be customized per app with [Karabiner](https://pqrs.org/osx/karabiner/) + +#### Protected Layers +I have some named "protected" layers, meant to be at the end of the layer list for changing keyboard settings and features. + +* **KEYMAP_LAYERS**: Add additional layers in keymap. +* **_AUDIO**: Audio feature controls. +* **_LIGHT**: RGB Light/Matrix feature controls. +* **_ADJUST**: General keyboard settings and toggles. Can also contain RGB and Audio controls on larger boards that don't need and extra layer for those controls. + +### EEPROM User Config + +I have a custom userspace config implemented to save settings on the board to persist across shutdowns. I currently store: + +* rgb_layer_change - a toggle for using RGB themes for layer indication +* rgb_theme - a pointer to the currently set RGB Theme + +### Process Handlers + +### Keycode Aliases + +I am a macOS user and so a lot of my aliases are + +### Macros + + +## Tap Dances + +### Tap Dance Trigger Layer + +## RGB +### RGB Theme diff --git a/users/brandonschlack/rgb_bs.c b/users/brandonschlack/rgb_bs.c new file mode 100644 index 0000000000..1abf785b49 --- /dev/null +++ b/users/brandonschlack/rgb_bs.c @@ -0,0 +1,146 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" +#include "rgb_theme.h" +#include "rgb_bs.h" + +#if defined(RGBLIGHT_ENABLE) +extern rgblight_config_t rgblight_config; +#elif defined(RGB_MATRIX_ENABLE) +extern rgb_config_t rgb_matrix_config; +extern bool g_suspend_state; +extern led_config_t g_led_config; +#endif + +#if defined(RGB_THEME_ENABLE) +// Should be rgb_theme.c +#define RGB_THEME(name) const rgb_theme_t RGB_##name +#define RGB_THEME_IMPLS +#include "rgb_theme_user.inc" +#undef RGB_THEME_IMPLS +#undef RGB_THEME + +#define RGB_THEME(name) [RGB_THEME_##name] = &RGB_##name, +const rgb_theme_t *themes[] = { + #include "rgb_theme_user.inc" +}; +#undef RGB_THEME + +// Userspace loose colors +rgb_theme_color_t default_adjust = { HSV_SPRINGGREEN }; +#endif + +void keyboard_post_init_rgb(void) { + layer_state_set_user(layer_state); +} + +#if defined(RGB_THEME_ENABLE) +void set_rgb_theme(uint8_t index) { + if (!user_config.rgb_layer_change) { + user_config.rgb_layer_change = true; + } + user_config.rgb_theme = index; + dprintf("rgb theme [EEPROM]: %u\n", user_config.rgb_theme); + eeconfig_update_user(user_config.raw); +} + +rgb_theme_t get_rgb_theme(void) { + return *themes[user_config.rgb_theme]; +} + +void rgb_theme_step(void) { + uint8_t current = user_config.rgb_theme; + current = (current + 1) % RGB_THEME_MAX; + set_rgb_theme(current); +} + +void rgb_theme_step_reverse(void) { + uint8_t current = user_config.rgb_theme; + current = (current - 1) % RGB_THEME_MAX; + set_rgb_theme(current); +} + +rgb_theme_color_t get_rgb_theme_color(uint8_t index) { + rgb_theme_t theme = get_rgb_theme(); + size_t rgb_theme_color_max = sizeof theme.colors / sizeof *theme.colors; + + if (index == _ADJUST) { + return default_adjust; + } else { + return **(theme.colors + (index % rgb_theme_color_max)); + } +}; + +void rgb_theme_layer(layer_state_t state) { + uint8_t rgb_color_index = get_highest_layer(state); + HSV color = get_rgb_theme_color(rgb_color_index); +#if defined(RGBLIGHT_ENABLE) + color.v = rgblight_config.val; +#elif defined(RGB_MATRIX_ENABLE) + color.v = rgb_matrix_config.hsv.v; +#endif + rgb_layer_helper( color.h, color.s, color.v ); +} +#endif + +#ifdef RGB_MATRIX_ENABLE +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_ANY_FLAGS(g_led_config.flags[i], led_type)) { + rgb_matrix_set_color( i, red, green, blue ); + } + } +} + +void rgb_matrix_cycle_flag (void) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: + rgb_matrix_set_flags(LED_FLAG_KEYS); + rgb_matrix_set_color_all(0, 0, 0); + break; + case LED_FLAG_KEYS: + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_set_color_all(0, 0, 0); + break; + case LED_FLAG_UNDERGLOW: + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_set_color_all(0, 0, 0); + break; + default: + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_enable(); + break; + } +} +#endif + +void rgb_layer_helper(uint8_t hue, uint8_t sat, uint8_t val) { +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) + rgblight_sethsv_noeeprom(hue, sat, val); +#ifdef RGB_MATRIX_ENABLE + rgb_matrix_layer_helper(0, 0, 0, rgb_matrix_get_flags()); +#endif +} +#endif + +layer_state_t layer_state_set_rgb(layer_state_t state) { +#if defined(RGB_THEME_ENABLE) + if (user_config.rgb_layer_change) { + rgb_theme_layer(state); + } +#endif // RGBLIGHT_ENABLE + return state; +} diff --git a/users/brandonschlack/rgb_bs.h b/users/brandonschlack/rgb_bs.h new file mode 100644 index 0000000000..c5cbd59697 --- /dev/null +++ b/users/brandonschlack/rgb_bs.h @@ -0,0 +1,35 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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" +#ifdef RGB_THEME_ENABLE +# include "rgb_theme.h" +#endif +#ifdef RGB_MATRIX_ENABLE +# include "rgb_matrix.h" +#endif + +#ifdef RGB_MATRIX_ENABLE +#define LED_FLAG_KEYS (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER) + +void rgb_matrix_layer_helper(uint8_t red, uint8_t green, uint8_t blue, uint8_t led_type); +void rgb_matrix_cycle_flag(void); +#endif + +void keyboard_post_init_rgb(void); +void rgb_layer_helper(uint8_t hue, uint8_t sat, uint8_t val); + +layer_state_t layer_state_set_rgb(layer_state_t state); diff --git a/users/brandonschlack/rgb_theme.h b/users/brandonschlack/rgb_theme.h new file mode 100644 index 0000000000..7c8b2923fc --- /dev/null +++ b/users/brandonschlack/rgb_theme.h @@ -0,0 +1,51 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" +#include "color.h" +#include "rgblight_list.h" + +/*TODO Update as RGBLIGHT Mode */ +#ifndef RGB_THEME_COLORS_MAX +#define RGB_THEME_COLORS_MAX 5 +#endif + +enum rgb_themes { +#define RGB_THEME(name) RGB_THEME_##name, + #include "rgb_theme_user.inc" +#undef RGB_THEME + RGB_THEME_MAX +}; + +// RGB Theme Color +typedef const HSV rgb_theme_color_t; +#define RGB_THEME_COLOR(tname, tcolor,...) rgb_theme_color_t tname ## _ ## tcolor = { __VA_ARGS__ } + +// RGB Theme +typedef struct { + const HSV *colors[RGB_THEME_COLORS_MAX]; +} rgb_theme_t; +extern const rgb_theme_t *themes[]; + +void set_rgb_theme(uint8_t index); +rgb_theme_t get_rgb_theme(void); + +void rgb_theme_step(void); +void rgb_theme_step_reverse(void); + +rgb_theme_color_t get_rgb_theme_color(uint8_t index); +void rgb_theme_layer(layer_state_t state); diff --git a/users/brandonschlack/rgb_theme_user.inc b/users/brandonschlack/rgb_theme_user.inc new file mode 100644 index 0000000000..a07e62b789 --- /dev/null +++ b/users/brandonschlack/rgb_theme_user.inc @@ -0,0 +1,95 @@ +// Basic Theme +#ifndef DISABLE_RGB_THEME_BASIC +#ifndef RGB_THEME_IMPLS +RGB_THEME(BASIC) +#else +RGB_THEME_COLOR(BASIC, WHITE, HSV_WHITE); +RGB_THEME_COLOR(BASIC, BLUE, HSV_BLUE); +RGB_THEME_COLOR(BASIC, RED, HSV_RED); +RGB_THEME_COLOR(BASIC, GREEN, HSV_GREEN); +RGB_THEME_COLOR(BASIC, YELLOW, HSV_YELLOW); +RGB_THEME(BASIC) = { { &BASIC_WHITE, &BASIC_BLUE, &BASIC_RED, &BASIC_GREEN, &BASIC_YELLOW } }; +#endif // RGB_THEME_IMPLS +#endif // DISABLE_RGB_THEME_BASIC + +// Laser Theme +#ifndef DISABLE_RGB_THEME_LASER +#ifndef RGB_THEME_IMPLS +RGB_THEME(LASER) +#else +RGB_THEME_COLOR(LASER, PURPLE, 191, 255, 255); +RGB_THEME_COLOR(LASER, PINK, 237, 255, 255); +RGB_THEME_COLOR(LASER, BLUE, 165, 255, 255); +RGB_THEME_COLOR(LASER, CYAN, 133, 255, 255); +RGB_THEME_COLOR(LASER, MAGENTA, 213, 255, 255); +RGB_THEME(LASER) = { { &LASER_PURPLE, &LASER_PINK, &LASER_BLUE, &LASER_CYAN, &LASER_MAGENTA } }; +#endif // RGB_THEME_IMPLS +#endif // DISABLE_RGB_THEME_LASER + +// Metropolis Theme +#ifndef DISABLE_RGB_THEME_METROPOLIS +#ifndef RGB_THEME_IMPLS +RGB_THEME(METROPOLIS) +#else +RGB_THEME_COLOR(METROPOLIS, TEAL, 96, 207, 255); +RGB_THEME_COLOR(METROPOLIS, RED, HSV_RED); +RGB_THEME_COLOR(METROPOLIS, YELLOW, 24, 255, 255); +RGB_THEME_COLOR(METROPOLIS, BLUE, 168, 255, 255); +RGB_THEME_COLOR(METROPOLIS, WHITE, HSV_WHITE); +RGB_THEME(METROPOLIS) = { { &METROPOLIS_TEAL, &METROPOLIS_RED, &METROPOLIS_YELLOW, &METROPOLIS_BLUE, &METROPOLIS_WHITE } }; +#endif // RGB_THEME_IMPLS +#endif // DISABLE_RGB_THEME_METROPOLIS + +// Canvas Theme +#ifndef DISABLE_RGB_THEME_CANVAS +#ifndef RGB_THEME_IMPLS +RGB_THEME(CANVAS) +#else +RGB_THEME_COLOR(CANVAS, WHITE, HSV_WHITE); +RGB_THEME_COLOR(CANVAS, ORANGE, 10, 255, 255); +RGB_THEME_COLOR(CANVAS, RED, 0, 231, 255); +RGB_THEME_COLOR(CANVAS, GREEN, 74, 207, 255); +RGB_THEME_COLOR(CANVAS, BLUE, 170, 135, 255); +RGB_THEME(CANVAS) = { { &CANVAS_WHITE, &CANVAS_ORANGE, &CANVAS_RED, &CANVAS_GREEN, &CANVAS_BLUE } }; +#endif // RGB_THEME_IMPLS +#endif // DISABLE_RGB_THEME_CANVAS + +// Jamon Theme +#ifndef DISABLE_RGB_THEME_JAMON +#ifndef RGB_THEME_IMPLS +RGB_THEME(JAMON) +#else +RGB_THEME_COLOR(JAMON, RED, HSV_RED); +RGB_THEME_COLOR(JAMON, LIGHTRED, 4, 255, 255); +RGB_THEME_COLOR(JAMON, WHITE, HSV_WHITE); +RGB_THEME_COLOR(JAMON, YELLOW, HSV_GOLD); +RGB_THEME(JAMON) = { { &JAMON_RED, &JAMON_LIGHTRED, &JAMON_WHITE, &JAMON_YELLOW } }; +#endif // RGB_THEME_IMPLS +#endif // DISABLE_RGB_THEME_JAMON + +// Striker Theme +#ifndef DISABLE_RGB_THEME_STRIKER +#ifndef RGB_THEME_IMPLS +RGB_THEME(STRIKER) +#else +RGB_THEME_COLOR(STRIKER, BLUE, HSV_BLUE); +RGB_THEME_COLOR(STRIKER, AZURE, HSV_AZURE); +RGB_THEME_COLOR(STRIKER, WHITE, HSV_WHITE); +RGB_THEME_COLOR(STRIKER, RED, HSV_RED); +RGB_THEME(STRIKER) = { { &STRIKER_BLUE, &STRIKER_AZURE, &STRIKER_WHITE, &STRIKER_RED } }; +#endif // RGB_THEME_IMPLS +#endif // DISABLE_RGB_THEME_STRIKER + +// Oblique Theme +#ifndef DISABLE_RGB_THEME_OBLIQUE +#ifndef RGB_THEME_IMPLS +RGB_THEME(OBLIQUE) +#else +RGB_THEME_COLOR(OBLIQUE, WHITE, HSV_WHITE); +RGB_THEME_COLOR(OBLIQUE, PURPLE, 186, 143, 255); +RGB_THEME_COLOR(OBLIQUE, RED, 10, 200, 255); +RGB_THEME_COLOR(OBLIQUE, ORANGE, 26, 215, 255); +RGB_THEME_COLOR(OBLIQUE, GREEN, 58, 199, 255); +RGB_THEME(OBLIQUE) = { { &OBLIQUE_WHITE, &OBLIQUE_PURPLE, &OBLIQUE_RED, &OBLIQUE_ORANGE, &OBLIQUE_GREEN } }; +#endif // RGB_THEME_IMPLS +#endif // DISABLE_RGB_THEME_OBLIQUE diff --git a/users/brandonschlack/rules.mk b/users/brandonschlack/rules.mk new file mode 100644 index 0000000000..2dfc332ab9 --- /dev/null +++ b/users/brandonschlack/rules.mk @@ -0,0 +1,34 @@ +SRC += brandonschlack.c \ + process_records.c + +SPACE_CADET_ENABLE = no + +# Use LTO except for ChibiOS +ifneq ($(PLATFORM),CHIBIOS) + LTO_ENABLE = yes +endif + +ifeq ($(strip $(IS_MACROPAD)), yes) + OPT_DEFS += -DIS_MACROPAD +endif + +ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) + SRC += rgb_bs.c +endif + +RGB_MATRIX_ENABLE ?= no +ifneq ($(strip $(RGB_MATRIX_ENABLE)), no) + SRC += rgb_bs.c +endif + +ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) + SRC += tap_dances.c +endif + +ifeq ($(strip $(FLASH_BOOTLOADER)), yes) + OPT_DEFS += -DFLASH_BOOTLOADER +endif + +ifneq ($(FORCE_LAYOUT),) + OPT_DEFS += -DFORCE_LAYOUT=\"$(FORCE_LAYOUT)\" +endif diff --git a/users/brandonschlack/tap_dances.c b/users/brandonschlack/tap_dances.c new file mode 100644 index 0000000000..861b31805b --- /dev/null +++ b/users/brandonschlack/tap_dances.c @@ -0,0 +1,91 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "tap_dances.h" +#include "process_keycode/process_tap_dance.h" + +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted || !state->pressed) return SINGLE_TAP; + else return SINGLE_HOLD; + } else if (state->count == 2) { + if (state->interrupted) return DOUBLE_SINGLE_TAP; + else if (state->pressed) return DOUBLE_HOLD; + else return DOUBLE_TAP; + } + if (state->count == 3) { + if (state->interrupted || !state->pressed) return TRIPLE_TAP; + else return TRIPLE_HOLD; + } + else return 8; +} + +__attribute__ ((weak)) +void process_tap_dance_keycode (bool reset, uint8_t toggle_layer) { }; + +void td_trigger_layer_finished (qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_trigger_layer_t *data = (qk_tap_dance_trigger_layer_t *)user_data; + data->state = cur_dance(state); + + if (data->state == data->trigger) { + layer_on(data->layer); + } else { + process_tap_dance_keycode(false, data->layer); + } + +} +void td_trigger_layer_reset (qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_trigger_layer_t *data = (qk_tap_dance_trigger_layer_t *)user_data; + if (data->state == data->trigger) { + switch (data->trigger) { + case SINGLE_HOLD: + case DOUBLE_HOLD: + case TRIPLE_HOLD: + layer_off(data->layer); + break; + } + } else { + process_tap_dance_keycode(true, data->layer); + } + data->state = 0; +} + +/* Tap Dance: Layer Mod. Toggles Layer when tapped, Mod when held. */ +void td_layer_mod_each(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_dual_role_t *data = (qk_tap_dance_dual_role_t *)user_data; + + // Single tap → toggle layer, Single hold → mod + if (state->pressed) { + register_code(data->kc); + } else if (state->count == 1) { + state->finished = true; + } +} + +void td_layer_mod_finished(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_dual_role_t *data = (qk_tap_dance_dual_role_t *)user_data; + + if (state->count == 1 && !state->pressed) { + layer_invert(data->layer); + } +} + +void td_layer_mod_reset(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_dual_role_t *data = (qk_tap_dance_dual_role_t *)user_data; + + if (state->count == 1) { + unregister_code(data->kc); + } +} diff --git a/users/brandonschlack/tap_dances.h b/users/brandonschlack/tap_dances.h new file mode 100644 index 0000000000..3747619a5e --- /dev/null +++ b/users/brandonschlack/tap_dances.h @@ -0,0 +1,52 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "brandonschlack.h" +#ifdef TAP_DANCE_ENABLE +# include "process_keycode/process_tap_dance.h" +#endif + +enum tap_dance_states { + SINGLE_TAP = 1, + SINGLE_HOLD = 2, + DOUBLE_TAP = 3, + DOUBLE_HOLD = 4, + DOUBLE_SINGLE_TAP = 5, + TRIPLE_TAP = 6, + TRIPLE_HOLD = 7 +}; + +int cur_dance (qk_tap_dance_state_t *state); +void process_tap_dance_keycode (bool reset, uint8_t toggle_layer); + +/* Tap Dance: Trigger Layer + * + * Toggles Layer based on given trigger (Single Hold, Double Tap, Double Hold, etc). + * Uses process_tap_dance_keycode() to allow keycode defines based on layer + */ +typedef struct { + uint8_t trigger; + uint8_t layer; + uint8_t state; +} qk_tap_dance_trigger_layer_t; + +#define ACTION_TAP_DANCE_TRIGGER_LAYER(trigger, layer) { \ + .fn = { NULL, td_trigger_layer_finished, td_trigger_layer_reset }, \ + .user_data = (void *)&((qk_tap_dance_trigger_layer_t) { trigger, layer, 0 }), \ +} + +void td_trigger_layer_finished (qk_tap_dance_state_t *state, void *user_data); +void td_trigger_layer_reset (qk_tap_dance_state_t *state, void *user_data); From f2eb080aa280ccbab9c9ed624afef2c1765d8e74 Mon Sep 17 00:00:00 2001 From: X-Bows Tech <41098278+XBowsTech@users.noreply.github.com> Date: Fri, 6 Nov 2020 03:58:46 +0800 Subject: [PATCH 031/114] Add support for 4 IS31FL3731 devices (#10860) This is a simple change.Support for IS31FL3731 has been changed from 2 to 4. --- quantum/rgb_matrix_drivers.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/quantum/rgb_matrix_drivers.c b/quantum/rgb_matrix_drivers.c index 0685a34753..2978e7bed9 100644 --- a/quantum/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix_drivers.c @@ -34,6 +34,12 @@ static void init(void) { # ifdef DRIVER_ADDR_2 IS31FL3731_init(DRIVER_ADDR_2); # endif +# ifdef DRIVER_ADDR_3 + IS31FL3731_init(DRIVER_ADDR_3); +# endif +# ifdef DRIVER_ADDR_4 + IS31FL3731_init(DRIVER_ADDR_4); +# endif # elif defined(IS31FL3733) IS31FL3733_init(DRIVER_ADDR_1, 0); # elif defined(IS31FL3737) @@ -60,6 +66,12 @@ static void init(void) { # ifdef DRIVER_ADDR_2 IS31FL3731_update_led_control_registers(DRIVER_ADDR_2, 1); # endif +# ifdef DRIVER_ADDR_3 + IS31FL3731_update_led_control_registers(DRIVER_ADDR_3, 2); +# endif +# ifdef DRIVER_ADDR_4 + IS31FL3731_update_led_control_registers(DRIVER_ADDR_4, 3); +# endif # elif defined(IS31FL3733) IS31FL3733_update_led_control_registers(DRIVER_ADDR_1, 0); IS31FL3733_update_led_control_registers(DRIVER_ADDR_2, 1); @@ -76,6 +88,12 @@ static void flush(void) { # ifdef DRIVER_ADDR_2 IS31FL3731_update_pwm_buffers(DRIVER_ADDR_2, 1); # endif +# ifdef DRIVER_ADDR_3 + IS31FL3731_update_pwm_buffers(DRIVER_ADDR_3, 2); +# endif +# ifdef DRIVER_ADDR_4 + IS31FL3731_update_pwm_buffers(DRIVER_ADDR_4, 3); +# endif } const rgb_matrix_driver_t rgb_matrix_driver = { From 5f2c4349543e06821d3c0b724f36e12767a04e54 Mon Sep 17 00:00:00 2001 From: kaylanm <1063516+kaylanm@users.noreply.github.com> Date: Thu, 5 Nov 2020 23:58:00 -0500 Subject: [PATCH 032/114] E85 backlight & LED indicator updates (#10678) * Enable in-switch backlight on e85 for VIA keymaps. Update LED indicator code for e85 hotswap/soldered PCBs. --- keyboards/exclusive/e85/config.h | 6 +++--- keyboards/exclusive/e85/hotswap/hotswap.c | 15 +++++++++++++++ .../exclusive/e85/hotswap/keymaps/via/rules.mk | 3 ++- .../exclusive/e85/soldered/keymaps/via/rules.mk | 3 ++- keyboards/exclusive/e85/soldered/soldered.c | 8 +++++--- 5 files changed, 27 insertions(+), 8 deletions(-) diff --git a/keyboards/exclusive/e85/config.h b/keyboards/exclusive/e85/config.h index 758cd8b78c..844c910256 100644 --- a/keyboards/exclusive/e85/config.h +++ b/keyboards/exclusive/e85/config.h @@ -52,9 +52,9 @@ along with this program. If not, see . */ #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 -// #define BACKLIGHT_PIN B6 -// #define BACKLIGHT_BREATHING -// #define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 6 #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN diff --git a/keyboards/exclusive/e85/hotswap/hotswap.c b/keyboards/exclusive/e85/hotswap/hotswap.c index a5893e6bc5..db14971dab 100644 --- a/keyboards/exclusive/e85/hotswap/hotswap.c +++ b/keyboards/exclusive/e85/hotswap/hotswap.c @@ -15,3 +15,18 @@ */ #include "hotswap.h" + +void keyboard_pre_init_kb(void) { + setPinOutput(C7); + setPinOutput(B5); + + keyboard_pre_init_user(); +} + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(C7, led_state.caps_lock); + writePin(B5, led_state.scroll_lock); + } + return true; +} diff --git a/keyboards/exclusive/e85/hotswap/keymaps/via/rules.mk b/keyboards/exclusive/e85/hotswap/keymaps/via/rules.mk index 29a6f75191..45681e1b1b 100644 --- a/keyboards/exclusive/e85/hotswap/keymaps/via/rules.mk +++ b/keyboards/exclusive/e85/hotswap/keymaps/via/rules.mk @@ -1,3 +1,4 @@ VIA_ENABLE = yes CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration \ No newline at end of file +COMMAND_ENABLE = no # Commands for debug and configuration +BACKLIGHT_ENABLE = yes diff --git a/keyboards/exclusive/e85/soldered/keymaps/via/rules.mk b/keyboards/exclusive/e85/soldered/keymaps/via/rules.mk index 29a6f75191..45681e1b1b 100644 --- a/keyboards/exclusive/e85/soldered/keymaps/via/rules.mk +++ b/keyboards/exclusive/e85/soldered/keymaps/via/rules.mk @@ -1,3 +1,4 @@ VIA_ENABLE = yes CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration \ No newline at end of file +COMMAND_ENABLE = no # Commands for debug and configuration +BACKLIGHT_ENABLE = yes diff --git a/keyboards/exclusive/e85/soldered/soldered.c b/keyboards/exclusive/e85/soldered/soldered.c index 0a7de55ce7..e97a543b57 100644 --- a/keyboards/exclusive/e85/soldered/soldered.c +++ b/keyboards/exclusive/e85/soldered/soldered.c @@ -17,14 +17,16 @@ #include "soldered.h" void keyboard_pre_init_kb(void) { - setPinOutput(C7); - - keyboard_pre_init_user(); + setPinOutput(C7); + setPinOutput(B5); + + keyboard_pre_init_user(); } bool led_update_kb(led_t led_state) { if (led_update_user(led_state)) { writePin(C7, led_state.caps_lock); + writePin(B5, led_state.scroll_lock); } return true; } From d7c90d805f414198a44d1b714363721df38950d6 Mon Sep 17 00:00:00 2001 From: yulei Date: Fri, 6 Nov 2020 13:36:04 +0800 Subject: [PATCH 033/114] add dp60 indicator mode (#8801) * add dp60 indicator mode * update according to #7720 * added license header and move the ws2812 codes to a seperate c file * fixed conflict with master --- keyboards/dp60/config.h | 11 ++ keyboards/dp60/dp60.c | 12 +++ keyboards/dp60/dp60.h | 11 ++ keyboards/dp60/keymaps/allleds/keymap.c | 15 +++ keyboards/dp60/keymaps/default/keymap.c | 15 +++ keyboards/dp60/keymaps/indicator/config.h | 25 +++++ keyboards/dp60/keymaps/indicator/indicator.c | 101 ++++++++++++++++++ keyboards/dp60/keymaps/indicator/keymap.c | 32 ++++++ keyboards/dp60/keymaps/indicator/led_driver.c | 26 +++++ keyboards/dp60/keymaps/indicator/readme.md | 10 ++ keyboards/dp60/keymaps/indicator/rules.mk | 4 + keyboards/dp60/keymaps/via/keymap.c | 15 +++ keyboards/dp60/matrix.c | 17 ++- 13 files changed, 293 insertions(+), 1 deletion(-) create mode 100644 keyboards/dp60/keymaps/indicator/config.h create mode 100644 keyboards/dp60/keymaps/indicator/indicator.c create mode 100644 keyboards/dp60/keymaps/indicator/keymap.c create mode 100644 keyboards/dp60/keymaps/indicator/led_driver.c create mode 100644 keyboards/dp60/keymaps/indicator/readme.md create mode 100644 keyboards/dp60/keymaps/indicator/rules.mk diff --git a/keyboards/dp60/config.h b/keyboards/dp60/config.h index 2bedf51970..d1cbd65004 100644 --- a/keyboards/dp60/config.h +++ b/keyboards/dp60/config.h @@ -1,6 +1,17 @@ /** * config.h * + Copyright 2020 astro + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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/dp60/dp60.c b/keyboards/dp60/dp60.c index 3e47802463..475084b049 100644 --- a/keyboards/dp60/dp60.c +++ b/keyboards/dp60/dp60.c @@ -1,5 +1,17 @@ /** * dp60.c + * + Copyright 2020 astro + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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 "dp60.h" diff --git a/keyboards/dp60/dp60.h b/keyboards/dp60/dp60.h index a197ac2fa3..9d8bffa64a 100644 --- a/keyboards/dp60/dp60.h +++ b/keyboards/dp60/dp60.h @@ -1,6 +1,17 @@ /** * dp60.h * + Copyright 2020 astro + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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/dp60/keymaps/allleds/keymap.c b/keyboards/dp60/keymaps/allleds/keymap.c index f3862c38fb..66cc628d4c 100644 --- a/keyboards/dp60/keymaps/allleds/keymap.c +++ b/keyboards/dp60/keymaps/allleds/keymap.c @@ -1,3 +1,18 @@ +/** + * keymap.c + * + Copyright 2020 astro + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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] = { diff --git a/keyboards/dp60/keymaps/default/keymap.c b/keyboards/dp60/keymaps/default/keymap.c index f3862c38fb..66cc628d4c 100644 --- a/keyboards/dp60/keymaps/default/keymap.c +++ b/keyboards/dp60/keymaps/default/keymap.c @@ -1,3 +1,18 @@ +/** + * keymap.c + * + Copyright 2020 astro + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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] = { diff --git a/keyboards/dp60/keymaps/indicator/config.h b/keyboards/dp60/keymaps/indicator/config.h new file mode 100644 index 0000000000..0476faca94 --- /dev/null +++ b/keyboards/dp60/keymaps/indicator/config.h @@ -0,0 +1,25 @@ +/** + * config.h + * + Copyright 2020 astro + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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 RGB_INDICATOR_NUM 8 +#undef RGBLED_NUM +#define RGBLED_NUM (18+RGB_INDICATOR_NUM) + +#define RGB_INDICATOR_PIN B1 +#define RGBLIGHT_LAYERS diff --git a/keyboards/dp60/keymaps/indicator/indicator.c b/keyboards/dp60/keymaps/indicator/indicator.c new file mode 100644 index 0000000000..a3a826e8a0 --- /dev/null +++ b/keyboards/dp60/keymaps/indicator/indicator.c @@ -0,0 +1,101 @@ +/** + * indicator.c + * + Copyright 2020 astro + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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 "dp60.h" + +#include "rgblight_list.h" +#include "rgblight.h" + + +// caps led +const rgblight_segment_t PROGMEM dp60_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {18, 1, HSV_RED} +); + +// scroll led +const rgblight_segment_t PROGMEM dp60_scrolllock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {19, 1, HSV_GREEN} +); + +// num led +const rgblight_segment_t PROGMEM dp60_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {20, 1, HSV_BLUE} +); + +// light 21 to 26 for layer 1-5 +const rgblight_segment_t PROGMEM dp60_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {21, 1, HSV_PURPLE} +); +const rgblight_segment_t PROGMEM dp60_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {22, 1, HSV_CYAN} +); +const rgblight_segment_t PROGMEM dp60_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {23, 1, HSV_YELLOW} +); +const rgblight_segment_t PROGMEM dp60_layer4_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {24, 1, HSV_PINK} +); +const rgblight_segment_t PROGMEM dp60_layer5_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {25, 1, HSV_ORANGE} +); + +// rgb light layers +const rgblight_segment_t* const PROGMEM dp60_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + dp60_capslock_layer, + dp60_scrolllock_layer, + dp60_numlock_layer, + dp60_layer1_layer, + dp60_layer2_layer, + dp60_layer3_layer, + dp60_layer4_layer, + dp60_layer5_layer +); + +void keyboard_post_init_user(void) { + // Enable the LED layers + rgblight_layers = dp60_rgb_layers; +} + +extern rgblight_config_t rgblight_config; +extern void rgblight_layers_write(void); +extern void indicator_write(LED_TYPE *start_led, uint8_t num_leds); + +void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) +{ + ws2812_setleds(start_led, RGBLED_NUM-RGB_INDICATOR_NUM); + + indicator_write(start_led + (RGBLED_NUM - RGB_INDICATOR_NUM), RGB_INDICATOR_NUM); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if (res) { + rgblight_set_layer_state(0, led_state.caps_lock); + rgblight_set_layer_state(1, led_state.scroll_lock); + rgblight_set_layer_state(2, led_state.num_lock); + } + return res; +} + +layer_state_t layer_state_set_kb(layer_state_t state) { + state = layer_state_set_user(state); + rgblight_set_layer_state(3, layer_state_cmp(state, 1)); + rgblight_set_layer_state(4, layer_state_cmp(state, 2)); + rgblight_set_layer_state(5, layer_state_cmp(state, 3)); + rgblight_set_layer_state(6, layer_state_cmp(state, 4)); + rgblight_set_layer_state(7, layer_state_cmp(state, 5)); + return state; +} diff --git a/keyboards/dp60/keymaps/indicator/keymap.c b/keyboards/dp60/keymaps/indicator/keymap.c new file mode 100644 index 0000000000..170d4eb954 --- /dev/null +++ b/keyboards/dp60/keymaps/indicator/keymap.c @@ -0,0 +1,32 @@ +/** + * keymap.c + * + Copyright 2020 astro + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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_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_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(1), + KC_LGUI, KC_LALT, LT(1,KC_SPC), KC_RALT,KC_RGUI ), + + [1] = LAYOUT_60_hhkb( + _______, 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, RGB_TOG,RGB_MOD,_______,KC_F13,KC_F14,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______, + KC_CAPS, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME,KC_END,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______, _______, _______,_______), +}; diff --git a/keyboards/dp60/keymaps/indicator/led_driver.c b/keyboards/dp60/keymaps/indicator/led_driver.c new file mode 100644 index 0000000000..2a1ac5a385 --- /dev/null +++ b/keyboards/dp60/keymaps/indicator/led_driver.c @@ -0,0 +1,26 @@ +/** + * led_driver.c + * + Copyright 2020 astro + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#undef RGB_DI_PIN +#define RGB_DI_PIN RGB_INDICATOR_PIN +#define ws2812_setleds indicator_setleds +#define ws2812_setleds_pin indicator_setleds_pin +#include "ws2812.c" + +void indicator_write(LED_TYPE *start_led, uint8_t num_leds) +{ + indicator_setleds(start_led, num_leds); +} diff --git a/keyboards/dp60/keymaps/indicator/readme.md b/keyboards/dp60/keymaps/indicator/readme.md new file mode 100644 index 0000000000..bb3fbbbe0b --- /dev/null +++ b/keyboards/dp60/keymaps/indicator/readme.md @@ -0,0 +1,10 @@ + +Indicator RGB leds support for the open source viper/eagle fr4 [plate](https://github.com/yulei/viper_plate.git) + +Three wires need to be soldered: + +B1 pin (SCLK at the board) to the plate's D pin + +VCC to plate's V + +GND to plate's G diff --git a/keyboards/dp60/keymaps/indicator/rules.mk b/keyboards/dp60/keymaps/indicator/rules.mk new file mode 100644 index 0000000000..a8891659f7 --- /dev/null +++ b/keyboards/dp60/keymaps/indicator/rules.mk @@ -0,0 +1,4 @@ + +RGBLIGHT_ENABLE = yes # Use RGB underglow light + +SRC += indicator.c led_driver.c diff --git a/keyboards/dp60/keymaps/via/keymap.c b/keyboards/dp60/keymaps/via/keymap.c index 1742f17b50..5f2b007274 100644 --- a/keyboards/dp60/keymaps/via/keymap.c +++ b/keyboards/dp60/keymaps/via/keymap.c @@ -1,3 +1,18 @@ +/** + * keymap.c + * + Copyright 2020 astro + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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] = { diff --git a/keyboards/dp60/matrix.c b/keyboards/dp60/matrix.c index 3aa5925fe6..a9974757dd 100644 --- a/keyboards/dp60/matrix.c +++ b/keyboards/dp60/matrix.c @@ -1,3 +1,18 @@ +/** + * matrix.c + * + Copyright 2020 astro + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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 "quantum.h" static uint8_t debouncing = DEBOUNCE; @@ -242,4 +257,4 @@ static void select_col(uint8_t col) { writePinHigh(D5); break; } -} \ No newline at end of file +} From b5ebdf1b3a29119e1a414aaf7e2cf7a583853430 Mon Sep 17 00:00:00 2001 From: Jonathan Rascher Date: Fri, 6 Nov 2020 00:41:06 -0600 Subject: [PATCH 034/114] [Keymap] bcat keymaps and userspace (#10705) Add Eco keymap, factor Crkbd keymap to community layout, other minor tweaks * Remove outdated Crkbd Ctrl key positioning info * Add Left Alt key to Lily58 keymap * Lily58 no longer overrides default TAPPING_TERM * Refactor Crkbd keymap to use new community layout * Fix underglow animations for Crkbd w/ Split Common * Add initial Eco keymap * Update outdated reference to Crkbd layout * Add keymap links to userspace readme * Add copyright notices to files changed in this PR --- keyboards/crkbd/keymaps/bcat/config.h | 7 -- keyboards/crkbd/keymaps/bcat/rules.mk | 3 - keyboards/eco/keymaps/bcat/config.h | 22 ++++++ keyboards/eco/keymaps/bcat/keymap.c | 72 +++++++++++++++++++ keyboards/eco/keymaps/bcat/readme.md | 44 ++++++++++++ keyboards/eco/keymaps/bcat/rules.mk | 3 + keyboards/lily58/keymaps/bcat/keymap.c | 18 ++++- keyboards/lily58/keymaps/bcat/readme.md | 15 ++-- layouts/community/split_3x6_3/bcat/config.h | 34 +++++++++ .../community/split_3x6_3}/bcat/keymap.c | 24 +++++-- .../community/split_3x6_3}/bcat/readme.md | 8 +-- layouts/community/split_3x6_3/bcat/rules.mk | 10 +++ users/bcat/config.h | 35 +++++---- users/bcat/readme.md | 51 ++++++++++--- 14 files changed, 299 insertions(+), 47 deletions(-) delete mode 100644 keyboards/crkbd/keymaps/bcat/config.h delete mode 100644 keyboards/crkbd/keymaps/bcat/rules.mk create mode 100644 keyboards/eco/keymaps/bcat/config.h create mode 100644 keyboards/eco/keymaps/bcat/keymap.c create mode 100644 keyboards/eco/keymaps/bcat/readme.md create mode 100644 keyboards/eco/keymaps/bcat/rules.mk create mode 100644 layouts/community/split_3x6_3/bcat/config.h rename {keyboards/crkbd/keymaps => layouts/community/split_3x6_3}/bcat/keymap.c (78%) rename {keyboards/crkbd/keymaps => layouts/community/split_3x6_3}/bcat/readme.md (96%) create mode 100644 layouts/community/split_3x6_3/bcat/rules.mk diff --git a/keyboards/crkbd/keymaps/bcat/config.h b/keyboards/crkbd/keymaps/bcat/config.h deleted file mode 100644 index 65e7a80523..0000000000 --- a/keyboards/crkbd/keymaps/bcat/config.h +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once - -#define EE_HANDS - -/* Limit max RGB LED current to avoid tripping controller fuse. */ -#undef RGB_MATRIX_MAXIMUM_BRIGHTNESS -#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 diff --git a/keyboards/crkbd/keymaps/bcat/rules.mk b/keyboards/crkbd/keymaps/bcat/rules.mk deleted file mode 100644 index cd3418dab8..0000000000 --- a/keyboards/crkbd/keymaps/bcat/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -BOOTLOADER = atmel-dfu # Elite-C - -RGB_MATRIX_ENABLE = WS2812 # per-key RGB and underglow diff --git a/keyboards/eco/keymaps/bcat/config.h b/keyboards/eco/keymaps/bcat/config.h new file mode 100644 index 0000000000..dffdc7b40a --- /dev/null +++ b/keyboards/eco/keymaps/bcat/config.h @@ -0,0 +1,22 @@ +/* Copyright 2020 Jonathan Rascher + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 + +/* WS2812B RGB LED strip hand wired to Elite-C. */ +#define RGB_DI_PIN B7 +#define RGBLED_NUM 15 +#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/eco/keymaps/bcat/keymap.c b/keyboards/eco/keymaps/bcat/keymap.c new file mode 100644 index 0000000000..066acbe649 --- /dev/null +++ b/keyboards/eco/keymaps/bcat/keymap.c @@ -0,0 +1,72 @@ +/* Copyright 2020 Jonathan Rascher + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "bcat.h" + +enum layer { + LAYER_DEFAULT, + LAYER_LOWER, + LAYER_RAISE, + LAYER_ADJUST, +}; + +#define LY_LWR MO(LAYER_LOWER) +#define LY_RSE MO(LAYER_RAISE) + +#define KY_CSPC LCTL(KC_SPC) +#define KY_ZMIN LCTL(KC_EQL) +#define KY_ZMOUT LCTL(KC_MINS) +#define KY_ZMRST LCTL(KC_0) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Default layer: http://www.keyboard-layout-editor.com/#/gists/2c11371c7a5f7cd08a0132631d3d3281 */ + [LAYER_DEFAULT] = LAYOUT( + 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_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, 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_END, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + XXXXXXX, XXXXXXX, KC_LALT, KC_LCTL, LY_LWR, KC_SPC, XXXXXXX, XXXXXXX, KC_ENT, LY_RSE, KC_RALT, KC_RGUI, XXXXXXX, XXXXXXX + ), + + /* Lower layer: http://www.keyboard-layout-editor.com/#/gists/11256970dc0552886a82382ee02fa415 */ + [LAYER_LOWER] = LAYOUT( + MC_ALTT, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KY_CSPC, KY_ZMRST, KY_ZMOUT, KY_ZMIN, KC_WBAK, KC_WFWD, _______, _______, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TILD, + _______, KC_APP, KC_PSCR, KC_SLCK, KC_PAUS, KC_LGUI, _______, _______, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_GRV, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Raise layer: http://www.keyboard-layout-editor.com/#/gists/308a8be75e0b85902dc18db1b2546862 */ + [LAYER_RAISE] = LAYOUT( + KC_CAPS, 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_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11, KC_DEL, + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_F12, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/b18aafa0327d7e83eaf485546c067a21 */ + [LAYER_ADJUST] = LAYOUT( + _______, NK_TOGG, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, _______, EEP_RST, RESET, _______, _______, _______, _______, + _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_VAI, RGB_MOD, RGB_SPI, _______, + _______, _______, _______, KC_MUTE, _______, _______, _______, _______, RGB_HUI, RGB_SAD, RGB_SAI, RGB_HUD, RGB_SPD, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, _______ + ), +}; + +layer_state_t layer_state_set_keymap(layer_state_t state) { + return update_tri_layer_state(state, LAYER_LOWER, LAYER_RAISE, LAYER_ADJUST); +} diff --git a/keyboards/eco/keymaps/bcat/readme.md b/keyboards/eco/keymaps/bcat/readme.md new file mode 100644 index 0000000000..85e2615512 --- /dev/null +++ b/keyboards/eco/keymaps/bcat/readme.md @@ -0,0 +1,44 @@ +# bcat's Eco layout + +This is a cute little 4x14 ortholinear keyboard. I've set it up using an +unsplit, ortho version of my [split 3x6 + 3 thumb +keys](https://github.com/qmk/qmk_firmware/tree/master/layouts/community/split_3x6_3/bcat) +(Crkbd) layout, with the following changes: + +* The alpha keys are separated by an extra two columns in the middle to provide +a little more hand separation, similar to a split keyboard. + +* The top three rows of the extra middle columns feature navigation keys and +brackets/braces. I don't really use dedicated keys for these, but I had the +keycaps, so I figured I may as well put them there. + +* I have a Left Alt and Right Super key on the bottom row just like my +[Lily58](https://github.com/qmk/qmk_firmware/tree/master/keyboards/lily58/keymaps/bcat). + +* The two keys in each bottom corner are unbound, as is the 2U spacebar in the +center of the bottom row. These keys are too inconvenient to reach, and there's +nothing really useful to bind them to anyway. + +## Default layer + +![Default layer layout](https://i.imgur.com/uRUT2cY.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/2c11371c7a5f7cd08a0132631d3d3281)) + +## Lower layer + +![Lower layer layout](https://i.imgur.com/8SR0M9x.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/11256970dc0552886a82382ee02fa415)) + +## Raise layer + +![Raise layer layout](https://i.imgur.com/U7KERR3.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/308a8be75e0b85902dc18db1b2546862)) + +## Adjust layer + +![Adjust layer layout](https://i.imgur.com/J2rOshm.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/b18aafa0327d7e83eaf485546c067a21)) diff --git a/keyboards/eco/keymaps/bcat/rules.mk b/keyboards/eco/keymaps/bcat/rules.mk new file mode 100644 index 0000000000..684d8e4e85 --- /dev/null +++ b/keyboards/eco/keymaps/bcat/rules.mk @@ -0,0 +1,3 @@ +BOOTLOADER = atmel-dfu # Elite-C + +RGBLIGHT_ENABLE = yes diff --git a/keyboards/lily58/keymaps/bcat/keymap.c b/keyboards/lily58/keymaps/bcat/keymap.c index 69864cd085..549363d03a 100644 --- a/keyboards/lily58/keymaps/bcat/keymap.c +++ b/keyboards/lily58/keymaps/bcat/keymap.c @@ -1,3 +1,19 @@ +/* Copyright 2020 Jonathan Rascher + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "bcat.h" @@ -24,7 +40,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_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_WBAK, KC_WFWD, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LGUI, KC_LCTL, LY_LWR, KC_SPC, KC_ENT, LY_RSE, KC_RALT, KC_APP + KC_LALT, KC_LCTL, LY_LWR, KC_SPC, KC_ENT, LY_RSE, KC_RALT, KC_RGUI ), /* Lower layer: http://www.keyboard-layout-editor.com/#/gists/19ad0d3b5d745fbb2818db09740f5a11 */ diff --git a/keyboards/lily58/keymaps/bcat/readme.md b/keyboards/lily58/keymaps/bcat/readme.md index 84c2fc335f..de03526a8b 100644 --- a/keyboards/lily58/keymaps/bcat/readme.md +++ b/keyboards/lily58/keymaps/bcat/readme.md @@ -1,8 +1,8 @@ # bcat's Lily58 layout -This split ergo layout follows my preferred [Crkbd -layout](https://github.com/qmk/qmk_firmware/tree/master/keyboards/crkbd/keymaps/bcat) -with the following changes: +This split ergo layout follows my preferred [split 3x6 + 3 thumb +keys](https://github.com/qmk/qmk_firmware/tree/master/layouts/community/split_3x6_3/bcat) +(Crkbd) layout with a few changes: * There's an optional number row at the top of the keyboard. I am quite used to using layers for numbers and symbols, so in practice this goes unused. @@ -11,12 +11,15 @@ using layers for numbers and symbols, so in practice this goes unused. placed in the same positions as on the ErgoDox EZ. (There's no real reason for this; I just had to do _something_ with those keys.) -* The extra thumb keys are used for dedicated Super/Menu keys, as well as -browser back/forward navigation keys. +* The extra thumb keys on the bottom row are used for a Left Alt key (for easier +Alt+Tab, Alt+F4, etc.) and a dedicated Super key. + +* The harder-to-reach thumb keys below the controllers are bound to browser +back/forward navigation keys. ## Default layer -![Default layer layout](https://i.imgur.com/FNITWJ0.png) +![Default layer layout](https://i.imgur.com/0stG2GT.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/e0eb3af65961e9fd612dcff3ddd88e4f)) diff --git a/layouts/community/split_3x6_3/bcat/config.h b/layouts/community/split_3x6_3/bcat/config.h new file mode 100644 index 0000000000..e177f0ffcb --- /dev/null +++ b/layouts/community/split_3x6_3/bcat/config.h @@ -0,0 +1,34 @@ +/* Copyright 2020 Jonathan Rascher + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 + +#if defined(KEYBOARD_crkbd_rev1_common) || defined(KEYBOARD_crkbd_rev1_legacy) +# define EE_HANDS + +# if defined(RGBLIGHT_ENABLE) +/* Configure RGB for underglow only (first six LEDs on each side). */ +# undef RGBLED_SPLIT +# define RGBLED_SPLIT \ + { 6, 6 } +# endif + +# if defined(RGB_MATRIX_ENABLE) +/* Limit max RGB LED current to avoid tripping controller fuse. */ +# undef RGB_MATRIX_MAXIMUM_BRIGHTNESS +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 +# endif +#endif diff --git a/keyboards/crkbd/keymaps/bcat/keymap.c b/layouts/community/split_3x6_3/bcat/keymap.c similarity index 78% rename from keyboards/crkbd/keymaps/bcat/keymap.c rename to layouts/community/split_3x6_3/bcat/keymap.c index 7b8329fea9..934a8e31f2 100644 --- a/keyboards/crkbd/keymaps/bcat/keymap.c +++ b/layouts/community/split_3x6_3/bcat/keymap.c @@ -1,3 +1,19 @@ +/* Copyright 2020 Jonathan Rascher + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "bcat.h" @@ -19,7 +35,7 @@ enum layer { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Default layer: http://www.keyboard-layout-editor.com/#/gists/08d9827d916662a9414f48805aa895a5 */ - [LAYER_DEFAULT] = LAYOUT( + [LAYER_DEFAULT] = LAYOUT_split_3x6_3( 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, @@ -27,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Lower layer: http://www.keyboard-layout-editor.com/#/gists/c3fba5eaa2cd70fdfbdbc0f9e34d3bc0 */ - [LAYER_LOWER] = LAYOUT( + [LAYER_LOWER] = LAYOUT_split_3x6_3( MC_ALTT, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, KY_CSPC, KY_ZMRST, KY_ZMOUT, KY_ZMIN, KC_WBAK, KC_WFWD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TILD, _______, KC_APP, KC_PSCR, KC_SLCK, KC_PAUS, KC_LGUI, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_GRV, @@ -35,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Raise layer: http://www.keyboard-layout-editor.com/#/gists/08b44355d4ca85d294bad9e2821f91d7 */ - [LAYER_RAISE] = LAYOUT( + [LAYER_RAISE] = LAYOUT_split_3x6_3( KC_CAPS, 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_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11, KC_DEL, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_F12, KC_INS, @@ -43,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/77e7572e077b36a23eb2086017e16fee */ - [LAYER_ADJUST] = LAYOUT( + [LAYER_ADJUST] = LAYOUT_split_3x6_3( _______, NK_TOGG, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, RGB_RMOD, RGB_VAD, RGB_VAI, RGB_MOD, RGB_SPI, _______, _______, _______, _______, KC_MUTE, _______, _______, RGB_HUI, RGB_SAD, RGB_SAI, RGB_HUD, RGB_SPD, _______, diff --git a/keyboards/crkbd/keymaps/bcat/readme.md b/layouts/community/split_3x6_3/bcat/readme.md similarity index 96% rename from keyboards/crkbd/keymaps/bcat/readme.md rename to layouts/community/split_3x6_3/bcat/readme.md index 4ffb1562bf..ed17b84186 100644 --- a/keyboards/crkbd/keymaps/bcat/readme.md +++ b/layouts/community/split_3x6_3/bcat/readme.md @@ -1,4 +1,4 @@ -# bcat's Corne layout +# bcat's split 3x6 + 3 thumb keys layout This is my favorite split ergo layout for typing, featuring the traditional four ortho/ergo layers (Default, Lower, Raise, Adjust). It is loosely inspired @@ -33,9 +33,6 @@ layer-switch keys to correct mistakes. * The Esc key is next to the home row for convenience in Vim. -* Likewise, the Ctrl key is in the same place as on my row-staggered boards -(where I've been remapping Caps Lock as Ctrl since before even using QMK). - * There are two Shift keys, although I generally use Left Shift. (I've considered replacing Right Shift with another key, but haven't chosen one.) @@ -46,7 +43,8 @@ right thumbs, respectively. * Ctrl is on the left for ease of chording, especially one-handed use of common shortcuts like Ctrl+T and Ctrl+W. This puts Alt on the right by the process of -elimination. +elimination. (I would really like one more 1U thumb key on each half to allow +for a redundant Alt key on the left and a dedicated Super key on the right.) ## Lower layer diff --git a/layouts/community/split_3x6_3/bcat/rules.mk b/layouts/community/split_3x6_3/bcat/rules.mk new file mode 100644 index 0000000000..3a9796673e --- /dev/null +++ b/layouts/community/split_3x6_3/bcat/rules.mk @@ -0,0 +1,10 @@ +ifeq ($(strip $(KEYBOARD)), crkbd/rev1/common) + BOOTLOADER = atmel-dfu # Elite-C + + # Enable underglow only. (Split Common doesn't support RGB matrix on slave.) + RGBLIGHT_ENABLE = yes +else ifeq ($(strip $(KEYBOARD)), crkbd/rev1/legacy) + BOOTLOADER = atmel-dfu # Elite-C + + RGB_MATRIX_ENABLE = WS2812 # per-key RGB and underglow +endif diff --git a/users/bcat/config.h b/users/bcat/config.h index b0d556186a..16188950e2 100644 --- a/users/bcat/config.h +++ b/users/bcat/config.h @@ -1,26 +1,32 @@ +/* Copyright 2020 Jonathan Rascher + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + /* Wait between tap_code register and unregister to fix flaky media keys. */ #undef TAP_CODE_DELAY #define TAP_CODE_DELAY 20 -/* - * Force the default tapping term since some keyboards make it way too short - * (*cough*Lily58*cough*). - */ -#undef TAPPING_TERM - -#define TAPPING_TERM 200 - -/* - * Treat mod-tap keys as holds even if the mod-tap key and the key being - * modified are both relased within TAPPING_TERM. This assumes the mod-tap key +/* Treat mod-tap keys as holds even if the mod-tap key and the key being + * modified are both released within TAPPING_TERM. This assumes the mod-tap key * isn't usually pressed in quick succession with other tapped keys, which is * good when the tap keycode is something like KC_ESC rather than a letter. */ #define PERMISSIVE_HOLD -/* - * Turn off key repeat support of the tap keycode for tap-hold keys, enabling +/* Turn off key repeat support of the tap keycode for tap-hold keys, enabling * holds to work correctly in quick succession after taps. */ #define TAPPING_FORCE_HOLD @@ -57,6 +63,9 @@ # define RGBLIGHT_HUE_STEP 8 # define RGBLIGHT_SAT_STEP 17 # define RGBLIGHT_VAL_STEP 17 + +/* Turn on additional RGB animations. */ +# define RGBLIGHT_ANIMATIONS #endif #if defined(BACKLIGHT_ENABLE) diff --git a/users/bcat/readme.md b/users/bcat/readme.md index 49fbea1acf..6d097d663d 100644 --- a/users/bcat/readme.md +++ b/users/bcat/readme.md @@ -1,13 +1,48 @@ # bcat's userspace This is some code and config shared by all of [my](https://github.com/bcat) -keyboards. I have a few different keymaps spread throughout the repo; however, -they are all derived from two "canonical" keymaps for my preferred layouts: +keyboards. I use community layouts wherever possible, only writing +keyboard-specific keymaps for boards without standard layout support. I derive +my keymaps from two canonical ones (preferred for typing and gaming, +respectively). -* For typing, my canonical layout is my -[Crkbd](https://github.com/qmk/qmk_firmware/tree/master/keyboards/crkbd/keymaps/bcat) -(split ergo, columnar-staggered) layout. +## Canonical keymaps -* For gaming, my canonical layout is my -[Tsangan](https://github.com/qmk/qmk_firmware/tree/master/layouts/community/60_tsangan_hhkb/bcat) -(row-staggered) layout. +* [Split 3x6 + 3 thumb +keys](https://github.com/qmk/qmk_firmware/tree/master/layouts/community/split_3x6_3/bcat): +Columnar-staggered split ergo layout, preferred for typing. Used on Crkbd. + +* [60% Tsangan +HHKB](https://github.com/qmk/qmk_firmware/tree/master/layouts/community/60_tsangan_hhkb/bcat): +Row-staggered layout, preferred for gaming. Used on ai03 Polaris, CannonKeys +AN-C, CannonKeys Instant60. + +## Other keymaps + +### Ergo + +* [Lily58](https://github.com/qmk/qmk_firmware/tree/master/keyboards/lily58/keymaps/bcat) + +### Ortho + +* [Eco](https://github.com/qmk/qmk_firmware/tree/master/keyboards/eco/keymaps/bcat) + +### Traditional + +* [60% ANSI split +backspace/right-shift](https://github.com/qmk/qmk_firmware/tree/master/layouts/community/60_ansi_split_bs_rshift/bcat). +Used on DZ60. + +* [65% ANSI blocker split +backspace](https://github.com/qmk/qmk_firmware/tree/master/layouts/community/65_ansi_blocker_split_bs/bcat). +Used on KBDfans KBD67 hotswap. + +* [Keebio +Quefrency](https://github.com/qmk/qmk_firmware/tree/master/keyboards/keebio/quefrency/keymaps/bcat) + +### Macropads + +* [9-Key](https://github.com/qmk/qmk_firmware/tree/master/keyboards/9key/keymaps/bcat) + +* [Keebio +BDN9](https://github.com/qmk/qmk_firmware/tree/master/keyboards/keebio/bdn9/keymaps/bcat) From 7ce5402417b0332569bf48cf2c51e412cd35a18a Mon Sep 17 00:00:00 2001 From: Joe Wasson Date: Fri, 6 Nov 2020 17:16:22 -0800 Subject: [PATCH 035/114] Updates to Talljoe's Keymaps (#10115) * Minor Tweak * Refactor spacebar defines. * Add TMO50 layout * Rename Atreus keymap. * Refactor Atreus for readability. * Eliminate tapdance quote and tweak maltroff. * Factor out tapdance. * Add some fancy combos and keys. * Remove combos for now because they cause pain. * WIP visualizer * Alternate method for reset * WIP2 visualizer * Layer text tweak. * Add made-up layout Nortron as a combination of Norman and Maltron. * Add backspace. * Add Talljoe keymap to Prime E. * Fix double-colon so it doesn't press enter if shift is released early. * Use new make command. * Bring some modern standards into code and add licenses. * Remove QMK_KEYBOARD_CONFIG_H and fixup QMK_KEYBOARD_H. * Move from `biton32` to `get_highest_layer`. * Remove PREVENT_STUCK_MODIFIERS * Update keyboards/thevankeyboards/minivan/keymaps/talljoe-minivan/config.h --- .../atreus/keymaps/talljoe-atreus/config.h | 42 ----- keyboards/atreus/keymaps/talljoe/config.h | 53 +++++++ .../{talljoe-atreus => talljoe}/keymap.c | 0 .../{talljoe-atreus => talljoe}/rules.mk | 0 keyboards/jd45/keymaps/talljoe/config.h | 26 +++- .../primekb/prime_e/keymaps/talljoe/config.h | 33 ++++ .../primekb/prime_e/keymaps/talljoe/keymap.c | 1 + .../bananasplit/keymaps/talljoe/config.h | 21 ++- .../minivan/keymaps/talljoe-minivan/config.h | 28 +++- keyboards/tmo50/keymaps/talljoe/config.h | 33 ++++ keyboards/tmo50/keymaps/talljoe/keymap.c | 44 ++++++ .../community/60_ansi/talljoe-ansi/config.h | 23 ++- .../60_ansi_split_bs_rshift/talljoe/config.h | 23 ++- .../talljoe/solarized.c | 16 ++ .../talljoe/solarized.h | 21 ++- .../community/60_hhkb/talljoe-hhkb/config.h | 22 ++- layouts/community/ortho_4x12/talljoe/config.h | 23 ++- .../community/tkl_ansi/talljoe-tkl/config.h | 23 ++- users/talljoe/config.h | 21 ++- users/talljoe/macros.c | 40 +++++ users/talljoe/macros.h | 27 ++++ users/talljoe/rules.mk | 9 +- users/talljoe/talljoe.c | 90 ++++++++--- users/talljoe/talljoe.h | 94 +++++------ users/talljoe/tapdance.c | 146 ------------------ users/talljoe/tapdance/actions/td.function.c | 35 +++++ users/talljoe/tapdance/actions/td.grave.c | 36 +++++ users/talljoe/tapdance/actions/td.lock.c | 35 +++++ users/talljoe/tapdance/actions/td.semicolon.c | 54 +++++++ users/talljoe/tapdance/tapdance.h | 26 ++++ users/talljoe/tapdance/tapdance_actions.c | 28 ++++ users/talljoe/tapdance/td_setup.c | 70 +++++++++ users/talljoe/tapdance/td_setup.h | 29 ++++ users/talljoe/visualizer.c | 21 +++ 34 files changed, 875 insertions(+), 318 deletions(-) delete mode 100644 keyboards/atreus/keymaps/talljoe-atreus/config.h create mode 100644 keyboards/atreus/keymaps/talljoe/config.h rename keyboards/atreus/keymaps/{talljoe-atreus => talljoe}/keymap.c (100%) rename keyboards/atreus/keymaps/{talljoe-atreus => talljoe}/rules.mk (100%) create mode 100644 keyboards/primekb/prime_e/keymaps/talljoe/config.h create mode 100644 keyboards/primekb/prime_e/keymaps/talljoe/keymap.c create mode 100644 keyboards/tmo50/keymaps/talljoe/config.h create mode 100644 keyboards/tmo50/keymaps/talljoe/keymap.c create mode 100644 users/talljoe/macros.c create mode 100644 users/talljoe/macros.h delete mode 100644 users/talljoe/tapdance.c create mode 100644 users/talljoe/tapdance/actions/td.function.c create mode 100644 users/talljoe/tapdance/actions/td.grave.c create mode 100644 users/talljoe/tapdance/actions/td.lock.c create mode 100644 users/talljoe/tapdance/actions/td.semicolon.c create mode 100644 users/talljoe/tapdance/tapdance.h create mode 100644 users/talljoe/tapdance/tapdance_actions.c create mode 100644 users/talljoe/tapdance/td_setup.c create mode 100644 users/talljoe/tapdance/td_setup.h create mode 100644 users/talljoe/visualizer.c diff --git a/keyboards/atreus/keymaps/talljoe-atreus/config.h b/keyboards/atreus/keymaps/talljoe-atreus/config.h deleted file mode 100644 index 87b68ffc65..0000000000 --- a/keyboards/atreus/keymaps/talljoe-atreus/config.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include QMK_KEYBOARD_CONFIG_H - -#define PREVENT_STUCK_MODIFIERS -#define SPACE_COUNT 2 - -#define TEMPLATE( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ - 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, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - K40, K41, K42, K44, K45, K46, K48, K49, K4B, K4C \ -) LAYOUT( \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \ - K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \ - K10, K41, K42, K30, K44, K1D, K20, K45, K3C, K0D, K2B, K3D \ -) - -#define TEMPLATE_NUM( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ - 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, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - K40, K41, K42, K44, K45, K46, K48, K49, K4B, K4C \ -) LAYOUT( \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \ - K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \ - K10, K41, K42, K30, K44, K1D, K20, K45, K48, K49, K2B, K3D \ -) - - -#define TEMPLATE_RESET 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, \ - RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ -) -#endif diff --git a/keyboards/atreus/keymaps/talljoe/config.h b/keyboards/atreus/keymaps/talljoe/config.h new file mode 100644 index 0000000000..64d5b58943 --- /dev/null +++ b/keyboards/atreus/keymaps/talljoe/config.h @@ -0,0 +1,53 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 SPACE_COUNT 3 + +#define TEMPLATE_TKL( \ + KESC, KF01, KF02, KF03, KF04, KF05, KF06, KF07, KF08, KF09, KF10, KF11, KF12, KSCL, KPRS, KADJ, \ + KGRV, K_1 , K_2 , K_3 , K_4 , K_5 , K_6 , K_7 , K_8 , K_9 , K_0 , KMIN, KEQL, KBSP, KINS, KHOM, KPUP, \ + KTAB, K_Q , K_W , K_E , K_R , K_T , K_Y , K_U , K_I , K_O , K_P , KLBR, KRBR, KBLS, KDEL, KEND, LPDN, \ + KCAP, K_A , K_S , K_D , K_F , K_G , K_H , K_J , K_K , K_L , KSMI, KQUO, KENT, \ + KLSH, K_Z , K_X , K_C , K_V , K_B , K_N , K_M , KCMA, KDOT, KSLS, KRSH, K_UP, \ + KLCT, KLOS, KLAL, KSP3, KSP2, KSP1, KRAL, KROS, KRCT, KPTT, K_LT, K_DN, K_RT \ +) LAYOUT( \ + K_Q , K_W , K_E , K_R , K_T , K_Y , K_U , K_I , K_O , K_P , \ + K_A , K_S , K_D , K_F , K_G , K_H , K_J , K_K , K_L , KSMI, \ + K_Z , K_X , K_C , K_V , K_B , K_N , K_M , KCMA, KDOT, KSLS, \ + KTAB, KLOS, KLAL, KLSH, KSP3, KSP2, KCAP, KSP1, KRSH, KBLS, KQUO, KADJ \ +) + +#define TEMPLATE_NUM( \ + KGRV, K_1 , K_2 , K_3 , K_4 , K_5 , K_6 , K_7 , K_8 , K_9 , K_0 , KMIN, KEQL, KBSL, KESC, \ + KTAB, K_Q , K_W , K_E , K_R , K_T , K_Y , K_U , K_I , K_O , K_P , KLBR, KRBR, KBSP, \ + KCAP, K_A , K_S , K_D , K_F , K_G , K_H , K_J , K_K , K_L , KSMI, KQUO, KENT, \ + KLSH, K_Z , K_X , K_C , K_V , K_B , K_N , K_M , KCMA, KDOT, KSLS, KRSH, KADJ, \ + KLCT, KLOS, KLAL, KSP3, KSP2, KSP1, KRAL, KROS, KRCT, KPTT \ +) LAYOUT( \ + K_Q , K_W , K_E , K_R , K_T , K_Y , K_U , K_I , K_O , K_P , \ + K_A , K_S , K_D , K_F , K_G , K_H , K_J , K_K , K_L , KSMI, \ + K_Z , K_X , K_C , K_V , K_B , K_N , K_M , KCMA, KDOT, KSLS, \ + KTAB, KLOS, KLAL, KLSH, KSP3, KSP2, KCAP, KSP1, KRAL, KROS, KQUO, KADJ \ +) + +#define TEMPLATE_RESET 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, \ + RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ +) diff --git a/keyboards/atreus/keymaps/talljoe-atreus/keymap.c b/keyboards/atreus/keymaps/talljoe/keymap.c similarity index 100% rename from keyboards/atreus/keymaps/talljoe-atreus/keymap.c rename to keyboards/atreus/keymaps/talljoe/keymap.c diff --git a/keyboards/atreus/keymaps/talljoe-atreus/rules.mk b/keyboards/atreus/keymaps/talljoe/rules.mk similarity index 100% rename from keyboards/atreus/keymaps/talljoe-atreus/rules.mk rename to keyboards/atreus/keymaps/talljoe/rules.mk diff --git a/keyboards/jd45/keymaps/talljoe/config.h b/keyboards/jd45/keymaps/talljoe/config.h index f8b0333cfb..8b06cefd52 100644 --- a/keyboards/jd45/keymaps/talljoe/config.h +++ b/keyboards/jd45/keymaps/talljoe/config.h @@ -1,7 +1,19 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include QMK_KEYBOARD_CONFIG_H +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 PREVENT_STUCK_MODIFIERS #define SPACE_COUNT 2 @@ -14,9 +26,7 @@ K40, K41, K42, K44, K45, K46, K48, K49, K4B, K4C \ ) { \ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K0D, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2C, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO }, \ { K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \ - { K40, K00, K41, K42, K44, KC_NO, K45, KC_NO, K48, K49, K3D, K4C, KC_NO } \ + { K40, K00, K41, K42, K44, KC_NO, K46, KC_NO, K48, K49, K3D, K4C, KC_NO } \ } - -#endif diff --git a/keyboards/primekb/prime_e/keymaps/talljoe/config.h b/keyboards/primekb/prime_e/keymaps/talljoe/config.h new file mode 100644 index 0000000000..7ecea9c151 --- /dev/null +++ b/keyboards/primekb/prime_e/keymaps/talljoe/config.h @@ -0,0 +1,33 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 SPACE_COUNT 2 + +#define TEMPLATE( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ + 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, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K44, K45, K46, K48, K49, K4B, K4C \ +) \ +LAYOUT( \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1D, K2D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2C, \ + K30, K32, K33, K34, K35, K36, K2B, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K44, K46, K48, K49, K3D \ +) diff --git a/keyboards/primekb/prime_e/keymaps/talljoe/keymap.c b/keyboards/primekb/prime_e/keymaps/talljoe/keymap.c new file mode 100644 index 0000000000..7812add812 --- /dev/null +++ b/keyboards/primekb/prime_e/keymaps/talljoe/keymap.c @@ -0,0 +1 @@ +// This space intentionally left blank diff --git a/keyboards/thevankeyboards/bananasplit/keymaps/talljoe/config.h b/keyboards/thevankeyboards/bananasplit/keymaps/talljoe/config.h index fc9bd3d616..40b3fd3ecc 100644 --- a/keyboards/thevankeyboards/bananasplit/keymaps/talljoe/config.h +++ b/keyboards/thevankeyboards/bananasplit/keymaps/talljoe/config.h @@ -1,7 +1,20 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_CONFIG_H +#pragma once #define SPACE_COUNT 3 @@ -18,5 +31,3 @@ { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, KC_NO, K4B, K4C, KC_NO }\ } - -#endif diff --git a/keyboards/thevankeyboards/minivan/keymaps/talljoe-minivan/config.h b/keyboards/thevankeyboards/minivan/keymaps/talljoe-minivan/config.h index 26d5e207e8..89980614e1 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/talljoe-minivan/config.h +++ b/keyboards/thevankeyboards/minivan/keymaps/talljoe-minivan/config.h @@ -1,7 +1,21 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 QMK_KEYBOARD_CONFIG_H #define SPACE_COUNT 2 @@ -15,7 +29,7 @@ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1D, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K0D, \ - K41, K49, K42, K44, K45, K3C, K0B, K00, K3D \ + K41, K49, K42, K44, K46, K3C, K0B, K00, K3D \ ) #define TEMPLATE_ALT( \ @@ -28,7 +42,7 @@ K00, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1D, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2C, \ K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ - K41, K49, K42, K44, K45, K48, K49, K4B, K4C \ + K41, K49, K42, K44, K46, K48, K49, K4B, K4C \ ) #define TEMPLATE_ADJUST( \ @@ -41,7 +55,7 @@ K00, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K2D, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2C, \ K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ - K40, K41, K42, K44, K45, K48, K0B, K0C, K4C \ + K40, K41, K42, K44, K46, K48, K0B, K0C, K4C \ ) #define TEMPLATE_RESET LAYOUT_arrow( \ @@ -49,5 +63,3 @@ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET) - -#endif diff --git a/keyboards/tmo50/keymaps/talljoe/config.h b/keyboards/tmo50/keymaps/talljoe/config.h new file mode 100644 index 0000000000..53d593385f --- /dev/null +++ b/keyboards/tmo50/keymaps/talljoe/config.h @@ -0,0 +1,33 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 SPACE_COUNT 2 + +#define TEMPLATE_TKL(\ + KESC, KF01, KF02, KF03, KF04, KF05, KF06, KF07, KF08, KF09, KF10, KF11, KF12, KSCL, KPRS, KADJ, \ + KGRV, K_1 , K_2 , K_3 , K_4 , K_5 , K_6 , K_7 , K_8 , K_9 , K_0 , KMIN, KEQL, KBLS, KINS, KHOM, KPUP, \ + KTAB, K_Q , K_W , K_E , K_R , K_T , K_Y , K_U , K_I , K_O , K_P , KLBR, KRBR, KBSP, KDEL, KEND, LPDN, \ + KCAP, K_A , K_S , K_D , K_F , K_G , K_H , K_J , K_K , K_L , KSMI, KQUO, KENT, \ + KLSH, K_Z , K_X , K_C , K_V , K_B , K_N , K_M , KCMA, KDOT, KSLS, KRSH, K_UP, \ + KLCT, KLOS, KLAL, KSP2, KSP3, KSP1, KRAL, KROS, KRCT, KPTT, K_LT, K_DN, K_RT \ +) LAYOUT_all( \ + KF01, KTAB, K_Q , K_W , K_E , K_R , K_T , K_Y , K_U , K_I , K_O , K_P , KLBR, KRBR, KBSP, \ + KF02, KCAP, K_A , K_S , K_D , K_F , K_G , K_H , K_J , K_K , K_L , KSMI, KQUO, KENT, \ + KF03, KLSH, K_Z , K_X , K_C , K_V , K_B , K_N , K_M , KCMA, KDOT, KSLS, KRSH, KADJ, \ + KF04, KLOS, KLAL, KSP2, KSP1, KRAL, KESC \ +) diff --git a/keyboards/tmo50/keymaps/talljoe/keymap.c b/keyboards/tmo50/keymaps/talljoe/keymap.c new file mode 100644 index 0000000000..fa6523992e --- /dev/null +++ b/keyboards/tmo50/keymaps/talljoe/keymap.c @@ -0,0 +1,44 @@ +#include "quantum.h" +#include "talljoe.h" + +bool process_indicator_led_user(uint32_t state){ + return false; +} + +#define LED_MASK (_BV(PB0) | _BV(PB1) | _BV(PB2) | _BV(PB3)) +#define WHITE (_BV(PB0)) +#define YELLOW (_BV(PB1)) +#define MAGENTA (_BV(PB2)) +#define RED (_BV(PB3)) + +void matrix_scan_keymap(void) { + uint32_t lights = WHITE; + + switch(get_highest_layer(layer_state)) + { + case _NAV: + lights |= YELLOW; + break; + case _NUM: + lights |= MAGENTA; + break; + case _ADJUST: + lights |= RED; + break; + default: { + uint8_t default_layer = get_highest_layer(default_layer_state); + lights = 0; // no white LED by default. + if(default_layer & 1) + lights |= YELLOW; + if(default_layer & 2) + lights |= MAGENTA; + if(default_layer & 4) + lights |= RED; + } + } + + uint32_t port = PORTB; + port |= LED_MASK; + port &= ~lights; + PORTB = port; +} diff --git a/layouts/community/60_ansi/talljoe-ansi/config.h b/layouts/community/60_ansi/talljoe-ansi/config.h index 4326a2fd10..79cc190014 100644 --- a/layouts/community/60_ansi/talljoe-ansi/config.h +++ b/layouts/community/60_ansi/talljoe-ansi/config.h @@ -1,5 +1,20 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 QMK_KEYBOARD_CONFIG_H @@ -16,7 +31,5 @@ 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, \ K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ - K40, K41, K42, K45, K48, K49, K4B, K4C \ + K40, K41, K42, K46, K48, K49, K4B, K4C \ ) - -#endif //CONFIG_USER_H diff --git a/layouts/community/60_ansi_split_bs_rshift/talljoe/config.h b/layouts/community/60_ansi_split_bs_rshift/talljoe/config.h index 65568d3abf..2a2ead2273 100644 --- a/layouts/community/60_ansi_split_bs_rshift/talljoe/config.h +++ b/layouts/community/60_ansi_split_bs_rshift/talljoe/config.h @@ -1,7 +1,20 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_CONFIG_H +#pragma once #define ENABLE_GAME_LAYER @@ -16,7 +29,7 @@ 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, \ K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - K40, K41, K42, K45, K48, K49, K4B, K4C \ + K40, K41, K42, K46, K48, K49, K4B, K4C \ ) /* Color Map */ @@ -68,5 +81,3 @@ #define BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001 #endif //KEYBOARD_zeal60 - -#endif //CONFIG_USER_H diff --git a/layouts/community/60_ansi_split_bs_rshift/talljoe/solarized.c b/layouts/community/60_ansi_split_bs_rshift/talljoe/solarized.c index 3e9e726b95..617132d4ef 100644 --- a/layouts/community/60_ansi_split_bs_rshift/talljoe/solarized.c +++ b/layouts/community/60_ansi_split_bs_rshift/talljoe/solarized.c @@ -1,3 +1,19 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "solarized.h" #define MAKE_COLOR(_H, _S, _V) \ diff --git a/layouts/community/60_ansi_split_bs_rshift/talljoe/solarized.h b/layouts/community/60_ansi_split_bs_rshift/talljoe/solarized.h index 3b00caea70..15e3d588b1 100644 --- a/layouts/community/60_ansi_split_bs_rshift/talljoe/solarized.h +++ b/layouts/community/60_ansi_split_bs_rshift/talljoe/solarized.h @@ -1,5 +1,20 @@ -#ifndef SOLARIZED_H -#define SOLARIZED_H +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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/color.h" @@ -23,5 +38,3 @@ typedef struct { } solarized_t; extern solarized_t solarized; - -#endif diff --git a/layouts/community/60_hhkb/talljoe-hhkb/config.h b/layouts/community/60_hhkb/talljoe-hhkb/config.h index 54756a940b..0424fee1f3 100644 --- a/layouts/community/60_hhkb/talljoe-hhkb/config.h +++ b/layouts/community/60_hhkb/talljoe-hhkb/config.h @@ -1,5 +1,20 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 QMK_KEYBOARD_CONFIG_H @@ -16,10 +31,9 @@ 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, \ K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - K41, K42, K45, K48, K4C \ + K41, K42, K46, K48, K4C \ ) #ifdef RGB_BACKLIGHT_M60_A #define ZEAL_RGB #endif -#endif //CONFIG_USER_H diff --git a/layouts/community/ortho_4x12/talljoe/config.h b/layouts/community/ortho_4x12/talljoe/config.h index 61229e7f6c..34c24b8624 100644 --- a/layouts/community/ortho_4x12/talljoe/config.h +++ b/layouts/community/ortho_4x12/talljoe/config.h @@ -1,7 +1,21 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 QMK_KEYBOARD_CONFIG_H #define SPACE_COUNT 3 #define TEMPLATE( \ @@ -17,6 +31,3 @@ LAYOUT_ortho_4x12( \ K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ K40, K41, K0D, K42, K44, K45, K45, K46, K48, K49, K4B, K4C \ ) - - -#endif //CONFIG_USER_H diff --git a/layouts/community/tkl_ansi/talljoe-tkl/config.h b/layouts/community/tkl_ansi/talljoe-tkl/config.h index 02f8a94e39..15869ed0b6 100644 --- a/layouts/community/tkl_ansi/talljoe-tkl/config.h +++ b/layouts/community/tkl_ansi/talljoe-tkl/config.h @@ -1,5 +1,20 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 QMK_KEYBOARD_CONFIG_H @@ -18,7 +33,5 @@ KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \ KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ - KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ + KA4, KP2, KC6, KX2, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ ) - -#endif //CONFIG_USER_H diff --git a/users/talljoe/config.h b/users/talljoe/config.h index 33374014df..8a5fd50cb7 100644 --- a/users/talljoe/config.h +++ b/users/talljoe/config.h @@ -1,5 +1,19 @@ -#ifndef USERSPACE_CONFIG_H -#define USERSPACE_CONFIG_H +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 PERMISSIVE_HOLD @@ -9,4 +23,5 @@ #define BOOTMAGIC_KEY_SKIP KC_I #define BOOTMAGIC_KEY_EEPROM_CLEAR KC_E -#endif // !USERSPACE_CONFIG_H +#define COMBO_COUNT 2 +#define COMBO_TERM 250 diff --git a/users/talljoe/macros.c b/users/talljoe/macros.c new file mode 100644 index 0000000000..db8d28d4ce --- /dev/null +++ b/users/talljoe/macros.c @@ -0,0 +1,40 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "talljoe.h" + +extern keymap_config_t keymap_config; + +ostype_t get_os() { + if(keymap_config.swap_lalt_lgui) { + return MACOSX; + } + + return WINDOWS; +} + +#define IS_OSX() (get_os() == MACOSX) + +#define MOD_SEND(KEY) (IS_OSX() ? SEND_STRING(SS_LCMD(KEY)) : SEND_STRING(SS_LCTRL(KEY))) + +void macro_copy() { MOD_SEND("c"); } +void macro_paste() { MOD_SEND("v"); } +void macro_lock() { + if (IS_OSX()) { + SEND_STRING(SS_LCTRL(SS_LCMD("q"))); + } else { + SEND_STRING(SS_LGUI("l")); + } +} diff --git a/users/talljoe/macros.h b/users/talljoe/macros.h new file mode 100644 index 0000000000..832d4403fc --- /dev/null +++ b/users/talljoe/macros.h @@ -0,0 +1,27 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +typedef enum OSTYPE { + WINDOWS, + MACOSX, + LINUX +} ostype_t; + +ostype_t get_os(void); + +void macro_copy(void); +void macro_paste(void); +void macro_lock(void); diff --git a/users/talljoe/rules.mk b/users/talljoe/rules.mk index e0a71561f4..42ffb411a9 100644 --- a/users/talljoe/rules.mk +++ b/users/talljoe/rules.mk @@ -1,4 +1,11 @@ -SRC += talljoe.c tapdance.c +SRC += talljoe.c macros.c $(wildcard users/talljoe/tapdance/*.c) +ifeq ($(strip $(VISUALIZER_ENABLE)), yes) + SRC += visualizer.c +endif + +ifeq ($(strip $(FLASH_BOOTLOADER)), yes) + OPT_DEFS += -DFLASH_BOOTLOADER +endif EXTRAFLAGS+=-flto diff --git a/users/talljoe/talljoe.c b/users/talljoe/talljoe.c index a533ff6103..517f712ec8 100644 --- a/users/talljoe/talljoe.c +++ b/users/talljoe/talljoe.c @@ -1,3 +1,18 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "talljoe.h" @@ -5,14 +20,31 @@ #include "../../../keyboards/wilba_tech/wt_rgb_backlight.h" #endif +#ifdef VISUALIZER_ENABLE +const char layer_names[32][16] = { + [_BASE] = "QWERTY", + [_WORKMAN] = "Workman", + [_NORMAN] = "Norman", + [_DVORAK] = "Dvorak", + [_COLMAK] = "Colmak", + [_MALTROFF] = "Maltroff", + [_NORTRON] = "Nortron", + [_GAME] = "Game", + [_NAV] = "Navigation", + [_NUM] = "Numpad", + [_ADJUST] = "Adjust", + [_RESET] = "Reset", +}; +#endif + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = TEMPLATE_TKL( - 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, MO_ADJ , + US_LOCK, 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, MO_ADJ , US_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 , US_BSLS, KC_INS , KC_HOME, KC_PGUP, US_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_END , KC_PGDN, CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G , KC_H, KC_J, KC_K, KC_L, US_SCLN, KC_QUOT, US_ENT , SH_LBRC, KC_Z, KC_X, KC_C, KC_V, KC_B , KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SH_RBRC, KC_UP , - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC2, KC_SPC1, KC_SPC3, KC_RALT, KC_RGUI, KC_RCTL, KC_PTT , KC_LEFT, KC_DOWN, KC_RGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC2, KC_SPC3, KC_SPC1, KC_RALT, KC_RGUI, KC_RCTL, KC_PTT , KC_LEFT, KC_DOWN, KC_RGHT), [_WORKMAN] = TEMPLATE( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_Q , KC_D , KC_R , KC_W , KC_B , KC_J , KC_F , KC_U , KC_P , US_SCLN, _______, _______, _______, @@ -42,9 +74,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MALTROFF] = TEMPLATE( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_Q, KC_P, KC_Y, KC_G, KC_B , KC_J, KC_M, KC_U, KC_K, KC_L, _______, _______, _______, - _______, KC_A, KC_N, KC_I, KC_S, KC_F , KC_D, KC_T, KC_H, KC_O, KC_R , US_ENT , KC_BSPC, - _______, KC_Z, KC_X, KC_C, KC_V, US_QUOT, KC_SCLN, KC_W, KC_COMM, KC_DOT, KC_SLSH, _______, _______, + _______, KC_A, KC_N, KC_I, KC_S, KC_F , KC_D, KC_T, KC_H, KC_O, KC_R , _______, _______, + _______, KC_Z, KC_X, KC_C, KC_V, KC_SCLN, KC_BSPC, KC_W, KC_COMM, KC_DOT, KC_SLSH, _______, _______, _______, _______, _______, MLT_E , _______, _______, _______, _______, _______, _______), + // It's Norman but like Maltron + [_NORTRON] = TEMPLATE( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_Q , KC_W , KC_D , KC_F , KC_K , KC_J , KC_U , KC_BSPC, KC_L , US_SCLN, _______, _______, _______, + _______, KC_A , KC_S , KC_I , KC_T , KC_G , KC_Y , KC_N , KC_R , KC_O , KC_H , _______, _______, + _______, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_P , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______, + _______, _______, _______, MLT_E , US_ENT , _______, _______, _______, _______, _______), #endif #ifdef ENABLE_GAME_LAYER [_GAME] = TEMPLATE( @@ -57,27 +96,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NAV] = TEMPLATE_NAV( 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 , XXXXXXX, XXXXXXX, US_TAB , KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_INS , KC_PGUP, KC_UP , KC_PGDN, KC_BTN1, KC_BTN3, KC_BTN2, KC_DEL , - CTL_ESC, KC_LCBR, KC_RCBR, KC_LPRN, KC_RPRN, KC_AMPR, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END , US_QUOT, TG_ADJ , + CTL_ESC, KC_LCBR, KC_RCBR, KC_LPRN, KC_RPRN, KC_AMPR, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END , KC_BSPC, TG_ADJ , KC_LSFT, KC_EQL, KC_PLUS, KC_MINS, KC_UNDS, KC_ASTR, KC_CALC, US_GRV , KC_WBAK, KC_WFWD, KC_WREF, KC_RSFT, KC_APP , - KC_LCTL, KC_LGUI, KC_LALT, NV_SPC2, NV_SPC1, NV_SPC3, KC_RALT, KC_RGUI, KC_RCTL, KC_PTT ), + KC_LCTL, KC_LGUI, KC_LALT, NV_SPC2, NV_SPC3, NV_SPC1, KC_RALT, KC_RGUI, KC_RCTL, KC_PTT ), [_NUM] = TEMPLATE_NUM( XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_GRV , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_VOLU, KC_CIRC, KC_7, KC_8, KC_9, KC_PMNS, XXXXXXX, XXXXXXX, KC_DEL , - CTL_ESC, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_MUTE, KC_PENT, KC_4, KC_5, KC_6, KC_PPLS, XXXXXXX, KC_ENT , + CTL_ESC, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_MUTE, KC_PENT, KC_4, KC_5, KC_6, KC_PPLS, KC_BSPC, KC_ENT , KC_LSFT, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_VOLD, KC_PIPE, KC_1, KC_2, KC_3, KC_PAST, KC_PSLS, TG_NUM , - KC_LCTL, KC_LGUI, KC_LALT, NM_SPC2, NM_SPC1, NM_SPC3, KC_PDOT, KC_PCMM, KC_RCTL, KC_PTT ), + KC_LCTL, KC_LGUI, KC_LALT, NM_SPC2, NM_SPC3, NM_SPC1, KC_PDOT, KC_PCMM, KC_RCTL, KC_PTT ), // Adjust layer is on the split-shift key; or NAV+Enter (for non-split keyboards) [_ADJUST] = TEMPLATE_ADJUST( MO_RST , FX(1) , FX(2) , FX(3) , FX(4) , FX(5) , FX(6) , FX(7) , FX(8) , FX(9) , FX(10) , BR_DEC , BR_INC , XXXXXXX, MO_RST , MO_RST , H1_INC , S1_INC , H2_INC , S2_INC , EF_INC , RGB_HUI, RGB_SAI, RGB_MOD, RGB_M_P, DFAULTS, RGB_VAD, RGB_VAI, MO_RST , XXXXXXX, H1_DEC , S1_DEC , H2_DEC , S2_DEC , EF_DEC , RGB_HUD, RGB_SAD, RGB_RMOD,RGB_M_K, RGB_M_B, RGB_M_G, TG_ADJ , - TG_NKRO, LY_QWER, LY_WORK, LY_NRMN, LY_DVRK, LY_CLMK, XXXXXXX, LY_MALT, XXXXXXX, XXXXXXX, KC_MAKE, KC_CAPS, XXXXXXX, - MO_RST , AG_SWAP, AG_NORM, XXXXXXX, BL_TOGG, XXXXXXX, RGB_TOG, XXXXXXX, XXXXXXX, TG_GAME), + TG_NKRO, LY_QWER, LY_WORK, LY_CLMK, LY_DVRK, LY_NTRN, LY_NRMN, LY_MALT, XXXXXXX, XXXXXXX, KC_MAKE, KC_CAPS, XXXXXXX, + MO_RST , AG_SWAP, AG_NORM, XXXXXXX, XXXXXXX, BL_TOGG, RGB_TOG, XXXXXXX, XXXXXXX, TG_GAME), // To Reset hit FN + ` + Esc [_RESET] = TEMPLATE_RESET, }; +__attribute__((weak)) +void matrix_scan_keymap(void) { +} + void matrix_scan_user(void) { + matrix_scan_keymap(); + #ifdef KEYBOARD_gh60 if (IS_LAYER_ON(_GAME)) { gh60_wasd_leds_on(); @@ -140,16 +185,21 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader if (!record->event.pressed) { - SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP - - #if defined(BOOTLOADER_HALFKAY) - ":teensy" - #elif defined(BOOTLOADER_CATERINA) - ":avrdude" - #else - ":dfu" - #endif - SS_TAP(X_ENTER)); + uint8_t temp_mod = get_mods(); + uint8_t temp_osm = get_oneshot_mods(); + clear_mods(); clear_oneshot_mods(); + SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP); +#ifndef FLASH_BOOTLOADER + if ((temp_mod | temp_osm) & MOD_MASK_SHIFT) +#endif + { + SEND_STRING(":flash"); + } + if ((temp_mod | temp_osm) & MOD_MASK_CTRL) { + SEND_STRING(" -j8 --output-sync"); + } + tap_code(KC_ENT); + set_mods(temp_mod); } return false; break; diff --git a/users/talljoe/talljoe.h b/users/talljoe/talljoe.h index 496a6222a9..f151bde685 100644 --- a/users/talljoe/talljoe.h +++ b/users/talljoe/talljoe.h @@ -1,7 +1,24 @@ -#ifndef USERSPACE -#define USERSPACE +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "quantum.h" +#pragma once + +#include QMK_KEYBOARD_H +#include "tapdance/tapdance.h" +#include "macros.h" enum userspace_custom_keycodes { KC_MAKE = SAFE_RANGE, // can always be here @@ -22,6 +39,7 @@ enum layers { _DVORAK, _COLMAK, _MALTROFF, + _NORTRON, _GAME, _NAV, _NUM, @@ -29,14 +47,12 @@ enum layers { _RESET = RESET_LAYER, }; -enum tap_dancers { - TD_SEMICOLON, - TD_GRAVE, - TD_QUOTE, -}; +#ifdef VISUALIZER_ENABLE + extern const char layer_names[][16]; +#endif #define MO_NAV MO(_NAV) -#define MO_ADJ MO(_ADJUST) +#define MO_ADJ TD(TD_FUNCTION) #define MO_RST MO(_RESET) #define TG_ADJ TG(_ADJUST) #define TG_NUM TG(_NUM) @@ -52,8 +68,10 @@ enum tap_dancers { #define LY_CLMK DF(_COLMAK) #if SPACE_COUNT >= 2 #define LY_MALT DF(_MALTROFF) + #define LY_NTRN DF(_NORTRON) #else #define LY_MALT KC_NO + #define LY_NTRN KC_NO #endif #define TG_NKRO MAGIC_TOGGLE_NKRO #define KC_PTT KC_F24 @@ -66,60 +84,28 @@ enum tap_dancers { #define US_BSLS LCA_T(KC_BSLS) #define US_SCLN TD(TD_SEMICOLON) #define US_GRV TD(TD_GRAVE) -#define US_QUOT TD(TD_QUOTE) #define US_TAB C_S_T(KC_TAB) #define SH_LBRC LSFT_T(KC_LBRC) #define SH_RBRC RSFT_T(KC_RBRC) +#define US_LOCK TD(TD_LOCK) #define MLT_E LT(_NUM, KC_E) -#ifndef SPACE_COUNT - #define SPACE_COUNT 1 +#ifndef SWAP_HANDS_ENABLE +#define SH_T #endif -#if (SPACE_COUNT == 1) - #define KC_SPC1 LT(_NAV, KC_SPC) - #define KC_SPC2 XXXXXXX - #define KC_SPC3 XXXXXXX - #define NV_SPC1 _______ - #define NV_SPC2 _______ - #define NV_SPC3 _______ +#define KC_SPC1 LT(_NAV,KC_SPC) +#define KC_SPC2 LT(_NUM,KC_ENT) +#define KC_SPC3 SH_T(KC_BSPC) - #define NM_SPC1 _______ - #define NM_SPC2 _______ - #define NM_SPC3 _______ -#elif (SPACE_COUNT == 2) - #define KC_SPC1 LT(_NAV,KC_SPC) - #define KC_SPC2 LT(_NUM,KC_ENT) +#define NV_SPC1 KC_SPC +#define NV_SPC2 KC_ENT +#define NV_SPC3 KC_SPC - #define NV_SPC1 KC_SPC - #define NV_SPC2 KC_ENT - - #define NM_SPC1 KC_0 - #define NM_SPC2 KC_SPC - - #define KC_SPC3 XXXXXXX - #define NV_SPC3 XXXXXXX - #define NM_SPC3 XXXXXXX -#elif (SPACE_COUNT == 3) - #ifdef SWAP_HANDS_ENABLE - #define KC_SPC1 SH_T(KC_BSPC) - #else - #define KC_SPC1 KC_BSPC - #endif - #define KC_SPC2 LT(_NUM,KC_ENT) - #define KC_SPC3 LT(_NAV,KC_SPC) - - #define NV_SPC1 KC_SPC - #define NV_SPC2 KC_ENT - #define NV_SPC3 KC_SPC - - #define NM_SPC1 KC_SPC - #define NM_SPC2 XXXXXXX - #define NM_SPC3 KC_0 -#else - #error "Unsupported space count:" SPACE_COUNT -#endif +#define NM_SPC1 KC_0 +#define NM_SPC2 XXXXXXX +#define NM_SPC3 KC_SPC #ifndef ZEAL_RGB #define BR_INC KC_NO @@ -195,5 +181,3 @@ enum tap_dancers { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ RESET , XXXXXXX, XXXXXXX, XXXXXXX, RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX) #endif - -#endif diff --git a/users/talljoe/tapdance.c b/users/talljoe/tapdance.c deleted file mode 100644 index c4d6025f0f..0000000000 --- a/users/talljoe/tapdance.c +++ /dev/null @@ -1,146 +0,0 @@ -//Tap Dance -#include "talljoe.h" - -enum { - SINGLE_TAP = 1, - SINGLE_HOLD = 2, - DOUBLE_TAP = 3, - DOUBLE_HOLD = 4, - DOUBLE_SINGLE_TAP = 5, //send two single taps - TRIPLE_TAP = 6, - TRIPLE_HOLD = 7, - SPECIAL = 8 -}; - -static struct { - int quote; - int semicolon; -} tap_state = {0}; - -int cur_dance (qk_tap_dance_state_t *state) { - if (state->count == 1) { - //If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP - if (state->interrupted) { - // if (!state->pressed) return SINGLE_TAP; - //need "permissive hold" here. - // else return SINGLE_HOLD; - //If the interrupting key is released before the tap-dance key, then it is a single HOLD - //However, if the tap-dance key is released first, then it is a single TAP - //But how to get access to the state of the interrupting key???? - return SINGLE_TAP; - } - else { - if (!state->pressed) return SINGLE_TAP; - else return SINGLE_HOLD; - } - } - //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated - //with single tap. - else if (state->count == 2) { - if (state->interrupted) return DOUBLE_SINGLE_TAP; - else if (state->pressed) return DOUBLE_HOLD; - else return DOUBLE_TAP; - } - else if ((state->count == 3) && ((state->interrupted) || (!state->pressed))) return TRIPLE_TAP; - else if (state->count == 3) return TRIPLE_HOLD; - else return SPECIAL; -} - -int hold_cur_dance (qk_tap_dance_state_t *state) { - if (state->count == 1) { - if (state->interrupted) { - if (!state->pressed) return SINGLE_TAP; - else return SINGLE_HOLD; - } - else { - if (!state->pressed) return SINGLE_TAP; - else return SINGLE_HOLD; - } - } - //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated - //with single tap. - else if (state->count == 2) { - if (state->pressed) return DOUBLE_HOLD; - else return DOUBLE_TAP; - } - else if (state->count == 3) { - if (!state->pressed) return TRIPLE_TAP; - else return TRIPLE_HOLD; - } - else return SPECIAL; -} - -// Send semi-colon + enter on two taps -void tap_dance_semicolon_finished(qk_tap_dance_state_t *state, void *user_data) { - tap_state.semicolon = hold_cur_dance(state); - switch (tap_state.semicolon) { - case SINGLE_TAP: case DOUBLE_HOLD: register_code(KC_SCLN); break; - case SINGLE_HOLD: layer_on(_NUM); break; - } -} - -void tap_dance_semicolon_reset(qk_tap_dance_state_t *state, void *user_data) { - switch (tap_state.semicolon) { - case SINGLE_TAP: case DOUBLE_HOLD: unregister_code(KC_SCLN); break; - case DOUBLE_TAP: { - if (get_mods()) { - SEND_STRING(";;"); // send normal when mods are pressed - } - else { - SEND_STRING(";\n"); - } - break; - } - case TRIPLE_TAP: { - SEND_STRING(";\n\n"); - } - case SPECIAL: layer_invert(_NUM); break; - case SINGLE_HOLD: layer_off(_NUM); break; - } - tap_state.semicolon = 0; -} - -// Send `. ~. ``` -void tap_dance_grave_finished(qk_tap_dance_state_t *state, void *user_data) { - switch(state->count) { - case 1: - SEND_STRING("`"); - break; - case 2: - SEND_STRING("~"); - break; - } -} - -void tap_dance_grave_each(qk_tap_dance_state_t *state, void *user_data) { - if(state->count == 3) { - SEND_STRING("```"); - } else if (state->count > 3) { - SEND_STRING("`"); - } -} - - -void tap_dance_quote_finished(qk_tap_dance_state_t *state, void *user_data) { - tap_state.quote = hold_cur_dance(state); - switch (tap_state.quote) { - case SINGLE_TAP: case DOUBLE_HOLD: register_code(KC_QUOT); break; - case SINGLE_HOLD: layer_on(_NAV); break; - } -} - -void tap_dance_quote_reset(qk_tap_dance_state_t *state, void *user_data) { - switch (tap_state.quote) { - case SINGLE_TAP: case DOUBLE_HOLD: unregister_code(KC_QUOTE); break; - case DOUBLE_TAP: SEND_STRING("\""); break; - case TRIPLE_TAP: layer_invert(_NAV); break; - case SINGLE_HOLD: layer_off(_NAV); break; - } - tap_state.quote = 0; -} - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_SEMICOLON] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_semicolon_finished, tap_dance_semicolon_reset), - [TD_GRAVE] = ACTION_TAP_DANCE_FN_ADVANCED(tap_dance_grave_each, tap_dance_grave_finished, NULL), - [TD_QUOTE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_quote_finished, tap_dance_quote_reset), -}; diff --git a/users/talljoe/tapdance/actions/td.function.c b/users/talljoe/tapdance/actions/td.function.c new file mode 100644 index 0000000000..fffbf283dd --- /dev/null +++ b/users/talljoe/tapdance/actions/td.function.c @@ -0,0 +1,35 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +static struct { + int state; +} function_state = {0}; + +// Send semi-colon + enter on two taps +void tap_dance_function_finished(qk_tap_dance_state_t *state, void *user_data) { + function_state.state = hold_cur_dance(state); + switch (function_state.state) { + case SINGLE_HOLD: layer_on(_ADJUST); break; + } +} + +void tap_dance_function_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (function_state.state) { + case SPECIAL: reset_keyboard(); break; + case SINGLE_HOLD: layer_off(_ADJUST); break; + } + function_state.state = 0; +} diff --git a/users/talljoe/tapdance/actions/td.grave.c b/users/talljoe/tapdance/actions/td.grave.c new file mode 100644 index 0000000000..509b66dc35 --- /dev/null +++ b/users/talljoe/tapdance/actions/td.grave.c @@ -0,0 +1,36 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Send `. ~. ``` +void tap_dance_grave_finished(qk_tap_dance_state_t *state, void *user_data) { + switch(state->count) { + case 1: + SEND_STRING("`"); + break; + case 2: + SEND_STRING("~"); + break; + } +} + +void tap_dance_grave_each(qk_tap_dance_state_t *state, void *user_data) { + if(state->count == 3) { + SEND_STRING("```"); + } else if (state->count > 3) { + SEND_STRING("`"); + } +} + diff --git a/users/talljoe/tapdance/actions/td.lock.c b/users/talljoe/tapdance/actions/td.lock.c new file mode 100644 index 0000000000..4422d9e252 --- /dev/null +++ b/users/talljoe/tapdance/actions/td.lock.c @@ -0,0 +1,35 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +static struct { + int state; +} lock_state = {0}; + +// Send semi-colon + enter on two taps +void tap_dance_lock_finished(qk_tap_dance_state_t *state, void *user_data) { + lock_state.state = cur_dance(state); + switch (lock_state.state) { + case SINGLE_TAP: register_code(KC_ESC); break; + case SINGLE_HOLD: macro_lock(); break; + } +} + +void tap_dance_lock_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (lock_state.state) { + case SINGLE_TAP: unregister_code(KC_ESC); break; + } + lock_state.state = 0; +} diff --git a/users/talljoe/tapdance/actions/td.semicolon.c b/users/talljoe/tapdance/actions/td.semicolon.c new file mode 100644 index 0000000000..45776492a4 --- /dev/null +++ b/users/talljoe/tapdance/actions/td.semicolon.c @@ -0,0 +1,54 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +static struct { + int semicolon; + bool mods; +} tap_state = {0}; + +void tap_dance_semicolon_each(qk_tap_dance_state_t *state, void *user_data) { + tap_state.mods |= get_mods(); +} + +// Send semi-colon + enter on two taps +void tap_dance_semicolon_finished(qk_tap_dance_state_t *state, void *user_data) { + tap_state.semicolon = hold_cur_dance(state); + switch (tap_state.semicolon) { + case SINGLE_TAP: case DOUBLE_HOLD: register_code(KC_SCLN); break; + case SINGLE_HOLD: layer_on(_NUM); break; + } +} + +void tap_dance_semicolon_reset(qk_tap_dance_state_t *state, void *user_data) { + switch (tap_state.semicolon) { + case SINGLE_TAP: case DOUBLE_HOLD: unregister_code(KC_SCLN); break; + case DOUBLE_TAP: { + if (tap_state.mods) { + SEND_STRING(";;"); // send normal when mods are pressed + } + else { + SEND_STRING(";\n"); + } + break; + } + case TRIPLE_TAP: { + SEND_STRING(";\n\n"); + } + case SPECIAL: layer_invert(_NUM); break; + case SINGLE_HOLD: layer_off(_NUM); break; + } + tap_state.semicolon = 0; +} diff --git a/users/talljoe/tapdance/tapdance.h b/users/talljoe/tapdance/tapdance.h new file mode 100644 index 0000000000..532e978ca8 --- /dev/null +++ b/users/talljoe/tapdance/tapdance.h @@ -0,0 +1,26 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "quantum.h" +#include "td_setup.h" + +enum tap_dancers { + TD_SEMICOLON, + TD_GRAVE, + TD_LOCK, + TD_FUNCTION, +}; + diff --git a/users/talljoe/tapdance/tapdance_actions.c b/users/talljoe/tapdance/tapdance_actions.c new file mode 100644 index 0000000000..59a34b7b9e --- /dev/null +++ b/users/talljoe/tapdance/tapdance_actions.c @@ -0,0 +1,28 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "../talljoe.h" +#include "actions/td.grave.c" +#include "actions/td.lock.c" +#include "actions/td.semicolon.c" +#include "actions/td.function.c" + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_SEMICOLON] = ACTION_TAP_DANCE_FN_ADVANCED(tap_dance_semicolon_each, tap_dance_semicolon_finished, tap_dance_semicolon_reset), + [TD_LOCK] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_lock_finished, tap_dance_lock_reset), + [TD_GRAVE] = ACTION_TAP_DANCE_FN_ADVANCED(tap_dance_grave_each, tap_dance_grave_finished, NULL), + [TD_FUNCTION] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_function_finished, tap_dance_function_reset), +}; diff --git a/users/talljoe/tapdance/td_setup.c b/users/talljoe/tapdance/td_setup.c new file mode 100644 index 0000000000..d8464144ac --- /dev/null +++ b/users/talljoe/tapdance/td_setup.c @@ -0,0 +1,70 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "tapdance.h" + +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + //If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP + if (state->interrupted) { + // if (!state->pressed) return SINGLE_TAP; + //need "permissive hold" here. + // else return SINGLE_HOLD; + //If the interrupting key is released before the tap-dance key, then it is a single HOLD + //However, if the tap-dance key is released first, then it is a single TAP + //But how to get access to the state of the interrupting key???? + return SINGLE_TAP; + } + else { + if (!state->pressed) return SINGLE_TAP; + else return SINGLE_HOLD; + } + } + //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated + //with single tap. + else if (state->count == 2) { + if (state->interrupted) return DOUBLE_SINGLE_TAP; + else if (state->pressed) return DOUBLE_HOLD; + else return DOUBLE_TAP; + } + else if ((state->count == 3) && ((state->interrupted) || (!state->pressed))) return TRIPLE_TAP; + else if (state->count == 3) return TRIPLE_HOLD; + else return SPECIAL; +} + +int hold_cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted) { + if (!state->pressed) return SINGLE_TAP; + else return SINGLE_HOLD; + } + else { + if (!state->pressed) return SINGLE_TAP; + else return SINGLE_HOLD; + } + } + //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated + //with single tap. + else if (state->count == 2) { + if (state->pressed) return DOUBLE_HOLD; + else return DOUBLE_TAP; + } + else if (state->count == 3) { + if (!state->pressed) return TRIPLE_TAP; + else return TRIPLE_HOLD; + } + else return SPECIAL; +} diff --git a/users/talljoe/tapdance/td_setup.h b/users/talljoe/tapdance/td_setup.h new file mode 100644 index 0000000000..85d45d944f --- /dev/null +++ b/users/talljoe/tapdance/td_setup.h @@ -0,0 +1,29 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +enum { + SINGLE_TAP = 1, + SINGLE_HOLD = 2, + DOUBLE_TAP = 3, + DOUBLE_HOLD = 4, + DOUBLE_SINGLE_TAP = 5, //send two single taps + TRIPLE_TAP = 6, + TRIPLE_HOLD = 7, + SPECIAL = 8 +}; + +int cur_dance (qk_tap_dance_state_t *state); +int hold_cur_dance (qk_tap_dance_state_t *state); diff --git a/users/talljoe/visualizer.c b/users/talljoe/visualizer.c new file mode 100644 index 0000000000..c17b56706b --- /dev/null +++ b/users/talljoe/visualizer.c @@ -0,0 +1,21 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "talljoe.h" + +static void get_visualizer_layer_and_color(visualizer_state_t* state) { + state->status_text = layer_names[biton32(state->status.layer)]; +} From 4d33d72975f2d63c7b6ff6fd4aa7e0f4c4347583 Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 7 Nov 2020 09:56:08 -0800 Subject: [PATCH 036/114] New command: qmk lint (#10761) * Basic qmk lint command * check for keymap readme * change the workflow from qmk info to qmk lint * add a strict mode * parsing -> parse * document qmk lint * small info logging cleanup * Apply suggestions from code review Co-authored-by: Ryan * honor --strict in more places * change the job name to lint Co-authored-by: Ryan --- .github/workflows/{info.yml => lint.yml} | 9 +-- docs/cli_commands.md | 19 ++++++- docs/hardware_keyboard_guidelines.md | 19 +++++++ lib/python/qmk/cli/__init__.py | 1 + lib/python/qmk/cli/lint.py | 70 ++++++++++++++++++++++++ lib/python/qmk/info.py | 45 ++++++++++----- lib/python/qmk/path.py | 14 +++-- 7 files changed, 153 insertions(+), 24 deletions(-) rename .github/workflows/{info.yml => lint.yml} (80%) create mode 100644 lib/python/qmk/cli/lint.py diff --git a/.github/workflows/info.yml b/.github/workflows/lint.yml similarity index 80% rename from .github/workflows/info.yml rename to .github/workflows/lint.yml index bb3a508477..1aa347a1b2 100644 --- a/.github/workflows/info.yml +++ b/.github/workflows/lint.yml @@ -6,7 +6,7 @@ on: - 'keyboards/**' jobs: - info: + lint: runs-on: ubuntu-latest container: qmkfm/base_container @@ -27,7 +27,7 @@ jobs: echo ${{ github.event.pull_request.base.sha }} echo '${{ steps.file_changes.outputs.files}}' - - name: Run qmk info + - name: Run qmk lint shell: 'bash {0}' run: | QMK_CHANGES=$(echo -e '${{ steps.file_changes.outputs.files}}') @@ -45,10 +45,7 @@ jobs: if [[ $KEYMAP_ONLY -gt 0 ]]; then echo "linting ${KB}" - # TODO: info info always returns 0 - right now the only way to know failure is to inspect log lines - qmk info -l -kb ${KB} 2>&1 | tee /tmp/$$ - !(grep -cq ☒ /tmp/$$) - : $((exit_code = $exit_code + $?)) + qmk lint --keyboard ${KB} fi done exit $exit_code diff --git a/docs/cli_commands.md b/docs/cli_commands.md index c970b1efa6..b10f5d4995 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md @@ -178,6 +178,24 @@ Creates a keymap.json from a keymap.c. qmk c2json [--no-cpp] [-o OUTPUT] filename ``` +## `qmk lint` + +Checks over a keyboard and/or keymap and highlights common errors, problems, and anti-patterns. + +**Usage**: + +``` +qmk lint [-km KEYMAP] [-kb KEYBOARD] [--strict] +``` + +This command is directory aware. It will automatically fill in KEYBOARD and/or KEYMAP if you are in a keyboard or keymap directory. + +**Examples**: + +Do a basic lint check: + + qmk lint -kb rominronin/katana60/rev2 + ## `qmk list-keyboards` This command lists all the keyboards currently defined in `qmk_firmware` @@ -309,4 +327,3 @@ This command runs the python test suite. If you make changes to python code you ``` qmk pytest ``` - diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index d49d0d0928..742b56572c 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -3,6 +3,25 @@ Since starting, QMK has grown by leaps and bounds thanks to people like you who contribute to creating and maintaining our community keyboards. As we've grown we've discovered some patterns that work well, and ask that you conform to them to make it easier for other people to benefit from your hard work. +## Use QMK Lint + +We have provided a tool, `qmk lint`, which will let you check over your keyboard for problems. We suggest using it frequently while working on your keyboard and keymap. + +Example passing check: + +``` +$ qmk lint -kb rominronin/katana60/rev2 +Ψ Lint check passed! +``` + +Example failing check: + +``` +$ qmk lint -kb clueboard/66/rev3 +☒ Missing keyboards/clueboard/66/rev3/readme.md +☒ Lint check failed! +``` + ## Naming Your Keyboard/Project All keyboard names are in lower case, consisting only of letters, numbers, and underscore (`_`). Names may not begin with an underscore. Forward slash (`/`) is used as a sub-folder separation character. diff --git a/lib/python/qmk/cli/__init__.py b/lib/python/qmk/cli/__init__.py index 3868f94bb2..77724a2448 100644 --- a/lib/python/qmk/cli/__init__.py +++ b/lib/python/qmk/cli/__init__.py @@ -19,6 +19,7 @@ from . import hello from . import info from . import json from . import json2c +from . import lint from . import list from . import kle2json from . import new diff --git a/lib/python/qmk/cli/lint.py b/lib/python/qmk/cli/lint.py new file mode 100644 index 0000000000..74467021e0 --- /dev/null +++ b/lib/python/qmk/cli/lint.py @@ -0,0 +1,70 @@ +"""Command to look over a keyboard/keymap and check for common mistakes. +""" +from milc import cli + +from qmk.decorators import automagic_keyboard, automagic_keymap +from qmk.info import info_json +from qmk.keymap import locate_keymap +from qmk.path import is_keyboard, keyboard + + +@cli.argument('--strict', action='store_true', help='Treat warnings as errors.') +@cli.argument('-kb', '--keyboard', help='The keyboard to check.') +@cli.argument('-km', '--keymap', help='The keymap to check.') +@cli.subcommand('Check keyboard and keymap for common mistakes.') +@automagic_keyboard +@automagic_keymap +def lint(cli): + """Check keyboard and keymap for common mistakes. + """ + if not cli.config.lint.keyboard: + cli.log.error('Missing required argument: --keyboard') + cli.print_help() + return False + + if not is_keyboard(cli.config.lint.keyboard): + cli.log.error('No such keyboard: %s', cli.config.lint.keyboard) + return False + + # Gather data about the keyboard. + ok = True + keyboard_path = keyboard(cli.config.lint.keyboard) + keyboard_info = info_json(cli.config.lint.keyboard) + readme_path = keyboard_path / 'readme.md' + + # Check for errors in the info.json + if keyboard_info['parse_errors']: + ok = False + cli.log.error('Errors found when generating info.json.') + + if cli.config.lint.strict and keyboard_info['parse_warnings']: + ok = False + cli.log.error('Warnings found when generating info.json (Strict mode enabled.)') + + # Check for a readme.md and warn if it doesn't exist + if not readme_path.exists(): + ok = False + cli.log.error('Missing %s', readme_path) + + # Keymap specific checks + if cli.config.lint.keymap: + keymap_path = locate_keymap(cli.config.lint.keyboard, cli.config.lint.keymap) + + if not keymap_path: + ok = False + cli.log.error("Can't find %s keymap for %s keyboard.", cli.config.lint.keymap, cli.config.lint.keyboard) + else: + keymap_readme = keymap_path.parent / 'readme.md' + if not keymap_readme.exists(): + cli.log.warning('Missing %s', keymap_readme) + + if cli.config.lint.strict: + ok = False + + # Check and report the overall status + if ok: + cli.log.info('Lint check passed!') + return True + + cli.log.error('Lint check failed!') + return False diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index e92c3335b9..d73ba8cfb6 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -28,6 +28,8 @@ def info_json(keyboard): 'keyboard_folder': str(keyboard), 'keymaps': {}, 'layouts': {}, + 'parse_errors': [], + 'parse_warnings': [], 'maintainer': 'qmk', } @@ -36,7 +38,7 @@ def info_json(keyboard): info_data['keymaps'][keymap.name] = {'url': f'https://raw.githubusercontent.com/qmk/qmk_firmware/master/{keymap}/keymap.json'} # Populate layout data - for layout_name, layout_json in _find_all_layouts(keyboard, rules).items(): + for layout_name, layout_json in _find_all_layouts(info_data, keyboard, rules).items(): if not layout_name.startswith('LAYOUT_kc'): info_data['layouts'][layout_name] = layout_json @@ -104,14 +106,16 @@ def _extract_rules_mk(info_data): mcu = rules.get('MCU') if mcu in CHIBIOS_PROCESSORS: - arm_processor_rules(info_data, rules) - elif mcu in LUFA_PROCESSORS + VUSB_PROCESSORS: - avr_processor_rules(info_data, rules) - else: - cli.log.warning("%s: Unknown MCU: %s" % (info_data['keyboard_folder'], mcu)) - unknown_processor_rules(info_data, rules) + return arm_processor_rules(info_data, rules) - return info_data + elif mcu in LUFA_PROCESSORS + VUSB_PROCESSORS: + return avr_processor_rules(info_data, rules) + + msg = "Unknown MCU: " + str(mcu) + + _log_warning(info_data, msg) + + return unknown_processor_rules(info_data, rules) def _search_keyboard_h(path): @@ -127,7 +131,7 @@ def _search_keyboard_h(path): return layouts -def _find_all_layouts(keyboard, rules): +def _find_all_layouts(info_data, keyboard, rules): """Looks for layout macros associated with this keyboard. """ layouts = _search_keyboard_h(Path(keyboard)) @@ -135,7 +139,7 @@ def _find_all_layouts(keyboard, rules): if not layouts: # If we didn't find any layouts above we widen our search. This is error # prone which is why we want to encourage people to follow the standard above. - cli.log.warning('%s: Falling back to searching for KEYMAP/LAYOUT macros.' % (keyboard)) + _log_warning(info_data, 'Falling back to searching for KEYMAP/LAYOUT macros.') for file in glob('keyboards/%s/*.h' % keyboard): if file.endswith('.h'): these_layouts = find_layouts(file) @@ -153,11 +157,25 @@ def _find_all_layouts(keyboard, rules): supported_layouts.remove(layout_name) if supported_layouts: - cli.log.error('%s: Missing LAYOUT() macro for %s' % (keyboard, ', '.join(supported_layouts))) + _log_error(info_data, 'Missing LAYOUT() macro for %s' % (', '.join(supported_layouts))) return layouts +def _log_error(info_data, message): + """Send an error message to both JSON and the log. + """ + info_data['parse_errors'].append(message) + cli.log.error('%s: %s', info_data.get('keyboard_folder', 'Unknown Keyboard!'), message) + + +def _log_warning(info_data, message): + """Send a warning message to both JSON and the log. + """ + info_data['parse_warnings'].append(message) + cli.log.warning('%s: %s', info_data.get('keyboard_folder', 'Unknown Keyboard!'), message) + + def arm_processor_rules(info_data, rules): """Setup the default info for an ARM board. """ @@ -216,7 +234,7 @@ def merge_info_jsons(keyboard, info_data): new_info_data = json.load(info_fd) if not isinstance(new_info_data, dict): - cli.log.error("Invalid file %s, root object should be a dictionary.", str(info_file)) + _log_error(info_data, "Invalid file %s, root object should be a dictionary.", str(info_file)) continue # Copy whitelisted keys into `info_data` @@ -230,7 +248,8 @@ def merge_info_jsons(keyboard, info_data): # Only pull in layouts we have a macro for if layout_name in info_data['layouts']: if info_data['layouts'][layout_name]['key_count'] != len(json_layout['layout']): - cli.log.error('%s: %s: Number of elements in info.json does not match! info.json:%s != %s:%s', info_data['keyboard_folder'], layout_name, len(json_layout['layout']), layout_name, len(info_data['layouts'][layout_name]['layout'])) + msg = '%s: Number of elements in info.json does not match! info.json:%s != %s:%s' + _log_error(info_data, msg % (layout_name, len(json_layout['layout']), layout_name, len(info_data['layouts'][layout_name]['layout']))) else: for i, key in enumerate(info_data['layouts'][layout_name]['layout']): key.update(json_layout['layout'][i]) diff --git a/lib/python/qmk/path.py b/lib/python/qmk/path.py index 591fad034b..54def1d5d6 100644 --- a/lib/python/qmk/path.py +++ b/lib/python/qmk/path.py @@ -28,15 +28,21 @@ def under_qmk_firmware(): return None -def keymap(keyboard): +def keyboard(keyboard_name): + """Returns the path to a keyboard's directory relative to the qmk root. + """ + return Path('keyboards') / keyboard_name + + +def keymap(keyboard_name): """Locate the correct directory for storing a keymap. Args: - keyboard + keyboard_name The name of the keyboard. Example: clueboard/66/rev3 """ - keyboard_folder = Path('keyboards') / keyboard + keyboard_folder = keyboard(keyboard_name) for i in range(MAX_KEYBOARD_SUBFOLDERS): if (keyboard_folder / 'keymaps').exists(): @@ -45,7 +51,7 @@ def keymap(keyboard): keyboard_folder = keyboard_folder.parent logging.error('Could not find the keymaps directory!') - raise NoSuchKeyboardError('Could not find keymaps directory for: %s' % keyboard) + raise NoSuchKeyboardError('Could not find keymaps directory for: %s' % keyboard_name) def normpath(path): From bd1c048a76e0ba84513caf1d59573dc55618c99a Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 7 Nov 2020 11:36:47 -0800 Subject: [PATCH 037/114] Add qmk info -l to show the layouts too (#10882) --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1aa347a1b2..b459973afa 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -45,7 +45,7 @@ jobs: if [[ $KEYMAP_ONLY -gt 0 ]]; then echo "linting ${KB}" - qmk lint --keyboard ${KB} + qmk lint --keyboard ${KB} && qmk info -l --keyboard ${KB} fi done exit $exit_code From db829c9453af7b7de802fad844b56358dce594df Mon Sep 17 00:00:00 2001 From: TJ Date: Sat, 7 Nov 2020 22:04:32 -0600 Subject: [PATCH 038/114] Add big spacebar defaults to Underscore33 (#10731) * add big spacebar default * add rev1 big space * add big spacebar default * add rev1 big space * Fixed copyright statements Removed unused RGBRST keycode and bootmagic swaps --- .../rev1/keymaps/default/config.h | 15 ++++ .../rev1/keymaps/default/keymap.c | 6 +- .../rev1/keymaps/default_big_space/config.h | 20 +++++ .../rev1/keymaps/default_big_space/keymap.c | 82 +++++++++++++++++++ .../rev1/keymaps/default_big_space/readme.md | 3 + .../rev1/keymaps/default_big_space/rules.mk | 1 + .../rev2/keymaps/default/config.h | 15 ++++ .../rev2/keymaps/default/keymap.c | 6 +- .../rev2/keymaps/default_big_space/config.h | 20 +++++ .../rev2/keymaps/default_big_space/keymap.c | 82 +++++++++++++++++++ .../rev2/keymaps/default_big_space/readme.md | 3 + .../rev2/keymaps/default_big_space/rules.mk | 1 + 12 files changed, 244 insertions(+), 10 deletions(-) create mode 100644 keyboards/underscore33/rev1/keymaps/default_big_space/config.h create mode 100644 keyboards/underscore33/rev1/keymaps/default_big_space/keymap.c create mode 100644 keyboards/underscore33/rev1/keymaps/default_big_space/readme.md create mode 100644 keyboards/underscore33/rev1/keymaps/default_big_space/rules.mk create mode 100644 keyboards/underscore33/rev2/keymaps/default_big_space/config.h create mode 100644 keyboards/underscore33/rev2/keymaps/default_big_space/keymap.c create mode 100644 keyboards/underscore33/rev2/keymaps/default_big_space/readme.md create mode 100644 keyboards/underscore33/rev2/keymaps/default_big_space/rules.mk diff --git a/keyboards/underscore33/rev1/keymaps/default/config.h b/keyboards/underscore33/rev1/keymaps/default/config.h index 5708a439ac..82cbcc42cb 100644 --- a/keyboards/underscore33/rev1/keymaps/default/config.h +++ b/keyboards/underscore33/rev1/keymaps/default/config.h @@ -1,3 +1,18 @@ +/* Copyright 2020 tominabox1 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 /* Combos */ diff --git a/keyboards/underscore33/rev1/keymaps/default/keymap.c b/keyboards/underscore33/rev1/keymaps/default/keymap.c index 148e840fa5..beaa8d92f2 100644 --- a/keyboards/underscore33/rev1/keymaps/default/keymap.c +++ b/keyboards/underscore33/rev1/keymaps/default/keymap.c @@ -21,10 +21,6 @@ enum layers{ _NAV }; -enum custom_keycodes{ - RGBRST = SAFE_RANGE, -}; - #define KC_NUM_SPC LT(_NUM_SYM, KC_SPC) #define KC_NAV_ENT LT(_NAV, KC_ENT) #define KC_GA LGUI_T(KC_A) @@ -60,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_NAV] = LAYOUT_33_split_space( - RESET, RGBRST, AG_NORM, AG_SWAP, DEBUG, KC_GRV, KC_PGDN, KC_UP, KC_PGUP, KC_SCLN, + RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_GRV, KC_PGDN, KC_UP, KC_PGUP, KC_SCLN, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_NO, KC_MINS, KC_RO, KC_COMM, KC_DOT, KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS diff --git a/keyboards/underscore33/rev1/keymaps/default_big_space/config.h b/keyboards/underscore33/rev1/keymaps/default_big_space/config.h new file mode 100644 index 0000000000..82cbcc42cb --- /dev/null +++ b/keyboards/underscore33/rev1/keymaps/default_big_space/config.h @@ -0,0 +1,20 @@ +/* Copyright 2020 tominabox1 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 + +/* Combos */ +#define COMBO_COUNT 5 +#define COMBO_TERM 50 diff --git a/keyboards/underscore33/rev1/keymaps/default_big_space/keymap.c b/keyboards/underscore33/rev1/keymaps/default_big_space/keymap.c new file mode 100644 index 0000000000..09547fa06f --- /dev/null +++ b/keyboards/underscore33/rev1/keymaps/default_big_space/keymap.c @@ -0,0 +1,82 @@ +/* Copyright 2020 tominabox1 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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, + _NUM_SYM, + _NAV +}; + +#define KC_NUM_SPC LT(_NUM_SYM, KC_SPC) +#define KC_NAV_ENT LT(_NAV, KC_ENT) +#define KC_GA LGUI_T(KC_A) +#define KC_AS LALT_T(KC_S) +#define KC_CD LCTL_T(KC_D) +#define KC_SF LSFT_T(KC_F) +#define KC_SJ RSFT_T(KC_J) +#define KC_CK RCTL_T(KC_K) +#define KC_AL RALT_T(KC_L) +#define KC_GSCLN RGUI_T(KC_SCLN) + +enum combo_events { + COMBO_BSPC, + COMBO_NUMBAK, + COMBO_TAB, + COMBO_ESC, + COMBO_DEL, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_33_big_space( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_GA, KC_AS, KC_CD, KC_SF, KC_G, KC_H, KC_SJ, KC_CK, KC_AL, KC_GSCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LCTL, KC_NUM_SPC, KC_NAV_ENT + ), + + [_NUM_SYM] = LAYOUT_33_big_space( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS, + KC_BSLS, KC_LCBR, KC_LBRC, KC_LPRN, KC_UNDS, KC_RPRN, KC_RBRC, KC_RCBR, KC_DOT, KC_GRV, + KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_NAV] = LAYOUT_33_big_space( + RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_GRV, KC_PGDN, KC_UP, KC_PGUP, KC_SCLN, + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_NO, KC_MINS, KC_RO, KC_COMM, KC_DOT, KC_BSLS, + KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + + +#ifdef COMBO_ENABLE +const uint16_t PROGMEM combo_bspc[] = {KC_O, KC_P, COMBO_END}; +const uint16_t PROGMEM combo_numbak[] = {KC_0, KC_9, COMBO_END}; +const uint16_t PROGMEM combo_tab[] = {KC_Q, KC_W, COMBO_END}; +const uint16_t PROGMEM combo_esc[] = {KC_E, KC_W, COMBO_END}; +const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), + [COMBO_NUMBAK] = COMBO(combo_numbak,KC_BSPC), + [COMBO_TAB] = COMBO(combo_tab,KC_TAB), + [COMBO_ESC] = COMBO(combo_esc,KC_ESC), + [COMBO_DEL] = COMBO(combo_del,KC_DEL), + +}; +#endif diff --git a/keyboards/underscore33/rev1/keymaps/default_big_space/readme.md b/keyboards/underscore33/rev1/keymaps/default_big_space/readme.md new file mode 100644 index 0000000000..3f22df7c22 --- /dev/null +++ b/keyboards/underscore33/rev1/keymaps/default_big_space/readme.md @@ -0,0 +1,3 @@ +# Default _33 Rev1 Layout (with big spacebar) + +This is the recommended default layout. diff --git a/keyboards/underscore33/rev1/keymaps/default_big_space/rules.mk b/keyboards/underscore33/rev1/keymaps/default_big_space/rules.mk new file mode 100644 index 0000000000..ab1e438182 --- /dev/null +++ b/keyboards/underscore33/rev1/keymaps/default_big_space/rules.mk @@ -0,0 +1 @@ +COMBO_ENABLE = yes diff --git a/keyboards/underscore33/rev2/keymaps/default/config.h b/keyboards/underscore33/rev2/keymaps/default/config.h index 5708a439ac..82cbcc42cb 100644 --- a/keyboards/underscore33/rev2/keymaps/default/config.h +++ b/keyboards/underscore33/rev2/keymaps/default/config.h @@ -1,3 +1,18 @@ +/* Copyright 2020 tominabox1 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 /* Combos */ diff --git a/keyboards/underscore33/rev2/keymaps/default/keymap.c b/keyboards/underscore33/rev2/keymaps/default/keymap.c index 32a6f48639..ebacea4132 100644 --- a/keyboards/underscore33/rev2/keymaps/default/keymap.c +++ b/keyboards/underscore33/rev2/keymaps/default/keymap.c @@ -21,10 +21,6 @@ enum layers{ _NAV }; -enum custom_keycodes{ - RGBRST = SAFE_RANGE, -}; - #define KC_NUM_SPC LT(_NUM_SYM, KC_SPC) #define KC_NAV_ENT LT(_NAV, KC_ENT) #define KC_GA LGUI_T(KC_A) @@ -60,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_NAV] = LAYOUT_33_split_space( - RESET, RGBRST, AG_NORM, AG_SWAP, DEBUG, KC_GRV, KC_PGDN, KC_UP, KC_PGUP, KC_SCLN, + RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_GRV, KC_PGDN, KC_UP, KC_PGUP, KC_SCLN, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_NO, KC_MINS, KC_RO, KC_COMM, KC_DOT, KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS diff --git a/keyboards/underscore33/rev2/keymaps/default_big_space/config.h b/keyboards/underscore33/rev2/keymaps/default_big_space/config.h new file mode 100644 index 0000000000..82cbcc42cb --- /dev/null +++ b/keyboards/underscore33/rev2/keymaps/default_big_space/config.h @@ -0,0 +1,20 @@ +/* Copyright 2020 tominabox1 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 + +/* Combos */ +#define COMBO_COUNT 5 +#define COMBO_TERM 50 diff --git a/keyboards/underscore33/rev2/keymaps/default_big_space/keymap.c b/keyboards/underscore33/rev2/keymaps/default_big_space/keymap.c new file mode 100644 index 0000000000..09547fa06f --- /dev/null +++ b/keyboards/underscore33/rev2/keymaps/default_big_space/keymap.c @@ -0,0 +1,82 @@ +/* Copyright 2020 tominabox1 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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, + _NUM_SYM, + _NAV +}; + +#define KC_NUM_SPC LT(_NUM_SYM, KC_SPC) +#define KC_NAV_ENT LT(_NAV, KC_ENT) +#define KC_GA LGUI_T(KC_A) +#define KC_AS LALT_T(KC_S) +#define KC_CD LCTL_T(KC_D) +#define KC_SF LSFT_T(KC_F) +#define KC_SJ RSFT_T(KC_J) +#define KC_CK RCTL_T(KC_K) +#define KC_AL RALT_T(KC_L) +#define KC_GSCLN RGUI_T(KC_SCLN) + +enum combo_events { + COMBO_BSPC, + COMBO_NUMBAK, + COMBO_TAB, + COMBO_ESC, + COMBO_DEL, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_33_big_space( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_GA, KC_AS, KC_CD, KC_SF, KC_G, KC_H, KC_SJ, KC_CK, KC_AL, KC_GSCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LCTL, KC_NUM_SPC, KC_NAV_ENT + ), + + [_NUM_SYM] = LAYOUT_33_big_space( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS, + KC_BSLS, KC_LCBR, KC_LBRC, KC_LPRN, KC_UNDS, KC_RPRN, KC_RBRC, KC_RCBR, KC_DOT, KC_GRV, + KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_NAV] = LAYOUT_33_big_space( + RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_GRV, KC_PGDN, KC_UP, KC_PGUP, KC_SCLN, + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_NO, KC_MINS, KC_RO, KC_COMM, KC_DOT, KC_BSLS, + KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + + +#ifdef COMBO_ENABLE +const uint16_t PROGMEM combo_bspc[] = {KC_O, KC_P, COMBO_END}; +const uint16_t PROGMEM combo_numbak[] = {KC_0, KC_9, COMBO_END}; +const uint16_t PROGMEM combo_tab[] = {KC_Q, KC_W, COMBO_END}; +const uint16_t PROGMEM combo_esc[] = {KC_E, KC_W, COMBO_END}; +const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), + [COMBO_NUMBAK] = COMBO(combo_numbak,KC_BSPC), + [COMBO_TAB] = COMBO(combo_tab,KC_TAB), + [COMBO_ESC] = COMBO(combo_esc,KC_ESC), + [COMBO_DEL] = COMBO(combo_del,KC_DEL), + +}; +#endif diff --git a/keyboards/underscore33/rev2/keymaps/default_big_space/readme.md b/keyboards/underscore33/rev2/keymaps/default_big_space/readme.md new file mode 100644 index 0000000000..f11d18ece9 --- /dev/null +++ b/keyboards/underscore33/rev2/keymaps/default_big_space/readme.md @@ -0,0 +1,3 @@ +# Default _33 Rev2 Layout (with big spacebar) + +This is the recommended default layout. diff --git a/keyboards/underscore33/rev2/keymaps/default_big_space/rules.mk b/keyboards/underscore33/rev2/keymaps/default_big_space/rules.mk new file mode 100644 index 0000000000..ab1e438182 --- /dev/null +++ b/keyboards/underscore33/rev2/keymaps/default_big_space/rules.mk @@ -0,0 +1 @@ +COMBO_ENABLE = yes From ff7f70314eb2b005124b9f365a5a64ea6b5d32dd Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 7 Nov 2020 21:35:21 -0800 Subject: [PATCH 039/114] [Keyboard] Fix unused variables in mschwingen modelm (#10811) Specifically, the lgreen variable isn't used, and avr-gcc 8.x complains about this. To prevent it from being an issue, just set all of these led variables to be unused. --- keyboards/mschwingen/modelm/modelm.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/keyboards/mschwingen/modelm/modelm.c b/keyboards/mschwingen/modelm/modelm.c index 5756a95170..c1180612ad 100644 --- a/keyboards/mschwingen/modelm/modelm.c +++ b/keyboards/mschwingen/modelm/modelm.c @@ -47,19 +47,19 @@ static cRGB led[RGBLED_NUM] = {{255, 255, 255}, {255, 255, 255}, {255, 255, 255} static const cRGB black = {.r = 0, .g = 0, .b = 0}; -static const cRGB green = {.r = 0, .g = BRIGHT, .b = 0}; -static const cRGB lgreen = {.r = 0, .g = DIM, .b = 0}; +static const __attribute__((unused)) cRGB green = {.r = 0, .g = BRIGHT, .b = 0}; +static const __attribute__((unused)) cRGB lgreen = {.r = 0, .g = DIM, .b = 0}; -static const cRGB red = {.r = BRIGHT, .g = 0, .b = 0}; -static const cRGB lred = {.r = DIM, .g = 0, .b = 0}; +static const __attribute__((unused)) cRGB red = {.r = BRIGHT, .g = 0, .b = 0}; +static const __attribute__((unused)) cRGB lred = {.r = DIM, .g = 0, .b = 0}; -static const cRGB blue = {.r = 0, .g = 0, .b = BRIGHT}; -static const cRGB lblue = {.r = 0, .g = 0, .b = DIM}; +static const __attribute__((unused)) cRGB blue = {.r = 0, .g = 0, .b = BRIGHT}; +static const __attribute__((unused)) cRGB lblue = {.r = 0, .g = 0, .b = DIM}; -static const cRGB turq = {.r = 0, .g = BRIGHT, .b = BRIGHT}; -static const cRGB lturq = {.r = 0, .g = DIM, .b = DIM}; +static const __attribute__((unused)) cRGB turq = {.r = 0, .g = BRIGHT, .b = BRIGHT}; +static const __attribute__((unused)) cRGB lturq = {.r = 0, .g = DIM, .b = DIM}; -static const cRGB white = {.r = BRIGHT, .g = BRIGHT, .b = BRIGHT}; +static const __attribute__((unused)) cRGB white = {.r = BRIGHT, .g = BRIGHT, .b = BRIGHT}; static led_t led_state; static uint8_t layer; From 9cd3ffa5ba1187c0bc11b613078d89b503dcf419 Mon Sep 17 00:00:00 2001 From: kb-elmo Date: Sun, 8 Nov 2020 10:07:53 +0100 Subject: [PATCH 040/114] add missing physical layout options and VIA support for Sesame (#10471) * add missing physical layout options and VIA support for Sesame * Apply suggestions from code review * make split rshift standard again --- keyboards/kb_elmo/sesame/info.json | 207 ++++++++++++++++++ keyboards/kb_elmo/sesame/keymaps/via/keymap.c | 48 ++++ keyboards/kb_elmo/sesame/keymaps/via/rules.mk | 1 + keyboards/kb_elmo/sesame/sesame.h | 42 ++++ 4 files changed, 298 insertions(+) create mode 100644 keyboards/kb_elmo/sesame/keymaps/via/keymap.c create mode 100644 keyboards/kb_elmo/sesame/keymaps/via/rules.mk diff --git a/keyboards/kb_elmo/sesame/info.json b/keyboards/kb_elmo/sesame/info.json index b371b3d589..2dedbfb806 100644 --- a/keyboards/kb_elmo/sesame/info.json +++ b/keyboards/kb_elmo/sesame/info.json @@ -73,6 +73,213 @@ {"x":12.25, "y":4, "w":1.5}, {"x":16.75, "y":4, "w":1.5} ] + }, + "LAYOUT_all": { + "layout": [ + {"x":0, "y":0}, + {"x":1.25, "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":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.25, "y":1, "w":1.5}, + {"x":2.75, "y":1}, + {"x":3.75, "y":1}, + {"x":4.75, "y":1}, + {"x":5.75, "y":1}, + {"x":6.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}, + {"x":16.75, "y":1, "w":1.5}, + {"x":0, "y":2}, + {"x":1.25, "y":2, "w":1.75}, + {"x":3, "y":2}, + {"x":4, "y":2}, + {"x":5, "y":2}, + {"x":6, "y":2}, + {"x":7, "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":16, "y":2, "w":2.25}, + {"x":1.25, "y":3, "w":2.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":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}, + {"x":15.5, "y":3, "w":1.75}, + {"x":17.25, "y":3}, + {"x":1.25, "y":4, "w":1.5}, + {"x":4.25, "y":4, "w":1.5}, + {"x":5.75, "y":4, "w":2}, + {"x":7.75, "y":4, "w":1.25}, + {"x":9.5, "y":4, "w":2.75}, + {"x":12.25, "y":4, "w":1.5}, + {"x":16.75, "y":4, "w":1.5} + ] + }, + "LAYOUT_long_rshift": { + "layout": [ + {"x":0, "y":0}, + {"x":1.25, "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":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, "w":2}, + {"x":0, "y":1}, + {"x":1.25, "y":1, "w":1.5}, + {"x":2.75, "y":1}, + {"x":3.75, "y":1}, + {"x":4.75, "y":1}, + {"x":5.75, "y":1}, + {"x":6.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}, + {"x":16.75, "y":1, "w":1.5}, + {"x":0, "y":2}, + {"x":1.25, "y":2, "w":1.75}, + {"x":3, "y":2}, + {"x":4, "y":2}, + {"x":5, "y":2}, + {"x":6, "y":2}, + {"x":7, "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":16, "y":2, "w":2.25}, + {"x":1.25, "y":3, "w":2.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":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}, + {"x":15.5, "y":3, "w":2.75}, + {"x":1.25, "y":4, "w":1.5}, + {"x":4.25, "y":4, "w":1.5}, + {"x":5.75, "y":4, "w":2}, + {"x":7.75, "y":4, "w":1.25}, + {"x":9.5, "y":4, "w":2.75}, + {"x":12.25, "y":4, "w":1.5}, + {"x":16.75, "y":4, "w":1.5} + ] + }, + "LAYOUT_split_bs": { + "layout": [ + {"x":0, "y":0}, + {"x":1.25, "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":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.25, "y":1, "w":1.5}, + {"x":2.75, "y":1}, + {"x":3.75, "y":1}, + {"x":4.75, "y":1}, + {"x":5.75, "y":1}, + {"x":6.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}, + {"x":16.75, "y":1, "w":1.5}, + {"x":0, "y":2}, + {"x":1.25, "y":2, "w":1.75}, + {"x":3, "y":2}, + {"x":4, "y":2}, + {"x":5, "y":2}, + {"x":6, "y":2}, + {"x":7, "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":16, "y":2, "w":2.25}, + {"x":1.25, "y":3, "w":2.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":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}, + {"x":15.5, "y":3, "w":2.75}, + {"x":1.25, "y":4, "w":1.5}, + {"x":4.25, "y":4, "w":1.5}, + {"x":5.75, "y":4, "w":2}, + {"x":7.75, "y":4, "w":1.25}, + {"x":9.5, "y":4, "w":2.75}, + {"x":12.25, "y":4, "w":1.5}, + {"x":16.75, "y":4, "w":1.5} + ] } } } diff --git a/keyboards/kb_elmo/sesame/keymaps/via/keymap.c b/keyboards/kb_elmo/sesame/keymaps/via/keymap.c new file mode 100644 index 0000000000..e0dcde864f --- /dev/null +++ b/keyboards/kb_elmo/sesame/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2020 kb-elmo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 */ + [0] = LAYOUT_all( + KC_PAUS, 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_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_BSLS, + KC_F5, 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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_RCTL + ), + [1] = LAYOUT_all( + KC_TRNS, 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_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, 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_VOLD, KC_VOLU, KC_MUTE, KC_MPRV, KC_MNXT, KC_MPLY, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, 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_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, 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_VOLD, KC_VOLU, KC_MUTE, KC_MPRV, KC_MNXT, KC_MPLY, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + KC_TRNS, 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_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, 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_VOLD, KC_VOLU, KC_MUTE, KC_MPRV, KC_MNXT, KC_MPLY, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/kb_elmo/sesame/keymaps/via/rules.mk b/keyboards/kb_elmo/sesame/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/kb_elmo/sesame/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/kb_elmo/sesame/sesame.h b/keyboards/kb_elmo/sesame/sesame.h index 512bce6e2f..a51023be41 100644 --- a/keyboards/kb_elmo/sesame/sesame.h +++ b/keyboards/kb_elmo/sesame/sesame.h @@ -39,3 +39,45 @@ { KC_NO, k45, k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58 }, \ { KC_NO, k59, KC_NO, k60, KC_NO, k61, k62, KC_NO, k63, KC_NO, k64, KC_NO, KC_NO, k65, KC_NO } \ } + +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k43, 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, k40, k41, k42, k44, \ + k45, k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58, \ + k59, k60, k61, k62, k63, k64, k65 \ +) { \ + { 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, k40, k41, k42, k43, k44 }, \ + { KC_NO, k45, k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, k58 }, \ + { KC_NO, k59, KC_NO, k60, KC_NO, k61, k62, KC_NO, k63, KC_NO, k64, KC_NO, KC_NO, k65, KC_NO } \ +} + +#define LAYOUT_long_rshift( \ + 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, k40, k41, k42, k44, \ + k45, k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, \ + k59, k60, k61, k62, k63, k64, k65 \ +) { \ + { 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, k40, k41, k42, KC_NO, k44 }, \ + { KC_NO, k45, k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, KC_NO }, \ + { KC_NO, k59, KC_NO, k60, KC_NO, k61, k62, KC_NO, k63, KC_NO, k64, KC_NO, KC_NO, k65, KC_NO } \ +} + +#define LAYOUT_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k43, 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, k40, k41, k42, k44, \ + k45, k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, \ + k59, k60, k61, k62, k63, k64, k65 \ +) { \ + { 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, k40, k41, k42, k43, k44 }, \ + { KC_NO, k45, k46, k47, k48, k49, k50, k51, k52, k53, k54, k55, k56, k57, KC_NO }, \ + { KC_NO, k59, KC_NO, k60, KC_NO, k61, k62, KC_NO, k63, KC_NO, k64, KC_NO, KC_NO, k65, KC_NO } \ +} From 1ff5ee255fadcd6bfc4defb68ef097d67ebd40ad Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 8 Nov 2020 22:31:16 +0000 Subject: [PATCH 041/114] Indicator LEDs as config (#10816) * First pass * Add config options to docs * Update some wording * Slight tidy up of backlight caps logic * Init pin to correct state * Move init location * Reverse default state --- common_features.mk | 1 + docs/_summary.md | 1 + docs/custom_quantum_functions.md | 102 ----------------------- docs/feature_led_indicators.md | 116 ++++++++++++++++++++++++++ keyboards/cospad/config.h | 3 + keyboards/cospad/cospad.c | 16 ---- quantum/led.c | 137 +++++++++++++++++++++++++++++++ quantum/quantum.c | 56 +------------ tmk_core/common/led.h | 6 +- 9 files changed, 264 insertions(+), 174 deletions(-) create mode 100644 docs/feature_led_indicators.md create mode 100644 quantum/led.c diff --git a/common_features.mk b/common_features.mk index 5f232d5f0d..ba66c53248 100644 --- a/common_features.mk +++ b/common_features.mk @@ -17,6 +17,7 @@ SERIAL_PATH := $(QUANTUM_PATH)/serial_link QUANTUM_SRC += \ $(QUANTUM_DIR)/quantum.c \ + $(QUANTUM_DIR)/led.c \ $(QUANTUM_DIR)/keymap_common.c \ $(QUANTUM_DIR)/keycode_config.c diff --git a/docs/_summary.md b/docs/_summary.md index 2e874fb1cd..44030d812d 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -105,6 +105,7 @@ * [Encoders](feature_encoders.md) * [Haptic Feedback](feature_haptic_feedback.md) * [Joystick](feature_joystick.md) + * [LED Indicators](feature_led_indicators.md) * [Proton C Conversion](proton_c_conversion.md) * [PS/2 Mouse](feature_ps2_mouse.md) * [Split Keyboard](feature_split_keyboard.md) diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index bf3a60377c..a459042b32 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -88,108 +88,6 @@ keyrecord_t record { } ``` -# LED Control - -QMK provides methods to read 5 of the LEDs defined in the HID spec: - -* Num Lock -* Caps Lock -* Scroll Lock -* Compose -* Kana - -There are two ways to get the lock LED state: - -* by implementing `bool led_update_kb(led_t led_state)` or `_user(led_t led_state)`; or -* by calling `led_t host_keyboard_led_state()` - -!> `host_keyboard_led_state()` may already reflect a new value before `led_update_user()` is called. - -Two more deprecated functions exist that provide the LED state as a `uint8_t`: - -* `uint8_t led_set_kb(uint8_t usb_led)` and `_user(uint8_t usb_led)` -* `uint8_t host_keyboard_leds()` - -## `led_update_user()` - -This function will be called when the state of one of those 5 LEDs changes. It receives the LED state as a struct parameter. - -By convention, return `true` from `led_update_user()` to get the `led_update_kb()` hook to run its code, and -return `false` when you would prefer not to run the code in `led_update_kb()`. - -Some examples include: - - - overriding the LEDs to use them for something else like layer indication - - return `false` because you do not want the `_kb()` function to run, as it would override your layer behavior. - - play a sound when an LED turns on or off. - - return `true` because you want the `_kb` function to run, and this is in addition to the default LED behavior. - -?> Because the `led_set_*` functions return `void` instead of `bool`, they do not allow for overriding the keyboard LED control, and thus it's recommended to use `led_update_*` instead. - -### Example `led_update_kb()` Implementation - -```c -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - // writePin sets the pin high for 1 and low for 0. - // In this example the pins are inverted, setting - // it low/0 turns it on, and high/1 turns the LED off. - // This behavior depends on whether the LED is between the pin - // and VCC or the pin and GND. - writePin(B0, !led_state.num_lock); - writePin(B1, !led_state.caps_lock); - writePin(B2, !led_state.scroll_lock); - writePin(B3, !led_state.compose); - writePin(B4, !led_state.kana); - } - return res; -} -``` - -### Example `led_update_user()` Implementation - -This incomplete example would play a sound if Caps Lock is turned on or off. It returns `true`, because you also want the LEDs to maintain their state. - -```c -#ifdef AUDIO_ENABLE - float caps_on[][2] = SONG(CAPS_LOCK_ON_SOUND); - float caps_off[][2] = SONG(CAPS_LOCK_OFF_SOUND); -#endif - -bool led_update_user(led_t led_state) { - #ifdef AUDIO_ENABLE - static uint8_t caps_state = 0; - if (caps_state != led_state.caps_lock) { - led_state.caps_lock ? PLAY_SONG(caps_on) : PLAY_SONG(caps_off); - caps_state = led_state.caps_lock; - } - #endif - return true; -} -``` - -### `led_update_*` Function Documentation - -* Keyboard/Revision: `bool led_update_kb(led_t led_state)` -* Keymap: `bool led_update_user(led_t led_state)` - -## `host_keyboard_led_state()` - -Call this function to get the last received LED state as a `led_t`. This is useful for reading the LED state outside `led_update_*`, e.g. in [`matrix_scan_user()`](#matrix-scanning-code). - -## Setting Physical LED State - -Some keyboard implementations provide convenience methods for setting the state of the physical LEDs. - -### Ergodox Boards - -The Ergodox implementations provide `ergodox_right_led_1`/`2`/`3_on`/`off()` to turn individual LEDs on or off, as well as `ergodox_right_led_on`/`off(uint8_t led)` to turn them on or off by their index. - -In addition, it is possible to specify the brightness level of all LEDs with `ergodox_led_all_set(uint8_t n)`; of individual LEDs with `ergodox_right_led_1`/`2`/`3_set(uint8_t n)`; or by index with `ergodox_right_led_set(uint8_t led, uint8_t n)`. - -Ergodox boards also define `LED_BRIGHTNESS_LO` for the lowest brightness and `LED_BRIGHTNESS_HI` for the highest brightness (which is the default). - # Keyboard Initialization Code There are several steps in the keyboard initialization process. Depending on what you want to do, it will influence which function you should use. diff --git a/docs/feature_led_indicators.md b/docs/feature_led_indicators.md new file mode 100644 index 0000000000..10e095ab15 --- /dev/null +++ b/docs/feature_led_indicators.md @@ -0,0 +1,116 @@ +# LED Indicators + +QMK provides methods to read 5 of the LEDs defined in the HID spec: + +* Num Lock +* Caps Lock +* Scroll Lock +* Compose +* Kana + +There are three ways to get the lock LED state: +* by specifying configuration options within `config.h` +* by implementing `bool led_update_kb(led_t led_state)` or `_user(led_t led_state)`; or +* by calling `led_t host_keyboard_led_state()` + +!> `host_keyboard_led_state()` may already reflect a new value before `led_update_user()` is called. + +Two more deprecated functions exist that provide the LED state as a `uint8_t`: + +* `uint8_t led_set_kb(uint8_t usb_led)` and `_user(uint8_t usb_led)` +* `uint8_t host_keyboard_leds()` + +## Configuration Options + +To configure the indicators, `#define` these in your `config.h`: + +|Define |Default |Description | +|---------------------|-------------|-------------------------------------------| +|`LED_NUM_LOCK_PIN` |*Not defined*|The pin that controls the `Num Lock` LED | +|`LED_CAPS_LOCK_PIN` |*Not defined*|The pin that controls the `Caps Lock` LED | +|`LED_SCROLL_LOCK_PIN`|*Not defined*|The pin that controls the `Scroll Lock` LED| +|`LED_COMPOSE_PIN` |*Not defined*|The pin that controls the `Compose` LED | +|`LED_KANA_PIN` |*Not defined*|The pin that controls the `Kana` LED | +|`LED_PIN_ON_STATE` |`1` |The state of the indicator pins when the LED is "on" - `1` for high, `0` for low| + +Unless you are designing your own keyboard, you generally should not need to change the above config options. + +## `led_update_*()` + +When the configuration options do not provide enough flexibility, the API hooks provided allow custom control of the LED behavior. These functions will be called when the state of one of those 5 LEDs changes. It receives the LED state as a struct parameter. + +By convention, return `true` from `led_update_user()` to get the `led_update_kb()` hook to run its code, and +return `false` when you would prefer not to run the code in `led_update_kb()`. + +Some examples include: + + - overriding the LEDs to use them for something else like layer indication + - return `false` because you do not want the `_kb()` function to run, as it would override your layer behavior. + - play a sound when an LED turns on or off. + - return `true` because you want the `_kb` function to run, and this is in addition to the default LED behavior. + +?> Because the `led_set_*` functions return `void` instead of `bool`, they do not allow for overriding the keyboard LED control, and thus it's recommended to use `led_update_*` instead. + +### Example `led_update_kb()` Implementation + +```c +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + // writePin sets the pin high for 1 and low for 0. + // In this example the pins are inverted, setting + // it low/0 turns it on, and high/1 turns the LED off. + // This behavior depends on whether the LED is between the pin + // and VCC or the pin and GND. + writePin(B0, !led_state.num_lock); + writePin(B1, !led_state.caps_lock); + writePin(B2, !led_state.scroll_lock); + writePin(B3, !led_state.compose); + writePin(B4, !led_state.kana); + } + return res; +} +``` + +### Example `led_update_user()` Implementation + +This incomplete example would play a sound if Caps Lock is turned on or off. It returns `true`, because you also want the LEDs to maintain their state. + +```c +#ifdef AUDIO_ENABLE + float caps_on[][2] = SONG(CAPS_LOCK_ON_SOUND); + float caps_off[][2] = SONG(CAPS_LOCK_OFF_SOUND); +#endif + +bool led_update_user(led_t led_state) { + #ifdef AUDIO_ENABLE + static uint8_t caps_state = 0; + if (caps_state != led_state.caps_lock) { + led_state.caps_lock ? PLAY_SONG(caps_on) : PLAY_SONG(caps_off); + caps_state = led_state.caps_lock; + } + #endif + return true; +} +``` + +### `led_update_*` Function Documentation + +* Keyboard/Revision: `bool led_update_kb(led_t led_state)` +* Keymap: `bool led_update_user(led_t led_state)` + +## `host_keyboard_led_state()` + +Call this function to get the last received LED state as a `led_t`. This is useful for reading the LED state outside `led_update_*`, e.g. in [`matrix_scan_user()`](#matrix-scanning-code). + +## Setting Physical LED State + +Some keyboard implementations provide convenience methods for setting the state of the physical LEDs. + +### Ergodox Boards + +The Ergodox implementations provide `ergodox_right_led_1`/`2`/`3_on`/`off()` to turn individual LEDs on or off, as well as `ergodox_right_led_on`/`off(uint8_t led)` to turn them on or off by their index. + +In addition, it is possible to specify the brightness level of all LEDs with `ergodox_led_all_set(uint8_t n)`; of individual LEDs with `ergodox_right_led_1`/`2`/`3_set(uint8_t n)`; or by index with `ergodox_right_led_set(uint8_t led, uint8_t n)`. + +Ergodox boards also define `LED_BRIGHTNESS_LO` for the lowest brightness and `LED_BRIGHTNESS_HI` for the highest brightness (which is the default). diff --git a/keyboards/cospad/config.h b/keyboards/cospad/config.h index 8d2994b7bd..648fa29a6f 100644 --- a/keyboards/cospad/config.h +++ b/keyboards/cospad/config.h @@ -53,6 +53,9 @@ along with this program. If not, see . */ #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +#define LED_NUM_LOCK_PIN B2 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN F7 // #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/cospad/cospad.c b/keyboards/cospad/cospad.c index c1f3a70479..e7772f2908 100644 --- a/keyboards/cospad/cospad.c +++ b/keyboards/cospad/cospad.c @@ -14,19 +14,3 @@ * along with this program. If not, see . */ #include "cospad.h" - -void keyboard_pre_init_kb(void) { - led_init_ports(); - keyboard_pre_init_user(); -} - -void led_init_ports(void) { - setPinOutput(B2); -} - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - writePin(B2, !led_state.num_lock); - } - return true; -} diff --git a/quantum/led.c b/quantum/led.c new file mode 100644 index 0000000000..3e30b1a5ad --- /dev/null +++ b/quantum/led.c @@ -0,0 +1,137 @@ +/* Copyright 2020 zvecr + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "quantum.h" + +#ifdef BACKLIGHT_ENABLE +# include "backlight.h" +extern backlight_config_t backlight_config; +#else +// Cannot use BACKLIGHT_CAPS_LOCK without backlight being enabled +# undef BACKLIGHT_CAPS_LOCK +#endif + +#ifndef LED_PIN_ON_STATE +# define LED_PIN_ON_STATE 1 +#endif + +#if defined(BACKLIGHT_CAPS_LOCK) +/** \brief Caps Lock indicator using backlight (for keyboards without dedicated LED) + */ +static void handle_backlight_caps_lock(led_t led_state) { + // Use backlight as Caps Lock indicator + uint8_t bl_toggle_lvl = 0; + + if (led_state.caps_lock && !backlight_config.enable) { + // Turning Caps Lock ON and backlight is disabled in config + // Toggling backlight to the brightest level + bl_toggle_lvl = BACKLIGHT_LEVELS; + } else if (!led_state.caps_lock && backlight_config.enable) { + // Turning Caps Lock OFF and backlight is enabled in config + // Toggling backlight and restoring config level + bl_toggle_lvl = backlight_config.level; + } + + // Set level without modify backlight_config to keep ability to restore state + backlight_set(bl_toggle_lvl); +} +#endif + +/** \brief Lock LED set callback - keymap/user level + * + * \deprecated Use led_update_user() instead. + */ +__attribute__((weak)) void led_set_user(uint8_t usb_led) {} + +/** \brief Lock LED set callback - keyboard level + * + * \deprecated Use led_update_kb() instead. + */ +__attribute__((weak)) void led_set_kb(uint8_t usb_led) { led_set_user(usb_led); } + +/** \brief Lock LED update callback - keymap/user level + * + * \return True if led_update_kb() should run its own code, false otherwise. + */ +__attribute__((weak)) bool led_update_user(led_t led_state) { return true; } + +/** \brief Lock LED update callback - keyboard level + * + * \return Ignored for now. + */ +__attribute__((weak)) bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if (res) { +#if defined(LED_NUM_LOCK_PIN) || defined(LED_CAPS_LOCK_PIN) || defined(LED_SCROLL_LOCK_PIN) || defined(LED_COMPOSE_PIN) || defined(LED_KANA_PIN) +# if LED_PIN_ON_STATE == 0 + // invert the whole thing to avoid having to conditionally !led_state.x later + led_state.raw = ~led_state.raw; +# endif + +# ifdef LED_NUM_LOCK_PIN + writePin(LED_NUM_LOCK_PIN, led_state.num_lock); +# endif +# ifdef LED_CAPS_LOCK_PIN + writePin(LED_CAPS_LOCK_PIN, led_state.caps_lock); +# endif +# ifdef LED_SCROLL_LOCK_PIN + writePin(LED_SCROLL_LOCK_PIN, led_state.scroll_lock); +# endif +# ifdef LED_COMPOSE_PIN + writePin(LED_COMPOSE_PIN, led_state.compose); +# endif +# ifdef LED_KANA_PIN + writePin(LED_KANA_PIN, led_state.kana); +# endif +#endif + } + return res; +} + +/** \brief Initialise any LED related hardware and/or state + */ +__attribute__((weak)) void led_init_ports(void) { +#ifdef LED_NUM_LOCK_PIN + setPinOutput(LED_NUM_LOCK_PIN); + writePin(LED_NUM_LOCK_PIN, !LED_PIN_ON_STATE); +#endif +#ifdef LED_CAPS_LOCK_PIN + setPinOutput(LED_CAPS_LOCK_PIN); + writePin(LED_CAPS_LOCK_PIN, !LED_PIN_ON_STATE); +#endif +#ifdef LED_SCROLL_LOCK_PIN + setPinOutput(LED_SCROLL_LOCK_PIN); + writePin(LED_SCROLL_LOCK_PIN, !LED_PIN_ON_STATE); +#endif +#ifdef LED_COMPOSE_PIN + setPinOutput(LED_COMPOSE_PIN); + writePin(LED_COMPOSE_PIN, !LED_PIN_ON_STATE); +#endif +#ifdef LED_KANA_PIN + setPinOutput(LED_KANA_PIN); + writePin(LED_KANA_PIN, !LED_PIN_ON_STATE); +#endif +} + +/** \brief Entrypoint for protocol to LED binding + */ +__attribute__((weak)) void led_set(uint8_t usb_led) { +#ifdef BACKLIGHT_CAPS_LOCK + handle_backlight_caps_lock((led_t)usb_led); +#endif + + led_set_kb(usb_led); + led_update_kb((led_t)usb_led); +} \ No newline at end of file diff --git a/quantum/quantum.c b/quantum/quantum.c index dab6c9172f..0b2f98762d 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -23,7 +23,6 @@ #ifdef BACKLIGHT_ENABLE # include "backlight.h" -extern backlight_config_t backlight_config; #endif #ifdef FAUXCLICKY_ENABLE @@ -602,6 +601,10 @@ void matrix_init_quantum() { if (!eeconfig_is_enabled()) { eeconfig_init(); } +#if defined(LED_NUM_LOCK_PIN) || defined(LED_CAPS_LOCK_PIN) || defined(LED_SCROLL_LOCK_PIN) || defined(LED_COMPOSE_PIN) || defined(LED_KANA_PIN) + // TODO: remove calls to led_init_ports from keyboards and remove ifdef + led_init_ports(); +#endif #ifdef BACKLIGHT_ENABLE # ifdef LED_MATRIX_ENABLE led_matrix_init(); @@ -725,55 +728,6 @@ void api_send_unicode(uint32_t unicode) { #endif } -/** \brief Lock LED set callback - keymap/user level - * - * \deprecated Use led_update_user() instead. - */ -__attribute__((weak)) void led_set_user(uint8_t usb_led) {} - -/** \brief Lock LED set callback - keyboard level - * - * \deprecated Use led_update_kb() instead. - */ -__attribute__((weak)) void led_set_kb(uint8_t usb_led) { led_set_user(usb_led); } - -/** \brief Lock LED update callback - keymap/user level - * - * \return True if led_update_kb() should run its own code, false otherwise. - */ -__attribute__((weak)) bool led_update_user(led_t led_state) { return true; } - -/** \brief Lock LED update callback - keyboard level - * - * \return Ignored for now. - */ -__attribute__((weak)) bool led_update_kb(led_t led_state) { return led_update_user(led_state); } - -__attribute__((weak)) void led_init_ports(void) {} - -__attribute__((weak)) void led_set(uint8_t usb_led) { -#if defined(BACKLIGHT_CAPS_LOCK) && defined(BACKLIGHT_ENABLE) - // Use backlight as Caps Lock indicator - uint8_t bl_toggle_lvl = 0; - - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK) && !backlight_config.enable) { - // Turning Caps Lock ON and backlight is disabled in config - // Toggling backlight to the brightest level - bl_toggle_lvl = BACKLIGHT_LEVELS; - } else if (IS_LED_OFF(usb_led, USB_LED_CAPS_LOCK) && backlight_config.enable) { - // Turning Caps Lock OFF and backlight is enabled in config - // Toggling backlight and restoring config level - bl_toggle_lvl = backlight_config.level; - } - - // Set level without modify backlight_config to keep ability to restore state - backlight_set(bl_toggle_lvl); -#endif - - led_set_kb(usb_led); - led_update_kb((led_t)usb_led); -} - //------------------------------------------------------------------------------ // Override these functions in your keymap file to play different tunes on // different events such as startup and bootloader jump @@ -781,5 +735,3 @@ __attribute__((weak)) void led_set(uint8_t usb_led) { __attribute__((weak)) void startup_user() {} __attribute__((weak)) void shutdown_user() {} - -//------------------------------------------------------------------------------ diff --git a/tmk_core/common/led.h b/tmk_core/common/led.h index 990282862b..81c664d606 100644 --- a/tmk_core/common/led.h +++ b/tmk_core/common/led.h @@ -15,8 +15,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef LED_H -#define LED_H +#pragma once + #include "stdint.h" #include "stdbool.h" @@ -52,5 +52,3 @@ void led_init_ports(void); #ifdef __cplusplus } #endif - -#endif From 95bbd799a4f86dac37fdf2354e008d2fed7f6660 Mon Sep 17 00:00:00 2001 From: yiancar Date: Mon, 9 Nov 2020 18:39:25 +0000 Subject: [PATCH 042/114] [Keyboard] Keebwerk MEGA Initial commit (#10777) * Initial commit - Add Keebwerk Mega pcb - Update wilba rgb code * Update keyboards/keebwerk/mega/ansi/keymaps/default/keymap.c Co-authored-by: Ryan * Update keyboards/keebwerk/mega/ansi/keymaps/via/readme.md Co-authored-by: Ryan * Update keyboards/keebwerk/mega/ansi/rules.mk Co-authored-by: Ryan * Update keyboards/keebwerk/mega/ansi/keymaps/via/keymap.c Co-authored-by: Ryan * Update keyboards/keebwerk/mega/ansi/keymaps/default/readme.md Co-authored-by: Ryan * Update keyboards/keebwerk/mega/ansi/ansi.c Co-authored-by: Ryan * Update keyboards/keebwerk/mega/ansi/ansi.c Co-authored-by: Ryan * Update keyboards/keebwerk/mega/ansi/ansi.c Co-authored-by: Ryan * Update keyboards/keebwerk/mega/ansi/ansi.c Co-authored-by: Ryan Co-authored-by: Ryan --- keyboards/keebwerk/mega/ansi/ansi.c | 59 ++ keyboards/keebwerk/mega/ansi/ansi.h | 38 + keyboards/keebwerk/mega/ansi/config.h | 145 ++++ keyboards/keebwerk/mega/ansi/info.json | 12 + .../mega/ansi/keymaps/default/keymap.c | 32 + .../mega/ansi/keymaps/default/readme.md | 7 + .../keebwerk/mega/ansi/keymaps/via/keymap.c | 46 ++ .../keebwerk/mega/ansi/keymaps/via/readme.md | 7 + .../keebwerk/mega/ansi/keymaps/via/rules.mk | 1 + keyboards/keebwerk/mega/ansi/rules.mk | 36 + keyboards/keebwerk/mega/chconf.h | 714 ++++++++++++++++++ keyboards/keebwerk/mega/halconf.h | 525 +++++++++++++ keyboards/keebwerk/mega/keebwork_mega.c | 19 + keyboards/keebwerk/mega/mcuconf.h | 273 +++++++ keyboards/keebwerk/mega/readme.md | 32 + keyboards/wilba_tech/wt_rgb_backlight.c | 46 +- 16 files changed, 1977 insertions(+), 15 deletions(-) create mode 100755 keyboards/keebwerk/mega/ansi/ansi.c create mode 100755 keyboards/keebwerk/mega/ansi/ansi.h create mode 100755 keyboards/keebwerk/mega/ansi/config.h create mode 100755 keyboards/keebwerk/mega/ansi/info.json create mode 100755 keyboards/keebwerk/mega/ansi/keymaps/default/keymap.c create mode 100755 keyboards/keebwerk/mega/ansi/keymaps/default/readme.md create mode 100755 keyboards/keebwerk/mega/ansi/keymaps/via/keymap.c create mode 100755 keyboards/keebwerk/mega/ansi/keymaps/via/readme.md create mode 100755 keyboards/keebwerk/mega/ansi/keymaps/via/rules.mk create mode 100755 keyboards/keebwerk/mega/ansi/rules.mk create mode 100644 keyboards/keebwerk/mega/chconf.h create mode 100644 keyboards/keebwerk/mega/halconf.h create mode 100644 keyboards/keebwerk/mega/keebwork_mega.c create mode 100644 keyboards/keebwerk/mega/mcuconf.h create mode 100755 keyboards/keebwerk/mega/readme.md diff --git a/keyboards/keebwerk/mega/ansi/ansi.c b/keyboards/keebwerk/mega/ansi/ansi.c new file mode 100755 index 0000000000..b5eb0bbad2 --- /dev/null +++ b/keyboards/keebwerk/mega/ansi/ansi.c @@ -0,0 +1,59 @@ +/* Copyright 2020 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_KW_MEGA +#error RGB_BACKLIGHT_KW_MEGA not defined, recheck config.h +#endif + +#include "ansi.h" +#include "drivers/issi/is31fl3733.h" + +uint8_t R = 0; +uint8_t G = 0; +uint8_t B = 0; + +/* Indicator LEDs are part of the LED driver + * Here the LEDs are used to indicate layers 1, 2 and 3. + * Below there is a commented out example of how to use the indicators for capslock. + */ +// bool led_update_kb(led_t led_state) { +// bool res = led_update_user(led_state); +// if(res) { +// if (led_state.caps_lock) { +// G = 255; +// } else { +// G = 0; +// } +// IS31FL3733_set_color( 6+64-1, R, G, B ); +// } +// return res; +// } + +__attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { + R = 0; + G = 0; + B = 0; + if (IS_LAYER_ON_STATE(layer_state, 1)) { + G = 255; + } + if (IS_LAYER_ON_STATE(layer_state, 2)) { + R = 255; + } + if (IS_LAYER_ON_STATE(layer_state, 3)) { + B = 255; + } + IS31FL3733_set_color( 6+64-1, R, G, B ); + return state; +} diff --git a/keyboards/keebwerk/mega/ansi/ansi.h b/keyboards/keebwerk/mega/ansi/ansi.h new file mode 100755 index 0000000000..daba362731 --- /dev/null +++ b/keyboards/keebwerk/mega/ansi/ansi.h @@ -0,0 +1,38 @@ +/* Copyright 2020 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 "../wilba_tech/wt_rgb_backlight_keycodes.h" +#include "via.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/keebwerk/mega/ansi/config.h b/keyboards/keebwerk/mega/ansi/config.h new file mode 100755 index 0000000000..9f9a225ef1 --- /dev/null +++ b/keyboards/keebwerk/mega/ansi/config.h @@ -0,0 +1,145 @@ +/* +Copyright 2020 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 0x4B41 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Yiancar-Designs +#define PRODUCT Keebwerk Mega ANSI + +/* 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 DEBOUNCE 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. + * + */ + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 + +/* Backlight options */ + +#define RGB_BACKLIGHT_ENABLED 1 + +#define RGB_BACKLIGHT_KW_MEGA + +// 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 6 + +// 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 } + +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 32 + +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE diff --git a/keyboards/keebwerk/mega/ansi/info.json b/keyboards/keebwerk/mega/ansi/info.json new file mode 100755 index 0000000000..a9bbf797ab --- /dev/null +++ b/keyboards/keebwerk/mega/ansi/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Keebwerk Mega", + "url": "", + "maintainer": "Yiancar", + "width": 16, + "height": 5, + "layouts": { + "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}] + } + } +} \ No newline at end of file diff --git a/keyboards/keebwerk/mega/ansi/keymaps/default/keymap.c b/keyboards/keebwerk/mega/ansi/keymaps/default/keymap.c new file mode 100755 index 0000000000..1d95e13c40 --- /dev/null +++ b/keyboards/keebwerk/mega/ansi/keymaps/default/keymap.c @@ -0,0 +1,32 @@ +/* Copyright 2020 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), +}; diff --git a/keyboards/keebwerk/mega/ansi/keymaps/default/readme.md b/keyboards/keebwerk/mega/ansi/keymaps/default/readme.md new file mode 100755 index 0000000000..ec43a9e10f --- /dev/null +++ b/keyboards/keebwerk/mega/ansi/keymaps/default/readme.md @@ -0,0 +1,7 @@ +# The default keymap for ANSI Keebwerk Mega. VIA support disabled. + +![Layer 0](https://i.imgur.com/RcuLofrl.png) + +![Layer 1](https://i.imgur.com/NJOORcdl.png) + +Default layer is normal ANSI 65% diff --git a/keyboards/keebwerk/mega/ansi/keymaps/via/keymap.c b/keyboards/keebwerk/mega/ansi/keymaps/via/keymap.c new file mode 100755 index 0000000000..59ccdf685d --- /dev/null +++ b/keyboards/keebwerk/mega/ansi/keymaps/via/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2020 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), +}; diff --git a/keyboards/keebwerk/mega/ansi/keymaps/via/readme.md b/keyboards/keebwerk/mega/ansi/keymaps/via/readme.md new file mode 100755 index 0000000000..e78684fa3d --- /dev/null +++ b/keyboards/keebwerk/mega/ansi/keymaps/via/readme.md @@ -0,0 +1,7 @@ +# The default keymap for ANSI Keebwerk Mega. VIA support enabled. + +![Layer 0](https://i.imgur.com/RcuLofrl.png) + +![Layer 1](https://i.imgur.com/NJOORcdl.png) + +Default layer is normal ANSI 65% diff --git a/keyboards/keebwerk/mega/ansi/keymaps/via/rules.mk b/keyboards/keebwerk/mega/ansi/keymaps/via/rules.mk new file mode 100755 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/keebwerk/mega/ansi/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/keebwerk/mega/ansi/rules.mk b/keyboards/keebwerk/mega/ansi/rules.mk new file mode 100755 index 0000000000..5e664cb814 --- /dev/null +++ b/keyboards/keebwerk/mega/ansi/rules.mk @@ -0,0 +1,36 @@ +# MCU name +MCU = STM32F303 + +# 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 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in + +CIE1931_CURVE = yes + +LAYOUTS = 65_ansi + +# project specific files +SRC += keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ + drivers/issi/is31fl3733.c \ + quantum/color.c +QUANTUM_LIB_SRC += drivers/chibios/i2c_master.c diff --git a/keyboards/keebwerk/mega/chconf.h b/keyboards/keebwerk/mega/chconf.h new file mode 100644 index 0000000000..aac3303705 --- /dev/null +++ b/keyboards/keebwerk/mega/chconf.h @@ -0,0 +1,714 @@ +/* + ChibiOS - Copyright (C) 2006..2018 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 rt/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_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_ST_RESOLUTION) +#define CH_CFG_ST_RESOLUTION 32 +#endif + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#if !defined(CH_CFG_ST_FREQUENCY) +#define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM TRUE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MUTEXES) +#define CH_CFG_USE_MUTEXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_EVENTS) +#define CH_CFG_USE_EVENTS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMPOOLS) +#define CH_CFG_USE_MEMPOOLS TRUE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_DYNAMIC) +#define CH_CFG_USE_DYNAMIC TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY TRUE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_MASK) +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) +#define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @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 _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/keebwerk/mega/halconf.h b/keyboards/keebwerk/mega/halconf.h new file mode 100644 index 0000000000..9306b2cfd8 --- /dev/null +++ b/keyboards/keebwerk/mega/halconf.h @@ -0,0 +1,525 @@ +/* + ChibiOS - Copyright (C) 2006..2018 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 + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC TRUE +#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 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 SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG 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 + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT 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 + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION 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 the zero-copy API. + */ +#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 + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#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 circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR 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 TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#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 + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/keyboards/keebwerk/mega/keebwork_mega.c b/keyboards/keebwerk/mega/keebwork_mega.c new file mode 100644 index 0000000000..dc800b6344 --- /dev/null +++ b/keyboards/keebwerk/mega/keebwork_mega.c @@ -0,0 +1,19 @@ +/* Copyright 2020 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_KW_MEGA +#error RGB_BACKLIGHT_KW_MEGA not defined, recheck config.h +#endif diff --git a/keyboards/keebwerk/mega/mcuconf.h b/keyboards/keebwerk/mega/mcuconf.h new file mode 100644 index 0000000000..ed227b7967 --- /dev/null +++ b/keyboards/keebwerk/mega/mcuconf.h @@ -0,0 +1,273 @@ +/* + ChibiOS - Copyright (C) 2006..2018 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 +#define STM32F303_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 + +/* + * IRQ system settings. + */ +#define STM32_IRQ_EXTI0_PRIORITY 6 +#define STM32_IRQ_EXTI1_PRIORITY 6 +#define STM32_IRQ_EXTI2_PRIORITY 6 +#define STM32_IRQ_EXTI3_PRIORITY 6 +#define STM32_IRQ_EXTI4_PRIORITY 6 +#define STM32_IRQ_EXTI5_9_PRIORITY 6 +#define STM32_IRQ_EXTI10_15_PRIORITY 6 +#define STM32_IRQ_EXTI16_PRIORITY 6 +#define STM32_IRQ_EXTI17_PRIORITY 15 +#define STM32_IRQ_EXTI18_PRIORITY 6 +#define STM32_IRQ_EXTI19_PRIORITY 15 +#define STM32_IRQ_EXTI20_PRIORITY 15 +#define STM32_IRQ_EXTI21_22_29_PRIORITY 6 +#define STM32_IRQ_EXTI30_32_PRIORITY 6 +#define STM32_IRQ_EXTI33_PRIORITY 6 +#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7 +#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7 +#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7 +#define STM32_IRQ_TIM1_CC_PRIORITY 7 + +/* + * 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 + +/* + * 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_USE_TIM15 FALSE +#define STM32_GPT_USE_TIM16 FALSE +#define STM32_GPT_USE_TIM17 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_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_USE_TIM15 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_USE_TIM15 FALSE +#define STM32_PWM_USE_TIM16 FALSE +#define STM32_PWM_USE_TIM17 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 + +/* + * RTC driver system settings. + */ +#define STM32_RTC_PRESA_VALUE 32 +#define STM32_RTC_PRESS_VALUE 1024 +#define STM32_RTC_CR_INIT 0 +#define STM32_RTC_TAMPCR_INIT 0 + +/* + * 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/keebwerk/mega/readme.md b/keyboards/keebwerk/mega/readme.md new file mode 100755 index 0000000000..6f1798299b --- /dev/null +++ b/keyboards/keebwerk/mega/readme.md @@ -0,0 +1,32 @@ +# Keebwerk Mega + +This is a standard fixed layout 65% PCB in ANSI and soon in ISO. 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://candykeys.com/ + +## Instructions + +### Build + +Make example for this keyboard (after setting up your build environment): + + make keebwerk/mega/ansi: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 keebwerk/mega/ansi::flash`) diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c index cd3fdd200f..0a75dd4a60 100644 --- a/keyboards/wilba_tech/wt_rgb_backlight.c +++ b/keyboards/wilba_tech/wt_rgb_backlight.c @@ -25,6 +25,7 @@ defined(RGB_BACKLIGHT_HS60) || \ defined(RGB_BACKLIGHT_NK65) || \ defined(RGB_BACKLIGHT_NK87) || \ + defined(RGB_BACKLIGHT_KW_MEGA) || \ defined(RGB_BACKLIGHT_NEBULA12) || \ defined(RGB_BACKLIGHT_NEBULA68) || \ defined(RGB_BACKLIGHT_U80_A) || \ @@ -50,7 +51,7 @@ #include "wt_rgb_backlight_api.h" #include "wt_rgb_backlight_keycodes.h" -#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NK87) && !defined(RGB_BACKLIGHT_NEBULA68) && !defined(RGB_BACKLIGHT_NEBULA12) +#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NK87) && !defined(RGB_BACKLIGHT_NEBULA68) && !defined(RGB_BACKLIGHT_NEBULA12) && !defined (RGB_BACKLIGHT_KW_MEGA) #include #include "drivers/avr/i2c_master.h" #else @@ -81,7 +82,7 @@ LED_TYPE g_ws2812_leds[WS2812_LED_TOTAL]; #elif defined(RGB_BACKLIGHT_HS60) #include "drivers/issi/is31fl3733.h" #define BACKLIGHT_LED_COUNT 64 -#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_KW_MEGA) #include "drivers/issi/is31fl3733.h" #define BACKLIGHT_LED_COUNT 69 #elif defined(RGB_BACKLIGHT_NK87) @@ -227,7 +228,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, K_16, J_16, L_16}, //LA64 }; -#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_NK87) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_NK87) || defined(RGB_BACKLIGHT_KW_MEGA) // 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) @@ -1001,7 +1002,7 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { {255,255},// LA61 does not exit, dummy {209,255}, {215,255}, {220,255} }; -#elif defined(RGB_BACKLIGHT_NK65) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_KW_MEGA) 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}, @@ -1197,7 +1198,8 @@ void map_led_to_point( uint8_t index, Point *point ) point->x = pgm_read_byte(addr); point->y = pgm_read_byte(addr+1); -#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_M10_C) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NK87) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_NEBULA12) +#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_M10_C) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || \ + defined(RGB_BACKLIGHT_NK87) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_NEBULA12) || defined(RGB_BACKLIGHT_KW_MEGA) return; #endif @@ -1400,7 +1402,7 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { { 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_NK65) || defined(RGB_BACKLIGHT_NEBULA68) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_KW_MEGA) // // 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, @@ -1504,7 +1506,7 @@ void backlight_update_pwm_buffers(void) #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) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_NK87) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_NK87) || defined(RGB_BACKLIGHT_KW_MEGA) 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 ); @@ -1542,7 +1544,7 @@ 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) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) +#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_KW_MEGA) IS31FL3733_set_color( index, red, green, blue ); #elif defined(RGB_BACKLIGHT_NK87) // This is done to avoid indicator LEDs being set @@ -1567,7 +1569,7 @@ 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) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) +#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_KW_MEGA) // This is done to avoid indicator LEDs being set for (int i = 0; i < BACKLIGHT_LED_COUNT; i++) { IS31FL3733_set_color(i, red, green, blue); @@ -1601,7 +1603,7 @@ void backlight_set_key_hit(uint8_t row, uint8_t column) g_any_key_hit = 0; } -#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA68) && !defined(RGB_BACKLIGHT_NEBULA12) && !defined(RGB_BACKLIGHT_NK87) +#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA68) && !defined(RGB_BACKLIGHT_NEBULA12) && !defined(RGB_BACKLIGHT_NK87) && !defined(RGB_BACKLIGHT_KW_MEGA) // This is (F_CPU/1024) / 20 Hz // = 15625 Hz / 20 Hz // = 781 @@ -1681,7 +1683,7 @@ void backlight_timer_disable(void) { gptStopTimer(&GPTD4); } -#endif //!defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA68) && !defined(RGB_BACKLIGHT_NEBULA12) && !defined(RGB_BACKLIGHT_NK87) +#endif //!defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA68) && !defined(RGB_BACKLIGHT_NEBULA12) && !defined(RGB_BACKLIGHT_NK87) && !defined(RGB_BACKLIGHT_KW_MEGA) void backlight_set_suspend_state(bool state) { @@ -1927,7 +1929,7 @@ void backlight_effect_cycle_all(void) for ( int i=0; i 6+64-1 ) ); //LB7-LB64 + // 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 ); + IS31FL3733_update_led_control_registers( ISSI_ADDR_2, 1 ); #else // Init the #1 driver IS31FL3731_init( ISSI_ADDR_1 ); From cb80b59e9343c014389d56317e93f4de71d07a9a Mon Sep 17 00:00:00 2001 From: SeungheonOh Date: Mon, 9 Nov 2020 13:11:04 -0600 Subject: [PATCH 043/114] Adding few Korean translated files (#5895) * Korean Translation Korean Translation * Korean translation * more Korean translations --- docs/ko-kr/README.md | 33 +++++ docs/ko-kr/getting_started_build_tools.md | 156 +++++++++++++++++++++ docs/ko-kr/getting_started_getting_help.md | 17 +++ docs/ko-kr/getting_started_github.md | 67 +++++++++ 4 files changed, 273 insertions(+) create mode 100644 docs/ko-kr/README.md create mode 100644 docs/ko-kr/getting_started_build_tools.md create mode 100644 docs/ko-kr/getting_started_getting_help.md create mode 100644 docs/ko-kr/getting_started_github.md diff --git a/docs/ko-kr/README.md b/docs/ko-kr/README.md new file mode 100644 index 0000000000..881b4b5ace --- /dev/null +++ b/docs/ko-kr/README.md @@ -0,0 +1,33 @@ +# Quantum Mechanical Keyboard Firmware + +[![Current Version](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags) +[![Build Status](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware) +[![Discord](https://img.shields.io/discord/440868230475677696.svg)](https://discord.gg/Uq7gcHh) +[![Docs Status](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm) +[![GitHub contributors](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly) +[![GitHub forks](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/) + +## QMK Firmware 란? + +QMK(*Quantum Mechanical Keyboard 양자 기계식 키보드*)란 QMK 컴워어, QMK 툴박스, qmk.fm 를 관리하고 있는 오픈소스 커뮤니티 입니다. QMK펌웨어는 [tmk\_keyboard](http://github.com/tmk/tmk_keyboard)를 바탕으로 만들어진 키보드펌웨어이며, Atmel AVR컨트롤러와 [OLKB 제품군](http://olkb.com) [ErgoDox EZ](http://www.ergodox-ez.com), 그리고 [Clueboard 제품군](http://clueboard.co/) 이용할때 매우 편리합니다. 또한 QMK는 ChibiOS를 사용하여 ARM기반의 컨트롤러로도 사용할수 있습니다. 마지막으로 QMK는 커스텀회로와 핸드와이어드 키보드을 작동시키는데에도 사용가능합니다. + + +## 설치하기 + +만약 당신이 QMK에 키보드, 키맵, 또는 새로운 기능을 추가하고싶다면, 가장쉬운 방법은 Github를 통해 [저장소(REPO)를 추가하고]((https://github.com/qmk/qmk_firmware#fork-destination-box)) 로컬에서 변화 또는 수정하고, [PULL REQUEST](https://github.com/qmk/qmk_firmware/pulls)을 통해 업로드 할수 있습니다. + +또다른 방법으로는, 직접 파일들 로컬로 다운로드 하거나([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), git (`git@github.com:qmk/qmk_firmware.git`), https (`https://github.com/qmk/qmk_firmware.git`)을 통해 클론을 만들수 있습니다. + +## 컴파일 + +먼저 컴파일을 하기전 AVR 이나 ARM [개발환경](getting_started_build_tools.md)을 구축해야 합니다. 모든준비가 끝났다면 `make`를 다음과 같이 키보드와 키맵을 선택하여 컴파일 할 수 있습니다. + + make planck/rev4:default + +이 커맨드는 `rev4`버전의 `planck`를 `default`키맵으로 컴파일 할것입니다. 다만 모든 키보드는 파일, 수정본 또는 세부프로젝트를 가지고있지 않음으로 수정본 부분을 생략될수 있습니다. + + make preonic:default + +## 커스터마이징 + +QMK는 사용할 수 있는 매우 다양한 [기능](features.md)과 체계화된 [참고자료](http://docs.qmk.fm)들이 있습니다. 그중 대부분은 [키맵](keymap.md)을 수정하거나 [키코드](keycodes.md)를 변경하는데에 특화되어 있습니다. diff --git a/docs/ko-kr/getting_started_build_tools.md b/docs/ko-kr/getting_started_build_tools.md new file mode 100644 index 0000000000..3aae69d25d --- /dev/null +++ b/docs/ko-kr/getting_started_build_tools.md @@ -0,0 +1,156 @@ +# 컴파일 도구 설치 + +이 페이지는 QMK 컴파일 환경을 설치하는 방법을 설명합니다. 이 페이지는 AVR 프로세서들(예를 들면 atmega32u4와 비슷한)을 위한 가이드를 제공합니다 + + + + +**노트:** 만약 당신이 처음 시작한다면 [입문자를 위한 가이드](newbs.md)페이지를 확인하세요. + +계속하기전에 당신의 서브모듈(외부라이브러리)이 최신인지 `make git-submodule`을 사용하여 확인하세요. + +## 리눅스 + +당신이 항상 최신 파일을 가지고 있는지는 `sudo util/qmk_install.sh`을 이용하여 간단히 확인할 수 있습니다. 이 명령어는 당신이 필요한 모든 속성물(dependencies)를 설치할 것입니다. **이 명령어는 `apt-get upgrade`를 사용합니다** + +또한 당신의 직접 필요한 것들을 설치할 수도 있습니다. 하지만 이 자료는 항상 최신의 자료을 가지고 있지 않습니다. + +현재로써 필요한 것은 다음과 같습니다. 하지만 당신이 하는 작업에 따라 당신은 다음 패키지를 다 쓰지 않을 수도 있습니다. 또한 환경에 따라 모든 다음 패키지는 다른이름으로 존재하거나, 없을 수도 있습니다. + +``` +build-essential +gcc +unzip +wget +zip +gcc-avr +binutils-avr +avr-libc +dfu-programmer +dfu-util +gcc-arm-none-eabi +binutils-arm-none-eabi +libnewlib-arm-none-eabi +git +``` + +당신이 사용하는 패키지 매니져에서 이러한 방법으로 설치하십시요. + +데비안 / 우분투 예시: + + sudo apt-get update + sudo apt-get install gcc unzip wget zip gcc-avr binutils-avr avr-libc dfu-programmer dfu-util gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi + +페도라 / 레드햇 예시: + + sudo dnf install gcc unzip wget zip dfu-util dfu-programmer avr-gcc avr-libc binutils-avr32-linux-gnu arm-none-eabi-gcc-cs arm-none-eabi-binutils-cs arm-none-eabi-newlib + +아치 / 맨자로(Manjaro) 예시: + + pacman -S base-devel gcc unzip wget zip avr-gcc avr-binutils avr-libc dfu-util arm-none-eabi-gcc arm-none-eabi-binutils arm-none-eabi-newlib git dfu-programmer dfu-util + +## 닉스 (NIX) + +만약 당신이 [NixOS](https://nixos.org/)를 사용중이거나 NIX를 리눅스 또는 맥에서 사용중이라면 `nix-shell`를 root 디렉토리에서 사용하여 컴파일 환경의 구축할 수 있습니다. + +기본적으로 다음 커맨드는 AVR과 ARM 컴파일러를 설치할것입니다. 만약 필요 없다면 `avr` 또는 `arm`을 인수에서 해제할 수 있습니다. + + nix-shell --arg arm false + +## 맥 +당신이 홈브루([homebrew](http://brew.sh/))를 사용한다면, 다음을 입력하세요. + + 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 dfu-programmer + brew install dfu-util + brew install gcc-arm-none-eabi + brew install avrdude + +이 방법을 가장 추천합니다. 만약 홈브루가 없다면 커맨드라인 환경에서 매우 편한 [Homebrew](http://brew.sh/)를 다운받는 것을 추천합니다. 참고로 `avr-gcc@7`를 설치하는 중 `make`과 `make install`는 대개 20분 넘게 걸리고 CPU 사용량이 높아집니다. + +## msys2를 사용하는 윈도우 (추천) +윈도우 비스타 부터 최신버젼까지 가장추천되는 환경은 [msys2](http://www.msys2.org)를 이용하는 것입니다. (윈도우 7과 윈도우 10에서 모두 테스트되었음) + +* 이 사이트에 있는 설명을 이용해 msys2를 설치하세요: http://www.msys2.org +* ``MSYS2 MingGW 64-bit`` 를 여세요 +* QMK폴더로 이동하세요. c드라이브 루트에 있는경우: + * `$ cd /c/qmk_firmware` +* `util/qmk_install.sh`을 실행시키고 나오는데요 따라하세요 + +### 크리에이터 업데이트 +만약 당신의 윈도우 10이 크리에이터 업데이트 버전 또는 더 높은 버전이라면 바로 컴파일과 프로그램 업로드(flashing)를 할 수 있습니다. 크리에이터 업데이트 전 버전이라면 컴파일만 가능합니다. 만약 당신이 잘 모르겠거나 업데이트된 버전이 아니라면 [이 링크](https://support.microsoft.com/en-us/instantanswers/d4efb316-79f0-1aa1-9ef3-dcada78f3fa0/get-the-windows-10-creators-update)를 확인해 보십시오. + +### 리눅스용 윈도우 하위 시스템 사용 (Windows10 Subsystem for Linux) +크리에이터 업데이트에 추가로 만약 당신이 리눅스용 윈도우 하위 시스템이 필요하다면 이 링크에서 다운받으십시오: [설명](http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/) + +만약 당신이 이미 리눅스용 윈도우 하위 시스템을 Anniversary업데이트를 통해 받았다면 이 링크에서 16.04LTS로 업데이트 하는것을 추천합니다. 왜냐하면 업데이트 없이는 일부키보드가 14.04LTS에 포함되있는 도구들로 컴파일되지 않을수 있기때문입니다 : [WSL 업데이트](https://betanews.com/2017/04/14/upgrade-windows-subsystem-for-linux/) + + +### Git +만약 당신이 이미 파일을 로컬로 복제하였다면 이 섹션을 무시하십시요. + +당신은 파일을 기본적인 git을 사용하여 로컬로 복제해야 합니다. **주의, WSL Git을 사용하면 안됩니다** [Git](https://git-scm.com/download/win) 이 링크에서 git을 다운받고 설치하십시오. +그리고 [기본설정](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup), 유저네임과 이메일을 설정하는 것은 만약 당신이 온라인에 기여할 계획이라면 매우 중요합니다. + +Git의 설치가 완료되었다면 Git Bash커맨드을 열고 당신의 복제 QMK파일이 있는 위치로 이동하고 `git clone --recurse-submodules https://github.com/qmk/qmk_firmware`를 실행 시키십니오. 이 커맨드는 새로운 `qmk_firmware`폴더를 이미 존재하는 것의 하위 폴더설정으로 생성할 것입니다. + +### 도구(Toolchain) 설정 +기본적으로 도구설정은 리눅스용 윈도우 하위 시스템이 설치될때 자동으로 설정됩니다. 하지만 수동적으로 하고 싶다면 여기 설명이 있습니다. (If you want to do everything manually, there are no other instructions than the scripts themselves, but you can always open issues and ask for more information. ) + +1. "Bash On Ubuntu On Windows" 을 실행시키십시오. +2. 당신이 `qmk_firmware`를 복제한 위치로 가십시오. WSL(리눅스용 윈도우 하위 시스템 사용)에서 `/mnt/`로 시작되는 패스를 찾으십시오. 즉 당신은 다음과 같은 형식으로 입력해야 합니다. `cd /mnt/c/path/to/qmk_firmware` (Note that the paths start with `/mnt/`in the WSL, so you have to write for example `cd /mnt/c/path/to/qmk_firmware`.) +3. `util/wsl_install.sh`를 실행시키고 화면에 나오는 지시를 따르십니오. +4. Bash command window를 재실행 시키십시오. +5. 이로써 당신은 컴파일과 프로그램 업로드(flashing)을 위한 준비가 모두 끝났습니다. + +### 중요한 참고사항 +*`util/wsl_install.sh` 명령어를 다시 실행시켜 최신 업데이트를 다운받을 수 있습니다. +* QMK 폴더의 위치는 윈도우 파일시스템을 기반으로 해야 됩니다. WSL는 외부실행파일를 작동 시킬수 없기 때문이죠. +* WSL의 Git은 윈도우용 Git과 **호환되지 않습니다** +* 파일을 수정하는 것은 WSL안과 밖에서 모두 가능합니다 하지만 만약 .makefile 혹은 .sh를 수정한다면 유닉스 라인엔딩(Unix line endings)을 지원하는 에디터를 사용하는지 확인하십이오. 그렇지 않다면 컴파일이 되지않을 수도 있습니다. + +## 윈두우 (비스타 혹은 더 최신) (비추천) + +이 섹션은 윈도우 비스타 혹은 더 최신버젼을 위한 오래된 설명입니다. [MSYS2](#windows-with-msys2-recommended)를 사용하는 것을 더 추천합니다. + +1. WinAVR을 설치하였다면 먼저 삭제하십시오. +2. [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe)을 설치하십시오. (Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**) +3. 만약 당신이 Infinity을 기반으로 하는 키보드에 프로그램 업로드를(flashing) 할거라면 dfu-util을 설치해야 합니다, [Input Club](https://github.com/kiibohd/controller/wiki/Loading-DFU-Firmware) 를 참고 하십시오. +4. [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download)를 설치하십시오. 설치중 윈도우화면에서 GUI 추가 설치 옵션을 해재하십니오. **기본 설치 위치를 바꾸지 마십시오.** 이 명령어는 기본위치를 기반으로 하고 있습니다. +5. 레파지토리를 복제하십시오. [이 링크로 압축파일을 받고 앞축해제 하십시오.](https://github.com/qmk/qmk_firmware/archive/master.zip) 윈도우 탐색기에서 다운받은 파일을 여십시오. +6. `\util` 폴더를 여십시오. +7. `1-setup-path-win` .bat파일을 더블클릭해서 실행시키시오. 유저 계정 설정 변경을 허용해야될 수도 있습니다. 스페이스바를 눌러 설치가 성공적으로 완료되었다는 메세지를 닫을 수 있습니다. +8. `2-setup-environment-win` .bat파일에 우클릭해서 '관리자 권한으로 실행'으로 실행시키십시오. 이 작업을 꽤 오래 걸릴 수도 있습니다. 또한 드라이버 설정을 승인해야 될 수도 있습니다. 하지만 이 모든것이 끝나면 당신의 시스템의 설정이 모두 끝났습니다. + +만약 이 작업을 하는데에 문제가 있어 도움받고 싶다면 *Win_Check_Output.txt*을 생성하는 것이 도움이 될것입니다. 이 파일은 `Win_Check.bat`을 `\util`폴더에서 실행시켜 생성할 수 있습니다. + +## 도커(Docker) +만약 위작업들이 당신에게 좀 어렵게 느껴졌다면 도커(Docker)가 당신을 위한 최선일 수도 있습니다(의역). [Docker CE](https://docs.docker.com/install/#supported-platforms)를 설치한뒤 아래 커맨드를 `qmk_firmware` 디랙토리에서 실행시켜 키보드 또는 키맵을 생성시킵니다. +```bash +util/docker_build.sh keyboard:keymap +# 예: util/docker_build.sh ergodox_ez:steno +``` +이 커맨드는 원하는 키보드 또는 키맵을 컴파일하고 `.hex`또는 `.bin`파일을 프로그램 업로드를(flashing) 위해 QMK디랙토리에 생성할것입니다. 만약 `:keymap`이 생략된다면 `default`이 기본을로 사용됩니다. 참고로 여기서 사용되는 인수는 `make` 커맨드를 사용하여 컴파일할때와 동일합니다. + + +또한 스크립트를 그냥 아무 인수 없이도 사용가능합니다. 그렇게 된다면 프로그램은 하나씩 자동으로 인수입력을 요구 할것입니다. 어쩌면 이방법이 더 쉬울 수도 있습니다. +```bash +util/docker_build.sh +# 인수을 입력받습니다.(아무것도 쓰지 않고 놔두는면 기본값으로 설정됩니다) +``` + +다음과 같이 `target`를 사용하여 컴파일과 프로그램 업로드(flashing)을 동시에 할수도 있습니다. +```bash +util/docker_build.sh keyboard:keymap:target +# 예: util/docker_build.sh planck/rev6:default:dfu-util +``` +만약 당시이 리눅스를 사용한다면 이 커맨드들은 추가 설정 없이 바로 작동할 것입니다. 하지만 위도우 또는 맥 환경에서는 [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/)를 사용하여야 이 커맨드들을 사용가능합니다. Docker Machine설정은 꽤 지루하고 짜증남으로 추천하지 않고 [QMK Toolbox](https://github.com/qmk/qmk_toolbox)를 사용하는 것을 추천합니다. + +!> 윈도우에서 독커는 [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v)을 활성화 설정하여야 사용가능합니다. 즉, 도커는 Hyper-V를 지원하지 않는 윈도우 7, 윈도우 8, 그리고 **윈도우 10 홈**과 같은 윈도우 버전에서 사용할수 없다는 것을 의미합니다. + +## Vagrant +만약 컴웨어를 사용하는데 문제가 있다면 Vagrant라는 이름의 툴을 사용해 볼 수 있습니다. 이 툴은 가상환경을 세팅해줌과 동시에 컴웨어를 사용하는데에 필요한 모든 설정을 해줄 것입니다. OLKB는 가상환경에 파일을 호스팅하지 않습니다. [Vagrant 가이드](getting_started_vagrant.md)에서 더 많은 정보를 확인할 수 있습니다. diff --git a/docs/ko-kr/getting_started_getting_help.md b/docs/ko-kr/getting_started_getting_help.md new file mode 100644 index 0000000000..2ae7917a01 --- /dev/null +++ b/docs/ko-kr/getting_started_getting_help.md @@ -0,0 +1,17 @@ +# 도움 받기 + +QMK에서 도움을 받는 방법은 다양합니다. + +**주의, 아래 링크들은 영어로 이루어져 있으며 영어 사용이 가능해야 편리하게 이용할 수 있습니다.** + +## 디스코드 실시간 채팅 + +[QMK 디스코드 서버](https://discord.gg/Uq7gcHh)에서 QMK 개발자들과 실시간으로 대화를 나눌수있습니다. 이 디스코드에는 펌웨어, 툴박스, 하드웨어, 그리고 컨피겨레이터(configurator)에 관한 특별화된 채널이 운영되고 있습니다. + +## OLKB 서브레딧 + +공식 QMK 포럼은 [reddit.com](https://reddit.com) 에 [/r/olkb](https://reddit.com/r/olkb)입니다. + +## Github 이슈 + +[issue on GitHub](https://github.com/qmk/qmk_firmware/issues)에서 문제를 보고 할 수 있습니다. 이 링크는 문제가 오랜 시간을 필요로하거나 디버깅를 요구 할때 매우 유용합니다. diff --git a/docs/ko-kr/getting_started_github.md b/docs/ko-kr/getting_started_github.md new file mode 100644 index 0000000000..2ff0ccb796 --- /dev/null +++ b/docs/ko-kr/getting_started_github.md @@ -0,0 +1,67 @@ +# 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를 사용하는데 필요한 forking, cloning 그리고 submitting a pull request with QMK를 설명할 것입니다. + +?> 이 가이드는 당신이 git커맨드를 사용하는데 익숙하고 git환경을 당신의 시스템이 설치하였다는 전제하에 작성되었습니다. + +아래와 같이 [QMK Github 페이지](https://github.com/qmk/qmk_firmware)에서 당신은 "Fork"라고 쓰여있는 버튼을 볼 수 있습니다 + +![Fork on Github](http://i.imgur.com/8Toomz4.jpg) + +만약 당신이 어느기관 소속이고, 무슨 계정을 사용할것인지 골라야 한다면 개인 계정을 사용하는 것을 추천합니다. +"Fork"가 성공적으로 끝났다면 아래 보이는 "Clone or Download"를 눌러야 합니다. + +![Download from Github](http://i.imgur.com/N1NYcSz.jpg) + +"HTTPS"채크 했는지 확인하고 나와 있는 링크를 복사하세요. + +![HTTPS link](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. +``` + +당신은 이제 모든파일이 로컬시스템이 추가 되었습니다 그리고 이제 키맵을 추가하거나 컴파일, 프로그램 업로드(flashing)를 할 수 있습니다. +모든 추가 변경을 만든 뒤에는 add, commit, and push를 사용하여 당신의 Folk에 추가 할 수 있습니다. + +``` +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의 Folk에 추가 되었습니다. (`https://github.com//qmk_firmware`)에서 확인하고 "New Pull Request"를 눌러 변경사항을 QMK에 업로드할수 있습니다. + +![New Pull Request](http://i.imgur.com/DxMHpJ8.jpg) + +이 버튼을 누르면 당신이 만든 모든 변경사항들이 보여질 것입니다. 만약 모든 변경사항이 맘에 든다면 "Create Pull Request"를 눌러 요청을 확정할수 있습니다. + +**요청사항이 확정된다고 변경사항이 바로 적용되는 것은 아닙니다.** + +![Create Pull Request](http://i.imgur.com/Ojydlaj.jpg) + +요청을 한뒤 QMK개발자들은 댓글로 무엇이 변경되었는지 등을 물어 볼수있지만 끝에는 매인 디랙토리로 업로드 될것입니다. + +**"Thanks for contributing to QMK :)"** From 84ca67f1583ec1cc3689bd92a602bd8fdc6ad2a6 Mon Sep 17 00:00:00 2001 From: Jordan Egstad Date: Mon, 9 Nov 2020 11:54:15 -0800 Subject: [PATCH 044/114] [Keymap] idobo:egstad (#10783) * feat: new keymapping for idobo * fix: added licenses. converted int to uint8_t where applicable * fix: addressed zvecr stylistic enhancements * fix: replaced rgblight_sethsv with rgblight_sethsv_noeeprom --- keyboards/idobo/keymaps/egstad/config.h | 68 ++++++ keyboards/idobo/keymaps/egstad/keymap.c | 267 +++++++++++++++++++++++ keyboards/idobo/keymaps/egstad/readme.md | 17 ++ keyboards/idobo/keymaps/egstad/rules.mk | 3 + 4 files changed, 355 insertions(+) create mode 100644 keyboards/idobo/keymaps/egstad/config.h create mode 100644 keyboards/idobo/keymaps/egstad/keymap.c create mode 100644 keyboards/idobo/keymaps/egstad/readme.md create mode 100644 keyboards/idobo/keymaps/egstad/rules.mk diff --git a/keyboards/idobo/keymaps/egstad/config.h b/keyboards/idobo/keymaps/egstad/config.h new file mode 100644 index 0000000000..45dbd3df82 --- /dev/null +++ b/keyboards/idobo/keymaps/egstad/config.h @@ -0,0 +1,68 @@ +/* Copyright 2020 Jordan Egstad + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT +#define RGBLIGHT_SLEEP + + + +/* Leader Key + ========================================================================== */ + +// Activates the leader key +// #define LEADER_PER_KEY_TIMING +// resets the timeout after each key is tapped +// #define LEADER_TIMEOUT 240 + + + + + + +/* Autoshifting + ========================================================================== */ + +// This controls how long you have to hold a key before you get the shifted state. +#define AUTO_SHIFT_TIMEOUT 150 + +// Do not Auto Shift special keys -_, =+, [{, ]}, ;:, '", ,<, .>, and /? +// #define NO_AUTO_SHIFT_SPECIAL + +// Do not Auto Shift numeric keys, zero through nine. +#define NO_AUTO_SHIFT_NUMERIC + +// Do not Auto Shift alpha characters, which include A through Z. +// #define NO_AUTO_SHIFT_ALPHA + +// Lower the Auto Shift timeout variable (down) +// KC_ASDN + +// Raise the Auto Shift timeout variable (up) +// KC_ASUP + +// Report your current Auto Shift timeout value +// KC_ASRP + +// Turns on the Auto Shift Function +// KC_ASON + +// Turns off the Auto Shift Function +// KC_ASOFF + +// Toggles the state of the Auto Shift feature +// KC_ASTG diff --git a/keyboards/idobo/keymaps/egstad/keymap.c b/keyboards/idobo/keymaps/egstad/keymap.c new file mode 100644 index 0000000000..febbad7c6e --- /dev/null +++ b/keyboards/idobo/keymaps/egstad/keymap.c @@ -0,0 +1,267 @@ +/* Copyright 2020 Jordan Egstad + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 + + + + + + +/* ========================================================================== + LAYERS + ========================================================================== */ + +// qwerty +#define _QW 0 +// functions +#define _FN 1 + + + + + + +/* ========================================================================== + CUSTOM KEYS + ========================================================================== */ + +// Tap dances +#define TD_ESCP TD(TD_GV_ESC) // Tap for grave, twice for escape +#define TD_MINS TD(TD_MIN) // Tap for minus, twice for equal +#define TD_BRAC TD(TD_BRC) // Tap for open brace, twice for close + +// Layers +#define FN_SPC LT(_FN, KC_SPC) // Tap for space, hold for _FN + +// Modifiers +#define LG_ZMIN LGUI(KC_EQUAL) // Command + plus (zoom in) +#define LG_ZMOT LGUI(KC_MINUS) // Command + minus (zoom out) +#define MT_SHFT MT(MOD_RSFT, KC_ENT) // Tap for enter, hold for shift + +// Tap Dances +enum { + TD_BRC = 0, + TD_MIN, + TD_GV_ESC, + TD_BS +}; + +// Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + // Tap once for Left Brace, twice for Right Brace + [TD_BRC] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_RBRC), + //Tap once for Minus, twice for Equal + [TD_MIN] = ACTION_TAP_DANCE_DOUBLE(KC_MINUS, KC_EQUAL), + // Tap once for Grave, tap twice for Escape + [TD_GV_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_GRAVE, KC_ESCAPE) +}; + + + + + + +/* ========================================================================== + KEYMAPS + ========================================================================== */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY (_QW) + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | - | ` | \| | 6 | 7 | 8 | 9 | 0 | - + | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | [ | \ | ] | Y | U | I | O | P | [ ] | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | | | | H | J | K | L | ; | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | | | | N | M | , | . | / | RSHIFT | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | ZOOM- | ZOOM+ | LALT | FN | CMD | BSPC | | | FN | SPACE | ENTER | LEFT | UP | DOWN | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_QW] = LAYOUT_ortho_5x15( /* QWERTY */ + TD_ESCP, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_PIPE, KC_6, KC_7, KC_8, KC_9, KC_0, TD_MINS, \ + 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, TD_BRAC, \ + _______, 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, MT_SHFT, \ + LG_ZMOT, LG_ZMIN, KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, _______, RESET, _______, FN_SPC, KC_ENT, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT \ + ), + + +/* FUNCTION (_FN) + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | P | | F7 | F8 | F9 | F10 | F11 | F12 | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | RGB HD | RGB HI | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | A-SFT | | | | | | RGB SD | RGB SI | | | LEFT | UP | DOWN | RIGHT | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | RGB | | | | | | RGB VD | RGB VI | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | RESET | | | | | | RGB RMD| RGB MD | | | PLAY | PREV | VOL UP | VOL DN | NEXT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */ + 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_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, \ + KC_ASTG, _______, _______, _______, _______, _______, RGB_SAD, RGB_SAI, _______, _______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, _______, \ + RGB_TOG, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, \ + RESET, _______, _______, _______, _______, _______, RGB_RMOD,RGB_MOD, _______, _______, KC_MPLY, KC_MRWD, KC_VOLU, KC_VOLD, KC_MFFD \ + ), +}; + + + + + + +/* ========================================================================== + LEDs + ========================================================================== */ + +// RGB MODES +// 1 = Static +// 2-5 = Breathing +// 6-8 = Rainbow +// 9-14 = Swirl +// 15-20 = Snake +// 21-24 = Nightrider +// 25 = Christmas +// 26-30 = Static Gradient + +// Default LED colors +uint8_t h = 170; +uint8_t s = 255; +uint8_t v; + +// default animation +uint8_t rgbMode = RGBLIGHT_MODE_STATIC_LIGHT; +// boot animation +uint8_t rgbBootMode = RGBLIGHT_MODE_SNAKE; +// boot timeout vars +uint8_t bootComplete = 0; +int bootTimeoutDuration = 2000; +int bootTimeout; + + +void init_hsv(void) { + // fetch what the brightness was last sesion + v = rgblight_get_val(); + rgblight_sethsv(h,s,v); +} + +// fetch current HSV vals +void get_hsv(void) { + h = rgblight_get_hue(); + s = rgblight_get_sat(); + v = rgblight_get_val(); +} + +// reset HSV vals +void reset_hsv(void) { + int currentV = rgblight_get_val(); + rgblight_sethsv(h,s,currentV); +} + +// deterimes when to stop bootup animation +void bootupAnimation(void) { + bootComplete = (timer_elapsed(bootTimeout) > bootTimeoutDuration) ? 1 : 0; + + if (bootComplete) { + rgblight_mode(rgbMode); + } +} + + + + + + +/* ========================================================================== + INITIALIZATION FUNCTION + ========================================================================== */ + +void keyboard_post_init_user(void) { + // start a timeout + bootTimeout = timer_read(); + // set rgb color + init_hsv(); + // init rgb + rgblight_enable(); + // animate in snake ledGreende + rgblight_mode(rgbBootMode); +}; + + + + + + +/* ========================================================================== + ALWAYS RUNNING + ========================================================================== */ +void matrix_scan_user(void) { + // keep an eye on these layers + uint8_t layer = get_highest_layer(layer_state); + // handle boot-up sequence + bootupAnimation(); + // watch the brightness for changes + v = rgblight_get_val(); + + switch (layer) { + case _FN: + // set leds to white + rgblight_sethsv_noeeprom(h,0,v); + break; + default: + break; + } +}; + + + + + + +/* ========================================================================== + KEYPRESS CALLBACKS + ========================================================================== */ + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // keep an eye on these layers + uint8_t layer = get_highest_layer(layer_state); + + switch (keycode) { + case FN_SPC: + // stash and pop color on key down and key up + (record->event.pressed) ? get_hsv() : reset_hsv(); + return true; + default: + switch (layer) { + case _QW: + // tick the hue up with each keypress + rgblight_increase_hue(); + break; + default: + break; + } + return true; // Process all other keycodes normally + } +} diff --git a/keyboards/idobo/keymaps/egstad/readme.md b/keyboards/idobo/keymaps/egstad/readme.md new file mode 100644 index 0000000000..2de44ad9cc --- /dev/null +++ b/keyboards/idobo/keymaps/egstad/readme.md @@ -0,0 +1,17 @@ +# Egstad's Idobo + +## LEDs +By default, LEDs are enabled. There is a short bootup animation (`bootupAnimation()`) to indicate that the keyboard has powered up correctly. + +On each keypress, the LEDs hue increases. This increase is determined the the `RGBLIGHT_HUE_STEP` value, which is assigned in `../config.h` (parent idobo directory). My local copy has this value set to `1`, so the incremental color shift is rather slow. + + +## Keeping up to date +To update your fork’s master, run the following, hitting the Enter key after each line: + +```bash +git checkout master +git fetch upstream +git pull upstream master +git push origin master +``` diff --git a/keyboards/idobo/keymaps/egstad/rules.mk b/keyboards/idobo/keymaps/egstad/rules.mk new file mode 100644 index 0000000000..ca3becc383 --- /dev/null +++ b/keyboards/idobo/keymaps/egstad/rules.mk @@ -0,0 +1,3 @@ +TAP_DANCE_ENABLE = yes +AUTO_SHIFT_ENABLE = yes +RGBLIGHT_ENABLE = yes From 16fe4b8b77c2eee7fb1598063d2903086bd03ca4 Mon Sep 17 00:00:00 2001 From: Chris Merrill Date: Mon, 9 Nov 2020 16:33:40 -0500 Subject: [PATCH 045/114] Update massdrop/alt and arm_atsam/led_matrix to fix #10813 (#10818) * Update massdrop/alt keyboard to fix Caps Lock LED flickering. * Fix Caps-lock LED during underglow-only for massdrop/ctrl * Update keyboards/massdrop/ctrl/keymaps/default/keymap.c --- keyboards/massdrop/alt/config_led.c | 10 +++++----- keyboards/massdrop/alt/keymaps/default/keymap.c | 4 ++-- keyboards/massdrop/ctrl/config_led.c | 4 ++-- keyboards/massdrop/ctrl/keymaps/default/keymap.c | 4 ++-- tmk_core/protocol/arm_atsam/led_matrix.c | 8 +++++--- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/keyboards/massdrop/alt/config_led.c b/keyboards/massdrop/alt/config_led.c index 42d4d1474b..dfd35a8491 100644 --- a/keyboards/massdrop/alt/config_led.c +++ b/keyboards/massdrop/alt/config_led.c @@ -37,11 +37,11 @@ led_config_t g_led_config = { { { 224, 13 }, { 224, 25 }, { 224, 38 }, { 224, 50 }, { 222, 62 }, { 191, 64 }, { 179, 64 }, { 167, 64 }, { 153, 64 }, { 139, 64 }, { 125, 64 }, { 112, 64 }, { 98, 64 }, { 84, 64 }, { 70, 64 }, { 56, 64 }, { 42, 64 }, { 28, 64 }, { 1, 62 }, { 0, 50 }, { 0, 38 }, { 0, 25 }, { 0, 13 } }, { - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 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, 4, - 4, 4, 4, 4, 4, 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, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 9, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, + 1, 1, 1, 4, 1, 1, 1, 1, 1, // Underglow LEDs 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, diff --git a/keyboards/massdrop/alt/keymaps/default/keymap.c b/keyboards/massdrop/alt/keymaps/default/keymap.c index 0d3e7ccb7a..df8d406988 100644 --- a/keyboards/massdrop/alt/keymaps/default/keymap.c +++ b/keyboards/massdrop/alt/keymaps/default/keymap.c @@ -87,11 +87,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { switch (rgb_matrix_get_flags()) { case LED_FLAG_ALL: { - rgb_matrix_set_flags(LED_FLAG_KEYLIGHT); + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR); rgb_matrix_set_color_all(0, 0, 0); } break; - case LED_FLAG_KEYLIGHT: { + case (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR): { rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); rgb_matrix_set_color_all(0, 0, 0); } diff --git a/keyboards/massdrop/ctrl/config_led.c b/keyboards/massdrop/ctrl/config_led.c index 448793cf5d..0cfe4ee216 100644 --- a/keyboards/massdrop/ctrl/config_led.c +++ b/keyboards/massdrop/ctrl/config_led.c @@ -46,7 +46,7 @@ led_config_t g_led_config = { { }, { // 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, + 1, 4, 4, 4, 4, 1, 9, 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, @@ -56,7 +56,7 @@ led_config_t g_led_config = { { 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, + 9, 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, diff --git a/keyboards/massdrop/ctrl/keymaps/default/keymap.c b/keyboards/massdrop/ctrl/keymaps/default/keymap.c index 51b7f3931b..48fec5ae6f 100644 --- a/keyboards/massdrop/ctrl/keymaps/default/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/default/keymap.c @@ -100,11 +100,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { switch (rgb_matrix_get_flags()) { case LED_FLAG_ALL: { - rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR); rgb_matrix_set_color_all(0, 0, 0); } break; - case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { + case (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR): { rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); rgb_matrix_set_color_all(0, 0, 0); } diff --git a/tmk_core/protocol/arm_atsam/led_matrix.c b/tmk_core/protocol/arm_atsam/led_matrix.c index 4b8cc7c5e1..69cb03a9f7 100644 --- a/tmk_core/protocol/arm_atsam/led_matrix.c +++ b/tmk_core/protocol/arm_atsam/led_matrix.c @@ -311,9 +311,11 @@ void led_matrix_indicators(void) { (led_map[i].scan == USB_LED_KANA_SCANCODE && (kbled & (1 << USB_LED_KANA))) || #endif // KANA (0)) { - led_buffer[i].r = 255 - led_buffer[i].r; - led_buffer[i].g = 255 - led_buffer[i].g; - led_buffer[i].b = 255 - led_buffer[i].b; + if (rgb_matrix_get_flags() & LED_FLAG_INDICATOR) { + led_buffer[i].r = 255 - led_buffer[i].r; + led_buffer[i].g = 255 - led_buffer[i].g; + led_buffer[i].b = 255 - led_buffer[i].b; + } } } } From f38a3b7408e38f6467a2eb9160791f584b46d39e Mon Sep 17 00:00:00 2001 From: Yan-Fa Li Date: Mon, 9 Nov 2020 14:44:22 -0800 Subject: [PATCH 046/114] [Keymap] little foot (#7305) * Personal keymap - fix quoting in description fix issue with userspace disabling audio wip Update keyboards/kingly_keys/little_foot/keymaps/yanfali/rules.mk Co-authored-by: Ryan * Update keyboards/kingly_keys/little_foot/config.h Co-authored-by: Nick Brassel Co-authored-by: Yan-Fa Li Co-authored-by: Ryan Co-authored-by: Nick Brassel --- keyboards/kingly_keys/little_foot/config.h | 3 +- .../little_foot/keymaps/yanfali/config.h | 10 +++++ .../little_foot/keymaps/yanfali/keymap.c | 40 +++++++++++++++++++ .../little_foot/keymaps/yanfali/rules.mk | 4 ++ 4 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 keyboards/kingly_keys/little_foot/keymaps/yanfali/config.h create mode 100644 keyboards/kingly_keys/little_foot/keymaps/yanfali/keymap.c create mode 100644 keyboards/kingly_keys/little_foot/keymaps/yanfali/rules.mk diff --git a/keyboards/kingly_keys/little_foot/config.h b/keyboards/kingly_keys/little_foot/config.h index e0bd0daf99..a872579c97 100644 --- a/keyboards/kingly_keys/little_foot/config.h +++ b/keyboards/kingly_keys/little_foot/config.h @@ -11,7 +11,7 @@ * GNU General 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 + * along with this program. If not, see . */ #pragma once @@ -24,7 +24,6 @@ #define DEVICE_VER 0x0001 #define MANUFACTURER Kingly-Keys #define PRODUCT The Little Foot -#define DESCRIPTION A Mighty Small, 45-Percent, Ortholinear Keyboard. /* key matrix size */ #define MATRIX_ROWS 5 diff --git a/keyboards/kingly_keys/little_foot/keymaps/yanfali/config.h b/keyboards/kingly_keys/little_foot/keymaps/yanfali/config.h new file mode 100644 index 0000000000..72892851e0 --- /dev/null +++ b/keyboards/kingly_keys/little_foot/keymaps/yanfali/config.h @@ -0,0 +1,10 @@ +#pragma once + +#define TAPPING_TERM 150 +#define RETRO_TAPPING + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(NOCTURNE_OP_9_NO_1) + #define AUDIO_CLICKY + #define AUDIO_CLICKY_FREQ_RANDOMNESS 0.8f +#endif diff --git a/keyboards/kingly_keys/little_foot/keymaps/yanfali/keymap.c b/keyboards/kingly_keys/little_foot/keymaps/yanfali/keymap.c new file mode 100644 index 0000000000..2ce2babf69 --- /dev/null +++ b/keyboards/kingly_keys/little_foot/keymaps/yanfali/keymap.c @@ -0,0 +1,40 @@ + +#include QMK_KEYBOARD_H + +// Layer names +enum{ + // - Base layer: + _BASE, + // - Symbols, numbers, and functions: + _FN, + // - Alternate Function layer: + _LN +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_split_space_base( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + LCTL_T(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, + LSFT_T(KC_ESC), LGUI_T(KC_SPACE), LT(_LN, KC_BSPC), LT(_FN, KC_ENT) + ), + + [_FN] = LAYOUT_split_space_base( + LT(_LN, KC_ESC), _______, _______, _______, _______, _______, _______, _______, KC_MINS, RESET, + KC_TAB, _______, _______, _______, _______, _______, _______, _______, LSFT(KC_MINS), KC_BSLS, + KC_LSFT, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_QUOT, + AU_TOG, CK_TOGG , _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LALT, RGB_MOD, _______ + ), + + [_LN] = LAYOUT_split_space_base( + _______, KC_F1, KC_F2, KC_F3, _______, _______, _______, KC_7, KC_8, KC_9, + _______, KC_F4, KC_F5, KC_F6, _______, _______, _______, KC_4, KC_5, KC_6, + _______, KC_F7, KC_F8, KC_F9, _______, _______, _______, KC_1, KC_2, KC_3, + _______, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, KC_0, _______, + _______, _______, _______, _______ + ) +}; diff --git a/keyboards/kingly_keys/little_foot/keymaps/yanfali/rules.mk b/keyboards/kingly_keys/little_foot/keymaps/yanfali/rules.mk new file mode 100644 index 0000000000..a61cff2750 --- /dev/null +++ b/keyboards/kingly_keys/little_foot/keymaps/yanfali/rules.mk @@ -0,0 +1,4 @@ +CTPC=yes +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +AUDIO_ENABLE = yes From ed8d1d1ae75ae30c19c3133aa8bea96e3cd54f10 Mon Sep 17 00:00:00 2001 From: Nate Stein Date: Mon, 9 Nov 2020 16:30:31 -0800 Subject: [PATCH 047/114] Add VIA Keymap for Worldspawn Gothic70. (#10617) * Add VIA Keymap for Worldspawn Gothic70. * Prevent LEDs from turning on at startup. * Add license header to keymap. * Fix Keymap Formatting. --- keyboards/wsk/gothic70/config.h | 2 +- keyboards/wsk/gothic70/keymaps/via/keymap.c | 76 +++++++++++++++++++++ keyboards/wsk/gothic70/keymaps/via/rules.mk | 3 + 3 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 keyboards/wsk/gothic70/keymaps/via/keymap.c create mode 100644 keyboards/wsk/gothic70/keymaps/via/rules.mk diff --git a/keyboards/wsk/gothic70/config.h b/keyboards/wsk/gothic70/config.h index 98e70e615c..bef22e82ff 100644 --- a/keyboards/wsk/gothic70/config.h +++ b/keyboards/wsk/gothic70/config.h @@ -3,7 +3,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x5753 // "WS" #define PRODUCT_ID 0x63CC #define DEVICE_VER 0x0001 #define MANUFACTURER Worldspawn00 diff --git a/keyboards/wsk/gothic70/keymaps/via/keymap.c b/keyboards/wsk/gothic70/keymaps/via/keymap.c new file mode 100644 index 0000000000..f386f0b3fd --- /dev/null +++ b/keyboards/wsk/gothic70/keymaps/via/keymap.c @@ -0,0 +1,76 @@ +/* +Copyright 2020 worldspawn00 + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN, + _MEDIA }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = 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_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_BSLS, KC_INS, + 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_DEL, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_MEDIA), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN), KC_BSPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN] = 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_PAUS, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), + + [_MEDIA] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ), + + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +void matrix_init_user(void) { + // set CapsLock LED to output and off (active high) + setPinOutput(F5); + // set NumLock LED to output and off (active high) + setPinOutput(F6); + // set ScrollLock LED to output and off (active high) + setPinOutput(F7); +} + +// write to above indicators in a binary fashion based on current layer +layer_state_t layer_state_set_user(layer_state_t state) +{ + writePin(F5, (state & 0x1)); + writePin(F6, (state & 0x2)); + writePin(F7, (state & 0x4)); + return state; +} diff --git a/keyboards/wsk/gothic70/keymaps/via/rules.mk b/keyboards/wsk/gothic70/keymaps/via/rules.mk new file mode 100644 index 0000000000..0638fd5d90 --- /dev/null +++ b/keyboards/wsk/gothic70/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = no \ No newline at end of file From 489bee0ee451e6cf87465ad75c2d9f6640048c3f Mon Sep 17 00:00:00 2001 From: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> Date: Tue, 10 Nov 2020 05:33:15 +0100 Subject: [PATCH 048/114] [Docs] redirect from /tutorial to /newbs (#10718) * Added redirect from /tutorial to /newbs * Fixed indentation * Changed title of tutorial page --- docs/index.html | 1 + docs/newbs.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/index.html b/docs/index.html index 68bd00f6dd..5cab97a57f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -46,6 +46,7 @@ '/unicode': '/feature_unicode', '/python_development': '/cli_development', '/getting_started_build_tools':'/newbs_getting_started', + '/tutorial':'/newbs', }, basePath: '/', name: 'QMK Firmware', diff --git a/docs/newbs.md b/docs/newbs.md index 389e3f4721..02b0a070f5 100644 --- a/docs/newbs.md +++ b/docs/newbs.md @@ -1,4 +1,4 @@ -# The Complete Newbs Guide To QMK +# The QMK Tutorial Your computer keyboard has a processor inside of it, similar to the one inside your computer. This processor runs software that is responsible for detecting button presses and informing the computer when keys are pressed. QMK Firmware fills the role of that software, detecting button presses and passing that information on to the host computer. When you build your custom keymap, you are creating an executable program for your keyboard. From 2ef68a84b68875b189bee58d1fb554ebb62f8e58 Mon Sep 17 00:00:00 2001 From: elijahblake81 Date: Mon, 9 Nov 2020 22:57:43 -0600 Subject: [PATCH 049/114] Added color wheel that have QMK HSV values. (#8997) I've converted the 360 color wheel to the 255 color wheel for QMK HSV values. --- docs/feature_rgblight.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index 23b2886edb..762056b343 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -41,6 +41,8 @@ Changing the **Hue** cycles around the circle.
Changing the **Saturation** moves between the inner and outer sections of the wheel, affecting the intensity of the color.
Changing the **Value** sets the overall brightness.
+![QMK Color Wheel with HSV Values](https://i.imgur.com/vkYVo66.jpg) + ## Keycodes |Key |Aliases |Description | From 53f11668a3399ff1bdf82902a7717832831219bf Mon Sep 17 00:00:00 2001 From: Garret G <45295190+The-Royal@users.noreply.github.com> Date: Mon, 9 Nov 2020 23:03:12 -0600 Subject: [PATCH 050/114] [Keyboard] kingly_keys/ave (#10042) * Add configurator support for "The Ave." keyboard * Update readme.md * update misc nomenclature * add punctuation * fix miss-placed "0" * update README.md * del. duplicate "F11" in visual layout information * Split PCB configurations into subfolders * update layer template to new matrix title * rm primary .c / .h files * add new end line to both .h subfolder fiels * Apply suggestions from code review * tested update to RGB code * update rgb code * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review * Update rules.mk * Update rules.mk * Delete rules.mk * Delete rules.mk * Update rules.mk * Update config.h * Update config.h * Update keymap.c * Update ortho.c * Update ortho.h * Update config.h * Update keymap.c * Update staggered.c * Update staggered.h * Apply suggestions from code review * Update config.h * Update keymap.c * move and duplicate rules.mk file * Update keyboards/kingly_keys/ave/readme.md * Update config.h * Update keyboards/kingly_keys/ave/config.h --- keyboards/kingly_keys/ave/config.h | 50 ++++ keyboards/kingly_keys/ave/ortho/info.json | 183 +++++++++++++ .../ave/ortho/keymaps/default/config.h | 32 +++ .../ave/ortho/keymaps/default/keymap.c | 239 +++++++++++++++++ .../ave/ortho/keymaps/default/rules.mk | 2 + keyboards/kingly_keys/ave/ortho/ortho.c | 18 ++ keyboards/kingly_keys/ave/ortho/ortho.h | 67 +++++ keyboards/kingly_keys/ave/ortho/rules.mk | 23 ++ keyboards/kingly_keys/ave/readme.md | 21 ++ keyboards/kingly_keys/ave/staggered/info.json | 117 +++++++++ .../ave/staggered/keymaps/default/config.h | 32 +++ .../ave/staggered/keymaps/default/keymap.c | 241 ++++++++++++++++++ .../ave/staggered/keymaps/default/rules.mk | 2 + keyboards/kingly_keys/ave/staggered/rules.mk | 23 ++ .../kingly_keys/ave/staggered/staggered.c | 18 ++ .../kingly_keys/ave/staggered/staggered.h | 52 ++++ 16 files changed, 1120 insertions(+) create mode 100644 keyboards/kingly_keys/ave/config.h create mode 100644 keyboards/kingly_keys/ave/ortho/info.json create mode 100644 keyboards/kingly_keys/ave/ortho/keymaps/default/config.h create mode 100644 keyboards/kingly_keys/ave/ortho/keymaps/default/keymap.c create mode 100644 keyboards/kingly_keys/ave/ortho/keymaps/default/rules.mk create mode 100644 keyboards/kingly_keys/ave/ortho/ortho.c create mode 100644 keyboards/kingly_keys/ave/ortho/ortho.h create mode 100644 keyboards/kingly_keys/ave/ortho/rules.mk create mode 100644 keyboards/kingly_keys/ave/readme.md create mode 100644 keyboards/kingly_keys/ave/staggered/info.json create mode 100644 keyboards/kingly_keys/ave/staggered/keymaps/default/config.h create mode 100644 keyboards/kingly_keys/ave/staggered/keymaps/default/keymap.c create mode 100644 keyboards/kingly_keys/ave/staggered/keymaps/default/rules.mk create mode 100644 keyboards/kingly_keys/ave/staggered/rules.mk create mode 100644 keyboards/kingly_keys/ave/staggered/staggered.c create mode 100644 keyboards/kingly_keys/ave/staggered/staggered.h diff --git a/keyboards/kingly_keys/ave/config.h b/keyboards/kingly_keys/ave/config.h new file mode 100644 index 0000000000..06fda4c26d --- /dev/null +++ b/keyboards/kingly_keys/ave/config.h @@ -0,0 +1,50 @@ + /* + Copyright 2020 Garret Gartner + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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 0x4B4B // "KK" +#define PRODUCT_ID 0x1225 +#define DEVICE_VER 0x0011 +#define MANUFACTURER Kingly-Keys +#define PRODUCT The Ave. + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 13 + + +#define ENCODERS_PAD_A { B2 } +#define ENCODERS_PAD_B { B1 } + +#define MATRIX_ROW_PINS { B3, F4, F7, F6, F5 } +#define MATRIX_COL_PINS { C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0} +#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 diff --git a/keyboards/kingly_keys/ave/ortho/info.json b/keyboards/kingly_keys/ave/ortho/info.json new file mode 100644 index 0000000000..9853fcd775 --- /dev/null +++ b/keyboards/kingly_keys/ave/ortho/info.json @@ -0,0 +1,183 @@ +{ + "keyboard_name": "The Ave. (Ortholinear Ed. PCB)", + "url": "", + "maintainer": "the-royal", + "width": 13.5, + "height": 5.5, + "layouts": { + "LAYOUT_ortho_all": { + "layout": [ + {"label":"k001", "x":0.00, "y":0.00}, + {"label":"k002", "x":1.50, "y":0.00}, + {"label":"k011", "x":10.5, "y":0.00}, + {"label":"k012", "x":11.5, "y":0.00}, + {"label":"k013", "x":12.5, "y":0.00}, + {"label":"k101", "x":0.00, "y":1.50}, + {"label":"k102", "x":1.50, "y":1.50}, + {"label":"k103", "x":2.50, "y":1.50}, + {"label":"k104", "x":3.50, "y":1.50}, + {"label":"k105", "x":4.50, "y":1.50}, + {"label":"k106", "x":5.50, "y":1.50}, + {"label":"k107", "x":6.50, "y":1.50}, + {"label":"k108", "x":7.50, "y":1.50}, + {"label":"k109", "x":8.50, "y":1.50}, + {"label":"k110", "x":9.50, "y":1.50}, + {"label":"k111", "x":10.5, "y":1.50}, + {"label":"k112", "x":11.5, "y":1.50}, + {"label":"k113", "x":12.5, "y":1.50}, + {"label":"k201", "x":0.00, "y":2.50}, + {"label":"k202", "x":1.50, "y":2.50}, + {"label":"k203", "x":2.50, "y":2.50}, + {"label":"k204", "x":3.50, "y":2.50}, + {"label":"k205", "x":4.50, "y":2.50}, + {"label":"k206", "x":5.50, "y":2.50}, + {"label":"k207", "x":6.50, "y":2.50}, + {"label":"k208", "x":7.50, "y":2.50}, + {"label":"k209", "x":8.50, "y":2.50}, + {"label":"k210", "x":9.50, "y":2.50}, + {"label":"k211", "x":10.5, "y":2.50}, + {"label":"k212", "x":11.5, "y":2.50}, + {"label":"k213", "x":12.5, "y":2.50}, + {"label":"k301", "x":0.00, "y":3.50}, + {"label":"k302", "x":1.50, "y":3.50}, + {"label":"k303", "x":2.50, "y":3.50}, + {"label":"k304", "x":3.50, "y":3.50}, + {"label":"k305", "x":4.50, "y":3.50}, + {"label":"k306", "x":5.50, "y":3.50}, + {"label":"k307", "x":6.50, "y":3.50}, + {"label":"k308", "x":7.50, "y":3.50}, + {"label":"k309", "x":8.50, "y":3.50}, + {"label":"k310", "x":9.50, "y":3.50}, + {"label":"k311", "x":10.5, "y":3.50}, + {"label":"k312", "x":11.5, "y":3.50}, + {"label":"k313", "x":12.5, "y":3.50}, + {"label":"k401", "x":0.00, "y":4.50}, + {"label":"k402", "x":1.50, "y":4.50}, + {"label":"k403", "x":2.50, "y":4.50}, + {"label":"k404", "x":3.50, "y":4.50}, + {"label":"k405", "x":4.50, "y":4.50}, + {"label":"k406", "x":5.50, "y":4.50}, + {"label":"k407", "x":6.50, "y":4.50}, + {"label":"k408", "x":7.50, "y":4.50}, + {"label":"k409", "x":8.50, "y":4.50}, + {"label":"k410", "x":9.50, "y":4.50}, + {"label":"k411", "x":10.5, "y":4.50}, + {"label":"k412", "x":11.5, "y":4.50}, + {"label":"k413", "x":12.5, "y":4.50} + ] + }, + "LAYOUT_ortho_2x2u": { + "layout": [ + {"label":"k001", "x":0.00, "y":0.00}, + {"label":"k002", "x":1.50, "y":0.00}, + {"label":"k011", "x":10.5, "y":0.00}, + {"label":"k012", "x":11.5, "y":0.00}, + {"label":"k013", "x":12.5, "y":0.00}, + {"label":"k101", "x":0.00, "y":1.50}, + {"label":"k102", "x":1.50, "y":1.50}, + {"label":"k103", "x":2.50, "y":1.50}, + {"label":"k104", "x":3.50, "y":1.50}, + {"label":"k105", "x":4.50, "y":1.50}, + {"label":"k106", "x":5.50, "y":1.50}, + {"label":"k107", "x":6.50, "y":1.50}, + {"label":"k108", "x":7.50, "y":1.50}, + {"label":"k109", "x":8.50, "y":1.50}, + {"label":"k110", "x":9.50, "y":1.50}, + {"label":"k111", "x":10.5, "y":1.50}, + {"label":"k112", "x":11.5, "y":1.50}, + {"label":"k113", "x":12.5, "y":1.50}, + {"label":"k201", "x":0.00, "y":2.50}, + {"label":"k202", "x":1.50, "y":2.50}, + {"label":"k203", "x":2.50, "y":2.50}, + {"label":"k204", "x":3.50, "y":2.50}, + {"label":"k205", "x":4.50, "y":2.50}, + {"label":"k206", "x":5.50, "y":2.50}, + {"label":"k207", "x":6.50, "y":2.50}, + {"label":"k208", "x":7.50, "y":2.50}, + {"label":"k209", "x":8.50, "y":2.50}, + {"label":"k210", "x":9.50, "y":2.50}, + {"label":"k211", "x":10.5, "y":2.50}, + {"label":"k212", "x":11.5, "y":2.50}, + {"label":"k213", "x":12.5, "y":2.50}, + {"label":"k301", "x":0.00, "y":3.50}, + {"label":"k302", "x":1.50, "y":3.50}, + {"label":"k303", "x":2.50, "y":3.50}, + {"label":"k304", "x":3.50, "y":3.50}, + {"label":"k305", "x":4.50, "y":3.50}, + {"label":"k306", "x":5.50, "y":3.50}, + {"label":"k307", "x":6.50, "y":3.50}, + {"label":"k308", "x":7.50, "y":3.50}, + {"label":"k309", "x":8.50, "y":3.50}, + {"label":"k310", "x":9.50, "y":3.50}, + {"label":"k311", "x":10.5, "y":3.50}, + {"label":"k312", "x":11.5, "y":3.50}, + {"label":"k313", "x":12.5, "y":3.50}, + {"label":"k401", "x":0.00, "y":4.50}, + {"label":"k402", "x":1.50, "y":4.50}, + {"label":"k403", "x":2.50, "y":4.50}, + {"label":"k404", "x":3.50, "y":4.50}, + {"label":"k405", "x":4.50, "y":4.50}, + {"label":"k406", "x":5.50, "y":4.50, "w":2.00}, + {"label":"k409", "x":7.50, "y":4.50, "w":2.00}, + {"label":"k410", "x":9.50, "y":4.50}, + {"label":"k411", "x":10.5, "y":4.50}, + {"label":"k412", "x":11.5, "y":4.50}, + {"label":"k413", "x":12.5, "y":4.50} + ] + }, + "LAYOUT_ortho_big_boy": { + "layout": [ + {"label":"k001", "x":0.00, "y":0.00}, + {"label":"k002", "x":1.50, "y":0.00}, + {"label":"k011", "x":10.5, "y":0.00}, + {"label":"k012", "x":11.5, "y":0.00}, + {"label":"k013", "x":12.5, "y":0.00}, + {"label":"k101", "x":0.00, "y":1.50}, + {"label":"k102", "x":1.50, "y":1.50}, + {"label":"k103", "x":2.50, "y":1.50}, + {"label":"k104", "x":3.50, "y":1.50}, + {"label":"k105", "x":4.50, "y":1.50}, + {"label":"k106", "x":5.50, "y":1.50}, + {"label":"k107", "x":6.50, "y":1.50}, + {"label":"k108", "x":7.50, "y":1.50}, + {"label":"k109", "x":8.50, "y":1.50}, + {"label":"k110", "x":9.50, "y":1.50}, + {"label":"k111", "x":10.5, "y":1.50}, + {"label":"k112", "x":11.5, "y":1.50}, + {"label":"k113", "x":12.5, "y":1.50}, + {"label":"k201", "x":0.00, "y":2.50}, + {"label":"k202", "x":1.50, "y":2.50}, + {"label":"k203", "x":2.50, "y":2.50}, + {"label":"k204", "x":3.50, "y":2.50}, + {"label":"k205", "x":4.50, "y":2.50}, + {"label":"k206", "x":5.50, "y":2.50}, + {"label":"k207", "x":6.50, "y":2.50}, + {"label":"k208", "x":7.50, "y":2.50}, + {"label":"k209", "x":8.50, "y":2.50}, + {"label":"k210", "x":9.50, "y":2.50}, + {"label":"k211", "x":10.5, "y":2.50}, + {"label":"k212", "x":11.5, "y":2.50}, + {"label":"k213", "x":12.5, "y":2.50}, + {"label":"k301", "x":0.00, "y":3.50}, + {"label":"k302", "x":1.50, "y":3.50}, + {"label":"k303", "x":2.50, "y":3.50}, + {"label":"k304", "x":3.50, "y":3.50}, + {"label":"k305", "x":4.50, "y":3.50}, + {"label":"k306", "x":5.50, "y":3.50}, + {"label":"k307", "x":6.50, "y":3.50}, + {"label":"k308", "x":7.50, "y":3.50}, + {"label":"k309", "x":8.50, "y":3.50}, + {"label":"k310", "x":9.50, "y":3.50}, + {"label":"k311", "x":10.5, "y":3.50}, + {"label":"k312", "x":11.5, "y":3.50}, + {"label":"k313", "x":12.5, "y":3.50}, + {"label":"k401", "x":0.00, "y":4.50}, + {"label":"k402", "x":1.50, "y":4.50}, + {"label":"k403", "x":2.50, "y":4.50, "w":1.50}, + {"label":"k404", "x":4.00, "y":4.50, "w":7.00}, + {"label":"k405", "x":11.0, "y":4.50, "w":1.50}, + {"label":"k413", "x":12.5, "y":4.50} + ] + } + } +} diff --git a/keyboards/kingly_keys/ave/ortho/keymaps/default/config.h b/keyboards/kingly_keys/ave/ortho/keymaps/default/config.h new file mode 100644 index 0000000000..6fba9d2b9c --- /dev/null +++ b/keyboards/kingly_keys/ave/ortho/keymaps/default/config.h @@ -0,0 +1,32 @@ + /* + Copyright 2020 Garret Gartner + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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 TAPPING_TERM_PER_KEY + +#ifdef RGBLIGHT_ENABLE + /* ws2812 RGB LED */ + #define RGB_DI_PIN B7 + #define RGBLED_NUM 2 // Number of LEDs + + #define RGBLIGHT_EFFECT_BREATHING +/* #define RGBLIGHT_HUE_STEP 6 +* #define RGBLIGHT_SAT_STEP 4 +* #define RGBLIGHT_VAL_STEP 4 +*/ +#endif diff --git a/keyboards/kingly_keys/ave/ortho/keymaps/default/keymap.c b/keyboards/kingly_keys/ave/ortho/keymaps/default/keymap.c new file mode 100644 index 0000000000..4e195d43bb --- /dev/null +++ b/keyboards/kingly_keys/ave/ortho/keymaps/default/keymap.c @@ -0,0 +1,239 @@ + /* + Copyright 2020 Garret Gartner + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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 avenue_layers { + _QWERTY, + _LOWER, + _RAISE, + _FUNCTION +}; + + + +//Tap Dance Declarations: +enum avenue_tapcodes { + TD_RST, + TD_DBQT, +}; + +void dance_rst_reset (qk_tap_dance_state_t *state, void *user_data) { // *Line_Note.001 + if (state->count >= 2) { + reset_keyboard(); + reset_tap_dance(state); + } +} + +//Tap Dance Functions: +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_RST] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, NULL, dance_rst_reset), // References "dance_rst_reset" (*Line_Note.001) + [TD_DBQT] = ACTION_TAP_DANCE_DOUBLE (KC_QUOTE, KC_DQT) +}; + + + +// Keymap Customization: +#define LOWR MO(_LOWER) +#define RISE MO(_RAISE) +#define FN MO(_FUNCTION) +#define GUI KC_LGUI +#define ALT KC_LALT +#define SPACE KC_SPACE + + /* + * ┌────┐ + * │ │ = "TRANSPARENT" KEY LOCATION + * └────┘ + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* _QWERTY (Base) + * + * ┌────┐ ┌────┐ ┌────┬────┬────┐ + * │MUTE│ │Esc │ │ \ │ - │ = │ + * └────┘ └────┘ └────┴────┴────┘ + * ┌────┐ ┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐ + * │Home│ │Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │BkSp│ + * ├────┤ ├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤ + * │PgUp│ │CAPS│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ + * ├────┤ ├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤ + * │PgDn│ │Shft│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │Entr│ + * ├────┤ ├────┼────┼────┼────┼────┼────┴────┼────┼────┼────┼────┼────┤ + * │End │ │CTL │GUI │ALT │FUNC│LOWR│ │ │RISE│Left│Down│ Up │Rght│ + * └────┘ └────┴────┴────┴────┴────┴─────────┴────┴────┴────┴────┴────┘ + */ + [_QWERTY] = LAYOUT_ortho_all( + KC_MUTE, KC_ESC, KC_BSLS, KC_MINUS, KC_EQUAL, + 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_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_PGDN, 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_END, KC_DEL, GUI, ALT, FN, LOWR, SPACE, SPACE, RISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + + /* _LOWER (Media / Symbols / Punctuation) + * + * ┌────┐ ┌────┐ ┌────┬────┬────┐ + * │ // │ │PRNT│ │ [ │ ] │ ` │ + * └────┘ └────┘ └────┴────┴────┘ + * ┌────┐ ┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐ + * │PLAY│ │ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ │ + * ├────┤ ├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤ + * │NEXT│ │ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ " │ + * ├────┤ ├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤ + * │PREV│ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┤ ├────┼────┼────┼────┼────┼────┴────┼────┼────┼────┼────┼────┤ + * │STOP│ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └────┘ └────┴────┴────┴────┴────┴─────────┴────┴────┴────┴────┴────┘ + */ + [_LOWER] = LAYOUT_ortho_all( + _______, _______, KC_LBRC, KC_RBRC, KC_GRAVE, + KC_MPLY, _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_MNXT, _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DQT, + KC_MPRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_MSTP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* _RAISE (Misc Modifiers / Extended Punctuation) + * + * ┌────┐ ┌────┐ ┌────┬────┬────┐ + * │PRNT│ │ │ │ { │ } │ ~ │ + * └────┘ └────┘ └────┴────┴────┘ + * ┌────┐ ┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┤ ├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤ + * │ │ │CAPS│ │ │ │ │ │ │ │ │ │ │ │ + * ├────┤ ├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┤ ├────┼────┼────┼────┼────┼────┴────┼────┼────┼────┼────┼────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └────┘ └────┴────┴────┴────┴────┴─────────┴────┴────┴────┴────┴────┘ + */ + [_RAISE] = LAYOUT_ortho_all( + KC_PSCR, _______, KC_LCBR, KC_RCBR, KC_TILD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* _FUNCTION (F-Row / DFU Reset / RGB Toggle) + * + * ┌────┐ ┌────┐ ┌────┬────┬────┐ + * │RSET│ │RGB │ │F11 │F12 │F13 │ + * └────┘ └────┘ └────┴────┴────┘ + * ┌────┐ ┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐ + * │ │ │ │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │F10 │ │ + * ├────┤ ├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┤ ├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┤ ├────┼────┼────┼────┼────┼────┴────┼────┼────┼────┼────┼────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └────┘ └────┴────┴────┴────┴────┴─────────┴────┴────┴────┴────┴────┘ + */ + [_FUNCTION] = LAYOUT_ortho_all( + TD(TD_RST), RGB_TOG, KC_F11, KC_F12, KC_F13, + _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + + + +// KEYMAP TEMPLATE: +// +// /* <_LAYER>: +// * +// * ┌────┐ ┌────┐ ┌────┬────┬────┐ +// * │ │ │ │ │ │ │ │ +// * └────┘ └────┘ └────┴────┴────┘ +// * ┌────┐ ┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐ +// * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +// * ├────┤ ├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤ +// * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +// * ├────┤ ├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤ +// * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +// * ├────┤ ├────┼────┼────┼────┼────┼────┴────┼────┼────┼────┼────┼────┤ +// * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +// * └────┘ └────┴────┴────┴────┴────┴─────────┴────┴────┴────┴────┴────┘ +// */ +// [] = LAYOUT_ortho_all( +// _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ) + + +// Per-Key Tapping Term Definitions: +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case TD(TD_DBQT): + return 235; + default: + return TAPPING_TERM; + } +} + + +// Encoder Customization: (*Order-of-Keycode Specific) +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} + + + +// RGB Indicator Customization: (100% stolen from Jetpacktuxedo) +void keyboard_post_init_user(void) { + #ifdef RGBLIGHT_ENABLE +// Set up RGB effects on _only_ the first LED (index 0): + rgblight_set_effect_range(0, 1); +// Set LED effects to breathing mode in a "terminal-green" type color: + rgblight_sethsv_noeeprom(50, 255, 100); + rgblight_mode_noeeprom(RGBLIGHT_EFFECT_BREATHING + 2); +// Init the second LED to a static color: + setrgb(225, 185, 0, (LED_TYPE *)&led[1]); + rgblight_set(); + #endif // RGBLIGHT_ENABLE +} + +// RGB Indicator Customization: (cont.) +layer_state_t layer_state_set_user(layer_state_t state){ + #ifdef RGBLIGHT_ENABLE + uint8_t led1r = 0; uint8_t led1g = 0; uint8_t led1b = 0; + if (layer_state_cmp(state, 1)) { + led1b = 255; + } + if (layer_state_cmp(state, 3)) { + led1r = 200; + } + setrgb(led1r, led1g, led1b, (LED_TYPE *)&led[1]); + rgblight_set(); + #endif //RGBLIGHT_ENABLE + return state; +} diff --git a/keyboards/kingly_keys/ave/ortho/keymaps/default/rules.mk b/keyboards/kingly_keys/ave/ortho/keymaps/default/rules.mk new file mode 100644 index 0000000000..a6be46d742 --- /dev/null +++ b/keyboards/kingly_keys/ave/ortho/keymaps/default/rules.mk @@ -0,0 +1,2 @@ +# Keymap-Specific Functions +TAP_DANCE_ENABLE = yes diff --git a/keyboards/kingly_keys/ave/ortho/ortho.c b/keyboards/kingly_keys/ave/ortho/ortho.c new file mode 100644 index 0000000000..4fb95e7684 --- /dev/null +++ b/keyboards/kingly_keys/ave/ortho/ortho.c @@ -0,0 +1,18 @@ + /* + Copyright 2020 Garret Gartner + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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 "ortho.h" diff --git a/keyboards/kingly_keys/ave/ortho/ortho.h b/keyboards/kingly_keys/ave/ortho/ortho.h new file mode 100644 index 0000000000..12cdede536 --- /dev/null +++ b/keyboards/kingly_keys/ave/ortho/ortho.h @@ -0,0 +1,67 @@ + /* + Copyright 2020 Garret Gartner + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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 XXXX KC_NO + +#define LAYOUT_ortho_all( \ + k001, k002, k011, k012, k013, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, \ + k401, k402, k403, k404, k405, k406, k407, k408, k409, k410, k411, k412, k413 \ +) \ +{ \ + { k001, k002, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, k011, k012, k013 }, \ + { k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113 }, \ + { k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213 }, \ + { k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313 }, \ + { k401, k402, k403, k404, k405, k406, k407, k408, k409, k410, k411, k412, k413 } \ +} + +#define LAYOUT_ortho_2x2u( \ + k001, k002, k011, k012, k013, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, \ + k401, k402, k403, k404, k405, k406, k409, k410, k411, k412, k413 \ +) \ +{ \ + { k001, k002, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, k011, k012, k013 }, \ + { k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113 }, \ + { k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213 }, \ + { k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313 }, \ + { k401, k402, k403, k404, k405, k406, XXXX, XXXX, k409, k410, k411, k412, k413 } \ +} + +#define LAYOUT_ortho_big_boy( \ + k001, k002, k011, k012, k013, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, \ + k401, k402, k403, k407, k412, k413 \ +) \ +{ \ + { k001, k002, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, k011, k012, k013 }, \ + { k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113 }, \ + { k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213 }, \ + { k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313 }, \ + { k401, k402, k403, XXXX, XXXX, XXXX, k407, XXXX, XXXX, XXXX, XXXX, k412, k413 } \ +} diff --git a/keyboards/kingly_keys/ave/ortho/rules.mk b/keyboards/kingly_keys/ave/ortho/rules.mk new file mode 100644 index 0000000000..611eb0ce1a --- /dev/null +++ b/keyboards/kingly_keys/ave/ortho/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes diff --git a/keyboards/kingly_keys/ave/readme.md b/keyboards/kingly_keys/ave/readme.md new file mode 100644 index 0000000000..080edf4966 --- /dev/null +++ b/keyboards/kingly_keys/ave/readme.md @@ -0,0 +1,21 @@ +# The Ave. (Avenue) + +![ave-img-1](https://i.imgur.com/l5ah6uMl.png) + +A Compact Battlestation. + +- Keyboard Maintainer: [The-Royal](https://github.com/the-royal) +- Hardware Supported: Rev10.0 Avenue PCBs *(Ortholinear & Staggered)* +- Hardware Availability: Through group-buy or self procurement via open-source files. + +Make examples for this keyboard (after setting up your build environment): + +**Ortholinear:** + + make kingly_keys/ave/ortho:default + +**Staggered:** + + make kingly_keys/ave/staggered: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/kingly_keys/ave/staggered/info.json b/keyboards/kingly_keys/ave/staggered/info.json new file mode 100644 index 0000000000..9a64cdeb36 --- /dev/null +++ b/keyboards/kingly_keys/ave/staggered/info.json @@ -0,0 +1,117 @@ +{ + "keyboard_name": "The Ave. (Staggered Ed. PCB)", + "url": "", + "maintainer": "the-royal", + "width": 13.5, + "height": 5.5, + "layouts": { + "LAYOUT_staggered": { + "layout": [ + {"label":"k001", "x":0.00, "y":0.00}, + {"label":"k002", "x":1.50, "y":0.00}, + {"label":"k011", "x":10.5, "y":0.00}, + {"label":"k012", "x":11.5, "y":0.00}, + {"label":"k013", "x":12.5, "y":0.00}, + {"label":"k101", "x":0.00, "y":1.50}, + {"label":"k102", "x":1.50, "y":1.50}, + {"label":"k103", "x":2.50, "y":1.50}, + {"label":"k104", "x":3.50, "y":1.50}, + {"label":"k105", "x":4.50, "y":1.50}, + {"label":"k106", "x":5.50, "y":1.50}, + {"label":"k107", "x":6.50, "y":1.50}, + {"label":"k108", "x":7.50, "y":1.50}, + {"label":"k109", "x":8.50, "y":1.50}, + {"label":"k110", "x":9.50, "y":1.50}, + {"label":"k111", "x":10.5, "y":1.50}, + {"label":"k112", "x":11.5, "y":1.50}, + {"label":"k113", "x":12.5, "y":1.50}, + {"label":"k201", "x":0.00, "y":2.50}, + {"label":"k202", "x":1.50, "y":2.50, "w":1.25}, + {"label":"k203", "x":2.75, "y":2.50}, + {"label":"k204", "x":3.75, "y":2.50}, + {"label":"k205", "x":4.75, "y":2.50}, + {"label":"k206", "x":5.75, "y":2.50}, + {"label":"k207", "x":6.75, "y":2.50}, + {"label":"k208", "x":7.75, "y":2.50}, + {"label":"k209", "x":8.75, "y":2.50}, + {"label":"k210", "x":9.75, "y":2.50}, + {"label":"k211", "x":10.75, "y":2.5}, + {"label":"k213", "x":11.75, "y":2.5, "w":1.75}, + {"label":"k301", "x":0.00, "y":3.50}, + {"label":"k302", "x":1.50, "y":3.50, "w":1.75}, + {"label":"k303", "x":3.25, "y":3.50}, + {"label":"k304", "x":4.25, "y":3.50}, + {"label":"k305", "x":5.25, "y":3.50}, + {"label":"k306", "x":6.25, "y":3.50}, + {"label":"k307", "x":7.25, "y":3.50}, + {"label":"k308", "x":8.25, "y":3.50}, + {"label":"k309", "x":9.25, "y":3.50}, + {"label":"k310", "x":10.25, "y":3.50}, + {"label":"k312", "x":11.25, "y":3.50}, + {"label":"k313", "x":12.25, "y":3.50, "w":1.25}, + {"label":"k401", "x":0.00, "y":4.50}, + {"label":"k402", "x":1.50, "y":4.50, "w":1.25}, + {"label":"k403", "x":2.75, "y":4.50}, + {"label":"k404", "x":3.75, "y":4.50, "w":1.25}, + {"label":"k406", "x":5.00, "y":4.50, "w":2.75}, + {"label":"k408", "x":7.75, "y":4.50, "w":2.25}, + {"label":"k411", "x":10.0, "y":4.50, "w":1.25}, + {"label":"k412", "x":11.25, "y":4.50}, + {"label":"k413", "x":12.25, "y":4.50, "w":1.25} + ] + }, + "LAYOUT_staggered_big_boy": { + "layout": [ + {"label":"k001", "x":0.00, "y":0.00}, + {"label":"k002", "x":1.50, "y":0.00}, + {"label":"k011", "x":10.5, "y":0.00}, + {"label":"k012", "x":11.5, "y":0.00}, + {"label":"k013", "x":12.5, "y":0.00}, + {"label":"k101", "x":0.00, "y":1.50}, + {"label":"k102", "x":1.50, "y":1.50}, + {"label":"k103", "x":2.50, "y":1.50}, + {"label":"k104", "x":3.50, "y":1.50}, + {"label":"k105", "x":4.50, "y":1.50}, + {"label":"k106", "x":5.50, "y":1.50}, + {"label":"k107", "x":6.50, "y":1.50}, + {"label":"k108", "x":7.50, "y":1.50}, + {"label":"k109", "x":8.50, "y":1.50}, + {"label":"k110", "x":9.50, "y":1.50}, + {"label":"k111", "x":10.5, "y":1.50}, + {"label":"k112", "x":11.5, "y":1.50}, + {"label":"k113", "x":12.5, "y":1.50}, + {"label":"k201", "x":0.00, "y":2.50}, + {"label":"k202", "x":1.50, "y":2.50, "w":1.25}, + {"label":"k203", "x":2.75, "y":2.50}, + {"label":"k204", "x":3.75, "y":2.50}, + {"label":"k205", "x":4.75, "y":2.50}, + {"label":"k206", "x":5.75, "y":2.50}, + {"label":"k207", "x":6.75, "y":2.50}, + {"label":"k208", "x":7.75, "y":2.50}, + {"label":"k209", "x":8.75, "y":2.50}, + {"label":"k210", "x":9.75, "y":2.50}, + {"label":"k211", "x":10.75, "y":2.5}, + {"label":"k213", "x":11.75, "y":2.5, "w":1.75}, + {"label":"k301", "x":0.00, "y":3.50}, + {"label":"k302", "x":1.50, "y":3.50, "w":1.75}, + {"label":"k303", "x":3.25, "y":3.50}, + {"label":"k304", "x":4.25, "y":3.50}, + {"label":"k305", "x":5.25, "y":3.50}, + {"label":"k306", "x":6.25, "y":3.50}, + {"label":"k307", "x":7.25, "y":3.50}, + {"label":"k308", "x":8.25, "y":3.50}, + {"label":"k309", "x":9.25, "y":3.50}, + {"label":"k310", "x":10.25, "y":3.50}, + {"label":"k312", "x":11.25, "y":3.50}, + {"label":"k313", "x":12.25, "y":3.50, "w":1.25}, + {"label":"k401", "x":0.00, "y":4.50}, + {"label":"k402", "x":1.50, "y":4.50, "w":1.25}, + {"label":"k403", "x":2.75, "y":4.50}, + {"label":"k406", "x":3.75, "y":4.50, "w":6.25}, + {"label":"k411", "x":10.0, "y":4.50, "w":1.25}, + {"label":"k412", "x":11.25, "y":4.50}, + {"label":"k413", "x":12.25, "y":4.50, "w":1.25} + ] + } + } +} diff --git a/keyboards/kingly_keys/ave/staggered/keymaps/default/config.h b/keyboards/kingly_keys/ave/staggered/keymaps/default/config.h new file mode 100644 index 0000000000..6fba9d2b9c --- /dev/null +++ b/keyboards/kingly_keys/ave/staggered/keymaps/default/config.h @@ -0,0 +1,32 @@ + /* + Copyright 2020 Garret Gartner + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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 TAPPING_TERM_PER_KEY + +#ifdef RGBLIGHT_ENABLE + /* ws2812 RGB LED */ + #define RGB_DI_PIN B7 + #define RGBLED_NUM 2 // Number of LEDs + + #define RGBLIGHT_EFFECT_BREATHING +/* #define RGBLIGHT_HUE_STEP 6 +* #define RGBLIGHT_SAT_STEP 4 +* #define RGBLIGHT_VAL_STEP 4 +*/ +#endif diff --git a/keyboards/kingly_keys/ave/staggered/keymaps/default/keymap.c b/keyboards/kingly_keys/ave/staggered/keymaps/default/keymap.c new file mode 100644 index 0000000000..16f469b53a --- /dev/null +++ b/keyboards/kingly_keys/ave/staggered/keymaps/default/keymap.c @@ -0,0 +1,241 @@ + /* + Copyright 2020 Garret Gartner + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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 avenue_layers { + _QWERTY, + _LOWER, + _RAISE, + _FUNCTION +}; + + + +//Tap Dance Declarations: +enum avenue_tapcodes { + TD_RST, + TD_DBQT, +}; + +void dance_rst_reset (qk_tap_dance_state_t *state, void *user_data) { // *Line_Note.001 + if (state->count >= 2) { + reset_keyboard(); + reset_tap_dance(state); + } +} + +//Tap Dance Functions: +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_RST] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, NULL, dance_rst_reset), // References "dance_rst_reset" (*Line_Note.001) + [TD_DBQT] = ACTION_TAP_DANCE_DOUBLE (KC_QUOTE, KC_DQT) +}; + + + +// Keymap Customization: +#define LOWR MO(_LOWER) +#define RISE MO(_RAISE) +#define FN MO(_FUNCTION) +#define GUI KC_LGUI +#define ALT KC_LALT +#define SPACE KC_SPACE + + /* + * ┌────┐ + * │ │ = "TRANSPARENT" KEY LOCATION + * └────┘ + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* _QWERTY (Base) + * + * ┌────┐ ┌────┐ ┌────┬────┬────┐ + * │MUTE│ │Esc │ │ ( │ ) │ ; │ + * └────┘ └────┘ └────┴────┴────┘ + * ┌────┐ ┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐ + * │Home│ │Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │BkSp│ + * ├────┤ ├────┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴────┤ + * │PgUp│ │CAPS │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Enter │ + * ├────┤ ├─────┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─────┤ + * │PgDn│ │LShft │ Z │ X │ C │ V │ B │ N │ M │ , │ . │RISE │ + * ├────┤ ├─────┬──┴─┬──┴──┬─┴────┴────┴──┬─┴────┴───┬┴────┼────┼─────┤ + * │End │ │LCtrl│GUI │ALT │ LOWR │ │RAlt │RCTL│FUNC │ + * └────┘ └─────┴────┴─────┴──────────────┴──────────┴─────┴────┴─────┘ + */ + [_QWERTY] = LAYOUT_staggered( + KC_MUTE, KC_ESC, KC_LPRN, KC_RPRN, KC_SCLN, + 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_BSPC, + KC_PGUP, KC_CAPS, 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, RISE, + KC_END, KC_LCTL, GUI, ALT, LOWR, SPACE, KC_RALT, KC_RCTL, FN + ), + + /* _LOWER (Symbols / Punctuation) + * + * ┌────┐ ┌────┐ ┌────┬────┬────┐ + * │ │ │ │ │ [ │ ] │ : │ + * └────┘ └────┘ └────┴────┴────┘ + * ┌────┐ ┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐ + * │ - │ │ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ │ + * ├────┤ ├────┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴────┤ + * │ \ │ │ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ │ '/" │ + * ├────┤ ├─────┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┤ ├─────┬──┴─┬──┴──┬─┴────┴────┴──┬─┴────┴───┬┴────┼────┼─────┤ + * │ _ │ │ │ │ │ │ │ │ │ │ + * └────┘ └─────┴────┴─────┴──────────────┴──────────┴─────┴────┴─────┘ + */ + [_LOWER] = LAYOUT_staggered( + _______, _______, KC_LBRC, KC_RBRC, KC_COLON, + KC_MINUS, KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_BSLS, KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, _______, TD(TD_DBQT), + KC_PIPE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_UNDS, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* _RAISE (Misc Modifiers / Extended Punctuation) + * + * ┌────┐ ┌────┐ ┌────┬────┬────┐ + * │PRNT│ │ │ │ { │ } │ + │ + * └────┘ └────┘ └────┴────┴────┘ + * ┌────┐ ┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ Up │ │ │ + * ├────┤ ├────┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴────┤ + * │ │ │CAPS │ │ │ │ │ │ │ │Left│Rght│ │ + * ├────┤ ├─────┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─────┤ + * │ │ │ │ │ │ │ │ │ │ │Down│ / │ │ + * ├────┤ ├─────┬──┴─┬──┴──┬─┴────┴────┴──┬─┴────┴───┬┴────┼────┼─────┤ + * │ │ │ │ │ │ │ │ │ ? │ │ + * └────┘ └─────┴────┴─────┴──────────────┴──────────┴─────┴────┴─────┘ + */ + [_RAISE] = LAYOUT_staggered( + KC_PSCR, _______, KC_LCBR, KC_RCBR, KC_PLUS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, + _______, KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RIGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, KC_SLSH, _______, + _______, _______, _______, _______, _______, _______, _______, KC_QUES, _______ + ), + + /* _FUNCTION (F-Row / DFU Reset / RGB Toggle) + * + * ┌────┐ ┌────┐ ┌────┬────┬────┐ + * │RSET│ │RGB │ │F11 │F12 │F13 │ + * └────┘ └────┘ └────┴────┴────┘ + * ┌────┐ ┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐ + * │ │ │ │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │F10 │ │ + * ├────┤ ├────┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ = │ + * ├────┤ ├─────┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┤ ├─────┬──┴─┬──┴──┬─┴────┴────┴──┬─┴────┴───┬┴────┼────┼─────┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┘ └─────┴────┴─────┴──────────────┴──────────┴─────┴────┴─────┘ + */ + [_FUNCTION] = LAYOUT_staggered( + TD(TD_RST), RGB_TOG, KC_F11, KC_F12, KC_F13, + _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_EQUAL, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + + + +// KEYMAP TEMPLATE: +// +// /* <_LAYER>: +// * +// * ┌────┐ ┌────┐ ┌────┬────┬────┐ +// * │ │ │ │ │ │ │ │ +// * └────┘ └────┘ └────┴────┴────┘ +// * ┌────┐ ┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐ +// * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +// * ├────┤ ├────┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴────┤ +// * │ │ │ │ │ │ │ │ │ │ │ │ │ │ +// * ├────┤ ├─────┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─────┤ +// * │ │ │ │ │ │ │ │ │ │ │ │ │ │ +// * ├────┤ ├─────┬──┴─┬──┴──┬─┴────┴────┴──┬─┴────┴───┬┴────┼────┼─────┤ +// * │ │ │ │ │ │ │ │ │ │ │ +// * └────┘ └─────┴────┴─────┴──────────────┴──────────┴─────┴────┴─────┘ +// */ +// [<_LAYER>] = LAYOUT_staggered( +// _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ) + + + +// Per-Key Tapping Term Definitions: +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case TD(TD_DBQT): + return 235; + default: + return TAPPING_TERM; + } +} + + + +// Encoder Customization: (*Order-of-Keycode Specific) +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} + + + +// RGB Indicator Customization: (100% stolen from Jetpacktuxedo) +void keyboard_post_init_user(void) { + #ifdef RGBLIGHT_ENABLE +// Set up RGB effects on _only_ the first LED (index 0): + rgblight_set_effect_range(0, 1); +// Set LED effects to breathing mode in a "terminal-green" type color: + rgblight_sethsv_noeeprom(50, 255, 100); + rgblight_mode_noeeprom(RGBLIGHT_EFFECT_BREATHING + 2); +// Init the second LED to a static color: + setrgb(225, 185, 0, (LED_TYPE *)&led[1]); + rgblight_set(); + #endif // RGBLIGHT_ENABLE +} + +// RGB Indicator Customization: (cont.) +layer_state_t layer_state_set_user(layer_state_t state){ + #ifdef RGBLIGHT_ENABLE + uint8_t led1r = 0; uint8_t led1g = 0; uint8_t led1b = 0; + if (layer_state_cmp(state, 1)) { + led1b = 255; + } + if (layer_state_cmp(state, 3)) { + led1r = 200; + } + setrgb(led1r, led1g, led1b, (LED_TYPE *)&led[1]); + rgblight_set(); + #endif //RGBLIGHT_ENABLE + return state; +} diff --git a/keyboards/kingly_keys/ave/staggered/keymaps/default/rules.mk b/keyboards/kingly_keys/ave/staggered/keymaps/default/rules.mk new file mode 100644 index 0000000000..a6be46d742 --- /dev/null +++ b/keyboards/kingly_keys/ave/staggered/keymaps/default/rules.mk @@ -0,0 +1,2 @@ +# Keymap-Specific Functions +TAP_DANCE_ENABLE = yes diff --git a/keyboards/kingly_keys/ave/staggered/rules.mk b/keyboards/kingly_keys/ave/staggered/rules.mk new file mode 100644 index 0000000000..611eb0ce1a --- /dev/null +++ b/keyboards/kingly_keys/ave/staggered/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes diff --git a/keyboards/kingly_keys/ave/staggered/staggered.c b/keyboards/kingly_keys/ave/staggered/staggered.c new file mode 100644 index 0000000000..4aa0d45ea3 --- /dev/null +++ b/keyboards/kingly_keys/ave/staggered/staggered.c @@ -0,0 +1,18 @@ + /* + Copyright 2020 Garret Gartner + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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 "staggered.h" diff --git a/keyboards/kingly_keys/ave/staggered/staggered.h b/keyboards/kingly_keys/ave/staggered/staggered.h new file mode 100644 index 0000000000..674122bc0c --- /dev/null +++ b/keyboards/kingly_keys/ave/staggered/staggered.h @@ -0,0 +1,52 @@ + /* + Copyright 2020 Garret Gartner + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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 XXXX KC_NO + +#define LAYOUT_staggered( \ + k001, k002, k011, k012, k013, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k312, k313, \ + k401, k402, k403, k404, k406, k408, k411, k412, k413 \ +) \ +{ \ + { k001, k002, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, k011, k012, k013 }, \ + { k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113 }, \ + { k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, XXXX, k213 }, \ + { k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, XXXX, k312, k313 }, \ + { k401, k402, k403, k404, XXXX, k406, XXXX, k408, XXXX, XXXX, k411, k412, k413 } \ +} + +#define LAYOUT_staggered_big_boy( \ + k001, k002, k011, k012, k013, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k312, k313, \ + k401, k402, k403, k406, k411, k412, k413 \ +) \ +{ \ + { k001, k002, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, k011, k012, k013 }, \ + { k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113 }, \ + { k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, XXXX, k213 }, \ + { k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, XXXX, k312, k313 }, \ + { k401, k402, k403, XXXX, XXXX, k406, XXXX, XXXX, XXXX, XXXX, k411, k412, k413 } \ +} From a9f65b760a49744b13d822ab359876a52779bd9e Mon Sep 17 00:00:00 2001 From: rupa Date: Tue, 10 Nov 2020 00:04:46 -0500 Subject: [PATCH 051/114] userspace and keymap changes for rupa (#10489) * userspace and keymap changes for rupa * remove layout wrappers and blocker rows from wrappers handle this in keymaps for now --- keyboards/tada68/keymaps/rupa/config.h | 7 - keyboards/tada68/keymaps/rupa/keymap.c | 73 +++++------ keyboards/tada68/keymaps/rupa/readme.md | 8 +- keyboards/tada68/keymaps/rupa/rules.mk | 1 - users/rupa/config.h | 3 + users/rupa/process_records.c | 118 ++++++++++++----- users/rupa/process_records.h | 0 users/rupa/readme.md | 7 + users/rupa/rules.mk | 2 + users/rupa/rupa.c | 43 +++++- users/rupa/rupa.h | 50 +++++-- users/rupa/unicode.c | 167 +++++++++++++++++++++--- users/rupa/unicode.h | 52 ++++++-- users/rupa/wrappers.h | 122 +++++++++++++++++ 14 files changed, 520 insertions(+), 133 deletions(-) mode change 100755 => 100644 users/rupa/process_records.c mode change 100755 => 100644 users/rupa/process_records.h create mode 100644 users/rupa/readme.md mode change 100755 => 100644 users/rupa/rupa.c mode change 100755 => 100644 users/rupa/rupa.h mode change 100755 => 100644 users/rupa/unicode.c mode change 100755 => 100644 users/rupa/unicode.h create mode 100644 users/rupa/wrappers.h diff --git a/keyboards/tada68/keymaps/rupa/config.h b/keyboards/tada68/keymaps/rupa/config.h index ddbf0ab667..e1a6eb1a2b 100644 --- a/keyboards/tada68/keymaps/rupa/config.h +++ b/keyboards/tada68/keymaps/rupa/config.h @@ -1,10 +1,3 @@ #pragma once #define GRAVE_ESC_ALT_OVERRIDE - -/* disable 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/tada68/keymaps/rupa/keymap.c b/keyboards/tada68/keymaps/rupa/keymap.c index 3a8a550561..ce95673af4 100755 --- a/keyboards/tada68/keymaps/rupa/keymap.c +++ b/keyboards/tada68/keymaps/rupa/keymap.c @@ -1,45 +1,38 @@ #include "rupa.h" -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _QWERTY: (Base Layer) Default Layer - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ - * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│~ `│ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ - * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │Del│ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ - * │ Fn │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ - * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ ↑ │PgD│ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ - * │Ctrl│Alt │Gui │ Space │Fn │Alt│Ctl│ ← │ ↓ │ → │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ - */ - [_QWERTY] = LAYOUT_65_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_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, - RAISE, 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_LALT, KC_LGUI, KC_SPC, RAISE, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT - ), +#define LAYOUT_65_ansi_wrapper(...) LAYOUT_65_ansi(__VA_ARGS__) - /* Keymap _RAISE: Function Layer - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ - * │LOD│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ Del │Hme│ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ - * │ │VSN│U_s│U_f│U_m│ │ │uni│ │ ॐ │ │♩ ♪│♫ ♬│★ ☆ │Ins│ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ ✓ │End│ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ - * │ RShift │ ⸮ │Rup│Brt│Bls│Blt│ │Mut│V- │V+ │‽ ☭│ McL│M↑ │McR│ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ - * │RCtl│RAlt│RGui│ │ │ │CAP│M← │M↓ │M→ │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ - */ - [_RAISE] = LAYOUT_65_ansi( - LOD, 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, - _______, VRSN, U_SCRPT, U_FRACT, U_MONOS, _______, _______, UC_MOD, _______, X(OM), _______, XP(M4,M8), XP(M8B,M16), XP(STB, STW), KC_INS, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, X(CHEK), KC_END, - OS_RSFT, X(IRNY), RUPA, BL_BRTG, BL_STEP, BL_TOGG, _______, KC_MUTE, KC_VOLD, KC_VOLU, XP(IBNG,HAS), KC_BTN1, KC_MS_U, KC_BTN2, - OS_RCTL, OS_RALT, OS_RGUI, _______, _______, _______, KC_CAPS, KC_MS_L, KC_MS_D, KC_MS_R +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_65_ansi_wrapper( + ____65_QWERTY______________ROW1, + ____65_QWERTY______________ROW2, + ____65_QWERTY______________ROW3, + ____65_QWERTY______________ROW4, + ____65_QWERTY______________ROW5 + ), + [_RAISE] = LAYOUT_65_ansi_wrapper( + ____65_RAISE_______________ROW1, + ____65_RAISE_______________ROW2, + ____65_RAISE_______________ROW3, + ____65_RAISE_______________ROW4, + ____65_RAISE_______________ROW5 + ), + [_LOWER] = LAYOUT_65_ansi_wrapper( + ____65_LOWER_______________ROW1, + ____65_LOWER_______________ROW2, + ____65_LOWER_______________ROW3, + ____65_LOWER_______________ROW4, + ____65_LOWER_______________ROW5 + ), + [_ADJUST] = LAYOUT_65_ansi_wrapper( + ____65_ADJUST______________ROW1, + ____65_ADJUST___________BL_ROW2, + ____65_ADJUST______________ROW3, + ____65_ADJUST______________ROW4, + ____65_ADJUST______________ROW5 ), }; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/tada68/keymaps/rupa/readme.md b/keyboards/tada68/keymaps/rupa/readme.md index 77629131a0..eea966fdb9 100755 --- a/keyboards/tada68/keymaps/rupa/readme.md +++ b/keyboards/tada68/keymaps/rupa/readme.md @@ -2,9 +2,7 @@ i've swapped the lufa-ms bootloader for caterina -most everything is in my userspace dir - -console mode is on, and there's barely any room left! +most everything is in my [userspace](../../../../users/rupa/) * win/alt -> alt/cmd * alt/fn -> fn/alt @@ -16,6 +14,6 @@ fn layer: * rotate mute/vol * backlight -> breathing, step, toggle * swap home and ins - * unicode chars sprinkled around - * script mode! + * unicode chars and strings sprinkled around + * script modes! * (one-shot) right versions of shift/ctl/alt/gui (not working quite right yet) diff --git a/keyboards/tada68/keymaps/rupa/rules.mk b/keyboards/tada68/keymaps/rupa/rules.mk index df6f5674b5..1777fc10a2 100644 --- a/keyboards/tada68/keymaps/rupa/rules.mk +++ b/keyboards/tada68/keymaps/rupa/rules.mk @@ -1,4 +1,3 @@ BOOTLOADER = caterina -UNICODEMAP_ENABLE = yes CONSOLE_ENABLE = yes diff --git a/users/rupa/config.h b/users/rupa/config.h index 9024052042..723d9b3b5f 100644 --- a/users/rupa/config.h +++ b/users/rupa/config.h @@ -5,4 +5,7 @@ #define ONESHOT_TAP_TOGGLE 5 #define ONESHOT_TIMEOUT 5000 +#undef TAP_CODE_DELAY #define TAP_CODE_DELAY 5 //DEFAULT: 100 + +//#define UNICODE_SCRIPT_MODE_ENABLE diff --git a/users/rupa/process_records.c b/users/rupa/process_records.c old mode 100755 new mode 100644 index 2d72310100..2d23e34017 --- a/users/rupa/process_records.c +++ b/users/rupa/process_records.c @@ -17,7 +17,7 @@ along with this program. If not, see . #include "rupa.h" -font_t *translator = NULL; +uint16_t processed_keycode; __attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { @@ -25,47 +25,93 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { } bool process_record_user(uint16_t keycode, keyrecord_t *record) { - bool is_shifted = get_mods()&MOD_MASK_SHIFT; - bool is_pressed = record->event.pressed; + if (record->event.pressed) { - switch(keycode) { - case VRSN: - if (is_pressed) { + processed_keycode = keycode; + // mask out mod taps + if ( + (keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || + (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) + ) { + processed_keycode &= 0xFF; + } + + bool is_shifted = (get_mods() | get_oneshot_mods() | get_weak_mods()) & MOD_MASK_SHIFT; + switch(processed_keycode) { + case VRSN: send_string_with_delay_P(PSTR( - "# " QMK_KEYBOARD "/" QMK_KEYMAP ":" QMK_VERSION " " QMK_BUILDDATE "\n" + "# " QMK_KEYBOARD "/" QMK_KEYMAP ":" QMK_VERSION " " QMK_BUILDDATE "\n" ), TAP_CODE_DELAY); - } - return false; + return false; - case LOD: - case RUPA: - if (is_pressed) { - if (keycode == LOD) { - send_unicode_string((is_shifted ? "¯\\_(ツ)_/¯" : "ಠ_ಠ")); - } else if (keycode == RUPA) { - send_unicode_string((is_shifted ? "Śrīrūpa" : "rūpa")); + case BUGS: + return u_xp(is_shifted, "ᙙᙖ", "ଳ"); + case CATS: + return u_xp(is_shifted, "ⓛ ᆽ ⓛ ", "ㅇㅅㅇ"); + case DANCE: + return u_x(dance(is_shifted)); + case DICE: + return u_x(d6()); + case DOMO: + return u_xp(is_shifted, "(シ_ _)シ", "m(_ _)m"); + case FART: + return u_x("⊥ʶ∀Ⅎ"); + case FLIP: + return u_x(flip(is_shifted)); + case HUGS: + return u_xp(is_shifted, "(づ ̄ ³ ̄)づ", "(っಠ‿ಠ)っ"); + case JOY: + return u_x(joy(is_shifted)); + case RNDM: + return false; + case KISS: + return u_xp(is_shifted, "꒒ ০ ⌵ ୧ ♡", "( ˘ ³˘)♥"); + case LOD: + return u_xp(is_shifted, "( ͡ಠ ʖ̯ ͡ಠ)", "ಠ_ಠ"); + case MUSIC: + return u_xp(is_shifted, "(˳˘ ɜ˘)˳ ♬ ♪♫", "(´▽`)ノ♫"); + case RUPA: + return u_xp(is_shifted, "Śrīrūpa", "rūpa"); + case SHRUG: + return u_xp(is_shifted, "⋌ ༼ •̀ ⌂ •́ ༽⋋", "¯\\_(ツ)_/¯"); + case TADA: + return u_xp(is_shifted, "☆ *・゜゚・*(^O^)/*・゜゚・*☆", "\\(゜ロ\\)Ξ(//ロ゜)//"); + case WAT: + return u_xp(is_shifted, "༼ ຶཽཀ ຶཽ༽", "ヽ༼⊙_⊙༽ノ"); + case YUNO: + return u_xp(is_shifted, "o(^^o)", "щ(゜ロ゜щ)"); + case ZALGO: + set_combined_mode(CM_ZALGO); + break; + case ZZZZZ: + cycle_combined_mode(); + break; + +#if defined(UNICODE_SCRIPT_MODE_ENABLE) + // script modes + case U_FRACT: + return set_script_mode(F_FRACT); + case U_ITALI: + return set_script_mode(F_ITALI); + case U_MONOS: + return set_script_mode(F_MONOS); + case U_NORML: + return set_script_mode(F_NORML); + case U_SANSI: + return set_script_mode(F_SANSI); + case U_SANSN: + return set_script_mode(F_SANSN); + case U_SCRPT: + return set_script_mode(F_SCRPT); + + default: + if (get_script_mode() != NULL) { + return script_mode_translate(is_shifted, processed_keycode); } - } - return false; - - // script modes - case U_FRACT: - case U_MONOS: - case U_SCRPT: - if (is_pressed) { - if (keycode == U_SCRPT) { - translator = (translator == &script_bold ? NULL : &script_bold); - } else if (keycode == U_FRACT) { - translator = (translator == &fraktu_bold ? NULL : &fraktu_bold); - } else if (keycode == U_MONOS) { - translator = (translator == &monosp_bold ? NULL : &monosp_bold); + if (combined_mode != CM_NULL && combined_text(processed_keycode)) { + return false; } - } - return true; - - default: - if (is_pressed && translator != NULL) { - return script_mode_translate(translator, is_shifted, keycode); +#endif } } return process_record_keymap(keycode, record); diff --git a/users/rupa/process_records.h b/users/rupa/process_records.h old mode 100755 new mode 100644 diff --git a/users/rupa/readme.md b/users/rupa/readme.md new file mode 100644 index 0000000000..b6c2dd1f7f --- /dev/null +++ b/users/rupa/readme.md @@ -0,0 +1,7 @@ +# rupa's userspace + +* rupa.c has some unicode script mode stuff +* unicode.c has my unicode map +* process_record.c has my keycode handler + +my keymap is in [keyboards/tada68](../../keyboards/tada68/keymaps/rupa/) diff --git a/users/rupa/rules.mk b/users/rupa/rules.mk index c4f147d913..ed33e85f3a 100644 --- a/users/rupa/rules.mk +++ b/users/rupa/rules.mk @@ -1,3 +1,5 @@ +UNICODEMAP_ENABLE = yes +LTO_ENABLE = yes SRC += rupa.c \ process_records.c \ unicode.c diff --git a/users/rupa/rupa.c b/users/rupa/rupa.c old mode 100755 new mode 100644 index 60fec3caf0..85de5c16fd --- a/users/rupa/rupa.c +++ b/users/rupa/rupa.c @@ -18,14 +18,46 @@ along with this program. If not, see . #include #include "rupa.h" +#if defined(UNICODE_SCRIPT_MODE_ENABLE) +const font_t * translator = NULL; + // https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols -font_t script_bold = {0x1D4D0, 0x1D4EA, 0x1D7CE}; // with bold numbers -font_t fraktu_bold = {0x1D56C, 0x1D586, 0x1D7D8}; // with doublestruck numbers -font_t monosp_bold = {0x1D670, 0x1D68A, 0x1D7F6}; +static const font_t *fonts_map[] = { + [F_FRACT] = &(font_t){0x1D56C, 0x1D586, 0x1D7D8}, // fraktur/doublestruck numbers + [F_ITALI] = &(font_t){0x1D468, 0x1D482, 0x1D7CE}, // italic/bold numbers + [F_MONOS] = &(font_t){0x1D670, 0x1D68A, 0x1D7F6}, // monospace + [F_NORML] = &(font_t){0x1D400, 0x1D41A, 0x00030}, // normal! + [F_SANSI] = &(font_t){0x1D63C, 0x1D656, 0x1D7EC}, // sans 1talic/sans bold numbers + [F_SANSN] = &(font_t){0x1D5D4, 0x1D5EE, 0x1D7E2}, // sans normal/sans numbers + [F_SCRPT] = &(font_t){0x1D4D0, 0x1D4EA, 0x1D7CE}, // script/bold numbers +}; + +/* +font_t doublestruc = {0x1D538, 0x1D552, 0x1D7D8}; +uint_32 []snowflakes = { + // doublestruck + 0x1D53B, // C + 0x1D540, // H + 0x1D546, // N + 0x1D548, // P + 0x1D549, // Q + 0x1D54A, // R + 0x1D552, // Z +}; +*/ + +const font_t *get_script_mode(void) { + return translator; +} +bool set_script_mode(int fc) { + translator = translator == fonts_map[fc] ? NULL : fonts_map[fc]; + dprintf("set_script_mode: %u %b\n", fc, translator != NULL); + return true; +} // Maps A-Z, a-z, and 0-9 to other unicode ranges. We also map space to EN // SPACE for some reason :) -uint32_t map_alnum(font_t *f, bool is_shifted, uint32_t keycode) { +uint32_t map_alnum(const font_t *f, bool is_shifted, uint32_t keycode) { switch (keycode) { case KC_SPACE: return (is_shifted ? 0 : 0x2002); // EN SPACE @@ -40,10 +72,11 @@ uint32_t map_alnum(font_t *f, bool is_shifted, uint32_t keycode) { } } -bool script_mode_translate(font_t *translator, bool is_shifted, uint32_t keycode) { +bool script_mode_translate(bool is_shifted, uint32_t keycode) { uint32_t translated = map_alnum(translator, is_shifted, keycode); if (translated == 0) return true; dprintf("script_mode_translate: %u => %d\n", keycode, translated); register_unicode(translated); return false; } +#endif diff --git a/users/rupa/rupa.h b/users/rupa/rupa.h old mode 100755 new mode 100644 index 9be3a2d62f..cfe873ffc6 --- a/users/rupa/rupa.h +++ b/users/rupa/rupa.h @@ -20,19 +20,55 @@ along with this program. If not, see . #include "version.h" #include "process_records.h" #include "unicode.h" +#include "wrappers.h" enum userspace_layers { _QWERTY = 0, + _LOWER, _RAISE, + _ADJUST }; enum userspace_custom_keycodes { VRSN = SAFE_RANGE, + BUGS, + CATS, + DANCE, + DICE, + DOMO, + FART, + FLIP, + HUGS, + JOY, + KISS, LOD, + MUSIC, + RNDM, RUPA, + SHRUG, + TADA, U_FRACT, + U_ITALI, U_MONOS, + U_NORML, + U_SANSI, + U_SANSN, U_SCRPT, + WAT, + YUNO, + ZALGO, + ZZZZZ, + NEXT_SAFE_RANGE +}; + +enum userspace_font_choices { + F_FRACT = 0, + F_ITALI, + F_MONOS, + F_NORML, + F_SANSI, + F_SANSN, + F_SCRPT }; typedef struct font_t { @@ -41,14 +77,6 @@ typedef struct font_t { uint32_t zero_glyph; } font_t; -font_t fraktu_bold; -font_t monosp_bold; -font_t script_bold; - -bool script_mode_translate(font_t *translator, bool is_shifted, uint32_t keycode); - -#define RAISE MO(_RAISE) -#define OS_RGUI OSM(MOD_RGUI) -#define OS_RALT OSM(MOD_RALT) -#define OS_RCTL OSM(MOD_RCTL) -#define OS_RSFT OSM(MOD_RSFT) +const font_t* get_script_mode(void); +bool set_script_mode(int fc); +bool script_mode_translate(bool is_shifted, uint32_t keycode); diff --git a/users/rupa/unicode.c b/users/rupa/unicode.c old mode 100755 new mode 100644 index 89a0d47665..2302a95552 --- a/users/rupa/unicode.c +++ b/users/rupa/unicode.c @@ -17,26 +17,155 @@ along with this program. If not, see . #include "unicode.h" +combined_mode_t combined_mode = CM_NULL; +bool _seeded = false; + #if defined(UNICODEMAP_ENABLE) const uint32_t PROGMEM unicode_map[] = { - [CHEK] = 0x2713, // ✓ - /* - [DI1] = 0x2680, // ⚀ - [DI2] = 0x2681, // ⚁ - [DI3] = 0x2682, // ⚂ - [DI4] = 0x2683, // ⚃ - [DI5] = 0x2684, // ⚄ - [DI6] = 0x2685, // ⚅ - */ - [HAS] = 0x262D, // ☭ - [IBNG] = 0x203D, // ‽ - [IRNY] = 0x2E2E, // ⸮ - [M4] = 0x2669, // ♩ - [M8] = 0x266A, // ♪ - [M8B] = 0x266B, // ♫ - [M16] = 0x266C, // ♬ - [OM] = 0x0950, // ॐ - [STB] = 0x2605, // ★ - [STW] = 0x2606, // ☆ + [CCIR] = 0x20DD, // COMBINING CIRCLE ⃝ + [CENT] = 0x00A2, // ¢ + [CHEK] = 0x2713, // ✓ + [CKEY] = 0x20E3, // COMBINING KEYCAP ⃣ + [CUI] = 0x26A0, // ⚠ + [ECKS] = 0x2716, // ✖ + [EFF] = 0x017F, // ſ + [HAS] = 0x262D, // ☭ + [HUN] = 0x1F4AF, // 💯 + [IBNG] = 0x203D, // ‽ + [IRNY] = 0x2E2E, // ⸮ + [LALL] = 0x2200, // ∀ + [LELM] = 0x2208, // ∈ + [LEXI] = 0x2203, // ∃ + [LPRO] = 0x22A2, // ⊢ + [M4] = 0x2669, // ♩ + [M8] = 0x266A, // ♪ + [M8B] = 0x266B, // ♫ + [M16] = 0x266C, // ♬ + [NEG] = 0x20E0, // COMBINING NO ⃠ + [NOPE] = 0x1F6AB, // 🚫 + [NUM] = 0x2116, // № + [OM] = 0x0950, // ॐ + [SMB] = 0x263A, // ☻ + [SMW] = 0x263B, // ☺ + [STB] = 0x2605, // ★ + [STOP] = 0x26D4, // ⛔ + [STW] = 0x2606, // ☆ }; #endif + +const char *d6_map[] = { + "⚀", "⚁", "⚂", "⚃", "⚄", "⚅" +}; +const char *dance_map[] = { + "〜( ̄▽ ̄〜)", + "(〜 ̄▽ ̄)〜" +}; +const char *dance_more_map[] = { + "ƪ(˘⌣˘)┐", + "┌(˘⌣˘)ʃ" +}; +const char *flip_map[] = { + "(╯°□°)╯︵ ┻━━┻", + "(ノ-_-)ノ・・ ┻━━┻", + "(ノꐦ⊙曲ఠ)ノ彡┻━┻" +}; +const char *flip_back_map[] = { + "┬──┬◡ノ(° -°ノ)", + "┬──┬ノ( ゜-゜ノ)", + "┬──┬ノ(ಠ_ಠノ)" +}; +const char *joy_map[] = { + "ᕕ( ᐛ )ᕗ ", + "٩(ˊᗜˋ*)و", + "٩( ᐛ )و" +}; +const char *joy_harder_map[] = { + "\\\ ٩( ᐛ )و //", + "✧*。٩(ˊᗜˋ*)و✧*。" +}; + +const char *choice(const char *choices[], int size) { + if (_seeded == false) { + srand(timer_read32()); + dprintf("_seeded the roll\n"); + _seeded = true; + } + return choices[rand() % size]; +} + +const char *d6(void) { + return choice(d6_map, 6); +} +const char *dance(bool more) { + if (more) { + return choice(dance_more_map, 2); + } + return choice(dance_map, 2); +} +const char *flip(bool flip_back) { + if (flip_back) { + return choice(flip_back_map, 3); + } + return choice(flip_map, 3); +} +const char *joy(bool harder) { + if (harder) { + return choice(joy_harder_map, 2); + } + return choice(joy_map, 3); +} + +bool u_x(const char *text) { + send_unicode_string(text); + return false; +}; +bool u_xp(bool is_shifted, const char *shifted, const char *plain) { + send_unicode_string(is_shifted ? shifted : plain); + return false; +}; + +void zalgo(void) { + int number = (rand() % (8 + 1 - 2)) + 2; + unsigned int index; + for (index=0; index KC_0 && keycode < KC_MINUS) || keycode > KC_SLASH) { + return false; + } + tap_code(keycode); + unicode_input_start(); + switch (combined_mode) { + case CM_CIRCLE: + register_hex(0x20DD); + break; + case CM_NO: + register_hex(0x20E0); + break; + case CM_KEYCAP: + register_hex(0x20E3); + break; + case CM_ZALGO: + zalgo(); + break; + default: + break; + } + unicode_input_finish(); + return true; +} + +void cycle_combined_mode(void) { + if (combined_mode++ >= CM_MAX - 1) { + combined_mode = CM_NULL; + } +} + +combined_mode_t set_combined_mode(combined_mode_t mode) { + combined_mode = combined_mode == mode ? CM_NULL : mode; + return combined_mode; +} diff --git a/users/rupa/unicode.h b/users/rupa/unicode.h old mode 100755 new mode 100644 index 0c067bd913..92303b13f5 --- a/users/rupa/unicode.h +++ b/users/rupa/unicode.h @@ -20,24 +20,58 @@ along with this program. If not, see . #if defined(UNICODEMAP_ENABLE) enum unicode_names { - CHEK, - /* - DI1, // ⚀ - DI2, // ⚁ - DI3, // ⚂ - DI4, // ⚃ - DI5, // ⚄ - DI6, // ⚅ - */ + CCIR, // COMBINING ⃝ + CENT, // ¢ + CHEK, // ✓ + CKEY, // COMBINING ⃣ + CUI, // ⚠ + ECKS, // ✖ + EFF, // ſ HAS, // ☭ + HUN, // 💯 IBNG, // ‽ IRNY, // ⸮ + LALL, // ∀ + LELM, // ∈ + LEXI, // ∃ + LPRO, // ⊢ M4, // ♩ M8, // ♪ M8B, // ♫ M16, // ♬ + NEG, // COMBINING ⃠ + NOPE, // 🚫 + NUM, // № OM, // ॐ + SMB, // ☻ + SMW, // ☺ STB, // ★ + STOP, // ⛔ STW, // ☆ }; #endif + +typedef enum combined_modes { + CM_NULL = 0, + CM_CIRCLE, + CM_NO, + CM_KEYCAP, + CM_ZALGO, + CM_MAX +} combined_mode_t; + +combined_mode_t combined_mode; + +// random choices +const char * d6(void); +const char * dance(bool more); +const char * flip(bool back); +const char * joy(bool harder); + +// like X and XP +bool u_x(const char *text); +bool u_xp(bool is_shifted, const char * shifted, const char *plain); + +bool combined_text(uint16_t keycode); +void cycle_combined_mode(void); +combined_mode_t set_combined_mode(combined_mode_t mode); diff --git a/users/rupa/wrappers.h b/users/rupa/wrappers.h new file mode 100644 index 0000000000..c5cae464b8 --- /dev/null +++ b/users/rupa/wrappers.h @@ -0,0 +1,122 @@ +/* +Copyright 2020 rupa @rupa + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 "rupa.h" + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define OS_RGUI OSM(MOD_RGUI) +#define OS_RALT OSM(MOD_RALT) +#define OS_RCTL OSM(MOD_RCTL) +#define OS_RSFT OSM(MOD_RSFT) + +#define G_LWR LT(_LOWER, KC_G) + +#if defined(UNICODEMAP_ENABLE) +# define CSHAPES XP(CCIR,CKEY) +# define CUIDADO XP(CUI,HAS) +# define NOPENAH XP(NOPE,STOP) +# define MUSIC_A XP(M4,M8) +# define MUSIC_B XP(M8B,M16) +# define SMILE XP(SMB,SMW) +# define STARS XP(STB,STW) +# define YEPYEP XP(CHEK,HUN) +#endif + +/* _QWERTY + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │Es~│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│~ `│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │RAISE │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ ↑ │PgD│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │Ctrl│Alt │Gui │ Space │RAI│LOW│CAP│ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ +#define ____65_QWERTY______________ROW1 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_GRV +#define ____65_QWERTY______________ROW2 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 +#define ____65_QWERTY______________ROW3 RAISE, KC_A, KC_S, KC_D, KC_F, G_LWR, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP +#define ____65_QWERTY______________ROW4 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 +#define ____65_QWERTY______________ROW5 KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, RAISE, LOWER, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT + +/* _RAISE + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ ` │ ‽ │ ⸮ │ │ ¢ │ │ │ │★ │ │ ☻ │ ⃠ │CSH│ Del │Hme│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │WAT│ ∃ │Rup│TAD│YUN│ │ ∈ │ ॐ │ │♩ ♪│♫ ♬│ │Ins│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ ∀ │ ſ │ ⚂ │FRT│ │HUG│JOY│KSS│LOD│ │NO!│ ✓ 💯 │End│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ RShift │⚠ ☭│ ✖ │CAT│BOW│BUG│ № │MUS│DNC│ ⊢ │SHR│ McL│M↑ │McR│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │RCtl│RAlt│RGui│ FLIP │ │ │ │M← │M↓ │M→ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ +#define ____65_RAISE_______________ROW1 KC_GRV, X(IBNG), X(IRNY), _______, X(CENT), _______, _______, _______, STARS, _______, SMILE, X(NEG), CSHAPES, KC_DEL, KC_HOME +#define ____65_RAISE_______________ROW2 _______, _______, WAT, X(LEXI), RUPA, TADA, YUNO, _______, X(LELM), X(OM), _______, MUSIC_A, MUSIC_B, _______, KC_INS +#define ____65_RAISE_______________ROW3 _______, X(LALL), X(EFF), DICE, FART, _______, HUGS, JOY, KISS, LOD, _______, NOPENAH, YEPYEP, KC_END +#define ____65_RAISE_______________ROW4 OS_RSFT, CUIDADO, X(ECKS), CATS, DOMO, BUGS, X(NUM), MUSIC, DANCE, X(LPRO), SHRUG, KC_BTN1, KC_MS_U, KC_BTN2 +#define ____65_RAISE_______________ROW5 OS_RCTL, OS_RALT, OS_RGUI, FLIP, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R + +/* _LOWER + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │zzz│ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │u_f│u_i│u_m│u_n│usi│usn│u_s│ │ │PRT│ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │SLK│PAU│ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ZAL│ │CAP│VSN│ │NLK│ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ +#define ____65_LOWER_______________ROW1 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ZZZZZ, _______, _______ +#define ____65_LOWER_______________ROW2 _______, U_FRACT, U_ITALI, U_MONOS, U_NORML, U_SANSI, U_SANSN, U_SCRPT, _______, _______, KC_PSCR, _______, _______, _______, _______ +#define ____65_LOWER_______________ROW3 _______, _______, KC_SLCK, KC_PAUS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +#define ____65_LOWER_______________ROW4 _______, ZALGO , _______, KC_CAPS, VRSN, _______, KC_NLCK, _______, _______, _______, _______, _______, _______, _______ +#define ____65_LOWER_______________ROW5 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + +/* _ADJUST + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │r x│r m│rh+│rh-│rs+│rs-│rv+│rv-│ra+│ra-│ │ │RESET│ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │EEP RSET│ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │Mut│V- │V+ │ │U MODE│ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ +#define ____65_ADJUST______________ROW1 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______ +#define ____65_ADJUST______________ROW2 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______ +#define ____65_ADJUST______________ROW3 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, _______ +#define ____65_ADJUST______________ROW4 _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, UC_MOD, _______, _______ +#define ____65_ADJUST______________ROW5 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + +#define ____65_ADJUST__________RGB_ROW2 _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, _______, _______, RESET, _______ +#define ____65_ADJUST__________RGB_ROW3 _______, RGB_M_P, RGB_M_B, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, _______ + +#define ____65_ADJUST___________BL_ROW2 _______, BL_TOGG, BL_BRTG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______ + +// clang-format on From 8af767cb1d36222a4d0ec8286d346d4896e923d4 Mon Sep 17 00:00:00 2001 From: chent7 <34766434+chent7@users.noreply.github.com> Date: Tue, 10 Nov 2020 13:06:55 +0800 Subject: [PATCH 052/114] [Keyboard] Crazy Keyboard 68 (#10693) * Entry and readme for crazy keyboard 68 * Defined layout in keyboard.h * Basic setup done * Working config, keymaps, rgb confirmed. Caps lock led untested * Update readme.md Image links * Update config.h * Update crazy_keyboard_68.c #include "quantum.h" * Match PR * Update keyboards/crazy_keyboard_68/crazy_keyboard_68.c * Update keyboards/crazy_keyboard_68/keymaps/default/keymap.c * Update keyboards/crazy_keyboard_68/keymaps/default/keymap.c * Update keyboards/crazy_keyboard_68/info.json * Update keyboards/crazy_keyboard_68/crazy_keyboard_68.h * Update keyboards/crazy_keyboard_68/rules.mk * Update keyboards/crazy_keyboard_68/rules.mk * Update keyboards/crazy_keyboard_68/config.h --- keyboards/crazy_keyboard_68/config.h | 146 ++++++++++++++++++ .../crazy_keyboard_68/crazy_keyboard_68.c | 36 +++++ .../crazy_keyboard_68/crazy_keyboard_68.h | 57 +++++++ keyboards/crazy_keyboard_68/info.json | 81 ++++++++++ .../keymaps/default/keymap.c | 66 ++++++++ .../keymaps/default/readme.md | 4 + keyboards/crazy_keyboard_68/readme.md | 25 +++ keyboards/crazy_keyboard_68/rules.mk | 24 +++ 8 files changed, 439 insertions(+) create mode 100644 keyboards/crazy_keyboard_68/config.h create mode 100644 keyboards/crazy_keyboard_68/crazy_keyboard_68.c create mode 100644 keyboards/crazy_keyboard_68/crazy_keyboard_68.h create mode 100644 keyboards/crazy_keyboard_68/info.json create mode 100644 keyboards/crazy_keyboard_68/keymaps/default/keymap.c create mode 100644 keyboards/crazy_keyboard_68/keymaps/default/readme.md create mode 100644 keyboards/crazy_keyboard_68/readme.md create mode 100644 keyboards/crazy_keyboard_68/rules.mk diff --git a/keyboards/crazy_keyboard_68/config.h b/keyboards/crazy_keyboard_68/config.h new file mode 100644 index 0000000000..2558e75791 --- /dev/null +++ b/keyboards/crazy_keyboard_68/config.h @@ -0,0 +1,146 @@ +/* +Copyright 2020 chent7 + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 // by default from pcb +#define PRODUCT_ID 0x13DE +#define DEVICE_VER 0x0001 +#define MANUFACTURER chent7 +#define PRODUCT Crazy Keyboard 68 + +/* 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, B7, B5, B4, D7, D6, B3, 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_LEVELS 3 +//#define BACKLIGHT_BREATHING + +#define RGB_DI_PIN F6 +#ifdef RGB_DI_PIN +# define RGBLED_NUM 84 +# 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful 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 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/crazy_keyboard_68/crazy_keyboard_68.c b/keyboards/crazy_keyboard_68/crazy_keyboard_68.c new file mode 100644 index 0000000000..f4f8515b7c --- /dev/null +++ b/keyboards/crazy_keyboard_68/crazy_keyboard_68.c @@ -0,0 +1,36 @@ +/* Copyright 2020 chent7 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "crazy_keyboard_68.h" + +void matrix_init_kb(void) { + led_init_ports(); + + matrix_init_user(); +} + +void led_init_ports(void) { + // Caps lock pin + setPinOutput(B0); + writePinHigh(B0); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(B0, !led_state.caps_lock); + } + return true; +} diff --git a/keyboards/crazy_keyboard_68/crazy_keyboard_68.h b/keyboards/crazy_keyboard_68/crazy_keyboard_68.h new file mode 100644 index 0000000000..c253824be4 --- /dev/null +++ b/keyboards/crazy_keyboard_68/crazy_keyboard_68.h @@ -0,0 +1,57 @@ +/* Copyright 2020 chent7 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 + +/* Crazy Keyboard 68 (ANSI) layout + * ,----------------------------------------------------------------. + * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d | 0e | + * |----------------------------------------------------------------| + * | 10 | 11| 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 | 2e | + * |----------------------------------------------------------------| + * | 31 | 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3c| 3d| 3e | + * |----------------------------------------------------------------| + * | 40 | 41 | 43 | 46 | 49| 4a| 4b| 4c| 4d| 4e | + * `----------------------------------------------------------------' + * + * This is 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, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k43, 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, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e}, \ + {XXX, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \ + {k40, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, k49, k4a, k4b, k4c, k4d, k4e} \ +} diff --git a/keyboards/crazy_keyboard_68/info.json b/keyboards/crazy_keyboard_68/info.json new file mode 100644 index 0000000000..fa9546a1b1 --- /dev/null +++ b/keyboards/crazy_keyboard_68/info.json @@ -0,0 +1,81 @@ +{ + "keyboard_name": "crazy_keyboard_68", + "url": "", + "maintainer": "chent7", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_65_ansi": { + "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":"k0e", "x":15, "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":"k1e", "x":15, "y":1}, + {"label":"k20", "x":0, "y":2, "w":1.75}, + {"label":"k22", "x":1.75, "y":2}, + {"label":"k23", "x":2.75, "y":2}, + {"label":"k24", "x":3.75, "y":2}, + {"label":"k25", "x":4.75, "y":2}, + {"label":"k26", "x":5.75, "y":2}, + {"label":"k27", "x":6.75, "y":2}, + {"label":"k28", "x":7.75, "y":2}, + {"label":"k29", "x":8.75, "y":2}, + {"label":"k2a", "x":9.75, "y":2}, + {"label":"k2b", "x":10.75, "y":2}, + {"label":"k2c", "x":11.75, "y":2}, + {"label":"k2d", "x":12.75, "y":2, "w":2.25}, + {"label":"k2e", "x":15, "y":2}, + {"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":"k3c", "x":12.25, "y":3, "w":1.75}, + {"label":"k3d", "x":14, "y":3}, + {"label":"k3e", "x":15, "y":3}, + {"label":"k40", "x":0, "y":4, "w":1.25}, + {"label":"k41", "x":1.25, "y":4, "w":1.25}, + {"label":"k43", "x":2.5, "y":4, "w":1.25}, + {"label":"k46", "x":3.75, "y":4, "w":6.25}, + {"label":"k49", "x":10, "y":4}, + {"label":"k4a", "x":11, "y":4}, + {"label":"k4b", "x":12, "y":4}, + {"label":"k4c", "x":13, "y":4}, + {"label":"k4d", "x":14, "y":4}, + {"label":"k4e", "x":15, "y":4} + ] + } + } +} diff --git a/keyboards/crazy_keyboard_68/keymaps/default/keymap.c b/keyboards/crazy_keyboard_68/keymaps/default/keymap.c new file mode 100644 index 0000000000..c41916fcd6 --- /dev/null +++ b/keyboards/crazy_keyboard_68/keymaps/default/keymap.c @@ -0,0 +1,66 @@ +/* Copyright 2020 chent7 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BASE: (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |~ ` | + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |PgUp| + * |----------------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgDn| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|Del | + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt|Fn |Ctrl|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ + [_BASE] = 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_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_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Keymap _BASE: (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * | |F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |Home| + * |----------------------------------------------------------------| + * | | | | | | | | | | |PSC|SLC|Pau| |End | + * |----------------------------------------------------------------| + * | |TOG|M_P|M_B|M_R|MSW|MSN|M_K|M_X|M_G|M_T| | |Ins | + * |----------------------------------------------------------------| + * | |MOD|HUI|HUD|SAI|SAD|VAI|VAD| | | | | | | + * |----------------------------------------------------------------| + * |Reset| | | | | | | | | | + * `----------------------------------------------------------------' + */ + [_FN] = LAYOUT_65_ansi( + _______, 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_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, + _______, RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_R,RGB_M_SW,RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_T, _______, _______, KC_INS, + _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/crazy_keyboard_68/keymaps/default/readme.md b/keyboards/crazy_keyboard_68/keymaps/default/readme.md new file mode 100644 index 0000000000..21c72142fd --- /dev/null +++ b/keyboards/crazy_keyboard_68/keymaps/default/readme.md @@ -0,0 +1,4 @@ +# The default keymap for crazy_keyboard_68 +``` +make crazy_keyboard_68:default +``` diff --git a/keyboards/crazy_keyboard_68/readme.md b/keyboards/crazy_keyboard_68/readme.md new file mode 100644 index 0000000000..3afa9cc604 --- /dev/null +++ b/keyboards/crazy_keyboard_68/readme.md @@ -0,0 +1,25 @@ +# Crazy Keyboard 68 + +![Front View of Crazy Keyboard 68 PCB](https://i.imgur.com/0nTjDbU.jpg)\ +![Back View of Crazy Keyboard 68 PCB](https://i.imgur.com/gTpdux3.jpeg) + +Obscure 68% hotswap PCB sold on taobao, powered by ATM32U4. RGB key lighting and underglow requires self-soldering. + +* Keyboard Maintainer: [chent7](https://github.com/chent7) +* Hardware Supported: crazy keyboard 68 Standard +* Hardware Availability: [taobao.com](https://item.taobao.com/item.htm?spm=a1z09.2.0.0.19422e8dJUzj8d&id=605218560507) + +Make example for this keyboard (after setting up your build environment): + + make crazy_keyboard_68:default + +Flashing example for this keyboard: + + make crazy_keyboard_68:default:flash + +## Layouts + +### ANSI +![Default ANSI Layout](https://i.imgur.com/y1ZApvU.png) + +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/crazy_keyboard_68/rules.mk b/keyboards/crazy_keyboard_68/rules.mk new file mode 100644 index 0000000000..5a51c94e72 --- /dev/null +++ b/keyboards/crazy_keyboard_68/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = 65_ansi From 7595f538562437fa6d13ede5be7a5a4b5d582c6b Mon Sep 17 00:00:00 2001 From: yfuku <30647434+yfuku@users.noreply.github.com> Date: Tue, 10 Nov 2020 14:07:12 +0900 Subject: [PATCH 053/114] refactor SPLIT_KEYBOARD, OLED_DRIVER_ENABLE (#10405) --- keyboards/claw44/claw44.c | 9 - keyboards/claw44/config.h | 4 - keyboards/claw44/i2c.c | 162 ----- keyboards/claw44/i2c.h | 46 -- keyboards/claw44/keymaps/default/config.h | 12 - keyboards/claw44/keymaps/default/keymap.c | 195 ++---- .../claw44/keymaps/{yfuku => oled}/config.h | 14 +- keyboards/claw44/keymaps/oled/keymap.c | 137 ++++ keyboards/claw44/keymaps/oled/rules.mk | 1 + keyboards/claw44/keymaps/yfuku/keymap.c | 221 ------- keyboards/claw44/lib/glcdfont.c | 13 +- keyboards/claw44/lib/host_led_state_reader.c | 15 - keyboards/claw44/lib/keylogger.c | 45 -- keyboards/claw44/lib/layer_state_reader.c | 35 -- keyboards/claw44/lib/logo_reader.c | 11 - keyboards/claw44/lib/mode_icon_reader.c | 15 - keyboards/claw44/lib/rgb_state_reader.c | 15 - keyboards/claw44/lib/timelogger.c | 16 - keyboards/claw44/rev1/config.h | 23 +- keyboards/claw44/rev1/matrix.c | 358 ----------- keyboards/claw44/rev1/rev1.c | 9 +- keyboards/claw44/rev1/rev1.h | 74 +-- keyboards/claw44/rev1/rules.mk | 16 +- keyboards/claw44/rev1/serial_config.h | 4 - keyboards/claw44/rev1/split_scomm.c | 91 --- keyboards/claw44/rev1/split_scomm.h | 24 - keyboards/claw44/rev1/split_util.c | 70 --- keyboards/claw44/rev1/split_util.h | 19 - keyboards/claw44/rules.mk | 9 - keyboards/claw44/serial.c | 589 ------------------ keyboards/claw44/serial.h | 84 --- keyboards/claw44/ssd1306.c | 345 ---------- keyboards/claw44/ssd1306.h | 90 --- 33 files changed, 234 insertions(+), 2537 deletions(-) delete mode 100644 keyboards/claw44/i2c.c delete mode 100644 keyboards/claw44/i2c.h rename keyboards/claw44/keymaps/{yfuku => oled}/config.h (78%) create mode 100644 keyboards/claw44/keymaps/oled/keymap.c create mode 100644 keyboards/claw44/keymaps/oled/rules.mk delete mode 100644 keyboards/claw44/keymaps/yfuku/keymap.c delete mode 100644 keyboards/claw44/lib/host_led_state_reader.c delete mode 100644 keyboards/claw44/lib/keylogger.c delete mode 100644 keyboards/claw44/lib/layer_state_reader.c delete mode 100644 keyboards/claw44/lib/logo_reader.c delete mode 100644 keyboards/claw44/lib/mode_icon_reader.c delete mode 100644 keyboards/claw44/lib/rgb_state_reader.c delete mode 100644 keyboards/claw44/lib/timelogger.c delete mode 100644 keyboards/claw44/rev1/matrix.c delete mode 100644 keyboards/claw44/rev1/serial_config.h delete mode 100644 keyboards/claw44/rev1/split_scomm.c delete mode 100644 keyboards/claw44/rev1/split_scomm.h delete mode 100644 keyboards/claw44/rev1/split_util.c delete mode 100644 keyboards/claw44/rev1/split_util.h delete mode 100644 keyboards/claw44/serial.c delete mode 100644 keyboards/claw44/serial.h delete mode 100644 keyboards/claw44/ssd1306.c delete mode 100644 keyboards/claw44/ssd1306.h diff --git a/keyboards/claw44/claw44.c b/keyboards/claw44/claw44.c index f564fb623b..d87103065c 100644 --- a/keyboards/claw44/claw44.c +++ b/keyboards/claw44/claw44.c @@ -1,10 +1 @@ #include "claw44.h" -#include "ssd1306.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 -} diff --git a/keyboards/claw44/config.h b/keyboards/claw44/config.h index fb1cdf3962..0bd74ff833 100644 --- a/keyboards/claw44/config.h +++ b/keyboards/claw44/config.h @@ -19,10 +19,6 @@ along with this program. If not, see . #pragma once #include "config_common.h" -#include - -#define USE_I2C -#define USE_SERIAL #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION diff --git a/keyboards/claw44/i2c.c b/keyboards/claw44/i2c.c deleted file mode 100644 index 4bee5c6398..0000000000 --- a/keyboards/claw44/i2c.c +++ /dev/null @@ -1,162 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "i2c.h" - -#ifdef USE_I2C - -// Limits the amount of we wait for any one i2c transaction. -// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is -// 9 bits, a single transaction will take around 90μs to complete. -// -// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit -// poll loop takes at least 8 clock cycles to execute -#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 - -#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) - -volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -static volatile uint8_t slave_buffer_pos; -static volatile bool slave_has_register_set = false; - -// Wait for an i2c operation to finish -inline static -void i2c_delay(void) { - uint16_t lim = 0; - while(!(TWCR & (1<10. - // Check datasheets for more info. - TWBR = ((F_CPU/SCL_CLOCK)-16)/2; -} - -// Start a transaction with the given i2c slave address. The direction of the -// transfer is set with I2C_READ and I2C_WRITE. -// returns: 0 => success -// 1 => error -uint8_t i2c_master_start(uint8_t address) { - TWCR = (1< slave ACK -// 1 => slave NACK -uint8_t i2c_master_write(uint8_t data) { - TWDR = data; - TWCR = (1<= SLAVE_BUFFER_SIZE ) { - ack = 0; - slave_buffer_pos = 0; - } - slave_has_register_set = true; - } else { - i2c_slave_buffer[slave_buffer_pos] = TWDR; - BUFFER_POS_INC(); - } - break; - - case TW_ST_SLA_ACK: - case TW_ST_DATA_ACK: - // master has addressed this device as a slave transmitter and is - // requesting data. - TWDR = i2c_slave_buffer[slave_buffer_pos]; - BUFFER_POS_INC(); - break; - - case TW_BUS_ERROR: // something went wrong, reset twi state - TWCR = 0; - default: - break; - } - // Reset everything, so we are ready for the next TWI interrupt - TWCR |= (1< - -#ifndef F_CPU -#define F_CPU 16000000UL -#endif - -#define I2C_READ 1 -#define I2C_WRITE 0 - -#define I2C_ACK 1 -#define I2C_NACK 0 - -#define SLAVE_BUFFER_SIZE 0x10 - -// i2c SCL clock frequency 400kHz -#define SCL_CLOCK 400000L - -extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -void i2c_master_init(void); -uint8_t i2c_master_start(uint8_t address); -void i2c_master_stop(void); -uint8_t i2c_master_write(uint8_t data); -uint8_t i2c_master_read(int); -void i2c_reset_state(void); -void i2c_slave_init(uint8_t address); - - -static inline unsigned char i2c_start_read(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_READ); -} - -static inline unsigned char i2c_start_write(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_WRITE); -} - -// from SSD1306 scrips -extern unsigned char i2c_rep_start(unsigned char addr); -extern void i2c_start_wait(unsigned char addr); -extern unsigned char i2c_readAck(void); -extern unsigned char i2c_readNak(void); -extern unsigned char i2c_read(unsigned char ack); - -#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); diff --git a/keyboards/claw44/keymaps/default/config.h b/keyboards/claw44/keymaps/default/config.h index eff6ad3c7b..d2ea02545b 100644 --- a/keyboards/claw44/keymaps/default/config.h +++ b/keyboards/claw44/keymaps/default/config.h @@ -20,16 +20,4 @@ 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_TERM 200 diff --git a/keyboards/claw44/keymaps/default/keymap.c b/keyboards/claw44/keymaps/default/keymap.c index 088087c773..65dbd67d98 100644 --- a/keyboards/claw44/keymaps/default/keymap.c +++ b/keyboards/claw44/keymaps/default/keymap.c @@ -1,168 +1,59 @@ #include QMK_KEYBOARD_H -#ifdef PROTOCOL_LUFA - #include "lufa.h" - #include "split_util.h" -#endif -#ifdef SSD1306OLED - #include "ssd1306.h" -#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 custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE -}; - -enum macro_keycodes { - KC_SAMPLEMACRO, +enum layer_number { + _QWERTY = 0, + _RAISE, + _LOWER, }; #define KC_ KC_TRNS #define KC_RST RESET -#define KC_L_SPC LT(_LOWER, KC_SPC) // lower -#define KC_R_ENT LT(_RAISE, KC_ENT) // raise -#define KC_G_JA LGUI_T(KC_LANG1) // cmd or win -#define KC_G_EN LGUI_T(KC_LANG2) // cmd or win -#define KC_C_BS LCTL_T(KC_BSPC) // ctrl -#define KC_A_DEL ALT_T(KC_DEL) // alt +#define KC_L_SPC LT(_LOWER, KC_SPC) // lower +#define KC_R_ENT LT(_RAISE, KC_ENT) // raise +#define KC_G_JA LGUI_T(KC_LANG1) // cmd or win +#define KC_G_EN LGUI_T(KC_LANG2) // cmd or win +#define KC_C_BS LCTL_T(KC_BSPC) // ctrl +#define KC_A_DEL ALT_T(KC_DEL) // alt const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( \ + //,--------+--------+---------+--------+---------+--------. ,--------+---------+--------+---------+--------+--------. + KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_MINS, + //|--------+--------+---------+--------+---------+--------| |--------+---------+--------+---------+--------+--------| + 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_RSFT, + //`--------+--------+---------+--------+---------+--------/ \--------+---------+--------+---------+--------+--------' + KC_A_DEL, KC_G_EN, KC_L_SPC, KC_C_BS, KC_C_BS, KC_R_ENT, KC_G_JA, KC_A_DEL + // `----------+--------+---------+--------' `--------+---------+--------+---------' + ), - [_QWERTY] = LAYOUT( \ - //,--------+--------+---------+--------+---------+--------. ,--------+---------+--------+---------+--------+--------. - KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_MINS, - //|--------+--------+---------+--------+---------+--------| |--------+---------+--------+---------+--------+--------| - 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_RSFT, - //`--------+--------+---------+--------+---------+--------/ \--------+---------+--------+---------+--------+--------' - KC_A_DEL, KC_G_EN, KC_L_SPC, KC_C_BS, KC_C_BS, KC_R_ENT, KC_G_JA, KC_A_DEL - // `----------+--------+---------+--------' `--------+---------+--------+---------' - ), + [_RAISE] = LAYOUT( \ + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + _______, KC_BSLS, KC_CIRC, KC_EXLM, KC_AMPR, KC_PIPE, KC_AT , KC_EQL , KC_PLUS, KC_ASTR, KC_PERC, KC_MINS, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LPRN, KC_HASH, KC_DLR , KC_DQT , KC_QUOT, KC_TILD, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_GRV , KC_RPRN, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, KC_LCBR, KC_LBRC, KC_RBRC, KC_RCBR, _______, _______, _______, _______, + //`--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------' + _______, _______, _______, _______, _______, _______, _______, RESET + // `--------+--------+--------+--------' `--------+--------+--------+--------' + ), - // \ ^ ! & | @ = + * % - - // ( # $ " ' ~ ← ↓ ↑ → ` ) - // { [ ] } - - [_RAISE] = LAYOUT( \ - //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. - _______, KC_BSLS, KC_CIRC, KC_EXLM, KC_AMPR, KC_PIPE, KC_AT , KC_EQL , KC_PLUS, KC_ASTR, KC_PERC, KC_MINS, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LPRN, KC_HASH, KC_DLR , KC_DQT , KC_QUOT, KC_TILD, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_GRV , KC_RPRN, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - _______, _______, _______, _______, KC_LCBR, KC_LBRC, KC_RBRC, KC_RCBR, _______, _______, _______, _______, - //`--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------' - _______, _______, _______, _______, _______, _______, _______, RESET - // `--------+--------+--------+--------' `--------+--------+--------+--------' - ), - - [_LOWER] = LAYOUT( \ - //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. - KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , _______, KC_EQL , KC_PLUS, KC_ASTR, KC_PERC, KC_MINS, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , _______, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, _______, KC_COMM, KC_DOT , KC_SLSH, _______, - //`--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------' - RESET , _______, _______, _______, _______, _______, _______, _______ - // `--------+--------+--------+--------' `--------+--------+--------+--------' - ), + [_LOWER] = LAYOUT( \ + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , _______, KC_EQL , KC_PLUS, KC_ASTR, KC_PERC, KC_MINS, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, _______, KC_COMM, KC_DOT , KC_SLSH, _______, + //`--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------' + RESET , _______, _______, _______, _______, _______, _______, _______ + // `--------+--------+--------+--------' `--------+--------+--------+--------' + ), }; - -void matrix_init_user(void) { - //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) { - 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; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - } else { - layer_off(_RAISE); - } - return false; - break; - } - return true; -} diff --git a/keyboards/claw44/keymaps/yfuku/config.h b/keyboards/claw44/keymaps/oled/config.h similarity index 78% rename from keyboards/claw44/keymaps/yfuku/config.h rename to keyboards/claw44/keymaps/oled/config.h index 244ffa7096..edde2c67ca 100644 --- a/keyboards/claw44/keymaps/yfuku/config.h +++ b/keyboards/claw44/keymaps/oled/config.h @@ -20,17 +20,5 @@ 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_TERM 180 -#define IGNORE_MOD_TAP_INTERRUPT +#define OLED_FONT_H "keyboards/claw44/lib/glcdfont.c" diff --git a/keyboards/claw44/keymaps/oled/keymap.c b/keyboards/claw44/keymaps/oled/keymap.c new file mode 100644 index 0000000000..0d10c371a2 --- /dev/null +++ b/keyboards/claw44/keymaps/oled/keymap.c @@ -0,0 +1,137 @@ +#include QMK_KEYBOARD_H +#include + +// 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, + _RAISE, + _LOWER, +}; + +#define KC_ KC_TRNS +#define KC_RST RESET +#define KC_L_SPC LT(_LOWER, KC_SPC) // lower +#define KC_R_ENT LT(_RAISE, KC_ENT) // raise +#define KC_G_JA LGUI_T(KC_LANG1) // cmd or win +#define KC_G_EN LGUI_T(KC_LANG2) // cmd or win +#define KC_C_BS LCTL_T(KC_BSPC) // ctrl +#define KC_A_DEL ALT_T(KC_DEL) // alt + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( \ + //,--------+--------+---------+--------+---------+--------. ,--------+---------+--------+---------+--------+--------. + KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_MINS, + //|--------+--------+---------+--------+---------+--------| |--------+---------+--------+---------+--------+--------| + 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_RSFT, + //`--------+--------+---------+--------+---------+--------/ \--------+---------+--------+---------+--------+--------' + KC_A_DEL, KC_G_EN, KC_L_SPC, KC_C_BS, KC_C_BS, KC_R_ENT, KC_G_JA, KC_A_DEL + // `----------+--------+---------+--------' `--------+---------+--------+---------' + ), + + [_RAISE] = LAYOUT( \ + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + _______, KC_BSLS, KC_CIRC, KC_EXLM, KC_AMPR, KC_PIPE, KC_AT , KC_EQL , KC_PLUS, KC_ASTR, KC_PERC, KC_MINS, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LPRN, KC_HASH, KC_DLR , KC_DQT , KC_QUOT, KC_TILD, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_GRV , KC_RPRN, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, KC_LCBR, KC_LBRC, KC_RBRC, KC_RCBR, _______, _______, _______, _______, + //`--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------' + _______, _______, _______, _______, _______, _______, _______, RESET + // `--------+--------+--------+--------' `--------+--------+--------+--------' + ), + + [_LOWER] = LAYOUT( \ + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , _______, KC_EQL , KC_PLUS, KC_ASTR, KC_PERC, KC_MINS, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, _______, KC_COMM, KC_DOT , KC_SLSH, _______, + //`--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------' + RESET , _______, _______, _______, _______, _______, _______, _______ + // `--------+--------+--------+--------' `--------+--------+--------+--------' + ), +}; + +#ifdef OLED_DRIVER_ENABLE + +void render_layer_state(void) { + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_ln_P(PSTR("Layer: Default"), false); + break; + case _RAISE: + oled_write_ln_P(PSTR("Layer: Raise"), false); + break; + case _LOWER: + oled_write_ln_P(PSTR("Layer: Lower"), false); + break; + default: + oled_write_ln_P(PSTR("Layer: Undefined"), false); + } +} + +void render_logo(void) { + static const char PROGMEM 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(logo, false); +} + +char keylog_str[24] = {}; +char keylogs_str[21] = {}; +int keylogs_str_idx = 0; + +const char code_to_name[60] = {' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 'R', 'E', 'B', 'T', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ';', '\'', ' ', ',', '.', '/', ' ', ' ', ' '}; + +void set_keylog(uint16_t keycode, keyrecord_t *record) { + char name = ' '; + if (keycode < 60) { + name = code_to_name[keycode]; + } + + // update keylog + snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", record->event.key.row, record->event.key.col, keycode, name); + + // update keylogs + if (keylogs_str_idx == sizeof(keylogs_str) - 1) { + keylogs_str_idx = 0; + for (int i = 0; i < sizeof(keylogs_str) - 1; i++) { + keylogs_str[i] = ' '; + } + } + + keylogs_str[keylogs_str_idx] = name; + keylogs_str_idx++; +} + +const char *read_keylog(void) { return keylog_str; } +const char *read_keylogs(void) { return keylogs_str; } + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_layer_state(); + oled_write_ln(read_keylog(), false); + oled_write_ln(read_keylogs(), false); + } else { + render_logo(); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + set_keylog(keycode, record); + } + return true; +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!is_keyboard_master()) return OLED_ROTATION_180; + return rotation; +} + +#endif diff --git a/keyboards/claw44/keymaps/oled/rules.mk b/keyboards/claw44/keymaps/oled/rules.mk new file mode 100644 index 0000000000..c582662134 --- /dev/null +++ b/keyboards/claw44/keymaps/oled/rules.mk @@ -0,0 +1 @@ +OLED_DRIVER_ENABLE = yes diff --git a/keyboards/claw44/keymaps/yfuku/keymap.c b/keyboards/claw44/keymaps/yfuku/keymap.c deleted file mode 100644 index 77d459b928..0000000000 --- a/keyboards/claw44/keymaps/yfuku/keymap.c +++ /dev/null @@ -1,221 +0,0 @@ -#include QMK_KEYBOARD_H -#ifdef PROTOCOL_LUFA - #include "lufa.h" - #include "split_util.h" -#endif -#ifdef SSD1306OLED - #include "ssd1306.h" -#endif - -extern keymap_config_t keymap_config; - -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 custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE -}; - -enum macro_keycodes { - KC_SAMPLEMACRO, -}; - -// common -#define KC_ KC_TRNS -#define KC_XXXX KC_NO -#define KC_RST RESET -#define KC_VD KC__VOLDOWN -#define KC_VU KC__VOLUP - -// layer -#define KC_L_SPC LT(_LOWER, KC_SPC) -#define KC_R_ENT LT(_RAISE, KC_ENT) - -// shift_t -#define KC_S_TAB LSFT_T(KC_TAB) -#define KC_S_ESC LSFT_T(KC_ESC) -#define KC_S_JA LSFT_T(KC_LANG1) -#define KC_S_EN LSFT_T(KC_LANG2) - -// cmd_t -#define KC_M_F LCMD_T(KC_F) -#define KC_M_D LCMD_T(KC_D) -#define KC_M_J LCMD_T(KC_J) -#define KC_M_K LCMD_T(KC_K) - -// ctl_t -#define KC_C_S LCTL_T(KC_S) -#define KC_C_L LCTL_T(KC_L) -#define KC_C_BS LCTL_T(KC_BSPC) - -// alt_t -#define KC_A_D ALT_T(KC_D) -#define KC_A_K ALT_T(KC_K) -#define KC_A_Z ALT_T(KC_Z) -#define KC_A_SL ALT_T(KC_SLSH) -#define KC_A_DEL ALT_T(KC_DEL) - -// cmd+shift_t -#define KC_MS_Q SCMD_T(KC_Q) -#define KC_MS_A SCMD_T(KC_A) -#define KC_MS_S SCMD_T(KC_S) -#define KC_MS_SC SCMD_T(KC_SCLN) -#define KC_MS_ESC SCMD_T(KC_ESC) - -// -#define KC_MR RCMD(KC_R) -#define KC_MF RCMD(KC_F) -#define KC_MW RCMD(KC_W) -#define KC_MX RCMD(KC_X) -#define KC_MC RCMD(KC_C) -#define KC_MV RCMD(KC_V) -#define KC_MTAB RCMD(KC_TAB) -#define KC_MSF RCMD(RSFT(KC_F)) -#define KC_MSR RCMD(RSFT(KC_R)) -#define KC_MST RCMD(RSFT(KC_T)) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - // M_ = LCMD_T( - // A_ = ALT_T( - // C_ = LCTL_T( - // MS_ = SMD_T( - // R_ = LT(_RAISE - // L_ = LT(_LOWER - - [_QWERTY] = LAYOUT_kc( \ - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - ESC , Q , W , E , R , T , Y , U , I , O , P ,MINS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - S_TAB, A ,C_S , D ,M_F , G , H ,M_J , K ,C_L ,SCLN,S_ESC, - //|----+----+----+----+----+----+ |----+----+----+----+----+----| - , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, , - //`----+----+----+----+----+----/ \----+----+----+----+----+----' - A_DEL,S_EN,L_SPC,C_BS, C_BS,R_ENT,S_JA,A_DEL - // `----+----+----+----' `----+----+----+----' - ), - - // \ ^ ! & | @ = + * % - - // ( # $ " ' ~ ← ↓ ↑ → ` ) - // { [ ] } - - [_RAISE] = LAYOUT_kc( \ - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - ,BSLS,CIRC,EXLM,AMPR,PIPE, AT ,EQL ,PLUS,ASTR,PERC,MINS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - LPRN,HASH,DLR ,DQT ,QUOT,TILD, LEFT,DOWN, UP ,RGHT,GRV ,RPRN, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , ,LCBR,LBRC, RBRC,RCBR, , , , , - //`----+----+----+----+----+----/ \----+----+----+----+----+----' - , ,BSPC, , , , ,RST - // `----+----+----+----' `----+----+----+----' - ), - - [_LOWER] = LAYOUT_kc( \ - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - , , ,MSF ,MSR ,MST , ,EQL ,PLUS,ASTR,PERC,MINS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , ,COMM,DOT ,SLSH, , - //`----+----+----+--+-+----+----/ \----+----+----+----+----+----' - RST , , , , ,DEL , , - // `----+----+----+----' `----+----+----+----' - ), -}; - -void matrix_init_user(void) { - //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) { - 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; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - } else { - layer_off(_RAISE); - } - return false; - break; - } - return true; -} - diff --git a/keyboards/claw44/lib/glcdfont.c b/keyboards/claw44/lib/glcdfont.c index 9fa1c806aa..91f53d9c24 100644 --- a/keyboards/claw44/lib/glcdfont.c +++ b/keyboards/claw44/lib/glcdfont.c @@ -1,7 +1,17 @@ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. -#include "progmem.h" +#ifndef FONT5X7_H +#define FONT5X7_H + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif // Standard ASCII 5x7 font const unsigned char font[] PROGMEM = { @@ -230,3 +240,4 @@ const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +#endif // FONT5X7_H diff --git a/keyboards/claw44/lib/host_led_state_reader.c b/keyboards/claw44/lib/host_led_state_reader.c deleted file mode 100644 index 980823b318..0000000000 --- a/keyboards/claw44/lib/host_led_state_reader.c +++ /dev/null @@ -1,15 +0,0 @@ -#include -#include "claw44.h" - -char host_led_state_str[24]; - -const char *read_host_led_state(void) -{ - uint8_t leds = host_keyboard_leds(); - snprintf(host_led_state_str, sizeof(host_led_state_str), "NL:%s CL:%s SL:%s", - (leds & (1 << USB_LED_NUM_LOCK)) ? "on" : "- ", - (leds & (1 << USB_LED_CAPS_LOCK)) ? "on" : "- ", - (leds & (1 << USB_LED_SCROLL_LOCK)) ? "on" : "- "); - - return host_led_state_str; -} diff --git a/keyboards/claw44/lib/keylogger.c b/keyboards/claw44/lib/keylogger.c deleted file mode 100644 index 092b6929bc..0000000000 --- a/keyboards/claw44/lib/keylogger.c +++ /dev/null @@ -1,45 +0,0 @@ -#include -#include "claw44.h" - -char keylog_str[24] = {}; -char keylogs_str[21] = {}; -int keylogs_str_idx = 0; - -const char code_to_name[60] = { - ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', - 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', - 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', - '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', - 'R', 'E', 'B', 'T', ' ', ' ', ' ', ' ', ' ', ' ', - ' ', ';', '\'', ' ', ',', '.', '/', ' ', ' ', ' '}; - -void set_keylog(uint16_t keycode, keyrecord_t *record) { - char name = ' '; - if (keycode < 60) { - name = code_to_name[keycode]; - } - - // update keylog - snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", - record->event.key.row, record->event.key.col, - keycode, name); - - // update keylogs - if (keylogs_str_idx == sizeof(keylogs_str) - 1) { - keylogs_str_idx = 0; - for (int i = 0; i < sizeof(keylogs_str) - 1; i++) { - keylogs_str[i] = ' '; - } - } - - keylogs_str[keylogs_str_idx] = name; - keylogs_str_idx++; -} - -const char *read_keylog(void) { - return keylog_str; -} - -const char *read_keylogs(void) { - return keylogs_str; -} diff --git a/keyboards/claw44/lib/layer_state_reader.c b/keyboards/claw44/lib/layer_state_reader.c deleted file mode 100644 index d92b6df582..0000000000 --- a/keyboards/claw44/lib/layer_state_reader.c +++ /dev/null @@ -1,35 +0,0 @@ - -#include QMK_KEYBOARD_H -#include -#include "claw44.h" - -#define L_BASE 0 -#define L_LOWER (1<<_LOWER) -#define L_RAISE (1<<_RAISE) -#define L_ADJUST (1<<_ADJUST) -#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER) - -char layer_state_str[24]; - -const char *read_layer_state(void) { - switch (layer_state) - { - case L_BASE: - snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Default"); - break; - case L_RAISE: - snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Raise"); - break; - case L_LOWER: - snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Lower"); - break; - case L_ADJUST: - case L_ADJUST_TRI: - snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Adjust"); - break; - default: - snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Undef-%ld", layer_state); - } - - return layer_state_str; -} diff --git a/keyboards/claw44/lib/logo_reader.c b/keyboards/claw44/lib/logo_reader.c deleted file mode 100644 index b5b437b2b8..0000000000 --- a/keyboards/claw44/lib/logo_reader.c +++ /dev/null @@ -1,11 +0,0 @@ -#include "claw44.h" - -const char *read_logo(void) { - 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}; - - return logo; -} diff --git a/keyboards/claw44/lib/mode_icon_reader.c b/keyboards/claw44/lib/mode_icon_reader.c deleted file mode 100644 index a9272bb9a7..0000000000 --- a/keyboards/claw44/lib/mode_icon_reader.c +++ /dev/null @@ -1,15 +0,0 @@ -#include -#include "claw44.h" - -char mode_icon[24]; - -const char *read_mode_icon(bool swap) { - static char logo[][2][3] = {{{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}}; - if (swap == false) { - snprintf(mode_icon, sizeof(mode_icon), "%s\n%s", logo[0][0], logo[0][1]); - } else { - snprintf(mode_icon, sizeof(mode_icon), "%s\n%s", logo[1][0], logo[1][1]); - } - - return mode_icon; -} diff --git a/keyboards/claw44/lib/rgb_state_reader.c b/keyboards/claw44/lib/rgb_state_reader.c deleted file mode 100644 index e0efe2e528..0000000000 --- a/keyboards/claw44/lib/rgb_state_reader.c +++ /dev/null @@ -1,15 +0,0 @@ -#ifdef RGBLIGHT_ENABLE - -#include QMK_KEYBOARD_H -#include - -extern rgblight_config_t rgblight_config; -char rbf_info_str[24]; -const char *read_rgb_info(void) { - - snprintf(rbf_info_str, sizeof(rbf_info_str), "%s %2d h%3d s%3d v%3d", - rgblight_config.enable ? "on" : "- ", rgblight_config.mode, - rgblight_config.hue, rgblight_config.sat, rgblight_config.val); - return rbf_info_str; -} -#endif diff --git a/keyboards/claw44/lib/timelogger.c b/keyboards/claw44/lib/timelogger.c deleted file mode 100644 index ecd4ed3ea8..0000000000 --- a/keyboards/claw44/lib/timelogger.c +++ /dev/null @@ -1,16 +0,0 @@ -#include -#include "claw44.h" - -char timelog_str[24] = {}; -int last_time = 0; -int elapsed_time = 0; - -void set_timelog(void) { - elapsed_time = timer_elapsed(last_time); - last_time = timer_read(); - snprintf(timelog_str, sizeof(timelog_str), "lt:%5d, et:%5d", last_time, elapsed_time); -} - -const char *read_timelog(void) { - return timelog_str; -} diff --git a/keyboards/claw44/rev1/config.h b/keyboards/claw44/rev1/config.h index f3406fee5c..dc6e49dd9a 100644 --- a/keyboards/claw44/rev1/config.h +++ b/keyboards/claw44/rev1/config.h @@ -19,22 +19,21 @@ 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 yfuku -#define PRODUCT claw44 -#define DESCRIPTION A split keyboard with 3x6 vertically staggered keys and 4 thumb keys +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER yfuku +#define PRODUCT claw44 +#define DESCRIPTION A split keyboard with 3x6 vertically staggered keys and 4 thumb keys /* key matrix size */ -// Rows are doubled-up #define MATRIX_ROWS 8 -#define MATRIX_COLS 7 +#define MATRIX_COLS 6 #define MATRIX_ROW_PINS { D4, C6, D7, E6 } - -// wiring of each half -#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } -// #define MATRIX_COL_PINS { 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 MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } +#define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW +#define SOFT_SERIAL_PIN D2 /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/claw44/rev1/matrix.c b/keyboards/claw44/rev1/matrix.c deleted file mode 100644 index a5896d9792..0000000000 --- a/keyboards/claw44/rev1/matrix.c +++ /dev/null @@ -1,358 +0,0 @@ -/* -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 . -*/ - -/* - * scan matrix - */ -#include -#include -#include -#include -#include -#include -#include -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "split_util.h" -#include "quantum.h" - -#ifdef USE_MATRIX_I2C -# include "i2c.h" -#else // USE_SERIAL -# include "split_scomm.h" -#endif - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -#define ERROR_DISCONNECT_COUNT 5 - -static uint8_t debouncing = DEBOUNCE; -static const int ROWS_PER_HAND = MATRIX_ROWS/2; -static uint8_t error_count = 0; -uint8_t is_master = 0 ; - -static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static const uint8_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 read_cols(void); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); -static uint8_t matrix_master_scan(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) { -} - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - debug_enable = true; - debug_matrix = true; - debug_mouse = true; - // initialize row and col - unselect_rows(); - init_cols(); - - setPinOutput(B0); - setPinOutput(D5); - writePinHigh(B0); - writePinHigh(D5); - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - - is_master = has_usb(); - - matrix_init_quantum(); -} - -uint8_t _matrix_scan(void) -{ - // Right hand is stored after the left in the matirx so, we need to offset it - int offset = isLeftHand ? 0 : (ROWS_PER_HAND); - - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - select_row(i); - _delay_us(30); // without this wait read unstable value. - matrix_row_t cols = read_cols(); - if (matrix_debouncing[i+offset] != cols) { - matrix_debouncing[i+offset] = cols; - debouncing = DEBOUNCE; - } - unselect_rows(); - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - matrix[i+offset] = matrix_debouncing[i+offset]; - } - } - } - - return 1; -} - -#ifdef USE_MATRIX_I2C - -// Get rows from other half over i2c -int i2c_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); - if (err) goto i2c_error; - - // start of matrix stored at 0x00 - err = i2c_master_write(0x00); - if (err) goto i2c_error; - - // Start read - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); - if (err) goto i2c_error; - - if (!err) { - int i; - for (i = 0; i < ROWS_PER_HAND-1; ++i) { - matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); - } - matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); - i2c_master_stop(); - } else { -i2c_error: // the cable is disconnceted, or something else went wrong - i2c_reset_state(); - return err; - } - - return 0; -} - -#else // USE_SERIAL - -int serial_transaction(int master_changed) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; -#ifdef SERIAL_USE_MULTI_TRANSACTION - int ret=serial_update_buffers(master_changed); -#else - int ret=serial_update_buffers(); -#endif - if (ret ) { - if(ret==2) writePinLow(B0); - return 1; - } - writePinHigh(B0); - memcpy(&matrix[slaveOffset], - (void *)serial_slave_buffer, SERIAL_SLAVE_BUFFER_LENGTH); - return 0; -} -#endif - -uint8_t matrix_scan(void) -{ - if (is_master) { - matrix_master_scan(); - }else{ - matrix_slave_scan(); - int offset = (isLeftHand) ? ROWS_PER_HAND : 0; - memcpy(&matrix[offset], - (void *)serial_master_buffer, SERIAL_MASTER_BUFFER_LENGTH); - matrix_scan_quantum(); - } - return 1; -} - - -uint8_t matrix_master_scan(void) { - - int ret = _matrix_scan(); - int mchanged = 1; - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - -#ifdef USE_MATRIX_I2C -// for (int i = 0; i < ROWS_PER_HAND; ++i) { - /* i2c_slave_buffer[i] = matrix[offset+i]; */ -// i2c_slave_buffer[i] = matrix[offset+i]; -// } -#else // USE_SERIAL - #ifdef SERIAL_USE_MULTI_TRANSACTION - mchanged = memcmp((void *)serial_master_buffer, - &matrix[offset], SERIAL_MASTER_BUFFER_LENGTH); - #endif - memcpy((void *)serial_master_buffer, - &matrix[offset], SERIAL_MASTER_BUFFER_LENGTH); -#endif - -#ifdef USE_MATRIX_I2C - if( i2c_transaction() ) { -#else // USE_SERIAL - if( serial_transaction(mchanged) ) { -#endif - // turn on the indicator led when halves are disconnected - writePinLow(D5); - - error_count++; - - if (error_count > ERROR_DISCONNECT_COUNT) { - // reset other half if disconnected - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = 0; - } - } - } else { - // turn off the indicator led on no error - writePinHigh(D5); - error_count = 0; - } - matrix_scan_quantum(); - return ret; -} - -void matrix_slave_scan(void) { - _matrix_scan(); - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - -#ifdef USE_MATRIX_I2C - for (int i = 0; i < ROWS_PER_HAND; ++i) { - /* i2c_slave_buffer[i] = matrix[offset+i]; */ - i2c_slave_buffer[i] = matrix[offset+i]; - } -#else // USE_SERIAL - #ifdef SERIAL_USE_MULTI_TRANSACTION - int change = 0; - #endif - for (int i = 0; i < ROWS_PER_HAND; ++i) { - #ifdef SERIAL_USE_MULTI_TRANSACTION - if( serial_slave_buffer[i] != matrix[offset+i] ) - change = 1; - #endif - serial_slave_buffer[i] = matrix[offset+i]; - } - #ifdef SERIAL_USE_MULTI_TRANSACTION - slave_buffer_change_count += change; - #endif -#endif -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(col_pins[x] & 0xF); - _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); - } -} - -static matrix_row_t read_cols(void) -{ - matrix_row_t result = 0; - for(int x = 0; x < MATRIX_COLS; x++) { - result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); - } - return result; -} - -static void unselect_rows(void) -{ - for(int x = 0; x < ROWS_PER_HAND; x++) { - _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); - _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); - } -} - -static void select_row(uint8_t row) -{ - _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); - _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); -} diff --git a/keyboards/claw44/rev1/rev1.c b/keyboards/claw44/rev1/rev1.c index 9529636f56..520a869e57 100644 --- a/keyboards/claw44/rev1/rev1.c +++ b/keyboards/claw44/rev1/rev1.c @@ -1,8 +1 @@ -#include "claw44.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 +#include "rev1.h" diff --git a/keyboards/claw44/rev1/rev1.h b/keyboards/claw44/rev1/rev1.h index c6c9057fdc..79ae9586db 100644 --- a/keyboards/claw44/rev1/rev1.h +++ b/keyboards/claw44/rev1/rev1.h @@ -1,55 +1,33 @@ #pragma once -#include "../claw44.h" - #include "quantum.h" -#ifdef RGBLIGHT_ENABLE -//rgb led driver -#include "ws2812.h" -#endif - -#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, R30, R31, R32, R33 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { KC_NO, KC_NO, L30, L31, L32, L33 }, \ - { R05, R04, R03, R02, R01, R00 }, \ - { R15, R14, R13, R12, R11, R10 }, \ - { R25, R24, R23, R22, R21, R20 }, \ - { KC_NO, KC_NO, R33, R32, R31, R30 } \ - } + 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, R30, R31, R32, R33 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { KC_NO, KC_NO, L30, L31, L32, L33 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { KC_NO, KC_NO, R33, R32, R31, R30 } \ + } #define LAYOUT_kc( \ - 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, R30, R31, R32, R33 \ - ) \ - LAYOUT( \ - KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ - KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ - KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ - KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##R30, KC_##R31, KC_##R32, KC_##R33 \ - ) - -enum layer_number { - _QWERTY = 0, - _LOWER, - _RAISE, - _ADJUST, -}; + 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, R30, R31, R32, R33 \ + ) \ + LAYOUT( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##R30, KC_##R31, KC_##R32, KC_##R33 \ + ) diff --git a/keyboards/claw44/rev1/rules.mk b/keyboards/claw44/rev1/rules.mk index 016bc362a1..b1af22c59a 100644 --- a/keyboards/claw44/rev1/rules.mk +++ b/keyboards/claw44/rev1/rules.mk @@ -1,7 +1,3 @@ -SRC += rev1/matrix.c -SRC += rev1/split_util.c -SRC += rev1/split_scomm.c - # Build Options BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = no # Mouse keys @@ -10,7 +6,6 @@ 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 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 @@ -20,12 +15,5 @@ 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/layer_state_reader.c \ - ./lib/logo_reader.c \ - ./lib/keylogger.c \ - # ./lib/rgb_state_reader.c \ - # ./lib/mode_icon_reader.c \ - # ./lib/host_led_state_reader.c \ - # ./lib/timelogger.c \ +OLED_DRIVER_ENABLE = no # Add OLED displays support +SPLIT_KEYBOARD = yes diff --git a/keyboards/claw44/rev1/serial_config.h b/keyboards/claw44/rev1/serial_config.h deleted file mode 100644 index 4fab8e8ddf..0000000000 --- a/keyboards/claw44/rev1/serial_config.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef SOFT_SERIAL_PIN -#define SOFT_SERIAL_PIN D2 -#define SERIAL_USE_MULTI_TRANSACTION -#endif diff --git a/keyboards/claw44/rev1/split_scomm.c b/keyboards/claw44/rev1/split_scomm.c deleted file mode 100644 index a1fe6ba5b8..0000000000 --- a/keyboards/claw44/rev1/split_scomm.c +++ /dev/null @@ -1,91 +0,0 @@ -#ifdef USE_SERIAL -#ifdef SERIAL_USE_MULTI_TRANSACTION -/* --- USE flexible API (using multi-type transaction function) --- */ - -#include -#include -#include -#include -#include "serial.h" -#ifdef CONSOLE_ENABLE - #include -#endif - -uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; -uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; -uint8_t volatile status_com = 0; -uint8_t volatile status1 = 0; -uint8_t slave_buffer_change_count = 0; -uint8_t s_change_old = 0xff; -uint8_t s_change_new = 0xff; - -SSTD_t transactions[] = { -#define GET_SLAVE_STATUS 0 - /* master buffer not changed, only recive slave_buffer_change_count */ - { (uint8_t *)&status_com, - 0, NULL, - sizeof(slave_buffer_change_count), &slave_buffer_change_count, - }, -#define PUT_MASTER_GET_SLAVE_STATUS 1 - /* master buffer changed need send, and recive slave_buffer_change_count */ - { (uint8_t *)&status_com, - sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, - sizeof(slave_buffer_change_count), &slave_buffer_change_count, - }, -#define GET_SLAVE_BUFFER 2 - /* recive serial_slave_buffer */ - { (uint8_t *)&status1, - 0, NULL, - sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer - } -}; - -void serial_master_init(void) -{ - soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); -} - -void serial_slave_init(void) -{ - soft_serial_target_init(transactions, TID_LIMIT(transactions)); -} - -// 0 => no error -// 1 => slave did not respond -// 2 => checksum error -int serial_update_buffers(int master_update) -{ - int status, smatstatus; - static int need_retry = 0; - - if( s_change_old != s_change_new ) { - smatstatus = soft_serial_transaction(GET_SLAVE_BUFFER); - if( smatstatus == TRANSACTION_END ) { - s_change_old = s_change_new; -#ifdef CONSOLE_ENABLE - uprintf("slave matrix = %b %b %b %b\n", - serial_slave_buffer[0], serial_slave_buffer[1], - serial_slave_buffer[2], serial_slave_buffer[3]); -#endif - } - } else { - // serial_slave_buffer dosen't change - smatstatus = TRANSACTION_END; // dummy status - } - - if( !master_update && !need_retry) { - status = soft_serial_transaction(GET_SLAVE_STATUS); - } else { - status = soft_serial_transaction(PUT_MASTER_GET_SLAVE_STATUS); - } - if( status == TRANSACTION_END ) { - s_change_new = slave_buffer_change_count; - need_retry = 0; - } else { - need_retry = 1; - } - return smatstatus; -} - -#endif // SERIAL_USE_MULTI_TRANSACTION -#endif /* USE_SERIAL */ diff --git a/keyboards/claw44/rev1/split_scomm.h b/keyboards/claw44/rev1/split_scomm.h deleted file mode 100644 index 873d8939d8..0000000000 --- a/keyboards/claw44/rev1/split_scomm.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef SPLIT_COMM_H -#define SPLIT_COMM_H - -#ifndef SERIAL_USE_MULTI_TRANSACTION -/* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */ -#include "serial.h" - -#else -/* --- USE flexible API (using multi-type transaction function) --- */ -// Buffers for master - slave communication -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 - -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; -extern uint8_t slave_buffer_change_count; - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(int master_changed); - -#endif - -#endif /* SPLIT_COMM_H */ diff --git a/keyboards/claw44/rev1/split_util.c b/keyboards/claw44/rev1/split_util.c deleted file mode 100644 index e1ff8b4379..0000000000 --- a/keyboards/claw44/rev1/split_util.c +++ /dev/null @@ -1,70 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "split_util.h" -#include "matrix.h" -#include "keyboard.h" - -#ifdef USE_MATRIX_I2C -# include "i2c.h" -#else -# include "split_scomm.h" -#endif - -volatile bool isLeftHand = true; - -static void setup_handedness(void) { - #ifdef EE_HANDS - isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); - #else - // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c - #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) - isLeftHand = !has_usb(); - #else - isLeftHand = has_usb(); - #endif - #endif -} - -static void keyboard_master_setup(void) { - -#ifdef USE_MATRIX_I2C - i2c_master_init(); -#else - serial_master_init(); -#endif -} - -static void keyboard_slave_setup(void) { - -#ifdef USE_MATRIX_I2C - i2c_slave_init(SLAVE_I2C_ADDRESS); -#else - serial_slave_init(); -#endif -} - -bool has_usb(void) { - USBCON |= (1 << OTGPADE); //enables VBUS pad - _delay_us(5); - return (USBSTA & (1< -#include "eeconfig.h" - -#define SLAVE_I2C_ADDRESS 0x32 - -extern volatile bool isLeftHand; - -// slave version of matix scan, defined in matrix.c -void matrix_slave_scan(void); - -void split_keyboard_setup(void); -bool has_usb(void); - -void matrix_master_OLED_init (void); - -#endif diff --git a/keyboards/claw44/rules.mk b/keyboards/claw44/rules.mk index f872b9ebfa..f4d44b23b7 100644 --- a/keyboards/claw44/rules.mk +++ b/keyboards/claw44/rules.mk @@ -22,7 +22,6 @@ 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 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 @@ -30,12 +29,4 @@ 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 -CUSTOM_MATRIX = yes -SRC += i2c.c -SRC += serial.c -SRC += ssd1306.c - -# if firmware size over limit, try this option -# CFLAGS += -flto - DEFAULT_FOLDER = claw44/rev1 diff --git a/keyboards/claw44/serial.c b/keyboards/claw44/serial.c deleted file mode 100644 index f6293c3dc2..0000000000 --- a/keyboards/claw44/serial.c +++ /dev/null @@ -1,589 +0,0 @@ -/* - * WARNING: be careful changing this code, it is very timing dependent - * - * 2018-10-28 checked - * avr-gcc 4.9.2 - * avr-gcc 5.4.0 - * avr-gcc 7.3.0 - */ - -#ifndef F_CPU -#define F_CPU 16000000 -#endif - -#include -#include -#include -#include -#include -#include "serial.h" - -#ifdef SOFT_SERIAL_PIN - -#ifdef __AVR_ATmega32U4__ - // if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial. - #ifdef USE_I2C - #if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1 - #error Using ATmega32U4 I2C, so can not use PD0, PD1 - #endif - #endif - - #if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3 - #define SERIAL_PIN_DDR DDRD - #define SERIAL_PIN_PORT PORTD - #define SERIAL_PIN_INPUT PIND - #if SOFT_SERIAL_PIN == D0 - #define SERIAL_PIN_MASK _BV(PD0) - #define EIMSK_BIT _BV(INT0) - #define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01))) - #define SERIAL_PIN_INTERRUPT INT0_vect - #elif SOFT_SERIAL_PIN == D1 - #define SERIAL_PIN_MASK _BV(PD1) - #define EIMSK_BIT _BV(INT1) - #define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11))) - #define SERIAL_PIN_INTERRUPT INT1_vect - #elif SOFT_SERIAL_PIN == D2 - #define SERIAL_PIN_MASK _BV(PD2) - #define EIMSK_BIT _BV(INT2) - #define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21))) - #define SERIAL_PIN_INTERRUPT INT2_vect - #elif SOFT_SERIAL_PIN == D3 - #define SERIAL_PIN_MASK _BV(PD3) - #define EIMSK_BIT _BV(INT3) - #define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31))) - #define SERIAL_PIN_INTERRUPT INT3_vect - #endif - #elif SOFT_SERIAL_PIN == E6 - #define SERIAL_PIN_DDR DDRE - #define SERIAL_PIN_PORT PORTE - #define SERIAL_PIN_INPUT PINE - #define SERIAL_PIN_MASK _BV(PE6) - #define EIMSK_BIT _BV(INT6) - #define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61))) - #define SERIAL_PIN_INTERRUPT INT6_vect - #else - #error invalid SOFT_SERIAL_PIN value - #endif - -#else - #error serial.c now support ATmega32U4 only -#endif - -//////////////// for backward compatibility //////////////////////////////// -#ifndef SERIAL_USE_MULTI_TRANSACTION -/* --- USE Simple API (OLD API, compatible with let's split serial.c) */ - #if SERIAL_SLAVE_BUFFER_LENGTH > 0 - uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; - #endif - #if SERIAL_MASTER_BUFFER_LENGTH > 0 - uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; - #endif - uint8_t volatile status0 = 0; - -SSTD_t transactions[] = { - { (uint8_t *)&status0, - #if SERIAL_MASTER_BUFFER_LENGTH > 0 - sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, - #else - 0, (uint8_t *)NULL, - #endif - #if SERIAL_SLAVE_BUFFER_LENGTH > 0 - sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer - #else - 0, (uint8_t *)NULL, - #endif - } -}; - -void serial_master_init(void) -{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } - -void serial_slave_init(void) -{ soft_serial_target_init(transactions, TID_LIMIT(transactions)); } - -// 0 => no error -// 1 => slave did not respond -// 2 => checksum error -int serial_update_buffers() -{ - int result; - result = soft_serial_transaction(); - return result; -} - -#endif // end of Simple API (OLD API, compatible with let's split serial.c) -//////////////////////////////////////////////////////////////////////////// - -#define ALWAYS_INLINE __attribute__((always_inline)) -#define NO_INLINE __attribute__((noinline)) -#define _delay_sub_us(x) __builtin_avr_delay_cycles(x) - -// parity check -#define ODD_PARITY 1 -#define EVEN_PARITY 0 -#define PARITY EVEN_PARITY - -#ifdef SERIAL_DELAY - // custom setup in config.h - // #define TID_SEND_ADJUST 2 - // #define SERIAL_DELAY 6 // micro sec - // #define READ_WRITE_START_ADJUST 30 // cycles - // #define READ_WRITE_WIDTH_ADJUST 8 // cycles -#else -// ============ Standard setups ============ - -#ifndef SELECT_SOFT_SERIAL_SPEED -#define SELECT_SOFT_SERIAL_SPEED 1 -// 0: about 189kbps -// 1: about 137kbps (default) -// 2: about 75kbps -// 3: about 39kbps -// 4: about 26kbps -// 5: about 20kbps -#endif - -#if __GNUC__ < 6 - #define TID_SEND_ADJUST 14 -#else - #define TID_SEND_ADJUST 2 -#endif - -#if SELECT_SOFT_SERIAL_SPEED == 0 - // Very High speed - #define SERIAL_DELAY 4 // micro sec - #if __GNUC__ < 6 - #define READ_WRITE_START_ADJUST 33 // cycles - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_START_ADJUST 34 // cycles - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 1 - // High speed - #define SERIAL_DELAY 6 // micro sec - #if __GNUC__ < 6 - #define READ_WRITE_START_ADJUST 30 // cycles - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_START_ADJUST 33 // cycles - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 2 - // Middle speed - #define SERIAL_DELAY 12 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 3 - // Low speed - #define SERIAL_DELAY 24 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 4 - // Very Low speed - #define SERIAL_DELAY 36 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 5 - // Ultra Low speed - #define SERIAL_DELAY 48 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#else -#error invalid SELECT_SOFT_SERIAL_SPEED value -#endif /* SELECT_SOFT_SERIAL_SPEED */ -#endif /* SERIAL_DELAY */ - -#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2) -#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2) - -#define SLAVE_INT_WIDTH_US 1 -#ifndef SERIAL_USE_MULTI_TRANSACTION - #define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY -#else - #define SLAVE_INT_ACK_WIDTH_UNIT 2 - #define SLAVE_INT_ACK_WIDTH 4 -#endif - -static SSTD_t *Transaction_table = NULL; -static uint8_t Transaction_table_size = 0; - -inline static void serial_delay(void) ALWAYS_INLINE; -inline static -void serial_delay(void) { - _delay_us(SERIAL_DELAY); -} - -inline static void serial_delay_half1(void) ALWAYS_INLINE; -inline static -void serial_delay_half1(void) { - _delay_us(SERIAL_DELAY_HALF1); -} - -inline static void serial_delay_half2(void) ALWAYS_INLINE; -inline static -void serial_delay_half2(void) { - _delay_us(SERIAL_DELAY_HALF2); -} - -inline static void serial_output(void) ALWAYS_INLINE; -inline static -void serial_output(void) { - SERIAL_PIN_DDR |= SERIAL_PIN_MASK; -} - -// make the serial pin an input with pull-up resistor -inline static void serial_input_with_pullup(void) ALWAYS_INLINE; -inline static -void serial_input_with_pullup(void) { - SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -inline static uint8_t serial_read_pin(void) ALWAYS_INLINE; -inline static -uint8_t serial_read_pin(void) { - return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); -} - -inline static void serial_low(void) ALWAYS_INLINE; -inline static -void serial_low(void) { - SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; -} - -inline static void serial_high(void) ALWAYS_INLINE; -inline static -void serial_high(void) { - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size) -{ - Transaction_table = sstd_table; - Transaction_table_size = (uint8_t)sstd_table_size; - serial_output(); - serial_high(); -} - -void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) -{ - Transaction_table = sstd_table; - Transaction_table_size = (uint8_t)sstd_table_size; - serial_input_with_pullup(); - - // Enable INT0-INT3,INT6 - EIMSK |= EIMSK_BIT; -#if SERIAL_PIN_MASK == _BV(PE6) - // Trigger on falling edge of INT6 - EICRB &= EICRx_BIT; -#else - // Trigger on falling edge of INT0-INT3 - EICRA &= EICRx_BIT; -#endif -} - -// Used by the sender to synchronize timing with the reciver. -static void sync_recv(void) NO_INLINE; -static -void sync_recv(void) { - for (uint8_t i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) { - } - // This shouldn't hang if the target disconnects because the - // serial line will float to high if the target does disconnect. - while (!serial_read_pin()); -} - -// Used by the reciver to send a synchronization signal to the sender. -static void sync_send(void) NO_INLINE; -static -void sync_send(void) { - serial_low(); - serial_delay(); - serial_high(); -} - -// Reads a byte from the serial line -static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE; -static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) { - uint8_t byte, i, p, pb; - - _delay_sub_us(READ_WRITE_START_ADJUST); - for( i = 0, byte = 0, p = PARITY; i < bit; i++ ) { - serial_delay_half1(); // read the middle of pulses - if( serial_read_pin() ) { - byte = (byte << 1) | 1; p ^= 1; - } else { - byte = (byte << 1) | 0; p ^= 0; - } - _delay_sub_us(READ_WRITE_WIDTH_ADJUST); - serial_delay_half2(); - } - /* recive parity bit */ - serial_delay_half1(); // read the middle of pulses - pb = serial_read_pin(); - _delay_sub_us(READ_WRITE_WIDTH_ADJUST); - serial_delay_half2(); - - *pterrcount += (p != pb)? 1 : 0; - - return byte; -} - -// Sends a byte with MSB ordering -void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE; -void serial_write_chunk(uint8_t data, uint8_t bit) { - uint8_t b, p; - for( p = PARITY, b = 1<<(bit-1); b ; b >>= 1) { - if(data & b) { - serial_high(); p ^= 1; - } else { - serial_low(); p ^= 0; - } - serial_delay(); - } - /* send parity bit */ - if(p & 1) { serial_high(); } - else { serial_low(); } - serial_delay(); - - serial_low(); // sync_send() / senc_recv() need raise edge -} - -static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE; -static -void serial_send_packet(uint8_t *buffer, uint8_t size) { - for (uint8_t i = 0; i < size; ++i) { - uint8_t data; - data = buffer[i]; - sync_send(); - serial_write_chunk(data,8); - } -} - -static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE; -static -uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) { - uint8_t pecount = 0; - for (uint8_t i = 0; i < size; ++i) { - uint8_t data; - sync_recv(); - data = serial_read_chunk(&pecount, 8); - buffer[i] = data; - } - return pecount == 0; -} - -inline static -void change_sender2reciver(void) { - sync_send(); //0 - serial_delay_half1(); //1 - serial_low(); //2 - serial_input_with_pullup(); //2 - serial_delay_half1(); //3 -} - -inline static -void change_reciver2sender(void) { - sync_recv(); //0 - serial_delay(); //1 - serial_low(); //3 - serial_output(); //3 - serial_delay_half1(); //4 -} - -static inline uint8_t nibble_bits_count(uint8_t bits) -{ - bits = (bits & 0x5) + (bits >> 1 & 0x5); - bits = (bits & 0x3) + (bits >> 2 & 0x3); - return bits; -} - -// interrupt handle to be used by the target device -ISR(SERIAL_PIN_INTERRUPT) { - -#ifndef SERIAL_USE_MULTI_TRANSACTION - serial_low(); - serial_output(); - SSTD_t *trans = Transaction_table; -#else - // recive transaction table index - uint8_t tid, bits; - uint8_t pecount = 0; - sync_recv(); - bits = serial_read_chunk(&pecount,7); - tid = bits>>3; - bits = (bits&7) != nibble_bits_count(tid); - if( bits || pecount> 0 || tid > Transaction_table_size ) { - return; - } - serial_delay_half1(); - - serial_high(); // response step1 low->high - serial_output(); - _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT*SLAVE_INT_ACK_WIDTH); - SSTD_t *trans = &Transaction_table[tid]; - serial_low(); // response step2 ack high->low -#endif - - // target send phase - if( trans->target2initiator_buffer_size > 0 ) - serial_send_packet((uint8_t *)trans->target2initiator_buffer, - trans->target2initiator_buffer_size); - // target switch to input - change_sender2reciver(); - - // target recive phase - if( trans->initiator2target_buffer_size > 0 ) { - if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer, - trans->initiator2target_buffer_size) ) { - *trans->status = TRANSACTION_ACCEPTED; - } else { - *trans->status = TRANSACTION_DATA_ERROR; - } - } else { - *trans->status = TRANSACTION_ACCEPTED; - } - - sync_recv(); //weit initiator output to high -} - -///////// -// start transaction by initiator -// -// int soft_serial_transaction(int sstd_index) -// -// Returns: -// TRANSACTION_END -// TRANSACTION_NO_RESPONSE -// TRANSACTION_DATA_ERROR -// this code is very time dependent, so we need to disable interrupts -#ifndef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_transaction(void) { - SSTD_t *trans = Transaction_table; -#else -int soft_serial_transaction(int sstd_index) { - if( sstd_index > Transaction_table_size ) - return TRANSACTION_TYPE_ERROR; - SSTD_t *trans = &Transaction_table[sstd_index]; -#endif - cli(); - - // signal to the target that we want to start a transaction - serial_output(); - serial_low(); - _delay_us(SLAVE_INT_WIDTH_US); - -#ifndef SERIAL_USE_MULTI_TRANSACTION - // wait for the target response - serial_input_with_pullup(); - _delay_us(SLAVE_INT_RESPONSE_TIME); - - // check if the target is present - if (serial_read_pin()) { - // target failed to pull the line low, assume not present - serial_output(); - serial_high(); - *trans->status = TRANSACTION_NO_RESPONSE; - sei(); - return TRANSACTION_NO_RESPONSE; - } - -#else - // send transaction table index - int tid = (sstd_index<<3) | (7 & nibble_bits_count(sstd_index)); - sync_send(); - _delay_sub_us(TID_SEND_ADJUST); - serial_write_chunk(tid, 7); - serial_delay_half1(); - - // wait for the target response (step1 low->high) - serial_input_with_pullup(); - while( !serial_read_pin() ) { - _delay_sub_us(2); - } - - // check if the target is present (step2 high->low) - for( int i = 0; serial_read_pin(); i++ ) { - if (i > SLAVE_INT_ACK_WIDTH + 1) { - // slave failed to pull the line low, assume not present - serial_output(); - serial_high(); - *trans->status = TRANSACTION_NO_RESPONSE; - sei(); - return TRANSACTION_NO_RESPONSE; - } - _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT); - } -#endif - - // initiator recive phase - // if the target is present syncronize with it - if( trans->target2initiator_buffer_size > 0 ) { - if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer, - trans->target2initiator_buffer_size) ) { - serial_output(); - serial_high(); - *trans->status = TRANSACTION_DATA_ERROR; - sei(); - return TRANSACTION_DATA_ERROR; - } - } - - // initiator switch to output - change_reciver2sender(); - - // initiator send phase - if( trans->initiator2target_buffer_size > 0 ) { - serial_send_packet((uint8_t *)trans->initiator2target_buffer, - trans->initiator2target_buffer_size); - } - - // always, release the line when not in use - sync_send(); - - *trans->status = TRANSACTION_END; - sei(); - return TRANSACTION_END; -} - -#ifdef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_get_and_clean_status(int sstd_index) { - SSTD_t *trans = &Transaction_table[sstd_index]; - cli(); - int retval = *trans->status; - *trans->status = 0;; - sei(); - return retval; -} -#endif - -#endif - -// Helix serial.c history -// 2018-1-29 fork from let's split and add PD2, modify sync_recv() (#2308, bceffdefc) -// 2018-6-28 bug fix master to slave comm and speed up (#3255, 1038bbef4) -// (adjusted with avr-gcc 4.9.2) -// 2018-7-13 remove USE_SERIAL_PD2 macro (#3374, f30d6dd78) -// (adjusted with avr-gcc 4.9.2) -// 2018-8-11 add support multi-type transaction (#3608, feb5e4aae) -// (adjusted with avr-gcc 4.9.2) -// 2018-10-21 fix serial and RGB animation conflict (#4191, 4665e4fff) -// (adjusted with avr-gcc 7.3.0) -// 2018-10-28 re-adjust compiler depend value of delay (#4269, 8517f8a66) -// (adjusted with avr-gcc 5.4.0, 7.3.0) diff --git a/keyboards/claw44/serial.h b/keyboards/claw44/serial.h deleted file mode 100644 index 7e0c0847a4..0000000000 --- a/keyboards/claw44/serial.h +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef SOFT_SERIAL_H -#define SOFT_SERIAL_H - -#include - -// ///////////////////////////////////////////////////////////////// -// Need Soft Serial defines in config.h -// ///////////////////////////////////////////////////////////////// -// ex. -// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6 -// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5 -// // 1: about 137kbps (default) -// // 2: about 75kbps -// // 3: about 39kbps -// // 4: about 26kbps -// // 5: about 20kbps -// -// //// USE Simple API (OLD API, compatible with let's split serial.c) -// ex. -// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -// #define SERIAL_MASTER_BUFFER_LENGTH 1 -// -// //// USE flexible API (using multi-type transaction function) -// #define SERIAL_USE_MULTI_TRANSACTION -// -// ///////////////////////////////////////////////////////////////// - - -#ifndef SERIAL_USE_MULTI_TRANSACTION -/* --- USE Simple API (OLD API, compatible with let's split serial.c) */ -#if SERIAL_SLAVE_BUFFER_LENGTH > 0 -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -#endif -#if SERIAL_MASTER_BUFFER_LENGTH > 0 -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; -#endif - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(void); - -#endif // USE Simple API - -// Soft Serial Transaction Descriptor -typedef struct _SSTD_t { - uint8_t *status; - uint8_t initiator2target_buffer_size; - uint8_t *initiator2target_buffer; - uint8_t target2initiator_buffer_size; - uint8_t *target2initiator_buffer; -} SSTD_t; -#define TID_LIMIT( table ) (sizeof(table) / sizeof(SSTD_t)) - -// initiator is transaction start side -void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size); -// target is interrupt accept side -void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size); - -// initiator resullt -#define TRANSACTION_END 0 -#define TRANSACTION_NO_RESPONSE 0x1 -#define TRANSACTION_DATA_ERROR 0x2 -#define TRANSACTION_TYPE_ERROR 0x4 -#ifndef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_transaction(void); -#else -int soft_serial_transaction(int sstd_index); -#endif - -// target status -// *SSTD_t.status has -// initiator: -// TRANSACTION_END -// or TRANSACTION_NO_RESPONSE -// or TRANSACTION_DATA_ERROR -// target: -// TRANSACTION_DATA_ERROR -// or TRANSACTION_ACCEPTED -#define TRANSACTION_ACCEPTED 0x8 -#ifdef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_get_and_clean_status(int sstd_index); -#endif - -#endif /* SOFT_SERIAL_H */ diff --git a/keyboards/claw44/ssd1306.c b/keyboards/claw44/ssd1306.c deleted file mode 100644 index 7dea1cc176..0000000000 --- a/keyboards/claw44/ssd1306.c +++ /dev/null @@ -1,345 +0,0 @@ -#ifdef SSD1306OLED - -#include "ssd1306.h" -#include "i2c.h" -#include -#include "print.h" -#ifdef PROTOCOL_LUFA -#include "lufa.h" -#endif -#include "sendchar.h" -#include "timer.h" - -struct CharacterMatrix display; - -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, -// as the latency of printing most of the debug info messes -// with the matrix scan, causing keys to drop. -#define DEBUG_TO_SCREEN 0 - -//static uint16_t last_battery_update; -//static uint32_t vbat; -//#define BatteryUpdateInterval 10000 /* milliseconds */ - -// 'last_flush' is declared as uint16_t, -// so this must be less than 65535 -#define ScreenOffInterval 60000 /* milliseconds */ -#if DEBUG_TO_SCREEN -static uint8_t displaying; -#endif -static uint16_t last_flush; - -static bool force_dirty = true; - -// Write command sequence. -// Returns true on success. -static inline bool _send_cmd1(uint8_t cmd) { - bool res = false; - - if (i2c_start_write(SSD1306_ADDRESS)) { - xprintf("failed to start write to %d\n", SSD1306_ADDRESS); - goto done; - } - - if (i2c_master_write(0x0 /* command byte follows */)) { - print("failed to write control byte\n"); - - goto done; - } - - if (i2c_master_write(cmd)) { - xprintf("failed to write command %d\n", cmd); - goto done; - } - res = true; -done: - i2c_master_stop(); - return res; -} - -// Write 2-byte command sequence. -// Returns true on success -static inline bool _send_cmd2(uint8_t cmd, uint8_t opr) { - if (!_send_cmd1(cmd)) { - return false; - } - return _send_cmd1(opr); -} - -// Write 3-byte command sequence. -// Returns true on success -static inline bool _send_cmd3(uint8_t cmd, uint8_t opr1, uint8_t opr2) { - if (!_send_cmd1(cmd)) { - return false; - } - if (!_send_cmd1(opr1)) { - return false; - } - return _send_cmd1(opr2); -} - -#define send_cmd1(c) if (!_send_cmd1(c)) {goto done;} -#define send_cmd2(c,o) if (!_send_cmd2(c,o)) {goto done;} -#define send_cmd3(c,o1,o2) if (!_send_cmd3(c,o1,o2)) {goto done;} - -static void clear_display(void) { - matrix_clear(&display); - - // Clear all of the display bits (there can be random noise - // in the RAM on startup) - send_cmd3(PageAddr, 0, (DisplayHeight / 8) - 1); - send_cmd3(ColumnAddr, 0, DisplayWidth - 1); - - if (i2c_start_write(SSD1306_ADDRESS)) { - goto done; - } - if (i2c_master_write(0x40)) { - // Data mode - goto done; - } - for (uint8_t row = 0; row < MatrixRows; ++row) { - for (uint8_t col = 0; col < DisplayWidth; ++col) { - i2c_master_write(0); - } - } - - display.dirty = false; - -done: - i2c_master_stop(); -} - -#if DEBUG_TO_SCREEN -#undef sendchar -static int8_t capture_sendchar(uint8_t c) { - sendchar(c); - iota_gfx_write_char(c); - - if (!displaying) { - iota_gfx_flush(); - } - return 0; -} -#endif - -bool iota_gfx_init(bool rotate) { - bool success = false; - - i2c_master_init(); - send_cmd1(DisplayOff); - send_cmd2(SetDisplayClockDiv, 0x80); - send_cmd2(SetMultiPlex, DisplayHeight - 1); - - send_cmd2(SetDisplayOffset, 0); - - - send_cmd1(SetStartLine | 0x0); - send_cmd2(SetChargePump, 0x14 /* Enable */); - send_cmd2(SetMemoryMode, 0 /* horizontal addressing */); - - if(rotate){ - // the following Flip the display orientation 180 degrees - send_cmd1(SegRemap); - send_cmd1(ComScanInc); - }else{ - // Flips the display orientation 0 degrees - send_cmd1(SegRemap | 0x1); - send_cmd1(ComScanDec); - } - - send_cmd2(SetComPins, 0x2); - send_cmd2(SetContrast, 0x8f); - send_cmd2(SetPreCharge, 0xf1); - send_cmd2(SetVComDetect, 0x40); - send_cmd1(DisplayAllOnResume); - send_cmd1(NormalDisplay); - send_cmd1(DeActivateScroll); - send_cmd1(DisplayOn); - - send_cmd2(SetContrast, 0); // Dim - - clear_display(); - - success = true; - - iota_gfx_flush(); - -#if DEBUG_TO_SCREEN - print_set_sendchar(capture_sendchar); -#endif - -done: - return success; -} - -bool iota_gfx_off(void) { - bool success = false; - - send_cmd1(DisplayOff); - success = true; - -done: - return success; -} - -bool iota_gfx_on(void) { - bool success = false; - - send_cmd1(DisplayOn); - success = true; - -done: - return success; -} - -void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c) { - *matrix->cursor = c; - ++matrix->cursor; - - if (matrix->cursor - &matrix->display[0][0] == sizeof(matrix->display)) { - // We went off the end; scroll the display upwards by one line - memmove(&matrix->display[0], &matrix->display[1], - MatrixCols * (MatrixRows - 1)); - matrix->cursor = &matrix->display[MatrixRows - 1][0]; - memset(matrix->cursor, ' ', MatrixCols); - } -} - -void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c) { - matrix->dirty = true; - - if (c == '\n') { - // Clear to end of line from the cursor and then move to the - // start of the next line - uint8_t cursor_col = (matrix->cursor - &matrix->display[0][0]) % MatrixCols; - - while (cursor_col++ < MatrixCols) { - matrix_write_char_inner(matrix, ' '); - } - return; - } - - matrix_write_char_inner(matrix, c); -} - -void iota_gfx_write_char(uint8_t c) { - matrix_write_char(&display, c); -} - -void matrix_write(struct CharacterMatrix *matrix, const char *data) { - const char *end = data + strlen(data); - while (data < end) { - matrix_write_char(matrix, *data); - ++data; - } -} - -void matrix_write_ln(struct CharacterMatrix *matrix, const char *data) { - char data_ln[strlen(data)+2]; - snprintf(data_ln, sizeof(data_ln), "%s\n", data); - matrix_write(matrix, data_ln); -} - -void iota_gfx_write(const char *data) { - matrix_write(&display, data); -} - -void matrix_write_P(struct CharacterMatrix *matrix, const char *data) { - while (true) { - uint8_t c = pgm_read_byte(data); - if (c == 0) { - return; - } - matrix_write_char(matrix, c); - ++data; - } -} - -void iota_gfx_write_P(const char *data) { - matrix_write_P(&display, data); -} - -void matrix_clear(struct CharacterMatrix *matrix) { - memset(matrix->display, ' ', sizeof(matrix->display)); - matrix->cursor = &matrix->display[0][0]; - matrix->dirty = true; -} - -void iota_gfx_clear_screen(void) { - matrix_clear(&display); -} - -void matrix_render(struct CharacterMatrix *matrix) { - last_flush = timer_read(); - iota_gfx_on(); -#if DEBUG_TO_SCREEN - ++displaying; -#endif - - // Move to the home position - send_cmd3(PageAddr, 0, MatrixRows - 1); - send_cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1); - - if (i2c_start_write(SSD1306_ADDRESS)) { - goto done; - } - if (i2c_master_write(0x40)) { - // Data mode - goto done; - } - - for (uint8_t row = 0; row < MatrixRows; ++row) { - for (uint8_t col = 0; col < MatrixCols; ++col) { - const uint8_t *glyph = font + (matrix->display[row][col] * FontWidth); - - for (uint8_t glyphCol = 0; glyphCol < FontWidth; ++glyphCol) { - uint8_t colBits = pgm_read_byte(glyph + glyphCol); - i2c_master_write(colBits); - } - - // 1 column of space between chars (it's not included in the glyph) - //i2c_master_write(0); - } - } - - matrix->dirty = false; - -done: - i2c_master_stop(); -#if DEBUG_TO_SCREEN - --displaying; -#endif -} - -void iota_gfx_flush(void) { - matrix_render(&display); -} - -__attribute__ ((weak)) -void iota_gfx_task_user(void) { -} - -void iota_gfx_task(void) { - iota_gfx_task_user(); - - if (display.dirty|| force_dirty) { - iota_gfx_flush(); - force_dirty = false; - } - - /* - if (timer_elapsed(last_flush) > ScreenOffInterval) { - iota_gfx_off(); - } - */ -} - -bool process_record_gfx(uint16_t keycode, keyrecord_t *record) { - force_dirty = true; - return true; -} - -#endif diff --git a/keyboards/claw44/ssd1306.h b/keyboards/claw44/ssd1306.h deleted file mode 100644 index 11a3cc67f4..0000000000 --- a/keyboards/claw44/ssd1306.h +++ /dev/null @@ -1,90 +0,0 @@ -#pragma once - -#include -#include -#include "action.h" - -enum ssd1306_cmds { - DisplayOff = 0xAE, - DisplayOn = 0xAF, - - SetContrast = 0x81, - DisplayAllOnResume = 0xA4, - - DisplayAllOn = 0xA5, - NormalDisplay = 0xA6, - InvertDisplay = 0xA7, - SetDisplayOffset = 0xD3, - SetComPins = 0xda, - SetVComDetect = 0xdb, - SetDisplayClockDiv = 0xD5, - SetPreCharge = 0xd9, - SetMultiPlex = 0xa8, - SetLowColumn = 0x00, - SetHighColumn = 0x10, - SetStartLine = 0x40, - - SetMemoryMode = 0x20, - ColumnAddr = 0x21, - PageAddr = 0x22, - - ComScanInc = 0xc0, - ComScanDec = 0xc8, - SegRemap = 0xa0, - SetChargePump = 0x8d, - ExternalVcc = 0x01, - SwitchCapVcc = 0x02, - - ActivateScroll = 0x2f, - DeActivateScroll = 0x2e, - SetVerticalScrollArea = 0xa3, - RightHorizontalScroll = 0x26, - LeftHorizontalScroll = 0x27, - VerticalAndRightHorizontalScroll = 0x29, - VerticalAndLeftHorizontalScroll = 0x2a, -}; - -// Controls the SSD1306 128x32 OLED display via i2c - -#ifndef SSD1306_ADDRESS -#define SSD1306_ADDRESS 0x3C -#endif - -#define DisplayHeight 32 -#define DisplayWidth 128 - -#define FontHeight 8 -#define FontWidth 6 - -#define MatrixRows (DisplayHeight / FontHeight) -#define MatrixCols (DisplayWidth / FontWidth) - -struct CharacterMatrix { - uint8_t display[MatrixRows][MatrixCols]; - uint8_t *cursor; - bool dirty; -}; - -extern struct CharacterMatrix display; - -bool iota_gfx_init(bool rotate); -void iota_gfx_task(void); -bool iota_gfx_off(void); -bool iota_gfx_on(void); -void iota_gfx_flush(void); -void iota_gfx_write_char(uint8_t c); -void iota_gfx_write(const char *data); -void iota_gfx_write_P(const char *data); -void iota_gfx_clear_screen(void); - -void iota_gfx_task_user(void); - -void matrix_clear(struct CharacterMatrix *matrix); -void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c); -void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c); -void matrix_write(struct CharacterMatrix *matrix, const char *data); -void matrix_write_ln(struct CharacterMatrix *matrix, const char *data); -void matrix_write_P(struct CharacterMatrix *matrix, const char *data); -void matrix_render(struct CharacterMatrix *matrix); - -bool process_record_gfx(uint16_t keycode, keyrecord_t *record); From aa90cf1da895aaa280cc19068037c74de644bd27 Mon Sep 17 00:00:00 2001 From: Ole Westendorff Date: Mon, 9 Nov 2020 21:26:16 -0800 Subject: [PATCH 054/114] XD68: add 65_ansi_split_bs layout (#10835) * XD68: add 65_ansi_split_bs layuout * change number of keys in info.json * Apply suggestions from code review --- keyboards/xd68/info.json | 73 ++++++++++++++++++++++++++++++++++++++++ keyboards/xd68/rules.mk | 2 +- keyboards/xd68/xd68.h | 31 +++++++++++++++++ 3 files changed, 105 insertions(+), 1 deletion(-) diff --git a/keyboards/xd68/info.json b/keyboards/xd68/info.json index 01b5bb201e..a2ee19d7db 100644 --- a/keyboards/xd68/info.json +++ b/keyboards/xd68/info.json @@ -78,6 +78,79 @@ {"label":"Right", "x":15, "y":4} ] }, + "LAYOUT_65_ansi_split_bs": { + "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":"=", "x":12, "y":0}, + {"label":"Grave.", "x":13, "y":0}, + {"label":"Backspace", "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":"\\", "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":"Up", "x":14, "y":3}, + {"label":"End", "x":15, "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}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Menu", "x":10, "y":4}, + {"label":"Ctrl", "x":11, "y":4}, + {"label":"Fn", "x":12, "y":4}, + {"label":"Left", "x":13, "y":4}, + {"label":"Down", "x":14, "y":4}, + {"label":"Right", "x":15, "y":4} + ] + }, "LAYOUT_65_iso": { "key_count": 69, "layout": [ diff --git a/keyboards/xd68/rules.mk b/keyboards/xd68/rules.mk index 8d52ba327d..e479673959 100644 --- a/keyboards/xd68/rules.mk +++ b/keyboards/xd68/rules.mk @@ -32,4 +32,4 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs UNICODE_ENABLE = no # Unicode -LAYOUTS = 65_ansi 65_iso +LAYOUTS = 65_ansi 65_ansi_split_bs 65_iso diff --git a/keyboards/xd68/xd68.h b/keyboards/xd68/xd68.h index f4347928f6..c4cd20db5c 100755 --- a/keyboards/xd68/xd68.h +++ b/keyboards/xd68/xd68.h @@ -69,6 +69,37 @@ {k40, k41, k42, XXX, XXX, k45, XXX, XXX, k4b, XXX, k48, k4a, k4c, k4d, k4e} \ } +/* XD68 ANSI layout with split backspace + * ,----------------------------------------------------------------. + * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d| 49| 0e | + * |----------------------------------------------------------------| + * | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| 1d | 1e | + * |----------------------------------------------------------------| + * | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2d | 2e | + * |----------------------------------------------------------------| + * | 30 | 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3c| 3d| 3e | + * |----------------------------------------------------------------| + * | 40 | 41 | 42 | 45 | 48| 4a| 4b| 4c| 4d| 4e | + * `----------------------------------------------------------------' + */ +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array + +#define LAYOUT_65_ansi_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k49, 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, k45, k48, 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, XXX, k2d, k2e}, \ + {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \ + {k40, k41, k42, XXX, XXX, k45, XXX, XXX, k4b, k49, k48, k4a, k4c, k4d, k4e} \ +} + /* XD68 ISO layout * ,----------------------------------------------------------------. * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d | 0e | From abf1902ff597e77e910c0fb9a8d132b46f78317b Mon Sep 17 00:00:00 2001 From: Legonut Date: Tue, 10 Nov 2020 01:22:22 -0500 Subject: [PATCH 055/114] [Keyboard] RGBKB Pan (#9587) * Add new keyboard Pan Encoder switches still need work * New keyboard Pan Should be complete * Split MCU selection into 2 revision folders * [rgbkb/pan] Make requested changes for PR Additionally, set DEFAULT_FOLDER to rev1, and default rev1 to atmega32a (as all shipped kits include an atmega32a) * Apply suggestions from code review * Fix default keymap typo * add usb max power define * Commit suggested changes * Update keyboards/rgbkb/pan/config.h * Apply suggestions from code review Small copyright updates * Apply suggestions from code review --- keyboards/rgbkb/pan/config.h | 43 +++++++ keyboards/rgbkb/pan/keymaps/default/keymap.c | 117 ++++++++++++++++++ keyboards/rgbkb/pan/keymaps/default/rules.mk | 6 + keyboards/rgbkb/pan/pan.c | 88 +++++++++++++ keyboards/rgbkb/pan/pan.h | 37 ++++++ keyboards/rgbkb/pan/post_rules.mk | 22 ++++ keyboards/rgbkb/pan/readme.md | 19 +++ keyboards/rgbkb/pan/rev1/32a/config.h | 24 ++++ keyboards/rgbkb/pan/rev1/32a/post_rules.mk | 22 ++++ keyboards/rgbkb/pan/rev1/32a/rules.mk | 8 ++ keyboards/rgbkb/pan/rev1/proton_c/config.h | 24 ++++ .../rgbkb/pan/rev1/proton_c/post_rules.mk | 22 ++++ keyboards/rgbkb/pan/rev1/proton_c/rules.mk | 2 + keyboards/rgbkb/pan/rev1/rules.mk | 2 + keyboards/rgbkb/pan/rules.mk | 25 ++++ 15 files changed, 461 insertions(+) create mode 100644 keyboards/rgbkb/pan/config.h create mode 100644 keyboards/rgbkb/pan/keymaps/default/keymap.c create mode 100644 keyboards/rgbkb/pan/keymaps/default/rules.mk create mode 100644 keyboards/rgbkb/pan/pan.c create mode 100644 keyboards/rgbkb/pan/pan.h create mode 100644 keyboards/rgbkb/pan/post_rules.mk create mode 100644 keyboards/rgbkb/pan/readme.md create mode 100644 keyboards/rgbkb/pan/rev1/32a/config.h create mode 100644 keyboards/rgbkb/pan/rev1/32a/post_rules.mk create mode 100644 keyboards/rgbkb/pan/rev1/32a/rules.mk create mode 100644 keyboards/rgbkb/pan/rev1/proton_c/config.h create mode 100644 keyboards/rgbkb/pan/rev1/proton_c/post_rules.mk create mode 100644 keyboards/rgbkb/pan/rev1/proton_c/rules.mk create mode 100644 keyboards/rgbkb/pan/rev1/rules.mk create mode 100644 keyboards/rgbkb/pan/rules.mk diff --git a/keyboards/rgbkb/pan/config.h b/keyboards/rgbkb/pan/config.h new file mode 100644 index 0000000000..a1a2aae9fc --- /dev/null +++ b/keyboards/rgbkb/pan/config.h @@ -0,0 +1,43 @@ +/*Copyright 2020 RGBKB + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 0x5247 // "RG" - RGBKB +#define PRODUCT_ID 0x8C9C // Pan +#define DEVICE_VER 0x0002 +#define MANUFACTURER RGBKB +#define PRODUCT Pan + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 13 + +#define ENCODER_RESOLUTION 4 +#define RGBLED_NUM 64 +#define RGBLIGHT_ANIMATIONS +#define DRIVER_LED_TOTAL RGBLED_NUM + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define RGBLIGHT_LIMIT_VAL 120 +#define USB_MAX_POWER_CONSUMPTION 500 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 diff --git a/keyboards/rgbkb/pan/keymaps/default/keymap.c b/keyboards/rgbkb/pan/keymaps/default/keymap.c new file mode 100644 index 0000000000..c041c0b57b --- /dev/null +++ b/keyboards/rgbkb/pan/keymaps/default/keymap.c @@ -0,0 +1,117 @@ + /* Copyright 2020 RGBKB + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +// 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. +#include QMK_KEYBOARD_H + +enum layer_number { + _QWERTY, + _COLEMAK, + _FN, + _ADJ +}; + +#define FN_ESC LT(_FN, KC_ESC) +#define FN_CAPS LT(_FN, KC_CAPS) +#define QWERTY DF(_QWERTY) +#define COLEMAK DF(_COLEMAK) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_all( + KC_NO, KC_NO, + GRAVE_ESC, 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_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_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_RSPC, + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, MO(_ADJ),KC_SPC, KC_SPC, MO(_FN), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + + [_COLEMAK] = LAYOUT_all( + KC_NO, KC_NO, + GRAVE_ESC, 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_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + FN_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, 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_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_ENT, + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, MO(_ADJ),KC_SPC, KC_SPC, MO(_FN), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + + [_FN] = LAYOUT_all( + KC_NO, KC_NO, + 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_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_LBRC, _______, KC_RBRC, _______, _______, _______, + _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_ADJ] = LAYOUT_all( + KC_NO, KC_NO, + 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, + _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, + _______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, _______, + _______, RGB_SPD, _______, RGB_SPI, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, + _______, _______, _______, RGB_MOD, _______, _______, _______, KC_P0, KC_PDOT, KC_NLCK, _QWERTY, _COLEMAK + ) +}; + +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { + // Host Keyboard Layer Status + oled_write_P(PSTR("RGBKB Pan\n"), false); + oled_write_P(PSTR("Layer: "), false); + uint8_t layer = layer_state ? biton(layer_state) : biton32(default_layer_state); + switch (layer) { + case _QWERTY: + oled_write_P(PSTR("Default\n"), false); + break; + case _COLEMAK: + oled_write_P(PSTR("Colemak\n"), false); + break; + case _FN: + oled_write_P(PSTR("Function\n"), false); + break; + case _ADJ: + oled_write_P(PSTR("Adjust\n"), false); + break; + default: + oled_write_P(PSTR("Undefined\n"), false); + // Or use the write_ln shortcut over adding '\n' to the end of your string + //oled_write_ln_P(PSTR("Undefined"), false); + } + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR("Numlock On\n") : PSTR(" \n"), false); + oled_write_P(led_state.caps_lock ? PSTR("Capslock On \n") : PSTR(" \n"), false); +} +#endif + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { // First encoder - right + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { // Second encoder - left + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} diff --git a/keyboards/rgbkb/pan/keymaps/default/rules.mk b/keyboards/rgbkb/pan/keymaps/default/rules.mk new file mode 100644 index 0000000000..9ad29c645c --- /dev/null +++ b/keyboards/rgbkb/pan/keymaps/default/rules.mk @@ -0,0 +1,6 @@ +# RGB layout selection +RGB_ENCODERS = yes # For RGB encoders, solder on both WS2811 chips +STAGGERED_LAYOUT = no # If you soldered R1-A12 and R4-A12, enable this. + +# Do not edit past here +include keyboards/$(KEYBOARD)/post_rules.mk diff --git a/keyboards/rgbkb/pan/pan.c b/keyboards/rgbkb/pan/pan.c new file mode 100644 index 0000000000..bc438f2d08 --- /dev/null +++ b/keyboards/rgbkb/pan/pan.c @@ -0,0 +1,88 @@ + /* Copyright 2020 RGBKB + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "pan.h" +#include "quantum.h" +#include "rgb_matrix_types.h" + + +#if defined RGB_MATRIX_ENABLE + led_config_t g_led_config = { { + { 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, + { 0, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15 }, + { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 1 }, + { 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40 }, + { 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, NO_LED } + }, { +#ifdef STAGGERED_RGB_ENCODERS + {0, -19},{228, -19}, + {0, 0}, {14, 0}, {33, 0}, {52, 0}, {71, 0}, {90, 0}, {109, 0}, {128, 0}, {147, 0}, {166, 0}, {185, 0}, {204, 0}, {223, 0}, + {209, 19}, {190, 19}, {171, 19}, {152, 19}, {133, 19}, {114, 19}, {95, 19}, {76, 19}, {57, 19}, {38, 19}, {19, 19}, {0, 19}, + {0, 38}, {19, 38}, {38, 38}, {57, 38}, {76, 38}, {95, 38}, {114, 38}, {133, 38}, {152, 38}, {171, 38}, {190, 38}, {209, 38}, + {223, 57}, {204, 57}, {185, 57}, {171, 57}, {147, 57}, {128, 57}, {109, 57}, {90, 57}, {71, 57}, {52, 57}, {33, 57}, {14, 57}, {0, 57}, + {0, 76}, {19, 76}, {38, 76}, {57, 76}, {76, 76}, {95, 76}, {114, 76}, {133, 76}, {152, 76}, {171, 76}, {190, 76}, {209, 76}, +#elif defined RGB_ENCODERS + {0, -19},{228, -19}, + {0, 0}, {19, 0}, {38, 0}, {57, 0}, {76, 0}, {95, 0}, {114, 0}, {133, 0}, {152, 0}, {171, 0}, {190, 0}, {209, 0}, + {209, 19}, {190, 19}, {171, 19}, {152, 19}, {133, 19}, {114, 19}, {95, 19}, {76, 19}, {57, 19}, {38, 19}, {19, 19}, {0, 19}, + {0, 38}, {19, 38}, {38, 38}, {57, 38}, {76, 38}, {95, 38}, {114, 38}, {133, 38}, {152, 38}, {171, 38}, {190, 38}, {209, 38}, + {209, 57}, {190, 57}, {171, 57}, {152, 57}, {133, 57}, {114, 57}, {95, 57}, {76, 57}, {57, 57}, {38, 57}, {19, 57}, {0, 57}, + {0, 76}, {19, 76}, {38, 76}, {57, 76}, {76, 76}, {95, 76}, {114, 76}, {133, 76}, {152, 76}, {171, 76}, {190, 76}, {209, 76}, + {0, 95},{19, 95}, //not used +#elif defined STAGGERED_LAYOUT + {0, 0}, {19, 0}, {38, 0}, {57, 0}, {76, 0}, {95, 0}, {114, 0}, {133, 0}, {152, 0}, {171, 0}, {190, 0}, {209, 0}, {0, 0}, + {209, 19}, {190, 19}, {171, 19}, {152, 19}, {133, 19}, {114, 19}, {95, 19}, {76, 19}, {57, 19}, {38, 19}, {19, 19}, {0, 19}, + {0, 38}, {19, 38}, {38, 38}, {57, 38}, {76, 38}, {95, 38}, {114, 38}, {133, 38}, {152, 38}, {171, 38}, {190, 38}, {209, 38}, + {209, 57}, {190, 57}, {171, 57}, {152, 57}, {133, 57}, {114, 57}, {95, 57}, {76, 57}, {57, 57}, {38, 57}, {19, 57}, {0, 57}, {0, 0}, + {0, 76}, {19, 76}, {38, 76}, {57, 76}, {76, 76}, {95, 76}, {114, 76}, {133, 76}, {152, 76}, {171, 76}, {190, 76}, {209, 76}, + {0, 95},{19, 95},//not used +#else + {0, 0}, {19, 0}, {38, 0}, {57, 0}, {76, 0}, {95, 0}, {114, 0}, {133, 0}, {152, 0}, {171, 0}, {190, 0}, {209, 0}, + {209, 19}, {190, 19}, {171, 19}, {152, 19}, {133, 19}, {114, 19}, {95, 19}, {76, 19}, {57, 19}, {38, 19}, {19, 19}, {0, 19}, + {0, 38}, {19, 38}, {38, 38}, {57, 38}, {76, 38}, {95, 38}, {114, 38}, {133, 38}, {152, 38}, {171, 38}, {190, 38}, {209, 38}, + {209, 57}, {190, 57}, {171, 57}, {152, 57}, {133, 57}, {114, 57}, {95, 57}, {76, 57}, {57, 57}, {38, 57}, {19, 57}, {0, 57}, + {0, 76}, {19, 76}, {38, 76}, {57, 76}, {76, 76}, {95, 76}, {114, 76}, {133, 76}, {152, 76}, {171, 76}, {190, 76}, {209, 76}, + {0, 0},{0, 0}, {0, 0},{0, 0},//not used +#endif + }, { +#ifdef STAGGERED_RGB_ENCODERS + 1, 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, 1, + 1, 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, 1, 1, 1, 1, 1, 1, 1, 1 +#elif defined RGB_ENCODERS + 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 +#elif defined STAGGERED_LAYOUT + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 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, 1, 1, 1, 1, 1, 1, 1, 1 +#else + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 +#endif + } }; +#endif diff --git a/keyboards/rgbkb/pan/pan.h b/keyboards/rgbkb/pan/pan.h new file mode 100644 index 0000000000..c1b9f77f6d --- /dev/null +++ b/keyboards/rgbkb/pan/pan.h @@ -0,0 +1,37 @@ +/* Copyright 2020 RGBKB + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 _x_ KC_NO + +#include "quantum.h" + +#define LAYOUT_all( \ + E01, E02, \ +/* 0 1 2 3 4 5 6 7 8 9 10 11 12 */\ +/* 0 */ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, \ +/* 1 */ K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, \ +/* 2 */ K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, K37, \ +/* 3 */ K38, K39, K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K50, \ +/* 4 */ K51, K52, K53, K54, K55, K56, K57, K58, K59, K60, K61, K62 \ + ) { \ +/* 0 */{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12 }, \ +/* 1 */{ K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, KC_NO }, \ +/* 2 */{ K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, K37, KC_NO }, \ +/* 3 */{ K38, K39, K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K50 }, \ +/* 4 */{ K51, K52, K53, K54, K55, K56, K57, K58, K59, K60, K61, KC_NO, K62 } \ + } diff --git a/keyboards/rgbkb/pan/post_rules.mk b/keyboards/rgbkb/pan/post_rules.mk new file mode 100644 index 0000000000..7947d1d9bf --- /dev/null +++ b/keyboards/rgbkb/pan/post_rules.mk @@ -0,0 +1,22 @@ +# As long as the users rules.mk has include $(KEYBOARD)/post_rules.mk this will be run after to properly setup any keyboard features and defines +ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) + OPT_DEFS += -DRGB_MATRIX_KEYPRESSES +endif + +ifeq ($(strip $(RGB_MATRIX_FRAMEBUFFER)), yes) + OPT_DEFS += -DRGB_MATRIX_FRAMEBUFFER_EFFECTS +endif + +ifeq ($(strip $(STAGGERED_LAYOUT)), yes) + OPT_DEFS += -DSTAGGERED_LAYOUT +endif + +ifeq ($(strip $(RGB_ENCODERS)), yes) + OPT_DEFS += -DRGB_ENCODERS +endif + +ifeq ($(strip $(RGB_ENCODERS)), yes) + ifeq ($(strip $(STAGGERED_LAYOUT)), yes) + OPT_DEFS += -DSTAGGERED_RGB_ENCODERS=$(strip $(STAGGERED_RGB_ENCODERS)) + endif +endif diff --git a/keyboards/rgbkb/pan/readme.md b/keyboards/rgbkb/pan/readme.md new file mode 100644 index 0000000000..f7041605c6 --- /dev/null +++ b/keyboards/rgbkb/pan/readme.md @@ -0,0 +1,19 @@ +# Pan + +![pan](https://i.imgur.com/Q6pqCFFl.jpg) + +Ortho or Staggered DIY kit with RGB + +* Keyboard Maintainer: [RGBKB](https://github.com/RGBKB) +* Hardware Supported: Pan, atmega32a or Proton-C +* Hardware Availability: [rgbkb.net](https://www.rgbkb.net/), [GitHub](https://github.com/RGBKB/Keyboard-files/tree/master/Pan) + +Make example for this keyboard (after setting up your build environment): + + make rgbkb/pan/rev1/32a:default + +If you are using the Proton-C: + + make rgbkb/pan/rev1/proton_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/rgbkb/pan/rev1/32a/config.h b/keyboards/rgbkb/pan/rev1/32a/config.h new file mode 100644 index 0000000000..ed5d3457c7 --- /dev/null +++ b/keyboards/rgbkb/pan/rev1/32a/config.h @@ -0,0 +1,24 @@ +/*Copyright 2020 RGBKB + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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_ROW_PINS { D7, D1, D5, D6, C2 } +#define MATRIX_COL_PINS { C3, C4, C5, C6, C7, A7, A6, A5, A4, A3, A2, A1, A0 } +#define ENCODERS_PAD_A { B0, D0 } +#define ENCODERS_PAD_B { B1, B2} +#define RGB_DI_PIN B3 diff --git a/keyboards/rgbkb/pan/rev1/32a/post_rules.mk b/keyboards/rgbkb/pan/rev1/32a/post_rules.mk new file mode 100644 index 0000000000..7947d1d9bf --- /dev/null +++ b/keyboards/rgbkb/pan/rev1/32a/post_rules.mk @@ -0,0 +1,22 @@ +# As long as the users rules.mk has include $(KEYBOARD)/post_rules.mk this will be run after to properly setup any keyboard features and defines +ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) + OPT_DEFS += -DRGB_MATRIX_KEYPRESSES +endif + +ifeq ($(strip $(RGB_MATRIX_FRAMEBUFFER)), yes) + OPT_DEFS += -DRGB_MATRIX_FRAMEBUFFER_EFFECTS +endif + +ifeq ($(strip $(STAGGERED_LAYOUT)), yes) + OPT_DEFS += -DSTAGGERED_LAYOUT +endif + +ifeq ($(strip $(RGB_ENCODERS)), yes) + OPT_DEFS += -DRGB_ENCODERS +endif + +ifeq ($(strip $(RGB_ENCODERS)), yes) + ifeq ($(strip $(STAGGERED_LAYOUT)), yes) + OPT_DEFS += -DSTAGGERED_RGB_ENCODERS=$(strip $(STAGGERED_RGB_ENCODERS)) + endif +endif diff --git a/keyboards/rgbkb/pan/rev1/32a/rules.mk b/keyboards/rgbkb/pan/rev1/32a/rules.mk new file mode 100644 index 0000000000..321ecc5c1a --- /dev/null +++ b/keyboards/rgbkb/pan/rev1/32a/rules.mk @@ -0,0 +1,8 @@ +# MCU name +MCU = atmega32a + +# Processor frequency +F_CPU = 16000000 + +# Bootloader selection +BOOTLOADER = USBasp diff --git a/keyboards/rgbkb/pan/rev1/proton_c/config.h b/keyboards/rgbkb/pan/rev1/proton_c/config.h new file mode 100644 index 0000000000..7a909a9a13 --- /dev/null +++ b/keyboards/rgbkb/pan/rev1/proton_c/config.h @@ -0,0 +1,24 @@ +/*Copyright 2020 RGBKB + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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_ROW_PINS { A15, B10, A14, A13, A7 } +#define MATRIX_COL_PINS { A8, A6, B0, B1, B2, B4, B5, A1, A2, B3, B9, A10, A9 } +#define ENCODERS_PAD_A { B14, B11 } +#define ENCODERS_PAD_B { B15, B12 } +#define RGB_DI_PIN A3 diff --git a/keyboards/rgbkb/pan/rev1/proton_c/post_rules.mk b/keyboards/rgbkb/pan/rev1/proton_c/post_rules.mk new file mode 100644 index 0000000000..7947d1d9bf --- /dev/null +++ b/keyboards/rgbkb/pan/rev1/proton_c/post_rules.mk @@ -0,0 +1,22 @@ +# As long as the users rules.mk has include $(KEYBOARD)/post_rules.mk this will be run after to properly setup any keyboard features and defines +ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) + OPT_DEFS += -DRGB_MATRIX_KEYPRESSES +endif + +ifeq ($(strip $(RGB_MATRIX_FRAMEBUFFER)), yes) + OPT_DEFS += -DRGB_MATRIX_FRAMEBUFFER_EFFECTS +endif + +ifeq ($(strip $(STAGGERED_LAYOUT)), yes) + OPT_DEFS += -DSTAGGERED_LAYOUT +endif + +ifeq ($(strip $(RGB_ENCODERS)), yes) + OPT_DEFS += -DRGB_ENCODERS +endif + +ifeq ($(strip $(RGB_ENCODERS)), yes) + ifeq ($(strip $(STAGGERED_LAYOUT)), yes) + OPT_DEFS += -DSTAGGERED_RGB_ENCODERS=$(strip $(STAGGERED_RGB_ENCODERS)) + endif +endif diff --git a/keyboards/rgbkb/pan/rev1/proton_c/rules.mk b/keyboards/rgbkb/pan/rev1/proton_c/rules.mk new file mode 100644 index 0000000000..b17a3d0316 --- /dev/null +++ b/keyboards/rgbkb/pan/rev1/proton_c/rules.mk @@ -0,0 +1,2 @@ +# MCU name +MCU = STM32F303 diff --git a/keyboards/rgbkb/pan/rev1/rules.mk b/keyboards/rgbkb/pan/rev1/rules.mk new file mode 100644 index 0000000000..4d3c0f6679 --- /dev/null +++ b/keyboards/rgbkb/pan/rev1/rules.mk @@ -0,0 +1,2 @@ +# The default configuration is a atmega32a +DEFAULT_FOLDER = rgbkb/pan/rev1/32a diff --git a/keyboards/rgbkb/pan/rules.mk b/keyboards/rgbkb/pan/rules.mk new file mode 100644 index 0000000000..1960304505 --- /dev/null +++ b/keyboards/rgbkb/pan/rules.mk @@ -0,0 +1,25 @@ +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +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 +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = WS2812 +WS2812_DRIVER = bitbang +ENCODER_ENABLE = yes +OLED_DRIVER_ENABLE = yes + +# RGB layout selection +RGB_ENCODERS = yes # For RGB encoders, solder on both WS2811 chips +STAGGERED_LAYOUT = no # If you soldered R1-A12 and R4-A12, enable this. + +# Default to revision 1 +DEFAULT_FOLDER = rgbkb/pan/rev1 From aae3b35c0fc363e4a9246e774b714a7a1ef7b6c0 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 10 Nov 2020 15:00:40 +0000 Subject: [PATCH 056/114] CI: Add docs build and deploy workflow (#7448) * Add docs build and deploy workflow * Remove old travis docs workflow * update to cli command * Tidy up for review * formatting * Update to pass style checks * Update lib/python/qmk/cli/docs.py Co-Authored-By: skullydazed * Review comments - build->generate, use of verbose * Add docs * Update to match recent actions * Run within base_container * Convert cli to generate-docs * Convert cli to generate-docs - restore old file * Convert cli to generate-docs * Update docs Co-authored-by: skullydazed --- .github/workflows/docs.yml | 43 +++++++++++++++++++++++++ .travis.yml | 5 --- docs/cli_commands.md | 10 ++++++ lib/python/qmk/cli/generate/__init__.py | 1 + lib/python/qmk/cli/generate/docs.py | 37 +++++++++++++++++++++ util/travis_docs.sh | 15 --------- 6 files changed, 91 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/docs.yml create mode 100644 lib/python/qmk/cli/generate/docs.py delete mode 100755 util/travis_docs.sh diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000000..8855d1107f --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,43 @@ +name: Generate Docs + +on: + push: + branches: + - master + paths: + - 'tmk_core/**' + - 'quantum/**' + - 'platforms/**' + - 'docs/**' + - '.github/workflows/docs.yml' + +jobs: + generate: + runs-on: ubuntu-latest + container: qmkfm/base_container + + # protect against those who develop with their fork on master + if: github.repository == 'qmk/qmk_firmware' + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 1 + + - name: Install dependencies + run: | + apt-get update && apt-get install -y rsync nodejs npm doxygen + npm install -g moxygen + + - name: Build docs + run: | + qmk --verbose generate-docs + + - name: Deploy + uses: JamesIves/github-pages-deploy-action@3.7.1 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BASE_BRANCH: master + BRANCH: gh-pages + FOLDER: .build/docs + GIT_CONFIG_EMAIL: hello@qmk.fm diff --git a/.travis.yml b/.travis.yml index f2e8a8411d..a6533d6130 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,21 +18,16 @@ addons: - ubuntu-toolchain-r-test - llvm-toolchain-trusty-7 packages: - - pandoc - diffutils - dos2unix - - doxygen - clang-format-7 - libstdc++-7-dev -install: - - npm install -g moxygen script: - git fetch --depth=50 origin $TRAVIS_BRANCH:$TRAVIS_BRANCH - git rev-parse --short HEAD - git diff --name-only HEAD $TRAVIS_BRANCH - bash util/travis_test.sh - bash util/travis_build.sh - - bash util/travis_docs.sh after_script: bash util/travis_compiled_push.sh notifications: diff --git a/docs/cli_commands.md b/docs/cli_commands.md index b10f5d4995..69df82f953 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md @@ -286,6 +286,16 @@ This command starts a local HTTP server which you can use for browsing or improv qmk docs [-p PORT] ``` +## `qmk generate-docs` + +This command allows you to generate QMK documentation locally. It can be uses for general browsing or improving the docs. External tools such as [serve](https://www.npmjs.com/package/serve) can be used to browse the generated files. + +**Usage**: + +``` +qmk generate-docs +``` + ## `qmk kle2json` This command allows you to convert from raw KLE data to QMK Configurator JSON. It accepts either an absolute file path, or a file name in the current directory. By default it will not overwrite `info.json` if it is already present. Use the `-f` or `--force` flag to overwrite. diff --git a/lib/python/qmk/cli/generate/__init__.py b/lib/python/qmk/cli/generate/__init__.py index 4dc7607ef2..13bd1f0914 100644 --- a/lib/python/qmk/cli/generate/__init__.py +++ b/lib/python/qmk/cli/generate/__init__.py @@ -1 +1,2 @@ from . import api +from . import docs diff --git a/lib/python/qmk/cli/generate/docs.py b/lib/python/qmk/cli/generate/docs.py new file mode 100644 index 0000000000..a59a24db50 --- /dev/null +++ b/lib/python/qmk/cli/generate/docs.py @@ -0,0 +1,37 @@ +"""Build QMK documentation locally +""" +import shutil +import subprocess +from pathlib import Path + +from milc import cli + +DOCS_PATH = Path('docs/') +BUILD_PATH = Path('.build/docs/') + + +@cli.subcommand('Build QMK documentation.', hidden=False if cli.config.user.developer else True) +def generate_docs(cli): + """Invoke the docs generation process + + TODO(unclaimed): + * [ ] Add a real build step... something static docs + """ + + if BUILD_PATH.exists(): + shutil.rmtree(BUILD_PATH) + + shutil.copytree(DOCS_PATH, BUILD_PATH) + + # When not verbose we want to hide all output + args = {'check': True} + if not cli.args.verbose: + args.update({'stdout': subprocess.DEVNULL, 'stderr': subprocess.STDOUT}) + + cli.log.info('Generating internal docs...') + + # Generate internal docs + subprocess.run(['doxygen', 'Doxyfile'], **args) + subprocess.run(['moxygen', '-q', '-a', '-g', '-o', BUILD_PATH / 'internals_%s.md', 'doxygen/xml'], **args) + + cli.log.info('Successfully generated internal docs to %s.', BUILD_PATH) diff --git a/util/travis_docs.sh b/util/travis_docs.sh deleted file mode 100755 index 93c2d71867..0000000000 --- a/util/travis_docs.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -source util/travis_utils.sh -source util/travis_push.sh - -if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip docs]"* ]] ; then - if git diff --name-only ${TRAVIS_COMMIT_RANGE} | grep -e '^quantum/' -e '^tmk_core/' -e '^docs/internals_.*'; then - echo "Generating internal docs..." - rm -rf doxygen - doxygen Doxyfile - moxygen -q -a -g -o docs/internals_%s.md doxygen/xml - git add docs/internals_* - git commit -m'autogenerated internal docs for ${TRAVIS_COMMIT_RANGE}' || true - fi -fi From 683ba8b8d4cd1e299c212bf5721634ccd3a1757f Mon Sep 17 00:00:00 2001 From: Zach White Date: Tue, 10 Nov 2020 07:21:59 -0800 Subject: [PATCH 057/114] Improve the QMK Lint workflow (#10909) * properly set the exit_code * handle the case where exit_code is greater than 255 --- .github/workflows/lint.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b459973afa..cd67de9d8b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -46,6 +46,10 @@ jobs: echo "linting ${KB}" qmk lint --keyboard ${KB} && qmk info -l --keyboard ${KB} + exit_code=$(($exit_code + $?)) fi done + if [[ $exit_code -gt 255 ]]; then + exit 255 + fi exit $exit_code From a422309354a17137c402c43f581c4e57acd510cb Mon Sep 17 00:00:00 2001 From: KemoNine Date: Wed, 11 Nov 2020 17:24:00 -0500 Subject: [PATCH 058/114] Bring up Qvex Lynepad (#10826) --- keyboards/qvex/lynepad/config.h | 63 ++++++++++ keyboards/qvex/lynepad/info.json | 12 ++ .../qvex/lynepad/keymaps/default/keymap.c | 117 ++++++++++++++++++ .../qvex/lynepad/keymaps/default/readme.md | 1 + keyboards/qvex/lynepad/lynepad.c | 58 +++++++++ keyboards/qvex/lynepad/lynepad.h | 37 ++++++ keyboards/qvex/lynepad/readme.md | 13 ++ keyboards/qvex/lynepad/rules.mk | 21 ++++ keyboards/qvex/readme.md | 7 ++ 9 files changed, 329 insertions(+) create mode 100644 keyboards/qvex/lynepad/config.h create mode 100644 keyboards/qvex/lynepad/info.json create mode 100644 keyboards/qvex/lynepad/keymaps/default/keymap.c create mode 100644 keyboards/qvex/lynepad/keymaps/default/readme.md create mode 100644 keyboards/qvex/lynepad/lynepad.c create mode 100644 keyboards/qvex/lynepad/lynepad.h create mode 100644 keyboards/qvex/lynepad/readme.md create mode 100644 keyboards/qvex/lynepad/rules.mk create mode 100644 keyboards/qvex/readme.md diff --git a/keyboards/qvex/lynepad/config.h b/keyboards/qvex/lynepad/config.h new file mode 100644 index 0000000000..d1a5c2eb0b --- /dev/null +++ b/keyboards/qvex/lynepad/config.h @@ -0,0 +1,63 @@ +/* +Copyright 2020 KemoNine + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 0x5156 +#define PRODUCT_ID 0x4C50 +#define DEVICE_VER 0x0001 +#define MANUFACTURER QVEX +#define PRODUCT Lynepad + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 4 + +/* Basic matrix config */ +#define MATRIX_ROW_PINS { C7, F7, F6} +#define MATRIX_COL_PINS { F0, F1, F4, F5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Encoders */ +#define ENCODERS_PAD_A { D0, B5 } +#define ENCODERS_PAD_B { D1, D6 } + +/* LEDs */ +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN +#undef RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 4 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_LIMIT_VAL 240 +#endif + +/* Definitions for encoder tilt/press support */ +#define ENC_TILT_THRESHOLD 1 +#define PIN_TW_SW D2 // Center +#define PIN_RJ_SW C6 // Center +#define PIN_RJ_DIR_A D4 // Up +#define PIN_RJ_DIR_B D7 // Left +#define PIN_RJ_DIR_C B6 // Down +#define PIN_RJ_DIR_D B4 // Right diff --git a/keyboards/qvex/lynepad/info.json b/keyboards/qvex/lynepad/info.json new file mode 100644 index 0000000000..405614e9f0 --- /dev/null +++ b/keyboards/qvex/lynepad/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "QVEX Lynepad", + "url": "https://www.tindie.com/products/qvex_tech/qvex-lynepad-macro-keypad/", + "maintainer": "KemoNine", + "width": 4, + "height": 3, + "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}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}] + } + } + } \ No newline at end of file diff --git a/keyboards/qvex/lynepad/keymaps/default/keymap.c b/keyboards/qvex/lynepad/keymaps/default/keymap.c new file mode 100644 index 0000000000..37e015e624 --- /dev/null +++ b/keyboards/qvex/lynepad/keymaps/default/keymap.c @@ -0,0 +1,117 @@ +/* Copyright 2020 KemoNine + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 Layer) Default Layer + * |----------------------------| + * | 1 | 2 | 3 | 4 | | + * | 5 | 6 | 7 | 8 | | + * | 9 | 10 | 11 | | + * |----------------------------| + */ +[0] = LAYOUT( + KC_MS_BTN4, KC_MS_BTN2, KC_MS_UP, KC_MS_BTN1, + KC_MS_BTN5, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, + KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2 + ) +}; + +// Standard encoder functionality +void encoder_update_user(uint8_t index, bool clockwise) { + // Process encoder rotational movements + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_AUDIO_VOL_DOWN); + } else { + tap_code(KC_AUDIO_VOL_UP); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code(KC_MS_WH_UP); + } else { + tap_code(KC_MS_WH_DOWN); + } + } +} + +// Encoder press / tilt event handling +// the core lynepad implementation will update the below variables on each matrix scan +// Update the various codes below for customizing the tilt / push config + +extern int16_t enc1Center; +extern int16_t enc1CenterPrev; +extern int16_t enc2Center; +extern int16_t enc2CenterPrev; +extern int16_t enc2Up; +extern int16_t enc2UpPrev; +extern int16_t enc2Down; +extern int16_t enc2DownPrev; +extern int16_t enc2Left; +extern int16_t enc2LeftPrev; +extern int16_t enc2Right; +extern int16_t enc2RightPrev; + +void matrix_scan_user(void) { + if (enc1Center != enc1CenterPrev) { + if (enc1Center < ENC_TILT_THRESHOLD) { + } + else { + reset_keyboard(); + } + } + if (enc2Center != enc2CenterPrev) { + if (enc2Center < ENC_TILT_THRESHOLD) { + register_code16(KC_MS_BTN3); + } + else { + unregister_code16(KC_MS_BTN3); + } + /* + * Encoder sets ALL values when center is pressed so bail out at this point\ + * to avoid the rest of the encoder buttons registering events + */ + return; + } + if (enc2Up != enc2UpPrev) { + if (enc2Up < ENC_TILT_THRESHOLD) { + } + else { + rgblight_increase_val_noeeprom(); + } + } + if (enc2Down != enc2DownPrev) { + if (enc2Down < ENC_TILT_THRESHOLD) { + } + else { + rgblight_decrease_val_noeeprom(); + } + } + if (enc2Left != enc2LeftPrev) { + if (enc2Left < ENC_TILT_THRESHOLD) { + } + else { + rgblight_toggle_noeeprom(); + } + } + if (enc2Right != enc2RightPrev) { + if (enc2Right < ENC_TILT_THRESHOLD) { + } + else { + rgblight_step_noeeprom(); + } + } +} diff --git a/keyboards/qvex/lynepad/keymaps/default/readme.md b/keyboards/qvex/lynepad/keymaps/default/readme.md new file mode 100644 index 0000000000..8884d1a91a --- /dev/null +++ b/keyboards/qvex/lynepad/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for lynepad diff --git a/keyboards/qvex/lynepad/lynepad.c b/keyboards/qvex/lynepad/lynepad.c new file mode 100644 index 0000000000..33620d9da3 --- /dev/null +++ b/keyboards/qvex/lynepad/lynepad.c @@ -0,0 +1,58 @@ +/* +Copyright 2020 KemoNine +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 "lynepad.h" + +void keyboard_pre_init_kb(void) { + // Encoder pins + setPinInput(PIN_TW_SW); + setPinInput(PIN_RJ_SW); + setPinInput(PIN_RJ_DIR_A); + setPinInput(PIN_RJ_DIR_C); + setPinInput(PIN_RJ_DIR_B); + setPinInput(PIN_RJ_DIR_D); + + keyboard_pre_init_user(); +} + +int16_t enc1Center = 1; +int16_t enc1CenterPrev = 1; +int16_t enc2Center = 1; +int16_t enc2CenterPrev = 1; +int16_t enc2Up = 1; +int16_t enc2UpPrev = 1; +int16_t enc2Down = 1; +int16_t enc2DownPrev = 1; +int16_t enc2Left = 1; +int16_t enc2LeftPrev = 1; +int16_t enc2Right = 1; +int16_t enc2RightPrev = 1; + +void matrix_scan_kb(void) { + enc1CenterPrev = enc1Center; + enc1Center = readPin(PIN_TW_SW); + + enc2CenterPrev = enc2Center; + enc2Center = readPin(PIN_RJ_SW); + enc2UpPrev = enc2Up; + enc2Up = readPin(PIN_RJ_DIR_A); + enc2DownPrev = enc2Down; + enc2Down = readPin(PIN_RJ_DIR_C); + enc2LeftPrev = enc2Left; + enc2Left = readPin(PIN_RJ_DIR_B); + enc2RightPrev = enc2Right; + enc2Right = readPin(PIN_RJ_DIR_D); + + // Ensure any user customizations are called (for some reason this wasn't happening by default) + matrix_scan_user(); +} diff --git a/keyboards/qvex/lynepad/lynepad.h b/keyboards/qvex/lynepad/lynepad.h new file mode 100644 index 0000000000..2a3015ceea --- /dev/null +++ b/keyboards/qvex/lynepad/lynepad.h @@ -0,0 +1,37 @@ +/* Copyright 2020 KemoNine + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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, \ + k10, k11, k12, k13, \ + k20, k21, k22 \ +) \ +{ \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, KC_NO } \ +} diff --git a/keyboards/qvex/lynepad/readme.md b/keyboards/qvex/lynepad/readme.md new file mode 100644 index 0000000000..68dd85a673 --- /dev/null +++ b/keyboards/qvex/lynepad/readme.md @@ -0,0 +1,13 @@ +# QVEX Lynepad + +Macro pad with 11 keys and 2 rotary encoders. + +* Keyboard Maintainer: [KemoNine](https://git.kemonine.info/kemonine/keyboard) +* Hardware Supported: QVEX Lynepad: macro keypad +* Hardware Availability: Tindie [Keyboard Kit](https://www.tindie.com/products/qvex_tech/qvex-lynepad-macro-keypad/) + +Make example for this macro pad (after setting up your build environment): + + make qvex/lynepad: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/qvex/lynepad/rules.mk b/keyboards/qvex/lynepad/rules.mk new file mode 100644 index 0000000000..7b05cfb9b8 --- /dev/null +++ b/keyboards/qvex/lynepad/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +ENCODER_ENABLE = yes # Enable the encoders diff --git a/keyboards/qvex/readme.md b/keyboards/qvex/readme.md new file mode 100644 index 0000000000..854fd4d767 --- /dev/null +++ b/keyboards/qvex/readme.md @@ -0,0 +1,7 @@ +# QVEX + +QVEX is a keyboard vendor based in Czechia + +## Online Stores + +**Website:** https://www.tindie.com/products/qvex_tech/qvex-lynepad-macro-keypad/ From 0dee334bcee1307130fb8d5d17c37f374afb4059 Mon Sep 17 00:00:00 2001 From: Sergey Vlasov Date: Thu, 12 Nov 2020 12:00:35 +0300 Subject: [PATCH 059/114] handwired/onekey/blackpill_f401: Fix I2C pin config mismatch (#10322) By default the `i2c_master` driver for ChibiOS uses the B6 pin for `I2C1_SCL` and the B7 pin for `I2C1_SDA`. However, the ChibiOS board file used for the F401 Blackpill board (`ST_STM32F401C_DISCOVERY`) configures B6 as `I2C1_SCL` and B9 as `I2C1_SDA`, and if that configuration is left unchanged, enabling the `i2c_master` driver results in having two pins (B7 and B9) configured as `I2C1_SDA` at the same time, which does not work properly (experimental results show that the B9 pin still works as `I2C1_SDA` in that case, and the B7 pin does not work). Configure the B9 pin as an input with pull-up in `board_init()`, so that the B7 pin can be configured as `I2C1_SDA` by the I2C driver. --- .../onekey/blackpill_f401/blackpill_f401.c | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 keyboards/handwired/onekey/blackpill_f401/blackpill_f401.c diff --git a/keyboards/handwired/onekey/blackpill_f401/blackpill_f401.c b/keyboards/handwired/onekey/blackpill_f401/blackpill_f401.c new file mode 100644 index 0000000000..956932329c --- /dev/null +++ b/keyboards/handwired/onekey/blackpill_f401/blackpill_f401.c @@ -0,0 +1,23 @@ +/* Copyright 2020 Sergey Vlasov (sigprof) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 + +void board_init(void) { + // B9 is configured as I2C1_SDA in the board file; that function must be + // disabled before using B7 as I2C1_SDA. + setPinInputHigh(B9); +} From d7c1b890f18418248658d48c9eac5df37091a1f2 Mon Sep 17 00:00:00 2001 From: gooberpsycho <64438496+gooberpsycho@users.noreply.github.com> Date: Sat, 14 Nov 2020 01:23:22 -0500 Subject: [PATCH 060/114] [Keyboard] Southpaw66 by rpiguy9907 (#10782) * added Keyboard Southpaw66 * Housekeeping, shorten urls * Housekeeping * Row matrix pins were flipped, fixed * housekeeping, extraneous punctuation * bug-fixing * bug-fixing * Layout macro fixed * Layout macro fixed again * Update and rename Southpaw66,c to southpaw66.c * Rename Southpaw66.h to southpaw66.h * Update config.h * Update info.json * Change Southpaw66 to southpaw66 made change to case in all instances in code except where critical, such as in url's. * Rename parent folder from Southpaw66 to southpaw66 * Rename parent folder from Southpaw66 to southpaw66 * Update info.json * Update keyboards/rpiguy9907/Southpaw66/readme.md updated image url to point to lower resolution image. * Update config.h re-capitalized Southpaw66 in product name. * Rename Southpaw66 parent folder to southpaw66 * Rename parent folder from Southpaw66 to southpaw66 * rename parent folder from Southpaw66 to southpaw66 * rename parent folder from Southpaw66 to southpaw66 * Rename parent folder from Southpaw66 to southpaw66 * rename parent folder from Southpaw66 to southpaw66 * rename parent folder from Southpaw66 to southpaw66 * Update keyboards/rpiguy9907/southpaw66/readme.md * Update keyboards/rpiguy9907/southpaw66/config.h --- keyboards/rpiguy9907/southpaw66/config.h | 53 +++++++++++++ keyboards/rpiguy9907/southpaw66/info.json | 78 +++++++++++++++++++ .../southpaw66/keymaps/default/keymap.c | 34 ++++++++ .../southpaw66/keymaps/via/keymap.c | 48 ++++++++++++ .../southpaw66/keymaps/via/rules.mk | 1 + keyboards/rpiguy9907/southpaw66/readme.md | 24 ++++++ keyboards/rpiguy9907/southpaw66/rules.mk | 23 ++++++ keyboards/rpiguy9907/southpaw66/southpaw66.c | 17 ++++ keyboards/rpiguy9907/southpaw66/southpaw66.h | 37 +++++++++ 9 files changed, 315 insertions(+) create mode 100644 keyboards/rpiguy9907/southpaw66/config.h create mode 100644 keyboards/rpiguy9907/southpaw66/info.json create mode 100644 keyboards/rpiguy9907/southpaw66/keymaps/default/keymap.c create mode 100644 keyboards/rpiguy9907/southpaw66/keymaps/via/keymap.c create mode 100644 keyboards/rpiguy9907/southpaw66/keymaps/via/rules.mk create mode 100644 keyboards/rpiguy9907/southpaw66/readme.md create mode 100644 keyboards/rpiguy9907/southpaw66/rules.mk create mode 100644 keyboards/rpiguy9907/southpaw66/southpaw66.c create mode 100644 keyboards/rpiguy9907/southpaw66/southpaw66.h diff --git a/keyboards/rpiguy9907/southpaw66/config.h b/keyboards/rpiguy9907/southpaw66/config.h new file mode 100644 index 0000000000..242b4a7c44 --- /dev/null +++ b/keyboards/rpiguy9907/southpaw66/config.h @@ -0,0 +1,53 @@ + /* Copyright 2020 gooberpsycho + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 0x6077 +#define DEVICE_VER 0x0001 +#define MANUFACTURER rpiguy9907 +#define PRODUCT Southpaw66 + +#define TAPPING_TERM 400 + +/* key matrix size */ +#define MATRIX_ROWS 7 +#define MATRIX_COLS 10 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { D7, C6, D4, D0, D1, D2, D3 } +#define MATRIX_COL_PINS { E6, B4, B5, F4, F5, F6, F7, B1, B3, B2 } +#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 + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 1 +#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/rpiguy9907/southpaw66/info.json b/keyboards/rpiguy9907/southpaw66/info.json new file mode 100644 index 0000000000..80d78a5d98 --- /dev/null +++ b/keyboards/rpiguy9907/southpaw66/info.json @@ -0,0 +1,78 @@ +{ + "keyboard_name": "Southpaw66", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + + "layout": [ + {"label":"Insert", "x":0, "y":0}, + {"label":"Esc", "x":1.5, "y":0}, + {"label":"1", "x":2.5, "y":0}, + {"label":"2", "x":3.5, "y":0}, + {"label":"3", "x":4.5, "y":0}, + {"label":"4", "x":5.5, "y":0}, + {"label":"5", "x":6.5, "y":0}, + {"label":"6", "x":7.5, "y":0}, + {"label":"7", "x":8.5, "y":0}, + {"label":"8", "x":9.5, "y":0}, + {"label":"9", "x":10.5, "y":0}, + {"label":"0", "x":11.5, "y":0}, + {"label":"-", "x":12.5, "y":0}, + {"label":"=", "x":13.5, "y":0}, + {"label":"Backspace", "x":14.5, "y":0, "w":2}, + {"label":"Delete", "x":0, "y":1}, + {"label":"Tab", "x":1.5, "y":1, "w":1.5}, + {"label":"Q", "x":3, "y":1}, + {"label":"W", "x":4, "y":1}, + {"label":"E", "x":5, "y":1}, + {"label":"R", "x":6, "y":1}, + {"label":"T", "x":7, "y":1}, + {"label":"Y", "x":8, "y":1}, + {"label":"U", "x":9, "y":1}, + {"label":"I", "x":10, "y":1}, + {"label":"O", "x":11, "y":1}, + {"label":"P", "x":12, "y":1}, + {"label":"[", "x":13, "y":1}, + {"label":"]", "x":14, "y":1}, + {"label":"|", "x":15, "y":1, "w":1.5}, + {"label":"Caps Lock", "x":1.5, "y":2, "w":1.75}, + {"label":"A", "x":3.25, "y":2}, + {"label":"S", "x":4.25, "y":2}, + {"label":"D", "x":5.25, "y":2}, + {"label":"F", "x":6.25, "y":2}, + {"label":"G", "x":7.25, "y":2}, + {"label":"H", "x":8.25, "y":2}, + {"label":"J", "x":9.25, "y":2}, + {"label":"K", "x":10.25, "y":2}, + {"label":"L", "x":11.25, "y":2}, + {"label":":", "x":12.25, "y":2}, + {"label":"\"", "x":13.25, "y":2}, + {"label":"Enter", "x":14.25, "y":2, "w":2.25}, + {"label":"Up", "x":1, "y":3}, + {"label":"Shift", "x":2, "y":3, "w":1.75}, + {"label":"Z", "x":3.75, "y":3}, + {"label":"X", "x":4.75, "y":3}, + {"label":"C", "x":5.75, "y":3}, + {"label":"V", "x":6.75, "y":3}, + {"label":"B", "x":7.75, "y":3}, + {"label":"N", "x":8.75, "y":3}, + {"label":"M", "x":9.75, "y":3}, + {"label":",", "x":10.75, "y":3}, + {"label":".", "x":11.75, "y":3}, + {"label":"/", "x":12.75, "y":3}, + {"label":"Shift", "x":13.75, "y":3, "w":2.75}, + {"label":"Left", "x":0, "y":4}, + {"label":"Down", "x":1, "y":4}, + {"label":"Right", "x":2, "y":4}, + {"label":"Ctrl", "x":3, "y":4, "w":1.5}, + {"label":"Alt", "x":4.5, "y":4}, + {"label":"Space", "x":5.5, "y":4, "w":7}, + {"label":"Win", "x":12.5, "y":4}, + {"label":"Alt", "x":13.5, "y":4, "w":1.5}, + {"label":"Ctrl", "x":15, "y":4, "w":1.5}] + } + } +} diff --git a/keyboards/rpiguy9907/southpaw66/keymaps/default/keymap.c b/keyboards/rpiguy9907/southpaw66/keymaps/default/keymap.c new file mode 100644 index 0000000000..712a34c9be --- /dev/null +++ b/keyboards/rpiguy9907/southpaw66/keymaps/default/keymap.c @@ -0,0 +1,34 @@ + /* Copyright 2020 gooberpsycho + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_DEL, 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_END, 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_UP, 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_LEFT, KC_DOWN, KC_RGHT, KC_LCTL, KC_LGUI, KC_SPC, KC_RALT, MO(1), KC_RCTL + ), + [1] = LAYOUT( + 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_TRNS, KC_TRNS, + KC_TRNS, KC_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_MPRV, KC_VOLD, KC_MNXT,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; diff --git a/keyboards/rpiguy9907/southpaw66/keymaps/via/keymap.c b/keyboards/rpiguy9907/southpaw66/keymaps/via/keymap.c new file mode 100644 index 0000000000..87eccd222d --- /dev/null +++ b/keyboards/rpiguy9907/southpaw66/keymaps/via/keymap.c @@ -0,0 +1,48 @@ + /* Copyright 2020 gooberpsycho + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_DEL, 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_END, 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_UP, 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_LEFT, KC_DOWN, KC_RGHT, KC_LCTL, KC_LGUI, KC_SPC, MO(1), KC_RALT, KC_RCTL + ), + [1] = LAYOUT( + 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_TRNS, KC_TRNS, + KC_TRNS, KC_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_MPRV, KC_VOLD, KC_MNXT, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = 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_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( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/rpiguy9907/southpaw66/keymaps/via/rules.mk b/keyboards/rpiguy9907/southpaw66/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/rpiguy9907/southpaw66/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/rpiguy9907/southpaw66/readme.md b/keyboards/rpiguy9907/southpaw66/readme.md new file mode 100644 index 0000000000..c7a289b733 --- /dev/null +++ b/keyboards/rpiguy9907/southpaw66/readme.md @@ -0,0 +1,24 @@ +# Southpaw66 + +![](https://i.imgur.com/Mzmhsedl.jpg) + +### Pro Micro Pinout +| rows | 0 | 1 | 2 | 3 | 4 | 5 | 6 | +| --------------- | --- | --- | --- | --- | --- | --- | --- | +| Pro Micro pin | D3 | D2 | D1 | D0 | D4 | C6 | D7 | + +| columns | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | +| --------------- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | +| Pro Micro pin | E6 | B4 | B5 | F4 | F5 | F6 | F7 | B1 | B3 | B2 | + + +Make example for this keyboard (after setting up your build environment): + + make rpiguy9907/southpaw66:default + +**Reset Key:** Hold down the key located at `k10`, commonly programmed as Escape while plugging in the keyboard. + +* Keyboard Maintainer: [gooberpsycho](https://github.com/gooberpsycho) +* Hardware Availability: [Casefile](https://github.com/rpiguy9907/Keyboards/tree/master/Southpaw66) + +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/rpiguy9907/southpaw66/rules.mk b/keyboards/rpiguy9907/southpaw66/rules.mk new file mode 100644 index 0000000000..9ea17f062d --- /dev/null +++ b/keyboards/rpiguy9907/southpaw66/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +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 +# 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 +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +LTO_ENABLE = yes diff --git a/keyboards/rpiguy9907/southpaw66/southpaw66.c b/keyboards/rpiguy9907/southpaw66/southpaw66.c new file mode 100644 index 0000000000..ef61984b9d --- /dev/null +++ b/keyboards/rpiguy9907/southpaw66/southpaw66.c @@ -0,0 +1,17 @@ + /* Copyright 2020 gooberpsycho + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "southpaw66.h" diff --git a/keyboards/rpiguy9907/southpaw66/southpaw66.h b/keyboards/rpiguy9907/southpaw66/southpaw66.h new file mode 100644 index 0000000000..11f1fc7e8f --- /dev/null +++ b/keyboards/rpiguy9907/southpaw66/southpaw66.h @@ -0,0 +1,37 @@ + /* Copyright 2020 gooberpsycho + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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" + +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT( \ + k00, k10, k20, k30, k40, k50, k60, k01, k11, k21, k31, k41, k51, k61, k02, \ + k12, k22, k32, k42, k52, k62, k03, k13, k23, k33, k43, k53, k63, k04, k14, \ + k24, k34, k44, k54, k64, k05, k15, k25, k35, k45, k55, k65, k06, \ + k16, k26, k36, k46, k56, k66, k07, k17, k27, k37, k47, k57, k67, \ + k08, k18, k28, k38, k48, k58, k68, k09, k19 \ +) \ +{ \ + {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, KC_NO}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, KC_NO}, \ + {k40, k41, k42, k43, k44, k45, k46, k47, k48, KC_NO}, \ + {k50, k51, k52, k53, k54, k55, k56, k57, k58, KC_NO}, \ + {k60, k61, k62, k63, k64, k65, k66, k67, k68, KC_NO} \ +} From a7afaa36a1ed7749b7374106ff0ddab2a3a221b5 Mon Sep 17 00:00:00 2001 From: Lukas Alexandre Date: Sat, 14 Nov 2020 23:33:51 +0100 Subject: [PATCH 061/114] [Keyboard] Time 80 TKL by Fox Lab (#10851) * Porting Time 80 TKL * Update keyboards/foxlab/key65/hotswap/readme.md * Update keyboards/foxlab/time80/rules.mk * Update keyboards/foxlab/time80/config.h * Update keyboards/foxlab/time80/readme.md * Update keyboards/foxlab/time80/readme.md * Update keyboards/foxlab/time80/config.h * Use LAYOUT_all * Fixing placement of shortcuts --- keyboards/foxlab/time80/config.h | 129 ++++++++++++++++++ .../foxlab/time80/keymaps/default/keymap.c | 59 ++++++++ .../foxlab/time80/keymaps/default/readme.md | 1 + keyboards/foxlab/time80/readme.md | 27 ++++ keyboards/foxlab/time80/rules.mk | 19 +++ keyboards/foxlab/time80/time80.c | 17 +++ keyboards/foxlab/time80/time80.h | 44 ++++++ 7 files changed, 296 insertions(+) create mode 100644 keyboards/foxlab/time80/config.h create mode 100644 keyboards/foxlab/time80/keymaps/default/keymap.c create mode 100644 keyboards/foxlab/time80/keymaps/default/readme.md create mode 100644 keyboards/foxlab/time80/readme.md create mode 100644 keyboards/foxlab/time80/rules.mk create mode 100644 keyboards/foxlab/time80/time80.c create mode 100644 keyboards/foxlab/time80/time80.h diff --git a/keyboards/foxlab/time80/config.h b/keyboards/foxlab/time80/config.h new file mode 100644 index 0000000000..8fea3e7e6e --- /dev/null +++ b/keyboards/foxlab/time80/config.h @@ -0,0 +1,129 @@ +/* +Copyright 2020 Lukas Alexander + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 0x464C // "FL" +#define PRODUCT_ID 0x0005 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Fox Lab +#define PRODUCT Time80 + +/* key matrix size */ +#define MATRIX_ROWS 7 +#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, B5, B6, B7, B0 } +#define MATRIX_COL_PINS { A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7, A0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 +//#define BACKLIGHT_BREATHING + +#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 + +/* 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 useful 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 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/foxlab/time80/keymaps/default/keymap.c b/keyboards/foxlab/time80/keymaps/default/keymap.c new file mode 100644 index 0000000000..eb4facb507 --- /dev/null +++ b/keyboards/foxlab/time80/keymaps/default/keymap.c @@ -0,0 +1,59 @@ +/* Copyright 2020 Lukas Alexander + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_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_MPRV, KC_MNXT, KC_MPLY, + 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_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_BSPC, KC_DEL, KC_END, KC_PGDN, + 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, XXXXXXX, KC_ENT, + 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, MO(4), KC_UP, + KC_LALT, KC_LALT, KC_LGUI, LT(2, KC_SPC), MO(3), MO(3), MO(4), MO(4), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = 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_MPRV, KC_MNXT, KC_MPLY, + 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_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_BSPC, KC_DEL, KC_END, KC_PGDN, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, + 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, MO(4), KC_UP, + KC_LALT, KC_LALT, KC_LGUI, KC_SPC, MO(3), MO(3), MO(4), MO(4), KC_LEFT, KC_DOWN, KC_RGHT + ), + [2] = LAYOUT_all( + KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_GRV, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, + KC_TAB, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, KC_VOLD, KC_VOLU, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MNXT, KC_MPLY, XXXXXXX, MO(4), KC_UP, + KC_LALT, KC_LALT, KC_LGUI, _______, XXXXXXX, XXXXXXX, MO(4), MO(4), KC_LEFT, KC_DOWN, KC_RGHT + ), + [3] = LAYOUT_all( + KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RALT(KC_N), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RALT(KC_I), XXXXXXX, XXXXXXX, XXXXXXX, LGUI(KC_MINS), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_TAB, XXXXXXX, XXXXXXX, RALT(KC_SCLN), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RALT(KC_O), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LCTL, RALT(KC_A), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RALT(KC_E), XXXXXXX, XXXXXXX, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, RALT(KC_C), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, MO(4), XXXXXXX, + KC_LALT, KC_LALT, KC_LGUI, XXXXXXX, _______, _______, MO(4), MO(4), XXXXXXX, XXXXXXX, XXXXXXX + ), + [4] = LAYOUT_all( + 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, TG(1), 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, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX + ) +}; diff --git a/keyboards/foxlab/time80/keymaps/default/readme.md b/keyboards/foxlab/time80/keymaps/default/readme.md new file mode 100644 index 0000000000..bf4136282f --- /dev/null +++ b/keyboards/foxlab/time80/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for time80 diff --git a/keyboards/foxlab/time80/readme.md b/keyboards/foxlab/time80/readme.md new file mode 100644 index 0000000000..66fd66b4b6 --- /dev/null +++ b/keyboards/foxlab/time80/readme.md @@ -0,0 +1,27 @@ +# time80 + +![time80](https://i.imgur.com/8HpYStPl.jpg) + +Time is an intricate custom keyboard kit from Fox Lab, a group of +Chinese designers focused on making maximizing the potential for +design and detail in custom keyboards. Featuring an 18-piece design, +Time is the custom keyboard with the most number of parts in existence (so far). + +* Keyboard Maintainer: [Lukas Alexander](https://github.com/lukelex) +* Hardware Supported: Time 80 PCB +* Hardware Availability: [Group Buy](https://geekhack.org/index.php?topic=92349.0) + +Make example for this keyboard (after setting up your build environment): + + make foxlab/time80:default + +Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) + + make foxlab/time80:default:flash + +**Reset Key**: There are no reset switches or pads. Follow this +[guide](https://docs.qmk.fm/#/flashing_bootloadhid) +to have it flashed for the first time. Remember to add a `RESET` +key on your keymap for future endeavors. + +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/time80/rules.mk b/keyboards/foxlab/time80/rules.mk new file mode 100644 index 0000000000..1b61e9534d --- /dev/null +++ b/keyboards/foxlab/time80/rules.mk @@ -0,0 +1,19 @@ +# MCU name +MCU = atmega32a + +# Bootloader selection +BOOTLOADER = bootloadHID + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +WS2812_DRIVER = i2c diff --git a/keyboards/foxlab/time80/time80.c b/keyboards/foxlab/time80/time80.c new file mode 100644 index 0000000000..d2cf8cef2c --- /dev/null +++ b/keyboards/foxlab/time80/time80.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Lukas Alexander + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "time80.h" diff --git a/keyboards/foxlab/time80/time80.h b/keyboards/foxlab/time80/time80.h new file mode 100644 index 0000000000..f451b32f01 --- /dev/null +++ b/keyboards/foxlab/time80/time80.h @@ -0,0 +1,44 @@ +/* Copyright 2020 Lukas Alexander + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 is 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, k02, k03, k04, k05, k07, k08, k09, k0A, k0B, k0E, k0C, k01, k61, k62, k6E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1E, k1C, k1D, k66, k65, k64, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2E, k2C, k6C, k68, k67, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, \ + k40, k4D, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4E, k4C, \ + k50, k51, k52, k54, k58, k59, k5A, k5B, k5E, k5C, k57 \ +) { \ + { k00, KC_NO, k02, k03, k04, k05, KC_NO, k07, k08, k09, k0A, k0B, k0C, KC_NO, 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, KC_NO, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, KC_NO, k3E }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E }, \ + { k50, k51, k52, KC_NO, k54, KC_NO, KC_NO, k57, k58, k59, k5A, k5B, k5C, KC_NO, k5E }, \ + { KC_NO, k61, k62, KC_NO, k64, k65, k66, k67, k68, KC_NO, KC_NO, KC_NO, k6C, KC_NO, k6E } \ +} From 45e16fd54319423221277d6199be7757bdaf7a9a Mon Sep 17 00:00:00 2001 From: Josh Hinnebusch Date: Sat, 14 Nov 2020 22:23:58 -0500 Subject: [PATCH 062/114] [Keyboard] h660s by hineybush (#10221) * add h660s * add via support to h660s * update readme * Update keyboards/hineybush/h660s/keymaps/via/readme.md * Update keyboards/hineybush/h660s/keymaps/via/keymap.c * Update keyboards/hineybush/h660s/keymaps/via/keymap.c * Update keyboards/hineybush/h660s/h660s.h * Update keyboards/hineybush/h660s/h660s.h * Update keyboards/hineybush/h660s/h660s.h * Update keyboards/hineybush/h660s/h660s.h * Update keyboards/hineybush/h660s/h660s.h * Update keyboards/hineybush/h660s/keymaps/default/keymap.c * Update keyboards/hineybush/h660s/keymaps/default/keymap.c * Update keyboards/hineybush/h660s/keymaps/via/keymap.c * Update keyboards/hineybush/h660s/keymaps/via/keymap.c * Update keyboards/hineybush/h660s/readme.md * Update keyboards/hineybush/h660s/readme.md * Update keyboards/hineybush/h660s/keymaps/default/keymap.c * Update keyboards/hineybush/h660s/keymaps/default/keymap.c * Update keyboards/hineybush/h660s/info.json * Update keyboards/hineybush/h660s/h660s.h * Update keyboards/hineybush/h660s/h660s.h * Update keyboards/hineybush/h660s/h660s.h --- keyboards/hineybush/h660s/config.h | 141 ++++ keyboards/hineybush/h660s/h660s.c | 27 + keyboards/hineybush/h660s/h660s.h | 136 ++++ keyboards/hineybush/h660s/info.json | 637 ++++++++++++++++++ .../hineybush/h660s/keymaps/default/keymap.c | 45 ++ .../hineybush/h660s/keymaps/default/readme.md | 1 + .../hineybush/h660s/keymaps/via/keymap.c | 59 ++ .../hineybush/h660s/keymaps/via/readme.md | 1 + .../hineybush/h660s/keymaps/via/rules.mk | 1 + keyboards/hineybush/h660s/readme.md | 19 + keyboards/hineybush/h660s/rules.mk | 22 + 11 files changed, 1089 insertions(+) create mode 100644 keyboards/hineybush/h660s/config.h create mode 100644 keyboards/hineybush/h660s/h660s.c create mode 100644 keyboards/hineybush/h660s/h660s.h create mode 100644 keyboards/hineybush/h660s/info.json create mode 100644 keyboards/hineybush/h660s/keymaps/default/keymap.c create mode 100644 keyboards/hineybush/h660s/keymaps/default/readme.md create mode 100644 keyboards/hineybush/h660s/keymaps/via/keymap.c create mode 100644 keyboards/hineybush/h660s/keymaps/via/readme.md create mode 100644 keyboards/hineybush/h660s/keymaps/via/rules.mk create mode 100644 keyboards/hineybush/h660s/readme.md create mode 100644 keyboards/hineybush/h660s/rules.mk diff --git a/keyboards/hineybush/h660s/config.h b/keyboards/hineybush/h660s/config.h new file mode 100644 index 0000000000..8f33fe3e6b --- /dev/null +++ b/keyboards/hineybush/h660s/config.h @@ -0,0 +1,141 @@ +/* +Copyright 2020 Josh Hinnebusch + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 0x04D8 +#define PRODUCT_ID 0xEB1B +#define DEVICE_VER 0x0001 +#define MANUFACTURER hineybush keyboards +#define PRODUCT h660s + +/* 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 { B1, E6, B3, D3, D2 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_BREATHING + +#define RGB_DI_PIN B0 +#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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful 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 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/hineybush/h660s/h660s.c b/keyboards/hineybush/h660s/h660s.c new file mode 100644 index 0000000000..e8e50048b1 --- /dev/null +++ b/keyboards/hineybush/h660s/h660s.c @@ -0,0 +1,27 @@ +/* Copyright 2020 Josh Hinnebusch + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "h660s.h" + +void eeconfig_init_kb(void) { // EEPROM is getting reset! + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 128); // Set default HSV - red hue, full saturation, medium brightness + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default + + eeconfig_update_kb(0); + eeconfig_init_user(); +} + diff --git a/keyboards/hineybush/h660s/h660s.h b/keyboards/hineybush/h660s/h660s.h new file mode 100644 index 0000000000..ec776ba7a4 --- /dev/null +++ b/keyboards/hineybush/h660s/h660s.h @@ -0,0 +1,136 @@ +/* Copyright 2020 Josh Hinnebusch + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 is 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_66_ansi_split_bs( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k113, k013, k014, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, k114, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k313, \ + k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k314, \ + k400, k401, k402, k407, k409, k410, 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,KC_NO, k213,KC_NO}, \ + {k300,KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k314}, \ + {k400, k401, k402, KC_NO,KC_NO,KC_NO,KC_NO,k407, KC_NO,k409, k410, k411, k412, k413, k414} \ +} +#define LAYOUT_66_ansi( \ + 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, k213, k114, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k313, \ + k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k314, \ + k400, k401, k402, k407, k409, k410, 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, KC_NO,k114}, \ + {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, k314}, \ + {k400, k401, k402, KC_NO,KC_NO,KC_NO,KC_NO,k407, KC_NO,k409, k410, k411, k412, k413, k414} \ +} +#define LAYOUT_66_ansi_rwkl_split_bs(\ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, K113, k013, k014, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, k114, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k313, \ + k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k314, \ + k400, k401, k402, k407, k410, 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,KC_NO, k213,KC_NO}, \ + {k300,KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k314}, \ + {k400, k401, k402, KC_NO,KC_NO,KC_NO,KC_NO,k407,KC_NO, KC_NO, k410, k411,k412, k413, k414} \ +} +#define LAYOUT_66_ansi_rwkl( \ + 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, k213, k114, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k313, \ + k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k314, \ + k400, k401, k402, k407, k410, 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,KC_NO, k114}, \ + {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, k314}, \ + {k400, k401, k402, KC_NO,KC_NO,KC_NO,KC_NO,k407,KC_NO, KC_NO, k410, k411,k412, k413, k414} \ +} + +// ISO + +// also technically LAYOUT_66_iso +#define LAYOUT_all( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k113, k013, k014, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, k114, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k313, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k314, \ + k400, k401, k402, k407, k409, k410, 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,KC_NO}, \ + {k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k314}, \ + {k400, k401, k402, KC_NO,KC_NO,KC_NO,KC_NO,k407, KC_NO,k409, k410, k411, k412, k413, k414} \ +} +#define LAYOUT_66_iso( \ + 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, k213, k114, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k313, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k314, \ + k400, k401, k402, k407, k409, k410, 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,KC_NO, k114}, \ + {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, KC_NO,KC_NO,KC_NO,KC_NO,k407, KC_NO,k409, k410, k411, k412, k413, k414} \ +} +#define LAYOUT_66_iso_rwkl_split_bs( \ + 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, k213, k114, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k313, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k314, \ + k400, k401, k402, k407, k410, 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,KC_NO}, \ + {k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k314}, \ + {k400, k401, k402, KC_NO,KC_NO,KC_NO,KC_NO,k407,KC_NO, KC_NO, k410, k411,k412, k413, k414} \ +} +#define LAYOUT_66_iso_rwkl( \ + 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, k213, k114, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k313, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k314, \ + k400, k401, k402, k407, k410, 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,KC_NO, k114}, \ + {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, KC_NO,KC_NO,KC_NO,KC_NO,k407,KC_NO, KC_NO, k410, k411,k412, k413, k414} \ +} diff --git a/keyboards/hineybush/h660s/info.json b/keyboards/hineybush/h660s/info.json new file mode 100644 index 0000000000..552aed2c7b --- /dev/null +++ b/keyboards/hineybush/h660s/info.json @@ -0,0 +1,637 @@ +{ + "keyboard_name": "h660-s", + "url": "", + "maintainer": "Josh Hinnebusch", + "width": 17.25, + "height": 5.25, + "layouts": { + "LAYOUT_66_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": 16.25, "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": 16.25, "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": 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": 15.25, "y": 3.25}, + + {"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": 14.25, "y": 4.25}, + {"x": 15.25, "y": 4.25}, + {"x": 16.25, "y": 4.25} + ] + }, + "LAYOUT_66_ansi_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": 16.25, "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": 16.25, "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": 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": 15.25, "y": 3.25}, + + {"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": 14.25, "y": 4.25}, + {"x": 15.25, "y": 4.25}, + {"x": 16.25, "y": 4.25} + ] + }, + "LAYOUT_66_ansi_rwkl": { + "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": 16.25, "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": 16.25, "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": 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": 15.25, "y": 3.25}, + + {"x": 0, "y": 4, "w": 1.25}, + {"x": 1.25, "y": 4}, + {"x": 2.25, "y": 4, "w": 1.25}, + {"x": 3.5, "y": 4, "w": 7}, + {"x": 10.5, "y": 4, "w": 1.25}, + {"x": 12.75, "y": 4, "w": 1.25}, + + {"x": 14.25, "y": 4.25}, + {"x": 15.25, "y": 4.25}, + {"x": 16.25, "y": 4.25} + ] + }, + "LAYOUT_66_ansi_rwkl_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": 16.25, "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": 16.25, "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": 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": 15.25, "y": 3.25}, + + {"x": 0, "y": 4, "w": 1.25}, + {"x": 1.25, "y": 4}, + {"x": 2.25, "y": 4, "w": 1.25}, + {"x": 3.5, "y": 4, "w": 7}, + {"x": 10.5, "y": 4, "w": 1.25}, + {"x": 12.75, "y": 4, "w": 1.25}, + + {"x": 14.25, "y": 4.25}, + {"x": 15.25, "y": 4.25}, + {"x": 16.25, "y": 4.25} + ] + }, + "LAYOUT_66_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": 16.25, "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": 16.25, "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": 13.75, "y": 1, "w": 1.25, "h": 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": 2.75}, + + {"x": 15.25, "y": 3.25}, + + {"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": 14.25, "y": 4.25}, + {"x": 15.25, "y": 4.25}, + {"x": 16.25, "y": 4.25} + ] + }, + "LAYOUT_66_iso_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": 16.25, "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": 16.25, "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": 13.75, "y": 1, "w": 1.25, "h": 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": 2.75}, + + {"x": 15.25, "y": 3.25}, + + {"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": 14.25, "y": 4.25}, + {"x": 15.25, "y": 4.25}, + {"x": 16.25, "y": 4.25} + ] + }, + "LAYOUT_66_iso_rwkl": { + "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": 16.25, "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": 16.25, "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": 13.75, "y": 1, "w": 1.25, "h": 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": 2.75}, + + {"x": 15.25, "y": 3.25}, + + {"x": 0, "y": 4, "w": 1.25}, + {"x": 1.25, "y": 4}, + {"x": 2.25, "y": 4, "w": 1.25}, + {"x": 3.5, "y": 4, "w": 7}, + {"x": 10.5, "y": 4, "w": 1.25}, + {"x": 12.75, "y": 4, "w": 1.25}, + + {"x": 14.25, "y": 4.25}, + {"x": 15.25, "y": 4.25}, + {"x": 16.25, "y": 4.25} + ] + }, + "LAYOUT_66_iso_rwkl_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": 16.25, "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": 16.25, "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": 13.75, "y": 1, "w": 1.25, "h": 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": 2.75}, + + {"x": 15.25, "y": 3.25}, + + {"x": 0, "y": 4, "w": 1.25}, + {"x": 1.25, "y": 4}, + {"x": 2.25, "y": 4, "w": 1.25}, + {"x": 3.5, "y": 4, "w": 7}, + {"x": 10.5, "y": 4, "w": 1.25}, + {"x": 12.75, "y": 4, "w": 1.25}, + + {"x": 14.25, "y": 4.25}, + {"x": 15.25, "y": 4.25}, + {"x": 16.25, "y": 4.25} + ] + } + } +} diff --git a/keyboards/hineybush/h660s/keymaps/default/keymap.c b/keyboards/hineybush/h660s/keymaps/default/keymap.c new file mode 100644 index 0000000000..b87ac711f7 --- /dev/null +++ b/keyboards/hineybush/h660s/keymaps/default/keymap.c @@ -0,0 +1,45 @@ +/* Copyright 2020 Josh Hinnebusch + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + 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, k213, k114, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k313, \ + k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k314, \ + k400, k401, k402, k404, k409, k410, k412, k413, k414 \ + */ + + [_BASE] = LAYOUT_66_ansi_rwkl( + 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_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + KC_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, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + [_FN] = LAYOUT_66_ansi_rwkl( + KC_TRNS, RGB_TOG, RGB_MOD, BL_TOGG, BL_DEC, 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, 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) +}; diff --git a/keyboards/hineybush/h660s/keymaps/default/readme.md b/keyboards/hineybush/h660s/keymaps/default/readme.md new file mode 100644 index 0000000000..0487cfb1a6 --- /dev/null +++ b/keyboards/hineybush/h660s/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for h660-s diff --git a/keyboards/hineybush/h660s/keymaps/via/keymap.c b/keyboards/hineybush/h660s/keymaps/via/keymap.c new file mode 100644 index 0000000000..c437660034 --- /dev/null +++ b/keyboards/hineybush/h660s/keymaps/via/keymap.c @@ -0,0 +1,59 @@ +/* Copyright 2020 Josh Hinnebusch + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN, + _FN2, + _FN3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k113, k013, k014, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k213, k114, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k313, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k314, \ + k400, k401, k402, k407, k409, k410, k411, k412, k413, k414 \ + */ + + [_BASE] = 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_BSPC, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + KC_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_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + [_FN] = LAYOUT_all( + KC_TRNS, RGB_TOG, RGB_MOD, BL_TOGG, BL_DEC, 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, 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, KC_TRNS, KC_TRNS), + [_FN2] = 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), + [_FN3] = 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) +}; diff --git a/keyboards/hineybush/h660s/keymaps/via/readme.md b/keyboards/hineybush/h660s/keymaps/via/readme.md new file mode 100644 index 0000000000..fd91fc8e96 --- /dev/null +++ b/keyboards/hineybush/h660s/keymaps/via/readme.md @@ -0,0 +1 @@ +# The VIA keymap for h660-s diff --git a/keyboards/hineybush/h660s/keymaps/via/rules.mk b/keyboards/hineybush/h660s/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/hineybush/h660s/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/hineybush/h660s/readme.md b/keyboards/hineybush/h660s/readme.md new file mode 100644 index 0000000000..5b1129b755 --- /dev/null +++ b/keyboards/hineybush/h660s/readme.md @@ -0,0 +1,19 @@ +# h660s + +![h660s](https://i.imgur.com/U7s0xJL.png) + +A 65% layout for the Sakura660. + +* Keyboard Maintainer: [hineybush](https://github.com/hineybush) +* Hardware Supported: Sakura660 by Fropsie and Proto[Typist] +* Hardware Availability: Prototypes, upcoming group buy + +Make example for this keyboard (after setting up your build environment): + + make hineybush/h660s:default + +Flashing example for this keyboard: + + make hineybush/h660s:default:flash + +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/hineybush/h660s/rules.mk b/keyboards/hineybush/h660s/rules.mk new file mode 100644 index 0000000000..bfa9a933fd --- /dev/null +++ b/keyboards/hineybush/h660s/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output From 91b44016f9eb18d9d597708b2ff9d66b4da530cb Mon Sep 17 00:00:00 2001 From: "Philip (Han) Suh" <36554396+phlopsuh@users.noreply.github.com> Date: Sat, 14 Nov 2020 22:17:16 -0800 Subject: [PATCH 063/114] ZTBoards Updated keymap and updated info.json (#10926) * Updated information on info.json and hopefully de-cluttered branch * Updated default encoder settings * Updated info.json for after to be in the proper order * Fixed maintainer name --- keyboards/ztboards/after/info.json | 4 ++-- .../ztboards/after/keymaps/default/keymap.c | 18 ++++-------------- keyboards/ztboards/noon/info.json | 4 ++-- 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/keyboards/ztboards/after/info.json b/keyboards/ztboards/after/info.json index f702ea0359..ddd0d52319 100644 --- a/keyboards/ztboards/after/info.json +++ b/keyboards/ztboards/after/info.json @@ -1,12 +1,12 @@ { "keyboard_name": "ZTBoards After", - "url": "ztboards.myshopify.com", + "url": "ztb.mx", "maintainer": "phlopsuh", "width": 16, "height": 5, "layouts": { "LAYOUT_all": { - "layout": [{"label":"Rotary", "x":15.5, "y":0.5}, {"label":"Esc", "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":"~", "x":13, "y":1}, {"label":"|", "x":14, "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":"Del", "x":15.5, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.25}, {"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":"Pg Up", "x":15.5, "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":"Pg Dn", "x":15.5, "y":4}, {"label":"Up", "x":14.25, "y":4.25}, {"label":"Ctrl", "x":0, "y":5, "w":1.5}, {"label":"Alt", "x":2.25, "y":5, "w":1.5}, {"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":"Left", "x":13.25, "y":5.25}, {"label":"Down", "x":14.25, "y":5.25}, {"label":"Right", "x":15.25, "y":5.25}] + "layout": [{"label":"Esc", "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":"|", "x":13, "y":1}, {"label":"`", "x":14, "y":1}, {"label":"Rotary", "x":15.5, "y":0.5}, {"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":"Del", "x":15.5, "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":"Pg Up", "x":15.5, "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":"Up", "x":14.25, "y":4.25}, {"label":"Pg Dn", "x":15.5, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.5}, {"label":"Alt", "x":2.25, "y":5, "w":1.5}, {"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":"Left", "x":13.25, "y":5.25}, {"label":"Down", "x":14.25, "y":5.25}, {"label":"Right", "x":15.25, "y":5.25}] } } } diff --git a/keyboards/ztboards/after/keymaps/default/keymap.c b/keyboards/ztboards/after/keymaps/default/keymap.c index e014b3a985..7dfb9e1261 100644 --- a/keyboards/ztboards/after/keymaps/default/keymap.c +++ b/keyboards/ztboards/after/keymaps/default/keymap.c @@ -21,33 +21,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void encoder_update_user(uint8_t index, bool clockwise) { - /* Custom encoder control - handles CW/CCW turning of encoder - * Default behavior: - * main layer: - * CW: move mouse right - * CCW: move mouse left - * other layers: - * CW: = (equals/plus - increase slider in Adobe products) - * CCW: - (minus/underscore - decrease slider in adobe products) - * Thank you to imchipwood/dumbpad for defining this. - */ if (index == 0) { switch (get_highest_layer(layer_state)) { case 1: // main layer - move mouse right (CW) and left (CCW) if (clockwise) { - tap_code(KC_MS_R); + tap_code(KC_BRIGHTNESS_UP); } else { - tap_code(KC_MS_L); + tap_code(KC_BRIGHTNESS_DOWN); } break; default: // other layers - =/+ (quals/plus) (CW) and -/_ (minus/underscore) (CCW) if (clockwise) { - tap_code(KC_EQL); + tap_code(KC_AUDIO_VOL_UP); } else { - tap_code(KC_MINS); + tap_code(KC_AUDIO_VOL_DOWN); } break; } diff --git a/keyboards/ztboards/noon/info.json b/keyboards/ztboards/noon/info.json index cbc561f8d1..fed68d1662 100644 --- a/keyboards/ztboards/noon/info.json +++ b/keyboards/ztboards/noon/info.json @@ -1,12 +1,12 @@ { "keyboard_name": "ZTBoards Noon", - "url": "ztboards.myshopify.com", + "url": "ztb.mx", "maintainer": "phlopsuh", "width": 16, "height": 5, "layouts": { "LAYOUT_all": { - "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":"|", "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":"Pg Up", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.25}, {"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":"Pg Dn", "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":"Del", "x":15, "y":3}, {"label":"Ctrl", "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":"Alt", "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}] + "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":"|", "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":"Pg 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":"Pg Dn", "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":"Del", "x":15, "y":3}, {"label":"Ctrl", "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":"Alt", "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}] } } } From 5edce6ba26b474ca53f0bf10bfdb4d8f50de43aa Mon Sep 17 00:00:00 2001 From: Naoki Katahira Date: Mon, 16 Nov 2020 02:36:05 +0900 Subject: [PATCH 064/114] [Keyboard] Add Lily58 via keymap (#10178) * Add Lily58 VIA keymap * Update keyboards/lily58/keymaps/via/keymap.c Co-authored-by: Drashna Jaelre * Update keyboards/lily58/keymaps/via/keymap.c Co-authored-by: Ryan * Update keyboards/lily58/keymaps/via/keymap.c Co-authored-by: Ryan * Update keyboards/lily58/keymaps/via/rules.mk Co-authored-by: Ryan * update via keymap * fix keymap.c * add licence to keymap.c Co-authored-by: Drashna Jaelre Co-authored-by: Ryan --- keyboards/lily58/keymaps/via/config.h | 42 +++++ keyboards/lily58/keymaps/via/keymap.c | 229 ++++++++++++++++++++++++++ keyboards/lily58/keymaps/via/rules.mk | 2 + 3 files changed, 273 insertions(+) create mode 100644 keyboards/lily58/keymaps/via/config.h create mode 100644 keyboards/lily58/keymaps/via/keymap.c create mode 100644 keyboards/lily58/keymaps/via/rules.mk diff --git a/keyboards/lily58/keymaps/via/config.h b/keyboards/lily58/keymaps/via/config.h new file mode 100644 index 0000000000..a3f0fb0a19 --- /dev/null +++ b/keyboards/lily58/keymaps/via/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 + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 100 + +// Underglow +/* +#undef RGBLED_NUM +#define RGBLED_NUM 14 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_SLEEP +*/ diff --git a/keyboards/lily58/keymaps/via/keymap.c b/keyboards/lily58/keymaps/via/keymap.c new file mode 100644 index 0000000000..bf46fb8e18 --- /dev/null +++ b/keyboards/lily58/keymaps/via/keymap.c @@ -0,0 +1,229 @@ + /* Copyright 2020 Naoki Katahira + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 + +//extern uint8_t is_master; + +enum layer_number { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) + +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 | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |LCTRL | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' | + * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| + * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE | + * | | | |/ / \ \ | | | | + * `-------------------''-------' '------''--------------------' + */ + + [_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_GRV, + 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_LCTRL, 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_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + LOWER, KC_LGUI, KC_LALT, KC_SPC, KC_ENT, KC_BSPC, KC_RGUI, RAISE +), +/* LOWER + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | 1 | 2 | 3 | 4 | 5 |-------. ,-------| 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| + * | | | | | | |-------| |-------| | | ` | + | { | } | | + * `-----------------------------------------/ / \ \-----------------------------------------' + * |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE | + * | | | |/ / \ \ | | | | + * `-------------------''-------' '------''--------------------' + */ +[_LOWER] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______,_______, _______, _______, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_GRAVE, KC_PLUS, KC_LCBR, KC_RCBR, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +), +/* RAISE + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | |-------. ,-------| | Left | Down | Up |Right | | + * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| + * | | | | | | |-------| |-------| + | = | [ | ] | \ | | + * `-----------------------------------------/ / \ \-----------------------------------------' + * |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE | + * | | | |/ / \ \ | | | | + * `-------------------''-------' '------''--------------------' + */ + +[_RAISE] = 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, + _______, _______, _______, _______, _______, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______, KC_PLUS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* ADJUST + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | |-------. ,-------| | | | | | | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | | | | | | |-------| |-------| | | | | | | + * `-----------------------------------------/ / \ \-----------------------------------------' + * |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ + [_ADJUST] = LAYOUT( + 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, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +#ifdef OLED_DRIVER_ENABLE + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!is_keyboard_master()) + return OLED_ROTATION_180; // flips the display 180 degrees if offhand + return rotation; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); + return state; +} + +static void render_logo(void) { + static const char PROGMEM 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, 0x00 + }; + + oled_write_P(logo, false); +} +char keylog_str[24] = {}; +char keylogs_str[21] = {}; +int keylogs_str_idx = 0; + +const char code_to_name[60] = { + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\', + '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '}; + +void set_keylog(uint16_t keycode, keyrecord_t *record) { + char name = ' '; + if (keycode < 60) { + name = code_to_name[keycode]; + } + + // update keylog + snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", + record->event.key.row, record->event.key.col, + keycode, name); + + // update keylogs + if (keylogs_str_idx == sizeof(keylogs_str) - 1) { + keylogs_str_idx = 0; + for (int i = 0; i < sizeof(keylogs_str) - 1; i++) { + keylogs_str[i] = ' '; + } + } + + keylogs_str[keylogs_str_idx] = name; + keylogs_str_idx++; +} + +const char *read_keylog(void) { + return keylog_str; +} + +const char *read_keylogs(void) { + return keylogs_str; +} +//new + +void oled_task_user(void) { + if (is_keyboard_master()) { + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_ln_P(PSTR("Default"), false); + break; + case _RAISE: + oled_write_ln_P(PSTR("Raise"), false); + break; + case _LOWER: + oled_write_ln_P(PSTR("Lower"), false); + break; + case _ADJUST: + oled_write_ln_P(PSTR("Adjust"), false); + break; + default: + oled_write_ln_P(PSTR("Undefined"), false); + } + + oled_write_ln(read_keylog(), false); + oled_write_ln(read_keylogs(), false); + + } else { + render_logo(); + } +} +#endif // OLED_DRIVER_ENABLE + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { +#ifdef OLED_DRIVER_ENABLE + set_keylog(keycode, record); +#endif + // set_timelog(); + } + return true; +} diff --git a/keyboards/lily58/keymaps/via/rules.mk b/keyboards/lily58/keymaps/via/rules.mk new file mode 100644 index 0000000000..1df2dc4b7c --- /dev/null +++ b/keyboards/lily58/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +OLED_DRIVER_ENABLE = yes From bb9fbd66e9cbf2099c11c474188efb23c8a1b7fa Mon Sep 17 00:00:00 2001 From: Nathan Friend Date: Sun, 15 Nov 2020 13:57:34 -0500 Subject: [PATCH 065/114] [Keymap] Add nfriend's ErgoDox EZ keymap (#10545) --- keyboards/ergodox_ez/keymaps/nfriend/config.h | 31 + keyboards/ergodox_ez/keymaps/nfriend/keymap.c | 1096 +++++++++++++++++ .../ergodox_ez/keymaps/nfriend/readme.md | 52 + keyboards/ergodox_ez/keymaps/nfriend/rules.mk | 8 + .../ergodox_ez/keymaps/nfriend/template.c | 92 ++ 5 files changed, 1279 insertions(+) create mode 100644 keyboards/ergodox_ez/keymaps/nfriend/config.h create mode 100644 keyboards/ergodox_ez/keymaps/nfriend/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/nfriend/readme.md create mode 100644 keyboards/ergodox_ez/keymaps/nfriend/rules.mk create mode 100644 keyboards/ergodox_ez/keymaps/nfriend/template.c diff --git a/keyboards/ergodox_ez/keymaps/nfriend/config.h b/keyboards/ergodox_ez/keymaps/nfriend/config.h new file mode 100644 index 0000000000..36d23c96b7 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/nfriend/config.h @@ -0,0 +1,31 @@ +/* Copyright (C) 2020 Nathan Friend + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#undef DEBOUNCE +#define DEBOUNCE 15 + +#undef ONESHOT_TIMEOUT +#define ONESHOT_TIMEOUT 1003 + +#define PERMISSIVE_HOLD + +#undef IGNORE_MOD_TAP_INTERRUPT + +#define RGBLIGHT_SLEEP diff --git a/keyboards/ergodox_ez/keymaps/nfriend/keymap.c b/keyboards/ergodox_ez/keymaps/nfriend/keymap.c new file mode 100644 index 0000000000..ccea63c97b --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/nfriend/keymap.c @@ -0,0 +1,1096 @@ +/* Copyright (C) 2020 Nathan Friend + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "version.h" +#include "keymap_german.h" +#include "keymap_nordic.h" +#include "keymap_french.h" +#include "keymap_spanish.h" +#include "keymap_hungarian.h" + +#define KC_MAC_UNDO LGUI(KC_Z) +#define KC_MAC_CUT LGUI(KC_X) +#define KC_MAC_COPY LGUI(KC_C) +#define KC_MAC_PASTE LGUI(KC_V) +#define KC_PC_UNDO LCTL(KC_Z) +#define KC_PC_CUT LCTL(KC_X) +#define KC_PC_COPY LCTL(KC_C) +#define KC_PC_PASTE LCTL(KC_V) +#define ___ KC_TRNS + +/* Shortcut for Option+Ctrl */ +#define OC(keycode) LALT(LCTL(keycode)) + +enum layer_names { + + /* Base layers */ + _COLEMAK, + _QWERTY, + _DVORAK, + + /* Keys the base layers share */ + _COMMON, + + /* OS layers */ + _MAC, + _WINDOWS, + + /* Symbols */ + _NUMPAD, + _SYMBOLS, + + /* Window management */ + _WM_MAC, + _WM_WINDOWS, + + /* Navigation */ + _ARROWS_MAC, + _ARROWS_WINDOWS, + + _MISC +}; + +enum custom_keycodes { + RGB_SLD = SAFE_RANGE, /* Can always be here */ + HSV_0_255_255, + HSV_120_255_128, + HSV_240_255_255, + MAC_MODE, + WINDOWS_MODE, + DYNAMIC_MACRO_RANGE, /* This needs to be last! */ +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* clang-format off */ + + [_COLEMAK] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_Q, /**/ KC_W, /**/ KC_F, /**/ KC_P, /**/ KC_G, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_A, /**/ KC_R, /**/ KC_S, /**/ KC_T, /**/ KC_D, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_Z, /**/ KC_X, /**/ KC_C, /**/ KC_V, /**/ KC_B, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_J, /**/ KC_L, /**/ KC_U, /**/ KC_Y, /**/ KC_SCOLON,/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ KC_H, /**/ KC_N, /**/ KC_E, /**/ KC_I, /**/ KC_O, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_K, /**/ KC_M, /**/ KC_COMMA, /**/ KC_DOT, /**/ KC_SLASH, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_QWERTY] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ 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, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_Y, /**/ KC_U, /**/ KC_I, /**/ KC_O, /**/ KC_P, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ KC_H, /**/ KC_J, /**/ KC_K, /**/ KC_L, /**/ KC_SCOLON,/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_N, /**/ KC_M, /**/ KC_COMMA, /**/ KC_DOT, /**/ KC_SLASH, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_DVORAK] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_QUOTE, /**/ KC_COMMA, /**/ KC_DOT, /**/ KC_P, /**/ KC_Y, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_A, /**/ KC_O, /**/ KC_E, /**/ KC_U, /**/ KC_I, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_SCOLON,/**/ KC_Q, /**/ KC_J, /**/ KC_K, /**/ KC_X, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_F, /**/ KC_G, /**/ KC_C, /**/ KC_R, /**/ KC_L, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ KC_D, /**/ KC_H, /**/ KC_T, /**/ KC_N, /**/ KC_S, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_B, /**/ KC_M, /**/ KC_W, /**/ KC_V, /**/ KC_Z, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_COMMON] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ KC_ESCAPE,/**/ KC_1, /**/ KC_2, /**/ KC_3, /**/ KC_4, /**/ KC_5, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ KC_TAB, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/MO(_SYMBOLS), _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/KC_LSHIFT, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/LT(_NUMPAD,KC_TAB), + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ KC_SPACE, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ KC_AUDIO_VOL_DOWN, + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ KC_BSPACE,/**/ _______, /**/ KC_ENTER, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_6, /**/ KC_7, /**/ KC_8, /**/ KC_9, /**/ KC_0, /**/ KC_F12, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ KC_HYPR, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ KC_BSLASH,/**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/MO(_SYMBOLS),// + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ KC_MEH, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/KC_RSHIFT, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/TT(_MISC), + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ KC_CAPS, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + KC_AUDIO_VOL_UP,/**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ KC_ESCAPE,/**/ KC_ENTER, /**/ KC_SPACE /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_MAC] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/LCTL(LGUI(LSFT(KC_4))), + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______ ,/**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/LALT(KC_BSPACE), + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + KC_LCTRL,/**/ KC_LGUI, /**/ KC_LALT, /**/MO(_WM_MAC), MO(_ARROWS_MAC), + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/LCTL(LGUI(KC_Q)), + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_LGUI, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + RGUI(RSFT(KC_7)),/**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + MO(_ARROWS_MAC), MO(_WM_MAC),/**/ KC_LALT, /**/ KC_LGUI, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + LCTL(LGUI(KC_Q)),/**/ KC_CAPS, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_WINDOWS] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/LGUI(LSFT(KC_S)), + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/LCTL(KC_BSPACE), + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + KC_LGUI, /**/ KC_LCTRL, /**/ KC_LALT, MO(_WM_WINDOWS), MO(_ARROWS_WINDOWS), + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/LGUI(KC_L),/**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_LCTRL, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + LALT(KC_PSCREEN),/**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + MO(_ARROWS_WINDOWS), MO(_WM_WINDOWS), KC_RALT, /**/ KC_RCTRL, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/LGUI(KC_L),/**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_NUMPAD] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ XXXXXXX, /**/ KC_ESCAPE, LALT(KC_KP_MINUS), KC_PERC, /**/KC_KP_SLASH, _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ XXXXXXX, /**/ KC_KP_7, /**/ KC_KP_8, /**/ KC_KP_9, /**/KC_KP_ASTERISK, _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ KC_COLN, /**/ KC_KP_4, /**/ KC_KP_5, /**/ KC_KP_6, /**/KC_KP_MINUS, _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_COMMA, /**/ KC_KP_1, /**/ KC_KP_2, /**/ KC_KP_3, /**/KC_KP_PLUS,/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ KC_0, /**/ KC_0, /**/ KC_DOT, /**/KC_KP_ENTER, ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ KC_0 /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_SYMBOLS] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_F1, /**/ KC_F2, /**/ KC_F3, /**/ KC_F4, /**/ KC_F5, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_EXLM, /**/ KC_AT, /**/ KC_LCBR, /**/ KC_RCBR, /**/ KC_PERC, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + LGUI(KC_BSPACE),/**/ KC_HASH, /**/ KC_UNDS, /**/ KC_LPRN, /**/ KC_RPRN, /**/ KC_AMPR, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_BSLASH,/**/ KC_SLASH, /**/KC_LBRACKET, KC_RBRACKET,/**/ KC_TILD, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_F6, /**/ KC_F7, /**/ KC_F8, /**/ KC_F9, /**/ KC_F10, /**/ KC_F11, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_CIRC, /**/KC_KP_PLUS,/**/KC_KP_MINUS, KC_GRAVE, /**/ KC_SCOLON,/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ KC_PIPE, /**/ KC_EQUAL, /**/ KC_QUOTE, /**/ KC_COLN, /**/ KC_DQUO, /**/LGUI(KC_DELETE), + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_DLR, /**/ KC_ASTR, /**/ KC_LABK, /**/ KC_RABK, /**/ KC_SLASH, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_WM_MAC] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ OC(KC_C), /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ OC(KC_U), OC(LGUI(KC_LEFT)),OC(KC_ENTER),OC(LGUI(KC_RIGHT)), OC(KC_I),/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ OC(KC_J), OC(KC_LEFT), OC(KC_BSPACE), OC(KC_RIGHT), OC(KC_K), /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_UP, /**/ OC(KC_E), /**/ OC(KC_F), /**/ OC(KC_T), /**/ OC(KC_G), /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/KC_LEFT, KC_DOWN, /**/ KC_RIGHT, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ OC(KC_C), /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ OC(KC_U), OC(LGUI(KC_LEFT)),OC(KC_ENTER),OC(LGUI(KC_RIGHT)), OC(KC_I),/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ OC(KC_J), OC(KC_LEFT), OC(KC_BSPACE), OC(KC_RIGHT), OC(KC_K), /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ OC(KC_D), /**/ OC(KC_E), /**/ OC(KC_F), /**/ OC(KC_T), /**/ KC_UP, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ KC_LEFT, /**/ KC_DOWN, /**/KC_RIGHT,// + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_ARROWS_MAC] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/LGUI(KC_Q),/**/LGUI(KC_W),/**/LGUI(KC_F),/**/LGUI(KC_P),/**/LGUI(KC_G),/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_LCTRL, /**/ KC_LGUI, /**/ KC_LSHIFT,/**/ KC_LALT, /**/LGUI(KC_D),/*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/LGUI(KC_Z),/**/LGUI(KC_X),/**/LGUI(KC_C),/**/LGUI(KC_V),/**/LGUI(KC_B),/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/RGUI(KC_J),/**/ KC_BSPACE,/**/ KC_UP, /**/ KC_DELETE, RGUI(KC_SCOLON), _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/RGUI(KC_H),/**/ KC_LEFT, /**/ KC_DOWN, /**/ KC_RIGHT, /**/ KC_ENTER, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/RGUI(KC_K),/**/RGUI(KC_M), RGUI(KC_COMMA), RGUI(KC_DOT), RGUI(KC_SLASH), _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_ARROWS_WINDOWS] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/LCTL(KC_Q),/**/LCTL(KC_W),/**/LCTL(KC_F),/**/LCTL(KC_P),/**/LCTL(KC_G),/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_LGUI, /**/ KC_HYPR, /**/ KC_LSHIFT,/**/ KC_LCTRL, /**/LCTL(KC_D),/*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/LCTL(KC_Z),/**/LCTL(KC_X),/**/LCTL(KC_C),/**/LCTL(KC_V),/**/LCTL(KC_B),/**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/RCTL(KC_J),/**/ KC_BSPACE,/**/ KC_UP, /**/ KC_DELETE, RCTL(KC_SCOLON), _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/RCTL(KC_H),/**/ KC_LEFT, /**/ KC_DOWN, /**/ KC_RIGHT, /**/ KC_ENTER, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/RCTL(KC_K),/**/RCTL(KC_M), RCTL(KC_COMMA), RCTL(KC_DOT), RCTL(KC_SLASH), _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + [_MISC] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ KC_F14, /**/ KC_F15, /**/ _______, /**/ _______, /**/ _______, /**/ RESET, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ KC_MS_UP, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/KC_MS_LEFT,/**/KC_MS_DOWN,/**/KC_MS_RIGHT, _______, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ RGB_MOD, /**/HSV_0_255_255, + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/HSV_120_255_128, + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/KC_MS_BTN1,/**/KC_MS_BTN2,/**/HSV_240_255_255, + /**/ /**/ /**/ /**/ + /*=============================================*/ + + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/KC_MEDIA_EJECT, + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/DF(_DVORAK), DF(_QWERTY), DF(_COLEMAK),// + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, WINDOWS_MODE, MAC_MODE, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ RGB_TOG, /**/ RGB_SLD, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ RGB_VAI, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ RGB_VAD, /**/ RGB_HUD, /**/ RGB_HUI /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + ), + + /* clang-format on */ +}; + +bool suspended = false; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case EEP_RST: + if (record->event.pressed) { + eeconfig_init(); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + rgblight_mode(1); + } + return false; + break; + case HSV_0_255_255: + if (record->event.pressed) { +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_sethsv(0, 255, 255); +#endif + } + return false; + break; + case HSV_120_255_128: + if (record->event.pressed) { +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_sethsv(120, 255, 128); +#endif + } + return false; + break; + case HSV_240_255_255: + if (record->event.pressed) { +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_sethsv(240, 255, 255); +#endif + } + return false; + break; + case MAC_MODE: + if (record->event.pressed) { + layer_on(_MAC); + layer_off(_WINDOWS); + } + return false; + break; + case WINDOWS_MODE: + if (record->event.pressed) { + layer_on(_WINDOWS); + layer_off(_MAC); + } + return false; + break; + } + return true; +} + +uint32_t layer_state_set_user(uint32_t state) { + uint8_t layer = biton32(state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + + if (layer == _ARROWS_MAC || layer == _ARROWS_WINDOWS) { + ergodox_right_led_1_on(); + } else if (layer == _SYMBOLS) { + ergodox_right_led_2_on(); + } else if (layer == _NUMPAD) { + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + } else if (layer == _WM_MAC || layer == _WM_WINDOWS) { + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + } else if (layer == _MISC) { + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + } else if (layer == _WINDOWS) { + ergodox_right_led_3_on(); + } else if (layer == _MAC) { + /* do nothing */ + } + + return state; +}; + +void keyboard_post_init_user(void) { + /* This layer is always on */ + layer_on(_COMMON); + + /* Default to Mac layout */ + layer_on(_MAC); +} diff --git a/keyboards/ergodox_ez/keymaps/nfriend/readme.md b/keyboards/ergodox_ez/keymaps/nfriend/readme.md new file mode 100644 index 0000000000..0a19e2d042 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/nfriend/readme.md @@ -0,0 +1,52 @@ +# [nfriend](https://gitlab.com/nfriend)'s ErgoDox EZ configuration + +![nfriend's ErgoDox EZ keymap](https://i.imgur.com/CMMmdBc.png) + +[View this keymap on +keyboard-layout-editor.com.](http://www.keyboard-layout-editor.com/#/gists/01283b322a647c96ef75955a9b0bac68) + +Color legend: + +- **Black:** Primary layer. +- **Blue:** Symbol layer. Accessed by holding either of the to sym + keys on either end of the keyboard. +- **Green:** Numpad layer. Accessed by holding the to numpad key. +- **Red:** Arrow layer. Accessed by holding either of the to arrows + thumb keys. +- **Teal:** Window management layer. Accessed by holding either of the to + WM thumb keys. + - Note: this layer is not pictured on this keymap since is tightly coupled + to [Magnet](https://magnet.crowdcafe.com/). +- **Yellow:** Miscellaneous layer. Includes LED control, layout toggling + (Colemak/Dvorak/QWERTY), platform toggling (Windows/Mac), and other + experimental features. + - Note: this layer is only partially pictured on this keymap + +## Caveats + +In its current state, this keymap is fairly Mac-centric. Some of the features +implemented in the Mac layers have not yet been ported to the corresponding +Windows layers. + +## Building + +To build this layout, open a command window in the root directory of this +repository and run: + +```bash +make ergodox_ez:nfriend +``` + +This will create a `.build/ergodox_ez_nfriend.hex` file which can be flashed +using the [Teensy loader](https://www.pjrc.com/teensy/loader.html). After the +`.hex` file has been loaded into Teensy, the keyboard can be reprogrammed by +pressing the bottom-right key of the right half of the keyboard and the +top-right key of the left half (the RESET key in the screenshot +above). + +## Developing + +Use the template in `./template.c` to help create new layers quickly. + +This layout was originally based on [this EZ Configurator +configuration](https://configure.ergodox-ez.com/ergodox-ez/layouts/x9MWL/latest/0). diff --git a/keyboards/ergodox_ez/keymaps/nfriend/rules.mk b/keyboards/ergodox_ez/keymaps/nfriend/rules.mk new file mode 100644 index 0000000000..7e037f6414 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/nfriend/rules.mk @@ -0,0 +1,8 @@ +# Set any rules.mk overrides for your specific keymap here. +# See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file +DEBOUNCE_TYPE = eager_pk +LTO_ENABLE = yes +COMMAND_ENABLE = no +UNICODE_ENABLE = no +UNICODEMAP_ENABLE = no +DYNAMIC_MACRO_ENABLE = yes diff --git a/keyboards/ergodox_ez/keymaps/nfriend/template.c b/keyboards/ergodox_ez/keymaps/nfriend/template.c new file mode 100644 index 0000000000..dc4294d595 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/nfriend/template.c @@ -0,0 +1,92 @@ +/* Copyright (C) 2020 Nathan Friend + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* clang-format off */ + +[LAYER_NAME] = LAYOUT_ergodox( + /* Left hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /*===============*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*==========================================================================================*/ /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ ___, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ /**/ /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /**/ /**/ /*===============*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ + /* Right hand */ + + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*===============*/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ /*==========================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ /**/ /**/ + /*=========================================================================================================*/ + /**/ /**/ /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______, /**/ _______, /**/ ___, /**/ + /**/ /**/ /**/ /**/ /**/ /**/ + /*=======================================================================*/ + /*==============================*/ + /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ + /**/ /**/ /**/ + /*=============================================*/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ /**/ /**/ + /**/ /**/ /**/ /**/ + /*===============*/ /**/ /**/ + /**/ /**/ /**/ /**/ + /**/ _______, /**/ _______, /**/ _______ /**/ + /**/ /**/ /**/ /**/ + /*=============================================*/ +), From 81a17f4270d48e5377ca07d5ed5de60a4a7d0a70 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Mon, 16 Nov 2020 04:31:23 +0900 Subject: [PATCH 066/114] [Keyboard] add Symmetric70 keyboard prototype (#10780) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * proto_symmetric70 作成中 74hc157 無しで 片手動作は、右と左でそれぞれうごいた。 * add 74HC157 support * add keymaps/default_mac * update proto_symmetric70/keymaps/default_mac/readme.md * update 74HC157 support * add keyboards/handwired/proto_symmetric70/matrix.c.patch * update keyboards/handwired/proto_symmetric70/readme.md * rename proto_symmetric70 to symmetric70_proto * Update keyboards/handwired/symmetric70_proto/config.h Co-authored-by: Drashna Jaelre * Update keyboards/handwired/symmetric70_proto/symmetric70_proto.c Co-authored-by: Drashna Jaelre * Update keyboards/handwired/symmetric70_proto/readme.md Co-authored-by: Ryan * update readme.md * update keyboards/handwired/symmetric70_proto/config.h * remove keyboards/handwired/symmetric70_proto/matrix.c.patch * Update keyboards/handwired/symmetric70_proto/matrix.c Co-authored-by: Drashna Jaelre * Update keyboards/handwired/symmetric70_proto/matrix.c Co-authored-by: Drashna Jaelre * use KC_NO, _______ Co-authored-by: Drashna Jaelre Co-authored-by: Ryan --- .../handwired/symmetric70_proto/config.h | 150 ++++++++++++ .../handwired/symmetric70_proto/info.json | 87 +++++++ .../keymaps/default/keymap.c | 54 +++++ .../keymaps/default/readme.md | 9 + .../keymaps/default_mac/keymap.c | 54 +++++ .../keymaps/default_mac/readme.md | 9 + .../handwired/symmetric70_proto/matrix.c | 226 ++++++++++++++++++ .../handwired/symmetric70_proto/readme.md | 20 ++ .../handwired/symmetric70_proto/rules.mk | 27 +++ .../symmetric70_proto/symmetric70_proto.c | 25 ++ .../symmetric70_proto/symmetric70_proto.h | 41 ++++ 11 files changed, 702 insertions(+) create mode 100644 keyboards/handwired/symmetric70_proto/config.h create mode 100644 keyboards/handwired/symmetric70_proto/info.json create mode 100644 keyboards/handwired/symmetric70_proto/keymaps/default/keymap.c create mode 100644 keyboards/handwired/symmetric70_proto/keymaps/default/readme.md create mode 100644 keyboards/handwired/symmetric70_proto/keymaps/default_mac/keymap.c create mode 100644 keyboards/handwired/symmetric70_proto/keymaps/default_mac/readme.md create mode 100644 keyboards/handwired/symmetric70_proto/matrix.c create mode 100644 keyboards/handwired/symmetric70_proto/readme.md create mode 100644 keyboards/handwired/symmetric70_proto/rules.mk create mode 100644 keyboards/handwired/symmetric70_proto/symmetric70_proto.c create mode 100644 keyboards/handwired/symmetric70_proto/symmetric70_proto.h diff --git a/keyboards/handwired/symmetric70_proto/config.h b/keyboards/handwired/symmetric70_proto/config.h new file mode 100644 index 0000000000..2cdce5802c --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/config.h @@ -0,0 +1,150 @@ +/* +Copyright 2020 mtei + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 0x2BE5 +#define DEVICE_VER 0x0001 +#define MANUFACTURER mtei +#define PRODUCT Symmetric70 prototype + +/* key matrix size */ +#define MATRIX_ROWS 5 +#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 { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F4,F4,F5,F5, F6,F6,F7,F7, B6,B6,B2,B2, B3,B3,B1,B1 } +#define UNUSED_PINS + +#define MATRIX_MUL_SEL { 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0 } +/* use 74HC157: quadruple 2-line to 1-line data selectors / multiplexers */ +#define MATRIX_MUL_SELECT B5 /* 74HC157 pin1:~A/B */ + +/* 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_LEVELS 3 +//#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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful 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 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/symmetric70_proto/info.json b/keyboards/handwired/symmetric70_proto/info.json new file mode 100644 index 0000000000..abb0976a3f --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/info.json @@ -0,0 +1,87 @@ +{ + "keyboard_name": "symmetric70_proto", + "url": "", + "maintainer": "mtei", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"L00", "x":0, "y":0, "w":1.25}, + {"label":"L01", "x":1.25, "y":0}, + {"label":"L02", "x":2.25, "y":0}, + {"label":"L03", "x":3.25, "y":0}, + {"label":"L04", "x":4.25, "y":0}, + {"label":"L05", "x":5.25, "y":0}, + {"label":"L06", "x":6.25, "y":0}, + {"label":"R06", "x":8.75, "y":0}, + {"label":"R05", "x":9.75, "y":0}, + {"label":"R04", "x":10.75, "y":0}, + {"label":"R03", "x":11.75, "y":0}, + {"label":"R02", "x":12.75, "y":0}, + {"label":"R01", "x":13.75, "y":0}, + {"label":"R00", "x":14.75, "y":0, "w":1.25}, + + {"label":"L10", "x":0, "y":1, "w":1.5}, + {"label":"L11", "x":1.5, "y":1}, + {"label":"L12", "x":2.5, "y":1}, + {"label":"L13", "x":3.5, "y":1}, + {"label":"L14", "x":4.5, "y":1}, + {"label":"L15", "x":5.5, "y":1}, + {"label":"L16", "x":6.5, "y":1}, + {"label":"R16", "x":8.5, "y":1}, + {"label":"R15", "x":9.5, "y":1}, + {"label":"R14", "x":10.5, "y":1}, + {"label":"R13", "x":11.5, "y":1}, + {"label":"R12", "x":12.5, "y":1}, + {"label":"R11", "x":13.5, "y":1}, + {"label":"R10", "x":14.5, "y":1, "w":1.5}, + + {"label":"L20", "x":0, "y":2, "w":1.25}, + {"label":"L21", "x":1.25, "y":2}, + {"label":"L22", "x":2.25, "y":2}, + {"label":"L23", "x":3.25, "y":2}, + {"label":"L24", "x":4.25, "y":2}, + {"label":"L25", "x":5.25, "y":2}, + {"label":"L26", "x":6.25, "y":2}, + {"label":"R26", "x":8.75, "y":2}, + {"label":"R25", "x":9.75, "y":2}, + {"label":"R24", "x":10.75, "y":2}, + {"label":"R23", "x":11.75, "y":2}, + {"label":"R22", "x":12.75, "y":2}, + {"label":"R21", "x":13.75, "y":2}, + {"label":"R20", "x":14.75, "y":2, "w":1.25}, + + {"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}, + {"label":"L35", "x":5, "y":3}, + {"label":"L36", "x":6, "y":3}, + {"label":"L37", "x":7, "y":3}, + {"label":"R37", "x":8, "y":3}, + {"label":"R36", "x":9, "y":3}, + {"label":"R35", "x":10, "y":3}, + {"label":"R34", "x":11, "y":3}, + {"label":"R33", "x":12, "y":3}, + {"label":"R32", "x":13, "y":3}, + {"label":"R31", "x":14, "y":3}, + {"label":"R30", "x":15, "y":3}, + + {"label":"L40", "x":0, "y":4, "w":1.75}, + {"label":"L42", "x":1.75, "y":4, "w":1.25}, + {"label":"L43", "x":3, "y":4, "w":1.25}, + {"label":"L44", "x":4.25, "y":4}, + {"label":"L45", "x":5.25, "y":4, "w":1.25}, + {"label":"L47", "x":6.5, "y":4, "w":1.5}, + {"label":"R47", "x":8, "y":4, "w":1.5}, + {"label":"R45", "x":9.5, "y":4, "w":1.25}, + {"label":"R44", "x":10.75, "y":4}, + {"label":"R43", "x":11.75, "y":4, "w":1.25}, + {"label":"R42", "x":13, "y":4, "w":1.25}, + {"label":"R40", "x":14.25, "y":4, "w":1.75} + ] + } + } +} diff --git a/keyboards/handwired/symmetric70_proto/keymaps/default/keymap.c b/keyboards/handwired/symmetric70_proto/keymaps/default/keymap.c new file mode 100644 index 0000000000..d396907146 --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/keymaps/default/keymap.c @@ -0,0 +1,54 @@ +/* Copyright 2020 mtei + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + +#define KC_FUNC MO(_FN) + +// clang-format off + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT( + //_ESC_1_2_3_4_5_NO _NO_6_7_8_9_0_BSPC + //_TAB_Q_W_E_R_T_MINS _EQL_Y_U_I_O_P_BSLS + //_LCTL_A_S_D_F_G_LBRC _RBRC_H_J_K_L_SCLN_RCTL + //_LSFT_Z_X_C_V_B_GRV_NO _NO_QUOT_N_M_COMM_DOT_SLSH_RSFT + //_FUNC_CAPS_LALT_LGUI_SPC_BSPC _ENT_SPC_RGUI_RALT_APP_FUNC + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, KC_NO, 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_MINS, KC_EQL, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_LCTL, 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_RCTL, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_NO, KC_NO, KC_QUOT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_FUNC, KC_CAPS, KC_LALT, KC_LGUI, KC_SPC, KC_BSPC, KC_ENT, KC_SPC, KC_RGUI, KC_RALT, KC_APP, KC_FUNC + ), + [_FN] = LAYOUT( + //_NO_F1_F2_F3_F4_F5_NO _NO_F6_F7_F8_F9_F10_F11 + //_NO_NO_PAUS_SLCK_NO_NO_NO _NO_NO_NO_SLCK_PAUS_NO_F12 + //_TRNS_HOME_NO_UP_NO_PGUP_INS _INS_PGUP_NO_UP_NO_HOME_TRNS + //_TRNS_END_LEFT_DOWN_RGHT_PGDN_DEL_TRNS _TRNS_DEL_PGDN_LEFT_DOWN_RGHT_END_TRNS + //_TRNS_PSCR_TRNS_TRNS_NO_NO _NO_NO_TRNS_TRNS_PSCR_TRNS + KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_NO, KC_NO, KC_PAUS, KC_SLCK, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_SLCK, KC_PAUS, KC_NO, KC_F12, + _______, KC_HOME, KC_NO, KC_UP, KC_NO, KC_PGUP, KC_INS, KC_INS, KC_PGUP, KC_NO, KC_UP, KC_NO, KC_HOME, _______, + _______, KC_END, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DEL, KC_NO,KC_NO, KC_DEL, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______, + _______, KC_PSCR, _______, _______, KC_NO, KC_NO,KC_NO, KC_NO, _______, _______, KC_PSCR, _______ + ) +}; diff --git a/keyboards/handwired/symmetric70_proto/keymaps/default/readme.md b/keyboards/handwired/symmetric70_proto/keymaps/default/readme.md new file mode 100644 index 0000000000..f9bb5bf675 --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/keymaps/default/readme.md @@ -0,0 +1,9 @@ +# The default keymap for symmetric70_proto + +``` + ESC 1 2 3 4 5 6 7 8 9 0 BS + TAB Q W E R T - = Y U I O P \ + CTL A S D F G [ ] H J K L ; CTL + SFT Z X C V B ` ' N M , . / SFT + FUNC CAPS ALT GUI SPC BS ENT SPC GUI RALT APP FUNC +``` diff --git a/keyboards/handwired/symmetric70_proto/keymaps/default_mac/keymap.c b/keyboards/handwired/symmetric70_proto/keymaps/default_mac/keymap.c new file mode 100644 index 0000000000..30f42e70ab --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/keymaps/default_mac/keymap.c @@ -0,0 +1,54 @@ +/* Copyright 2020 mtei + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + +#define KC_FUNC MO(_FN) + +// clang-format off + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT( + //_ESC_1_2_3_4_5_NO _NO_6_7_8_9_0_BSPC + //_TAB_Q_W_E_R_T_MINS _EQL_Y_U_I_O_P_BSLS + //_LCTL_A_S_D_F_G_LBRC _RBRC_H_J_K_L_SCLN_RCTL + //_LSFT_Z_X_C_V_B_GRV_NO _NO_QUOT_N_M_COMM_DOT_SLSH_RSFT + //_FUNC_CAPS_LALT_LGUI_SPC_BSPC _ENT_SPC_RGUI_RALT_APP_FUNC + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, KC_NO, 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_MINS, KC_EQL, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_LCTL, 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_RCTL, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_LANG2, KC_LANG1, KC_QUOT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_FUNC, KC_CAPS, KC_LALT, KC_LGUI, KC_SPC, KC_BSPC, KC_ENT, KC_SPC, KC_RGUI, KC_RALT, KC_APP, KC_FUNC + ), + [_FN] = LAYOUT( + //_NO_F1_F2_F3_F4_F5_NO _NO_F6_F7_F8_F9_F10_F11 + //_NO_NO_PAUS_SLCK_NO_NO_NO _NO_NO_NO_SLCK_PAUS_NO_F12 + //_TRNS_HOME_NO_UP_NO_PGUP_INS _INS_PGUP_NO_UP_NO_HOME_TRNS + //_TRNS_END_LEFT_DOWN_RGHT_PGDN_DEL_TRNS _TRNS_DEL_PGDN_LEFT_DOWN_RGHT_END_TRNS + //_TRNS_PSCR_TRNS_TRNS_NO_NO _NO_NO_TRNS_TRNS_PSCR_TRNS + KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_NO, KC_NO, KC_PAUS, KC_SLCK, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_SLCK, KC_PAUS, KC_NO, KC_F12, + _______, KC_HOME, KC_NO, KC_UP, KC_NO, KC_PGUP, KC_INS, KC_INS, KC_PGUP, KC_NO, KC_UP, KC_NO, KC_HOME, _______, + _______, KC_END, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DEL, KC_NO,KC_NO, KC_DEL, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______, + _______, KC_PSCR, _______, _______, KC_NO, KC_NO,KC_NO, KC_NO, _______, _______, KC_PSCR, _______ + ) +}; diff --git a/keyboards/handwired/symmetric70_proto/keymaps/default_mac/readme.md b/keyboards/handwired/symmetric70_proto/keymaps/default_mac/readme.md new file mode 100644 index 0000000000..c533e32832 --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/keymaps/default_mac/readme.md @@ -0,0 +1,9 @@ +# The default_mac keymap for symmetric70_proto + +``` + ESC 1 2 3 4 5 6 7 8 9 0 BS + TAB Q W E R T - = Y U I O P \ + CTL A S D F G [ ] H J K L ; CTL + SFT Z X C V B ` LANG2 LANG1 ' N M , . / SFT + FUNC CAPS ALT GUI SPC BS ENT SPC GUI RALT APP FUNC +``` diff --git a/keyboards/handwired/symmetric70_proto/matrix.c b/keyboards/handwired/symmetric70_proto/matrix.c new file mode 100644 index 0000000000..c016120737 --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/matrix.c @@ -0,0 +1,226 @@ +/* +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 "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" + +#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; +# ifdef MATRIX_MUL_SELECT +static const pin_t col_sel[MATRIX_COLS] = MATRIX_MUL_SEL; +# ifndef MATRIX_MUL_SELECT_DELAY +# define MATRIX_MUL_SELECT_DELAY 1 +# endif +# endif +#endif + +/* matrix state(1:on, 0:off) */ +extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values +extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values + +// matrix code + +#ifdef DIRECT_PINS + +static void init_pins(void) { + for (int row = 0; row < MATRIX_ROWS; row++) { + for (int col = 0; col < MATRIX_COLS; col++) { + pin_t pin = direct_pins[row][col]; + if (pin != NO_PIN) { + setPinInputHigh(pin); + } + } + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + // Start with a clear matrix row + matrix_row_t current_row_value = 0; + + for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + pin_t pin = direct_pins[current_row][col_index]; + if (pin != NO_PIN) { + current_row_value |= readPin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index); + } + } + + // If the row has changed, store the row and return the changed flag. + if (current_matrix[current_row] != current_row_value) { + current_matrix[current_row] = current_row_value; + return true; + } + return false; +} + +#elif defined(DIODE_DIRECTION) +# if (DIODE_DIRECTION == COL2ROW) + +static void select_row(uint8_t row) { + setPinOutput(row_pins[row]); + writePinLow(row_pins[row]); +} + +static void unselect_row(uint8_t row) { setPinInputHigh(row_pins[row]); } + +static void unselect_rows(void) { + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } +} + +static void init_pins(void) { +#ifdef MATRIX_MUL_SELECT + setPinOutput(MATRIX_MUL_SELECT); + writePinLow(MATRIX_MUL_SELECT); +#endif + unselect_rows(); + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + // Start with a clear matrix row + matrix_row_t current_row_value = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + matrix_io_delay(); + + // For each col... + for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + // Select the col pin to read (active low) +#ifdef MATRIX_MUL_SELECT + writePin(MATRIX_MUL_SELECT,col_sel[col_index]); + __builtin_avr_delay_cycles(MATRIX_MUL_SELECT_DELAY); +#endif + uint8_t pin_state = readPin(col_pins[col_index]); + + // Populate the matrix row with the state of the col pin + current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); + } + + // Unselect row + unselect_row(current_row); + + // If the row has changed, store the row and return the changed flag. + if (current_matrix[current_row] != current_row_value) { + current_matrix[current_row] = current_row_value; + return true; + } + return false; +} + +# elif (DIODE_DIRECTION == ROW2COL) + +static void select_col(uint8_t col) { + setPinOutput(col_pins[col]); + writePinLow(col_pins[col]); +} + +static void unselect_col(uint8_t col) { setPinInputHigh(col_pins[col]); } + +static void unselect_cols(void) { + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } +} + +static void init_pins(void) { + unselect_cols(); + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } +} + +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); + matrix_io_delay(); + + // 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]; + matrix_row_t current_row_value = last_row_value; + + // Check row pin state + if (readPin(row_pins[row_index]) == 0) { + // Pin LO, set col bit + current_row_value |= (MATRIX_ROW_SHIFTER << current_col); + } else { + // Pin HI, clear col bit + current_row_value &= ~(MATRIX_ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_row_value)) { + matrix_changed |= true; + current_matrix[row_index] = current_row_value; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +# else +# error DIODE_DIRECTION must be one of COL2ROW or ROW2COL! +# endif +#else +# error DIODE_DIRECTION is not defined! +#endif + +void matrix_init_custom(void) { + // 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; + } + +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool changed = false; + +#if defined(DIRECT_PINS) || (DIODE_DIRECTION == COL2ROW) + // Set row, read cols + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { + changed |= read_cols_on_row(current_matrix, current_row); + } +#elif (DIODE_DIRECTION == ROW2COL) + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { + changed |= read_rows_on_col(current_matrix, current_col); + } +#endif + + return changed; +} diff --git a/keyboards/handwired/symmetric70_proto/readme.md b/keyboards/handwired/symmetric70_proto/readme.md new file mode 100644 index 0000000000..01c2889c27 --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/readme.md @@ -0,0 +1,20 @@ +# symmetric70_proto + +![symmetric70_proto](https://i.imgur.com/Br4pH9ol.jpg) +![74HC157_schematic](https://i.imgur.com/8IU8Jgcl.jpg) + +A compact 70keys keyboard (prototype) designed by mtei + +* Keyboard Maintainer: [mtei](https://github.com/mtei) +* Hardware Supported: Pro Micro (ATmega32U4) & 74HC157 +* Hardware Availability: This is just prototype + +Make example for this keyboard (after setting up your build environment): + + make symmetric70_proto:default + +Flashing example for this keyboard: + + make symmetric70_proto:default:flash + +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/symmetric70_proto/rules.mk b/keyboards/handwired/symmetric70_proto/rules.mk new file mode 100644 index 0000000000..494dc6fbaf --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +CUSTOM_MATRIX = lite +SRC += matrix.c + +## CONSOLE_ENABLE = yes # matrix dump diff --git a/keyboards/handwired/symmetric70_proto/symmetric70_proto.c b/keyboards/handwired/symmetric70_proto/symmetric70_proto.c new file mode 100644 index 0000000000..daab4f0993 --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/symmetric70_proto.c @@ -0,0 +1,25 @@ +/* Copyright 2020 mtei + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "symmetric70_proto.h" + +__attribute__((weak)) void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; + debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} diff --git a/keyboards/handwired/symmetric70_proto/symmetric70_proto.h b/keyboards/handwired/symmetric70_proto/symmetric70_proto.h new file mode 100644 index 0000000000..4a8539b50c --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/symmetric70_proto.h @@ -0,0 +1,41 @@ +/* Copyright 2020 mtei + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 is 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, R06, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, L16, R16, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, L26, R26, R25, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, L36, L37, R37, R36, R35, R34, R33, R32, R31, R30, \ + L40, L42, L43, L44, L45, L47, R47, R45, R44, R43, R42, R40 \ +) { \ + { L00, L01, L02, L03, L04, L05, L06, KC_NO, KC_NO, R06, R05, R04, R03, R02, R01, R00 }, \ + { L10, L11, L12, L13, L14, L15, L16, KC_NO, KC_NO, R16, R15, R14, R13, R12, R11, R10 }, \ + { L20, L21, L22, L23, L24, L25, L26, KC_NO, KC_NO, R26, R25, R24, R23, R22, R21, R20 }, \ + { L30, L31, L32, L33, L34, L35, L36, L37, R37, R36, R35, R34, R33, R32, R31, R30 }, \ + { L40, KC_NO, L42, L43, L44, L45, KC_NO, L47, R47, KC_NO, R45, R44, R43, R42, KC_NO, R40 } \ +} From e4236278b5b2dd84fb32e01cab5002b4597e7d35 Mon Sep 17 00:00:00 2001 From: Ikta <48316247+IktaS@users.noreply.github.com> Date: Mon, 16 Nov 2020 02:40:55 +0700 Subject: [PATCH 067/114] [Keyboard] added Pill60 to handwired/pill60 (#10798) * added to handwired pill60 * Update keyboards/handwired/pill60/config.h and all other PR suggested changes Deleted DESCRIPTION Co-authored-by: Drashna Jaelre Update keyboards/handwired/pill60/readme.md Smaller image in readme Co-authored-by: Drashna Jaelre Update keyboards/handwired/pill60/info.json Deleted key_count Co-authored-by: Ryan Update keyboards/handwired/pill60/keymaps/default/keymap.c Deleted backslash on keymap.c Co-authored-by: Ryan Update keyboards/handwired/pill60/pill60.h Deleted led.h Co-authored-by: Ryan Update keyboards/handwired/pill60/blackpill_f401/rules.mk Update stm32f401 rules.mk Co-authored-by: Ryan Update keyboards/handwired/pill60/blackpill_f411/rules.mk Update stm32f411 rules.mk Co-authored-by: Ryan Update keyboards/handwired/pill60/bluepill/rules.mk Update bluepill rules.mk Co-authored-by: Ryan Update keyboards/handwired/pill60/rules.mk Added comment on rules.mk to help ] Co-authored-by: Ryan deleted bootloader_defs.h added GPL2 + compatible license header updated keymap readme updated those that don't need common_config.h and deleted some unnecessary spaces in f411/rules.mk updated default folder in rules.mk * fix and simplify build files according to onekey example * Added GPL2+ Compatible license header --- .../handwired/pill60/blackpill_f401/config.h | 24 + .../handwired/pill60/blackpill_f401/halconf.h | 21 + .../handwired/pill60/blackpill_f401/mcuconf.h | 24 + .../handwired/pill60/blackpill_f401/rules.mk | 14 + .../handwired/pill60/blackpill_f411/config.h | 25 + .../handwired/pill60/blackpill_f411/halconf.h | 21 + .../handwired/pill60/blackpill_f411/mcuconf.h | 24 + .../handwired/pill60/blackpill_f411/rules.mk | 14 + keyboards/handwired/pill60/bluepill/chconf.h | 711 ++++++++++++++++++ keyboards/handwired/pill60/bluepill/config.h | 24 + keyboards/handwired/pill60/bluepill/halconf.h | 525 +++++++++++++ keyboards/handwired/pill60/bluepill/mcuconf.h | 209 +++++ keyboards/handwired/pill60/bluepill/rules.mk | 8 + keyboards/handwired/pill60/config.h | 53 ++ keyboards/handwired/pill60/info.json | 82 ++ .../handwired/pill60/keymaps/default/keymap.c | 87 +++ .../pill60/keymaps/default/readme.md | 6 + keyboards/handwired/pill60/pill60.c | 16 + keyboards/handwired/pill60/pill60.h | 42 ++ keyboards/handwired/pill60/readme.md | 25 + keyboards/handwired/pill60/rules.mk | 21 + 21 files changed, 1976 insertions(+) create mode 100644 keyboards/handwired/pill60/blackpill_f401/config.h create mode 100644 keyboards/handwired/pill60/blackpill_f401/halconf.h create mode 100644 keyboards/handwired/pill60/blackpill_f401/mcuconf.h create mode 100644 keyboards/handwired/pill60/blackpill_f401/rules.mk create mode 100644 keyboards/handwired/pill60/blackpill_f411/config.h create mode 100644 keyboards/handwired/pill60/blackpill_f411/halconf.h create mode 100644 keyboards/handwired/pill60/blackpill_f411/mcuconf.h create mode 100644 keyboards/handwired/pill60/blackpill_f411/rules.mk create mode 100644 keyboards/handwired/pill60/bluepill/chconf.h create mode 100644 keyboards/handwired/pill60/bluepill/config.h create mode 100644 keyboards/handwired/pill60/bluepill/halconf.h create mode 100644 keyboards/handwired/pill60/bluepill/mcuconf.h create mode 100644 keyboards/handwired/pill60/bluepill/rules.mk create mode 100644 keyboards/handwired/pill60/config.h create mode 100644 keyboards/handwired/pill60/info.json create mode 100644 keyboards/handwired/pill60/keymaps/default/keymap.c create mode 100644 keyboards/handwired/pill60/keymaps/default/readme.md create mode 100644 keyboards/handwired/pill60/pill60.c create mode 100644 keyboards/handwired/pill60/pill60.h create mode 100644 keyboards/handwired/pill60/readme.md create mode 100644 keyboards/handwired/pill60/rules.mk diff --git a/keyboards/handwired/pill60/blackpill_f401/config.h b/keyboards/handwired/pill60/blackpill_f401/config.h new file mode 100644 index 0000000000..d56ba94ea4 --- /dev/null +++ b/keyboards/handwired/pill60/blackpill_f401/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 + +#define MATRIX_COL_PINS \ + { A8, B2, B1, B15, A10, A0, A1, A2, A3, A4, A5, A6, A7, B0 } +#define MATRIX_ROW_PINS \ + { B4, B3, A15, B13, B5 } +#define UNUSED_PINS \ + { A9, A11, A12, C13, C14, C15, B10 } diff --git a/keyboards/handwired/pill60/blackpill_f401/halconf.h b/keyboards/handwired/pill60/blackpill_f401/halconf.h new file mode 100644 index 0000000000..f1230634b6 --- /dev/null +++ b/keyboards/handwired/pill60/blackpill_f401/halconf.h @@ -0,0 +1,21 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 HAL_USE_I2C TRUE +#define HAL_USE_PWM TRUE + +#include_next "halconf.h" \ No newline at end of file diff --git a/keyboards/handwired/pill60/blackpill_f401/mcuconf.h b/keyboards/handwired/pill60/blackpill_f401/mcuconf.h new file mode 100644 index 0000000000..a8b0a56602 --- /dev/null +++ b/keyboards/handwired/pill60/blackpill_f401/mcuconf.h @@ -0,0 +1,24 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_next "mcuconf.h" + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE + +#undef STM32_PWM_USE_TIM5 +#define STM32_PWM_USE_TIM5 TRUE \ No newline at end of file diff --git a/keyboards/handwired/pill60/blackpill_f401/rules.mk b/keyboards/handwired/pill60/blackpill_f401/rules.mk new file mode 100644 index 0000000000..8c514309df --- /dev/null +++ b/keyboards/handwired/pill60/blackpill_f401/rules.mk @@ -0,0 +1,14 @@ +# MCU name +MCU = STM32F401 + +# Address of the bootloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 + +# 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 + +# Build Options +# change yes to no to disable +# +KEYBOARD_SHARED_EP = yes diff --git a/keyboards/handwired/pill60/blackpill_f411/config.h b/keyboards/handwired/pill60/blackpill_f411/config.h new file mode 100644 index 0000000000..b106c2d290 --- /dev/null +++ b/keyboards/handwired/pill60/blackpill_f411/config.h @@ -0,0 +1,25 @@ +/* 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 + +#define MATRIX_COL_PINS \ + { A8, B2, B1, B15, A10, A0, A1, A2, A3, A4, A5, A6, A7, B0 } +#define MATRIX_ROW_PINS \ + { B4, B3, A15, B13, B5 } +#define UNUSED_PINS \ + { A9, A11, A12, C13, C14, C15, B10 } + diff --git a/keyboards/handwired/pill60/blackpill_f411/halconf.h b/keyboards/handwired/pill60/blackpill_f411/halconf.h new file mode 100644 index 0000000000..f1230634b6 --- /dev/null +++ b/keyboards/handwired/pill60/blackpill_f411/halconf.h @@ -0,0 +1,21 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 HAL_USE_I2C TRUE +#define HAL_USE_PWM TRUE + +#include_next "halconf.h" \ No newline at end of file diff --git a/keyboards/handwired/pill60/blackpill_f411/mcuconf.h b/keyboards/handwired/pill60/blackpill_f411/mcuconf.h new file mode 100644 index 0000000000..a8b0a56602 --- /dev/null +++ b/keyboards/handwired/pill60/blackpill_f411/mcuconf.h @@ -0,0 +1,24 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_next "mcuconf.h" + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE + +#undef STM32_PWM_USE_TIM5 +#define STM32_PWM_USE_TIM5 TRUE \ No newline at end of file diff --git a/keyboards/handwired/pill60/blackpill_f411/rules.mk b/keyboards/handwired/pill60/blackpill_f411/rules.mk new file mode 100644 index 0000000000..84dd584e85 --- /dev/null +++ b/keyboards/handwired/pill60/blackpill_f411/rules.mk @@ -0,0 +1,14 @@ +# MCU name +MCU = STM32F411 + +# Address of the bootloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 + +# 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 + +# Build Options +# change yes to no to disable +# +KEYBOARD_SHARED_EP = yes diff --git a/keyboards/handwired/pill60/bluepill/chconf.h b/keyboards/handwired/pill60/bluepill/chconf.h new file mode 100644 index 0000000000..d8442f1b1a --- /dev/null +++ b/keyboards/handwired/pill60/bluepill/chconf.h @@ -0,0 +1,711 @@ +/* + ChibiOS - Copyright (C) 2006..2018 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 rt/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_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_ST_RESOLUTION) +#define CH_CFG_ST_RESOLUTION 32 +#endif + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#if !defined(CH_CFG_ST_FREQUENCY) +#define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 0 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MUTEXES) +#define CH_CFG_USE_MUTEXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_EVENTS) +#define CH_CFG_USE_EVENTS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMPOOLS) +#define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_DYNAMIC) +#define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_MASK) +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) +#define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @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 _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/handwired/pill60/bluepill/config.h b/keyboards/handwired/pill60/bluepill/config.h new file mode 100644 index 0000000000..f68f518b97 --- /dev/null +++ b/keyboards/handwired/pill60/bluepill/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 + +#define MATRIX_COL_PINS \ + { A8, B11, B10, B15, A10, A1, A2, A3, A4, A5, A6, A7, B0, B1 } +#define MATRIX_ROW_PINS \ + { B4, B3, A15, B13, B5 } +#define UNUSED_PINS \ + { A0, A9, A11, A12, C13, C14, C15 } diff --git a/keyboards/handwired/pill60/bluepill/halconf.h b/keyboards/handwired/pill60/bluepill/halconf.h new file mode 100644 index 0000000000..a406166756 --- /dev/null +++ b/keyboards/handwired/pill60/bluepill/halconf.h @@ -0,0 +1,525 @@ +/* + ChibiOS - Copyright (C) 2006..2018 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 + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC 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 SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG 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 + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT 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 + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION 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 the zero-copy API. + */ +#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 + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#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 circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR 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 TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#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 + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/keyboards/handwired/pill60/bluepill/mcuconf.h b/keyboards/handwired/pill60/bluepill/mcuconf.h new file mode 100644 index 0000000000..841b689922 --- /dev/null +++ b/keyboards/handwired/pill60/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 TRUE +#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 TRUE +#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 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 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/handwired/pill60/bluepill/rules.mk b/keyboards/handwired/pill60/bluepill/rules.mk new file mode 100644 index 0000000000..019b1130d9 --- /dev/null +++ b/keyboards/handwired/pill60/bluepill/rules.mk @@ -0,0 +1,8 @@ +# MCU name +MCU = STM32F103 + +# Bootloader selection +BOOTLOADER = stm32duino + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/handwired/pill60/config.h b/keyboards/handwired/pill60/config.h new file mode 100644 index 0000000000..d9940c77c2 --- /dev/null +++ b/keyboards/handwired/pill60/config.h @@ -0,0 +1,53 @@ + /* Copyright 2020 Imam Rafii + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 0x4454 +#define PRODUCT_ID 0x5444 +#define DEVICE_VER 0x0001 + +#define MANUFACTURER "IktaS" +#define PRODUCT "Pill60" + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 1 + +/* Backlighting include */ +#define BACKLIGHT_PIN B14 +#define BACKLIGHT_PWM_DRIVER PWMD5 +#define BACKLIGHT_PWM_CHANNEL 1 +#define BACKLIGHT_LEVELS 5 +#define BREATHING_PERIOD 6 + +/* Encoder */ +#define ENCODERS_PAD_A \ + { B9 } +#define ENCODERS_PAD_B \ + { B8 } +#define ENCODER_RESOLUTION 2 + +/* OLED */ +#define I2C_DRIVER I2CD1 +#define I2C1_SCL_BANK GPIOB +#define I2C1_SDA_BANK GPIOB +#define I2C1_SCL 6 +#define I2C1_SDA 7 diff --git a/keyboards/handwired/pill60/info.json b/keyboards/handwired/pill60/info.json new file mode 100644 index 0000000000..bb44c9eb94 --- /dev/null +++ b/keyboards/handwired/pill60/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "Pill60", + "url": "https://github.com/IktaS/Pill60", + "maintainer": "IktaS ", + "width": 15, + "height": 5, + "layouts": { + "layout_default": { + "layout": [ + {"label": "Encoder", "x": 0, "y": 0}, + + {"label": "Esc", "x": 0, "y": 1}, + {"label": "1","x": 1, "y": 1}, + {"label": "2","x": 2, "y": 1}, + {"label": "3","x": 3, "y": 1}, + {"label": "4","x": 4, "y": 1}, + {"label": "5","x": 5, "y": 1}, + {"label": "6","x": 6, "y": 1}, + {"label": "7","x": 7, "y": 1}, + {"label": "8","x": 8, "y": 1}, + {"label": "9","x": 9, "y": 1}, + {"label": "0","x": 10, "y": 1}, + {"label": "-","x": 11, "y": 1}, + {"label": "=","x": 12, "y": 1}, + {"label": "Backspace","x": 13, "y": 1}, + {"label": "Delete","x": 14, "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": "Caps","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": "L 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": "R Shift","x": 12.25, "y": 4, "w": 1.75}, + {"label": "FN","x": 14, "y": 4}, + + {"label": "L CTRL","x": 0, "y": 5, "w": 1.25}, + {"label": "L GUI","x": 1.25, "y": 5, "w": 1.25}, + {"label": "L ALT","x": 2.5, "y": 5, "w": 1.25}, + {"label": "Space","x": 3.75, "y": 5, "w": 6.25}, + {"label": "R ALT","x": 10, "y": 5, "w": 1.25}, + {"label": "R GUI","x": 11.25, "y": 5, "w": 1.25}, + {"label": "R MENU","x": 12.5, "y": 5, "w": 1.25}, + {"label": "R CTRL","x": 13.75, "y": 5, "w": 1.25} + ] + } + } +} diff --git a/keyboards/handwired/pill60/keymaps/default/keymap.c b/keyboards/handwired/pill60/keymaps/default/keymap.c new file mode 100644 index 0000000000..6edcb0c2c8 --- /dev/null +++ b/keyboards/handwired/pill60/keymaps/default/keymap.c @@ -0,0 +1,87 @@ + /* Copyright 2020 Imam Rafii + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 { + _BL, + _FL +}; + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT( + KC_F1, + 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_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_RSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(_FL), + MO(_FL), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL + ), + [_FL] = LAYOUT( + KC_TRNS, + 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, KC_INS, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, + KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, + KC_TRNS, KC_HOME, XXXXXXX, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, XXXXXXX, KC_END, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + +#ifdef OLED_DRIVER_ENABLE + +static void render_oled(void) { + oled_write_P(PSTR("Ikta's Pill60"), false); + oled_write_P(PSTR("\n\n"), false); + led_t led_usb_state = host_keyboard_led_state(); + oled_write_ln_P(PSTR("CPSLK"), led_usb_state.caps_lock); + oled_write_P(PSTR(" "), false); + switch (get_highest_layer(layer_state)) { + case _BL: + oled_write_P(PSTR("Base"), false); + break; + case _FL: + oled_write_P(PSTR("Function"), false); + break; + default: + oled_write_ln_P(PSTR("Base"), false); + } + oled_write_P(PSTR(" "), false); +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return rotation; +} + +void oled_task_user(void) { + render_oled(); +} + +#endif + +#ifdef ENCODER_ENABLE + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_A); + } else { + tap_code(KC_B); + } + } +} + +#endif diff --git a/keyboards/handwired/pill60/keymaps/default/readme.md b/keyboards/handwired/pill60/keymaps/default/readme.md new file mode 100644 index 0000000000..b1c3f1d79f --- /dev/null +++ b/keyboards/handwired/pill60/keymaps/default/readme.md @@ -0,0 +1,6 @@ +![Pill60 Layout Image](https://i.imgur.com/LIW18XJ.png) + +# Default Pill 60 Layout + +This is the default layout that comes flashed on every 60% board. For the most +part it's a straightforward and easy to follow layout. Except the backspace is split, and right shift is split. \ No newline at end of file diff --git a/keyboards/handwired/pill60/pill60.c b/keyboards/handwired/pill60/pill60.c new file mode 100644 index 0000000000..928685a92c --- /dev/null +++ b/keyboards/handwired/pill60/pill60.c @@ -0,0 +1,16 @@ + /* Copyright 2020 Imam Rafii + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "pill60.h" \ No newline at end of file diff --git a/keyboards/handwired/pill60/pill60.h b/keyboards/handwired/pill60/pill60.h new file mode 100644 index 0000000000..e020f1eb75 --- /dev/null +++ b/keyboards/handwired/pill60/pill60.h @@ -0,0 +1,42 @@ + /* Copyright 2020 Imam Rafii + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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" + +/* LAYOUT + ENCODER + ESC| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |BCKS | DEL + TAB| Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ + CAP| A | S | D | F | G | H | J | K | L | ; | ' | ENTER + LSHFT| Z | X | C | V | B | N | M | , | . | / | RSHIF | FN + LCT| WIN| ALT| ESPACE | ALT| WIN | MN| RCT| +*/ + +#define LAYOUT( \ + e00, \ + 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, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, \ + k40, k41, k42, k47, k4a, k4b, k4c, k4e \ +) { \ + { 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, k0e }, \ + { k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, KC_NO }, \ + { k40, k41, k42, e00, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, k4a, k4b, k4c, k4e }\ +} diff --git a/keyboards/handwired/pill60/readme.md b/keyboards/handwired/pill60/readme.md new file mode 100644 index 0000000000..3d1d142e79 --- /dev/null +++ b/keyboards/handwired/pill60/readme.md @@ -0,0 +1,25 @@ +# Pill60 + +![Pill60](https://i.imgur.com/7WmHa6ml.png) + +A 60% open source keyboard with rotary encoder, OLED screen, and Hotswap socket, using STM32F103 / Blue Pill. + +* Keyboard Maintainer: [Ikta](https://github.com/IktaS)#8871 (Discord) +* Hardware Supported: Pill60 PCB, STM32F103C8T6 +* Hardware Availability: [github](https://github.com/IktaS/Pill60) + +Step by step guide on how to install a bootloader if your bluepill don't have one : +1. Download [this bootloader]( https://github.com/rogerclarkmelbourne/STM32duino-bootloader/blob/master/bootloader_only_binaries/generic_boot20_pc13_fastboot.bin) +2. Flash Using FTDI Serial to USB converter or an ST-Link, as in [this](https://www.youtube.com/watch?v=Myon8H111PQ) video, but replacing the bootloader file +3. Put Boot 1 to 1, then reset the board, if you're using the same bootloader, the LED should blink +4. Flash your .bin file using dfu-util +5. Put Boot 1 back to 0, then reset again + +Building Guide : +- Use `qmk compile -kb handwired/pill60 -km default` to compile default keymap and using STM32F103 as an MCU +- Use `qmk compile -kb handwired/pill60/blackpill_f401 -km default` to compile default keymap and using STM32F401 as an MCU +- Use `qmk compile -kb handwired/pill60/blackpill_f411 -km default` to compile default keymap and using STM32F411 as an MCU + +## Warning: currently tested MCU is STM32F103, I am still waiting for f401 and f411 to arrive + +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/pill60/rules.mk b/keyboards/handwired/pill60/rules.mk new file mode 100644 index 0000000000..7658a814d6 --- /dev/null +++ b/keyboards/handwired/pill60/rules.mk @@ -0,0 +1,21 @@ +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # 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 +# 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 = yes # Enable keyboard backlight functionality +BACKLIGHT_DRIVER = software +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +OLED_DRIVER_ENABLE = yes +ENCODER_ENABLE = yes + +DEFAULT_FOLDER = handwired/pill60/bluepill From cfc9a358c584e65782b2dade05d31700719a18e7 Mon Sep 17 00:00:00 2001 From: jvbroek <70871975+jvbroek@users.noreply.github.com> Date: Sun, 15 Nov 2020 17:43:20 -0700 Subject: [PATCH 068/114] [Keyboard] Add "Uno" (#10579) * Add all files * Update keyboards/uno/config.h Co-authored-by: Joel Challis * Update keyboards/uno/config.h Co-authored-by: Joel Challis * Update keyboards/uno/rules.mk Co-authored-by: Joel Challis * Update keyboards/uno/keymaps/default/keymap.c Co-authored-by: Joel Challis * Update keyboards/uno/keymaps/default/keymap.c Co-authored-by: Joel Challis * Update keyboards/uno/info.json Co-authored-by: Ryan * Update keyboards/uno/readme.md Co-authored-by: Ryan * Update readme.md Co-authored-by: Joshua Broekhuijsen Co-authored-by: Joel Challis Co-authored-by: Ryan --- keyboards/uno/config.h | 69 ++++++++++++++++ keyboards/uno/info.json | 13 +++ keyboards/uno/keymaps/default/keymap.c | 102 ++++++++++++++++++++++++ keyboards/uno/keymaps/default/readme.md | 4 + keyboards/uno/readme.md | 19 +++++ keyboards/uno/rules.mk | 22 +++++ keyboards/uno/uno.c | 17 ++++ keyboards/uno/uno.h | 24 ++++++ 8 files changed, 270 insertions(+) create mode 100644 keyboards/uno/config.h create mode 100644 keyboards/uno/info.json create mode 100644 keyboards/uno/keymaps/default/keymap.c create mode 100644 keyboards/uno/keymaps/default/readme.md create mode 100644 keyboards/uno/readme.md create mode 100644 keyboards/uno/rules.mk create mode 100644 keyboards/uno/uno.c create mode 100644 keyboards/uno/uno.h diff --git a/keyboards/uno/config.h b/keyboards/uno/config.h new file mode 100644 index 0000000000..1cae17f50a --- /dev/null +++ b/keyboards/uno/config.h @@ -0,0 +1,69 @@ +/* Copyright 2020 Snipeye + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 0xACC8 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Broekhuijsen +#define PRODUCT Uno + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 1 + +/* Uno default pinout */ +#define DIRECT_PINS { \ + { B6 } \ +} +#define UNUSED_PINS + +#define RGB_DI_PIN F6 +#ifdef RGB_DI_PIN +#define RGBLED_NUM 1 +// #define RGBLIGHT_HUE_STEP 32 +// #define RGBLIGHT_SAT_STEP 32 +// #define RGBLIGHT_VAL_STEP 32 +// #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 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/uno/info.json b/keyboards/uno/info.json new file mode 100644 index 0000000000..3460c25d5d --- /dev/null +++ b/keyboards/uno/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Uno", + "keyboard_folder": "uno", + "url": "https://www.reddit.com/r/mechmarket/comments/gyijm7/gb_uno/", + "maintainer": "Snipeye", + "width": 1, + "height": 1, + "layouts": { + "LAYOUT": { + "layout": [ {"x": 0, "y": 0 }] + } + } + } diff --git a/keyboards/uno/keymaps/default/keymap.c b/keyboards/uno/keymaps/default/keymap.c new file mode 100644 index 0000000000..bb19ea7ddb --- /dev/null +++ b/keyboards/uno/keymaps/default/keymap.c @@ -0,0 +1,102 @@ +/* Copyright 2020 Snipeye + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 uno_keycode +{ + UNO = SAFE_RANGE +}; + +static uint16_t pressTimer = 0xFFFF; +#define CUSTOM_LONGPRESS 150 +#define CUSTOM_LONGERPRESS 750 +#define CUSTOM_STRING "I can put a whole buncha text in here and type it all with a single keypress." +#define RESET_LENGTH 3000 +const uint8_t PROGMEM RGBLED_RAINBOW_MOOD_INTERVALS[] = { 10, 25, 50 }; + +char stringToSend[2] = "a"; +char maxLetter = 'z'; + +uint8_t presetCounter = 0; + +#define COUNTER X_A + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + UNO + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case UNO: + if (record->event.pressed) { + pressTimer = timer_read(); + } else { + uint16_t timeElapsed = timer_elapsed(pressTimer); + switch (presetCounter) { + case 0: + SEND_STRING(SS_LCMD("n")); + break; + case 1: + SEND_STRING("Hello!"); + break; + case 2: + SEND_STRING(SS_TAP(X_ENTER)SS_TAP(X_ENTER)"I am uno!"); + break; + case 3: + SEND_STRING(SS_TAP(X_ENTER)SS_TAP(X_ENTER)"I can do all sorts of useless things!"); + break; + case 4: + SEND_STRING(SS_TAP(X_ENTER)SS_TAP(X_ENTER)"And I have a built-in RGB LED!"SS_TAP(X_ENTER)SS_TAP(X_ENTER)SS_TAP(X_ENTER)); + rgblight_sethsv_noeeprom(255, 255, 255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_MOOD); + break; + default: + if (timeElapsed < CUSTOM_LONGPRESS) { + // Normal press. We're going to send the current letter and increment the counter. + SEND_STRING(SS_TAP(X_BSPACE)); + send_string(stringToSend); + stringToSend[0]++; + if (stringToSend[0] > maxLetter) { + stringToSend[0] = 'a'; + } + } else if (timeElapsed < CUSTOM_LONGERPRESS) { + // Long press, confirm the current letter, reset counter + stringToSend[0] = 'a'; + send_string(stringToSend); + } else if (timeElapsed < RESET_LENGTH) { + // Longer press, display macro. + SEND_STRING(CUSTOM_STRING); + } else { + reset_keyboard(); + } + presetCounter--; + break; + } + presetCounter++; + } + break; + } + return false; +} + +void keyboard_post_init_user(void) { + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom(0, 0, 0); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); +} diff --git a/keyboards/uno/keymaps/default/readme.md b/keyboards/uno/keymaps/default/readme.md new file mode 100644 index 0000000000..53b762f878 --- /dev/null +++ b/keyboards/uno/keymaps/default/readme.md @@ -0,0 +1,4 @@ +# The default keymap for uno +![Keymap](https://i.imgur.com/lCPZZpO.png) + +The 'Macro' key does a few things: If you open up textedit (was made for a mac), it sends "Command+n" for the first press to make a new document. It then types a few different messages, activates the RGB LED, and finally ends in a "scroll through the alphabet with a long press to confirm a certain character" keyboard mode. diff --git a/keyboards/uno/readme.md b/keyboards/uno/readme.md new file mode 100644 index 0000000000..ce4cccd196 --- /dev/null +++ b/keyboards/uno/readme.md @@ -0,0 +1,19 @@ +# uno + + ![uno](https://i.imgur.com/OqPyWbbl.jpg) + +A 1-key, in-USB "board" for the lulz + + * Keyboard Maintainer: [Snipeye](https://github.com/Snipeye) + * Hardware Supported: uno pcb + * Hardware Availability: [GB](https://www.reddit.com/r/mechmarket/comments/gyijm7/gb_uno/) + + Make example for this keyboard (after setting up your build environment): + + make uno:default + + Flashing example for this keyboard: + + make uno:default:flash + + 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/uno/rules.mk b/keyboards/uno/rules.mk new file mode 100644 index 0000000000..d23e955126 --- /dev/null +++ b/keyboards/uno/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/uno/uno.c b/keyboards/uno/uno.c new file mode 100644 index 0000000000..5ffb28865b --- /dev/null +++ b/keyboards/uno/uno.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Snipeye + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "uno.h" diff --git a/keyboards/uno/uno.h b/keyboards/uno/uno.h new file mode 100644 index 0000000000..91d48d2ad5 --- /dev/null +++ b/keyboards/uno/uno.h @@ -0,0 +1,24 @@ +/* Copyright 2020 Snipeye + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 \ +) { \ + { K00 } \ +} From 94e94ffb5bbe61b5da4aad205016923746010b23 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 16 Nov 2020 03:16:42 +0000 Subject: [PATCH 069/114] Recommend use of LED Indicator config (#10895) * Recommend use of LED Indicator config * Recommend use of LED Indicator config - update link * Update quantum/template/ps2avrgb/config.h Co-authored-by: Ryan Co-authored-by: Ryan --- docs/pr_checklist.md | 1 + quantum/template/avr/config.h | 6 ++++++ quantum/template/ps2avrgb/config.h | 6 +++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/pr_checklist.md b/docs/pr_checklist.md index 22e8a3fe1a..e0dd0770cb 100644 --- a/docs/pr_checklist.md +++ b/docs/pr_checklist.md @@ -73,6 +73,7 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard - commented-out functions removed too - `matrix_init_board()` etc. migrated to `keyboard_pre_init_kb()`, see: [keyboard_pre_init*](https://docs.qmk.fm/#/custom_quantum_functions?id=keyboard_pre_init_-function-documentation) - prefer `CUSTOM_MATRIX = lite` if custom matrix used, allows for standard debounce, see [custom matrix 'lite'](https://docs.qmk.fm/#/custom_matrix?id=lite) + - prefer LED indicator [Configuration Options](https://docs.qmk.fm/#/feature_led_indicators?id=configuration-options) to custom `led_update_*()` implementations where possible - `keyboard.h` - `#include "quantum.h"` appears at the top - `LAYOUT` macros should use standard definitions if applicable diff --git a/quantum/template/avr/config.h b/quantum/template/avr/config.h index 5f0bc73633..4192bbcfa2 100644 --- a/quantum/template/avr/config.h +++ b/quantum/template/avr/config.h @@ -52,6 +52,12 @@ along with this program. If not, see . */ #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +//#define LED_NUM_LOCK_PIN B0 +//#define LED_CAPS_LOCK_PIN B1 +//#define LED_SCROLL_LOCK_PIN B2 +//#define LED_COMPOSE_PIN B3 +//#define LED_KANA_PIN B4 + //#define BACKLIGHT_PIN B7 //#define BACKLIGHT_LEVELS 3 //#define BACKLIGHT_BREATHING diff --git a/quantum/template/ps2avrgb/config.h b/quantum/template/ps2avrgb/config.h index ef065c0f10..6150bcce6d 100644 --- a/quantum/template/ps2avrgb/config.h +++ b/quantum/template/ps2avrgb/config.h @@ -47,8 +47,12 @@ along with this program. If not, see . /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW +//#define LED_NUM_LOCK_PIN D0 +//#define LED_CAPS_LOCK_PIN D1 +//#define LED_SCROLL_LOCK_PIN D6 + #define BACKLIGHT_PIN D4 -#define BACKLIGHT_LEVELS 3 +//#define BACKLIGHT_LEVELS 3 //#define BACKLIGHT_BREATHING #define RGBLED_NUM 16 From b337ba798e23876870f8daf415bc929c0b5382fa Mon Sep 17 00:00:00 2001 From: Erovia Date: Mon, 16 Nov 2020 21:09:32 +0000 Subject: [PATCH 070/114] CLI: Udev related fixes and improvements (#10736) --- lib/python/qmk/cli/doctor.py | 187 ++++++++++++---------- lib/python/qmk/tests/test_cli_commands.py | 24 +-- util/udev/50-qmk.rules | 46 +++--- 3 files changed, 141 insertions(+), 116 deletions(-) diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index caa98a71c2..a5eda555f0 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -7,6 +7,7 @@ import re import shutil import subprocess from pathlib import Path +from enum import Enum from milc import cli from qmk import submodules @@ -14,6 +15,13 @@ from qmk.constants import QMK_FIRMWARE from qmk.questions import yesno from qmk.commands import run + +class CheckStatus(Enum): + OK = 1 + WARNING = 2 + ERROR = 3 + + ESSENTIAL_BINARIES = { 'dfu-programmer': {}, 'avrdude': {}, @@ -33,9 +41,12 @@ def _udev_rule(vid, pid=None, *args): """ rule = "" if pid: - rule = 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", ATTRS{idProduct}=="%s", TAG+="uaccess", RUN{builtin}+="uaccess"' % (vid, pid) + rule = 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", ATTRS{idProduct}=="%s", TAG+="uaccess"' % ( + vid, + pid, + ) else: - rule = 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", TAG+="uaccess", RUN{builtin}+="uaccess"' % vid + rule = 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", TAG+="uaccess"' % vid if args: rule = ', '.join([rule, *args]) return rule @@ -69,24 +80,25 @@ def check_arm_gcc_version(): version_number = ESSENTIAL_BINARIES['arm-none-eabi-gcc']['output'].strip() cli.log.info('Found arm-none-eabi-gcc version %s', version_number) - return True # Right now all known arm versions are ok + return CheckStatus.OK # Right now all known arm versions are ok def check_avr_gcc_version(): """Returns True if the avr-gcc version is not known to cause problems. """ + rc = CheckStatus.ERROR if 'output' in ESSENTIAL_BINARIES['avr-gcc']: version_number = ESSENTIAL_BINARIES['avr-gcc']['output'].strip() + cli.log.info('Found avr-gcc version %s', version_number) + rc = CheckStatus.OK + parsed_version = parse_gcc_version(version_number) if parsed_version['major'] > 8: - cli.log.error('We do not recommend avr-gcc newer than 8. Downgrading to 8.x is recommended.') - return False + cli.log.warning('{fg_yellow}We do not recommend avr-gcc newer than 8. Downgrading to 8.x is recommended.') + rc = CheckStatus.WARNING - cli.log.info('Found avr-gcc version %s', version_number) - return True - - return False + return rc def check_avrdude_version(): @@ -95,7 +107,7 @@ def check_avrdude_version(): version_number = last_line.split()[2][:-1] cli.log.info('Found avrdude version %s', version_number) - return True + return CheckStatus.OK def check_dfu_util_version(): @@ -104,7 +116,7 @@ def check_dfu_util_version(): version_number = first_line.split()[1] cli.log.info('Found dfu-util version %s', version_number) - return True + return CheckStatus.OK def check_dfu_programmer_version(): @@ -113,7 +125,7 @@ def check_dfu_programmer_version(): version_number = first_line.split()[1] cli.log.info('Found dfu-programmer version %s', version_number) - return True + return CheckStatus.OK def check_binaries(): @@ -131,58 +143,56 @@ def check_binaries(): def check_submodules(): """Iterates through all submodules to make sure they're cloned and up to date. """ - ok = True - for submodule in submodules.status().values(): if submodule['status'] is None: cli.log.error('Submodule %s has not yet been cloned!', submodule['name']) - ok = False + return CheckStatus.ERROR elif not submodule['status']: - cli.log.error('Submodule %s is not up to date!', submodule['name']) - ok = False + cli.log.warning('Submodule %s is not up to date!', submodule['name']) + return CheckStatus.WARNING - return ok + return CheckStatus.OK def check_udev_rules(): """Make sure the udev rules look good. """ - ok = True + rc = CheckStatus.OK udev_dir = Path("/etc/udev/rules.d/") desired_rules = { 'atmel-dfu': { - _udev_rule("03EB", "2FEF"), # ATmega16U2 - _udev_rule("03EB", "2FF0"), # ATmega32U2 - _udev_rule("03EB", "2FF3"), # ATmega16U4 - _udev_rule("03EB", "2FF4"), # ATmega32U4 - _udev_rule("03EB", "2FF9"), # AT90USB64 - _udev_rule("03EB", "2FFB") # AT90USB128 + _udev_rule("03eb", "2fef"), # ATmega16U2 + _udev_rule("03eb", "2ff0"), # ATmega32U2 + _udev_rule("03eb", "2ff3"), # ATmega16U4 + _udev_rule("03eb", "2ff4"), # ATmega32U4 + _udev_rule("03eb", "2ff9"), # AT90USB64 + _udev_rule("03eb", "2ffb") # AT90USB128 }, - 'kiibohd': {_udev_rule("1C11", "B007")}, + 'kiibohd': {_udev_rule("1c11", "b007")}, 'stm32': { - _udev_rule("1EAF", "0003"), # STM32duino - _udev_rule("0483", "DF11") # STM32 DFU + _udev_rule("1eaf", "0003"), # STM32duino + _udev_rule("0483", "df11") # STM32 DFU }, - 'bootloadhid': {_udev_rule("16C0", "05DF")}, - 'usbasploader': {_udev_rule("16C0", "05DC")}, - 'massdrop': {_udev_rule("03EB", "6124", 'ENV{ID_MM_DEVICE_IGNORE}="1"')}, + 'bootloadhid': {_udev_rule("16c0", "05df")}, + 'usbasploader': {_udev_rule("16c0", "05dc")}, + 'massdrop': {_udev_rule("03eb", "6124", 'ENV{ID_MM_DEVICE_IGNORE}="1"')}, 'caterina': { # Spark Fun Electronics - _udev_rule("1B4F", "9203", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Pro Micro 3V3/8MHz - _udev_rule("1B4F", "9205", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Pro Micro 5V/16MHz - _udev_rule("1B4F", "9207", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # LilyPad 3V3/8MHz (and some Pro Micro clones) - # Pololu Electronics - _udev_rule("1FFB", "0101", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # A-Star 32U4 + _udev_rule("1b4f", "9203", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Pro Micro 3V3/8MHz + _udev_rule("1b4f", "9205", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Pro Micro 5V/16MHz + _udev_rule("1b4f", "9207", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # LilyPad 3V3/8MHz (and some Pro Micro clones) + # Pololu EleCTRONICS + _udev_rule("1ffb", "0101", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # A-Star 32U4 # Arduino SA _udev_rule("2341", "0036", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Leonardo _udev_rule("2341", "0037", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Micro - # Adafruit Industries LLC - _udev_rule("239A", "000C", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Feather 32U4 - _udev_rule("239A", "000D", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # ItsyBitsy 32U4 3V3/8MHz - _udev_rule("239A", "000E", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # ItsyBitsy 32U4 5V/16MHz - # dog hunter AG - _udev_rule("2A03", "0036", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Leonardo - _udev_rule("2A03", "0037", 'ENV{ID_MM_DEVICE_IGNORE}="1"') # Micro + # Adafruit INDUSTRIES llC + _udev_rule("239a", "000c", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Feather 32U4 + _udev_rule("239a", "000d", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # ItsyBitsy 32U4 3V3/8MHz + _udev_rule("239a", "000e", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # ItsyBitsy 32U4 5V/16MHz + # dog hunter ag + _udev_rule("2a03", "0036", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Leonardo + _udev_rule("2a03", "0037", 'ENV{ID_MM_DEVICE_IGNORE}="1"') # Micro } } @@ -209,31 +219,43 @@ def check_udev_rules(): # Check if the desired rules are among the currently present rules for bootloader, rules in desired_rules.items(): - # For caterina, check if ModemManager is running - if bootloader == "caterina": - if check_modem_manager(): - ok = False - cli.log.warn("{bg_yellow}Detected ModemManager without the necessary udev rules. Please either disable it or set the appropriate udev rules if you are using a Pro Micro.") if not rules.issubset(current_rules): deprecated_rule = deprecated_rules.get(bootloader) if deprecated_rule and deprecated_rule.issubset(current_rules): - cli.log.warn("{bg_yellow}Found old, deprecated udev rules for '%s' boards. The new rules on https://docs.qmk.fm/#/faq_build?id=linux-udev-rules offer better security with the same functionality.", bootloader) + cli.log.warning("{fg_yellow}Found old, deprecated udev rules for '%s' boards. The new rules on https://docs.qmk.fm/#/faq_build?id=linux-udev-rules offer better security with the same functionality.", bootloader) else: - cli.log.warn("{bg_yellow}Missing udev rules for '%s' boards. See https://docs.qmk.fm/#/faq_build?id=linux-udev-rules for more details.", bootloader) + # For caterina, check if ModemManager is running + if bootloader == "caterina": + if check_modem_manager(): + rc = CheckStatus.WARNING + cli.log.warning("{fg_yellow}Detected ModemManager without the necessary udev rules. Please either disable it or set the appropriate udev rules if you are using a Pro Micro.") + rc = CheckStatus.WARNING + cli.log.warning("{fg_yellow}Missing or outdated udev rules for '%s' boards. Run 'sudo cp %s/util/udev/50-qmk.rules /etc/udev/rules.d/'.", bootloader, QMK_FIRMWARE) - return ok + else: + cli.log.warning("{fg_yellow}'%s' does not exist. Skipping udev rule checking...", udev_dir) + + return rc + + +def check_systemd(): + """Check if it's a systemd system + """ + return bool(shutil.which("systemctl")) def check_modem_manager(): """Returns True if ModemManager is running. + """ - if shutil.which("systemctl"): + if check_systemd(): mm_check = run(["systemctl", "--quiet", "is-active", "ModemManager.service"], timeout=10) if mm_check.returncode == 0: return True - else: - cli.log.warn("Can't find systemctl to check for ModemManager.") + """(TODO): Add check for non-systemd systems + """ + return False def is_executable(command): @@ -263,12 +285,8 @@ def os_test_linux(): """Run the Linux specific tests. """ cli.log.info("Detected {fg_cyan}Linux.") - ok = True - if not check_udev_rules(): - ok = False - - return ok + return check_udev_rules() def os_test_macos(): @@ -276,7 +294,7 @@ def os_test_macos(): """ cli.log.info("Detected {fg_cyan}macOS.") - return True + return CheckStatus.OK def os_test_windows(): @@ -284,7 +302,7 @@ def os_test_windows(): """ cli.log.info("Detected {fg_cyan}Windows.") - return True + return CheckStatus.OK @cli.argument('-y', '--yes', action='store_true', arg_only=True, help='Answer yes to all questions.') @@ -299,23 +317,20 @@ def doctor(cli): * [ ] Compile a trivial program with each compiler """ cli.log.info('QMK Doctor is checking your environment.') - ok = True + status = CheckStatus.OK # Determine our OS and run platform specific tests platform_id = platform.platform().lower() if 'darwin' in platform_id or 'macos' in platform_id: - if not os_test_macos(): - ok = False + status = os_test_macos() elif 'linux' in platform_id: - if not os_test_linux(): - ok = False + status = os_test_linux() elif 'windows' in platform_id: - if not os_test_windows(): - ok = False + status = os_test_windows() else: - cli.log.error('Unsupported OS detected: %s', platform_id) - ok = False + cli.log.warning('Unsupported OS detected: %s', platform_id) + status = CheckStatus.WARNING cli.log.info('QMK home: {fg_cyan}%s', QMK_FIRMWARE) @@ -330,31 +345,41 @@ def doctor(cli): if bin_ok: cli.log.info('All dependencies are installed.') else: - ok = False + status = CheckStatus.ERROR # Make sure the tools are at the correct version + ver_ok = [] for check in (check_arm_gcc_version, check_avr_gcc_version, check_avrdude_version, check_dfu_util_version, check_dfu_programmer_version): - if not check(): - ok = False + ver_ok.append(check()) + + if CheckStatus.ERROR in ver_ok: + status = CheckStatus.ERROR + elif CheckStatus.WARNING in ver_ok and status == CheckStatus.OK: + status = CheckStatus.WARNING # Check out the QMK submodules sub_ok = check_submodules() - if sub_ok: + if sub_ok == CheckStatus.OK: cli.log.info('Submodules are up to date.') else: if yesno('Would you like to clone the submodules?', default=True): submodules.update() sub_ok = check_submodules() - if not sub_ok: - ok = False + if CheckStatus.ERROR in sub_ok: + status = CheckStatus.ERROR + elif CheckStatus.WARNING in sub_ok and status == CheckStatus.OK: + status = CheckStatus.WARNING # Report a summary of our findings to the user - if ok: + if status == CheckStatus.OK: cli.log.info('{fg_green}QMK is ready to go') + return 0 + elif status == CheckStatus.WARNING: + cli.log.info('{fg_yellow}QMK is ready to go, but minor problems were found') + return 1 else: - cli.log.info('{fg_yellow}Problems detected, please fix these problems before proceeding.') - # FIXME(skullydazed/unclaimed): Link to a document about troubleshooting, or discord or something - - return ok + cli.log.info('{fg_red}Major problems detected, please fix these problems before proceeding.') + cli.log.info('{fg_blue}Check out the FAQ (https://docs.qmk.fm/#/faq_build) or join the QMK Discord (https://discord.gg/Uq7gcHh) for help.') + return 2 diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index df5f047da7..dd0c572a7d 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -13,14 +13,14 @@ def check_subcommand(command, *args): return result -def check_returncode(result, expected=0): +def check_returncode(result, expected=[0]): """Print stdout if `result.returncode` does not match `expected`. """ - if result.returncode != expected: + if result.returncode not in expected: print('`%s` stdout:' % ' '.join(result.args)) print(result.stdout) print('returncode:', result.returncode) - assert result.returncode == expected + assert result.returncode in expected def test_cformat(): @@ -45,7 +45,7 @@ def test_flash(): def test_flash_bootloaders(): result = check_subcommand('flash', '-b') - check_returncode(result, 1) + check_returncode(result, [1]) def test_config(): @@ -62,7 +62,7 @@ def test_kle2json(): def test_doctor(): result = check_subcommand('doctor', '-n') - check_returncode(result) + check_returncode(result, [0, 1]) assert 'QMK Doctor is checking your environment.' in result.stdout assert 'QMK is ready to go' in result.stdout @@ -89,43 +89,43 @@ def test_list_keyboards(): def test_list_keymaps(): result = check_subcommand('list-keymaps', '-kb', 'handwired/onekey/pytest') - check_returncode(result, 0) + check_returncode(result) assert 'default' and 'test' in result.stdout def test_list_keymaps_long(): result = check_subcommand('list-keymaps', '--keyboard', 'handwired/onekey/pytest') - check_returncode(result, 0) + check_returncode(result) assert 'default' and 'test' in result.stdout def test_list_keymaps_kb_only(): result = check_subcommand('list-keymaps', '-kb', 'niu_mini') - check_returncode(result, 0) + check_returncode(result) assert 'default' and 'via' in result.stdout def test_list_keymaps_vendor_kb(): result = check_subcommand('list-keymaps', '-kb', 'ai03/lunar') - check_returncode(result, 0) + check_returncode(result) assert 'default' and 'via' in result.stdout def test_list_keymaps_vendor_kb_rev(): result = check_subcommand('list-keymaps', '-kb', 'kbdfans/kbd67/mkiirgb/v2') - check_returncode(result, 0) + check_returncode(result) assert 'default' and 'via' in result.stdout def test_list_keymaps_no_keyboard_found(): result = check_subcommand('list-keymaps', '-kb', 'asdfghjkl') - check_returncode(result, 1) + check_returncode(result, [1]) assert 'does not exist' in result.stdout def test_json2c(): result = check_subcommand('json2c', 'keyboards/handwired/onekey/keymaps/default_json/keymap.json') - check_returncode(result, 0) + check_returncode(result) assert result.stdout == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\t[0] = LAYOUT_ortho_1x1(KC_A)};\n\n' diff --git a/util/udev/50-qmk.rules b/util/udev/50-qmk.rules index d2abf490d6..70bd7e6e3e 100644 --- a/util/udev/50-qmk.rules +++ b/util/udev/50-qmk.rules @@ -1,60 +1,60 @@ # Atmel DFU ### ATmega16U2 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FEF", TAG+="uaccess", RUN{builtin}+="uaccess" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2fef", TAG+="uaccess" ### ATmega32U2 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF0", TAG+="uaccess", RUN{builtin}+="uaccess" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", TAG+="uaccess" ### ATmega16U4 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF3", TAG+="uaccess", RUN{builtin}+="uaccess" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff3", TAG+="uaccess" ### ATmega32U4 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF4", TAG+="uaccess", RUN{builtin}+="uaccess" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", TAG+="uaccess" ### AT90USB64 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF9", TAG+="uaccess", RUN{builtin}+="uaccess" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff9", TAG+="uaccess" ### AT90USB128 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FFB", TAG+="uaccess", RUN{builtin}+="uaccess" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", TAG+="uaccess" # Input Club -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1C11", ATTRS{idProduct}=="B007", TAG+="uaccess", RUN{builtin}+="uaccess" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", ATTRS{idProduct}=="b007", TAG+="uaccess" # STM32duino -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1EAF", ATTRS{idProduct}=="0003", TAG+="uaccess", RUN{builtin}+="uaccess" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", TAG+="uaccess" # STM32 DFU -SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="DF11", TAG+="uaccess", RUN{builtin}+="uaccess" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess" # BootloadHID -SUBSYSTEMS=="usb", ATTRS{idVendor}=="16C0", ATTRS{idProduct}=="05DF", TAG+="uaccess", RUN{builtin}+="uaccess" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", TAG+="uaccess" # USBAspLoader -SUBSYSTEMS=="usb", ATTRS{idVendor}=="16C0", ATTRS{idProduct}=="05DC", TAG+="uaccess", RUN{builtin}+="uaccess" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", TAG+="uaccess" # ModemManager should ignore the following devices # Atmel SAM-BA (Massdrop) -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="6124", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Caterina (Pro Micro) ## Spark Fun Electronics ### Pro Micro 3V3/8MHz -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9203", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" ### Pro Micro 5V/16MHz -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9205", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9205", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" ### LilyPad 3V3/8MHz (and some Pro Micro clones) -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9207", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9207", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" ## Pololu Electronics ### A-Star 32U4 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1FFB", ATTRS{idProduct}=="0101", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1ffb", ATTRS{idProduct}=="0101", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" ## Arduino SA ### Leonardo -SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" ### Micro -SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0037", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0037", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" ## Adafruit Industries LLC ### Feather 32U4 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000C", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000c", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" ### ItsyBitsy 32U4 3V3/8MHz -SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000D", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000d", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" ### ItsyBitsy 32U4 5V/16MHz -SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000E", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000e", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" ## dog hunter AG ### Leonardo -SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0036", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" ### Micro -SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03", ATTRS{idProduct}=="0037", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0037", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" From aaea5e24b6375078b661c37ff459faafaddfd0f6 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Mon, 16 Nov 2020 13:45:45 -0800 Subject: [PATCH 071/114] [Keyboard] YMDK NP21: correct numpad layout matrix (#10874) I noticed that my KC_PPLS and KC_PENT keys weren't actually doing anything. By looking at the ortho_6x4 layout, I guessed that maybe the pins were incorrect and guessed the proper ones. Now, my numpad is fully functional. --- keyboards/ymdk_np21/ymdk_np21.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/ymdk_np21/ymdk_np21.h b/keyboards/ymdk_np21/ymdk_np21.h index bdc37231ee..7434cf016d 100644 --- a/keyboards/ymdk_np21/ymdk_np21.h +++ b/keyboards/ymdk_np21/ymdk_np21.h @@ -50,15 +50,15 @@ along with this program. If not, see . #define LAYOUT_numpad_6x4( \ k00, k10, k20, k30, \ k01, k11, k21, k31, \ - k02, k12, k22,\ - k03, k13, k23, k33, \ + k02, k12, k22, \ + k03, k13, k23, k32, \ k04, k14, k24, \ - k05, k25, k35 \ + k05, k25, k34 \ ) { \ { k00, k01, k02, k03, k04, k05 }, \ { k10, k11, k12, k13, k14, XXX }, \ { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, XXX, k33, XXX, k35 } \ + { k30, k31, k32, XXX, k34, XXX } \ } #define LAYOUT LAYOUT_ortho_4x6 From e6a13e0b1c543bfe15f8ae94557456c9c1a92556 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Tue, 17 Nov 2020 07:26:44 +0900 Subject: [PATCH 072/114] [Keymap] clean up helix:five_rows keymap (#10866) * Makes the OLED driver used by the helix:five_rows keymap switchable. * use TOP/drivers/oled/oled_driver.c `make HELIX=stdole helix:five_rows` * use helix/local_drivers/ssd1306.c `make HELIX=oled helix:five_rows` * Separated the OLED related code from keymap.c and moved it to oled_display.c. * scan rate without OLED * make HELIX=verbose,dispoff,scan helix/rev2:five_rows use Helix original code text data bss dec hex filename 18880 58 235 19173 4ae5 .build/helix_rev2_five_rows.elf matrix scan frequency: 1590 * make HELIX=verbose,dispoff,scan,sc helix/rev2:five_rows use split_common code text data bss dec hex filename 18554 40 231 18825 4989 .build/helix_rev2_five_rows.elf matrix scan frequency: 1202 * scan rate with helix/local_drivers/ssd1306.c * make HELIX=verbose,dispoff,scan,oled helix/rev2:five_rows use Helix original code text data bss dec hex filename 24048 196 342 24586 600a .build/helix_rev2_five_rows.elf matrix scan frequency: 739 * make HELIX=verbose,dispoff,scan,sc,oled helix/rev2:five_rows use split_common code text data bss dec hex filename 23750 176 338 24264 5ec8 .build/helix_rev2_five_rows.elf matrix scan frequency: 642 * scan rate with drivers/oled/oled_driver.c * make HELIX=verbose,dispoff,scan,stdole helix/rev2:five_rows use Helix original code text data bss dec hex filename 24590 210 798 25598 63fe .build/helix_rev2_five_rows.elf matrix scan frequency: 293 * make HELIX=verbose,dispoff,scan,sc,stdole helix/rev2:five_rows use split_common code text data bss dec hex filename 24290 190 794 25274 62ba .build/helix_rev2_five_rows.elf matrix scan frequency: 277 * clean up helix/rev2/keymaps/five_rows/keymap.c * update five_rows/oled_display.c * update helix/rev2/keymaps/five_rows/keymap.c: remove LAYOUT_kc() * Ported the keymap from helix/rev2:five_rows to helix/rev3_5rows:five_rows. * update five_rows/oled_display.c * add License comment --- .../helix/rev2/keymaps/five_rows/keymap.c | 587 +++++++----------- .../rev2/keymaps/five_rows/layer_number.h | 26 + .../rev2/keymaps/five_rows/oled_display.c | 200 ++++++ .../helix/rev2/keymaps/five_rows/rules.mk | 48 +- .../rev3_5rows/keymaps/five_rows/config.h | 48 ++ .../five_rows/keyboard_post_init_user_scan.c | 7 + .../rev3_5rows/keymaps/five_rows/keymap.c | 468 ++++++++++++++ .../keymaps/five_rows/layer_number.h | 26 + .../keymaps/five_rows/oled_display.c | 200 ++++++ .../rev3_5rows/keymaps/five_rows/rules.mk | 44 ++ 10 files changed, 1293 insertions(+), 361 deletions(-) create mode 100644 keyboards/helix/rev2/keymaps/five_rows/layer_number.h create mode 100644 keyboards/helix/rev2/keymaps/five_rows/oled_display.c create mode 100644 keyboards/helix/rev3_5rows/keymaps/five_rows/config.h create mode 100644 keyboards/helix/rev3_5rows/keymaps/five_rows/keyboard_post_init_user_scan.c create mode 100644 keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c create mode 100644 keyboards/helix/rev3_5rows/keymaps/five_rows/layer_number.h create mode 100644 keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c create mode 100644 keyboards/helix/rev3_5rows/keymaps/five_rows/rules.mk diff --git a/keyboards/helix/rev2/keymaps/five_rows/keymap.c b/keyboards/helix/rev2/keymaps/five_rows/keymap.c index fcc5c4bbef..a2ec108624 100644 --- a/keyboards/helix/rev2/keymaps/five_rows/keymap.c +++ b/keyboards/helix/rev2/keymaps/five_rows/keymap.c @@ -1,199 +1,234 @@ +/* Copyright 2020 mtei + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "util.h" #include "bootloader.h" #ifdef PROTOCOL_LUFA #include "lufa.h" #include "split_util.h" #endif -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#ifdef SSD1306OLED - #include "ssd1306.h" -#endif #ifdef CONSOLE_ENABLE #include #endif +#include "layer_number.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 { - _QWERTY = 0, - _COLEMAK, - _DVORAK, - _EUCALYN, - _KEYPAD, - _AUX, - _KAUX, - _LOWER, - _RAISE, - _PADFUNC, - _ADJUST, -}; - enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, EUCALYN, KEYPAD, - KC_xEISU, - KC_xKANA, - KC_ZERO2, + xEISU, + xKANA, + ZERO2, RGBRST }; +#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) + //Macros #define KC_LOWER MO(_LOWER) -#define KC_RABS LT(_RAISE,KC_BSPC) -#define KC_RAEN LT(_RAISE,KC_ENT) -#define KC_FF12 LT(_PADFUNC,KC_F12) -#define KC_____ _______ -#define KC_XXXX XXXXXXX +#define XXXX XXXXXXX +#define ____ _______ #define KC_ADJ MO(_ADJUST) #define KC_LSMI LSFT(KC_MINS) #define KC_LSEQ LSFT(KC_EQL) #define KC_LSRB LSFT(KC_RBRC) #define KC_LSLB LSFT(KC_LBRC) -#define ___ _______ + +#define _1_2_3_4_5 KC_1, KC_2, KC_3, KC_4, KC_5 +#define _6_7_8_9_0 KC_6, KC_7, KC_8, KC_9, KC_0 +#define L_LOWER2_CAPS_LALT_LGUI_SPC_RABS \ + KC_LOWER, KC_LOWER, KC_CAPS, KC_LALT, KC_LGUI, KC_SPC, LT(_RAISE,KC_BSPC) +#define R_RAEN_SPC_RGUI_RALT_APP_LOWER2 \ + LT(_RAISE,KC_ENT), KC_SPC, KC_RGUI, KC_RALT, KC_APP, KC_LOWER, KC_LOWER + #if MATRIX_ROWS == 10 // HELIX_ROWS == 5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty - * ,-----------------------------------------. ,-----------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BS | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Ctrl | A | S | D | F | G | | H | J | K | L | ; | Ctrl | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | ` | ' | N | M | , | . | / | Shift| - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower | - * `-------------------------------------------------------------------------------------------------' + * ,-----------------------------------. ,-----------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BS | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Ctrl| A | S | D | F | G | | H | J | K | L | ; |Ctrl | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Shift| Z | X | C | V | B | ` | ' | N | M | , | . | / |Shift| + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Lower|Lower|Caps | Alt | GUI |Space| BS |Enter|Space| GUI | Alt |Menu |Lower|Lower| + * `-----------------------------------------------------------------------------------' */ - [_QWERTY] = LAYOUT_kc( \ - ESC, 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, RCTL, \ - LSFT, Z, X, C, V, B, GRV, QUOT, N, M, COMM, DOT, SLSH, RSFT, \ - LOWER, LOWER, CAPS, LALT, LGUI, SPC, RABS, RAEN, SPC, RGUI, RALT, APP,LOWER, LOWER \ - ), +#define _Q_W_E_R_T KC_Q, KC_W, KC_E, KC_R, KC_T +#define _Y_U_I_O_P KC_Y, KC_U, KC_I, KC_O, KC_P +#define _A_S_D_F_G KC_A, KC_S, KC_D, KC_F, KC_G +#define _H_J_K_L_SCLN KC_H, KC_J, KC_K, KC_L, KC_SCLN +#define _Z_X_C_V_B KC_Z, KC_X, KC_C, KC_V, KC_B +#define _N_M_COMM_DOT_SLSH KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH + + [_QWERTY] = LAYOUT_wrapper( \ + KC_ESC, _1_2_3_4_5, _6_7_8_9_0, KC_BSPC, \ + KC_TAB, _Q_W_E_R_T, _Y_U_I_O_P, KC_BSLS, \ + KC_LCTL, _A_S_D_F_G, _H_J_K_L_SCLN, KC_RCTL, \ + KC_LSFT, _Z_X_C_V_B, KC_GRV, KC_QUOT, _N_M_COMM_DOT_SLSH, KC_RSFT, \ + L_LOWER2_CAPS_LALT_LGUI_SPC_RABS, R_RAEN_SPC_RGUI_RALT_APP_LOWER2 \ + ), /* Colemak - * ,-----------------------------------------. ,-----------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Ctrl | A | R | S | T | D | | H | N | E | I | O | Ctrl | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | ` | ' | K | M | , | . | / | Shift| - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower | - * `-------------------------------------------------------------------------------------------------' + * ,-----------------------------------. ,-----------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BS | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Ctrl| A | R | S | T | D | | H | N | E | I | O |Ctrl | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Shift| Z | X | C | V | B | ` | ' | K | M | , | . | / |Shift| + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Lower|Lower|Caps | Alt | GUI |Space| BS |Enter|Space| GUI | Alt |Menu |Lower|Lower| + * `-----------------------------------------------------------------------------------' */ - [_COLEMAK] = LAYOUT_kc( \ - ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC, \ - TAB, Q, W, F, P, G, J, L, U, Y, SCLN, BSLS, \ - LCTL, A, R, S, T, D, H, N, E, I, O, RCTL, \ - LSFT, Z, X, C, V, B, GRV, QUOT, K, M, COMM, DOT, SLSH, RSFT, \ - LOWER, LOWER, CAPS, LALT, LGUI, SPC, RABS, RAEN, SPC, RGUI, RALT, APP,LOWER, LOWER \ - ), +#define _Q_W_F_P_G KC_Q, KC_W, KC_F, KC_P, KC_G +#define _J_L_U_Y_SCLN KC_J, KC_L, KC_U, KC_Y, KC_SCLN +#define _A_R_S_T_D KC_A, KC_R, KC_S, KC_T, KC_D +#define _H_N_E_I_O KC_H, KC_N, KC_E, KC_I, KC_O +#define _Z_X_C_V_B KC_Z, KC_X, KC_C, KC_V, KC_B +#define _K_M_COMM_DOT_SLSH KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH + + [_COLEMAK] = LAYOUT_wrapper( \ + KC_ESC, _1_2_3_4_5, _6_7_8_9_0, KC_BSPC, \ + KC_TAB, _Q_W_F_P_G, _J_L_U_Y_SCLN, KC_BSLS, \ + KC_LCTL, _A_R_S_T_D, _H_N_E_I_O, KC_RCTL, \ + KC_LSFT, _Z_X_C_V_B, KC_GRV, KC_QUOT, _K_M_COMM_DOT_SLSH, KC_RSFT, \ + L_LOWER2_CAPS_LALT_LGUI_SPC_RABS, R_RAEN_SPC_RGUI_RALT_APP_LOWER2 \ + ), /* Dvorak - * ,-----------------------------------------. ,-----------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Tab | ' | , | . | P | Y | | F | G | C | R | L | \ | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Ctrl | A | O | E | U | I | | D | H | T | N | S | Ctrl | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | ` | / | B | M | W | V | Z | Shift| - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower | - * `-------------------------------------------------------------------------------------------------' + * ,-----------------------------------. ,-----------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BS | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Tab | ' | , | . | P | Y | | F | G | C | R | L | \ | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Ctrl| A | O | E | U | I | | D | H | T | N | S |Ctrl | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Shift| ; | Q | J | K | X | ` | / | B | M | W | V | Z |Shift| + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Lower|Lower|Caps | Alt | GUI |Space| BS |Enter|Space| GUI | Alt |Menu |Lower|Lower| + * `-----------------------------------------------------------------------------------' */ - [_DVORAK] = LAYOUT_kc( \ - ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC, \ - TAB, QUOT, COMM, DOT, P, Y, F, G, C, R, L, BSLS, \ - LCTL, A, O, E, U, I, D, H, T, N, S, RCTL, \ - LSFT, SCLN, Q, J, K, X, GRV, SLSH, B, M, W, V, Z, RSFT, \ - LOWER, LOWER, CAPS, LALT, LGUI, SPC, RABS, RAEN, SPC, RGUI, RALT, APP,LOWER, LOWER \ - ), +#define _QUOT_COMM_DOT_P_Y KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y +#define _F_G_C_R_L KC_F, KC_G, KC_C, KC_R, KC_L +#define _A_O_E_U_I KC_A, KC_O, KC_E, KC_U, KC_I +#define _D_H_T_N_S KC_D, KC_H, KC_T, KC_N, KC_S +#define _SCLN_Q_J_K_X KC_SCLN, KC_Q, KC_J, KC_K, KC_X +#define _B_M_W_V_Z KC_B, KC_M, KC_W, KC_V, KC_Z + + [_DVORAK] = LAYOUT_wrapper( \ + KC_ESC, _1_2_3_4_5, _6_7_8_9_0, KC_BSPC, \ + KC_TAB, _QUOT_COMM_DOT_P_Y, _F_G_C_R_L, KC_BSLS, \ + KC_LCTL, _A_O_E_U_I, _D_H_T_N_S, KC_RCTL, \ + KC_LSFT, _SCLN_Q_J_K_X, KC_GRV, KC_SLSH, _B_M_W_V_Z, KC_RSFT, \ + L_LOWER2_CAPS_LALT_LGUI_SPC_RABS, R_RAEN_SPC_RGUI_RALT_APP_LOWER2 \ + ), /* Eucalyn (http://eucalyn.hatenadiary.jp/entry/about-eucalyn-layout) - * ,-----------------------------------------. ,-----------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Tab | Q | W | , | . | ; | | M | R | D | Y | P | \ | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Ctrl | A | O | E | I | U | | G | T | K | S | N | Ctrl | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| Z | X | C | V | F | ` | ' | B | H | J | L | / | Shift| - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower | - * `-------------------------------------------------------------------------------------------------' + * ,-----------------------------------. ,-----------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BS | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Tab | Q | W | , | . | ; | | M | R | D | Y | P | \ | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Ctrl| A | O | E | I | U | | G | T | K | S | N |Ctrl | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Shift| Z | X | C | V | F | ` | ' | B | H | J | L | / |Shift| + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Lower|Lower|Caps | Alt | GUI |Space| BS |Enter|Space| GUI | Alt |Menu |Lower|Lower| + * `-----------------------------------------------------------------------------------' */ - [_EUCALYN] = LAYOUT_kc( \ - ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC, \ - TAB, Q, W, COMM, DOT, SCLN, M, R, D, Y, P, BSLS, \ - LCTL, A, O, E, I, U, G, T, K, S, N, RCTL, \ - LSFT, Z, X, C, V, F, GRV, QUOT, B, H, J, L, SLSH, RSFT, \ - LOWER, LOWER, CAPS, LALT, LGUI, SPC, RABS, RAEN, SPC, RGUI, RALT, APP,LOWER, LOWER \ - ), +#define _Q_W_COMM_DOT_SCLN KC_Q, KC_W, KC_COMM, KC_DOT, KC_SCLN +#define _M_R_D_Y_P KC_M, KC_R, KC_D, KC_Y, KC_P +#define _A_O_E_I_U KC_A, KC_O, KC_E, KC_I, KC_U +#define _G_T_K_S_N KC_G, KC_T, KC_K, KC_S, KC_N +#define _Z_X_C_V_F KC_Z, KC_X, KC_C, KC_V, KC_F +#define _B_H_J_L_SLSH KC_B, KC_H, KC_J, KC_L, KC_SLSH + + [_EUCALYN] = LAYOUT_wrapper( \ + KC_ESC, _1_2_3_4_5, _6_7_8_9_0, KC_BSPC, \ + KC_TAB, _Q_W_COMM_DOT_SCLN, _M_R_D_Y_P, KC_BSLS, \ + KC_LCTL, _A_O_E_I_U, _G_T_K_S_N, KC_RCTL, \ + KC_LSFT, _Z_X_C_V_F, KC_GRV, KC_QUOT, _B_H_J_L_SLSH, KC_RSFT, \ + L_LOWER2_CAPS_LALT_LGUI_SPC_RABS, R_RAEN_SPC_RGUI_RALT_APP_LOWER2 \ + ), /* Keypad - * ,-----------------------------------------. ,-----------------------------------------. - * | Tab | / | * | Del | F1 | F6 | | F1 | F6 | Del | Tab | / | * | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | 7 | 8 | 9 | BS | F2 | F7 | | F2 | F7 | BS | 7 | 8 | 9 | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | 4 | 5 | 6 | - | F3 | F8 | | F3 | F8 | - | 4 | 5 | 6 | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | 1 | 2 | 3 | + | F4 | F9 | F11 | F11 | F4 | F9 | + | 1 | 2 | 3 | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | 0 | , | . | Enter| F5 | F10 | F12 | F12 | F5 | F10 | Enter| 0 | , | . | - * `-------------------------------------------------------------------------------------------------' + * ,-----------------------------------. ,-----------------------------------. + * | Tab | / | * | Del | F1 | F6 | | F1 | F6 | Del | Tab | / | * | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | 7 | 8 | 9 | BS | F2 | F7 | | F2 | F7 | BS | 7 | 8 | 9 | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | 4 | 5 | 6 | - | F3 | F8 | | F3 | F8 | - | 4 | 5 | 6 | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | 1 | 2 | 3 | + | F4 | F9 | F11 | F11 | F4 | F9 | + | 1 | 2 | 3 | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | 0 | , | . |Enter| F5 | F10| F12 | F12 | F5 | F10|Enter| 0 | , | . | + * `-----------------------------------------------------------------------------------' */ - [_KEYPAD] = LAYOUT_kc( \ - TAB, PSLS, PAST, DEL, F1, F6, F1, F6, DEL, TAB, PSLS, PAST, \ - KP_7, KP_8, KP_9, BSPC, F2, F7, F2, F7, BSPC, KP_7, KP_8, KP_9, \ - KP_4, KP_5, KP_6, PMNS, F3, F8, F3, F8, PMNS, KP_4, KP_5, KP_6, \ - KP_1, KP_2, KP_3, PPLS, F4, F9, F11, F11, F4, F9, PPLS, KP_1, KP_2, KP_3, \ - KP_0, COMM, PDOT, PENT, F5, F10, FF12, FF12, F5, F10, PENT, KP_0, COMM, PDOT \ - ), +#define KP_TOP KC_TAB, KC_PSLS, KC_PAST +#define KP_789 KC_KP_7, KC_KP_8, KC_KP_9 +#define KP_456 KC_KP_4, KC_KP_5, KC_KP_6 +#define KP_123 KC_KP_1, KC_KP_2, KC_KP_3 +#define KP_BTM KC_KP_0, KC_COMM, KC_PDOT +#define F_1_6 KC_F1, KC_F6 +#define F_2_7 KC_F2, KC_F7 +#define F_3_8 KC_F3, KC_F8 +#define F_4_9 KC_F4, KC_F9 +#define F_510 KC_F5, KC_F10 +#define FF12 LT(_PADFUNC,KC_F12) + + [_KEYPAD] = LAYOUT_wrapper( \ + KP_TOP, KC_DEL, F_1_6, F_1_6, KC_DEL, KP_TOP, \ + KP_789, KC_BSPC, F_2_7, F_2_7, KC_BSPC, KP_789, \ + KP_456, KC_PMNS, F_3_8, F_3_8, KC_PMNS, KP_456, \ + KP_123, KC_PPLS, F_4_9, KC_F11, KC_F11, F_4_9, KC_PPLS, KP_123, \ + KP_BTM, KC_PENT, F_510, FF12, FF12, F_510, KC_PENT, KP_BTM \ + ), /* AUX modifier key layer - * ,-----------------------------------------. ,-----------------------------------------. - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | 00 | | | | | | | | | | | 00 | | - * `-------------------------------------------------------------------------------------------------' + * ,-----------------------------------. ,-----------------------------------. + * | | | | | | | | | | | | | | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | | | | | | | | | | | | | | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | | | | | | | | | | | | | | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | | | | | | | | | | | | | | | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | | 00 | | | | | | | | | | | 00 | | + * `-----------------------------------------------------------------------------------' */ - [_KAUX] = LAYOUT_kc( \ + [_KAUX] = LAYOUT( \ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ - ____,ZERO2, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ZERO2,____ \ + ____,ZERO2, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,ZERO2, ____ \ ), /* Keypad function layer @@ -209,12 +244,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | | | * `-------------------------------------------------------------------------------------------------' */ - [_PADFUNC] = LAYOUT_kc( \ - XXXX, XXXX, XXXX, PAUS, SLCK, PSCR, PSCR, SLCK, PAUS, XXXX, XXXX, XXXX, \ - XXXX, XXXX, XXXX, HOME, UP, PGUP, PGUP, UP, HOME, XXXX, XXXX, XXXX, \ - XXXX, DEL, INS, LEFT, DOWN, RGHT, LEFT, DOWN, RGHT, INS, DEL, XXXX, \ - XXXX, XXXX, XXXX, END, XXXX, PGDN, ADJ, ADJ, PGDN, XXXX, END, XXXX, XXXX, XXXX, \ - XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, ____, ____, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX \ +#define _PAUS_SLCK_PSCR KC_PAUS, KC_SLCK, KC_PSCR +#define _PSCR_SLCK_PAUS KC_PSCR, KC_SLCK, KC_PAUS +#define _HOME_UP_PGUP KC_HOME, KC_UP, KC_PGUP +#define _PGUP_UP_HOME KC_PGUP, KC_UP, KC_HOME +#define _DEL_INS_LEFT_DOWN_RGHT KC_DEL, KC_INS, KC_LEFT, KC_DOWN, KC_RGHT +#define _LEFT_DOWN_RGHT_INS_DEL KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_DEL +#define _PGDN_ADJ_ADJ_PGDN KC_PGDN, KC_ADJ, KC_ADJ, KC_PGDN + + [_PADFUNC] = LAYOUT_wrapper( \ + XXXX, XXXX, XXXX, _PAUS_SLCK_PSCR, _PSCR_SLCK_PAUS, XXXX, XXXX, XXXX, \ + XXXX, XXXX, XXXX, _HOME_UP_PGUP, _PGUP_UP_HOME, XXXX, XXXX, XXXX, \ + XXXX, _DEL_INS_LEFT_DOWN_RGHT, _LEFT_DOWN_RGHT_INS_DEL, XXXX, \ + XXXX, XXXX, XXXX, KC_END, XXXX, _PGDN_ADJ_ADJ_PGDN, XXXX, KC_END, XXXX, XXXX, XXXX, \ + XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, ____, ____, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX \ ), /* Lower @@ -230,12 +273,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | PrtSc| | | | | | | | | PrtSc| | | * `-------------------------------------------------------------------------------------------------' */ - [_LOWER] = LAYOUT_kc( \ - XXXX, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, \ - XXXX, XXXX, PAUS, SLCK, INS, XXXX, XXXX, INS, SLCK, PAUS, XXXX, F12, \ - ____, HOME, XXXX, UP, DEL, PGUP, PGUP, DEL, UP, XXXX, HOME, ____, \ - ____, END, LEFT, DOWN, RGHT, PGDN, XXXX, XXXX, PGDN, LEFT, DOWN, RGHT, END, ____, \ - ____, ____, PSCR, ____, ____, ____, ADJ, ADJ, ____, ____, ____, PSCR, ____, ____ \ +#define _F1_F2_F3_F4_F5 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 +#define _F6_F7_F8_F9_F10_F11 KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 +#define _PAUS_SLCK_INS KC_PAUS, KC_SLCK, KC_INS +#define _INS_SLCK_PAUS KC_INS, KC_SLCK, KC_PAUS +#define _ADJ_ADJ KC_ADJ, KC_ADJ +#define _UP_DEL_PGUP KC_UP, KC_DEL, KC_PGUP +#define _PGUP_DEL_UP KC_PGUP, KC_DEL, KC_UP +#define _END_LEFT_DOWN_RGHT_PGDN KC_END, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN +#define _PGDN_LEFT_DOWN_RGHT_END KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_END + + [_LOWER] = LAYOUT_wrapper( \ + XXXX, _F1_F2_F3_F4_F5, _F6_F7_F8_F9_F10_F11, \ + XXXX, XXXX, _PAUS_SLCK_INS, XXXX, XXXX, _INS_SLCK_PAUS, XXXX, KC_F12, \ + ____, KC_HOME, XXXX, _UP_DEL_PGUP, _PGUP_DEL_UP, XXXX, KC_HOME, ____, \ + ____, _END_LEFT_DOWN_RGHT_PGDN, XXXX, XXXX, _PGDN_LEFT_DOWN_RGHT_END, ____, \ + ____, ____, KC_PSCR, ____, ____, ____, _ADJ_ADJ, ____, ____, ____, KC_PSCR, ____, ____ \ ), /* Raise @@ -251,12 +304,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | | | * `-------------------------------------------------------------------------------------------------' */ - [_RAISE] = LAYOUT_kc( \ +#define _LSMI_MINS KC_LSMI, KC_MINS +#define _EQL_LSEQ KC_EQL, KC_LSEQ +#define _LSLB_LBRC KC_LSLB, KC_LBRC +#define _RBRC_LSRB KC_RBRC, KC_LSRB +#define _MNXT_VOLD_VOLU_MPLY KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + + [_RAISE] = LAYOUT_wrapper( \ XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, \ - XXXX, XXXX, XXXX, XXXX, LSMI, MINS, EQL, LSEQ, XXXX, XXXX, XXXX, XXXX, \ - ____, XXXX, XXXX, XXXX, LSLB, LBRC, RBRC, LSRB, XXXX, XXXX, XXXX, ____, \ - ____, XXXX, XXXX, XXXX, XXXX,xEISU,xEISU, xKANA,xKANA,MNXT, VOLD, VOLU, MPLY, ____, \ - ADJ, ADJ, XXXX, ____, ____, XXXX, ____, ____, XXXX, ____, ____, XXXX, ADJ, ADJ \ + XXXX, XXXX, XXXX, XXXX, _LSMI_MINS, _EQL_LSEQ, XXXX, XXXX, XXXX, XXXX, \ + ____, XXXX, XXXX, XXXX, _LSLB_LBRC, _RBRC_LSRB, XXXX, XXXX, XXXX, ____, \ + ____, XXXX, XXXX, XXXX, XXXX,xEISU,xEISU, xKANA,xKANA, _MNXT_VOLD_VOLU_MPLY, ____, \ + _ADJ_ADJ, XXXX, ____, ____, XXXX, ____, ____, XXXX, ____, ____, XXXX, _ADJ_ADJ \ ), /* Adjust (Lower + Raise) @@ -276,8 +335,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, KEYPAD, DVORAK, COLEMAK, EUCALYN, QWERTY, QWERTY, EUCALYN, COLEMAK, DVORAK, KEYPAD, XXXXXXX, \ XXXXXXX, RESET, RGBRST, RGB_TOG, AU_ON, AG_SWAP, AG_SWAP, AU_ON, RGB_TOG, RGBRST, XXXXXXX, XXXXXXX, \ RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, AU_OFF, AG_NORM, AG_NORM, AU_OFF, RGB_MOD, RGB_VAI, RGB_SAI, RGB_HUI, \ - RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, ___,___, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_SAD, RGB_HUD, \ - _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ___,___, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______ \ + RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX,____,____,XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_SAD, RGB_HUD, \ + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,____,____,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______ \ ), /* AUX modifier key layer @@ -293,12 +352,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | BS | Enter| | | | | | | | * `-------------------------------------------------------------------------------------------------' */ - [_AUX] = LAYOUT_kc( \ +#define _BSPC_RAEN KC_BSPC, LT(_RAISE,KC_ENT) + [_AUX] = LAYOUT_wrapper( \ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ - ____, ____, ____, ____, ____, BSPC, RAEN, ____, ____, ____, ____, ____, ____, ____ \ + ____, ____, ____, ____, ____, _BSPC_RAEN, ____, ____, ____, ____, ____, ____, ____ \ ) }; @@ -307,28 +367,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #endif -#ifdef AUDIO_ENABLE +int current_default_layer; -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -float tone_plover[][2] = SONG(PLOVER_SOUND); -float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); -float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); -#endif - -static int current_default_layer; - -uint32_t default_layer_state_set_kb(uint32_t state) { - // 1<<_QWERTY - 1 == 1 - 1 == _QWERTY (=0) - // 1<<_COLEMAK - 1 == 2 - 1 == _COLEMAK (=1) - current_default_layer = state - 1; - // 1<<_DVORAK - 2 == 4 - 2 == _DVORAK (=2) - if ( current_default_layer == 3 ) current_default_layer -= 1; - // 1<<_EUCALYN - 5 == 8 - 5 == _EUCALYN (=3) - if ( current_default_layer == 7 ) current_default_layer -= 4; - // 1<<_KEYPAD - 12 == 16 - 12 == _KEYPAD (=4) - if ( current_default_layer == 15 ) current_default_layer -= 11; +uint32_t default_layer_state_set_user(uint32_t state) { + current_default_layer = biton32(state); return state; } @@ -351,56 +393,41 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); - #endif update_base_layer(_QWERTY); } return false; break; case COLEMAK: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_colemak); - #endif update_base_layer(_COLEMAK); } return false; break; case DVORAK: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_dvorak); - #endif update_base_layer(_DVORAK); } return false; break; case EUCALYN: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_dvorak); - #endif update_base_layer(_EUCALYN); } return false; break; case KEYPAD: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_dvorak); - #endif update_base_layer(_KEYPAD); } return false; break; - case KC_ZERO2: + case ZERO2: if (record->event.pressed) { SEND_STRING("00"); } return false; break; - case KC_xEISU: + case xEISU: if (record->event.pressed) { if(keymap_config.swap_lalt_lgui==false){ register_code(KC_LANG2); @@ -412,7 +439,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_xKANA: + case xKANA: if (record->event.pressed) { if(keymap_config.swap_lalt_lgui==false){ register_code(KC_LANG1); @@ -437,161 +464,5 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } void matrix_init_user(void) { - #ifdef AUDIO_ENABLE - startup_user(); - #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 + INIT_HELIX_OLED(); /* define in layer_number.h */ } - - -#ifdef AUDIO_ENABLE - -void startup_user() -{ - _delay_ms(20); // gets rid of tick -} - -void shutdown_user() -{ - _delay_ms(150); - stop_all_notes(); -} - -void music_on_user(void) -{ - music_scale_user(); -} - -void music_scale_user(void) -{ - PLAY_SONG(music_scale); -} - -#endif - - -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED - -void matrix_scan_user(void) { - 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; - } -} - -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); -#ifdef RGBLIGHT_ENABLE - char buf[30]; - if (RGBLIGHT_MODES > 1 && rgblight_config.enable) { - snprintf(buf, sizeof(buf), " LED %2d: %d,%d,%d ", - rgblight_config.mode, - rgblight_config.hue/RGBLIGHT_HUE_STEP, - rgblight_config.sat/RGBLIGHT_SAT_STEP, - rgblight_config.val/RGBLIGHT_VAL_STEP); - matrix_write(matrix, buf); - } -#endif - //matrix_write_P(&matrix, PSTR(" Split keyboard kit")); -} - -static const char Qwerty_name[] PROGMEM = " Qwerty"; -static const char Colemak_name[] PROGMEM = " Colemak"; -static const char Dvorak_name[] PROGMEM = " Dvorak"; -static const char Eucalyn_name[] PROGMEM = " Eucalyn"; -static const char Keypad_name[] PROGMEM = " Keypad"; - -static const char AUX_name[] PROGMEM = ":AUX"; -static const char KAUX_name[] PROGMEM = ":00"; -static const char Padfunc_name[] PROGMEM = ":PadFunc"; -static const char Lower_name[] PROGMEM = ":Func"; -static const char Raise_name[] PROGMEM = ":Extra"; -static const char Adjust_name[] PROGMEM = ":Adjust"; - -static const char *layer_names[] = { - [_QWERTY] = Qwerty_name, - [_COLEMAK] = Colemak_name, - [_DVORAK] = Dvorak_name, - [_EUCALYN]= Eucalyn_name, - [_KEYPAD] = Keypad_name, - [_AUX] = AUX_name, - [_KAUX] = KAUX_name, - [_LOWER] = Lower_name, - [_RAISE] = Raise_name, - [_PADFUNC]= Padfunc_name, - [_ADJUST] = Adjust_name -}; - -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 - int name_num; - uint32_t lstate; - matrix_write_P(matrix, layer_names[current_default_layer]); - matrix_write_P(matrix, PSTR("\n")); - for( lstate = layer_state, name_num = 0; - lstate && name_num < sizeof(layer_names)/sizeof(char *); - lstate >>=1, name_num++ ) { - if( (lstate & 1) != 0 ) { - if( layer_names[name_num] ) { - matrix_write_P(matrix, layer_names[name_num]); - } - } - } - - // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n%s %s %s", - (host_keyboard_leds() & (1<. + */ + +#include QMK_KEYBOARD_H +#include +#ifdef CONSOLE_ENABLE + #include +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif +#include "string.h" +#include "layer_number.h" + +extern int current_default_layer; + +void init_helix_oled(void) { +#ifdef SSD1306OLED + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + iota_gfx_init(!has_usb()); // turns on the display +#endif +} + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#if defined(SSD1306OLED) || defined(OLED_DRIVER_ENABLE) + +# if defined(OLED_DRIVER_ENABLE) +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_keyboard_master()) { + return OLED_ROTATION_0; + } else { + return OLED_ROTATION_180; + } +} +# else +# define oled_write(data,flag) matrix_write(matrix, data) +# define oled_write_P(data,flag) matrix_write_P(matrix, data) +# endif + +# ifdef SSD1306OLED +void matrix_scan_user(void) { + 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; + } +} +# endif + +# ifdef SSD1306OLED +static void render_logo(struct CharacterMatrix *matrix) { +# else +static void render_logo(void) { +# endif + + static const char helix_logo[] PROGMEM = { + 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(helix_logo, false); +# ifdef RGBLIGHT_ENABLE + char buf[30]; + if (RGBLIGHT_MODES > 1 && rgblight_is_enabled()) { + snprintf(buf, sizeof(buf), " LED %2d: %d,%d,%d ", + rgblight_get_mode(), + rgblight_get_hue()/RGBLIGHT_HUE_STEP, + rgblight_get_sat()/RGBLIGHT_SAT_STEP, + rgblight_get_val()/RGBLIGHT_VAL_STEP); + oled_write(buf, false); +# ifndef SSD1306OLED + } else { + oled_write_P( PSTR("\n"), false); +# endif + } +# endif +} + +static const char Qwerty_name[] PROGMEM = " Qwerty"; +static const char Colemak_name[] PROGMEM = " Colemak"; +static const char Dvorak_name[] PROGMEM = " Dvorak"; +static const char Eucalyn_name[] PROGMEM = " Eucalyn"; +static const char Keypad_name[] PROGMEM = " Keypad"; + +static const char AUX_name[] PROGMEM = ":AUX"; +static const char KAUX_name[] PROGMEM = ":00"; +static const char Padfunc_name[] PROGMEM = ":PadFunc"; +static const char Lower_name[] PROGMEM = ":Func"; +static const char Raise_name[] PROGMEM = ":Extra"; +static const char Adjust_name[] PROGMEM = ":Adjust"; + +static const char *layer_names[] = { + [_QWERTY] = Qwerty_name, + [_COLEMAK] = Colemak_name, + [_DVORAK] = Dvorak_name, + [_EUCALYN]= Eucalyn_name, + [_KEYPAD] = Keypad_name, + [_AUX] = AUX_name, + [_KAUX] = KAUX_name, + [_LOWER] = Lower_name, + [_RAISE] = Raise_name, + [_PADFUNC]= Padfunc_name, + [_ADJUST] = Adjust_name +}; + +# ifdef SSD1306OLED +void render_status(struct CharacterMatrix *matrix) { +# else +void render_status(void) { +# endif + + // Render to mode icon + static const char os_logo[][2][3] PROGMEM ={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}}; + if(keymap_config.swap_lalt_lgui==false){ + oled_write_P(os_logo[0][0], false); + oled_write_P(PSTR("\n"), false); + oled_write_P(os_logo[0][1], false); + } else { + oled_write_P(os_logo[1][0], false); + oled_write_P(PSTR("\n"), false); + oled_write_P(os_logo[1][1], 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 + int name_num; + uint32_t lstate; + oled_write_P(layer_names[current_default_layer], false); + oled_write_P(PSTR("\n"), false); + for (lstate = layer_state, name_num = 0; + lstate && name_num < sizeof(layer_names)/sizeof(char *); + lstate >>=1, name_num++) { + if ((lstate & 1) != 0) { + if (layer_names[name_num]) { + oled_write_P(layer_names[name_num], false); + } + } + } + + // Host Keyboard LED Status + char led[40]; + snprintf(led, sizeof(led), "\n%s %s %s", + (host_keyboard_leds() & (1< + else + OPT_DEFS += -DOLED_FONT_H=\"common/glcdfont.c\" + endif +endif +ifeq ($(strip $(OLED_ENABLE)), yes) + SRC += oled_display.c endif # convert Helix-specific options (that represent combinations of standard options) diff --git a/keyboards/helix/rev3_5rows/keymaps/five_rows/config.h b/keyboards/helix/rev3_5rows/keymaps/five_rows/config.h new file mode 100644 index 0000000000..416e8fd7c4 --- /dev/null +++ b/keyboards/helix/rev3_5rows/keymaps/five_rows/config.h @@ -0,0 +1,48 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2020 mtei + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 CONFIG_USER_H +#define CONFIG_USER_H + +#undef TAPPING_TERM +#define TAPPING_TERM 300 +#define PERMISSIVE_HOLD +/* when TAPPING_TERM >= 500 same effect PERMISSIVE_HOLD. + see tmk_core/common/action_tapping.c */ + +// place overrides here + +// If you need more program area, try select and reduce rgblight modes to use. + +// 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 + +#endif /* CONFIG_USER_H */ diff --git a/keyboards/helix/rev3_5rows/keymaps/five_rows/keyboard_post_init_user_scan.c b/keyboards/helix/rev3_5rows/keymaps/five_rows/keyboard_post_init_user_scan.c new file mode 100644 index 0000000000..7c84e1ed8d --- /dev/null +++ b/keyboards/helix/rev3_5rows/keymaps/five_rows/keyboard_post_init_user_scan.c @@ -0,0 +1,7 @@ +#include QMK_KEYBOARD_H + +void keyboard_post_init_user(void) { +#if defined(DEBUG_MATRIX_SCAN_RATE) + debug_enable = true; +#endif +} diff --git a/keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c b/keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c new file mode 100644 index 0000000000..a2ec108624 --- /dev/null +++ b/keyboards/helix/rev3_5rows/keymaps/five_rows/keymap.c @@ -0,0 +1,468 @@ +/* Copyright 2020 mtei + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "util.h" +#include "bootloader.h" +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif +#ifdef CONSOLE_ENABLE + #include +#endif +#include "layer_number.h" + +extern keymap_config_t keymap_config; + +extern uint8_t is_master; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + EUCALYN, + KEYPAD, + xEISU, + xKANA, + ZERO2, + RGBRST +}; + +#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) + +//Macros +#define KC_LOWER MO(_LOWER) +#define XXXX XXXXXXX +#define ____ _______ +#define KC_ADJ MO(_ADJUST) +#define KC_LSMI LSFT(KC_MINS) +#define KC_LSEQ LSFT(KC_EQL) +#define KC_LSRB LSFT(KC_RBRC) +#define KC_LSLB LSFT(KC_LBRC) + +#define _1_2_3_4_5 KC_1, KC_2, KC_3, KC_4, KC_5 +#define _6_7_8_9_0 KC_6, KC_7, KC_8, KC_9, KC_0 +#define L_LOWER2_CAPS_LALT_LGUI_SPC_RABS \ + KC_LOWER, KC_LOWER, KC_CAPS, KC_LALT, KC_LGUI, KC_SPC, LT(_RAISE,KC_BSPC) +#define R_RAEN_SPC_RGUI_RALT_APP_LOWER2 \ + LT(_RAISE,KC_ENT), KC_SPC, KC_RGUI, KC_RALT, KC_APP, KC_LOWER, KC_LOWER + + +#if MATRIX_ROWS == 10 // HELIX_ROWS == 5 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------. ,-----------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BS | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Ctrl| A | S | D | F | G | | H | J | K | L | ; |Ctrl | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Shift| Z | X | C | V | B | ` | ' | N | M | , | . | / |Shift| + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Lower|Lower|Caps | Alt | GUI |Space| BS |Enter|Space| GUI | Alt |Menu |Lower|Lower| + * `-----------------------------------------------------------------------------------' + */ +#define _Q_W_E_R_T KC_Q, KC_W, KC_E, KC_R, KC_T +#define _Y_U_I_O_P KC_Y, KC_U, KC_I, KC_O, KC_P +#define _A_S_D_F_G KC_A, KC_S, KC_D, KC_F, KC_G +#define _H_J_K_L_SCLN KC_H, KC_J, KC_K, KC_L, KC_SCLN +#define _Z_X_C_V_B KC_Z, KC_X, KC_C, KC_V, KC_B +#define _N_M_COMM_DOT_SLSH KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH + + [_QWERTY] = LAYOUT_wrapper( \ + KC_ESC, _1_2_3_4_5, _6_7_8_9_0, KC_BSPC, \ + KC_TAB, _Q_W_E_R_T, _Y_U_I_O_P, KC_BSLS, \ + KC_LCTL, _A_S_D_F_G, _H_J_K_L_SCLN, KC_RCTL, \ + KC_LSFT, _Z_X_C_V_B, KC_GRV, KC_QUOT, _N_M_COMM_DOT_SLSH, KC_RSFT, \ + L_LOWER2_CAPS_LALT_LGUI_SPC_RABS, R_RAEN_SPC_RGUI_RALT_APP_LOWER2 \ + ), + + /* Colemak + * ,-----------------------------------. ,-----------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BS | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Ctrl| A | R | S | T | D | | H | N | E | I | O |Ctrl | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Shift| Z | X | C | V | B | ` | ' | K | M | , | . | / |Shift| + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Lower|Lower|Caps | Alt | GUI |Space| BS |Enter|Space| GUI | Alt |Menu |Lower|Lower| + * `-----------------------------------------------------------------------------------' + */ +#define _Q_W_F_P_G KC_Q, KC_W, KC_F, KC_P, KC_G +#define _J_L_U_Y_SCLN KC_J, KC_L, KC_U, KC_Y, KC_SCLN +#define _A_R_S_T_D KC_A, KC_R, KC_S, KC_T, KC_D +#define _H_N_E_I_O KC_H, KC_N, KC_E, KC_I, KC_O +#define _Z_X_C_V_B KC_Z, KC_X, KC_C, KC_V, KC_B +#define _K_M_COMM_DOT_SLSH KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH + + [_COLEMAK] = LAYOUT_wrapper( \ + KC_ESC, _1_2_3_4_5, _6_7_8_9_0, KC_BSPC, \ + KC_TAB, _Q_W_F_P_G, _J_L_U_Y_SCLN, KC_BSLS, \ + KC_LCTL, _A_R_S_T_D, _H_N_E_I_O, KC_RCTL, \ + KC_LSFT, _Z_X_C_V_B, KC_GRV, KC_QUOT, _K_M_COMM_DOT_SLSH, KC_RSFT, \ + L_LOWER2_CAPS_LALT_LGUI_SPC_RABS, R_RAEN_SPC_RGUI_RALT_APP_LOWER2 \ + ), + + /* Dvorak + * ,-----------------------------------. ,-----------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BS | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Tab | ' | , | . | P | Y | | F | G | C | R | L | \ | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Ctrl| A | O | E | U | I | | D | H | T | N | S |Ctrl | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Shift| ; | Q | J | K | X | ` | / | B | M | W | V | Z |Shift| + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Lower|Lower|Caps | Alt | GUI |Space| BS |Enter|Space| GUI | Alt |Menu |Lower|Lower| + * `-----------------------------------------------------------------------------------' + */ +#define _QUOT_COMM_DOT_P_Y KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y +#define _F_G_C_R_L KC_F, KC_G, KC_C, KC_R, KC_L +#define _A_O_E_U_I KC_A, KC_O, KC_E, KC_U, KC_I +#define _D_H_T_N_S KC_D, KC_H, KC_T, KC_N, KC_S +#define _SCLN_Q_J_K_X KC_SCLN, KC_Q, KC_J, KC_K, KC_X +#define _B_M_W_V_Z KC_B, KC_M, KC_W, KC_V, KC_Z + + [_DVORAK] = LAYOUT_wrapper( \ + KC_ESC, _1_2_3_4_5, _6_7_8_9_0, KC_BSPC, \ + KC_TAB, _QUOT_COMM_DOT_P_Y, _F_G_C_R_L, KC_BSLS, \ + KC_LCTL, _A_O_E_U_I, _D_H_T_N_S, KC_RCTL, \ + KC_LSFT, _SCLN_Q_J_K_X, KC_GRV, KC_SLSH, _B_M_W_V_Z, KC_RSFT, \ + L_LOWER2_CAPS_LALT_LGUI_SPC_RABS, R_RAEN_SPC_RGUI_RALT_APP_LOWER2 \ + ), + + /* Eucalyn (http://eucalyn.hatenadiary.jp/entry/about-eucalyn-layout) + * ,-----------------------------------. ,-----------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BS | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Tab | Q | W | , | . | ; | | M | R | D | Y | P | \ | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | Ctrl| A | O | E | I | U | | G | T | K | S | N |Ctrl | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Shift| Z | X | C | V | F | ` | ' | B | H | J | L | / |Shift| + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * |Lower|Lower|Caps | Alt | GUI |Space| BS |Enter|Space| GUI | Alt |Menu |Lower|Lower| + * `-----------------------------------------------------------------------------------' + */ +#define _Q_W_COMM_DOT_SCLN KC_Q, KC_W, KC_COMM, KC_DOT, KC_SCLN +#define _M_R_D_Y_P KC_M, KC_R, KC_D, KC_Y, KC_P +#define _A_O_E_I_U KC_A, KC_O, KC_E, KC_I, KC_U +#define _G_T_K_S_N KC_G, KC_T, KC_K, KC_S, KC_N +#define _Z_X_C_V_F KC_Z, KC_X, KC_C, KC_V, KC_F +#define _B_H_J_L_SLSH KC_B, KC_H, KC_J, KC_L, KC_SLSH + + [_EUCALYN] = LAYOUT_wrapper( \ + KC_ESC, _1_2_3_4_5, _6_7_8_9_0, KC_BSPC, \ + KC_TAB, _Q_W_COMM_DOT_SCLN, _M_R_D_Y_P, KC_BSLS, \ + KC_LCTL, _A_O_E_I_U, _G_T_K_S_N, KC_RCTL, \ + KC_LSFT, _Z_X_C_V_F, KC_GRV, KC_QUOT, _B_H_J_L_SLSH, KC_RSFT, \ + L_LOWER2_CAPS_LALT_LGUI_SPC_RABS, R_RAEN_SPC_RGUI_RALT_APP_LOWER2 \ + ), + + /* Keypad + * ,-----------------------------------. ,-----------------------------------. + * | Tab | / | * | Del | F1 | F6 | | F1 | F6 | Del | Tab | / | * | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | 7 | 8 | 9 | BS | F2 | F7 | | F2 | F7 | BS | 7 | 8 | 9 | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | 4 | 5 | 6 | - | F3 | F8 | | F3 | F8 | - | 4 | 5 | 6 | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | 1 | 2 | 3 | + | F4 | F9 | F11 | F11 | F4 | F9 | + | 1 | 2 | 3 | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | 0 | , | . |Enter| F5 | F10| F12 | F12 | F5 | F10|Enter| 0 | , | . | + * `-----------------------------------------------------------------------------------' + */ +#define KP_TOP KC_TAB, KC_PSLS, KC_PAST +#define KP_789 KC_KP_7, KC_KP_8, KC_KP_9 +#define KP_456 KC_KP_4, KC_KP_5, KC_KP_6 +#define KP_123 KC_KP_1, KC_KP_2, KC_KP_3 +#define KP_BTM KC_KP_0, KC_COMM, KC_PDOT +#define F_1_6 KC_F1, KC_F6 +#define F_2_7 KC_F2, KC_F7 +#define F_3_8 KC_F3, KC_F8 +#define F_4_9 KC_F4, KC_F9 +#define F_510 KC_F5, KC_F10 +#define FF12 LT(_PADFUNC,KC_F12) + + [_KEYPAD] = LAYOUT_wrapper( \ + KP_TOP, KC_DEL, F_1_6, F_1_6, KC_DEL, KP_TOP, \ + KP_789, KC_BSPC, F_2_7, F_2_7, KC_BSPC, KP_789, \ + KP_456, KC_PMNS, F_3_8, F_3_8, KC_PMNS, KP_456, \ + KP_123, KC_PPLS, F_4_9, KC_F11, KC_F11, F_4_9, KC_PPLS, KP_123, \ + KP_BTM, KC_PENT, F_510, FF12, FF12, F_510, KC_PENT, KP_BTM \ + ), + + /* AUX modifier key layer + * ,-----------------------------------. ,-----------------------------------. + * | | | | | | | | | | | | | | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | | | | | | | | | | | | | | + * |-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----| + * | | | | | | | | | | | | | | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | | | | | | | | | | | | | | | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | | 00 | | | | | | | | | | | 00 | | + * `-----------------------------------------------------------------------------------' + */ + [_KAUX] = LAYOUT( \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____,ZERO2, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,ZERO2, ____ \ + ), + + /* Keypad function layer + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | Pause| ScrLk| PtrSc| | PtrSc| ScrLk| Pause| | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | Home | Up | PgUp | | PgUp | Up | Home | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | |Delete|Insert| Left | Down | Right| | Left | Down | Right|Insert|Delete| | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | End | | PgDn |Adjust|Adjust| PgDn | | End | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ +#define _PAUS_SLCK_PSCR KC_PAUS, KC_SLCK, KC_PSCR +#define _PSCR_SLCK_PAUS KC_PSCR, KC_SLCK, KC_PAUS +#define _HOME_UP_PGUP KC_HOME, KC_UP, KC_PGUP +#define _PGUP_UP_HOME KC_PGUP, KC_UP, KC_HOME +#define _DEL_INS_LEFT_DOWN_RGHT KC_DEL, KC_INS, KC_LEFT, KC_DOWN, KC_RGHT +#define _LEFT_DOWN_RGHT_INS_DEL KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_DEL +#define _PGDN_ADJ_ADJ_PGDN KC_PGDN, KC_ADJ, KC_ADJ, KC_PGDN + + [_PADFUNC] = LAYOUT_wrapper( \ + XXXX, XXXX, XXXX, _PAUS_SLCK_PSCR, _PSCR_SLCK_PAUS, XXXX, XXXX, XXXX, \ + XXXX, XXXX, XXXX, _HOME_UP_PGUP, _PGUP_UP_HOME, XXXX, XXXX, XXXX, \ + XXXX, _DEL_INS_LEFT_DOWN_RGHT, _LEFT_DOWN_RGHT_INS_DEL, XXXX, \ + XXXX, XXXX, XXXX, KC_END, XXXX, _PGDN_ADJ_ADJ_PGDN, XXXX, KC_END, XXXX, XXXX, XXXX, \ + XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, ____, ____, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX \ + ), + + /* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | |Pause | ScrLk| Ins | | | | Ins | ScrLk|Pause | | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | PgUp | | Up |Delete| Home | | Home |Delete| Up | | PgUp | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | PgDn | Left | Down | Right| End |Adjust|Adjust| End | Left | Down | Right| PgDn | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | PrtSc| | | | | | | | | PrtSc| | | + * `-------------------------------------------------------------------------------------------------' + */ +#define _F1_F2_F3_F4_F5 KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 +#define _F6_F7_F8_F9_F10_F11 KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 +#define _PAUS_SLCK_INS KC_PAUS, KC_SLCK, KC_INS +#define _INS_SLCK_PAUS KC_INS, KC_SLCK, KC_PAUS +#define _ADJ_ADJ KC_ADJ, KC_ADJ +#define _UP_DEL_PGUP KC_UP, KC_DEL, KC_PGUP +#define _PGUP_DEL_UP KC_PGUP, KC_DEL, KC_UP +#define _END_LEFT_DOWN_RGHT_PGDN KC_END, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN +#define _PGDN_LEFT_DOWN_RGHT_END KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_END + + [_LOWER] = LAYOUT_wrapper( \ + XXXX, _F1_F2_F3_F4_F5, _F6_F7_F8_F9_F10_F11, \ + XXXX, XXXX, _PAUS_SLCK_INS, XXXX, XXXX, _INS_SLCK_PAUS, XXXX, KC_F12, \ + ____, KC_HOME, XXXX, _UP_DEL_PGUP, _PGUP_DEL_UP, XXXX, KC_HOME, ____, \ + ____, _END_LEFT_DOWN_RGHT_PGDN, XXXX, XXXX, _PGDN_LEFT_DOWN_RGHT_END, ____, \ + ____, ____, KC_PSCR, ____, ____, ____, _ADJ_ADJ, ____, ____, ____, KC_PSCR, ____, ____ \ + ), + + /* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | _ | - | | = | + | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | { | [ | | ] | } | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | EISU | EISU | KANA | KANA | Next | Vol- | Vol+ | Play | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ +#define _LSMI_MINS KC_LSMI, KC_MINS +#define _EQL_LSEQ KC_EQL, KC_LSEQ +#define _LSLB_LBRC KC_LSLB, KC_LBRC +#define _RBRC_LSRB KC_RBRC, KC_LSRB +#define _MNXT_VOLD_VOLU_MPLY KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + + [_RAISE] = LAYOUT_wrapper( \ + XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, XXXX, \ + XXXX, XXXX, XXXX, XXXX, _LSMI_MINS, _EQL_LSEQ, XXXX, XXXX, XXXX, XXXX, \ + ____, XXXX, XXXX, XXXX, _LSLB_LBRC, _RBRC_LSRB, XXXX, XXXX, XXXX, ____, \ + ____, XXXX, XXXX, XXXX, XXXX,xEISU,xEISU, xKANA,xKANA, _MNXT_VOLD_VOLU_MPLY, ____, \ + _ADJ_ADJ, XXXX, ____, ____, XXXX, ____, ____, XXXX, ____, ____, XXXX, _ADJ_ADJ \ + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | |Keypad|Dvorak|Colemk|Euclyn|Qwerty| |Qwerty|Euclyn|Colemk|Dvorak|Keypad| | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Reset|RGBRST|RGB ON|Aud on| Win | | Win |Aud on|RGB ON|RGBRST| | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | HUE+ | SAT+ | VAL+ |RGB md|Audoff| Mac | | Mac |Audoff|RGB md| VAL+ | SAT+ | HUE+ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | HUE- | SAT- | VAL- | | | | | | | | | VAL- | SAT- | HUE- | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT( \ + XXXXXXX, KEYPAD, DVORAK, COLEMAK, EUCALYN, QWERTY, QWERTY, EUCALYN, COLEMAK, DVORAK, KEYPAD, XXXXXXX, \ + XXXXXXX, RESET, RGBRST, RGB_TOG, AU_ON, AG_SWAP, AG_SWAP, AU_ON, RGB_TOG, RGBRST, XXXXXXX, XXXXXXX, \ + RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, AU_OFF, AG_NORM, AG_NORM, AU_OFF, RGB_MOD, RGB_VAI, RGB_SAI, RGB_HUI, \ + RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX,____,____,XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_SAD, RGB_HUD, \ + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,____,____,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______ \ + ), + + /* AUX modifier key layer + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | BS | Enter| | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ +#define _BSPC_RAEN KC_BSPC, LT(_RAISE,KC_ENT) + [_AUX] = LAYOUT_wrapper( \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \ + ____, ____, ____, ____, ____, _BSPC_RAEN, ____, ____, ____, ____, ____, ____, ____ \ + ) +}; + +#else +#error "undefined keymaps" +#endif + + +int current_default_layer; + +uint32_t default_layer_state_set_user(uint32_t state) { + current_default_layer = biton32(state); + return state; +} + +void update_base_layer(int base) +{ + if( current_default_layer != base ) { + eeconfig_update_default_layer(1UL<event.pressed) { + update_base_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + update_base_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + update_base_layer(_DVORAK); + } + return false; + break; + case EUCALYN: + if (record->event.pressed) { + update_base_layer(_EUCALYN); + } + return false; + break; + case KEYPAD: + if (record->event.pressed) { + update_base_layer(_KEYPAD); + } + return false; + break; + case ZERO2: + if (record->event.pressed) { + SEND_STRING("00"); + } + return false; + break; + case xEISU: + 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); + } + return false; + break; + case xKANA: + if (record->event.pressed) { + if(keymap_config.swap_lalt_lgui==false){ + register_code(KC_LANG1); + }else{ + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG1); + } + return false; + break; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } + #endif + break; + } + return true; +} + +void matrix_init_user(void) { + INIT_HELIX_OLED(); /* define in layer_number.h */ +} diff --git a/keyboards/helix/rev3_5rows/keymaps/five_rows/layer_number.h b/keyboards/helix/rev3_5rows/keymaps/five_rows/layer_number.h new file mode 100644 index 0000000000..1272feba4f --- /dev/null +++ b/keyboards/helix/rev3_5rows/keymaps/five_rows/layer_number.h @@ -0,0 +1,26 @@ +#pragma once + +// 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, + _DVORAK, + _EUCALYN, + _KEYPAD, + _AUX, + _KAUX, + _LOWER, + _RAISE, + _PADFUNC, + _ADJUST, +}; + +#if defined(SSD1306OLED) +extern void init_helix_oled(void); +# define INIT_HELIX_OLED() init_helix_oled(); +#else +# define INIT_HELIX_OLED() +#endif diff --git a/keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c b/keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c new file mode 100644 index 0000000000..c1f039e5b1 --- /dev/null +++ b/keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c @@ -0,0 +1,200 @@ +/* Copyright 2020 mtei + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 +#ifdef CONSOLE_ENABLE + #include +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif +#include "string.h" +#include "layer_number.h" + +extern int current_default_layer; + +void init_helix_oled(void) { +#ifdef SSD1306OLED + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + iota_gfx_init(!has_usb()); // turns on the display +#endif +} + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#if defined(SSD1306OLED) || defined(OLED_DRIVER_ENABLE) + +# if defined(OLED_DRIVER_ENABLE) +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_keyboard_master()) { + return OLED_ROTATION_0; + } else { + return OLED_ROTATION_180; + } +} +# else +# define oled_write(data,flag) matrix_write(matrix, data) +# define oled_write_P(data,flag) matrix_write_P(matrix, data) +# endif + +# ifdef SSD1306OLED +void matrix_scan_user(void) { + 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; + } +} +# endif + +# ifdef SSD1306OLED +static void render_logo(struct CharacterMatrix *matrix) { +# else +static void render_logo(void) { +# endif + + static const char helix_logo[] PROGMEM = { + 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(helix_logo, false); +# ifdef RGBLIGHT_ENABLE + char buf[30]; + if (RGBLIGHT_MODES > 1 && rgblight_is_enabled()) { + snprintf(buf, sizeof(buf), " LED %2d: %d,%d,%d ", + rgblight_get_mode(), + rgblight_get_hue()/RGBLIGHT_HUE_STEP, + rgblight_get_sat()/RGBLIGHT_SAT_STEP, + rgblight_get_val()/RGBLIGHT_VAL_STEP); + oled_write(buf, false); +# ifndef SSD1306OLED + } else { + oled_write_P( PSTR("\n"), false); +# endif + } +# endif +} + +static const char Qwerty_name[] PROGMEM = " Qwerty"; +static const char Colemak_name[] PROGMEM = " Colemak"; +static const char Dvorak_name[] PROGMEM = " Dvorak"; +static const char Eucalyn_name[] PROGMEM = " Eucalyn"; +static const char Keypad_name[] PROGMEM = " Keypad"; + +static const char AUX_name[] PROGMEM = ":AUX"; +static const char KAUX_name[] PROGMEM = ":00"; +static const char Padfunc_name[] PROGMEM = ":PadFunc"; +static const char Lower_name[] PROGMEM = ":Func"; +static const char Raise_name[] PROGMEM = ":Extra"; +static const char Adjust_name[] PROGMEM = ":Adjust"; + +static const char *layer_names[] = { + [_QWERTY] = Qwerty_name, + [_COLEMAK] = Colemak_name, + [_DVORAK] = Dvorak_name, + [_EUCALYN]= Eucalyn_name, + [_KEYPAD] = Keypad_name, + [_AUX] = AUX_name, + [_KAUX] = KAUX_name, + [_LOWER] = Lower_name, + [_RAISE] = Raise_name, + [_PADFUNC]= Padfunc_name, + [_ADJUST] = Adjust_name +}; + +# ifdef SSD1306OLED +void render_status(struct CharacterMatrix *matrix) { +# else +void render_status(void) { +# endif + + // Render to mode icon + static const char os_logo[][2][3] PROGMEM ={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}}; + if(keymap_config.swap_lalt_lgui==false){ + oled_write_P(os_logo[0][0], false); + oled_write_P(PSTR("\n"), false); + oled_write_P(os_logo[0][1], false); + } else { + oled_write_P(os_logo[1][0], false); + oled_write_P(PSTR("\n"), false); + oled_write_P(os_logo[1][1], 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 + int name_num; + uint32_t lstate; + oled_write_P(layer_names[current_default_layer], false); + oled_write_P(PSTR("\n"), false); + for (lstate = layer_state, name_num = 0; + lstate && name_num < sizeof(layer_names)/sizeof(char *); + lstate >>=1, name_num++) { + if ((lstate & 1) != 0) { + if (layer_names[name_num]) { + oled_write_P(layer_names[name_num], false); + } + } + } + + // Host Keyboard LED Status + char led[40]; + snprintf(led, sizeof(led), "\n%s %s %s", + (host_keyboard_leds() & (1< Date: Mon, 16 Nov 2020 23:27:09 +0100 Subject: [PATCH 073/114] Fix typo causing `redefined error` in keymap_french_osx (#10962) Co-authored-by: gbotin --- quantum/keymap_extras/keymap_french_osx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/keymap_extras/keymap_french_osx.h b/quantum/keymap_extras/keymap_french_osx.h index d0132a2d85..de8dd756a1 100644 --- a/quantum/keymap_extras/keymap_french_osx.h +++ b/quantum/keymap_extras/keymap_french_osx.h @@ -237,7 +237,7 @@ #define FR_PERM S(A(FR_LUGR)) // ‰ // Row 4 #define FR_GTEQ S(A(FR_LABK)) // ≥ -#define FR_LSAQ S(A(FR_W)) // › +#define FR_RSAQ S(A(FR_W)) // › #define FR_FRSL S(A(FR_X)) // ⁄ #define FR_CENT S(A(FR_C)) // ¢ #define FR_SQRT S(A(FR_V)) // √ From 3e0789c961f3843f0ce4a7eb641f8db9c09fe5f8 Mon Sep 17 00:00:00 2001 From: Danny Date: Mon, 16 Nov 2020 19:02:43 -0500 Subject: [PATCH 074/114] BDN9: Fix encoder direction, add 3rd encoder for Rev. 1.3 support (#10883) --- keyboards/keebio/bdn9/rev1/config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/keebio/bdn9/rev1/config.h b/keyboards/keebio/bdn9/rev1/config.h index 678be9fe81..e4814d663d 100644 --- a/keyboards/keebio/bdn9/rev1/config.h +++ b/keyboards/keebio/bdn9/rev1/config.h @@ -38,8 +38,8 @@ along with this program. If not, see . { E6, B4, B2 } \ } -#define ENCODERS_PAD_A { D1, F5 } -#define ENCODERS_PAD_B { D0, F6 } +#define ENCODERS_PAD_A { D0, F6, B6 } +#define ENCODERS_PAD_B { D1, F5, F7 } #define BACKLIGHT_PIN B5 // #define BACKLIGHT_BREATHING From f3394139dead525d8bb3e638497d4e2c4e4bc0a0 Mon Sep 17 00:00:00 2001 From: ojthetiny <65928618+ojthetiny@users.noreply.github.com> Date: Tue, 17 Nov 2020 04:12:10 +0200 Subject: [PATCH 075/114] [Keyboard] Add Beatervan keyboard (#10939) * Added Beatervan Keyboard * added files for beatervan * Update keyboards/beatervan/beatervan.h Co-authored-by: ridingqwerty * Update keyboards/beatervan/keymaps/default/keymap.c Co-authored-by: ridingqwerty * Update keyboards/beatervan/beatervan.h Co-authored-by: ridingqwerty * Update keyboards/beatervan/info.json Co-authored-by: ridingqwerty * Update keyboards/beatervan/keymaps/default/keymap.c Co-authored-by: ridingqwerty * Update keyboards/beatervan/keymaps/oj/keymap.c Co-authored-by: ridingqwerty * Update keyboards/beatervan/config.h Co-authored-by: ridingqwerty * Update keyboards/beatervan/keymaps/default/keymap.c Co-authored-by: ridingqwerty * Update keyboards/beatervan/keymaps/default/keymap.c Co-authored-by: ridingqwerty * Update keyboards/beatervan/keymaps/default/keymap.c Co-authored-by: ridingqwerty * Update keyboards/beatervan/keymaps/default/keymap.c Co-authored-by: ridingqwerty * Update keyboards/beatervan/rules.mk Co-authored-by: ridingqwerty * Update keyboards/beatervan/keymaps/oj/keymap.c Co-authored-by: ridingqwerty * Update keyboards/beatervan/keymaps/oj/keymap.c Co-authored-by: ridingqwerty * Update keyboards/beatervan/keymaps/oj/keymap.c Co-authored-by: ridingqwerty * Update keyboards/beatervan/keymaps/oj/keymap.c Co-authored-by: ridingqwerty * Delete config.h * Delete config.h * Update keymap.c * Update beatervan.c * Update beatervan.h * Update config.h * Update keymap.c * Update keymap.c Co-authored-by: ridingqwerty --- keyboards/beatervan/beatervan.c | 16 ++ keyboards/beatervan/beatervan.h | 70 ++++++ keyboards/beatervan/config.h | 55 +++++ keyboards/beatervan/info.json | 204 ++++++++++++++++++ keyboards/beatervan/keymaps/default/keymap.c | 93 ++++++++ keyboards/beatervan/keymaps/default/readme.md | 1 + keyboards/beatervan/keymaps/oj/keymap.c | 93 ++++++++ keyboards/beatervan/keymaps/oj/readme.md | 1 + keyboards/beatervan/readme.md | 13 ++ keyboards/beatervan/rules.mk | 23 ++ 10 files changed, 569 insertions(+) create mode 100644 keyboards/beatervan/beatervan.c create mode 100644 keyboards/beatervan/beatervan.h create mode 100644 keyboards/beatervan/config.h create mode 100644 keyboards/beatervan/info.json create mode 100644 keyboards/beatervan/keymaps/default/keymap.c create mode 100644 keyboards/beatervan/keymaps/default/readme.md create mode 100644 keyboards/beatervan/keymaps/oj/keymap.c create mode 100644 keyboards/beatervan/keymaps/oj/readme.md create mode 100644 keyboards/beatervan/readme.md create mode 100644 keyboards/beatervan/rules.mk diff --git a/keyboards/beatervan/beatervan.c b/keyboards/beatervan/beatervan.c new file mode 100644 index 0000000000..0730af001b --- /dev/null +++ b/keyboards/beatervan/beatervan.c @@ -0,0 +1,16 @@ +/* Copyright 2020 OJtheTiny + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "beatervan.h" diff --git a/keyboards/beatervan/beatervan.h b/keyboards/beatervan/beatervan.h new file mode 100644 index 0000000000..e645809825 --- /dev/null +++ b/keyboards/beatervan/beatervan.h @@ -0,0 +1,70 @@ +/* Copyright 2020 OJtheTiny + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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, 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, K34, K36, K37, K38, K39 \ +) \ +{ \ + { 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, KC_NO, K34, KC_NO, K36, K37, K38, K39, KC_NO, KC_NO } \ +} + +#define LAYOUT_arrow( \ + 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, 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, KC_NO, KC_NO, KC_NO, K37, K38, K39, K3A, K3B } \ +} + +#define LAYOUT_command( \ + 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, K34, K33, K37, K38, K39, 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, KC_NO, KC_NO, K37, K38, K39, KC_NO, K3B } \ +} + +#define LAYOUT_arrow_command( \ + 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, K34, K33, 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, KC_NO, KC_NO, K37, K38, K39, K3A, K3B } \ +} diff --git a/keyboards/beatervan/config.h b/keyboards/beatervan/config.h new file mode 100644 index 0000000000..a8973ab4a6 --- /dev/null +++ b/keyboards/beatervan/config.h @@ -0,0 +1,55 @@ + +/* Copyright 2020 OJtheTiny + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 0x6F6A // "oj" +#define PRODUCT_ID 0x6276 // "bv" +#define DEVICE_VER 0x0001 +#define MANUFACTURER OJ +#define PRODUCT beatervan + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* + * 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 { D1, D0, D4, C6 } +#define MATRIX_COL_PINS { D7, E6, B4, B5, F4, F5, F6, F7, B1, B3, B2, B6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#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/beatervan/info.json b/keyboards/beatervan/info.json new file mode 100644 index 0000000000..f6f3876422 --- /dev/null +++ b/keyboards/beatervan/info.json @@ -0,0 +1,204 @@ +{ + "keyboard_name": "beatervan", + "url": "", + "maintainer": "OJ", + "width": 12.75, + "height": 4, + "layouts": { + "LAYOUT": { + "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":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":"|", "x":11, "y":0, "w":1.75}, + {"label":"Caps Lock", "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":"\"", "x":11.25, "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":">", "x":9.75, "y":2}, + {"label":"?", "x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"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}, + {"x":4, "y":3, "w":2.25}, + {"x":6.25, "y":3, "w":2}, + {"label":"Alt", "x":8.25, "y":3, "w":1.25}, + {"label":"Win", "x":9.5, "y":3, "w":1.5}, + {"label":"Menu", "x":11, "y":3, "w":1.75} ] + }, + + "LAYOUT_arrow": { + "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":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":"|", "x":11, "y":0, "w":1.75}, + {"label":"Caps Lock", "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":"\"", "x":11.25, "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":">", "x":9.75, "y":2}, + {"label":"?", "x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"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}, + {"x":4, "y":3, "w":2.25}, + {"x":6.25, "y":3, "w":2}, + {"x":8.25, "y":3, "w":1.5}, + {"label":"Alt", "x":9.75, "y":3}, + {"label":"Win", "x":10.75, "y":3}, + {"label":"Menu", "x":11.75, "y":3} ] + }, + + "LAYOUT_command": { + "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":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":"|", "x":11, "y":0, "w":1.75}, + {"label":"Caps Lock", "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":"\"", "x":11.25, "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":">", "x":9.75, "y":2}, + {"label":"?", "x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"label":"Ctrl", "x":0, "y":3}, + {"label":"Win", "x":1, "y":3}, + {"label":"Alt", "x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3, "w":2.25}, + {"x":6.25, "y":3, "w":2}, + {"x":8.25, "y":3, "w":1.5}, + {"label":"Alt", "x":9.75, "y":3, "w":1.5}, + {"label":"Win", "x":11.25, "y":3, "w":1.5} ] + }, + + "LAYOUT_arrow_command": { + "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":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":"|", "x":11, "y":0, "w":1.75}, + {"label":"Caps Lock", "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":"\"", "x":11.25, "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":">", "x":9.75, "y":2}, + {"label":"?", "x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"label":"Ctrl", "x":0, "y":3}, + {"label":"Win", "x":1, "y":3}, + {"label":"Alt", "x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3, "w":2.25}, + {"x":6.25, "y":3, "w":2}, + {"x":8.25, "y":3, "w":1.5}, + {"label":"Alt", "x":9.75, "y":3}, + {"label":"Win", "x":10.75, "y":3}, + {"label":"Menu", "x":11.75, "y":3} ] + } + } +} diff --git a/keyboards/beatervan/keymaps/default/keymap.c b/keyboards/beatervan/keymaps/default/keymap.c new file mode 100644 index 0000000000..a99b9c9e51 --- /dev/null +++ b/keyboards/beatervan/keymaps/default/keymap.c @@ -0,0 +1,93 @@ +/* Copyright 2020 OJtheTiny + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 { + _QW, + _DV, + _CM, + _L1, + _L2, + _L3, +}; + +enum custom_keycodes { + DVORAK = SAFE_RANGE, + QWERTY, + COLEMAK +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = LAYOUT( /* Qwerty */ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + MO(_L1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MO(_L1), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2), + KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, KC_SPC, KC_RALT, KC_ESC, TG(_L3) + ), + [_DV] = LAYOUT( /* Dvorak */ + KC_TAB, KC_SLSH, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + MO(_L1), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, MO(_L1), + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(_L2), + KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, KC_SPC, KC_RALT, KC_ESC, TG(_L3) + ), + [_CM] = LAYOUT( /* Colemak */ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + MO(_L1), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, MO(_L1), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2), + KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, KC_SPC, KC_RALT, KC_ESC, TG(_L3) + ), + [_L1] = LAYOUT( /* LAYER 1 */ + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + _______, KC_BSLS, KC_QUOT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, _______, + _______, KC_ESC, _______, KC_PSCR, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_RSFT, + _______, KC_LGUI, _______, _______, _______, _______, _______, _______ + ), + [_L2] = LAYOUT( /* LAYER 2 */ + _______, QWERTY, DVORAK, COLEMAK, _______, _______, _______, KC_7, KC_8, KC_9, KC_0, _______, + KC_ESC, KC_PIPE, KC_DQUO, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_4, KC_5, KC_6, KC_VOLU, KC_ENT, + _______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_VOLD, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_L3] = LAYOUT( /* LAYER 3 */ + _______, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, + KC_ESC, _______, _______, _______, _______, _______, _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, + KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, KC_LSFT, KC_B, KC_SPC, KC_C, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DV); + } + return false; + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QW); + } + return false; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_CM); + } + return false; + default: + return true; + } + return true; +}; diff --git a/keyboards/beatervan/keymaps/default/readme.md b/keyboards/beatervan/keymaps/default/readme.md new file mode 100644 index 0000000000..ac84c08cfa --- /dev/null +++ b/keyboards/beatervan/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for tv44 \ No newline at end of file diff --git a/keyboards/beatervan/keymaps/oj/keymap.c b/keyboards/beatervan/keymaps/oj/keymap.c new file mode 100644 index 0000000000..6b32c4ddc1 --- /dev/null +++ b/keyboards/beatervan/keymaps/oj/keymap.c @@ -0,0 +1,93 @@ +/* Copyright 2020 OJtheTiny + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 { + _QW, + _DV, + _CM, + _L1, + _L2, + _L3 +}; +enum custom_keycodes { + DVORAK = SAFE_RANGE, + QWERTY, + COLEMAK +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = LAYOUT( /* Qwerty */ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENTER, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2), + KC_TAB, MO(_L1), KC_LGUI, KC_SPC, KC_BSPC, KC_LALT, KC_RALT, TG(_L3) + ), + [_DV] = LAYOUT( /* Dvorak */ + KC_ESC, KC_SLSH, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_QUOT, + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(_L2), + KC_TAB, MO(_L1), KC_LGUI, KC_SPC, KC_BSPC, KC_LALT, KC_RALT, TG(_L3) + ), + [_CM] = LAYOUT( /* Colemak */ + KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_QUOT, + KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENTER, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2), + KC_TAB, MO(_L1), KC_LGUI, KC_SPC, KC_BSPC, KC_LALT, KC_RALT, TG(_L3) + ), + [_L1] = LAYOUT( /* NUM */ + 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_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_SCLN, KC_BSLS, + _______, _______, _______, KC_PSCR, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_L2] = LAYOUT( /* F Keys */ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, KC_ENTER, + _______, QWERTY, DVORAK, COLEMAK, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_L3] = LAYOUT( /* Gaming */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, _______, _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, _______, MO(_L2), KC_F9, KC_F10, KC_F11, KC_F12, _______, + KC_LSFT, KC_Z, KC_B, KC_SPC, KC_BSPC, _______, _______, TG(_L3) + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DV); + } + return false; + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QW); + } + return false; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_CM); + } + return false; + default: + return true; + } + return true; +}; diff --git a/keyboards/beatervan/keymaps/oj/readme.md b/keyboards/beatervan/keymaps/oj/readme.md new file mode 100644 index 0000000000..34c2f075c8 --- /dev/null +++ b/keyboards/beatervan/keymaps/oj/readme.md @@ -0,0 +1 @@ +#Objectively superior keymap for v44 diff --git a/keyboards/beatervan/readme.md b/keyboards/beatervan/readme.md new file mode 100644 index 0000000000..2b7dd59054 --- /dev/null +++ b/keyboards/beatervan/readme.md @@ -0,0 +1,13 @@ +# Beatervan (minivan) + +A Pro-Micro based Minivan with THT diodes + +Keyboard Maintainer: OJ +Hardware Supported: Beatervan PCB, 32u4 "pro-micro" +Hardware Availability: Private GB + +Make example for this keyboard (after setting up your build environment): + + make beatervan: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/beatervan/rules.mk b/keyboards/beatervan/rules.mk new file mode 100644 index 0000000000..1ea4a84d52 --- /dev/null +++ b/keyboards/beatervan/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +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 = 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 +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = yes # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 From 69bb9b7386b22bc9628a2a8128e79e17b20bc1f7 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 16 Nov 2020 19:21:52 -0800 Subject: [PATCH 076/114] Fox Lab Time80: add Configurator layout data (#10950) --- keyboards/foxlab/time80/info.json | 104 ++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 keyboards/foxlab/time80/info.json diff --git a/keyboards/foxlab/time80/info.json b/keyboards/foxlab/time80/info.json new file mode 100644 index 0000000000..0919bae5af --- /dev/null +++ b/keyboards/foxlab/time80/info.json @@ -0,0 +1,104 @@ +{ + "keyboard_name": "Fox Lab Time 80", + "url": "", + "maintainer": "lukelex", + "width": 18.25, + "height": 6.25, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"k00", "x":0, "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":"k07", "x":6.5, "y":0}, + {"label":"k08", "x":7.5, "y":0}, + {"label":"k09", "x":8.5, "y":0}, + {"label":"k0A", "x":9.5, "y":0}, + {"label":"k0B", "x":11, "y":0}, + {"label":"k0E", "x":12, "y":0}, + {"label":"k0C", "x":13, "y":0}, + {"label":"k01", "x":14, "y":0}, + {"label":"k61", "x":15.25, "y":0}, + {"label":"k62", "x":16.25, "y":0}, + {"label":"k6E", "x":17.25, "y":0}, + {"label":"k10", "x":0, "y":1.25}, + {"label":"k11", "x":1, "y":1.25}, + {"label":"k12", "x":2, "y":1.25}, + {"label":"k13", "x":3, "y":1.25}, + {"label":"k14", "x":4, "y":1.25}, + {"label":"k15", "x":5, "y":1.25}, + {"label":"k16", "x":6, "y":1.25}, + {"label":"k17", "x":7, "y":1.25}, + {"label":"k18", "x":8, "y":1.25}, + {"label":"k19", "x":9, "y":1.25}, + {"label":"k1A", "x":10, "y":1.25}, + {"label":"k1B", "x":11, "y":1.25}, + {"label":"k1E", "x":12, "y":1.25}, + {"label":"k1C", "x":13, "y":1.25}, + {"label":"k1D", "x":14, "y":1.25}, + {"label":"k66", "x":15.25, "y":1.25}, + {"label":"k65", "x":16.25, "y":1.25}, + {"label":"k64", "x":17.25, "y":1.25}, + {"label":"k20", "x":0, "y":2.25, "w":1.5}, + {"label":"k21", "x":1.5, "y":2.25}, + {"label":"k22", "x":2.5, "y":2.25}, + {"label":"k23", "x":3.5, "y":2.25}, + {"label":"k24", "x":4.5, "y":2.25}, + {"label":"k25", "x":5.5, "y":2.25}, + {"label":"k26", "x":6.5, "y":2.25}, + {"label":"k27", "x":7.5, "y":2.25}, + {"label":"k28", "x":8.5, "y":2.25}, + {"label":"k29", "x":9.5, "y":2.25}, + {"label":"k2A", "x":10.5, "y":2.25}, + {"label":"k2B", "x":11.5, "y":2.25}, + {"label":"k2E", "x":12.5, "y":2.25}, + {"label":"k2C", "x":13.5, "y":2.25, "w":1.5}, + {"label":"k6C", "x":15.25, "y":2.25}, + {"label":"k68", "x":16.25, "y":2.25}, + {"label":"k67", "x":17.25, "y":2.25}, + {"label":"k30", "x":0, "y":3.25, "w":1.75}, + {"label":"k31", "x":1.75, "y":3.25}, + {"label":"k32", "x":2.75, "y":3.25}, + {"label":"k33", "x":3.75, "y":3.25}, + {"label":"k34", "x":4.75, "y":3.25}, + {"label":"k35", "x":5.75, "y":3.25}, + {"label":"k36", "x":6.75, "y":3.25}, + {"label":"k37", "x":7.75, "y":3.25}, + {"label":"k38", "x":8.75, "y":3.25}, + {"label":"k39", "x":9.75, "y":3.25}, + {"label":"k3A", "x":10.75, "y":3.25}, + {"label":"k3B", "x":11.75, "y":3.25}, + {"label":"k3C", "x":12.75, "y":3.25}, + {"label":"k3E", "x":13.75, "y":3.25, "w":1.25}, + {"label":"k40", "x":0, "y":4.25, "w":1.25}, + {"label":"k4D", "x":1.25, "y":4.25}, + {"label":"k41", "x":2.25, "y":4.25}, + {"label":"k42", "x":3.25, "y":4.25}, + {"label":"k43", "x":4.25, "y":4.25}, + {"label":"k44", "x":5.25, "y":4.25}, + {"label":"k45", "x":6.25, "y":4.25}, + {"label":"k46", "x":7.25, "y":4.25}, + {"label":"k47", "x":8.25, "y":4.25}, + {"label":"k48", "x":9.25, "y":4.25}, + {"label":"k49", "x":10.25, "y":4.25}, + {"label":"k4A", "x":11.25, "y":4.25}, + {"label":"k4B", "x":12.25, "y":4.25, "w":1.75}, + {"label":"k4E", "x":14, "y":4.25}, + {"label":"k4C", "x":16.25, "y":4.25}, + {"label":"k50", "x":0, "y":5.25, "w":1.25}, + {"label":"k51", "x":1.25, "y":5.25, "w":1.25}, + {"label":"k52", "x":2.5, "y":5.25, "w":1.25}, + {"label":"k54", "x":3.75, "y":5.25, "w":6.25}, + {"label":"k58", "x":10, "y":5.25, "w":1.25}, + {"label":"k59", "x":11.25, "y":5.25, "w":1.25}, + {"label":"k5A", "x":12.5, "y":5.25, "w":1.25}, + {"label":"k5B", "x":13.75, "y":5.25, "w":1.25}, + {"label":"k5E", "x":15.25, "y":5.25}, + {"label":"k5C", "x":16.25, "y":5.25}, + {"label":"k57", "x":17.25, "y":5.25} + ] + } + } +} From 88c09aa89232ad9581f5e2313f377443ee6dd0dc Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Mon, 16 Nov 2020 21:14:59 -0800 Subject: [PATCH 077/114] [Keyboard] Add Titan 60 (#10886) * initial commit * fix up some documentation * titan60 firmware * add supported layouts * fixup default keymap * fixup via keymap * fixup default keymap * some code cleanups --- keyboards/acekeyboard/titan60/config.h | 86 ++++++++++++++ keyboards/acekeyboard/titan60/info.json | 32 +++++ .../titan60/keymaps/default/keymap.c | 48 ++++++++ .../acekeyboard/titan60/keymaps/via/keymap.c | 64 ++++++++++ .../acekeyboard/titan60/keymaps/via/rules.mk | 3 + keyboards/acekeyboard/titan60/readme.md | 17 +++ keyboards/acekeyboard/titan60/rules.mk | 22 ++++ keyboards/acekeyboard/titan60/titan60.c | 18 +++ keyboards/acekeyboard/titan60/titan60.h | 109 ++++++++++++++++++ 9 files changed, 399 insertions(+) create mode 100644 keyboards/acekeyboard/titan60/config.h create mode 100644 keyboards/acekeyboard/titan60/info.json create mode 100644 keyboards/acekeyboard/titan60/keymaps/default/keymap.c create mode 100644 keyboards/acekeyboard/titan60/keymaps/via/keymap.c create mode 100644 keyboards/acekeyboard/titan60/keymaps/via/rules.mk create mode 100644 keyboards/acekeyboard/titan60/readme.md create mode 100644 keyboards/acekeyboard/titan60/rules.mk create mode 100644 keyboards/acekeyboard/titan60/titan60.c create mode 100644 keyboards/acekeyboard/titan60/titan60.h diff --git a/keyboards/acekeyboard/titan60/config.h b/keyboards/acekeyboard/titan60/config.h new file mode 100644 index 0000000000..d34622b250 --- /dev/null +++ b/keyboards/acekeyboard/titan60/config.h @@ -0,0 +1,86 @@ +/* +Copyright 2020 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 "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xACE1 // Ace +#define PRODUCT_ID 0x5449 // TI +#define DEVICE_VER 0x0001 +#define MANUFACTURER Acekeyboard +#define PRODUCT titan60 + +/* 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) + * + */ + + +// 0 1 2 3 4 5 6 7 8 9 A B C D +#define MATRIX_ROW_PINS { B1, B2, B3, F0, F1 } +#define MATRIX_COL_PINS { F4, F7, F5, F6, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3} +#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_LEVELS 3 +#define BACKLIGHT_BREATHING + +#define RGB_DI_PIN D2 +#ifdef RGB_DI_PIN +# define RGBLED_NUM 14 +# 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 */ +# define RGBLIGHT_ANIMATIONS +#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 + + +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/acekeyboard/titan60/info.json b/keyboards/acekeyboard/titan60/info.json new file mode 100644 index 0000000000..0839c7fb36 --- /dev/null +++ b/keyboards/acekeyboard/titan60/info.json @@ -0,0 +1,32 @@ +{ + "keyboard_name": "Titan60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all_ansi_std": { + "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.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}] + }, + + "LAYOUT_all_ansi_2u_lshift": { + "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}, {"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}, {"x":12, "y":3}, {"x":13, "y":3}, {"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.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}] + }, + + "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_ansi_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}] + }, + + "LAYOUT_60_ansi_split_bs_rshift": { + "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.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_ansi_split_spacebar": { + "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":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.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}] + } + } +} diff --git a/keyboards/acekeyboard/titan60/keymaps/default/keymap.c b/keyboards/acekeyboard/titan60/keymaps/default/keymap.c new file mode 100644 index 0000000000..be3ed10bbc --- /dev/null +++ b/keyboards/acekeyboard/titan60/keymaps/default/keymap.c @@ -0,0 +1,48 @@ +/* +Copyright 2020 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] = { + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ 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 │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │Ctrl│GUI │Alt │ │ Alt│ GUI│Menu│Ctrl│ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ + [0] = LAYOUT_60_ansi( + 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_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_B, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RGUI, 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_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/acekeyboard/titan60/keymaps/via/keymap.c b/keyboards/acekeyboard/titan60/keymaps/via/keymap.c new file mode 100644 index 0000000000..c78d8f0b17 --- /dev/null +++ b/keyboards/acekeyboard/titan60/keymaps/via/keymap.c @@ -0,0 +1,64 @@ +/* +Copyright 2020 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] = { + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ 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 │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │Ctrl│GUI │Alt │ │ Alt│ GUI│Menu│Ctrl│ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ + [0] = LAYOUT_60_ansi( + 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_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, MO(1), KC_RALT, KC_RGUI, 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_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_60_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/acekeyboard/titan60/keymaps/via/rules.mk b/keyboards/acekeyboard/titan60/keymaps/via/rules.mk new file mode 100644 index 0000000000..5f615ff62b --- /dev/null +++ b/keyboards/acekeyboard/titan60/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes + diff --git a/keyboards/acekeyboard/titan60/readme.md b/keyboards/acekeyboard/titan60/readme.md new file mode 100644 index 0000000000..f977b4b89f --- /dev/null +++ b/keyboards/acekeyboard/titan60/readme.md @@ -0,0 +1,17 @@ +# titan60 + +60% custom keyboard originally meant for the Saturn 60 + +* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +* Hardware Supported: Titan 60 PCB +* Hardware Availability: [Acekeyboard](https://acekeyboard.co/) + +Make example for this keyboard (after setting up your build environment): + + make acekeyboard/titan60:default + +Flashing example for this keyboard: + + make acekeyboard/titan60:default:flash + +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/acekeyboard/titan60/rules.mk b/keyboards/acekeyboard/titan60/rules.mk new file mode 100644 index 0000000000..92f7aba542 --- /dev/null +++ b/keyboards/acekeyboard/titan60/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# 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 +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/acekeyboard/titan60/titan60.c b/keyboards/acekeyboard/titan60/titan60.c new file mode 100644 index 0000000000..64479f31c8 --- /dev/null +++ b/keyboards/acekeyboard/titan60/titan60.c @@ -0,0 +1,18 @@ +/* +Copyright 2020 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 "titan60.h" diff --git a/keyboards/acekeyboard/titan60/titan60.h b/keyboards/acekeyboard/titan60/titan60.h new file mode 100644 index 0000000000..0958967ee3 --- /dev/null +++ b/keyboards/acekeyboard/titan60/titan60.h @@ -0,0 +1,109 @@ +/* +Copyright 2020 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" + +#define ___ KC_NO + + +#define LAYOUT_all_ansi_std( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k2c, \ + 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, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k43, \ + k40, k41, k42, k44, k46, k48, 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, ___, ___ }, \ + { k40, k41, k42, k43, k44, ___, k46, ___, k48, ___, k4a, k4b, k4c, k4d } \ +} + +#define LAYOUT_all_ansi_2u_lshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k2c, \ + 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, k47, k3c, k43, \ + k40, k41, k42, k44, k46, k48, k4a, k4d, k4b, k4c, k49 \ +){ \ + { 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, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, ___, ___ }, \ + { k40, k41, k42, k43, k44, ___, k46, k47, k48, k49, k4a, k4b, k4c, k4d } \ +} + +#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, 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, ___, k2d }, \ + { k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, ___, ___ }, \ + { k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, k4a, k4b, k4c, k4d } \ +} + +#define LAYOUT_60_ansi_tsangan( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k2c, \ + 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, k43, \ + k40, k41, k42, k46, 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, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, ___, ___ }, \ + { k40, k41, k42, k43, ___, ___, k46, ___, ___, ___, ___, k4b, k4c, k4d } \ +} + +#define LAYOUT_60_ansi_split_bs_rshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k2c, \ + 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, k43, \ + 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, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, ___, ___ }, \ + { k40, k41, k42, k43, ___, ___, k46, ___, ___, ___, k4a, k4b, k4c, k4d } \ +} + +#define LAYOUT_60_ansi_split_spacebar( \ + 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, k44, k46, k48, 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, ___, k2d }, \ + { k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, ___, ___ }, \ + { k40, k41, k42, ___, k44, ___, k46, ___, k48, ___, k4a, k4b, k4c, k4d } \ +} + + From 503b76253891a9820ad2d21a89617654dc4414fb Mon Sep 17 00:00:00 2001 From: Kosuke Adachi Date: Tue, 17 Nov 2020 14:18:45 +0900 Subject: [PATCH 078/114] Refactor the crkbd/via keymap and fix OLED bugs (#10354) * Refactor the crkbd/via keymap and fix OLED bugs * Revert "Refactor the crkbd/via keymap and fix OLED bugs" This reverts commit dc9db029fc6b077fc7600b49e920b755c522d100. * Fix OLED display bugs * Remove unused functions * Remove uncessary the key logger * Add new lines at end of file * Remove unnecesary extern for is_master * Remove extern is_master from rev1.h * Remove ssd1306 from common dir because its the legacy lib * Update default keymap based the via keymap * Remove foostan keymap because it will be legacy * Revert Remove unnecesary extern for is_master * Remove unnecessary backslashes. --- keyboards/crkbd/keymaps/default/config.h | 4 +- keyboards/crkbd/keymaps/default/keymap.c | 279 ++++++-------- keyboards/crkbd/keymaps/default/rules.mk | 11 +- keyboards/crkbd/keymaps/foostan/config.h | 44 --- keyboards/crkbd/keymaps/foostan/keymap.c | 241 ------------ keyboards/crkbd/keymaps/foostan/rules.mk | 10 - keyboards/crkbd/rev1/common/common.c | 2 - keyboards/crkbd/rev1/common/common.h | 2 +- .../crkbd/rev1/common/keymaps/via/keymap.c | 47 +-- keyboards/crkbd/rev1/common/ssd1306.c | 360 ------------------ keyboards/crkbd/rev1/legacy/legacy.h | 2 + keyboards/crkbd/rev1/{ => legacy}/ssd1306.h | 0 keyboards/crkbd/rev1/rev1.c | 4 - keyboards/crkbd/rev1/rev1.h | 2 - .../community/split_3x6_3/drashna/keymap.c | 2 - 15 files changed, 129 insertions(+), 881 deletions(-) delete mode 100644 keyboards/crkbd/keymaps/foostan/config.h delete mode 100644 keyboards/crkbd/keymaps/foostan/keymap.c delete mode 100644 keyboards/crkbd/keymaps/foostan/rules.mk delete mode 100644 keyboards/crkbd/rev1/common/ssd1306.c rename keyboards/crkbd/rev1/{ => legacy}/ssd1306.h (100%) diff --git a/keyboards/crkbd/keymaps/default/config.h b/keyboards/crkbd/keymaps/default/config.h index 899fde008d..937d67e25f 100644 --- a/keyboards/crkbd/keymaps/default/config.h +++ b/keyboards/crkbd/keymaps/default/config.h @@ -28,8 +28,6 @@ along with this program. If not, see . // #define MASTER_RIGHT // #define EE_HANDS -#define SSD1306OLED - #define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD @@ -44,3 +42,5 @@ along with this program. If not, see . #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 #endif + +#define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c" \ No newline at end of file diff --git a/keyboards/crkbd/keymaps/default/keymap.c b/keyboards/crkbd/keymaps/default/keymap.c index a3a9d95351..27e3c84061 100644 --- a/keyboards/crkbd/keymaps/default/keymap.c +++ b/keyboards/crkbd/keymaps/default/keymap.c @@ -18,218 +18,157 @@ 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 - -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. -#define _QWERTY 0 -#define _LOWER 1 -#define _RAISE 2 -#define _ADJUST 3 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE, - ADJUST, - BACKLIT, - RGBRST -}; - -enum macro_keycodes { - KC_SAMPLEMACRO, -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_split_3x6_3( \ + [0] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. - 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, 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_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_LSFT, 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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ESC, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT \ + KC_LGUI, MO(1), KC_SPC, KC_ENT, MO(2), KC_RALT //`--------------------------' `--------------------------' ), - [_LOWER] = LAYOUT_split_3x6_3( \ + [1] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. - 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, XXXXXXX, XXXXXXX,\ + KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, XXXXXXX, XXXXXXX, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT \ - //`--------------------------' `--------------------------' - ), - - [_RAISE] = LAYOUT_split_3x6_3( \ - //,-----------------------------------------------------. ,-----------------------------------------------------. - KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,\ - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV,\ - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD,\ - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT \ + KC_LGUI, _______, KC_SPC, KC_ENT, MO(3), KC_RALT //`--------------------------' `--------------------------' ), - [_ADJUST] = LAYOUT_split_3x6_3( \ + [2] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. - RESET, RGBRST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TILD, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT \ + KC_LGUI, MO(3), KC_SPC, KC_ENT, _______, KC_RALT + //`--------------------------' `--------------------------' + ), + + [3] = LAYOUT_split_3x6_3( + //,-----------------------------------------------------. ,-----------------------------------------------------. + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT //`--------------------------' `--------------------------' ) }; -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); +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!is_master) { + return OLED_ROTATION_180; // flips the display 180 degrees if offhand } + return rotation; } -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 +#define L_BASE 0 +#define L_LOWER 2 +#define L_RAISE 4 +#define L_ADJUST 8 + +void oled_render_layer_state(void) { + oled_write_P(PSTR("Layer: "), false); + switch (layer_state) { + case L_BASE: + oled_write_ln_P(PSTR("Default"), false); + break; + case L_LOWER: + oled_write_ln_P(PSTR("Lower"), false); + break; + case L_RAISE: + oled_write_ln_P(PSTR("Raise"), false); + break; + case L_ADJUST: + case L_ADJUST|L_LOWER: + case L_ADJUST|L_RAISE: + case L_ADJUST|L_LOWER|L_RAISE: + oled_write_ln_P(PSTR("Adjust"), false); + break; + } } -//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); +char keylog_str[24] = {}; -// const char *read_mode_icon(bool swap); -// const char *read_host_led_state(void); -// void set_timelog(void); -// const char *read_timelog(void); +const char code_to_name[60] = { + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\', + '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '}; -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 set_keylog(uint16_t keycode, keyrecord_t *record) { + char name = ' '; + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || + (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { keycode = keycode & 0xFF; } + if (keycode < 60) { + name = code_to_name[keycode]; } + + // update keylog + snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", + record->event.key.row, record->event.key.col, + keycode, name); } -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 oled_render_keylog(void) { + oled_write(keylog_str, false); } -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - matrix_clear(&matrix); - matrix_render_user(&matrix); - matrix_update(&display, &matrix); +void render_bootmagic_status(bool status) { + /* Show Ctrl-Gui Swap options */ + static const char PROGMEM logo[][2][3] = { + {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}, + {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, + }; + if (status) { + oled_write_ln_P(logo[0][0], false); + oled_write_ln_P(logo[0][1], false); + } else { + oled_write_ln_P(logo[1][0], false); + oled_write_ln_P(logo[1][1], false); + } +} + +void oled_render_logo(void) { + static const char PROGMEM crkbd_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(crkbd_logo, false); +} + +void oled_task_user(void) { + if (is_master) { + oled_render_layer_state(); + oled_render_keylog(); + } else { + oled_render_logo(); + } } -#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; - 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 ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_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; } +#endif // OLED_DRIVER_ENABLE diff --git a/keyboards/crkbd/keymaps/default/rules.mk b/keyboards/crkbd/keymaps/default/rules.mk index f84e5b2af8..9444b88d51 100644 --- a/keyboards/crkbd/keymaps/default/rules.mk +++ b/keyboards/crkbd/keymaps/default/rules.mk @@ -1,10 +1 @@ - -# 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 \ +OLED_DRIVER_ENABLE = yes diff --git a/keyboards/crkbd/keymaps/foostan/config.h b/keyboards/crkbd/keymaps/foostan/config.h deleted file mode 100644 index 644e813650..0000000000 --- a/keyboards/crkbd/keymaps/foostan/config.h +++ /dev/null @@ -1,44 +0,0 @@ -/* -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/foostan/keymap.c b/keyboards/crkbd/keymaps/foostan/keymap.c deleted file mode 100644 index 5235b78363..0000000000 --- a/keyboards/crkbd/keymaps/foostan/keymap.c +++ /dev/null @@ -1,241 +0,0 @@ -#include QMK_KEYBOARD_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. -#define _QWERTY 0 -#define _LOWER 1 -#define _RAISE 2 -#define _ADJUST 3 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE, - ADJUST, - BACKLIT, - RGBRST -}; - -enum macro_keycodes { - KC_SAMPLEMACRO, -}; - -#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_GUIEI GUI_T(KC_LANG2) -#define KC_ALTKN ALT_T(KC_LANG1) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_kc( \ - //,-----------------------------------------. ,-----------------------------------------. - TAB, Q, W, E, R, T, Y, U, I, O, P, BSPC,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - LCTL, A, S, D, F, G, H, J, K, L, SCLN, QUOT,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, ESC,\ - //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ - //`--------------------' `--------------------' - ), - - [_LOWER] = LAYOUT_kc( \ - //,-----------------------------------------. ,-----------------------------------------. - TAB, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - LCTL, F1, F2, F3, F4, F5, LEFT, DOWN, UP, RIGHT, XXXXX, XXXXX,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - LSFT, F6, F7, F8, F9, F10, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ - //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ - //`--------------------' `--------------------' - ), - - [_RAISE] = LAYOUT_kc( \ - //,-----------------------------------------. ,-----------------------------------------. - TAB, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, BSPC,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - LCTL, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, MINS, EQL, LCBR, RCBR, PIPE, GRV,\ - //|------+------+------+------+------+------| |------+------+------+------+------+------| - LSFT, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, UNDS, PLUS, LBRC, RBRC, BSLS, TILD,\ - //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ - //`--------------------' `--------------------' - ), - - [_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; - 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 ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_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/foostan/rules.mk b/keyboards/crkbd/keymaps/foostan/rules.mk deleted file mode 100644 index f84e5b2af8..0000000000 --- a/keyboards/crkbd/keymaps/foostan/rules.mk +++ /dev/null @@ -1,10 +0,0 @@ - -# 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 \ diff --git a/keyboards/crkbd/rev1/common/common.c b/keyboards/crkbd/rev1/common/common.c index 5ea7347de8..ddc0b5fe91 100644 --- a/keyboards/crkbd/rev1/common/common.c +++ b/keyboards/crkbd/rev1/common/common.c @@ -17,5 +17,3 @@ along with this program. If not, see . */ #include "common.h" - -uint8_t is_master; diff --git a/keyboards/crkbd/rev1/common/common.h b/keyboards/crkbd/rev1/common/common.h index af1795f480..71779e2e0f 100644 --- a/keyboards/crkbd/rev1/common/common.h +++ b/keyboards/crkbd/rev1/common/common.h @@ -21,4 +21,4 @@ along with this program. If not, see . #include "rev1.h" #define has_usb() is_keyboard_master() -extern uint8_t is_master; +#define is_master is_keyboard_master() diff --git a/keyboards/crkbd/rev1/common/keymaps/via/keymap.c b/keyboards/crkbd/rev1/common/keymaps/via/keymap.c index a3b2e52ce5..ecd1f17a5c 100644 --- a/keyboards/crkbd/rev1/common/keymaps/via/keymap.c +++ b/keyboards/crkbd/rev1/common/keymaps/via/keymap.c @@ -19,7 +19,7 @@ along with this program. If not, see . #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_split_3x6_3( \ + [0] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), - [1] = LAYOUT_split_3x6_3( \ + [1] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| @@ -40,11 +40,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT\ + KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT //`--------------------------' `--------------------------' ), - [2] = LAYOUT_split_3x6_3( \ + [2] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| @@ -56,15 +56,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`--------------------------' `--------------------------' ), - [3] = LAYOUT_split_3x6_3( \ + [3] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. - RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT\ + KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT //`--------------------------' `--------------------------' ) }; @@ -83,30 +83,28 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { #define L_ADJUST 8 void oled_render_layer_state(void) { - oled_write_P("Layer: ", false); + oled_write_P(PSTR("Layer: "), false); switch (layer_state) { case L_BASE: - oled_write_ln_P("Default", false); + oled_write_ln_P(PSTR("Default"), false); break; case L_LOWER: - oled_write_ln_P("Lower", false); + oled_write_ln_P(PSTR("Lower"), false); break; case L_RAISE: - oled_write_ln_P("Raise", false); + oled_write_ln_P(PSTR("Raise"), false); break; case L_ADJUST: case L_ADJUST|L_LOWER: case L_ADJUST|L_RAISE: case L_ADJUST|L_LOWER|L_RAISE: - oled_write_ln_P("Adjust", false); + oled_write_ln_P(PSTR("Adjust"), false); break; } } char keylog_str[24] = {}; -char keylogs_str[21] = {}; -int keylogs_str_idx = 0; const char code_to_name[60] = { ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', @@ -128,25 +126,11 @@ void set_keylog(uint16_t keycode, keyrecord_t *record) { snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", record->event.key.row, record->event.key.col, keycode, name); - - // update keylogs - if (keylogs_str_idx == sizeof(keylogs_str) - 1) { - keylogs_str_idx = 0; - for (int i = 0; i < sizeof(keylogs_str) - 1; i++) { - keylogs_str[i] = ' '; - } - } - - keylogs_str[keylogs_str_idx] = name; - keylogs_str_idx++; } void oled_render_keylog(void) { oled_write(keylog_str, false); } -void oled_render_keylogs(void) { - oled_write(keylogs_str, false); -} void render_bootmagic_status(bool status) { /* Show Ctrl-Gui Swap options */ @@ -176,8 +160,6 @@ void oled_task_user(void) { if (is_master) { oled_render_layer_state(); oled_render_keylog(); - // oled_render_keylogs(); - // oled_renger_bootmagic_icon(keymap_config.swap_lalt_lgui); } else { oled_render_logo(); } @@ -186,7 +168,6 @@ void oled_task_user(void) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { set_keylog(keycode, record); - // set_timelog(); } return true; } diff --git a/keyboards/crkbd/rev1/common/ssd1306.c b/keyboards/crkbd/rev1/common/ssd1306.c deleted file mode 100644 index 4a889da673..0000000000 --- a/keyboards/crkbd/rev1/common/ssd1306.c +++ /dev/null @@ -1,360 +0,0 @@ -#ifdef SSD1306OLED - -#include "ssd1306.h" -#include "i2c_master.h" -#include -#include "print.h" -#ifdef ADAFRUIT_BLE_ENABLE -#include "adafruit_ble.h" -#endif -#ifdef PROTOCOL_LUFA -#include "lufa.h" -#endif -#include "sendchar.h" -#include "timer.h" - -struct CharacterMatrix display; - -extern const unsigned char font[] PROGMEM; - -#ifndef OLED_BLANK_CHAR -#define OLED_BLANK_CHAR ' ' -#endif - -#ifndef OLED_BITS_FILTER -#define OLED_BITS_FILTER -#endif - -// Set this to 1 to help diagnose early startup problems -// when testing power-on with ble. Turn it off otherwise, -// as the latency of printing most of the debug info messes -// with the matrix scan, causing keys to drop. -#define DEBUG_TO_SCREEN 0 - -//static uint16_t last_battery_update; -//static uint32_t vbat; -//#define BatteryUpdateInterval 10000 /* milliseconds */ - -// 'last_flush' is declared as uint16_t, -// so this must be less than 65535 -#ifndef ScreenOffInterval -#define ScreenOffInterval 60000 /* milliseconds */ -#endif - -#if DEBUG_TO_SCREEN -static uint8_t displaying; -#endif -static uint16_t last_flush; - -static bool force_dirty = true; - -// Write command sequence. -// Returns true on success. -static inline bool _send_cmd1(uint8_t cmd) { - bool res = false; - - if (i2c_start(SSD1306_ADDRESS, 100)) { - xprintf("failed to start write to %d\n", SSD1306_ADDRESS); - goto done; - } - - if (i2c_write(0x0 /* command byte follows */, 100)) { - print("failed to write control byte\n"); - - goto done; - } - - if (i2c_write(cmd, 100)) { - xprintf("failed to write command %d\n", cmd); - goto done; - } - res = true; -done: - i2c_stop(); - return res; -} - -#define send_cmd1(c) if (!_send_cmd1(c)) {goto done;} -#define send_cmds(c) if (!_send_cmds(c,sizeof(c))) {goto done;} -#define cmd1(X) X -#define cmd2(X,Y) X,Y -#define cmd3(X,Y,Z) X,Y,Z - -static bool _send_cmds(const uint8_t* p,uint8_t sz) { - for(uint8_t i=sz;i;i--) { - send_cmd1( pgm_read_byte(p++) ); - } - return true; -done: - return false; -} - -#define SEND_CMDS(...) {static const uint8_t _cmds[] PROGMEM = { __VA_ARGS__,0 };send_cmds(_cmds);} - -static void clear_display(void) { - matrix_clear(&display); - - // Clear all of the display bits (there can be random noise - // in the RAM on startup) - SEND_CMDS( - cmd3(PageAddr, 0, (DisplayHeight / 8) - 1), - cmd3(ColumnAddr, 0, DisplayWidth - 1) - ); - - if (i2c_start(SSD1306_ADDRESS, 100)) { - goto done; - } - if (i2c_write(0x40, 100)) { - // Data mode - goto done; - } - for (uint8_t row = MatrixRows;row; row--) { - for (uint8_t col = DisplayWidth; col; col--) { - i2c_write(0, 100); - } - } - - display.dirty = false; - -done: - i2c_stop(); -} - -#if DEBUG_TO_SCREEN -#undef sendchar -static int8_t capture_sendchar(uint8_t c) { - sendchar(c); - iota_gfx_write_char(c); - - if (!displaying) { - iota_gfx_flush(); - } - return 0; -} -#endif - -bool iota_gfx_init(bool rotate) { - bool success = false; - - i2c_init(); - SEND_CMDS( - cmd1(DisplayOff), - cmd2(SetDisplayClockDiv, 0x80), - cmd2(SetMultiPlex, DisplayHeight - 1), - cmd2(SetDisplayOffset, 0), - cmd1(SetStartLine | 0x0), - cmd2(SetChargePump, 0x14 /* Enable */), - cmd2(SetMemoryMode, 0 /* horizontal addressing */) - ); - - if(rotate){ - // the following Flip the display orientation 180 degrees - SEND_CMDS( - cmd1(SegRemap), - cmd1(ComScanInc) - ); - }else{ - // Flips the display orientation 0 degrees - SEND_CMDS( - cmd1(SegRemap | 0x1), - cmd1(ComScanDec) - ); - } - - SEND_CMDS( -#ifdef SSD1306_128X64 - cmd2(SetComPins, 0x12), -#else - cmd2(SetComPins, 0x2), -#endif - cmd2(SetContrast, 0x8f), - cmd2(SetPreCharge, 0xf1), - cmd2(SetVComDetect, 0x40), - cmd1(DisplayAllOnResume), - cmd1(NormalDisplay), - cmd1(DeActivateScroll), - cmd1(DisplayOn), - - cmd2(SetContrast, 0) // Dim - ); - - clear_display(); - - success = true; - - iota_gfx_flush(); - -#if DEBUG_TO_SCREEN - print_set_sendchar(capture_sendchar); -#endif - -done: - return success; -} - -bool iota_gfx_off(void) { - bool success = false; - - send_cmd1(DisplayOff); - success = true; - -done: - return success; -} - -bool iota_gfx_on(void) { - bool success = false; - - send_cmd1(DisplayOn); - success = true; - -done: - return success; -} - -void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c) { - *matrix->cursor = c; - ++matrix->cursor; - - if (matrix->cursor - &matrix->display[0][0] == sizeof(matrix->display)) { - // We went off the end; scroll the display upwards by one line - memmove(&matrix->display[0], &matrix->display[1], - MatrixCols * (MatrixRows - 1)); - matrix->cursor = &matrix->display[MatrixRows - 1][0]; - memset(matrix->cursor, OLED_BLANK_CHAR, MatrixCols); - } -} - -void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c) { - matrix->dirty = true; - - if (c == '\n') { - // Clear to end of line from the cursor and then move to the - // start of the next line - uint8_t cursor_col = (matrix->cursor - &matrix->display[0][0]) % MatrixCols; - - while (cursor_col++ < MatrixCols) { - matrix_write_char_inner(matrix, OLED_BLANK_CHAR); - } - return; - } - - matrix_write_char_inner(matrix, c); -} - -void iota_gfx_write_char(uint8_t c) { - matrix_write_char(&display, c); -} - -void matrix_write(struct CharacterMatrix *matrix, const char *data) { - while (*data) { - matrix_write_char(matrix, *data); - ++data; - } -} - -void matrix_write_ln(struct CharacterMatrix *matrix, const char *data) { - matrix_write(matrix, data); - matrix_write(matrix, "\n"); -} - -void iota_gfx_write(const char *data) { - matrix_write(&display, data); -} - -void matrix_write_P(struct CharacterMatrix *matrix, const char *data) { - while (true) { - uint8_t c = pgm_read_byte(data); - if (c == 0) { - return; - } - matrix_write_char(matrix, c); - ++data; - } -} - -void iota_gfx_write_P(const char *data) { - matrix_write_P(&display, data); -} - -void matrix_clear(struct CharacterMatrix *matrix) { - memset(matrix->display, OLED_BLANK_CHAR, sizeof(matrix->display)); - matrix->cursor = &matrix->display[0][0]; - matrix->dirty = true; -} - -void iota_gfx_clear_screen(void) { - matrix_clear(&display); -} - -void matrix_render(struct CharacterMatrix *matrix) { - last_flush = timer_read(); - iota_gfx_on(); -#if DEBUG_TO_SCREEN - ++displaying; -#endif - - // Move to the home position - SEND_CMDS( - cmd3(PageAddr, 0, MatrixRows - 1), - cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1) - ); - - if (i2c_write(SSD1306_ADDRESS, 100)) { - goto done; - } - if (i2c_write(0x40, 100)) { - // Data mode - goto done; - } - - for (uint8_t row = 0; row < MatrixRows; ++row) { - for (uint8_t col = 0; col < MatrixCols; ++col) { - const uint8_t *glyph = font + (matrix->display[row][col] * FontWidth); - - for (uint8_t glyphCol = 0; glyphCol < FontWidth; ++glyphCol) { - uint8_t colBits = pgm_read_byte(glyph + glyphCol); - i2c_write(colBits OLED_BITS_FILTER, 100); - } - - // 1 column of space between chars (it's not included in the glyph) - //i2c_master_write(0); - } - } - - matrix->dirty = false; - -done: - i2c_stop(); -#if DEBUG_TO_SCREEN - --displaying; -#endif -} - -void iota_gfx_flush(void) { - matrix_render(&display); -} - -__attribute__ ((weak)) -void iota_gfx_task_user(void) { -} - -void iota_gfx_task(void) { - iota_gfx_task_user(); - - if (display.dirty|| force_dirty) { - iota_gfx_flush(); - force_dirty = false; - } - - if (ScreenOffInterval !=0 && timer_elapsed(last_flush) > ScreenOffInterval) { - iota_gfx_off(); - } -} - -bool process_record_gfx(uint16_t keycode, keyrecord_t *record) { - force_dirty = true; - return true; -} - -#endif diff --git a/keyboards/crkbd/rev1/legacy/legacy.h b/keyboards/crkbd/rev1/legacy/legacy.h index 6c6308e592..08dfcefbc1 100644 --- a/keyboards/crkbd/rev1/legacy/legacy.h +++ b/keyboards/crkbd/rev1/legacy/legacy.h @@ -19,3 +19,5 @@ along with this program. If not, see . #pragma once #include "rev1.h" + +extern uint8_t is_master; \ No newline at end of file diff --git a/keyboards/crkbd/rev1/ssd1306.h b/keyboards/crkbd/rev1/legacy/ssd1306.h similarity index 100% rename from keyboards/crkbd/rev1/ssd1306.h rename to keyboards/crkbd/rev1/legacy/ssd1306.h diff --git a/keyboards/crkbd/rev1/rev1.c b/keyboards/crkbd/rev1/rev1.c index 5e4e6560f0..f2df8942ab 100644 --- a/keyboards/crkbd/rev1/rev1.c +++ b/keyboards/crkbd/rev1/rev1.c @@ -87,10 +87,6 @@ led_config_t g_led_config = { { void matrix_init_kb(void) { -#ifdef KEYBOARD_crkbd_rev1_common - is_master = (uint8_t)is_keyboard_master(); -#endif - #ifdef RGB_MATRIX_ENABLE if (!isLeftHand) { g_led_config = (led_config_t){ { diff --git a/keyboards/crkbd/rev1/rev1.h b/keyboards/crkbd/rev1/rev1.h index ce88068e64..c805efccce 100644 --- a/keyboards/crkbd/rev1/rev1.h +++ b/keyboards/crkbd/rev1/rev1.h @@ -18,8 +18,6 @@ along with this program. If not, see . #pragma once -extern uint8_t is_master; - #include "crkbd.h" #if defined(KEYBOARD_crkbd_rev1_legacy) # include "legacy.h" diff --git a/layouts/community/split_3x6_3/drashna/keymap.c b/layouts/community/split_3x6_3/drashna/keymap.c index 30e3958feb..e53d053973 100644 --- a/layouts/community/split_3x6_3/drashna/keymap.c +++ b/layouts/community/split_3x6_3/drashna/keymap.c @@ -16,8 +16,6 @@ #include "drashna.h" -extern uint8_t is_master; - #ifdef RGBLIGHT_ENABLE // Following line allows macro to read current RGB settings extern rgblight_config_t rgblight_config; From a8967778d47012abe9e8eb252e6fb29f566c00cb Mon Sep 17 00:00:00 2001 From: bghull <35785950+bghull@users.noreply.github.com> Date: Tue, 17 Nov 2020 00:21:24 -0500 Subject: [PATCH 079/114] [Keymap] Add user keymaps to qmk master (#10870) * Create user keymaps * Prepare user keymaps for PR Co-authored-by: bghull <35785950+BaneJammin@users.noreply.github.com> --- keyboards/planck/keymaps/bghull/keymap.c | 101 ++++++++++++++++++++++ keyboards/planck/keymaps/bghull/rules.mk | 5 ++ keyboards/preonic/keymaps/bghull/keymap.c | 88 +++++++++++++++++++ keyboards/preonic/keymaps/bghull/rules.mk | 5 ++ 4 files changed, 199 insertions(+) create mode 100644 keyboards/planck/keymaps/bghull/keymap.c create mode 100644 keyboards/planck/keymaps/bghull/rules.mk create mode 100644 keyboards/preonic/keymaps/bghull/keymap.c create mode 100644 keyboards/preonic/keymaps/bghull/rules.mk diff --git a/keyboards/planck/keymaps/bghull/keymap.c b/keyboards/planck/keymaps/bghull/keymap.c new file mode 100644 index 0000000000..3539ac7bf7 --- /dev/null +++ b/keyboards/planck/keymaps/bghull/keymap.c @@ -0,0 +1,101 @@ +/* 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 "keymap_steno.h" + +enum planck_layers { + _QWERTY, + _STENO, + _NUMPAD, + _FUNC +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |NUMPAD| A | S | D | F | G | H | J | K | L | ; : | Enter| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , < | . > | up | / ? | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Es/Ctl|MACROS|STENO | Alt | Bspc | Space | Ctrl | ' " | lt | dn | rt | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_grid( + LGUI_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + MO(_NUMPAD), 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, + LCTL_T(KC_ESC),MO(_FUNC),DF(_STENO), KC_LALT, KC_BSPC, KC_SPC ,_______ , KC_LCTL, KC_QUOT, KC_LEFT, KC_DOWN, KC_RGHT +), + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | FN | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |QWERTY| A | O | | E | U | PWR | RES1 | RES2 | + * `-----------------------------------------------------------------------------------' + */ +[_STENO] = LAYOUT_planck_grid( + STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC , + STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR , + XXXXXXX, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR , + XXXXXXX, XXXXXXX, DF(_QWERTY),STN_A,STN_O, XXXXXXX, XXXXXXX, STN_E, STN_U, STN_PWR, STN_RE1, STN_RE2 +), + +/* + * ,-----------------------------------------------------------------------------------. + * | |RClick| MsU |LClick|WheelU| ( | ) | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | MsL | MsD | MsR |WheelD| [{ | ]} | 4 | 5 | 6 | + | -_ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Mute | VolD | VolU | `~ | _ | = | 1 | 2 | 3 | PgUp | \ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |RESET | | | | | . | Home | PgDn | End | + * `-----------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT_planck_grid( + _______, KC_BTN2, KC_MS_U, KC_BTN1, KC_WH_U, KC_LPRN, KC_RPRN, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, KC_LBRC, KC_RBRC, KC_4, KC_5, KC_6, KC_PPLS, KC_MINS, + _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_GRAVE, KC_UNDS, KC_EQL, KC_1, KC_2, KC_3, KC_PGUP, KC_BSLS, + _______, XXXXXXX, RESET, _______, _______, _______, _______, _______, KC_PDOT, KC_HOME, KC_PGDN, KC_END +), + +/* Dynamic macros + Winkey combos + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | W2 | | | | | | | | | | | RESET| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | W3 | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | W4 | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FUNC] = LAYOUT_planck_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, + LGUI(KC_2), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + LGUI(KC_3), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + LGUI(KC_4), _______, DM_REC1, DM_PLY1, DM_RSTP, _______, _______, _______, _______, _______, _______, _______ +), + +}; diff --git a/keyboards/planck/keymaps/bghull/rules.mk b/keyboards/planck/keymaps/bghull/rules.mk new file mode 100644 index 0000000000..9711c485d7 --- /dev/null +++ b/keyboards/planck/keymaps/bghull/rules.mk @@ -0,0 +1,5 @@ +SRC += muse.c +AUTO_SHIFT_ENABLE = yes +MOUSEKEY_ENABLE = yes +STENO_ENABLE = yes +AUDIO_ENABLE = no \ No newline at end of file diff --git a/keyboards/preonic/keymaps/bghull/keymap.c b/keyboards/preonic/keymaps/bghull/keymap.c new file mode 100644 index 0000000000..9a3ca0af4f --- /dev/null +++ b/keyboards/preonic/keymaps/bghull/keymap.c @@ -0,0 +1,88 @@ +/* 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 "keymap_steno.h" + +enum preonic_layers { + _QWERTY, + _STENO, + _NUMPAD +}; + +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 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |NUMPAD| A | S | D | F | G | H | J | K | L | ; |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | Up | / ? | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Es/Ctl| FUNC | STENO| Alt | Bspc | Space | Ctrl | Left | Down | Right| + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_grid( + _______ , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_QUOT, + KC_TAB , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + MO(_NUMPAD), 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, + LCTL_T(KC_ESC),KC_LGUI, DF(_STENO), KC_LALT, _______, KC_BSPC, _______, KC_SPC, KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT +), + + +/* Steno + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | FN | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |QWERTY| A | O | E | U | PWR | RES1 | RES2 | + * `-----------------------------------------------------------------------------------' + */ +[_STENO] = LAYOUT_preonic_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC , + STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR , + XXXXXXX, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR , + XXXXXXX, XXXXXXX, DF(_QWERTY),STN_A,XXXXXXX, STN_O, XXXXXXX, STN_E, STN_U, STN_PWR, STN_RE1, STN_RE2 +), + +/* + * ,-----------------------------------------------------------------------------------. + * | |RClick| MsU |LClick|WheelU| ( | ) | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | MsL | MsD | MsR |WheelD| [{ | ]} | 4 | 5 | 6 | + | -_ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Mute | VolD | VolU | `~ | _ | = | 1 | 2 | 3 | PgUp | \ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | RESET| | | | | . | Home | PgDn | End | + * `-----------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT_preonic_grid( + _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_BTN2, KC_MS_U, KC_BTN1, KC_WH_U, KC_LPRN, KC_RPRN, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, KC_LBRC, KC_RBRC, KC_4, KC_5, KC_6, KC_PPLS, KC_MINS, + _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_GRAVE, KC_UNDS, KC_EQL, KC_1, KC_2, KC_3, KC_PGUP, KC_BSLS, + _______, XXXXXXX, RESET, _______, _______, _______, _______, _______, KC_PDOT, KC_HOME, KC_PGDN, KC_END +) + +}; diff --git a/keyboards/preonic/keymaps/bghull/rules.mk b/keyboards/preonic/keymaps/bghull/rules.mk new file mode 100644 index 0000000000..9711c485d7 --- /dev/null +++ b/keyboards/preonic/keymaps/bghull/rules.mk @@ -0,0 +1,5 @@ +SRC += muse.c +AUTO_SHIFT_ENABLE = yes +MOUSEKEY_ENABLE = yes +STENO_ENABLE = yes +AUDIO_ENABLE = no \ No newline at end of file From cf3b68323237832f58dad298e301a8bd4e92a57f Mon Sep 17 00:00:00 2001 From: Relocks <33040807+Relocks@users.noreply.github.com> Date: Mon, 16 Nov 2020 21:25:00 -0800 Subject: [PATCH 080/114] [Keyboard] bm16s - Added Via Support (#10863) * Added Via Support and Keymap Via Specific Keymap for BM16s along with correction of the Vendor and Product ID. * Made adjustments for PR 10863 Made adjustments based on feedback from Pull request 10853 for qmk master pull request * Additional update for PR 10853 Same description as previous commit. * Update .vscode/settings.json Updating based on commit suggestion. Co-authored-by: Ryan Co-authored-by: Ryan --- keyboards/bm16s/config.h | 4 +-- keyboards/bm16s/keymaps/via/keymap.c | 43 +++++++++++++++++++++++++++ keyboards/bm16s/keymaps/via/readme.md | 1 + keyboards/bm16s/keymaps/via/rules.mk | 2 ++ 4 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 keyboards/bm16s/keymaps/via/keymap.c create mode 100644 keyboards/bm16s/keymaps/via/readme.md create mode 100644 keyboards/bm16s/keymaps/via/rules.mk diff --git a/keyboards/bm16s/config.h b/keyboards/bm16s/config.h index 379e59bd9d..83f5bbbe89 100755 --- a/keyboards/bm16s/config.h +++ b/keyboards/bm16s/config.h @@ -2,8 +2,8 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 +#define VENDOR_ID 0x4B50 //KP +#define PRODUCT_ID 0x016B #define DEVICE_VER 0x0001 #define MANUFACTURER KPrepublic #define PRODUCT bm16s diff --git a/keyboards/bm16s/keymaps/via/keymap.c b/keyboards/bm16s/keymaps/via/keymap.c new file mode 100644 index 0000000000..71b0d2b0f5 --- /dev/null +++ b/keyboards/bm16s/keymaps/via/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2020 Relocks + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_4x4( + KC_KP_7, KC_KP_8, KC_KP_9, MO(1), + KC_KP_4, KC_KP_5, KC_KP_6, KC_PMNS, + KC_KP_1, KC_KP_2, KC_KP_3, KC_PPLS, + KC_KP_0, KC_PDOT, KC_PCMM, KC_PENT + ), + [1] = LAYOUT_ortho_4x4( + RESET, BL_STEP, KC_TRNS, KC_VOLU, + BL_TOGG, BL_DEC, BL_INC, KC_VOLD, + RGB_TOG, RGB_MOD, RGB_HUI, KC_MUTE, + RGB_SAI, RGB_SAD, RGB_HUD, KC_TRNS + ), + [2] = LAYOUT_ortho_4x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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_ortho_4x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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/bm16s/keymaps/via/readme.md b/keyboards/bm16s/keymaps/via/readme.md new file mode 100644 index 0000000000..f5e43b909c --- /dev/null +++ b/keyboards/bm16s/keymaps/via/readme.md @@ -0,0 +1 @@ +# Via keymap for bm16s diff --git a/keyboards/bm16s/keymaps/via/rules.mk b/keyboards/bm16s/keymaps/via/rules.mk new file mode 100644 index 0000000000..43061db1dd --- /dev/null +++ b/keyboards/bm16s/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file From 10782789bebeca61bedf98a55c2a18503c1855a0 Mon Sep 17 00:00:00 2001 From: Salicylic-acid3 <46864619+Salicylic-acid3@users.noreply.github.com> Date: Tue, 17 Nov 2020 14:25:53 +0900 Subject: [PATCH 081/114] [Keymap] Update for jisplit89 (#10859) Some symbols were not as intended, so they were corrected. --- keyboards/jisplit89/keymaps/default/keymap.c | 4 ++-- keyboards/jisplit89/keymaps/salicylic/keymap.c | 2 +- keyboards/jisplit89/keymaps/via/keymap.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/jisplit89/keymaps/default/keymap.c b/keyboards/jisplit89/keymaps/default/keymap.c index bfbb09898e..e782a4b451 100644 --- a/keyboards/jisplit89/keymaps/default/keymap.c +++ b/keyboards/jisplit89/keymaps/default/keymap.c @@ -35,11 +35,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,-----------------------------------------------------| |--------------------------------------------------------------------------------. 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_PSCR, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| -LT(_ADJUST,KC_ZKHK),KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, JP_EQL, JP_YEN, KC_BSPC, KC_DEL, +LT(_ADJUST,KC_ZKHK),KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, JP_CIRC, JP_YEN, 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, JP_AT, JP_LBRC, KC_ENT, KC_HOME, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_SCLN, JP_QUOT, JP_RBRC, KC_END, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_SCLN, JP_COLN, JP_RBRC, KC_END, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| 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_PGDN, KC_UP, KC_PGUP, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| diff --git a/keyboards/jisplit89/keymaps/salicylic/keymap.c b/keyboards/jisplit89/keymaps/salicylic/keymap.c index e41027961c..a4c7c99f1d 100644 --- a/keyboards/jisplit89/keymaps/salicylic/keymap.c +++ b/keyboards/jisplit89/keymaps/salicylic/keymap.c @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,-----------------------------------------------------| |--------------------------------------------------------------------------------. TD(TD_ESMS), 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_PSCR, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| - KC_ZKHK, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, JP_EQL, JP_YEN, KC_BSPC, KC_DEL, + KC_ZKHK, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, JP_CIRC, JP_YEN, 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, JP_AT, JP_LBRC, KC_ENT, KC_HOME, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| diff --git a/keyboards/jisplit89/keymaps/via/keymap.c b/keyboards/jisplit89/keymaps/via/keymap.c index 61bcadbc7d..b2ceacb0e6 100644 --- a/keyboards/jisplit89/keymaps/via/keymap.c +++ b/keyboards/jisplit89/keymaps/via/keymap.c @@ -27,11 +27,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,-----------------------------------------------------| |--------------------------------------------------------------------------------. 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_PSCR, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| -LT(1,KC_ZKHK),KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, JP_EQL, JP_YEN, KC_BSPC, KC_DEL, +LT(1,KC_ZKHK), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, JP_CIRC, JP_YEN, 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, JP_AT, JP_LBRC, KC_ENT, KC_HOME, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_SCLN, JP_QUOT, JP_RBRC, KC_END, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_SCLN, JP_COLN, JP_RBRC, KC_END, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| 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_PGDN, KC_UP, KC_PGUP, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| From 3c156e130b3e7a24166eb20bf862aaaac8ceff53 Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Tue, 17 Nov 2020 07:35:23 +0200 Subject: [PATCH 082/114] [Keymap] ANAVI Macro Pad 8 fix kodi and default (#10727) Improvements and bug fixes for the keymaps kodi and default for ANAVI Macro Pad 8: - Add space to the end of string "Active layer: " for better visibility on the mini I2C OLED display for both keymaps - Replace "Main" with "Kodi" for the Kodi keymap - Add comment with reference to Kodi documentation for the available shortcuts in this keymap Signed-off-by: Leon Anavi --- .../anavi/macropad8/keymaps/default/keymap.c | 2 +- keyboards/anavi/macropad8/keymaps/kodi/keymap.c | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/keyboards/anavi/macropad8/keymaps/default/keymap.c b/keyboards/anavi/macropad8/keymaps/default/keymap.c index 8cdf90280d..68fbdf0d14 100644 --- a/keyboards/anavi/macropad8/keymaps/default/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/default/keymap.c @@ -25,7 +25,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { void oled_task_user(void) { // Host Keyboard Layer Status oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); - oled_write_P(PSTR("Active layer:"), false); + oled_write_P(PSTR("Active layer: "), false); switch (get_highest_layer(layer_state)) { case _MAIN: diff --git a/keyboards/anavi/macropad8/keymaps/kodi/keymap.c b/keyboards/anavi/macropad8/keymaps/kodi/keymap.c index 17b00807e4..72022a01bb 100644 --- a/keyboards/anavi/macropad8/keymaps/kodi/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/kodi/keymap.c @@ -12,6 +12,18 @@ const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {60, 30, 15}; const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {20, 10, 4}; #endif +/** + * Kodi shortcuts: + * + * ESC - Previous menu OR Home screen + * Enter - Select + * X - Stop + * Arrows to move + * + * For details have a look at: + * https://kodi.wiki/view/Keyboard_controls + */ + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MAIN] = LAYOUT_ortho_2x4( KC_ESC, KC_UP, KC_ENTER, KC_X, @@ -32,11 +44,11 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { void oled_task_user(void) { // Host Keyboard Layer Status oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); - oled_write_P(PSTR("Active layer:"), false); + oled_write_P(PSTR("Active layer: "), false); switch (get_highest_layer(layer_state)) { case _MAIN: - oled_write_ln_P(PSTR("Main"), false); + oled_write_ln_P(PSTR("Kodi"), false); break; case _FN: oled_write_ln_P(PSTR("FN"), false); From adfd34c4512f6215a49a8f705ce408d6c82fb8cc Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 17 Nov 2020 17:06:23 +0000 Subject: [PATCH 083/114] Refactor to use led config - Part 2 (#10906) * Refactor to use led config * Refactor to use led config * Refactor to use led config --- keyboards/bpiphany/kitten_paw/config.h | 7 ++- keyboards/bpiphany/kitten_paw/kitten_paw.c | 50 --------------- keyboards/bpiphany/kitten_paw/kitten_paw.h | 11 ---- keyboards/bpiphany/tiger_lily/config.h | 5 ++ keyboards/bpiphany/tiger_lily/tiger_lily.c | 62 ------------------- keyboards/bpiphany/unloved_bastard/config.h | 5 ++ .../unloved_bastard/unloved_bastard.c | 54 ---------------- keyboards/gray_studio/space65/config.h | 6 +- keyboards/gray_studio/space65/space65.c | 33 ---------- .../gray_studio/think65/hotswap/config.h | 5 ++ .../gray_studio/think65/hotswap/hotswap.c | 55 ---------------- keyboards/kbdfans/kbd19x/config.h | 5 ++ keyboards/kbdfans/kbd19x/kbd19x.c | 54 ---------------- keyboards/kbdfans/kbd19x/kbd19x.h | 12 ++-- keyboards/kbdfans/kbd67/rev1/config.h | 2 + keyboards/kbdfans/kbd67/rev1/rev1.c | 35 ----------- keyboards/kbdfans/kbd6x/config.h | 3 + keyboards/kbdfans/kbd6x/kbd6x.c | 33 ---------- keyboards/kbdfans/kbd75/config.h | 3 + keyboards/kbdfans/kbd75/rev1/rev1.c | 16 ----- keyboards/kbdfans/kbd75/rev2/rev2.c | 16 ----- keyboards/kbdfans/kbd8x/config.h | 5 ++ keyboards/kbdfans/kbd8x/kbd8x.c | 55 ---------------- keyboards/kbdfans/kbd8x/kbd8x.h | 13 ++-- keyboards/kbdfans/kbd8x_mk2/config.h | 8 +-- keyboards/kbdfans/kbd8x_mk2/kbd8x_mk2.c | 55 ---------------- keyboards/kbdfans/kbdpad_mk2/config.h | 6 +- keyboards/kbdfans/kbdpad_mk2/kbdpad_mk2.c | 45 -------------- 28 files changed, 59 insertions(+), 600 deletions(-) diff --git a/keyboards/bpiphany/kitten_paw/config.h b/keyboards/bpiphany/kitten_paw/config.h index 89f104cfea..5e1429c8d5 100644 --- a/keyboards/bpiphany/kitten_paw/config.h +++ b/keyboards/bpiphany/kitten_paw/config.h @@ -47,7 +47,12 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW - + +#define LED_NUM_LOCK_PIN B7 +#define LED_CAPS_LOCK_PIN C6 +#define LED_SCROLL_LOCK_PIN C5 +#define LED_PIN_ON_STATE 0 + // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/bpiphany/kitten_paw/kitten_paw.c b/keyboards/bpiphany/kitten_paw/kitten_paw.c index 26cb533f2d..e71b3c8011 100644 --- a/keyboards/bpiphany/kitten_paw/kitten_paw.c +++ b/keyboards/bpiphany/kitten_paw/kitten_paw.c @@ -1,51 +1 @@ #include "kitten_paw.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(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -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 - CONFIG_LED_IO; - CONFIG_LED_IO; - print_dec(usb_led); - if (usb_led & (1<. */ #define UNUSED_PINS { B0, C4, D3 } +#define LED_NUM_LOCK_PIN C5 +#define LED_CAPS_LOCK_PIN C6 +#define LED_SCROLL_LOCK_PIN B7 +#define LED_PIN_ON_STATE 0 + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/bpiphany/tiger_lily/tiger_lily.c b/keyboards/bpiphany/tiger_lily/tiger_lily.c index d2e7ba7095..f57f8b5f50 100644 --- a/keyboards/bpiphany/tiger_lily/tiger_lily.c +++ b/keyboards/bpiphany/tiger_lily/tiger_lily.c @@ -1,63 +1 @@ #include "tiger_lily.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) { - DDRB |= (1<<7); - DDRC |= (1<<5) | (1<<6); - - print_dec(usb_led); - - if (usb_led & (1<. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 +#define LED_NUM_LOCK_PIN B7 +#define LED_CAPS_LOCK_PIN C5 +#define LED_SCROLL_LOCK_PIN C6 +#define LED_PIN_ON_STATE 0 + /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/bpiphany/unloved_bastard/unloved_bastard.c b/keyboards/bpiphany/unloved_bastard/unloved_bastard.c index 1975930603..f4b8032a01 100644 --- a/keyboards/bpiphany/unloved_bastard/unloved_bastard.c +++ b/keyboards/bpiphany/unloved_bastard/unloved_bastard.c @@ -14,57 +14,3 @@ * along with this program. If not, see . */ #include "unloved_bastard.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - led_init_ports(); - 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); -} - -// C5 left -// C6 middle led -// B7 right led -void led_init_ports(void) { - DDRB |= (1<<7); - DDRC |= (1<<5); - DDRC |= (1<<6); - - PORTB |= (1<<7); - PORTC |= (1<<5); - PORTC |= (1<<6); -} - - -void led_set_kb(uint8_t usb_led) { - - if (usb_led & (1<. /* 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 LED_CAPS_LOCK_PIN E6 +#define LED_PIN_ON_STATE 0 #define BACKLIGHT_PIN B7 #define BACKLIGHT_BREATHING diff --git a/keyboards/gray_studio/space65/space65.c b/keyboards/gray_studio/space65/space65.c index 74a86a202d..d27a1f38c3 100644 --- a/keyboards/gray_studio/space65/space65.c +++ b/keyboards/gray_studio/space65/space65.c @@ -14,36 +14,3 @@ * along with this program. If not, see . */ #include "space65.h" - -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 - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(E6); - } else { - writePinHigh(E6); - } - - led_set_user(usb_led); -} diff --git a/keyboards/gray_studio/think65/hotswap/config.h b/keyboards/gray_studio/think65/hotswap/config.h index 05a818a731..5fe35201ac 100644 --- a/keyboards/gray_studio/think65/hotswap/config.h +++ b/keyboards/gray_studio/think65/hotswap/config.h @@ -46,6 +46,11 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW +#define LED_NUM_LOCK_PIN C6 +#define LED_CAPS_LOCK_PIN C7 +#define LED_SCROLL_LOCK_PIN F7 +#define LED_PIN_ON_STATE 0 + #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLED_NUM 22 diff --git a/keyboards/gray_studio/think65/hotswap/hotswap.c b/keyboards/gray_studio/think65/hotswap/hotswap.c index 07cdc8b1f7..60808979c9 100644 --- a/keyboards/gray_studio/think65/hotswap/hotswap.c +++ b/keyboards/gray_studio/think65/hotswap/hotswap.c @@ -14,58 +14,3 @@ * 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(C6); - setPinOutput(C7); - setPinOutput(F7); - - 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)) { - writePinLow(C7); - } else { - writePinHigh(C7); - } - - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinLow(C6); - } else { - writePinHigh(C6); - } - - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinLow(F7); - } else { - writePinHigh(F7); - } - - led_set_user(usb_led); -} - diff --git a/keyboards/kbdfans/kbd19x/config.h b/keyboards/kbdfans/kbd19x/config.h index 1146afa628..c0cea36ffb 100644 --- a/keyboards/kbdfans/kbd19x/config.h +++ b/keyboards/kbdfans/kbd19x/config.h @@ -47,6 +47,11 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW + +#define LED_NUM_LOCK_PIN B2 +#define LED_CAPS_LOCK_PIN B0 +#define LED_SCROLL_LOCK_PIN B1 + #define BACKLIGHT_PIN B6 #ifdef BACKLIGHT_PIN #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/kbdfans/kbd19x/kbd19x.c b/keyboards/kbdfans/kbd19x/kbd19x.c index e6cd77d656..bdaf1a507a 100644 --- a/keyboards/kbdfans/kbd19x/kbd19x.c +++ b/keyboards/kbdfans/kbd19x/kbd19x.c @@ -16,57 +16,3 @@ along with this program. If not, see . */ #include "kbd19x.h" - -extern inline void kbd19x_caps_led_on(void); -extern inline void kbd19x_caps_led_off(void); - -extern inline void kbd19x_sclk_led_on(void); -extern inline void kbd19x_sclk_led_off(void); - -extern inline void kbd19x_nmlk_led_on(void); -extern inline void kbd19x_nmlk_led_off(void); - -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 - - if (usb_led & (1<. #include "quantum.h" #include "led.h" -inline void kbd19x_caps_led_on(void) { DDRB |= (1<<0); PORTB &= ~(1<<0); } -inline void kbd19x_caps_led_off(void) { DDRB &= ~(1<<0); PORTB &= ~(1<<0); } +inline void kbd19x_caps_led_on(void) { writePinHigh(LED_CAPS_LOCK_PIN); } +inline void kbd19x_caps_led_off(void) { writePinLow(LED_CAPS_LOCK_PIN); } -inline void kbd19x_sclk_led_on(void) { DDRB |= (1<<1); PORTB &= ~(1<<1); } -inline void kbd19x_sclk_led_off(void) { DDRB &= ~(1<<1); PORTB &= ~(1<<1); } +inline void kbd19x_sclk_led_on(void) { writePinHigh(LED_SCROLL_LOCK_PIN); } +inline void kbd19x_sclk_led_off(void) { writePinLow(LED_SCROLL_LOCK_PIN); } -inline void kbd19x_nmlk_led_on(void) { DDRB |= (1<<2); PORTB &= ~(1<<2); } -inline void kbd19x_nmlk_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } +inline void kbd19x_nmlk_led_on(void) { writePinHigh(LED_NUM_LOCK_PIN); } +inline void kbd19x_nmlk_led_off(void) { writePinLow(LED_NUM_LOCK_PIN); } // readability #define XXX KC_NO diff --git a/keyboards/kbdfans/kbd67/rev1/config.h b/keyboards/kbdfans/kbd67/rev1/config.h index 86ef3b8139..a713143a4e 100644 --- a/keyboards/kbdfans/kbd67/rev1/config.h +++ b/keyboards/kbdfans/kbd67/rev1/config.h @@ -48,6 +48,8 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN B2 + #define BACKLIGHT_PIN B6 #ifdef BACKLIGHT_PIN #define BACKLIGHT_BREATHING diff --git a/keyboards/kbdfans/kbd67/rev1/rev1.c b/keyboards/kbdfans/kbd67/rev1/rev1.c index 94cb9e553b..489e856837 100644 --- a/keyboards/kbdfans/kbd67/rev1/rev1.c +++ b/keyboards/kbdfans/kbd67/rev1/rev1.c @@ -14,38 +14,3 @@ * 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 - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 2); - PORTB &= ~(1 << 2); - } else { - DDRB &= ~(1 << 2); - PORTB &= ~(1 << 2); - } - - led_set_user(usb_led); -} diff --git a/keyboards/kbdfans/kbd6x/config.h b/keyboards/kbdfans/kbd6x/config.h index 32a625f71e..03c4aaaea4 100644 --- a/keyboards/kbdfans/kbd6x/config.h +++ b/keyboards/kbdfans/kbd6x/config.h @@ -47,6 +47,9 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW + +#define LED_CAPS_LOCK_PIN B6 + #define BACKLIGHT_PIN B7 #ifdef BACKLIGHT_PIN #define BACKLIGHT_BREATHING diff --git a/keyboards/kbdfans/kbd6x/kbd6x.c b/keyboards/kbdfans/kbd6x/kbd6x.c index f558af0304..3797822d4a 100644 --- a/keyboards/kbdfans/kbd6x/kbd6x.c +++ b/keyboards/kbdfans/kbd6x/kbd6x.c @@ -14,36 +14,3 @@ * along with this program. If not, see . */ #include "kbd6x.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) { - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 6); - PORTB &= ~(1 << 6); - } else { - DDRB &= ~(1 << 6); - PORTB &= ~(1 << 6); - } - - led_set_user(usb_led); -} \ No newline at end of file diff --git a/keyboards/kbdfans/kbd75/config.h b/keyboards/kbdfans/kbd75/config.h index d46ca75351..1d30d7abf1 100644 --- a/keyboards/kbdfans/kbd75/config.h +++ b/keyboards/kbdfans/kbd75/config.h @@ -20,6 +20,9 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN B2 +#define LED_PIN_ON_STATE 0 + /* number of backlight levels */ #define BACKLIGHT_PIN B6 #ifdef BACKLIGHT_PIN diff --git a/keyboards/kbdfans/kbd75/rev1/rev1.c b/keyboards/kbdfans/kbd75/rev1/rev1.c index 151e395e3c..520a869e57 100644 --- a/keyboards/kbdfans/kbd75/rev1/rev1.c +++ b/keyboards/kbdfans/kbd75/rev1/rev1.c @@ -1,17 +1 @@ #include "rev1.h" - -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(B2); - } else { - writePinHigh(B2); - } - - led_set_user(usb_led); -} - -void matrix_init_kb(void) { - setPinOutput(B2); - matrix_init_user(); -} diff --git a/keyboards/kbdfans/kbd75/rev2/rev2.c b/keyboards/kbdfans/kbd75/rev2/rev2.c index bf91d40092..b1af81707d 100644 --- a/keyboards/kbdfans/kbd75/rev2/rev2.c +++ b/keyboards/kbdfans/kbd75/rev2/rev2.c @@ -1,17 +1 @@ #include "rev2.h" - -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(B2); - } else { - writePinHigh(B2); - } - - led_set_user(usb_led); -} - -void matrix_init_kb(void) { - setPinOutput(B2); - matrix_init_user(); -} diff --git a/keyboards/kbdfans/kbd8x/config.h b/keyboards/kbdfans/kbd8x/config.h index 5c16274942..71daac15f2 100644 --- a/keyboards/kbdfans/kbd8x/config.h +++ b/keyboards/kbdfans/kbd8x/config.h @@ -47,6 +47,11 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW + +#define LED_NUM_LOCK_PIN B1 +#define LED_CAPS_LOCK_PIN B3 +#define LED_SCROLL_LOCK_PIN B2 + #define BACKLIGHT_PIN B6 #ifdef BACKLIGHT_PIN #define BACKLIGHT_BREATHING diff --git a/keyboards/kbdfans/kbd8x/kbd8x.c b/keyboards/kbdfans/kbd8x/kbd8x.c index 97c2e74e3a..c19981dbc4 100644 --- a/keyboards/kbdfans/kbd8x/kbd8x.c +++ b/keyboards/kbdfans/kbd8x/kbd8x.c @@ -15,58 +15,3 @@ */ #include "kbd8x.h" - -extern inline void caps_led_off(void); -extern inline void caps_led_on(void); -extern inline void num_led_off(void); -extern inline void num_led_on(void); -extern inline void scroll_led_off(void); -extern inline void scroll_led_on(void); - -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 - - if(usb_led & (1<. /* 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 LED_CAPS_LOCK_PIN E6 +#define LED_SCROLL_LOCK_PIN B2 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN B7 #ifdef BACKLIGHT_PIN #define BACKLIGHT_BREATHING diff --git a/keyboards/kbdfans/kbd8x_mk2/kbd8x_mk2.c b/keyboards/kbdfans/kbd8x_mk2/kbd8x_mk2.c index 1472707234..0a36e3109d 100644 --- a/keyboards/kbdfans/kbd8x_mk2/kbd8x_mk2.c +++ b/keyboards/kbdfans/kbd8x_mk2/kbd8x_mk2.c @@ -14,58 +14,3 @@ * 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/kbdpad_mk2/config.h b/keyboards/kbdfans/kbdpad_mk2/config.h index a7dae0a703..991475c108 100644 --- a/keyboards/kbdfans/kbdpad_mk2/config.h +++ b/keyboards/kbdfans/kbdpad_mk2/config.h @@ -48,10 +48,8 @@ along with this program. If not, see . /* 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 LED_CAPS_LOCK_PIN B4 +#define LED_PIN_ON_STATE 0 #define BACKLIGHT_PIN B7 #ifdef BACKLIGHT_PIN diff --git a/keyboards/kbdfans/kbdpad_mk2/kbdpad_mk2.c b/keyboards/kbdfans/kbdpad_mk2/kbdpad_mk2.c index 3ca8e0c735..1d6e1642b9 100644 --- a/keyboards/kbdfans/kbdpad_mk2/kbdpad_mk2.c +++ b/keyboards/kbdfans/kbdpad_mk2/kbdpad_mk2.c @@ -14,48 +14,3 @@ * 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); -} - -*/ From ddcb1794fa83e62e5e48536f4bc02ada63da411a Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 17 Nov 2020 17:06:30 +0000 Subject: [PATCH 084/114] Refactor to use led config - Part 1 (#10905) * Refactor to use led config * Refactor to use led config * Refactor to use led config * Refactor to use led config * Refactor to use led config --- keyboards/1upkeyboards/1up60hte/1up60hte.c | 16 ------ keyboards/1upkeyboards/1up60hte/config.h | 3 + keyboards/alf/dc60/config.h | 3 + keyboards/alf/dc60/dc60.c | 33 ----------- keyboards/alf/x11/config.h | 8 +-- keyboards/alf/x11/x11.c | 48 ---------------- keyboards/amj60/amj60.c | 29 ---------- keyboards/amj60/config.h | 8 ++- keyboards/cutie_club/wraith/config.h | 6 +- keyboards/cutie_club/wraith/wraith.c | 25 +-------- keyboards/dz60/config.h | 3 + keyboards/dz60/dz60.c | 20 ------- keyboards/jd40/jd40.c | 25 --------- keyboards/mechkeys/mk60/config.h | 3 + keyboards/mechkeys/mk60/mk60.c | 34 ------------ keyboards/moon/config.h | 3 + keyboards/moon/moon.c | 53 ------------------ keyboards/mt980/config.h | 5 ++ keyboards/mt980/mt980.c | 64 ---------------------- keyboards/omnikeyish/config.h | 6 +- keyboards/omnikeyish/omnikeyish.c | 25 --------- keyboards/tkc/m0lly/config.h | 4 ++ keyboards/tkc/m0lly/m0lly.c | 62 ++------------------- keyboards/tkc/tkc1800/config.h | 4 ++ keyboards/tkc/tkc1800/tkc1800.c | 62 ++------------------- keyboards/xd84/config.h | 3 + keyboards/xd84/xd84.c | 16 ------ keyboards/xd84pro/config.h | 3 + keyboards/xd84pro/xd84pro.c | 14 ----- keyboards/xd96/config.h | 4 ++ keyboards/xd96/xd96.c | 26 --------- keyboards/yd68/config.h | 3 + keyboards/yd68/yd68.c | 57 ++++--------------- keyboards/z150_bh/config.h | 4 ++ keyboards/z150_bh/z150_bh.c | 31 ----------- 35 files changed, 84 insertions(+), 629 deletions(-) diff --git a/keyboards/1upkeyboards/1up60hte/1up60hte.c b/keyboards/1upkeyboards/1up60hte/1up60hte.c index 3af0e9d400..460e42a0e5 100644 --- a/keyboards/1upkeyboards/1up60hte/1up60hte.c +++ b/keyboards/1upkeyboards/1up60hte/1up60hte.c @@ -16,19 +16,3 @@ along with this program. If not, see . */ #include "1up60hte.h" - -void keyboard_pre_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - setPinOutput(B6); - keyboard_pre_init_user(); -} - -void led_set_kb(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(B6); - } else { - writePinHigh(B6); - } - led_set_user(usb_led); -} \ No newline at end of file diff --git a/keyboards/1upkeyboards/1up60hte/config.h b/keyboards/1upkeyboards/1up60hte/config.h index 8c4d2fc308..c3ba030de9 100644 --- a/keyboards/1upkeyboards/1up60hte/config.h +++ b/keyboards/1upkeyboards/1up60hte/config.h @@ -40,6 +40,9 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN B6 +#define LED_PIN_ON_STATE 0 + /* number of backlight levels */ #define BACKLIGHT_PIN B7 #ifdef BACKLIGHT_PIN diff --git a/keyboards/alf/dc60/config.h b/keyboards/alf/dc60/config.h index b4cff82d41..098891eee0 100644 --- a/keyboards/alf/dc60/config.h +++ b/keyboards/alf/dc60/config.h @@ -48,6 +48,9 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN B7 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN B6 #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 5 diff --git a/keyboards/alf/dc60/dc60.c b/keyboards/alf/dc60/dc60.c index 70979adf4e..4096d10a64 100644 --- a/keyboards/alf/dc60/dc60.c +++ b/keyboards/alf/dc60/dc60.c @@ -14,36 +14,3 @@ * along with this program. If not, see . */ #include "dc60.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) { - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 7); - PORTB &= ~(1 << 7); - } else { - DDRB &= ~(1 << 7); - PORTB &= ~(1 << 7); - } - - led_set_user(usb_led); -} diff --git a/keyboards/alf/x11/config.h b/keyboards/alf/x11/config.h index fcf4e85a9f..cd98935090 100644 --- a/keyboards/alf/x11/config.h +++ b/keyboards/alf/x11/config.h @@ -48,10 +48,10 @@ along with this program. If not, see . /* 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 LED_NUM_LOCK_PIN E6 +#define LED_CAPS_LOCK_PIN C6 +#define LED_SCROLL_LOCK_PIN C7 +#define LED_PIN_ON_STATE 0 #define BACKLIGHT_PIN B7 #define BACKLIGHT_BREATHING diff --git a/keyboards/alf/x11/x11.c b/keyboards/alf/x11/x11.c index 9699918d5b..28e77ecd3f 100644 --- a/keyboards/alf/x11/x11.c +++ b/keyboards/alf/x11/x11.c @@ -14,51 +14,3 @@ * along with this program. If not, see . */ #include "x11.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - setPinOutput(C6); - setPinOutput(E6); - setPinOutput(C7); - 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)) { - writePinLow(C6); - } else { - writePinHigh(C6); - } - - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinLow(E6); - } else { - writePinHigh(E6); - } - - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinLow(C7); - } else { - writePinHigh(C7); - } - - led_set_user(usb_led); -} diff --git a/keyboards/amj60/amj60.c b/keyboards/amj60/amj60.c index 993a5917db..02aa116d54 100644 --- a/keyboards/amj60/amj60.c +++ b/keyboards/amj60/amj60.c @@ -1,30 +1 @@ #include "amj60.h" -#include "led.h" - -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 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 - DDRB |= (1<<2); -} - -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1<. #define MATRIX_COL_PINS { F1, F0, E6, C7, C6, B0, D4, B1, B7, B5, B4, D7, D6, B3} #define UNUSED_PINS -#define BACKLIGHT_PIN B6 - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN B2 +#define LED_PIN_ON_STATE 0 + +#define BACKLIGHT_PIN B6 + + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/cutie_club/wraith/config.h b/keyboards/cutie_club/wraith/config.h index a5d3f0ebc6..e1d2d51d6e 100644 --- a/keyboards/cutie_club/wraith/config.h +++ b/keyboards/cutie_club/wraith/config.h @@ -48,10 +48,8 @@ along with this program. If not, see . /* 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 LED_CAPS_LOCK_PIN B3 +#define LED_PIN_ON_STATE 0 // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING diff --git a/keyboards/cutie_club/wraith/wraith.c b/keyboards/cutie_club/wraith/wraith.c index 95265384ee..cb2d1911c7 100644 --- a/keyboards/cutie_club/wraith/wraith.c +++ b/keyboards/cutie_club/wraith/wraith.c @@ -15,29 +15,8 @@ */ #include "wraith.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) { - setPinOutput(B3); - setPinOutput(B0); - matrix_init_user(); -} + setPinOutput(B0); -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)) { - writePinLow(B3); - } else { - writePinHigh(B3); - } - led_set_user(usb_led); + matrix_init_user(); } diff --git a/keyboards/dz60/config.h b/keyboards/dz60/config.h index 3699ef7552..24fd63836d 100644 --- a/keyboards/dz60/config.h +++ b/keyboards/dz60/config.h @@ -30,6 +30,9 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN B2 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN B6 #define BACKLIGHT_LEVELS 5 diff --git a/keyboards/dz60/dz60.c b/keyboards/dz60/dz60.c index 936d027a31..23db2e4d75 100644 --- a/keyboards/dz60/dz60.c +++ b/keyboards/dz60/dz60.c @@ -1,21 +1 @@ #include "dz60.h" - -void matrix_init_kb(void) { - matrix_init_user(); - led_init_ports(); -}; - -void led_init_ports(void) { - setPinOutput(B2); - writePinHigh(B2); -} - -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - writePinLow(B2); - } else { - writePinHigh(B2); - } - - led_set_user(usb_led); -} diff --git a/keyboards/jd40/jd40.c b/keyboards/jd40/jd40.c index fa06356d97..1b68ddd4f3 100644 --- a/keyboards/jd40/jd40.c +++ b/keyboards/jd40/jd40.c @@ -1,26 +1 @@ #include "jd40.h" - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - - // if (usb_led & (1<. */ #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +#define LED_CAPS_LOCK_PIN B7 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN B6 #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 6 diff --git a/keyboards/mechkeys/mk60/mk60.c b/keyboards/mechkeys/mk60/mk60.c index 4c6a059f4c..7ec8bff22b 100644 --- a/keyboards/mechkeys/mk60/mk60.c +++ b/keyboards/mechkeys/mk60/mk60.c @@ -14,37 +14,3 @@ * along with this program. If not, see . */ #include "mk60.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - setPinOutput(B7); - - 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)){ - writePinLow(B7); - }else { - writePinHigh(B7); - } - - led_set_user(usb_led); -} diff --git a/keyboards/moon/config.h b/keyboards/moon/config.h index a02cfdba16..12a949a076 100644 --- a/keyboards/moon/config.h +++ b/keyboards/moon/config.h @@ -31,6 +31,9 @@ along with this program. If not, see . #define MATRIX_ROWS 8 #define MATRIX_COLS 11 +#define LED_CAPS_LOCK_PIN B5 +#define LED_SCROLL_LOCK_PIN B6 + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/moon/moon.c b/keyboards/moon/moon.c index c218bf5ef1..95ce007e2b 100644 --- a/keyboards/moon/moon.c +++ b/keyboards/moon/moon.c @@ -14,56 +14,3 @@ * 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/mt980/config.h b/keyboards/mt980/config.h index 6b8b952952..56927be705 100644 --- a/keyboards/mt980/config.h +++ b/keyboards/mt980/config.h @@ -22,6 +22,11 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL +#define LED_NUM_LOCK_PIN C6 +#define LED_CAPS_LOCK_PIN C7 +#define LED_SCROLL_LOCK_PIN B5 +#define LED_PIN_ON_STATE 0 + /* number of backlight levels */ #define BACKLIGHT_PIN B6 #ifdef BACKLIGHT_PIN diff --git a/keyboards/mt980/mt980.c b/keyboards/mt980/mt980.c index 5461a3b21f..69f7cc491a 100644 --- a/keyboards/mt980/mt980.c +++ b/keyboards/mt980/mt980.c @@ -1,65 +1 @@ #include "mt980.h" - -__attribute__ ((weak)) -void matrix_init_keymap(void) {} - -__attribute__ ((weak)) -void matrix_scan_keymap(void) {} - -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} -__attribute__ ((weak)) -uint32_t layer_state_set_keymap (uint32_t state) { - return state; -} -__attribute__ ((weak)) -void led_set_keymap(uint8_t usb_led) {} - -void matrix_init_user(void) { - matrix_init_keymap(); -} - -void matrix_scan_user(void) { - matrix_scan_keymap(); -} - -void keyboard_pre_init_user(void) { - /* Set NUMLOCK indicator pin as output */ - setPinOutput(C6); - /* Set CAPSLOCK indicator pin as output */ - setPinOutput(C7); - /* Set SCROLLOCK indicator pin as output */ - setPinOutput(B5); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return process_record_keymap(keycode, record); -} - -void led_set_user(uint8_t usb_led) { - - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinLow(C6); - } - else { - writePinHigh(C6); - } - - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(C7); - } - else { - writePinHigh(C7); - } - - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinLow(B5); - } - else { - writePinHigh(B5); - } - - led_set_keymap(usb_led); -} diff --git a/keyboards/omnikeyish/config.h b/keyboards/omnikeyish/config.h index d510c64c9b..1bce90526f 100644 --- a/keyboards/omnikeyish/config.h +++ b/keyboards/omnikeyish/config.h @@ -24,9 +24,9 @@ #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 +#define LED_NUM_LOCK_PIN E0 +#define LED_CAPS_LOCK_PIN E1 +#define LED_SCROLL_LOCK_PIN B7 /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL diff --git a/keyboards/omnikeyish/omnikeyish.c b/keyboards/omnikeyish/omnikeyish.c index d7b68d41ab..9b8ce7b972 100644 --- a/keyboards/omnikeyish/omnikeyish.c +++ b/keyboards/omnikeyish/omnikeyish.c @@ -1,11 +1,6 @@ #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(); } @@ -33,23 +28,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { 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/tkc/m0lly/config.h b/keyboards/tkc/m0lly/config.h index 29bd8411e3..77480995c8 100644 --- a/keyboards/tkc/m0lly/config.h +++ b/keyboards/tkc/m0lly/config.h @@ -43,6 +43,10 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define LED_NUM_LOCK_PIN D2 +#define LED_CAPS_LOCK_PIN D3 +#define LED_SCROLL_LOCK_PIN D4 + #define BACKLIGHT_PIN B6 #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/tkc/m0lly/m0lly.c b/keyboards/tkc/m0lly/m0lly.c index e47f9531e1..e04407a35b 100644 --- a/keyboards/tkc/m0lly/m0lly.c +++ b/keyboards/tkc/m0lly/m0lly.c @@ -14,63 +14,13 @@ * along with this program. If not, see . */ #include "m0lly.h" -#include "led.h" void keyboard_pre_init_kb(void) { - setPinInputHigh(D0); - setPinInputHigh(D1); + setPinInputHigh(D0); + setPinInputHigh(D1); - keyboard_pre_init_user(); + setPinOutput(B7); + writePinHigh(B7); + + keyboard_pre_init_user(); } - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - led_init_ports(); - 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_init_ports(void) { - DDRD |= (1<<2) | (1<<3) | (1<<4); // OUT - DDRB |= (1<<7); // OUT - PORTB |= (1<<7); -} - -void led_set_kb(uint8_t usb_led) { -// led_set_user(usb_led); - if (usb_led & (1<. /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define LED_NUM_LOCK_PIN D2 +#define LED_CAPS_LOCK_PIN D3 +#define LED_SCROLL_LOCK_PIN D4 + #define BACKLIGHT_PIN B6 #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/tkc/tkc1800/tkc1800.c b/keyboards/tkc/tkc1800/tkc1800.c index 4232c97d54..08e4e0bb3b 100644 --- a/keyboards/tkc/tkc1800/tkc1800.c +++ b/keyboards/tkc/tkc1800/tkc1800.c @@ -14,63 +14,13 @@ * along with this program. If not, see . */ #include "tkc1800.h" -#include "led.h" void keyboard_pre_init_kb(void) { - setPinInputHigh(D0); - setPinInputHigh(D1); + setPinInputHigh(D0); + setPinInputHigh(D1); - keyboard_pre_init_user(); + setPinOutput(B7); + writePinHigh(B7); + + keyboard_pre_init_user(); } - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - led_init_ports(); - 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_init_ports(void) { - DDRD |= (1<<2) | (1<<3) | (1<<4); // OUT - DDRB |= (1<<7); // OUT - PORTB |= (1<<7); -} - -void led_set_kb(uint8_t usb_led) { -// led_set_user(usb_led); - if (usb_led & (1<. */ #include "xd84.h" - -void keyboard_pre_init_kb(void) { - setPinOutput(B6); - - keyboard_pre_init_user(); -} - -void led_set_kb(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(B6); - } else { - writePinHigh(B6); - } - - led_set_user(usb_led); -} diff --git a/keyboards/xd84pro/config.h b/keyboards/xd84pro/config.h index 7fd4496fe3..01f410ea6b 100644 --- a/keyboards/xd84pro/config.h +++ b/keyboards/xd84pro/config.h @@ -35,6 +35,9 @@ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN B2 +#define LED_PIN_ON_STATE 0 + #define RGB_DI_PIN F6 #ifdef RGB_DI_PIN #define RGBLED_NUM 12 diff --git a/keyboards/xd84pro/xd84pro.c b/keyboards/xd84pro/xd84pro.c index cba8a57f26..0eb52fda0f 100644 --- a/keyboards/xd84pro/xd84pro.c +++ b/keyboards/xd84pro/xd84pro.c @@ -14,17 +14,3 @@ * along with this program. If not, see . */ #include "xd84pro.h" - -void keyboard_pre_init_kb(void) { - led_init_ports(); - keyboard_pre_init_user(); -} -void led_init_ports(void) { - setPinOutput(B2); -} -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - writePin(B2, !led_state.caps_lock); - } - return false; -} \ No newline at end of file diff --git a/keyboards/xd96/config.h b/keyboards/xd96/config.h index 799b835df0..cf6fec1b96 100644 --- a/keyboards/xd96/config.h +++ b/keyboards/xd96/config.h @@ -47,6 +47,10 @@ /* COL2ROW, ROW2COL */ //#define DIODE_DIRECTION COL2ROW +#define LED_NUM_LOCK_PIN C6 +#define LED_CAPS_LOCK_PIN B6 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN B5 #define BACKLIGHT_LEVELS 10 // #define BACKLIGHT_BREATHING diff --git a/keyboards/xd96/xd96.c b/keyboards/xd96/xd96.c index e2af9f1004..2c67ee3d7c 100644 --- a/keyboards/xd96/xd96.c +++ b/keyboards/xd96/xd96.c @@ -14,29 +14,3 @@ * along with this program. If not, see . */ #include "xd96.h" - -#define CAPS_PIN B6 -#define NUMLOCK_PIN C6 - -void keyboard_pre_init_kb(void) { - setPinOutput(CAPS_PIN); - setPinOutput(NUMLOCK_PIN); - - keyboard_pre_init_user(); -} - -void led_set_kb(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(CAPS_PIN); - } else { - writePinHigh(CAPS_PIN); - } - - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinLow(NUMLOCK_PIN); - } else { - writePinHigh(NUMLOCK_PIN); - } - - led_set_user(usb_led); -} diff --git a/keyboards/yd68/config.h b/keyboards/yd68/config.h index 17461c5dc3..7b4a43bfde 100644 --- a/keyboards/yd68/config.h +++ b/keyboards/yd68/config.h @@ -48,6 +48,9 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN D4 +#define LED_PIN_ON_STATE 0 + // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/yd68/yd68.c b/keyboards/yd68/yd68.c index f34661dd37..22f75f7f81 100644 --- a/keyboards/yd68/yd68.c +++ b/keyboards/yd68/yd68.c @@ -15,59 +15,22 @@ */ #include "yd68.h" -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - //Capslock LED Output Low - DDRD |= (1<<4); - PORTD &= ~(1<<4); - +void keyboard_pre_init_kb(void) { //Backlight LEDs Output Low - DDRD |= (1<<6); - PORTD &= ~(1<<6); + setPinOutput(D6); + writePinLow(D6); //RGB power output low - DDRE |= (1<<2); - PORTE &= ~(1<<2); + setPinOutput(E2); + writePinLow(E2); //Bluetooth power output high - DDRB |= (1<<2); - PORTB |= (1<<2); + setPinOutput(B2); + writePinLow(B2); //RGB data output low - DDRB |= (1<<3); - PORTB &= ~(1<<3); + setPinOutput(B3); + writePinLow(B3); - 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 (usb_led & (1< Date: Tue, 17 Nov 2020 12:23:27 -0700 Subject: [PATCH 085/114] Add VIA Keymap for boardsource/microdox (#10932) --- .../boardsource/microdox/keymaps/via/keymap.c | 104 ++++++++++++++++++ .../boardsource/microdox/keymaps/via/rules.mk | 4 + 2 files changed, 108 insertions(+) create mode 100644 keyboards/boardsource/microdox/keymaps/via/keymap.c create mode 100644 keyboards/boardsource/microdox/keymaps/via/rules.mk diff --git a/keyboards/boardsource/microdox/keymaps/via/keymap.c b/keyboards/boardsource/microdox/keymaps/via/keymap.c new file mode 100644 index 0000000000..2f4785ad2e --- /dev/null +++ b/keyboards/boardsource/microdox/keymaps/via/keymap.c @@ -0,0 +1,104 @@ +/* +Copyright 2020 Jack Sangdahl <@toastedmangoes> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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_split_3x5_3( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + SFT_T(KC_A), KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SFT_T(KC_SCLN), + CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), + LT(3, KC_LGUI), MO(1), KC_SPC, KC_BSPC, MO(2), KC_ENT +), + +[1] = LAYOUT_split_3x5_3( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + KC_ESC, KC_TAB, KC_CAPS, KC_TILD, KC_GRV, KC_QUOT, KC_DQUO, KC_MPRV, KC_MPLY, KC_MNXT, + KC_LGUI, KC_TRNS, KC_SPC, KC_ENT, KC_TRNS, KC_RALT +), + +[2] = LAYOUT_split_3x5_3( + KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_PSCR, KC_DEL, KC_INS, KC_HOME, KC_END, + KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_LEFT, KC_DOWN, KC_RIGHT, KC_UP, KC_VOLU, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_VOLD, + KC_PGDN, KC_TRNS, KC_SPC, KC_ENT, KC_TRNS, KC_PGUP +), +[3] = LAYOUT_split_3x5_3( + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUD, RGB_HUI, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_SAD, RGB_SAI, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RMOD, RGB_VAD, RGB_VAI, XXXXXXX, XXXXXXX, + KC_TRNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +) +}; + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_keyboard_master()) + return OLED_ROTATION_180; + return rotation; +} + +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); +} + +static void render_status(void) { + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_P(PSTR("B R L A O\n"), false); + oled_write_P(PSTR("^\n"), false); + oled_write_P(PSTR("Layer: Base\n"), false); + break; + case 1: + oled_write_P(PSTR("B R L A O\n"), false); + oled_write_P(PSTR(" ^\n"), false); + oled_write_P(PSTR("Layer: Raise\n"), false); + break; + case 2: + oled_write_P(PSTR("B R L A O\n"), false); + oled_write_P(PSTR(" ^\n"), false); + oled_write_P(PSTR("Layer: Lower\n"), false); + break; + case 3: + oled_write_P(PSTR("B R L A O\n"), false); + oled_write_P(PSTR(" ^\n"), false); + oled_write_P(PSTR("Layer: Adjust\n"), false); + break; + default: + oled_write_P(PSTR("B R L A O"), false); + oled_write_P(PSTR(" ^\n"), false); + oled_write_P(PSTR("Layer: Other\n"), false); + } +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); + } else { + render_logo(); + oled_scroll_left(); + } +} + +#endif diff --git a/keyboards/boardsource/microdox/keymaps/via/rules.mk b/keyboards/boardsource/microdox/keymaps/via/rules.mk new file mode 100644 index 0000000000..667a6b254f --- /dev/null +++ b/keyboards/boardsource/microdox/keymaps/via/rules.mk @@ -0,0 +1,4 @@ +OLED_DRIVER_ENABLE = yes +VIA_ENABLE = yes +EXTRAKEY_ENABLE = yes +RGBLIGHT_ENABLE = yes From ad5cbe59820ac1f9922f2db2d6d1e7f2a8f50519 Mon Sep 17 00:00:00 2001 From: pastapojken <6597735+pastapojken@users.noreply.github.com> Date: Wed, 18 Nov 2020 17:56:59 +0100 Subject: [PATCH 086/114] Added new keyboard - nack (#10940) Co-authored-by: Ryan --- keyboards/nack/config.h | 59 ++++ keyboards/nack/info.json | 12 + keyboards/nack/keymaps/default/keymap.c | 65 +++++ keyboards/nack/keymaps/default/readme.md | 1 + keyboards/nack/keymaps/pastapojken/keymap.c | 199 ++++++++++++++ keyboards/nack/keymaps/pastapojken/keymap.h | 122 +++++++++ keyboards/nack/keymaps/pastapojken/readme.md | 1 + keyboards/nack/mcuconf.h | 273 +++++++++++++++++++ keyboards/nack/nack.c | 40 +++ keyboards/nack/nack.h | 31 +++ keyboards/nack/readme.md | 21 ++ keyboards/nack/rules.mk | 23 ++ 12 files changed, 847 insertions(+) create mode 100644 keyboards/nack/config.h create mode 100644 keyboards/nack/info.json create mode 100644 keyboards/nack/keymaps/default/keymap.c create mode 100644 keyboards/nack/keymaps/default/readme.md create mode 100644 keyboards/nack/keymaps/pastapojken/keymap.c create mode 100644 keyboards/nack/keymaps/pastapojken/keymap.h create mode 100644 keyboards/nack/keymaps/pastapojken/readme.md create mode 100644 keyboards/nack/mcuconf.h create mode 100644 keyboards/nack/nack.c create mode 100644 keyboards/nack/nack.h create mode 100644 keyboards/nack/readme.md create mode 100644 keyboards/nack/rules.mk diff --git a/keyboards/nack/config.h b/keyboards/nack/config.h new file mode 100644 index 0000000000..9f0880e38f --- /dev/null +++ b/keyboards/nack/config.h @@ -0,0 +1,59 @@ +/* +Copyright 2020 pastapojken + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 0xDA12 +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER pastapojken +#define PRODUCT nack keyboard + +#define MATRIX_ROWS 4 +#define MATRIX_COLS 13 + +#define MATRIX_ROW_PINS { A0, A1, A2, A3 } +#define MATRIX_COL_PINS { A6, A7, A8, A9, A10, B0, B1, B2, B6, B7, C13, C14, C15 } + +#define DIODE_DIRECTION ROW2COL +#define DEBOUNCE 5 +#define TAPPING_TOGGLE 2 + +#ifdef RGB_MATRIX_ENABLE + #define WS2812_SPI SPID1 + #define WS2812_SPI_MOSI_PAL_MODE 5 + #define RGB_DI_PIN B5 + #define RGBLED_NUM 52 + #define DRIVER_LED_TOTAL RGBLED_NUM + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 128 // Max brightness of LEDs + #define RGB_MATRIX_STARTUP_VAL 64 + #define RGB_MATRIX_HUE_STEP 10 + #define RGB_MATRIX_SAT_STEP 10 + #define RGB_MATRIX_VAL_STEP 10 +#endif + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(NO_SOUND) + #define AUDIO_PIN A4 // Pin of the left speaker + #define AUDIO_PIN_ALT A5 // Pin of the right speaker + /* + * Basically, change this section once pull request 6165 has been merged + * https://github.com/qmk/qmk_firmware/pull/6165 + */ +#endif + diff --git a/keyboards/nack/info.json b/keyboards/nack/info.json new file mode 100644 index 0000000000..780017f6cc --- /dev/null +++ b/keyboards/nack/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "nack", + "url": "https://github.com/pastapojken/nack", + "maintainer": "pastapojken", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT": { + "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":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":"\u00c5", "x":11, "y":0}, {"label":"\u00a8", "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":6, "y":1}, {"label":"J", "x":7, "y":1}, {"label":"K", "x":8, "y":1}, {"label":"L", "x":9, "y":1}, {"label":"\u00d6", "x":10, "y":1}, {"label":"\u00c4", "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":6, "y":2}, {"label":"M", "x":7, "y":2}, {"label":",", "x":8, "y":2}, {"label":".", "x":9, "y":2}, {"label":"", "x":10, "y":2}, {"label":"↑", "x":11, "y":2}, {"label":"backsp", "x":12, "y":2}, {"label":"Ctrl", "x":0, "y":3}, {"label":"Super", "x":1, "y":3}, {"label":"Alt", "x":2, "y":3}, {"label":"Fn", "x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"label":"Fn", "x":6, "y":3}, {"label":"", "x":7, "y":3}, {"label":"Alt Gr", "x":8, "y":3}, {"label":"Enter", "x":9, "y":3}, {"label":"←", "x":10, "y":3}, {"label":"↓", "x":11, "y":3}, {"label":"→", "x":12, "y":3}] + } + } +} diff --git a/keyboards/nack/keymaps/default/keymap.c b/keyboards/nack/keymaps/default/keymap.c new file mode 100644 index 0000000000..4c3e3dacbd --- /dev/null +++ b/keyboards/nack/keymaps/default/keymap.c @@ -0,0 +1,65 @@ +/* Copyright 2020 pastapojken + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 names for use in layer keycodes and the keymap +enum layer_names { + BASE, + NUM, + FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT( +/* __________________________________________________________________________________________________________________________________________________________________________ + | \ \ \ \ \ \ \ \ \ \ \ \ \ \ */ +// | |----TAB-----|---Q--------|-----W------|-----E------|-----R------|----T-------|-----Y------|-----U------|----I-------|------O-----|----P-------|----Å-------|--( ¨^~ )---| + 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, +// | |----ESC-----|---A--------|---S--------|----D-------|-----F------|-----G------|-----H------|-----J------|-----K------|-----L------|-----Ö------|-----Ä------|--( '* )----| + 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, +// | |---SHIFT----|---Z--------|---X--------|----C-------|-----V------|-----B------|-----N------|------M-----|---( ,; )---|---( .: )---|---( -_ )---|----UP------|-BACKSPACE--| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_BSPC, +// | |---CTRL-----|---ALT------|---META-----|----FN_1----|----------SPACE----------|----FN_2----|----AltGr---|--( <>| )---|---ENETER---|-LEFT-------|---DOWN-----|--RIGHT-----| + KC_LCTL, KC_LALT, KC_LGUI, TT(NUM), KC_SPC, KC_NO, TT(FN), KC_RALT, KC_NUBS, KC_ENT, KC_LEFT, KC_DOWN, KC_RIGHT +// \|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________| + ), + [NUM] = LAYOUT( +/* __________________________________________________________________________________________________________________________________________________________________________ + | \ \ \ \ \ \ \ \ \ \ \ \ \ \ */ +// | |---TAB------|---( 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, KC_EQL, +// | |----ESC-----|-----F1-----|-----F2-----|----F3------|----F4------|----F5------|-----F6-----|-----F7------|----F8-----|-----F9-----|-----F10----|----F11-----|----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, +// | |---SHIFT----|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------| + _______, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, +// | |---CTRL-----|---ALT------|---META-----|---FN_1-----|------------|------------|----FN_2----|--AltGr-----|---( §½ )---|------------|------------|------------|------------| + _______, _______, _______, TT(FN), KC_NO, KC_NO, TO(BASE), _______, KC_GRV, KC_NO, KC_NO, KC_NO, KC_NO +// \|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________| + ), + [FN] = LAYOUT( +/* __________________________________________________________________________________________________________________________________________________________________________ + | \ \ \ \ \ \ \ \ \ \ \ \ \ \ */ +// | |-RGB TOGGLE-|-CHANGE RGB-|-RGB HUE UP-|-RGB SAT UP-|------------|------------|------------|------------|------------|------------|------------|------------|-RESET KBD--| + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, +// | |------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------| + MU_TOG, 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 LIGHT +|------------| + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_VAI, KC_NO, +// | |------------|------------|------------|---FN_1-----|------------|------------|----FN_2----|------------|------------|------------|------------|-RGB LIGHT -|------------| + KC_NO, KC_NO, KC_NO, TT(NUM), KC_NO, KC_NO, TO(BASE), KC_NO, KC_NO, KC_NO, KC_NO, RGB_VAD, KC_NO +// \|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________| + ) +}; diff --git a/keyboards/nack/keymaps/default/readme.md b/keyboards/nack/keymaps/default/readme.md new file mode 100644 index 0000000000..9cbf5c6e6f --- /dev/null +++ b/keyboards/nack/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for nack, simple and minimal. diff --git a/keyboards/nack/keymaps/pastapojken/keymap.c b/keyboards/nack/keymaps/pastapojken/keymap.c new file mode 100644 index 0000000000..3bbcc4b368 --- /dev/null +++ b/keyboards/nack/keymaps/pastapojken/keymap.c @@ -0,0 +1,199 @@ +/* Copyright 2020 pastapojken + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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.h" + +#define ____ _______ + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + BASE, + NUM, + FN +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + CK_LSFT = SAFE_RANGE, // Shift + CK_RALT, // AltGr + CK_BSPC_DEL, // Backspace or Del (if pressed with CK_LSFT or CK_RALT) + CK_UP_PGUP, // Up or PgUp (if pressed with CK_LSFT or CK_RALT) + CK_DOWN_PGDOWN, // Down or PgDown (if pressed with CK_LSFT or CK_RALT) + CK_LEFT_HOME, // Left or Home (if pressed with CK_LSFT or CK_RALT) + CK_RIGHT_END, // Right or End (if pressed with CK_LSFT or CK_RALT) + KK_RESET +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT( +/* __________________________________________________________________________________________________________________________________________________________________________ + | \ \ \ \ \ \ \ \ \ \ \ \ \ \ */ +// | |----TAB-----|---Q--------|-----W------|-----E------|-----R------|----T-------|-----Y------|-----U------|----I-------|------O-----|----P-------|----Å-------|--( ¨^~ )---| + 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, +// | |----ESC-----|---A--------|---S--------|----D-------|-----F------|-----G------|-----H------|-----J------|-----K------|-----L------|-----Ö------|-----Ä------|--( '* )----| + 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, +// | |---SHIFT----|---Z--------|---X--------|----C-------|-----V------|-----B------|-----N------|------M-----|---( ,; )---|---( .: )---|---( -_ )---|----UP------|-BACKSPACE--| + CK_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, CK_UP_PGUP, CK_BSPC_DEL, +// | |---CTRL-----|---ALT------|---META-----|----FN_1----|----------SPACE----------|----FN_2----|----AltGr---|--( <>| )---|---ENETER---|-LEFT-------|---DOWN-----|--RIGHT-----| + KC_LCTL, KC_LALT, KC_LGUI, TT(NUM), KC_SPC, KC_NO, TT(FN), CK_RALT, KC_NUBS, KC_ENT, CK_LEFT_HOME,CK_DOWN_PGDOWN,CK_RIGHT_END +// \|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________| + ), + [NUM] = LAYOUT( +/* __________________________________________________________________________________________________________________________________________________________________________ + | \ \ \ \ \ \ \ \ \ \ \ \ \ \ */ +// | |---TAB------|---( 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, KC_EQL, +// | |----ESC-----|-----F1-----|-----F2-----|----F3------|----F4------|----F5------|-----F6-----|-----F7------|----F8-----|-----F9-----|-----F10----|----F11-----|----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, +// | |---SHIFT----|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------| + ____, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, +// | |---CTRL-----|---ALT------|---META-----|---FN_1-----|------------|------------|----FN_2----|--AltGr-----|---( §½ )---|------------|------------|------------|------------| + ____, ____, ____, TT(FN), KC_NO, KC_NO, TO(BASE), ____, KC_GRV, KC_NO, KC_NO, KC_NO, KC_NO +// \|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________| + ), + [FN] = LAYOUT( +/* __________________________________________________________________________________________________________________________________________________________________________ + | \ \ \ \ \ \ \ \ \ \ \ \ \ \ */ +// | |-RGB TOGGLE-|-CHANGE RGB-|-RGB HUE UP-|-RGB SAT UP-|------------|------------|------------|------------|------------|------------|------------|------------|-RESET KBD--| + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KK_RESET, +// | |------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------| + MU_TOG, 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 LIGHT +|------------| + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_VAI, KC_NO, +// | |------------|------------|------------|---FN_1-----|------------|------------|----FN_2----|------------|------------|------------|------------|-RGB LIGHT -|------------| + KC_NO, KC_NO, KC_NO, TT(NUM), KC_NO, KC_NO, TO(BASE), KC_NO, KC_NO, KC_NO, KC_NO, RGB_VAD, KC_NO +// \|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________|____________| + ) +}; + +// Interrupt bools +bool lshift = false, ralt = false; + +// Number of items that are saved in prev_kcs +uint8_t prev_indx = 0; +// Used to save the last 6 actual keycodes +uint16_t prev_kcs[6] = {0, 0, 0, 0, 0, 0}; + +/* +Used to add a keycode to a prev_kcs to remember it. +When full the last code gets discarded and replaced by +the new one. +*/ +void add_to_prev(uint16_t kc){ + for (int i=0; i0; i--){ + prev_kcs[i] = prev_kcs[i-1]; + } + prev_kcs[0] = kc; + } else { + prev_kcs[prev_indx] = kc; + prev_indx++; + } +} + +/* +Unregisters all codes saved in prev_kcs and resets prev_indx. +gets called on multiple occasions mainly when shift is released +and when frankenkeycodes are pressed. Prevents output of +wrong characters when really specific key combinations +that would never occur during normal usage are pressed. +*/ +void unreg_prev(void){ + if (prev_indx == 0) + return; + for (int i=0; ievent.pressed) { + unregister_code(KC_LSFT); + register_code(KC_LSFT); + lshift = true; + } else { + unreg_prev(); + unregister_code(KC_LSFT); + lshift = false; + } + return false; + case CK_RALT: + if(record->event.pressed) { + unregister_code(KC_RALT); + register_code(KC_RALT); + ralt = true; + } else { + unreg_prev(); + unregister_code(KC_RALT); + ralt = false; + } + return false; + case CK_BSPC_DEL: + RALT_NO(KC_BSPC,KC_DEL); + break; + case CK_UP_PGUP: + RALT_NO(KC_UP,KC_PGUP); + break; + case CK_DOWN_PGDOWN: + RALT_NO(KC_DOWN,KC_PGDOWN); + break; + case CK_LEFT_HOME: + RALT_NO(KC_LEFT,KC_HOME); + break; + case CK_RIGHT_END: + RALT_NO(KC_RIGHT,KC_END); + break; + case KK_RESET: // Basically, turn off RGB before resetting + if (record->event.pressed) { + key_timer = timer_read32(); + #ifdef RGB_MATRIX_ENABLE + rgb_matrix_disable_noeeprom(); + #endif + } else { + if (timer_elapsed32(key_timer) >= 20) { + reset_keyboard(); + } + } + break; + default: + if(record->event.pressed) { + timer_timeout_keymap(); + if (lshift) + register_code(KC_LSFT); + else + unregister_code(KC_LSFT); + + if (ralt) + register_code(KC_ALGR); + else + unregister_code(KC_ALGR); + } + break; + } + return true; +} + +__attribute__((weak)) +void timer_timeout_keymap(void){ +} diff --git a/keyboards/nack/keymaps/pastapojken/keymap.h b/keyboards/nack/keymaps/pastapojken/keymap.h new file mode 100644 index 0000000000..aaeed70706 --- /dev/null +++ b/keyboards/nack/keymaps/pastapojken/keymap.h @@ -0,0 +1,122 @@ +/* Copyright 2020 pastapojken + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 TAPPING_TOGGLE 2 + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(NO_SOUND) +#endif + +void add_to_prev(uint16_t kc); +void unreg_prev(void); +void timer_timeout_keymap(void); +bool process_record_user(uint16_t keycode, keyrecord_t *record); + +// Normal shift status +#define SHIFT_NORM(kc1, kc2) \ +if (record->event.pressed) { \ + timer_timeout_keymap(); \ + if (lshift) { \ + register_code(KC_LSFT); \ + unregister_code(kc2); \ + register_code(kc2); \ + add_to_prev(kc2); \ + } else { \ + unregister_code(KC_LSFT); \ + unregister_code(kc1); \ + register_code(kc1); \ + } \ +} else { \ + unregister_code(kc1); \ + unregister_code(kc2); \ +} \ +return false; + +// Always shifted +#define SHIFT_ALL(kc1, kc2) \ +if (record->event.pressed) { \ + timer_timeout_keymap(); \ + register_code(KC_LSFT); \ + if (lshift) { \ + unregister_code(kc2); \ + register_code(kc2); \ + add_to_prev(kc2); \ + } else { \ + unregister_code(kc1); \ + register_code(kc1); \ + add_to_prev(kc1); \ + } \ +} else { \ + unregister_code(kc1); \ + unregister_code(kc2); \ + unreg_prev(); \ + if (lshift) \ + register_code(KC_LSFT); \ + else \ + unregister_code(KC_LSFT); \ +} \ +return false; + +// Never shifted +#define SHIFT_NO(kc1, kc2) \ +if (record->event.pressed) { \ + timer_timeout_keymap(); \ + unregister_code(KC_LSFT); \ + if (lshift) { \ + unregister_code(kc2); \ + register_code(kc2); \ + add_to_prev(kc2); \ + } else { \ + unregister_code(kc1); \ + register_code(kc1); \ + } \ +} else { \ + unregister_code(kc1); \ + unregister_code(kc2); \ + unreg_prev(); \ + if (lshift) \ + register_code(KC_LSFT); \ + else \ + unregister_code(KC_LSFT); \ +} \ +return false; + +//Never RALT +#define RALT_NO(kc1, kc2) \ +if (record->event.pressed) { \ + timer_timeout_keymap(); \ + unregister_code(KC_RALT); \ + if (ralt) { \ + unregister_code(kc2); \ + register_code(kc2); \ + add_to_prev(kc2); \ + } else { \ + unregister_code(kc1); \ + register_code(kc1); \ + } \ +} else { \ + unregister_code(kc1); \ + unregister_code(kc2); \ + unreg_prev(); \ + if (ralt) \ + register_code(KC_RALT); \ + else \ + unregister_code(KC_RALT); \ +} \ +return false; diff --git a/keyboards/nack/keymaps/pastapojken/readme.md b/keyboards/nack/keymaps/pastapojken/readme.md new file mode 100644 index 0000000000..73e1e2add9 --- /dev/null +++ b/keyboards/nack/keymaps/pastapojken/readme.md @@ -0,0 +1 @@ +# pastapojken's keymap for nack diff --git a/keyboards/nack/mcuconf.h b/keyboards/nack/mcuconf.h new file mode 100644 index 0000000000..0853242dad --- /dev/null +++ b/keyboards/nack/mcuconf.h @@ -0,0 +1,273 @@ +/* + ChibiOS - Copyright (C) 2006..2018 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 +#define STM32F303_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 + +/* + * IRQ system settings. + */ +#define STM32_IRQ_EXTI0_PRIORITY 6 +#define STM32_IRQ_EXTI1_PRIORITY 6 +#define STM32_IRQ_EXTI2_PRIORITY 6 +#define STM32_IRQ_EXTI3_PRIORITY 6 +#define STM32_IRQ_EXTI4_PRIORITY 6 +#define STM32_IRQ_EXTI5_9_PRIORITY 6 +#define STM32_IRQ_EXTI10_15_PRIORITY 6 +#define STM32_IRQ_EXTI16_PRIORITY 6 +#define STM32_IRQ_EXTI17_PRIORITY 15 +#define STM32_IRQ_EXTI18_PRIORITY 6 +#define STM32_IRQ_EXTI19_PRIORITY 15 +#define STM32_IRQ_EXTI20_PRIORITY 15 +#define STM32_IRQ_EXTI21_22_29_PRIORITY 6 +#define STM32_IRQ_EXTI30_32_PRIORITY 6 +#define STM32_IRQ_EXTI33_PRIORITY 6 +#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7 +#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7 +#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7 +#define STM32_IRQ_TIM1_CC_PRIORITY 7 + +/* + * 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 + +/* + * 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_USE_TIM15 TRUE +#define STM32_GPT_USE_TIM16 FALSE +#define STM32_GPT_USE_TIM17 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_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_USE_TIM15 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 TRUE +#define STM32_PWM_USE_TIM4 TRUE +#define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_USE_TIM15 FALSE +#define STM32_PWM_USE_TIM16 FALSE +#define STM32_PWM_USE_TIM17 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 + +/* + * RTC driver system settings. + */ +#define STM32_RTC_PRESA_VALUE 32 +#define STM32_RTC_PRESS_VALUE 1024 +#define STM32_RTC_CR_INIT 0 +#define STM32_RTC_TAMPCR_INIT 0 + +/* + * 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 TRUE +#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/nack/nack.c b/keyboards/nack/nack.c new file mode 100644 index 0000000000..185a96fdad --- /dev/null +++ b/keyboards/nack/nack.c @@ -0,0 +1,40 @@ +/* Copyright 2020 pastapojken + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 RGB_MATRIX_ENABLE + led_config_t g_led_config = { { + // Key Matrix to LED Index + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }, + { 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 }, + { 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38 }, + { 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 } + }, { + // LED Index to Physical Position + { 0, 0 }, { 19, 0 }, { 38, 0 }, { 57, 0 }, { 76, 0 }, { 95, 0 }, { 114, 0 }, { 133, 0 }, { 152, 0 }, { 171, 0 }, { 190, 0 }, { 209, 0 }, { 223, 0 }, + { 0, 21 }, { 19, 21 }, { 38, 21 }, { 57, 21 }, { 76, 21 }, { 95, 21 }, { 114, 21 }, { 133, 21 }, { 152, 21 }, { 171, 21 }, { 190, 21 }, { 209, 21 }, { 223, 21 }, + { 0, 42 }, { 19, 42 }, { 38, 42 }, { 57, 42 }, { 76, 42 }, { 95, 42 }, { 114, 42 }, { 133, 42 }, { 152, 42 }, { 171, 42 }, { 190, 42 }, { 209, 42 }, { 223, 42 }, + { 0, 63 }, { 19, 63 }, { 38, 63 }, { 57, 63 }, { 76, 63 }, { 95, 63 }, { 114, 63 }, { 133, 63 }, { 152, 63 }, { 171, 63 }, { 190, 63 }, { 209, 63 }, { 223, 63 } + }, { + // LED Index to Flag + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 + } }; +#endif + diff --git a/keyboards/nack/nack.h b/keyboards/nack/nack.h new file mode 100644 index 0000000000..30e310a486 --- /dev/null +++ b/keyboards/nack/nack.h @@ -0,0 +1,31 @@ +/* Copyright 2020 pastapojken + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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, 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, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k50, k51\ +) \ +{ \ + { 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, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k50, k51 },\ +} diff --git a/keyboards/nack/readme.md b/keyboards/nack/readme.md new file mode 100644 index 0000000000..6a1adeaf7b --- /dev/null +++ b/keyboards/nack/readme.md @@ -0,0 +1,21 @@ +# nack + + +A ISO-friendly ortholinear keyboard, 13x4 keys. +See [screenshots](https://imgur.com/a/PPO18Lc). + +* Keyboard Maintainer: [pastapojken](https://github.com/pastapojken) +* Hardware Supported: nack PCB +* Hardware Availability: [github repo](https://github.com/pastapojken/nack) + +Make example for this keyboard (after setting up your build environment): + + make nack:default + +Flashing example for this keyboard: + + make nack:default:flash + +To reset the board into bootloader mode, press the reset button on top of the keyboard. It's the tiny button to the upper left of the board. If you are using the official case/plate you might need to use something thin to reach & press it. + +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/nack/rules.mk b/keyboards/nack/rules.mk new file mode 100644 index 0000000000..a3374bf218 --- /dev/null +++ b/keyboards/nack/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = STM32F303 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = yes # Audio output +RGB_MATRIX_ENABLE = WS2812 +WS2812_DRIVER = spi +AUDIO_DRIVER = dac_additive # How to drive the 2 speakers +UNICODE_ENABLE = yes # Unicode support From 1512e07817cf48480b9e84f5edd2e439580cd3b4 Mon Sep 17 00:00:00 2001 From: jackytrabbit Date: Thu, 19 Nov 2020 01:43:44 +0800 Subject: [PATCH 087/114] Add support for keyboard 'DimplePlus' (#10881) Co-authored-by: Drashna Jaelre Co-authored-by: Ryan --- keyboards/lazydesigners/dimpleplus/config.h | 51 ++++++++++++++ .../lazydesigners/dimpleplus/dimpleplus.c | 1 + .../lazydesigners/dimpleplus/dimpleplus.h | 33 +++++++++ keyboards/lazydesigners/dimpleplus/info.json | 68 +++++++++++++++++++ .../dimpleplus/keymaps/default/keymap.c | 43 ++++++++++++ keyboards/lazydesigners/dimpleplus/readme.md | 19 ++++++ keyboards/lazydesigners/dimpleplus/rules.mk | 23 +++++++ 7 files changed, 238 insertions(+) create mode 100644 keyboards/lazydesigners/dimpleplus/config.h create mode 100644 keyboards/lazydesigners/dimpleplus/dimpleplus.c create mode 100644 keyboards/lazydesigners/dimpleplus/dimpleplus.h create mode 100644 keyboards/lazydesigners/dimpleplus/info.json create mode 100644 keyboards/lazydesigners/dimpleplus/keymaps/default/keymap.c create mode 100644 keyboards/lazydesigners/dimpleplus/readme.md create mode 100644 keyboards/lazydesigners/dimpleplus/rules.mk diff --git a/keyboards/lazydesigners/dimpleplus/config.h b/keyboards/lazydesigners/dimpleplus/config.h new file mode 100644 index 0000000000..d85d72412d --- /dev/null +++ b/keyboards/lazydesigners/dimpleplus/config.h @@ -0,0 +1,51 @@ +/* +Copyright 2020 LAZYDESIGNERS + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 0x4C44 // "LD" +#define PRODUCT_ID 0x0061 +#define DEVICE_VER 0x0001 +#define MANUFACTURER LAZYDESIGNERS +#define PRODUCT Dimpleplus + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 12 + +#define MATRIX_ROW_PINS { B3, F0, E6, F4, F5 } +#define MATRIX_COL_PINS { F1, D5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4 } + +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +/* RBG underglow */ +#define RGB_DI_PIN D2 +#ifdef RGB_DI_PIN + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_SLEEP + #define RGBLED_NUM 8 + /* #define RGBLIGHT_HUE_STEP 8 */ + /* #define RGBLIGHT_SAT_STEP 8 */ + /* #define RGBLIGHT_VAL_STEP 8 */ +#endif diff --git a/keyboards/lazydesigners/dimpleplus/dimpleplus.c b/keyboards/lazydesigners/dimpleplus/dimpleplus.c new file mode 100644 index 0000000000..36eed8cc13 --- /dev/null +++ b/keyboards/lazydesigners/dimpleplus/dimpleplus.c @@ -0,0 +1 @@ +#include "dimpleplus.h" diff --git a/keyboards/lazydesigners/dimpleplus/dimpleplus.h b/keyboards/lazydesigners/dimpleplus/dimpleplus.h new file mode 100644 index 0000000000..7664b87605 --- /dev/null +++ b/keyboards/lazydesigners/dimpleplus/dimpleplus.h @@ -0,0 +1,33 @@ +/* +Copyright 2020 LAZYDESIGNERS + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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, K211, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, \ + K400, K402, K403, K404, K406, K407, K408, K409 \ +) { \ + { 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, K211 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, KC_NO }, \ + { K400, KC_NO, K402, K403, K404, KC_NO, K406, K407, K408, K409, KC_NO, KC_NO } \ +} diff --git a/keyboards/lazydesigners/dimpleplus/info.json b/keyboards/lazydesigners/dimpleplus/info.json new file mode 100644 index 0000000000..4ad13f3746 --- /dev/null +++ b/keyboards/lazydesigners/dimpleplus/info.json @@ -0,0 +1,68 @@ +{ + "keyboard_name": "Dimpleplus", + "url": "http://lazydesigners.cn", + "maintainer": "LAZYDESIGNERS", + "width": 12.5, + "height": 5.25, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"K000 (B3,F1)", "x":0, "y":0}, + {"label":"K001 (B3,D5)", "x":1.5, "y":0}, + {"label":"K002 (B3,F6)", "x":2.5, "y":0}, + {"label":"K003 (B3,F7)", "x":3.5, "y":0}, + {"label":"K004 (B3,C7)", "x":4.5, "y":0}, + {"label":"K005 (B3,C6)", "x":5.5, "y":0}, + {"label":"K006 (B3,B6)", "x":6.5, "y":0}, + {"label":"K007 (B3,B5)", "x":7.5, "y":0}, + {"label":"K008 (B3,B4)", "x":8.5, "y":0}, + {"label":"K009 (B3,D7)", "x":9.5, "y":0}, + {"label":"K010 (B3,D6)", "x":10.5, "y":0}, + {"label":"K011 (B3,D4)", "x":11.5, "y":0}, + {"label":"K100 (F0,F1)", "x":0, "y":1.25}, + {"label":"K101 (F0,D5)", "x":1, "y":1.25}, + {"label":"K102 (F0,F6)", "x":2, "y":1.25}, + {"label":"K103 (F0,F7)", "x":3, "y":1.25}, + {"label":"K104 (F0,C7)", "x":4, "y":1.25}, + {"label":"K105 (F0,C6)", "x":5, "y":1.25}, + {"label":"K106 (F0,B6)", "x":6, "y":1.25}, + {"label":"K107 (F0,B5)", "x":7, "y":1.25}, + {"label":"K108 (F0,B4)", "x":8, "y":1.25}, + {"label":"K109 (F0,D7)", "x":9, "y":1.25}, + {"label":"K110 (F0,D6)", "x":10, "y":1.25}, + {"label":"K111 (F0,D4)", "x":11, "y":1.25, "w":1.5}, + {"label":"K200 (E6,F1)", "x":0, "y":2.25, "w":1.25}, + {"label":"K201 (E6,D5)", "x":1.25, "y":2.25}, + {"label":"K202 (E6,F6)", "x":2.25, "y":2.25}, + {"label":"K203 (E6,F7)", "x":3.25, "y":2.25}, + {"label":"K204 (E6,C7)", "x":4.25, "y":2.25}, + {"label":"K205 (E6,C6)", "x":5.25, "y":2.25}, + {"label":"K206 (E6,B6)", "x":6.25, "y":2.25}, + {"label":"K207 (E6,B5)", "x":7.25, "y":2.25}, + {"label":"K208 (E6,B4)", "x":8.25, "y":2.25}, + {"label":"K209 (E6,D7)", "x":9.25, "y":2.25}, + {"label":"K210 (E6,D6)", "x":10.25, "y":2.25}, + {"label":"K211 (E6,D4)", "x":11.25, "y":2.25, "w":1.25}, + {"label":"K300 (F4,F1)", "x":0, "y":3.25, "w":1.75}, + {"label":"K301 (F4,D5)", "x":1.75, "y":3.25}, + {"label":"K302 (F4,F6)", "x":2.75, "y":3.25}, + {"label":"K303 (F4,F7)", "x":3.75, "y":3.25}, + {"label":"K304 (F4,C7)", "x":4.75, "y":3.25}, + {"label":"K305 (F4,C6)", "x":5.75, "y":3.25}, + {"label":"K306 (F4,B6)", "x":6.75, "y":3.25}, + {"label":"K307 (F4,B5)", "x":7.75, "y":3.25}, + {"label":"K308 (F4,B4)", "x":8.75, "y":3.25}, + {"label":"K309 (F4,D7)", "x":9.75, "y":3.25}, + {"label":"K310 (F4,D6)", "x":10.75, "y":3.25, "w":1.75}, + {"label":"K400 (F5,F1)", "x":0.75, "y":4.25}, + {"label":"K402 (F5,F6)", "x":1.75, "y":4.25}, + {"label":"K403 (F5,F7)", "x":2.75, "y":4.25}, + {"label":"K404 (F5,C7)", "x":3.75, "y":4.25, "w":2.25}, + {"label":"K406 (F5,B6)", "x":6, "y":4.25, "w":2.75}, + {"label":"K407 (F5,B5)", "x":8.75, "y":4.25}, + {"label":"K408 (F5,B4)", "x":9.75, "y":4.25}, + {"label":"K409 (F5,D7)", "x":10.75, "y":4.25} + ] + } + } +} diff --git a/keyboards/lazydesigners/dimpleplus/keymaps/default/keymap.c b/keyboards/lazydesigners/dimpleplus/keymaps/default/keymap.c new file mode 100644 index 0000000000..17b9aec472 --- /dev/null +++ b/keyboards/lazydesigners/dimpleplus/keymaps/default/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2020 LAZYDESIGNERS + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 LT2_TAB LT(2, KC_TAB) +#define LT1_SPC LT(1, KC_SPC) + +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_DEL, + KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT2_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_UP, MO(2), + KC_LCTL, KC_LALT, KC_LGUI, LT1_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RESET, + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, KC_SCLN, KC_SLSH, + KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_NO, KC_NO, KC_NO, KC_DOT, KC_NO, + RGB_TOG, RGB_MOD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_QUOT + ), + [2] = LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, + KC_NO, KC_NO, KC_NO, KC_DEL, KC_NO, KC_NO, KC_LCBR, KC_RCBR, KC_UNDS, KC_PLUS, KC_COLN, KC_QUES, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LABK, KC_RABK, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DQUO + ), +}; diff --git a/keyboards/lazydesigners/dimpleplus/readme.md b/keyboards/lazydesigners/dimpleplus/readme.md new file mode 100644 index 0000000000..fc5881cdc1 --- /dev/null +++ b/keyboards/lazydesigners/dimpleplus/readme.md @@ -0,0 +1,19 @@ +# Dimpleplus + +![dimpleplus](https://i.loli.net/2020/08/15/GgfvXZ5dzDLqurh.jpg) + +* Keyboard Maintainer: [LAZYDESIGNERS](https://github.com/jackytrabbit) +* Hardware Supported: Dimple Plus +* Hardware Availability: Check [LAZYDESIGNERS's homepage.](http://lazydesigners.cn) + +Make example for this keyboard (after setting up your build environment): + + make lazydesigners/dimpleplus:default + +Flashing example for this keyboard: + + make lazydesigners/dimpleplus:default:flash + +**Reset Key:** To enter the bootloader, either push the RESET button 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/dimpleplus/rules.mk b/keyboards/lazydesigners/dimpleplus/rules.mk new file mode 100644 index 0000000000..3fd7208dbb --- /dev/null +++ b/keyboards/lazydesigners/dimpleplus/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# 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 +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + From e1e13c53acb24c3617c3de88fa401acb3d628074 Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Wed, 18 Nov 2020 12:47:45 -0500 Subject: [PATCH 088/114] Add support for LAYOUT_alice to sneakbox pcb (#10914) Co-authored-by: Drashna Jaelre --- keyboards/sneakbox/aliceclone/aliceclone.h | 4 +++- keyboards/sneakbox/aliceclone/info.json | 2 +- keyboards/sneakbox/aliceclone/keymaps/default/keymap.c | 4 ++-- keyboards/sneakbox/aliceclone/keymaps/via/keymap.c | 8 ++++---- keyboards/sneakbox/aliceclone/rules.mk | 1 + 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/keyboards/sneakbox/aliceclone/aliceclone.h b/keyboards/sneakbox/aliceclone/aliceclone.h index 67ae7ce784..1976a555cc 100644 --- a/keyboards/sneakbox/aliceclone/aliceclone.h +++ b/keyboards/sneakbox/aliceclone/aliceclone.h @@ -19,7 +19,9 @@ along with this program. If not, see . #include "quantum.h" -#define LAYOUT_all( \ +#define LAYOUT_all LAYOUT_alice + +#define LAYOUT_alice( \ K020, K000, K001, K002, K003, K004, K005, K006, K010, K011, K012, K013, K014, K015, K016, K017, \ K040, K021, K022, K023, K024, K025, K026, K030, K031, K032, K033, K034, K035, K036, K037, \ K060, K041, K042, K043, K044, K045, K046, K050, K051, K052, K053, K054, K055, K056, \ diff --git a/keyboards/sneakbox/aliceclone/info.json b/keyboards/sneakbox/aliceclone/info.json index 332404b56d..461542509f 100644 --- a/keyboards/sneakbox/aliceclone/info.json +++ b/keyboards/sneakbox/aliceclone/info.json @@ -5,7 +5,7 @@ "width": 18.25, "height": 5, "layouts": { - "LAYOUT_all": { + "LAYOUT_alice": { "layout": [ {"x":0, "y":0}, {"x":1.25, "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":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.25, "y":1, "w":1.5}, {"x":2.75, "y":1}, {"x":3.75, "y":1}, {"x":4.75, "y":1}, {"x":5.75, "y":1}, {"x":6.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}, {"x":16.75, "y":1, "w":1.5}, diff --git a/keyboards/sneakbox/aliceclone/keymaps/default/keymap.c b/keyboards/sneakbox/aliceclone/keymaps/default/keymap.c index 39eb44bc9a..6a6f7fecc0 100644 --- a/keyboards/sneakbox/aliceclone/keymaps/default/keymap.c +++ b/keyboards/sneakbox/aliceclone/keymaps/default/keymap.c @@ -24,13 +24,13 @@ enum layer_names { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT_all( + [_BASE] = LAYOUT_alice( 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_BSPC, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, KC_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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LGUI, KC_LCTL, KC_LALT, KC_SPC, LT(_FN, KC_SPC), KC_SPC, KC_RALT, KC_RCTL), - [_FN] = LAYOUT_all( + [_FN] = LAYOUT_alice( 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_F12, 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, RESET, 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, diff --git a/keyboards/sneakbox/aliceclone/keymaps/via/keymap.c b/keyboards/sneakbox/aliceclone/keymaps/via/keymap.c index 333b8a2162..6a08a15f2b 100644 --- a/keyboards/sneakbox/aliceclone/keymaps/via/keymap.c +++ b/keyboards/sneakbox/aliceclone/keymaps/via/keymap.c @@ -27,25 +27,25 @@ enum layer_names { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT_all( + [_BASE] = LAYOUT_alice( 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_BSPC, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, KC_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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LGUI, KC_LCTL, KC_LALT, KC_SPC, LT(_FN, KC_SPC), KC_SPC, KC_RALT, KC_RCTL), - [_FN] = LAYOUT_all( + [_FN] = LAYOUT_alice( 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_F12, 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, RESET, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - [_L3] = LAYOUT_all( + [_L3] = LAYOUT_alice( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - [_L4] = LAYOUT_all( + [_L4] = LAYOUT_alice( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/sneakbox/aliceclone/rules.mk b/keyboards/sneakbox/aliceclone/rules.mk index fb12719ce8..f477956021 100644 --- a/keyboards/sneakbox/aliceclone/rules.mk +++ b/keyboards/sneakbox/aliceclone/rules.mk @@ -21,3 +21,4 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes +LAYOUTS = alice From f00402a2f3d551bcb1fb87245238e2b392192eb5 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 18 Nov 2020 17:51:53 +0000 Subject: [PATCH 089/114] Refactor to use led config - Part 3 (#10966) * Refactor to use led config * Refactor to use led config * Refactor to use led config * Refactor to use led config --- keyboards/1upkeyboards/sweet16/v1/config.h | 6 ++ keyboards/1upkeyboards/sweet16/v1/v1.c | 20 ------- keyboards/alps64/alps64.c | 20 ------- keyboards/alps64/config.h | 2 + keyboards/amjpad/amjpad.c | 29 ---------- keyboards/amjpad/config.h | 3 + keyboards/exclusive/e6v2/le/config.h | 3 + keyboards/exclusive/e6v2/le/le.c | 32 ----------- keyboards/exclusive/e7v1/config.h | 2 + keyboards/exclusive/e7v1/e7v1.c | 24 -------- keyboards/fc980c/config.h | 5 +- keyboards/fc980c/fc980c.c | 37 ------------ keyboards/foxlab/leaf60/hotswap/config.h | 3 + keyboards/foxlab/leaf60/hotswap/hotswap.c | 43 -------------- keyboards/foxlab/leaf60/universal/config.h | 3 + keyboards/foxlab/leaf60/universal/universal.c | 45 --------------- keyboards/hineybush/hineyg80/config.h | 5 ++ keyboards/hineybush/hineyg80/hineyg80.c | 47 --------------- keyboards/jc65/v32u4/config.h | 3 + keyboards/jc65/v32u4/v32u4.c | 35 ------------ keyboards/kmac/config.h | 4 ++ keyboards/kmac/kmac.c | 53 ----------------- keyboards/melody96/config.h | 5 ++ keyboards/melody96/melody96.c | 22 ------- keyboards/peiorisboards/ixora/config.h | 4 ++ keyboards/peiorisboards/ixora/ixora.c | 42 -------------- keyboards/redscarf_iiplus/verb/config.h | 7 +-- keyboards/redscarf_iiplus/verb/verb.c | 35 ------------ keyboards/sck/osa/config.h | 4 ++ keyboards/sck/osa/osa.c | 57 ------------------- 30 files changed, 54 insertions(+), 546 deletions(-) diff --git a/keyboards/1upkeyboards/sweet16/v1/config.h b/keyboards/1upkeyboards/sweet16/v1/config.h index 5264ef698b..4020f4fdc0 100644 --- a/keyboards/1upkeyboards/sweet16/v1/config.h +++ b/keyboards/1upkeyboards/sweet16/v1/config.h @@ -17,6 +17,12 @@ /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 +#ifndef CONVERT_TO_PROTON_C +# define LED_NUM_LOCK_PIN B0 // RXLED +# define LED_CAPS_LOCK_PIN D5 // TXLED +# define LED_PIN_ON_STATE 0 +#endif + /* Underglow options */ #define RGB_DI_PIN B1 #ifdef RGB_DI_PIN diff --git a/keyboards/1upkeyboards/sweet16/v1/v1.c b/keyboards/1upkeyboards/sweet16/v1/v1.c index 053620d333..0ff1041aac 100644 --- a/keyboards/1upkeyboards/sweet16/v1/v1.c +++ b/keyboards/1upkeyboards/sweet16/v1/v1.c @@ -1,21 +1 @@ #include "v1.h" - -void led_set_kb(uint8_t usb_led) { -#ifndef CONVERT_TO_PROTON_C - /* Map RXLED to USB_LED_NUM_LOCK */ - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - setPinOutput(B0); - writePinLow(B0); - } else { - setPinInput(B0); - } - - /* Map TXLED to USB_LED_CAPS_LOCK */ - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - setPinOutput(D5); - writePinLow(D5); - } else { - setPinInput(D5); - } -#endif -} diff --git a/keyboards/alps64/alps64.c b/keyboards/alps64/alps64.c index 0e4ef07bc0..61270aaced 100644 --- a/keyboards/alps64/alps64.c +++ b/keyboards/alps64/alps64.c @@ -15,23 +15,3 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "alps64.h" - -void keyboard_pre_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - setPinOutput(C5); - keyboard_pre_init_user(); -} - -void led_set_kb(uint8_t usb_led) -{ - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - // output high - writePinHigh(C5); - } else { - // Hi-Z - writePinLow(C5); - } - - led_set_user(usb_led); -} diff --git a/keyboards/alps64/config.h b/keyboards/alps64/config.h index 25453e696f..15903818b9 100644 --- a/keyboards/alps64/config.h +++ b/keyboards/alps64/config.h @@ -37,6 +37,8 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN C5 + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/amjpad/amjpad.c b/keyboards/amjpad/amjpad.c index ac5991bd08..83cdedf688 100644 --- a/keyboards/amjpad/amjpad.c +++ b/keyboards/amjpad/amjpad.c @@ -1,30 +1 @@ #include "amjpad.h" -#include "led.h" - -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 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 - DDRD |= (1<<6); -} - -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1<. /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE +#define LED_NUM_LOCK_PIN D6 +#define LED_PIN_ON_STATE 0 + /* Backlight configuration */ #define BACKLIGHT_LEVELS 4 diff --git a/keyboards/exclusive/e6v2/le/config.h b/keyboards/exclusive/e6v2/le/config.h index 6477d5364a..71bd66b155 100644 --- a/keyboards/exclusive/e6v2/le/config.h +++ b/keyboards/exclusive/e6v2/le/config.h @@ -37,6 +37,9 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B5, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7 } #define UNUSED_PINS +#define LED_CAPS_LOCK_PIN B7 +#define LED_PIN_ON_STATE 0 + #define RGB_DI_PIN E6 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/exclusive/e6v2/le/le.c b/keyboards/exclusive/e6v2/le/le.c index f27bdc113b..dd973feec5 100644 --- a/keyboards/exclusive/e6v2/le/le.c +++ b/keyboards/exclusive/e6v2/le/le.c @@ -1,33 +1 @@ #include "le.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_user(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 7); - PORTB &= ~(1 << 7); - } else { - DDRB &= ~(1 << 7); - PORTB &= ~(1 << 7); - } -} - diff --git a/keyboards/exclusive/e7v1/config.h b/keyboards/exclusive/e7v1/config.h index c8f1501250..11e47c3601 100644 --- a/keyboards/exclusive/e7v1/config.h +++ b/keyboards/exclusive/e7v1/config.h @@ -22,6 +22,8 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN F0 + /* number of backlight levels */ #define BACKLIGHT_PIN B7 #ifdef BACKLIGHT_PIN diff --git a/keyboards/exclusive/e7v1/e7v1.c b/keyboards/exclusive/e7v1/e7v1.c index 381585e6cf..880121f4f0 100644 --- a/keyboards/exclusive/e7v1/e7v1.c +++ b/keyboards/exclusive/e7v1/e7v1.c @@ -1,25 +1 @@ #include "e7v1.h" - -void matrix_init_kb(void) { - setPinOutput(F0); - 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 (usb_led & (1 << USB_LED_CAPS_LOCK)) { - writePinHigh(F0); - } else { - writePinLow(F0); - } - - led_set_user(usb_led); -} - diff --git a/keyboards/fc980c/config.h b/keyboards/fc980c/config.h index f9d3e06d6e..7e79d8d1f8 100644 --- a/keyboards/fc980c/config.h +++ b/keyboards/fc980c/config.h @@ -49,7 +49,10 @@ along with this program. If not, see . /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 0 -#define TAPPING_TERM 175 + +#define LED_NUM_LOCK_PIN B4 +#define LED_CAPS_LOCK_PIN B5 +#define LED_SCROLL_LOCK_PIN B6 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ // #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/fc980c/fc980c.c b/keyboards/fc980c/fc980c.c index c09eacfa33..744a3614a5 100644 --- a/keyboards/fc980c/fc980c.c +++ b/keyboards/fc980c/fc980c.c @@ -22,46 +22,9 @@ along with this program. If not, see . #endif void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - #ifdef ACTUATION_DEPTH_ADJUSTMENT adjust_actuation_point(ACTUATION_DEPTH_ADJUSTMENT); #endif 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) { - if (usb_led & (1<. /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN E6 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN B7 #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 4 diff --git a/keyboards/foxlab/leaf60/hotswap/hotswap.c b/keyboards/foxlab/leaf60/hotswap/hotswap.c index 20778d927d..e2de4a7e31 100644 --- a/keyboards/foxlab/leaf60/hotswap/hotswap.c +++ b/keyboards/foxlab/leaf60/hotswap/hotswap.c @@ -14,46 +14,3 @@ * 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/universal/config.h b/keyboards/foxlab/leaf60/universal/config.h index 9f761f454d..f48bae497a 100644 --- a/keyboards/foxlab/leaf60/universal/config.h +++ b/keyboards/foxlab/leaf60/universal/config.h @@ -48,6 +48,9 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN E6 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN B7 #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/foxlab/leaf60/universal/universal.c b/keyboards/foxlab/leaf60/universal/universal.c index 5fe663a1bf..197e411d70 100644 --- a/keyboards/foxlab/leaf60/universal/universal.c +++ b/keyboards/foxlab/leaf60/universal/universal.c @@ -14,48 +14,3 @@ * 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/hineybush/hineyg80/config.h b/keyboards/hineybush/hineyg80/config.h index 4072def2fb..81bf622722 100644 --- a/keyboards/hineybush/hineyg80/config.h +++ b/keyboards/hineybush/hineyg80/config.h @@ -22,6 +22,11 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW + +#define LED_NUM_LOCK_PIN C6 +#define LED_CAPS_LOCK_PIN B6 +#define LED_SCROLL_LOCK_PIN B5 + /* number of backlight levels */ #ifdef BACKLIGHT_PIN diff --git a/keyboards/hineybush/hineyg80/hineyg80.c b/keyboards/hineybush/hineyg80/hineyg80.c index 236c646be7..a56e46e9de 100644 --- a/keyboards/hineybush/hineyg80/hineyg80.c +++ b/keyboards/hineybush/hineyg80/hineyg80.c @@ -14,50 +14,3 @@ * along with this program. If not, see . */ #include "hineyg80.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 - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - // Turn numlock on - writePinHigh(C6); - } else { - // Turn numlock off - writePinLow(C6); - } - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - // Turn capslock on - writePinHigh(B6); - } else { - // Turn capslock off - writePinLow(B6); - } - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - // Turn scrolllock on - writePinHigh(B5); - } else { - // Turn scrolllock off - writePinLow(B5); - } - led_set_user(usb_led); -} diff --git a/keyboards/jc65/v32u4/config.h b/keyboards/jc65/v32u4/config.h index 8233dd1e8c..a00f64a1f5 100644 --- a/keyboards/jc65/v32u4/config.h +++ b/keyboards/jc65/v32u4/config.h @@ -37,6 +37,9 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4, F5 } #define UNUSED_PINS +#define LED_CAPS_LOCK_PIN B2 +#define LED_PIN_ON_STATE 0 + #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/jc65/v32u4/v32u4.c b/keyboards/jc65/v32u4/v32u4.c index c69c5d5316..a6837268e1 100644 --- a/keyboards/jc65/v32u4/v32u4.c +++ b/keyboards/jc65/v32u4/v32u4.c @@ -1,36 +1 @@ #include "v32u4.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 - if (usb_led & (1<. /* COL2ROW, ROW2COL*/ //#define DIODE_DIRECTION +#define LED_CAPS_LOCK_PIN B0 +#define LED_SCROLL_LOCK_PIN E6 +#define LED_PIN_ON_STATE 0 + /* number of backlight levels */ //#define BACKLIGHT_LEVELS 3 // #define BACKLIGHT_PIN B7 diff --git a/keyboards/kmac/kmac.c b/keyboards/kmac/kmac.c index dcbbc2f179..78334cb754 100644 --- a/keyboards/kmac/kmac.c +++ b/keyboards/kmac/kmac.c @@ -15,62 +15,9 @@ */ #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 - 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); -} - -*/ - -/* LED pin configuration - * Scroll Lock: Low PE6 - * Caps Lock: Low PB0 - */ -void led_set_kb(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(CAPS_PIN); - } else { - writePinHigh(CAPS_PIN); - } - - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinLow(SCROLL_PIN); - } else { - writePinHigh(SCROLL_PIN); - } - - led_set_user(usb_led); -} - void backlight_init_ports(void) { setPinOutput(B1); setPinOutput(B2); diff --git a/keyboards/melody96/config.h b/keyboards/melody96/config.h index 2533bfa353..038d974604 100644 --- a/keyboards/melody96/config.h +++ b/keyboards/melody96/config.h @@ -22,6 +22,11 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL +#define LED_NUM_LOCK_PIN C6 +#define LED_CAPS_LOCK_PIN C7 +#define LED_SCROLL_LOCK_PIN B5 +#define LED_PIN_ON_STATE 0 + /* number of backlight levels */ #define BACKLIGHT_PIN B6 #ifdef BACKLIGHT_PIN diff --git a/keyboards/melody96/melody96.c b/keyboards/melody96/melody96.c index 2fe274ee47..44e813586b 100644 --- a/keyboards/melody96/melody96.c +++ b/keyboards/melody96/melody96.c @@ -1,23 +1 @@ #include "melody96.h" - -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - DDRC |= (1 << 6); PORTC &= ~(1 << 6); - } else { - DDRC &= ~(1 << 6); PORTC &= ~(1 << 6); - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRC |= (1 << 7); PORTC &= ~(1 << 7); - } else { - DDRC &= ~(1 << 7); PORTC &= ~(1 << 7); - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRB |= (1 << 5); PORTB &= ~(1 << 5); - } else { - DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); - } - - led_set_user(usb_led); -} diff --git a/keyboards/peiorisboards/ixora/config.h b/keyboards/peiorisboards/ixora/config.h index 77ba89c292..4b52d18f3f 100644 --- a/keyboards/peiorisboards/ixora/config.h +++ b/keyboards/peiorisboards/ixora/config.h @@ -22,3 +22,7 @@ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 0 + +#define LED_NUM_LOCK_PIN A9 +#define LED_CAPS_LOCK_PIN A10 +#define LED_SCROLL_LOCK_PIN A8 diff --git a/keyboards/peiorisboards/ixora/ixora.c b/keyboards/peiorisboards/ixora/ixora.c index 7996db629f..f2dcd864aa 100644 --- a/keyboards/peiorisboards/ixora/ixora.c +++ b/keyboards/peiorisboards/ixora/ixora.c @@ -1,43 +1 @@ #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/redscarf_iiplus/verb/config.h b/keyboards/redscarf_iiplus/verb/config.h index 3fecdcac3b..d920596ec9 100755 --- a/keyboards/redscarf_iiplus/verb/config.h +++ b/keyboards/redscarf_iiplus/verb/config.h @@ -49,10 +49,9 @@ along with this program. If not, see . /* 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 LED_NUM_LOCK_PIN E6 +#define LED_CAPS_LOCK_PIN C7 +#define LED_PIN_ON_STATE 0 #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING diff --git a/keyboards/redscarf_iiplus/verb/verb.c b/keyboards/redscarf_iiplus/verb/verb.c index 62ea1859d3..27a3d81533 100755 --- a/keyboards/redscarf_iiplus/verb/verb.c +++ b/keyboards/redscarf_iiplus/verb/verb.c @@ -14,38 +14,3 @@ * 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/sck/osa/config.h b/keyboards/sck/osa/config.h index 6710134400..9d041d0f0c 100644 --- a/keyboards/sck/osa/config.h +++ b/keyboards/sck/osa/config.h @@ -91,6 +91,10 @@ along with this program. If not, see . /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST +#define LED_NUM_LOCK_PIN C7 +#define LED_CAPS_LOCK_PIN C6 +#define LED_SCROLL_LOCK_PIN B6 + /* number of backlight levels */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ diff --git a/keyboards/sck/osa/osa.c b/keyboards/sck/osa/osa.c index 138a28893b..7f144035e5 100644 --- a/keyboards/sck/osa/osa.c +++ b/keyboards/sck/osa/osa.c @@ -14,60 +14,3 @@ * along with this program. If not, see . */ #include "osa.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 matrix_init_board(void){ - setPinOutput(C7); - setPinOutput(C6); - setPinOutput(B6); -} - -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(C7); - } else { - writePinLow(C7); - } - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinHigh(C6); - } else { - writePinLow(C6); - } - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinHigh(B6); - } else { - writePinLow(B6); - } - led_set_user(usb_led); -} - From e4aadf2c05783603a710b5553e43078a7eaf5f78 Mon Sep 17 00:00:00 2001 From: Wilba Date: Thu, 19 Nov 2020 06:35:55 +1100 Subject: [PATCH 090/114] [Keyboard] Add wilba.tech WT65-G (#10877) --- keyboards/wilba_tech/wt65_g/config.h | 55 +++++++++++++++++++ keyboards/wilba_tech/wt65_g/info.json | 12 ++++ .../wt65_g/keymaps/default/keymap.c | 52 ++++++++++++++++++ .../wilba_tech/wt65_g/keymaps/via/keymap.c | 1 + .../wilba_tech/wt65_g/keymaps/via/rules.mk | 1 + keyboards/wilba_tech/wt65_g/readme.md | 17 ++++++ keyboards/wilba_tech/wt65_g/rules.mk | 22 ++++++++ keyboards/wilba_tech/wt65_g/wt65_g.c | 17 ++++++ keyboards/wilba_tech/wt65_g/wt65_g.h | 36 ++++++++++++ 9 files changed, 213 insertions(+) create mode 100644 keyboards/wilba_tech/wt65_g/config.h create mode 100644 keyboards/wilba_tech/wt65_g/info.json create mode 100644 keyboards/wilba_tech/wt65_g/keymaps/default/keymap.c create mode 100644 keyboards/wilba_tech/wt65_g/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/wt65_g/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/wt65_g/readme.md create mode 100644 keyboards/wilba_tech/wt65_g/rules.mk create mode 100644 keyboards/wilba_tech/wt65_g/wt65_g.c create mode 100644 keyboards/wilba_tech/wt65_g/wt65_g.h diff --git a/keyboards/wilba_tech/wt65_g/config.h b/keyboards/wilba_tech/wt65_g/config.h new file mode 100644 index 0000000000..8529d89990 --- /dev/null +++ b/keyboards/wilba_tech/wt65_g/config.h @@ -0,0 +1,55 @@ +/* Copyright 2020 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 0x0022 // PCB #34 +#define DEVICE_VER 0x0001 +#define MANUFACTURER wilba.tech +#define PRODUCT wilba.tech WT65-G + +/* 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, F1, F4, F6, F7 } +#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } // B7, B0 +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#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/wilba_tech/wt65_g/info.json b/keyboards/wilba_tech/wt65_g/info.json new file mode 100644 index 0000000000..c88ac4da1b --- /dev/null +++ b/keyboards/wilba_tech/wt65_g/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "wilba.tech WT65-G", + "url": "https://wilba.tech", + "maintainer": "Wilba", + "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":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}] + } + } +} \ No newline at end of file diff --git a/keyboards/wilba_tech/wt65_g/keymaps/default/keymap.c b/keyboards/wilba_tech/wt65_g/keymaps/default/keymap.c new file mode 100644 index 0000000000..9670dd4c1f --- /dev/null +++ b/keyboards/wilba_tech/wt65_g/keymaps/default/keymap.c @@ -0,0 +1,52 @@ +/* Copyright 2020 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 . + */ +// Default layout for WT65-G +#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_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_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_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_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_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, 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), + + // 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), +}; \ No newline at end of file diff --git a/keyboards/wilba_tech/wt65_g/keymaps/via/keymap.c b/keyboards/wilba_tech/wt65_g/keymaps/via/keymap.c new file mode 100644 index 0000000000..1f9d213f05 --- /dev/null +++ b/keyboards/wilba_tech/wt65_g/keymaps/via/keymap.c @@ -0,0 +1 @@ +#include "../default/keymap.c" \ No newline at end of file diff --git a/keyboards/wilba_tech/wt65_g/keymaps/via/rules.mk b/keyboards/wilba_tech/wt65_g/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/wilba_tech/wt65_g/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt65_g/readme.md b/keyboards/wilba_tech/wt65_g/readme.md new file mode 100644 index 0000000000..09c8c56e2b --- /dev/null +++ b/keyboards/wilba_tech/wt65_g/readme.md @@ -0,0 +1,17 @@ +# wilba.tech WT65-G + +WT65-G is a keyboard PCB supporting 65% layout and daughterboard USB-C. [More info at wilba.tech](https://wilba.tech/) + +* Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +* Hardware Supported: wilba.tech WT65-G +* Hardware Availability: [wilba.tech](https://wilba.tech/) + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/wt65_g:default + +Flashing example for this keyboard: + + make wilba_tech/wt65_g:default:flash + +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_g/rules.mk b/keyboards/wilba_tech/wt65_g/rules.mk new file mode 100644 index 0000000000..04e644cbc9 --- /dev/null +++ b/keyboards/wilba_tech/wt65_g/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output \ No newline at end of file diff --git a/keyboards/wilba_tech/wt65_g/wt65_g.c b/keyboards/wilba_tech/wt65_g/wt65_g.c new file mode 100644 index 0000000000..54e823cb7e --- /dev/null +++ b/keyboards/wilba_tech/wt65_g/wt65_g.c @@ -0,0 +1,17 @@ +/* Copyright 2020 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 "wt65_g.h" diff --git a/keyboards/wilba_tech/wt65_g/wt65_g.h b/keyboards/wilba_tech/wt65_g/wt65_g.h new file mode 100644 index 0000000000..bd7381236f --- /dev/null +++ b/keyboards/wilba_tech/wt65_g/wt65_g.h @@ -0,0 +1,36 @@ +/* Copyright 2020 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, 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, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K400, K401, K402, K406, K410, 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, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { K400, K401, K402, ____, ____, ____, K406, ____, ____, ____, K410, K411, K412, K413, K414 } \ +} + From ad9674c5afa550bb1b41e924f37865301c99a7c5 Mon Sep 17 00:00:00 2001 From: Wilba Date: Thu, 19 Nov 2020 06:45:44 +1100 Subject: [PATCH 091/114] [Keyboard] Add wilba.tech WT80-G (#10878) * Added WT80-G * Fixed keyboard name in info.json --- keyboards/wilba_tech/wt80_g/config.h | 55 +++++++++++++++++++ keyboards/wilba_tech/wt80_g/info.json | 12 ++++ .../wt80_g/keymaps/default/keymap.c | 54 ++++++++++++++++++ .../wilba_tech/wt80_g/keymaps/via/keymap.c | 1 + .../wilba_tech/wt80_g/keymaps/via/rules.mk | 1 + keyboards/wilba_tech/wt80_g/readme.md | 17 ++++++ keyboards/wilba_tech/wt80_g/rules.mk | 22 ++++++++ keyboards/wilba_tech/wt80_g/wt80_g.c | 17 ++++++ keyboards/wilba_tech/wt80_g/wt80_g.h | 37 +++++++++++++ 9 files changed, 216 insertions(+) create mode 100644 keyboards/wilba_tech/wt80_g/config.h create mode 100644 keyboards/wilba_tech/wt80_g/info.json create mode 100644 keyboards/wilba_tech/wt80_g/keymaps/default/keymap.c create mode 100644 keyboards/wilba_tech/wt80_g/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/wt80_g/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/wt80_g/readme.md create mode 100644 keyboards/wilba_tech/wt80_g/rules.mk create mode 100644 keyboards/wilba_tech/wt80_g/wt80_g.c create mode 100644 keyboards/wilba_tech/wt80_g/wt80_g.h diff --git a/keyboards/wilba_tech/wt80_g/config.h b/keyboards/wilba_tech/wt80_g/config.h new file mode 100644 index 0000000000..4c636c200a --- /dev/null +++ b/keyboards/wilba_tech/wt80_g/config.h @@ -0,0 +1,55 @@ +/* Copyright 2020 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 0x0023 // PCB #35 +#define DEVICE_VER 0x0001 +#define MANUFACTURER wilba.tech +#define PRODUCT wilba.tech WT80-G + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 17 + +/* + * 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, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4, B7, B0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#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/wilba_tech/wt80_g/info.json b/keyboards/wilba_tech/wt80_g/info.json new file mode 100644 index 0000000000..1d407c24f7 --- /dev/null +++ b/keyboards/wilba_tech/wt80_g/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "wilba.tech WT80-G", + "url": "https://wilba.tech", + "maintainer": "Wilba", + "width": 18.25, + "height": 6.25, + "layouts": { + "LAYOUT_all": { + "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.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25}, {"x":14, "y":1.25}, {"x":15.25, "y":1.25}, {"x":16.25, "y":1.25}, {"x":17.25, "y":1.25}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.5, "y":2.25, "w":1.5}, {"x":15.25, "y":2.25}, {"x":16.25, "y":2.25}, {"x":17.25, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":0, "y":4.25, "w":1.25}, {"x":1.25, "y":4.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14, "y":4.25}, {"x":16.25, "y":4.25}, {"x":0, "y":5.25, "w":1.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"x":10, "y":5.25, "w":1.25}, {"x":11.25, "y":5.25, "w":1.25}, {"x":12.5, "y":5.25, "w":1.25}, {"x":13.75, "y":5.25, "w":1.25}, {"x":15.25, "y":5.25}, {"x":16.25, "y":5.25}, {"x":17.25, "y":5.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/wilba_tech/wt80_g/keymaps/default/keymap.c b/keyboards/wilba_tech/wt80_g/keymaps/default/keymap.c new file mode 100644 index 0000000000..08fa11b385 --- /dev/null +++ b/keyboards/wilba_tech/wt80_g/keymaps/default/keymap.c @@ -0,0 +1,54 @@ +/* Copyright 2020 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 . + */ +// Default layout for WT80-G +#include QMK_KEYBOARD_H + +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_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_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), + + [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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; + diff --git a/keyboards/wilba_tech/wt80_g/keymaps/via/keymap.c b/keyboards/wilba_tech/wt80_g/keymaps/via/keymap.c new file mode 100644 index 0000000000..1f9d213f05 --- /dev/null +++ b/keyboards/wilba_tech/wt80_g/keymaps/via/keymap.c @@ -0,0 +1 @@ +#include "../default/keymap.c" \ No newline at end of file diff --git a/keyboards/wilba_tech/wt80_g/keymaps/via/rules.mk b/keyboards/wilba_tech/wt80_g/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/wilba_tech/wt80_g/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt80_g/readme.md b/keyboards/wilba_tech/wt80_g/readme.md new file mode 100644 index 0000000000..b016b7ac8d --- /dev/null +++ b/keyboards/wilba_tech/wt80_g/readme.md @@ -0,0 +1,17 @@ +# wilba.tech WT80-G + +WT80-G is a keyboard PCB supporting TKL layout and daughterboard USB-C. [More info at wilba.tech](https://wilba.tech/) + +* Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +* Hardware Supported: wilba.tech WT80-G +* Hardware Availability: [wilba.tech](https://wilba.tech/) + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/wt80_g:default + +Flashing example for this keyboard: + + make wilba_tech/wt80_g:default:flash + +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/wt80_g/rules.mk b/keyboards/wilba_tech/wt80_g/rules.mk new file mode 100644 index 0000000000..04e644cbc9 --- /dev/null +++ b/keyboards/wilba_tech/wt80_g/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output \ No newline at end of file diff --git a/keyboards/wilba_tech/wt80_g/wt80_g.c b/keyboards/wilba_tech/wt80_g/wt80_g.c new file mode 100644 index 0000000000..821cffc7d3 --- /dev/null +++ b/keyboards/wilba_tech/wt80_g/wt80_g.c @@ -0,0 +1,17 @@ +/* Copyright 2020 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 "wt80_g.h" diff --git a/keyboards/wilba_tech/wt80_g/wt80_g.h b/keyboards/wilba_tech/wt80_g/wt80_g.h new file mode 100644 index 0000000000..df0bfe57c1 --- /dev/null +++ b/keyboards/wilba_tech/wt80_g/wt80_g.h @@ -0,0 +1,37 @@ +/* Copyright 2020 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, K014, K015, K016, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K313, K114, K115, K116, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \ + K500, K501, K502, K506, K510, K511, K512, K513, K514, K515, K516 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, ____, K014, K015, K016 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, ____, ____, ____ }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, ____, K415, ____ }, \ + { K500, K501, K502, ____, ____, ____, K506, ____, ____, ____, K510, K511, K512, K513, K514, K515, K516 } \ +} From 3270cbeb46d69d0961d3a7243c154f84f5bafaa2 Mon Sep 17 00:00:00 2001 From: gtips <51393966+gtips@users.noreply.github.com> Date: Thu, 19 Nov 2020 04:47:29 +0900 Subject: [PATCH 092/114] [Keymap]Add and Update keymap for reviung34 (#10915) --- keyboards/reviung34/keymaps/default/config.h | 20 ------ keyboards/reviung34/keymaps/default/keymap.c | 53 +++++++------- .../reviung34/keymaps/default_2uL/keymap.c | 69 ++++++++++++++++++ .../reviung34/keymaps/default_2uL/readme.md | 1 + .../reviung34/keymaps/default_jp/keymap.c | 70 +++++++++++++++++++ .../reviung34/keymaps/default_jp/readme.md | 1 + keyboards/reviung34/reviung34.h | 23 ++++-- 7 files changed, 187 insertions(+), 50 deletions(-) delete mode 100755 keyboards/reviung34/keymaps/default/config.h create mode 100755 keyboards/reviung34/keymaps/default_2uL/keymap.c create mode 100755 keyboards/reviung34/keymaps/default_2uL/readme.md create mode 100755 keyboards/reviung34/keymaps/default_jp/keymap.c create mode 100755 keyboards/reviung34/keymaps/default_jp/readme.md diff --git a/keyboards/reviung34/keymaps/default/config.h b/keyboards/reviung34/keymaps/default/config.h deleted file mode 100755 index 1924c64a1e..0000000000 --- a/keyboards/reviung34/keymaps/default/config.h +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright 2019 gtips - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General 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/reviung34/keymaps/default/keymap.c b/keyboards/reviung34/keymaps/default/keymap.c index fe373f53b7..66939d2469 100755 --- a/keyboards/reviung34/keymaps/default/keymap.c +++ b/keyboards/reviung34/keymaps/default/keymap.c @@ -16,48 +16,51 @@ #include QMK_KEYBOARD_H enum layer_names { - _BASE, - _LOWER, - _RAISE, - _ADJUST + _BASE, + _LOWER, + _RAISE, + _ADJUST }; #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) -#define CT_TB LCTL_T(KC_TAB) #define CT_Q LCTL_T(KC_Q) +#define CT_CM RCTL_T(KC_COMM) #define SF_Z LSFT_T(KC_Z) #define SF_SS RSFT_T(KC_SLSH) #define AL_X LALT_T(KC_X) +#define AL_DT RALT_T(KC_DOT) +#define RA_SP LT(RAISE, KC_SPC) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_reviung34( - CT_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, - SF_Z, AL_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SF_SS, - CT_TB, LOWER, RAISE, KC_SPC + CT_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_ENT, + SF_Z, AL_X, KC_C, KC_V, KC_B, KC_N, KC_M, CT_CM, AL_DT, SF_SS, + KC_TAB, KC_BSPC, LOWER, RA_SP + ), + + [_LOWER] = LAYOUT_reviung34( + 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_LCBR, KC_RCBR, KC_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, + KC_LSFT, KC_ESC, KC_LGUI, KC_LALT, KC_QUOT, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_BSPC, + _______, _______, _______, _______ ), - [_LOWER] = LAYOUT_reviung34( - 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_LCBR, KC_RCBR, KC_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_QUOT, - KC_LSFT, KC_ESC, KC_LGUI, KC_LALT, KC_CAPS, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_DEL, - _______, _______, _______, KC_BSPC - ), - - [_RAISE] = LAYOUT_reviung34( - 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_LBRC, KC_RBRC, KC_BSLS, XXXXXXX, XXXXXXX, KC_GRV, KC_TILD, KC_DQUO, - KC_LSFT, KC_ESC, KC_RGUI, KC_LALT, KC_CAPS, KC_TAB, KC_RALT, KC_RCTL, KC_RSFT, KC_BSPC, - _______, _______, _______, KC_ENT + [_RAISE] = LAYOUT_reviung34( + 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_LBRC, KC_RBRC, KC_BSLS, XXXXXXX, XXXXXXX, KC_GRV, KC_TILD, KC_COLN, + KC_LSFT, KC_ESC, KC_RGUI, KC_LALT, KC_DQUO, KC_TAB, XXXXXXX, KC_RCTL, KC_RALT, KC_DEL, + _______, _______, _______, _______ ), [_ADJUST] = LAYOUT_reviung34( - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - KC_F7, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - KC_F11, KC_F12, XXXXXXX, XXXXXXX, KC_PSCR, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - _______, _______, _______, XXXXXXX + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_F11, KC_F12, KC_CAPS, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______ ), }; diff --git a/keyboards/reviung34/keymaps/default_2uL/keymap.c b/keyboards/reviung34/keymaps/default_2uL/keymap.c new file mode 100755 index 0000000000..767c0ff4c6 --- /dev/null +++ b/keyboards/reviung34/keymaps/default_2uL/keymap.c @@ -0,0 +1,69 @@ +/* Copyright 2019 gtips + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +#define CT_Q LCTL_T(KC_Q) +#define CT_CM RCTL_T(KC_COMM) +#define SF_Z LSFT_T(KC_Z) +#define SF_SS RSFT_T(KC_SLSH) +#define AL_X LALT_T(KC_X) +#define AL_DT RALT_T(KC_DOT) +#define RA_SP LT(RAISE, KC_SPC) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_reviung34_2uL( + CT_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_ENT, + SF_Z, AL_X, KC_C, KC_V, KC_B, KC_N, KC_M, CT_CM, AL_DT, SF_SS, + KC_TAB, LOWER, RA_SP + ), + + [_LOWER] = LAYOUT_reviung34_2uL( + 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_LCBR, KC_RCBR, KC_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, + KC_LSFT, KC_ESC, KC_LGUI, KC_LALT, KC_QUOT, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_BSPC, + _______, _______, _______ + ), + + [_RAISE] = LAYOUT_reviung34_2uL( + 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_LBRC, KC_RBRC, KC_BSLS, XXXXXXX, XXXXXXX, KC_GRV, KC_TILD, KC_COLN, + KC_LSFT, KC_ESC, KC_RGUI, KC_LALT, KC_DQUO, KC_TAB, XXXXXXX, KC_RCTL, KC_RALT, KC_DEL, + _______, _______, _______ + ), + + [_ADJUST] = LAYOUT_reviung34_2uL( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_F11, KC_F12, KC_CAPS, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______ + ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/reviung34/keymaps/default_2uL/readme.md b/keyboards/reviung34/keymaps/default_2uL/readme.md new file mode 100755 index 0000000000..2e4619fae8 --- /dev/null +++ b/keyboards/reviung34/keymaps/default_2uL/readme.md @@ -0,0 +1 @@ +# The default keymap for reviung34 diff --git a/keyboards/reviung34/keymaps/default_jp/keymap.c b/keyboards/reviung34/keymaps/default_jp/keymap.c new file mode 100755 index 0000000000..c37d87662c --- /dev/null +++ b/keyboards/reviung34/keymaps/default_jp/keymap.c @@ -0,0 +1,70 @@ +/* Copyright 2019 gtips + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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" + +enum layer_names { + _BASE, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +#define CT_Q LCTL_T(JP_Q) +#define CT_CM RCTL_T(JP_COMM) +#define SF_Z LSFT_T(JP_Z) +#define SF_SS RSFT_T(JP_SLSH) +#define AL_X LALT_T(JP_X) +#define AL_DT RALT_T(JP_DOT) +#define RA_SP LT(RAISE, KC_SPC) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_reviung34( + CT_Q, JP_W, JP_E, JP_R, JP_T, JP_Y, JP_U, JP_I, JP_O, JP_P, + JP_A, JP_S, JP_D, JP_F, JP_G, JP_H, JP_J, JP_K, JP_L, KC_ENT, + SF_Z, AL_X, JP_C, JP_V, JP_B, JP_N, JP_M, CT_CM, AL_DT, SF_SS, + KC_TAB, KC_BSPC, LOWER, RA_SP + ), + + [_LOWER] = LAYOUT_reviung34( + JP_EXLM, JP_AT, JP_HASH, JP_DLR, JP_PERC, JP_CIRC, JP_AMPR, JP_ASTR, JP_LPRN, JP_RPRN, + JP_UNDS, JP_PLUS, JP_LCBR, JP_RCBR, JP_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, JP_SCLN, + KC_LSFT, KC_ESC, KC_LGUI, KC_LALT, JP_QUOT, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_BSPC, + _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT_reviung34( + JP_1, JP_2, JP_3, JP_4, JP_5, JP_6, JP_7, JP_8, JP_9, JP_0, + JP_MINS, JP_EQL, JP_LBRC, JP_RBRC, JP_YEN, KC_RO, XXXXXXX, JP_GRV, JP_TILD, JP_COLN, + KC_LSFT, KC_ESC, KC_RGUI, KC_LALT, JP_DQUO, KC_TAB, XXXXXXX, KC_RCTL, KC_RALT, KC_DEL, + _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT_reviung34( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_F11, KC_F12, KC_CAPS, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______ + ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/reviung34/keymaps/default_jp/readme.md b/keyboards/reviung34/keymaps/default_jp/readme.md new file mode 100755 index 0000000000..2e4619fae8 --- /dev/null +++ b/keyboards/reviung34/keymaps/default_jp/readme.md @@ -0,0 +1 @@ +# The default keymap for reviung34 diff --git a/keyboards/reviung34/reviung34.h b/keyboards/reviung34/reviung34.h index ccf9762f7b..8385e5c8c2 100755 --- a/keyboards/reviung34/reviung34.h +++ b/keyboards/reviung34/reviung34.h @@ -29,11 +29,24 @@ K00, K01, K02, K03, K04, K05, K06, K07, K08, K35, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K36, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K37, \ - K32, K33, K34, K38 \ + K32, K33, K34, K38 \ ) \ { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ - { KC_NO, KC_NO, K32, K33, K34, K35, K36, K37, K38 } \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ + { KC_NO, KC_NO, K32, K33, K34, K35, K36, K37, K38 } \ +} + +#define LAYOUT_reviung34_2uL( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K35, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K36, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K37, \ + K32, K34, K38 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ + { KC_NO, KC_NO, K32, KC_NO, K34, K35, K36, K37, K38 } \ } From 0f8b0d971f40b43a6f779878275963f0ff52819d Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed, 18 Nov 2020 12:16:18 -0800 Subject: [PATCH 093/114] VIA Support: E6V2 BMC editions (#10969) * update readme with relevant PCB versioning * Add VIA keymap to e6v2 LE BMC * add via keymap * Update keyboards/exclusive/e6v2/le_bmc/keymaps/via/keymap.c Co-authored-by: Joel Challis * Update keyboards/exclusive/e6v2/oe_bmc/keymaps/via/keymap.c Co-authored-by: Joel Challis Co-authored-by: Joel Challis --- keyboards/exclusive/e6v2/le_bmc/config.h | 4 +- .../e6v2/le_bmc/keymaps/via/keymap.c | 48 ++++++++++++++++++ .../e6v2/le_bmc/keymaps/via/rules.mk | 2 + keyboards/exclusive/e6v2/le_bmc/readme.md | 4 +- keyboards/exclusive/e6v2/oe_bmc/config.h | 4 +- .../e6v2/oe_bmc/keymaps/via/keymap.c | 49 +++++++++++++++++++ .../e6v2/oe_bmc/keymaps/via/rules.mk | 2 + keyboards/exclusive/e6v2/oe_bmc/readme.md | 2 +- 8 files changed, 109 insertions(+), 6 deletions(-) create mode 100644 keyboards/exclusive/e6v2/le_bmc/keymaps/via/keymap.c create mode 100644 keyboards/exclusive/e6v2/le_bmc/keymaps/via/rules.mk create mode 100644 keyboards/exclusive/e6v2/oe_bmc/keymaps/via/keymap.c create mode 100644 keyboards/exclusive/e6v2/oe_bmc/keymaps/via/rules.mk diff --git a/keyboards/exclusive/e6v2/le_bmc/config.h b/keyboards/exclusive/e6v2/le_bmc/config.h index 198e73265d..36c1336f2c 100644 --- a/keyboards/exclusive/e6v2/le_bmc/config.h +++ b/keyboards/exclusive/e6v2/le_bmc/config.h @@ -18,8 +18,8 @@ along with this program. If not, see . #pragma once /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 +#define VENDOR_ID 0x4558 +#define PRODUCT_ID 0xE62D #define DEVICE_VER 0x0001 #define MANUFACTURER Exclusive / E-Team #define PRODUCT E6-V2 LE BMC diff --git a/keyboards/exclusive/e6v2/le_bmc/keymaps/via/keymap.c b/keyboards/exclusive/e6v2/le_bmc/keymaps/via/keymap.c new file mode 100644 index 0000000000..33b8aae228 --- /dev/null +++ b/keyboards/exclusive/e6v2/le_bmc/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* 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_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), + +[2] = LAYOUT_60_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/exclusive/e6v2/le_bmc/keymaps/via/rules.mk b/keyboards/exclusive/e6v2/le_bmc/keymaps/via/rules.mk new file mode 100644 index 0000000000..43061db1dd --- /dev/null +++ b/keyboards/exclusive/e6v2/le_bmc/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/exclusive/e6v2/le_bmc/readme.md b/keyboards/exclusive/e6v2/le_bmc/readme.md index 561560a3e3..d999982671 100644 --- a/keyboards/exclusive/e6v2/le_bmc/readme.md +++ b/keyboards/exclusive/e6v2/le_bmc/readme.md @@ -2,8 +2,10 @@ 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. +The Round 2 PCB will be labeled 2.32 on the back of the PCB on the bottom left and will feature the Exclusive logo (with crown) on the front side of the PCB + * Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) -* Hardware Supported: ps2avrgb E6-V2 with atmega32a microcontroller +* Hardware Supported: ps2avrgb E6-V2 with atmega32a microcontroller rev 2.32 * 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): diff --git a/keyboards/exclusive/e6v2/oe_bmc/config.h b/keyboards/exclusive/e6v2/oe_bmc/config.h index c26006b6a9..17b701f589 100644 --- a/keyboards/exclusive/e6v2/oe_bmc/config.h +++ b/keyboards/exclusive/e6v2/oe_bmc/config.h @@ -18,8 +18,8 @@ along with this program. If not, see . #pragma once /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 +#define VENDOR_ID 0x4558 +#define PRODUCT_ID 0xE62B #define DEVICE_VER 0x0001 #define MANUFACTURER Exclusive / E-Team #define PRODUCT E6-V2 OE BMC diff --git a/keyboards/exclusive/e6v2/oe_bmc/keymaps/via/keymap.c b/keyboards/exclusive/e6v2/oe_bmc/keymaps/via/keymap.c new file mode 100644 index 0000000000..9f8752e9b9 --- /dev/null +++ b/keyboards/exclusive/e6v2/oe_bmc/keymaps/via/keymap.c @@ -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 . + */ +#include QMK_KEYBOARD_H +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), + +[2] = LAYOUT_60_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/exclusive/e6v2/oe_bmc/keymaps/via/rules.mk b/keyboards/exclusive/e6v2/oe_bmc/keymaps/via/rules.mk new file mode 100644 index 0000000000..43061db1dd --- /dev/null +++ b/keyboards/exclusive/e6v2/oe_bmc/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/exclusive/e6v2/oe_bmc/readme.md b/keyboards/exclusive/e6v2/oe_bmc/readme.md index cd6da0ff0b..c259728edf 100644 --- a/keyboards/exclusive/e6v2/oe_bmc/readme.md +++ b/keyboards/exclusive/e6v2/oe_bmc/readme.md @@ -3,7 +3,7 @@ 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 +* Hardware Supported: ps2avrgb E6-V2 with atmega32a microcontroller rev 2.31 * 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): From 66d52d8cd2271ad26b96b1a32c468adf9fec7637 Mon Sep 17 00:00:00 2001 From: yonatanzunger <30514250+yonatanzunger@users.noreply.github.com> Date: Wed, 18 Nov 2020 13:03:40 -0800 Subject: [PATCH 094/114] Update the melody96:zunger keymap (#10888) * Update the melody96/zunger layout to make typing Romance languages easier. Move the combining accents to fn + (keys used by Mac OS for that purpose), and move the fn key to be the one adjacent to the space bar, since one needs to type combinations of that a lot more than one needs to type Greek letters in normal use. (As determined by experiment) Also clean up the comments. Co-authored-by: Yonatan Zunger --- keyboards/melody96/keymaps/zunger/keymap.c | 143 ++++++++++++--------- 1 file changed, 79 insertions(+), 64 deletions(-) diff --git a/keyboards/melody96/keymaps/zunger/keymap.c b/keyboards/melody96/keymaps/zunger/keymap.c index bedb77a4b7..d396de6839 100644 --- a/keyboards/melody96/keymaps/zunger/keymap.c +++ b/keyboards/melody96/keymaps/zunger/keymap.c @@ -55,58 +55,17 @@ enum layers_keymap { // TODO: It would also be nice to be able to put the actual code points in here, rather than // numbers. +// Accent marks +#define CMB_GRV H(0300) +#define CMB_AGU H(0301) +#define CMB_DIA H(0308) +#define CMB_CIR H(0302) +#define CMB_MAC H(0304) +#define CMB_CED H(0327) +#define CMB_TIL H(0303) + 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| | × | | [3] - * | | | | | | | | | | | | | ∓ | 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. - * [3] The accent marks in this row are combining accent marks, which may be put after - * a character to combine it. In order, they are grave, acute, circumflex, tilde, - * diaresis (umlaut), and macron. - */ // 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( @@ -115,10 +74,38 @@ 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_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), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, MO_FN, KC_GREEK,KC_CADET,KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + /* The Greek layers. Shown here are the QWERTY layer (for visual reference) and the two Greek + * layers. + * ,---------------------------------------------------------------------------- + * | ` |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|HOM|END|PGU|PGD|MUT|BRK| QWERTY + * | ` | ₁ | ₂ | ₃ | ₄ | ₅ | ₆ | ₇ | ₈ | ₉ | ₀ | ₋ | ₊ | ₍ | ₎ | | | | | SHIFTGREEK + * | ` | ¹ | ² | ³ | ⁴ | ⁵ | ⁶ | ⁷ | ⁸ | ⁹ | ⁰ | ⁻ | ⁺ | ⁽ | ⁾ | | | | | GREEK + * |---------------------------------------------------------------------------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + | BKSPC |LCK| / | * | - | + * | ` | ¿ | | € | | | | | | | | | ≁ | BKSPC |LCK| | ⊗ | | + * | | | | | | | | | | | | ∝ | ∼ | BKSPC |LCK| ⊘ | ⊙ | ⊖ | + * |---------------------------------------------------------------------------| + * | 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 | ⊕ | + * | CTRL | Α | Σ | Δ | Φ | Γ | Η | | Κ | Λ | … | ∴ | RET | | | | | + * | CTRL | α | σ | δ | φ | γ | η | ϑ | κ | λ | ⋯ | ⋅ | RET | | | | | + * |-----------------------------------------------------------------------|---| + * | SHIFT | Z | X | C | V | B | N | M | , | . | / |SHFT | ↑ | 1 | 2 | 3 | | + * | SHIFT | Ζ | Ξ | Χ | ✔ | Β | Ν | Μ | ≲ | ≳ | |SHFT | | | | | | + * | SHIFT | ζ | ξ | χ | ς | β | ν | μ | ≪ | ≫ | ∫ |SHFT | | | | | | + * |-----------------------------------------------------------------------|ENT| + * | CTL | ALT| CMD| SPACE | α | β | γ | ← | ↓ | → | 0 | . | | + * | CTL | ALT| CMD| SPACE | α | β | γ | | | | | | | + * | CTL | ALT| CMD| SPACE | α | β | γ | | | | | | | + * `---------------------------------------------------------------------------' + */ [_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(00a1), _______, H(00a3), _______, _______, _______, _______, H(00b0), _______, _______, H(221d), H(223c), _______, _______, H(2298), H(2299), H(2296), + KC_GRV, _______, _______, _______, _______, _______, _______, _______, H(00b0), _______, _______, 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, @@ -130,30 +117,58 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, 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. + /* The Cadet layers. Again, we show the QWERTY layer and the two cadet layers. + * ,---------------------------------------------------------------------------- + * | ` |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|HOM|END|PGU|PGD|MUT|BRK| QWERTY + * | ∅ | | | | | | | | | | | | | | | | | | | SHIFTCADET + * | ¬ | | | | | | | | | | | | | | | | | | | CADET + * |---------------------------------------------------------------------------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + | 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 | * | * | * | | [1] + * |-----------------------------------------------------------------------|---| + * | SHIFT | Z | X | C | V | B | N | M | , | . | / |SHFT | ↑ | 1 | 2 | 3 | | + * | SHIFT | ℤ | ℂ | | ≉ | ≢ | ℕ | | | | |SHFT | | * | * | * | | + * | SHIFT | | ≠ | | ≈ | ≡ | ≤ | ≥ | | | ÷ |SHFT | | * | * | * | | [1] + * |-----------------------------------------------------------------------|ENT| + * | CTL | ALT| CMD| SPACE | α | β | γ | ← | ↓ | → | 0 | . | | + * | 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. + */ [_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, H(0300), H(0301), H(0302), H(0303), H(0308), H(0304), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, H(00b1), _______, _______, XXXXXXX, H(00d7), XXXXXXX, + KC_GRV, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, H(00b1), _______, _______, XXXXXXX, H(00d7), 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, + _______, XXXXXXX, H(2260), XXXXXXX, 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, + KC_GRV, H(00a1), XXXXXXX, H(00a3), 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, + _______, H(2124), H(2102), XXXXXXX, 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. + // Function layer is mostly for keyboard meta-control operations, but also contains the combining + // accent marks. These are deliberately placed to match where the analogous controls go on Mac OS. [_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, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + CMB_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RESET, + CMB_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, CMB_AGU, _______, _______, _______, CMB_DIA, CMB_CIR, CMB_MAC, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, UC_M_OS, UC_M_LN, UC_M_WI, UC_M_BS, UC_M_WC, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, CMB_CED, _______, _______, CMB_TIL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), }; From 7bdc41b025211fa3b4c74c7c46fdddf18bab6731 Mon Sep 17 00:00:00 2001 From: dsanchezseco Date: Wed, 18 Nov 2020 22:29:35 +0100 Subject: [PATCH 095/114] Changed personal keymap punk75:dsanchezseco (#10928) added a dvorak layer with a numpad in the center --- keyboards/punk75/keymaps/dsanchezseco/keymap.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/keyboards/punk75/keymaps/dsanchezseco/keymap.c b/keyboards/punk75/keymaps/dsanchezseco/keymap.c index 3c224b1628..e3fb62f036 100644 --- a/keyboards/punk75/keymaps/dsanchezseco/keymap.c +++ b/keyboards/punk75/keymaps/dsanchezseco/keymap.c @@ -20,6 +20,7 @@ // Defines names for use in layer keycodes and the keymap enum layer_names { _DVORAK, + _DVORAK_NUM, _QWERTY, _FN }; @@ -33,6 +34,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_END, KC_MPLY, KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SFTENT, KC_LCTL, KC_LGUI, KC_LALT, _______, MO(_FN), KC_SPC, KC_SPC, KC_MPRV, KC_BSPC, KC_BSPC, MO(_FN), _______, KC_RALT, KC_RGUI, KC_RCTL ), + [_DVORAK_NUM] = LAYOUT_ortho_5x15( /* DVORAK with center NUMPAD*/ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, KC_BSLS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MUTE, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_P7, KC_P8, KC_P9, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + ESC_CTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_P4, KC_P5, KC_P6, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_P1, KC_P2, KC_P3, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SFTENT, + KC_LCTL, KC_LGUI, KC_LALT, _______, MO(_FN), KC_SPC, KC_SPC, KC_P0, KC_BSPC, KC_BSPC, MO(_FN), _______, KC_RALT, KC_RGUI, KC_RCTL + ), [_QWERTY] = LAYOUT_ortho_5x15( /* QWERTY */ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, KC_BSLS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MUTE, @@ -43,11 +51,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DF(_QWERTY), _______, DF(_DVORAK), KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DF(_QWERTY), DF(_DVORAK_NUM), DF(_DVORAK), KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, MO(_FN), _______, _______, _______, KC_DEL, KC_DEL, MO(_FN), _______, _______, _______, _______ + _______, _______, _______, _______, MO(_FN), _______, _______, KC_NLCK, KC_DEL, KC_DEL, MO(_FN), _______, _______, _______, _______ ) }; From 078586b21a82bd9ed595607d2065854a09b84f24 Mon Sep 17 00:00:00 2001 From: j-zero Date: Wed, 18 Nov 2020 22:31:21 +0100 Subject: [PATCH 096/114] Update one_shot_keys.md (#10917) MOD_RSFT doesn't work. See: https://github.com/qmk/qmk_firmware/issues/10901 --- docs/one_shot_keys.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/one_shot_keys.md b/docs/one_shot_keys.md index aa3db5acb2..9a082d7d6d 100644 --- a/docs/one_shot_keys.md +++ b/docs/one_shot_keys.md @@ -22,7 +22,7 @@ Sometimes, you want to activate a one-shot key as part of a macro or tap dance r For one shot layers, you need to call `set_oneshot_layer(LAYER, ONESHOT_START)` on key down, and `clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED)` on key up. If you want to cancel the oneshot, call `reset_oneshot_layer()`. -For one shot mods, you need to call `set_oneshot_mods(MOD)` to set it, or `clear_oneshot_mods()` to cancel it. +For one shot mods, you need to call `set_oneshot_mods(MOD_BIT(KC_*))` to set it, or `clear_oneshot_mods()` to cancel it. !> If you're having issues with OSM translating over Remote Desktop Connection, this can be fixed by opening the settings, going to the "Local Resources" tap, and in the keyboard section, change the drop down to "On this Computer". This will fix the issue and allow OSM to function properly over Remote Desktop. From 3aef2bef8f6a3e33df4c0142da89f229320b212a Mon Sep 17 00:00:00 2001 From: Ari Madian Date: Wed, 18 Nov 2020 13:33:49 -0800 Subject: [PATCH 097/114] Add basic OLED keymap for nullbitsco/nibble (#10912) --- .../nullbitsco/nibble/keymaps/oled/keymap.c | 139 ++++++++++++++++++ .../nullbitsco/nibble/keymaps/oled/rules.mk | 1 + 2 files changed, 140 insertions(+) create mode 100644 keyboards/nullbitsco/nibble/keymaps/oled/keymap.c create mode 100644 keyboards/nullbitsco/nibble/keymaps/oled/rules.mk diff --git a/keyboards/nullbitsco/nibble/keymaps/oled/keymap.c b/keyboards/nullbitsco/nibble/keymaps/oled/keymap.c new file mode 100644 index 0000000000..0b6a974426 --- /dev/null +++ b/keyboards/nullbitsco/nibble/keymaps/oled/keymap.c @@ -0,0 +1,139 @@ +/* Copyright 2020 Jay Greco + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 + +enum custom_keycodes { + KC_CUST = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_MA] = 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_BSPC, KC_TILD, + KC_F13, 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_F14, 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_F15, 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_F16, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN] = LAYOUT_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_HOME, KC_INS, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } + +static void render_logo(void) { + static const char PROGMEM nibble_logo[] = { + 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, + 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, + 0x1f, 0x1f, 0x1f, 0x3f, 0x3e, 0xfe, 0xfe, 0xfc, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xfe, + 0xfe, 0xff, 0xff, 0xff, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x3f, 0x3e, 0xfe, 0xfe, + 0xfc, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfe, 0xff, 0xff, 0xff, + 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1e, 0x0c, 0x00, + 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x0f, 0x1f, 0x7f, 0xff, 0xfe, 0xf8, 0xf0, 0xc0, 0x80, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, + 0xe0, 0xe0, 0xe0, 0xf0, 0xf0, 0xfc, 0xff, 0xff, 0xbf, 0x1f, 0x07, 0x00, 0x00, 0x00, 0x00, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf0, 0xff, 0xff, + 0xff, 0xbf, 0x1f, 0x03, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x1f, 0x7f, 0xff, + 0xfe, 0xfc, 0xf0, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x07, 0x0f, 0xff, 0xff, 0xff, 0xfe, 0xfc, 0xe0, 0x00, 0x00, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x07, 0x0f, + 0xff, 0xff, 0xff, 0xfe, 0xf8, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, + 0x00, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x07, 0x1f, 0x3f, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, + 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x7f, 0xff, 0xff, 0xff, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, + 0xf8, 0xf8, 0xf8, 0xf8, 0x7c, 0x7c, 0x7e, 0x7f, 0x3f, 0x1f, 0x0f, 0x07, 0x00, 0x00, 0x00, 0x7f, + 0x7f, 0xff, 0xff, 0xff, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0x7c, 0x7c, 0x7e, + 0x3f, 0x3f, 0x1f, 0x0f, 0x07, 0x00, 0x00, 0x1f, 0x7f, 0x7f, 0xff, 0xff, 0xff, 0xf8, 0xf8, 0xf8, + 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0x78, 0x30, 0x3f, 0x7f, 0xff, 0xff, 0xff, + 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0x78, 0x30, 0x00 + }; + // Host Keyboard Layer Status + oled_write_raw_P(nibble_logo, sizeof(nibble_logo)); +} + +void oled_task_user(void) { + render_logo(); +} +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // Send keystrokes to host keyboard, if connected (see readme) + process_record_remote_kb(keycode, record); + switch(keycode) { + case KC_CUST: //custom macro + if (record->event.pressed) { + } + break; + + case RM_1: //remote macro 1 + if (record->event.pressed) { + } + break; + + case RM_2: //remote macro 2 + if (record->event.pressed) { + } + break; + + case RM_3: //remote macro 3 + if (record->event.pressed) { + } + break; + + case RM_4: //remote macro 4 + if (record->event.pressed) { + } + break; + + } + return true; +} + + +void encoder_update_kb(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} + +void matrix_init_user(void) { + // Initialize remote keyboard, if connected (see readme) + matrix_init_remote_kb(); +} + +void matrix_scan_user(void) { + // Scan and parse keystrokes from remote keyboard, if connected (see readme) + matrix_scan_remote_kb(); +} \ No newline at end of file diff --git a/keyboards/nullbitsco/nibble/keymaps/oled/rules.mk b/keyboards/nullbitsco/nibble/keymaps/oled/rules.mk new file mode 100644 index 0000000000..cf4068471f --- /dev/null +++ b/keyboards/nullbitsco/nibble/keymaps/oled/rules.mk @@ -0,0 +1 @@ +ENABLE_OLED_DRIVER = yes \ No newline at end of file From 88a783a8a769e604fa13947ee9c556f0dc1c95ad Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 18 Nov 2020 14:20:29 -0800 Subject: [PATCH 098/114] [Keyboard] PloopyCo update and fixes (#10936) This is based on feedback talking with crop_octagon about the device. Future trackballs will ship with ATMEL DFU for simplicity. This also includes some fixes and optimizations based on code review and tinkering on my own devices. --- keyboards/ploopyco/mouse/mouse.c | 25 +++------------- keyboards/ploopyco/mouse/readme.md | 2 +- keyboards/ploopyco/pmw3360.c | 2 +- keyboards/ploopyco/trackball/readme.md | 23 -------------- keyboards/ploopyco/trackball/rev1/readme.md | 30 +++++++++++++++++++ keyboards/ploopyco/trackball/rev1/rules.mk | 2 ++ .../ploopyco/trackball/rev1_005/readme.md | 3 ++ .../ploopyco/trackball/rev1_005/rules.mk | 2 ++ keyboards/ploopyco/trackball/rules.mk | 3 -- keyboards/ploopyco/trackball/trackball.c | 24 ++------------- 10 files changed, 46 insertions(+), 70 deletions(-) create mode 100644 keyboards/ploopyco/trackball/rev1/readme.md create mode 100644 keyboards/ploopyco/trackball/rev1_005/readme.md diff --git a/keyboards/ploopyco/mouse/mouse.c b/keyboards/ploopyco/mouse/mouse.c index 7e44feaf74..788a0a1f08 100644 --- a/keyboards/ploopyco/mouse/mouse.c +++ b/keyboards/ploopyco/mouse/mouse.c @@ -140,7 +140,7 @@ __attribute__((weak)) void process_mouse(report_mouse_t* mouse_report) { if (debug_mouse) dprintf("Cons] X: %d, Y: %d\n", data.dx, data.dy); // dprintf("Elapsed:%u, X: %f Y: %\n", i, pgm_read_byte(firmware_data+i)); - process_mouse_user(mouse_report, data.dx, -data.dy); + process_mouse_user(mouse_report, data.dx, data.dy); } } @@ -171,31 +171,14 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { if (IS_MOUSEKEY_BUTTON(keycode)) { report_mouse_t currentReport = pointing_device_get_report(); if (record->event.pressed) { - if (keycode == KC_MS_BTN1) - currentReport.buttons |= MOUSE_BTN1; - else if (keycode == KC_MS_BTN2) - currentReport.buttons |= MOUSE_BTN2; - else if (keycode == KC_MS_BTN3) - currentReport.buttons |= MOUSE_BTN3; - else if (keycode == KC_MS_BTN4) - currentReport.buttons |= MOUSE_BTN4; - else if (keycode == KC_MS_BTN5) - currentReport.buttons |= MOUSE_BTN5; + currentReport.buttons |= 1 << (keycode - KC_MS_BTN1); } else { - if (keycode == KC_MS_BTN1) - currentReport.buttons &= ~MOUSE_BTN1; - else if (keycode == KC_MS_BTN2) - currentReport.buttons &= ~MOUSE_BTN2; - else if (keycode == KC_MS_BTN3) - currentReport.buttons &= ~MOUSE_BTN3; - else if (keycode == KC_MS_BTN4) - currentReport.buttons &= ~MOUSE_BTN4; - else if (keycode == KC_MS_BTN5) - currentReport.buttons &= ~MOUSE_BTN5; + currentReport.buttons &= ~(1 << (keycode - KC_MS_BTN1)); } pointing_device_set_report(currentReport); pointing_device_send(); } + #endif return true; diff --git a/keyboards/ploopyco/mouse/readme.md b/keyboards/ploopyco/mouse/readme.md index fd0f932c62..5532a19986 100644 --- a/keyboards/ploopyco/mouse/readme.md +++ b/keyboards/ploopyco/mouse/readme.md @@ -17,7 +17,7 @@ To jump to the bootloader, hold down "Button 4" (the "forward" button on the lef 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). -# Customzing your PloopyCo Trackball +# Customzing your PloopyCo Mouse While the defaults are designed so that it can be plugged in and used right away, there are a number of things that you may want to change. Such as adding DPI control, or to use the ball to scroll while holding a button. To allow for this sort of control, there is a callback for both the scroll wheel and the mouse censor. diff --git a/keyboards/ploopyco/pmw3360.c b/keyboards/ploopyco/pmw3360.c index 1bd03e8b92..8007fecef6 100644 --- a/keyboards/ploopyco/pmw3360.c +++ b/keyboards/ploopyco/pmw3360.c @@ -213,7 +213,7 @@ report_pmw_t pmw_read_burst(void) { data.dx |= (data.mdx << 8); data.dx = data.dx * -1; data.dy |= (data.mdy << 8); - // data.dy = data.dy * -1; + data.dy = data.dy * -1; spi_stop(); diff --git a/keyboards/ploopyco/trackball/readme.md b/keyboards/ploopyco/trackball/readme.md index bd88d5c5aa..714f610346 100644 --- a/keyboards/ploopyco/trackball/readme.md +++ b/keyboards/ploopyco/trackball/readme.md @@ -58,26 +58,3 @@ To configure/set your own array, there are two defines to use, `PLOOPY_DPI_OPTIO The `PLOOPY_DPI_OPTIONS` array sets the values that you want to be able to cycle through, and the order they are in. The "default" define lets the firmware know which of these options is the default and should be loaded by default. The `DPI_CONFIG` macro will cycle through the values in the array, each time you hit it. And it stores this value in persistent memory, so it will load it the next time the device powers up. - -# Programming QMK-DFU onto the PloopyCo Trackball - -If you would rather have DFU on this board, you can use the QMK-DFU bootloader on the device. To do so, you want to run: - - make ploopyco/trackball:default:production - -Once you have that, you'll need to [ISP Flash](https://docs.qmk.fm/#/isp_flashing_guide) the chip with the new bootloader hex file created (or the production hex), and set the fuses: - - -| Fuse | Setting | -|----------|------------------| -| Low | `0xDF` | -| High | `0xD8` or `0x98` | -| Extended | `0xCB` | - -Original (Caterina) settings: - -| Fuse | Setting | -|----------|------------------| -| Low | `0xFF` | -| High | `0xD8` | -| Extended | `0xFE` | diff --git a/keyboards/ploopyco/trackball/rev1/readme.md b/keyboards/ploopyco/trackball/rev1/readme.md new file mode 100644 index 0000000000..c0b0223723 --- /dev/null +++ b/keyboards/ploopyco/trackball/rev1/readme.md @@ -0,0 +1,30 @@ +See the [main readme](../readme.md) for more details. + +This is just the rev 1.001-1.004 trackball + +# Programming QMK-DFU onto the PloopyCo Trackball (Advanced) + +If you would rather have DFU on this board, you can use the QMK-DFU bootloader on the device. To do so, you want to run: + + make ploopyco/trackball:default:production + +Once you have that, you'll need to [ISP Flash](https://docs.qmk.fm/#/isp_flashing_guide) the chip with the new "production" hex file created (or the production hex), and set the fuses: + + +| Fuse | Setting | +|----------|------------------| +| Low | `0xDF` | +| High | `0xD8` or `0x98` | +| Extended | `0xCB` | + +Original (Caterina) settings: + +| Fuse | Setting | +|----------|------------------| +| Low | `0xFF` | +| High | `0xD8` | +| Extended | `0xFE` | + +If you're using QMK DFU, you'll also need to add `BOOTLOADER=qmk-dfu` to your keymap's rules.mk file, to ensure that the reboot/reset works correctly. Otherwise, it will jump right back into the firmware, like nothing happened. + +Additionally, once you've flashed the qmk-dfu bootloader onto your device, you will no longer be able to use the Arduino IDE to flash the board. You'll need to use the command line or QMK Toolbox to flash it. diff --git a/keyboards/ploopyco/trackball/rev1/rules.mk b/keyboards/ploopyco/trackball/rev1/rules.mk index e69de29bb2..6ded83e74b 100644 --- a/keyboards/ploopyco/trackball/rev1/rules.mk +++ b/keyboards/ploopyco/trackball/rev1/rules.mk @@ -0,0 +1,2 @@ +# Bootloader selection +BOOTLOADER = caterina diff --git a/keyboards/ploopyco/trackball/rev1_005/readme.md b/keyboards/ploopyco/trackball/rev1_005/readme.md new file mode 100644 index 0000000000..a923d16591 --- /dev/null +++ b/keyboards/ploopyco/trackball/rev1_005/readme.md @@ -0,0 +1,3 @@ +See the [main readme](../readme.md) for more details. + +This is just the rev 1.005+ trackball diff --git a/keyboards/ploopyco/trackball/rev1_005/rules.mk b/keyboards/ploopyco/trackball/rev1_005/rules.mk index e69de29bb2..bddd4e389e 100644 --- a/keyboards/ploopyco/trackball/rev1_005/rules.mk +++ b/keyboards/ploopyco/trackball/rev1_005/rules.mk @@ -0,0 +1,2 @@ +# Bootloader selection +BOOTLOADER = atmel-dfu diff --git a/keyboards/ploopyco/trackball/rules.mk b/keyboards/ploopyco/trackball/rules.mk index 9e252fbddb..4ec870e659 100644 --- a/keyboards/ploopyco/trackball/rules.mk +++ b/keyboards/ploopyco/trackball/rules.mk @@ -4,9 +4,6 @@ MCU = atmega32u4 # Processor frequency F_CPU = 8000000 -# Bootloader selection -BOOTLOADER = caterina - # Build Options # change yes to no to disable # diff --git a/keyboards/ploopyco/trackball/trackball.c b/keyboards/ploopyco/trackball/trackball.c index 7b7b680271..94f2843460 100644 --- a/keyboards/ploopyco/trackball/trackball.c +++ b/keyboards/ploopyco/trackball/trackball.c @@ -140,7 +140,7 @@ __attribute__((weak)) void process_mouse(report_mouse_t* mouse_report) { if (debug_mouse) dprintf("Cons] X: %d, Y: %d\n", data.dx, data.dy); // dprintf("Elapsed:%u, X: %f Y: %\n", i, pgm_read_byte(firmware_data+i)); - process_mouse_user(mouse_report, data.dx, data.dy); + process_mouse_user(mouse_report, data.dx, -data.dy); } } @@ -172,27 +172,9 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { if (IS_MOUSEKEY_BUTTON(keycode)) { report_mouse_t currentReport = pointing_device_get_report(); if (record->event.pressed) { - if (keycode == KC_MS_BTN1) - currentReport.buttons |= MOUSE_BTN1; - else if (keycode == KC_MS_BTN2) - currentReport.buttons |= MOUSE_BTN2; - else if (keycode == KC_MS_BTN3) - currentReport.buttons |= MOUSE_BTN3; - else if (keycode == KC_MS_BTN4) - currentReport.buttons |= MOUSE_BTN4; - else if (keycode == KC_MS_BTN5) - currentReport.buttons |= MOUSE_BTN5; + currentReport.buttons |= 1 << (keycode - KC_MS_BTN1); } else { - if (keycode == KC_MS_BTN1) - currentReport.buttons &= ~MOUSE_BTN1; - else if (keycode == KC_MS_BTN2) - currentReport.buttons &= ~MOUSE_BTN2; - else if (keycode == KC_MS_BTN3) - currentReport.buttons &= ~MOUSE_BTN3; - else if (keycode == KC_MS_BTN4) - currentReport.buttons &= ~MOUSE_BTN4; - else if (keycode == KC_MS_BTN5) - currentReport.buttons &= ~MOUSE_BTN5; + currentReport.buttons &= ~(1 << (keycode - KC_MS_BTN1)); } pointing_device_set_report(currentReport); pointing_device_send(); From 6dc2d5956f008a706a9b0d6e911522294b76f392 Mon Sep 17 00:00:00 2001 From: elijahblake Date: Wed, 18 Nov 2020 17:54:53 -0600 Subject: [PATCH 099/114] [Keymap] add massdrop/alt:pregame (#8953) Pulled some functionality from the endgame keymap for the Drop Ctrl. * very shortened version of the Endgame keymap * fixed pictures * fixed link * fixed link * fix files * add GREEN RGB * fixed GREEN RGB * not supposed to be in my fork... * wasn't supposed to be in my fork. * I have fixed the layer 0 RGB Settings; you can now apply layer using "COLOR" in the layout template. * I've renamed to pregame, fixed several files * added Underglow RGB layout, changed def ault RGB color * fixed the color of the default profile like i want it * Added IRL Photo * Update keymap.c disabled debugging. * Update keymap.c * Update config.h * Update README.md * Update keymap.h * Changed some settings on rules for clean up. * Changed some settings on rules for clean up. * fixed some errors, cleaned things up * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Fixed changes recommended by Fauxpark * Added changes recommended by fauxpark * trying to fix my repo * Still trying to fix merge issues * changed to lowercase * Delete reading.md * Trying to rebase my repo * stuck in rebase loop trying to fix local files and update * updating readme file --- .../massdrop/alt/keymaps/pregame/config.h | 156 +++++++++++++ .../massdrop/alt/keymaps/pregame/keymap.c | 209 ++++++++++++++++++ .../massdrop/alt/keymaps/pregame/keymap.h | 58 +++++ .../massdrop/alt/keymaps/pregame/readme.md | 35 +++ .../massdrop/alt/keymaps/pregame/rules.mk | 15 ++ 5 files changed, 473 insertions(+) create mode 100644 keyboards/massdrop/alt/keymaps/pregame/config.h create mode 100644 keyboards/massdrop/alt/keymaps/pregame/keymap.c create mode 100644 keyboards/massdrop/alt/keymaps/pregame/keymap.h create mode 100644 keyboards/massdrop/alt/keymaps/pregame/readme.md create mode 100644 keyboards/massdrop/alt/keymaps/pregame/rules.mk diff --git a/keyboards/massdrop/alt/keymaps/pregame/config.h b/keyboards/massdrop/alt/keymaps/pregame/config.h new file mode 100644 index 0000000000..acd041ce14 --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/pregame/config.h @@ -0,0 +1,156 @@ +/* Copyright 2020 elijahblake81 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 MODS_SHIFT (get_mods() & MOD_MASK_SHIFT) +#define MODS_CTRL (get_mods() & MOD_MASK_CTRL) +#define MODS_ALT (get_mods() & MOD_MASK_ALT) + +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) // Key combination that allows the use of magic commands (useful for debugging) + +// #define NO_DEBUG // Disable debugging +// #define NO_PRINT // Disable printing/debugging using hid_listen +// #define NO_ACTION_LAYER // Disable layers +// #define NO_ACTION_TAPPING // Disable tap dance and other tapping features +// #define NO_ACTION_ONESHOT // Disable one-shot modifiers +// #define NO_ACTION_MACRO // Disable old style macro handling: MACRO() & action_get_macro +// #define TERMINAL_HELP +// #define MOUSEKEY_INTERVAL 20 +// #define MOUSEKEY_DELAY 0 +// #define MOUSEKEY_TIME_TO_MAX 60 +// #define MOUSEKEY_MAX_SPEED 10 +// #define MOUSEKEY_WHEEL_DELAY 0 +#define FORCE_NKRO // NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of EEPROM setting. NKRO can still be turned off but will be turned on again if the keyboard reboots. +// #define QMK_KEYS_PER_SCAN 4 // Allows sending more than one key per scan. By default, only one key event gets sent via process_record() per scan. This has little impact on most typing, but if you're doing a lot of chords, or your scan rate is slow to begin with, you can have some delay in processing key events. Each press and release is a separate event. For a keyboard with 1ms or so scan times, even a very fast typist isn't going to produce the 500 keystrokes a second needed to actually get more than a few ms of delay from this. But if you're doing chording on something with 3-4ms scan times? You probably want this. +// #define STRICT_LAYER_RELEASE // Force a key release to be evaluated using the current layer stack instead of remembering which layer it came from (used for advanced cases) +// #define LOCKING_SUPPORT_ENABLE // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap +// #define LOCKING_RESYNC_ENABLE // Tries to keep switch state consistent with keyboard LED state +// #define TAPPING_TERM 200 // How long before a tap becomes a hold, if set above 500, a key tapped during the tapping term will turn it into a hold too +// #define TAPPING_TERM_PER_KEY // Enabling to allow to tweak individual keys +// #define RETRO_TAPPING // Tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release +// #define TAPPING_TOGGLE 2 // How many taps before triggering the toggle +// #define PERMISSIVE_HOLD // Makes tap and hold keys trigger the hold if another key is pressed before releasing, even if it hasn't hit the TAPPING_TERM. See Permissive Hold for details +// #define IGNORE_MOD_TAP_INTERRUPT // Makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the TAPPING_TERM for both keys. See Mod tap interrupt for details +// #define TAPPING_FORCE_HOLD // Makes it possible to use a dual role key as modifier shortly after having been tapped. See Hold after tap. Breaks any Tap Toggle functionality (TT or the One Shot Tap Toggle) +// #define LEADER_TIMEOUT 300 // How long before the leader key times out. If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the LEADER_PER_KEY_TIMING option, which resets the timeout after each key is tapped. +// #define LEADER_PER_KEY_TIMING // Sets the timer for leader key chords to run on each key press rather than overall +// #define LEADER_KEY_STRICT_KEY_PROCESSING // Disables keycode filtering for Mod-Tap and Layer-Tap keycodes. Eg, if you enable this, you would need to specify MT(MOD_CTL, KC_A) if you want to use KC_A. +// #define ONESHOT_TIMEOUT 3000 // How long before oneshot times out +// #define ONESHOT_TAP_TOGGLE 2 // How many taps before oneshot toggle is triggered +// #define COMBO_COUNT 2 // Set this to the number of combos that you're using in the Combo feature. +// #define COMBO_TERM 200 // 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 80 // 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 80 ms if not defined. For macOS, you may want to set this to 200 or higher. +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_MATRIX_KEYPRESSES // reacts to keypresses +// #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) + + + +//Teal and Blue +//#define RGB_MATRIX_STARTUP_HUE 127 // Default boot color +//#define RGB_MATRIX_STARTUP_SPD 47 // Used to determine the color for the modifiers + +//Teal and Blue +//#define RGB_MATRIX_STARTUP_HUE 120 // Default boot color +//#define RGB_MATRIX_STARTUP_SPD 50 //Used to determine the color for the modifiers + + +//QMK HSV is based on 255 value wheel rather than 360 + +//Cyan and Yellow +//#define RGB_MATRIX_STARTUP_HUE 127 // Default boot color +//#define RGB_MATRIX_STARTUP_SPD 177 + +//Cyan and Green +//#define RGB_MATRIX_STARTUP_HUE 127 // Default boot color +//#define RGB_MATRIX_STARTUP_SPD 215 + +// #define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS + +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_REACTIVE // Sets the default mode, if none has been set +#define RGB_MATRIX_STARTUP_HUE 180 //purple alphas with green background when pressed. +// #define RGBLIGHT_HUE_STEP 12 // Units to step when in/decreasing hue +// #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation +// #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness) +// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +// #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +// #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +#define RGBLIGHT_ANIMATIONS // Run RGB animations +// #define RGBLIGHT_ANIMATIONS // Enable all additional animation modes. +#define RGBLIGHT_EFFECT_ALTERNATING // Enable alternating animation mode. +#define RGBLIGHT_EFFECT_BREATHING // Enable breathing animation mode. +// #define RGBLIGHT_EFFECT_CHRISTMAS // Enable christmas animation mode. +// #define RGBLIGHT_EFFECT_KNIGHT // Enable knight animation mode. +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD // Enable rainbow mood animation mode. +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL // Enable rainbow swirl animation mode. +// #define RGBLIGHT_EFFECT_RGB_TEST // Enable RGB test animation mode. +// #define RGBLIGHT_EFFECT_SNAKE // Enable snake animation mode. +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT // Enable static gradient mode. + +// #define RGBLIGHT_EFFECT_BREATHE_CENTER // If defined, used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // The maximum brightness for the breathing mode. Valid values are 1 to 255 +// #define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000 // How long to wait between light changes for the "Christmas" animation, in milliseconds +// #define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2 // The number of LEDs to group the red/green colors by for the "Christmas" animation +// #define RGBLIGHT_EFFECT_KNIGHT_LED_NUM RGBLED_NUM // The number of LEDs to have the "Knight" animation travel +// #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 // The number of LEDs to light up for the "Knight" animation +// #define RGBLIGHT_EFFECT_KNIGHT_OFFSET 0 // The number of LEDs to start the "Knight" animation from the start of the strip by +// #define RGBLIGHT_RAINBOW_SWIRL_RANGE 255 // Range adjustment for the rainbow swirl effect to get different swirls +// #define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // The number of LEDs to light up for the "Snake" animation + +// This list in in the correct mode order. Next mode is the following line, previous mode is previous line. Loops around. +// #define DISABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support +// #define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue +// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes +// #define DISABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation +// #define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right +// #define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right +// #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation +// #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness +// #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation +// #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness +// #define DISABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient +// #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right +// #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom +// #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in +// #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +// #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right +// #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard +// #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard +// #define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard +// #define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard +// #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard +// #define DISABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue +// #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation +// =================================================== Requires RGB_MATRIX_FRAMEBUFFER_EFFECTS ============================================================= +// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! +#define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation +// =================================================== RGB_MATRIX_KEYPRESSES OR RGB_MATRIX_KEYRELEASES ===================================================== +// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue +// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out +// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out +// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out +// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out +// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out +// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out +// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out +// #define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out +// #define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out +// #define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +// #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out diff --git a/keyboards/massdrop/alt/keymaps/pregame/keymap.c b/keyboards/massdrop/alt/keymaps/pregame/keymap.c new file mode 100644 index 0000000000..6c1d93b030 --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/pregame/keymap.c @@ -0,0 +1,209 @@ +/* Copyright 2020 elijahblake81 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "keymap.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* + [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_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_HOME, + 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(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + */ + [0] = LAYOUT_65_ansi_blocker( + 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_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_HOME, + 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(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_65_ansi_blocker( + 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_F13, KC_CALC, + RGB_M_P, RGB_SPD, RGB_HUI, RGB_SPI, RGB_SAI, RGB_VAI, _______, U_T_AUTO, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_MYCM, + RGB_TOG, RGB_RMOD, RGB_HUD, RGB_MOD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, + _______, _______, _______, _______, _______, MD_BOOT, NK_TOGG, DBG_TOG, _______, _______, _______, _______, KC_VOLU, KC_VOLD, + _______, _______, _______, KC_MPLY, _______, _______, KC_HOME, KC_VOLD, KC_END + ), + /* + [X] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [RGB] = LAYOUT( + ESC: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 0: 10, MINS: 11, EQL: 12, BSPC: 13, DEL: 14, + TAB: 15, Q: 16, W: 17, E: 18, R: 19, T: 20, Y: 21, U: 22, I: 23, O: 24, P: 25, LBRC: 26, RBRC: 27, BSLS: 28, HOME: 29, + CAPS: 30, A: 31, S: 32, D: 33, F: 34, G: 35, H: 36, J: 37, K: 38, L: 39, SCLN: 40, QUOT: 41, ENT: 42, PGUP: 43, + LSFT: 44, Z: 45, X: 46, C: 47, V: 48, B: 49, N: 50, M: 51, COMM: 52, DOT: 53, SLSH: 54, RSFT: 55, UP: 56, PGDN: 57, + LCTL: 58, LGUI: 59, LALT: 60, SPC: 61, RALT: 62, FN: 63, LEFT: 64, DOWN: 65, RGHT: 66 + //UnderGlow + :67, :68, :69, :70, :71, :72, :73, :74, :75, :76, :77, :78, :79, :80, :81, + :82, :83, :84, :85, + :86, :87, :88, :89, + :90, :91, :92, :93, :94, :95, :96, :97, :98, :99, :100, :101, :102, :103, :104, :105, + ), + [MATRIX] = LAYOUT( + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, + //UnderGlow + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 88, 89, + 86, 87, + 84, 85, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83 + ), + */ +}; + +#ifdef _______ +#undef _______ +#define _______ {0, 0, 0} + +const uint8_t PROGMEM ledmap[][DRIVER_LED_TOTAL][3] = { + [0] = { + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, CHART, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, CHART, CHART, CHART, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CHART, _______, + _______, _______, _______, _______, _______, _______, CHART, CHART, CHART, + //UnderGlow + CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, + CHART, CHART, + CHART, CHART, + CHART, CHART, + CHART, CHART, + CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART + }, + [1] = { + CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, BLUE, + GOLD, PINK, AZURE, PINK, TURQ, TEAL, _______, RED, _______, _______, GREEN, BLUE, GOLD, _______, BLUE, + TEAL, MAGENT, AZURE, MAGENT, TURQ, TEAL, _______, _______, _______, _______, _______, _______, GOLD, BLUE, + _______, _______, _______, _______, _______, RED, RED, RED, _______, _______, _______, _______, GOLD, BLUE, + _______, _______, _______, GOLD, _______, _______, PURPLE, GOLD, PURPLE, + //UnderGlow + CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, + CHART, CHART, + CHART, CHART, + CHART, CHART, + CHART, CHART, + CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART, CHART + }, +}; + +#undef _______ +#define _______ KC_TRNS +#endif + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + // Enable or disable debugging + debug_enable=false; + debug_matrix=false; + debug_keyboard=false; + //rgb_enabled_flag = true; // Initially, keyboard RGB is enabled. Change to false config.h initializes RGB disabled. +}; + +void keyboard_post_init_user(void) { + rgb_matrix_enable(); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint32_t key_timer; + + switch (keycode) { + case U_T_AUTO: + 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) { + TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); + } + return false; + case MD_BOOT: + if (record->event.pressed) { + key_timer = timer_read32(); + } else { + if (timer_elapsed32(key_timer) >= 500) { + reset_keyboard(); + } + } + return false; + case RGB_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_UNDERGLOW: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable_noeeprom(); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_enable_noeeprom(); + } + break; + } + return false; + } + } + return true; +} +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 rgb = hsv_to_rgb(hsv); + float f = (float)rgb_matrix_config.hsv.v / UINT8_MAX; + rgb_matrix_set_color(i, f * rgb.r, f * rgb.g, f * rgb.b); + } else if (layer == 1) { + // Only deactivate non-defined key LEDs at layers other than FN. Because at FN we have RGB adjustments and need to see them live. + // If the values are all false then it's a transparent key and deactivate LED at this layer + rgb_matrix_set_color(i, 0, 0, 0); + } + } +} +void rgb_matrix_indicators_user(void) { + if (g_suspend_state || disable_layer_color || + rgb_matrix_get_flags() == LED_FLAG_NONE || + rgb_matrix_get_flags() == LED_FLAG_UNDERGLOW) { + return; + } + set_layer_color(get_highest_layer(layer_state)); +} diff --git a/keyboards/massdrop/alt/keymaps/pregame/keymap.h b/keyboards/massdrop/alt/keymaps/pregame/keymap.h new file mode 100644 index 0000000000..1980800336 --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/pregame/keymap.h @@ -0,0 +1,58 @@ +/* Copyright 2020 elijahblake81 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 + +// HID has not yet been implemented for this keyboard +// #include "raw_hid.h" + +#define MILLISECONDS_IN_SECOND 1000 + +// These are just to make it neater to use builtin HSV values in the keymap +#define RED {HSV_RED} +#define CORAL {HSV_CORAL} +#define ORANGE {HSV_ORANGE} +#define GOLDEN {HSV_GOLDENROD} +#define GOLD {HSV_GOLD} +#define YELLOW {HSV_YELLOW} +#define CHART {HSV_CHARTREUSE} +#define GREEN {HSV_GREEN} +#define SPRING {HSV_SPRINGGREEN} +#define TURQ {HSV_TURQUOISE} +#define TEAL {HSV_TEAL} +#define CYAN {HSV_CYAN} +#define AZURE {HSV_AZURE} +#define BLUE {HSV_BLUE} +#define PURPLE {HSV_PURPLE} +#define MAGENT {HSV_MAGENTA} +#define PINK {HSV_PINK} + + + +//========================================================== CONFIGURABLE DEFAULTS ========================================================== +extern bool g_suspend_state; +extern rgb_config_t rgb_matrix_config; +bool disable_layer_color; + +enum alt_keycodes { + U_T_AUTO = SAFE_RANGE, // USB Extra Port Toggle Auto Detect / Always Active + U_T_AGCR, // USB Toggle Automatic GCR control + DBG_TOG, // DEBUG Toggle On / Off + DBG_MTRX, // DEBUG Toggle Matrix Prints + DBG_KBD, // DEBUG Toggle Keyboard Prints + DBG_MOU, // DEBUG Toggle Mouse Prints + MD_BOOT, // Restart into bootloader after hold timeout +}; diff --git a/keyboards/massdrop/alt/keymaps/pregame/readme.md b/keyboards/massdrop/alt/keymaps/pregame/readme.md new file mode 100644 index 0000000000..e187270560 --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/pregame/readme.md @@ -0,0 +1,35 @@ +# Massdrop Alt Pregame + +This keymap is here to show some love to the MD Alt. This is a stripped down version of the Drop Ctrl Endgame; hence the name Pregame. + +## IRL +![In Real Life](https://i.imgur.com/Xp6Mb6P.jpg) + + + +## Layers + +### Typing Layer + +![Typing Layer](https://i.imgur.com/F7iU53K.png) + +### Function Layer + +![SHORTCUT_LAYER](https://i.imgur.com/Gub1xyC.png) + +## Features + +These are the features currently supported by this keymap: + +### RGB Can be customized by "NAME OF COLOR" in the Keymap.c file. + 1. Look at keymap for example. My base layer the W,A,S,D and Arrow Keys are CHART short for CHARTREUSE (Close to NVIDIA GREEN). The values to pick from are located on keymap.h file. + 2. I have applied static colors to the Function layer that let you know which keys are available to that layer only. The not lit up keys are still accessible if set to Transparent Keycap!!! + +## Credits + +This was all converted originally from the Drop Ctrl Endgame. I took nblyumberg's version of code and converted it to fit into the alt. +RGB timeout functionality was originally inspired by the code in this [gist](https://gist.github.com/algernon/9182469e21894192017f2bb5d478c7df). +LED config code was mostly transferred from [matthewrobo keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/massdrop/ctrl/keymaps/matthewrobo). + + +**Rest of the information about RGB matrix, scan matrix, and whatever information I have used was made publicly available by many other awesome members of the community.** diff --git a/keyboards/massdrop/alt/keymaps/pregame/rules.mk b/keyboards/massdrop/alt/keymaps/pregame/rules.mk new file mode 100644 index 0000000000..c6977c23cb --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/pregame/rules.mk @@ -0,0 +1,15 @@ +# RGBLIGHT_ENABLE = no # Not for MD boards. This is here in case you forget. +COMMAND_ENABLE = no # Commands for debug and configuration +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no +# AUTO_SHIFT_ENABLE = yes # Auto Shift +NKRO_ENABLE = yes # USB Nkey Rollover +DYNAMIC_MACRO_ENABLE = no # Dynamic macro recording and play +MOUSEKEY_ENABLE = no # Enable mouse control keycodes. Increases firmware size. +TAP_DANCE_ENABLE = no # Enable tap dance keys +CONSOLE_ENABLE = no # Enable debugging console. Increases firmware size. +TERMINAL_ENABLE = no +EXTRAKEY_ENABLE = yes # Audio control and System control +# RAW_ENABLE = yes # Raw HID has not yet been implemented for this keyboard +# COMBO_ENABLE # Key combo feature +# LEADER_ENABLE # Enable leader key chording From e7497b3fba0c2836c9bb5087eee8b15d6ffc1362 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 18 Nov 2020 16:50:32 -0800 Subject: [PATCH 100/114] Add references for is_keyboard_left() (#10850) * Add references for is_keyboard_left() * Remove proto from bootmagic_lite.c --- tmk_core/common/bootmagic_lite.c | 4 +--- tmk_core/common/keyboard.c | 6 ++++++ tmk_core/common/keyboard.h | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tmk_core/common/bootmagic_lite.c b/tmk_core/common/bootmagic_lite.c index 38275cdd30..cbf756a175 100644 --- a/tmk_core/common/bootmagic_lite.c +++ b/tmk_core/common/bootmagic_lite.c @@ -1,7 +1,5 @@ #include "quantum.h" -bool is_keyboard_left(void); - /** \brief Reset eeprom * * ...just incase someone wants to only change the eeprom behaviour @@ -48,4 +46,4 @@ __attribute__((weak)) void bootmagic_lite(void) { // Jump to bootloader. bootloader_jump(); } -} \ No newline at end of file +} diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index a45af56dfd..b0394af003 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -222,6 +222,12 @@ void keyboard_setup(void) { */ __attribute__((weak)) bool is_keyboard_master(void) { return true; } +/** \brief is_keyboard_left + * + * FIXME: needs doc + */ +__attribute__((weak)) bool is_keyboard_left(void) { return true; } + /** \brief should_process_keypress * * Override this function if you have a condition where keypresses processing should change: diff --git a/tmk_core/common/keyboard.h b/tmk_core/common/keyboard.h index 98ceca49b1..79d9490898 100644 --- a/tmk_core/common/keyboard.h +++ b/tmk_core/common/keyboard.h @@ -63,6 +63,8 @@ void keyboard_task(void); void keyboard_set_leds(uint8_t leds); /* it runs whenever code has to behave differently on a slave */ bool is_keyboard_master(void); +/* it runs whenever code has to behave differently on left vs right split */ +bool is_keyboard_left(void); void keyboard_pre_init_kb(void); void keyboard_pre_init_user(void); From 386cff8cf5645d742e193c4d53c0b6ff52c20885 Mon Sep 17 00:00:00 2001 From: Luis Godinez Date: Thu, 19 Nov 2020 11:28:53 -0800 Subject: [PATCH 101/114] Add Launch Pad by Ungodly Design (#10952) Co-authored-by: Drashna Jaelre Co-authored-by: Ryan Co-authored-by: Erovia --- keyboards/ungodly/launch_pad/config.h | 72 +++++ .../launch_pad/keymaps/default/keymap.c | 257 ++++++++++++++++++ keyboards/ungodly/launch_pad/launch_pad.c | 61 +++++ keyboards/ungodly/launch_pad/launch_pad.h | 70 +++++ keyboards/ungodly/launch_pad/readme.md | 37 +++ keyboards/ungodly/launch_pad/rules.mk | 32 +++ 6 files changed, 529 insertions(+) create mode 100644 keyboards/ungodly/launch_pad/config.h create mode 100644 keyboards/ungodly/launch_pad/keymaps/default/keymap.c create mode 100644 keyboards/ungodly/launch_pad/launch_pad.c create mode 100644 keyboards/ungodly/launch_pad/launch_pad.h create mode 100644 keyboards/ungodly/launch_pad/readme.md create mode 100644 keyboards/ungodly/launch_pad/rules.mk diff --git a/keyboards/ungodly/launch_pad/config.h b/keyboards/ungodly/launch_pad/config.h new file mode 100644 index 0000000000..c4da097601 --- /dev/null +++ b/keyboards/ungodly/launch_pad/config.h @@ -0,0 +1,72 @@ +/* Copyright 2020 Ungodly Design + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 0x5544 // "UD" = Ungodly Design +#define PRODUCT_ID 0x4C50 // "LP" = Launch Pad +#define DEVICE_VER 0x9999 +#define MANUFACTURER Ungodly Design +#define PRODUCT Launch Pad + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* Keyboard Matrix Assignments */ +#define MATRIX_ROW_PINS { D4, D6, D7, B4, B5 } +#define MATRIX_COL_PINS { B0, B1, B2, B3 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Rotary Encoder Assignment */ +#define ENCODERS_PAD_A { C6 } +#define ENCODERS_PAD_B { B6 } +#define ENCODER_RESOLUTION 2 + +/* Midi Slider */ +#define SLIDER_PIN F6 + +/* RGB Matrix configuration */ +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_KEYPRESSES +#endif + +#define RGB_DI_PIN F7 +#ifdef RGB_DI_PIN +# define RGBLED_NUM 22 +# 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 +// RGB Matrix +# ifdef RGB_MATRIX_ENABLE +# define DRIVER_LED_TOTAL RGBLED_NUM +# endif +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +#define LOCKING_RESYNC_ENABLE + +#define MIDI_ADVANCED diff --git a/keyboards/ungodly/launch_pad/keymaps/default/keymap.c b/keyboards/ungodly/launch_pad/keymaps/default/keymap.c new file mode 100644 index 0000000000..4ddec6c429 --- /dev/null +++ b/keyboards/ungodly/launch_pad/keymaps/default/keymap.c @@ -0,0 +1,257 @@ +/* Copyright 2020 Ungodly Design + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "analog.h" +#include "qmk_midi.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 layers { +_BL = 0, +_NV, +_FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap _BL: (Base Layer) Default Numpad Layer + * ,-------------------. + * | NV | / | * |BK/FN| + * |----|----|----|-----| + * | 7 | 8 | 9 | - | + * |----|----|----|-----| + * | 4 | 5 | 6 | + | + * |----|----|----|-----| + * | 1 | 2 | 3 | | + * |----|----|----| En | + * | 0 | . | | + * `--------------------' + */ + [_BL] = LAYOUT_ortho_5x4( + TG(_NV), KC_PSLS, KC_PAST, LT(_FN, KC_BSPC), + KC_7, KC_8, KC_9, KC_PMNS, + KC_4, KC_5, KC_6, KC_PPLS, + KC_1, KC_2, KC_3, KC_PENT, + KC_0, KC_0, KC_DOT, KC_PENT + ), + +/* Keymap _NV: Navigation layer + * ,-------------------. + * |INS |HOME|PGUP| | + * |----|----|----|----| + * |DEL |END |PGDN| | + * |----|----|----|----| + * | | UP | | | + * |----|----|----|----| + * |LEFT|DOWN|RIGH| | + * |----|----|----| | + * | | | | + * `-------------------' + */ + [_NV] = LAYOUT_ortho_5x4( + KC_INS, KC_HOME, KC_PGUP, TG(_NV), + KC_DEL, KC_END, KC_PGDN, XXXXXXX, + XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, + KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + +/* Keymap _FN: RGB Function Layer + * ,-------------------. + * |RMOD|RGBP|RTOG| FN | + * |----|----|----|----| + * |HUD |HUI | | | + * |----|----|----|----| + * |SAD |SAI | | | + * |----|----|----|----| + * |VAD |VAS | | | + * |----|----|----| | + * |RST | | | | + * `-------------------' + */ + [_FN] = LAYOUT_ortho_5x4( + RGB_MOD, RGB_M_P, RGB_TOG, _______, + RGB_HUD, RGB_HUI, XXXXXXX, XXXXXXX, + RGB_SAD, RGB_SAI, XXXXXXX, XXXXXXX, + RGB_VAD, RGB_VAI, XXXXXXX, XXXXXXX, + RESET, XXXXXXX, XXXXXXX, XXXXXXX + ), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} + +uint8_t divisor = 0; + +void slider(void) { + if (divisor++) { // only run the slider function 1/256 times it's called + return; + } + + midi_send_cc(&midi_device, 2, 0x3E, 0x7F - (analogReadPin(SLIDER_PIN) >> 3)); +} + +void matrix_scan_user(void) { + slider(); +} + +// 0.91" OLED, 128x32 resolution +#ifdef OLED_DRIVER_ENABLE + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; // flips the display 270 degrees +} + +#define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024 + +layer_state_t layer_state_set_user(layer_state_t state) { + + static const char PROGMEM gui_layers[][ANIM_SIZE] = { + { + // Home Screen + // 'layer_bl', 128x32px + 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, 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, 0x80, + 0x80, 0x80, 0xc0, 0x40, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x20, 0x50, 0x50, 0x90, + 0x10, 0x10, 0x20, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x40, 0x40, 0x40, 0x40, 0x20, 0x10, 0x10, 0xf0, 0x10, 0x10, 0x08, 0x08, 0x08, 0x04, 0x04, + 0x04, 0xfc, 0xfc, 0xfc, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0xfc, 0x7c, 0x7e, 0x7e, 0x7f, + 0x81, 0x81, 0x81, 0x81, 0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xff, + 0xff, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0x01, 0x01, 0x01, 0xf9, 0x01, 0xf9, 0x01, + 0xf9, 0x01, 0xf9, 0x01, 0x01, 0x01, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe6, + 0xe6, 0xe6, 0xe6, 0xe6, 0xff, 0x8c, 0x52, 0x52, 0x52, 0xde, 0x84, 0x08, 0x84, 0x08, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, + 0x05, 0x05, 0x02, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x04, 0x04, 0x07, 0x04, 0x04, 0x08, 0x08, 0x08, 0x10, 0x10, + 0x10, 0x1f, 0x1f, 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, 0x10, 0x20, 0x20, 0x40, + 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x7f, + 0x7f, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x40, 0x40, 0x40, 0x4a, 0x44, 0x4a, 0x40, + 0x4f, 0x40, 0x4f, 0x40, 0x40, 0x40, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x9c, + 0x9c, 0x9c, 0x9c, 0x1c, 0xff, 0x31, 0x4a, 0x4a, 0x4a, 0x7b, 0x10, 0x21, 0x10, 0x21, 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, 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, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + // Navigation Screen + // 'layer_nav', 128x32px + 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, 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, 0x20, 0x20, 0x40, + 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x20, 0x50, 0x50, 0x90, + 0x10, 0x10, 0x20, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0xc8, 0x28, 0x28, 0x28, 0xc8, 0x10, + 0xb0, 0x10, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x40, 0x40, 0x40, 0x20, 0x20, + 0x20, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0xa1, 0x09, 0xe1, + 0xf3, 0x29, 0x05, 0x85, 0xe5, 0xe5, 0xc5, 0x89, 0x92, 0xe4, 0x08, 0xf0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x44, + 0x44, 0x22, 0xe2, 0x11, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, + 0x05, 0x05, 0x02, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x09, 0x0b, 0x0b, 0x0b, 0x09, 0x04, + 0x06, 0x04, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, + 0x02, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x42, 0x48, 0x43, + 0x66, 0x4e, 0x53, 0x51, 0x51, 0x53, 0x53, 0x49, 0x24, 0x13, 0x08, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x91, + 0x91, 0x52, 0x53, 0x34, 0x34, 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, 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, 0x03, 0x03, 0x02, + 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + // RGB Screen + // 'layer_rgb', 128x32px + 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, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x9c, 0x80, 0x80, + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 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, 0x80, 0x80, + 0x80, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x20, 0x50, 0x50, 0x90, + 0x10, 0x10, 0x20, 0xc0, 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, + 0x80, 0x80, 0x80, 0x00, 0x00, 0xe0, 0x19, 0x04, 0x62, 0x11, 0x09, 0x04, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x02, 0x04, 0x19, 0x10, 0x10, 0xf0, 0x00, 0x00, 0xf0, 0x00, 0xf0, 0xe0, 0xc0, + 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, 0xc7, 0x24, 0x04, + 0x07, 0xe4, 0x24, 0x24, 0xc7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, + 0x05, 0x05, 0x02, 0x05, 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, 0x07, 0x88, 0x30, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x80, 0x40, 0x60, 0x30, 0x98, 0x08, 0x08, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x0f, 0x07, 0x03, + 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, 0xc1, 0x22, 0x24, + 0x24, 0xc4, 0x44, 0x22, 0x21, 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, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1d, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 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, 0x03, 0x02, 0x02, + 0x02, 0x03, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }; + + switch (get_highest_layer(state)) { + case _BL: + oled_write_raw_P(gui_layers[0], sizeof(gui_layers[0]) ); + break; + case _NV: + oled_write_raw_P(gui_layers[1], sizeof(gui_layers[1]) ); + break; + case _FN: + oled_write_raw_P(gui_layers[2], sizeof(gui_layers[2]) ); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR(" UND"), false); + break; + } + return state; +} + +#endif diff --git a/keyboards/ungodly/launch_pad/launch_pad.c b/keyboards/ungodly/launch_pad/launch_pad.c new file mode 100644 index 0000000000..fde6ed20ac --- /dev/null +++ b/keyboards/ungodly/launch_pad/launch_pad.c @@ -0,0 +1,61 @@ +/* Copyright 2020 Ungodly Design + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "launch_pad.h" + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + // Key Matrix to LED Index + { 14, 15, 16, 17 }, + { 13, 12, 11, 10 }, + { 6, 7, 8, 9 }, + { 5, 4, 3, 2 }, + {NO_LED, 0, 1, NO_LED } +}, { // LED Index to Physical Position + { 37, 60 }, { 148, 60 }, // row 5 + { 222, 54 }, { 148, 45 }, { 74, 45 }, { 0, 45 }, // row 4 + { 0, 30 }, { 74, 30 }, { 148, 30 }, { 222, 30 }, // row 3 + { 222, 15 }, { 148, 15 }, { 74, 15 }, { 0, 15 }, // row 2 + { 0, 0 }, { 74, 0 }, { 148, 0 }, { 222, 0 }, // row 1 + { 185, 7 }, { 37, 7 }, // top underglow + { 37, 52 }, { 185, 52 }, // bottom underglow +}, { + // LED Index to Flag + 4, 4, // row 5 + 4, 4, 4, 4, // row 4 + 4, 4, 4, 4, // row 3 + 4, 4, 4, 4, // row 2 + 4, 4, 4, 4, // row 1 + 2, 2, + 2, 2 +} }; +#endif + +void eeconfig_init_kb(void) { +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness +# ifdef RGBLIGHT_ANIMATIONS + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default +# endif +#endif + +#ifdef RGB_MATRIX_ENABLE + rgb_matrix_enable(); // Enable RGB by default +#endif + + eeconfig_update_kb(0); + eeconfig_init_user(); +} diff --git a/keyboards/ungodly/launch_pad/launch_pad.h b/keyboards/ungodly/launch_pad/launch_pad.h new file mode 100644 index 0000000000..7a7815f34f --- /dev/null +++ b/keyboards/ungodly/launch_pad/launch_pad.h @@ -0,0 +1,70 @@ +/* Copyright 2020 Ungodly Design + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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. + */ + +/* 4x5 numpad matrix layout + * ,-------------------. + * | 00 | 01 | 02 | 03 | + * |----|----|----|----| + * | 10 | 11 | 12 | 13 | + * |----|----|----|----| + * | 20 | 21 | 22 | 23 | + * |----|----|----|----| + * | 30 | 31 | 32 | 33 | + * |----|----|----|----| + * | 40 | 41 | 42 | 43 | + * `-------------------' + */ + + /* Numpad matrix layout + * ,-------------------. + * | 00 | 01 | 02 | 03 | + * |----|----|----|----| + * | 10 | 11 | 12 | 13 | + * |----|----|----|----| + * | 20 | 21 | 22 | 23 | + * |----|----|----|----| + * | 30 | 31 | 32 | | + * |----|----|----| 33 | + * | 41 | 42 | | + * `-------------------' + */ + +#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/ungodly/launch_pad/readme.md b/keyboards/ungodly/launch_pad/readme.md new file mode 100644 index 0000000000..89e4b6413d --- /dev/null +++ b/keyboards/ungodly/launch_pad/readme.md @@ -0,0 +1,37 @@ +# Launch Pad +The guidance computer inside the [Launch Pad](https://ungodly.design/products/launch-pad) by Ungodly Design. + +**Features:** +* Onboard atmega32u4 controller, 5V @ 16MHz +* Kaihl hotswap sockets +* USB-C connector +* 18 in-switch RGB LEDs +* 4 underglow RGB LEDs +* 100 Ω potentiometer slider +* (optional) M2 pcb mounting holes +* (optional) pcb-mount stablizer footprints +* (optional) pin breakout: + * F5, F4, F1, F0, VBUS, GND + +PCB Front | PCB Back +:-------------------------:|:-------------------------: +![Numpad](https://i.imgur.com/f47ZFZZl.png) | ![5x4](https://i.imgur.com/wZH76Ppl.png) + +Numpad Layout | 5x4 Layout +:-------------------------:|:-------------------------: +![Numpad](https://i.imgur.com/4XvqCBHl.jpg) | ![5x4](https://i.imgur.com/mwtGnPSl.jpg) + + +|Reset Bootloader| | +|---|---| +|Use tweezers to short the two bottom pins of the J-Link pinout.|![Numpad](https://i.imgur.com/ArSIcK0.pngl)| + +* Keyboard Maintainer: [Luis Godinez](https://github.com/luis-Godinez) +* Hardware Supported: Launch Pad PCB +* Hardware Availability: [Ungodly.Design](https://ungodly.design/products/launch-pad-pcb) + +Make example for this keyboard (after setting up your build environment): + + make ungodly/launch_pad: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/ungodly/launch_pad/rules.mk b/keyboards/ungodly/launch_pad/rules.mk new file mode 100644 index 0000000000..7ec11fd95d --- /dev/null +++ b/keyboards/ungodly/launch_pad/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +MIDI_ENABLE = yes +OLED_DRIVER_ENABLE = yes +ENCODER_ENABLE = yes +RGB_MATRIX_ENABLE = WS2812 +SPACE_CADET_ENABLE = no +MAGIC_ENABLE = no +GRAVE_ESC_ENABLE = no +LTO_ENABLE = yes + +SRC += analog.c From 776d1adc766871b2d03911479466fb571406186d Mon Sep 17 00:00:00 2001 From: Brandon Claveria <48102030+swiftrax@users.noreply.github.com> Date: Thu, 19 Nov 2020 11:29:43 -0800 Subject: [PATCH 102/114] add unsplit (#10892) Co-authored-by: Drashna Jaelre Co-authored-by: Erovia Co-authored-by: Swiftrax --- keyboards/handwired/swiftrax/unsplit/config.h | 45 +++++++++++++++++++ .../handwired/swiftrax/unsplit/info.json | 12 +++++ .../swiftrax/unsplit/keymaps/default/keymap.c | 37 +++++++++++++++ .../swiftrax/unsplit/keymaps/via/keymap.c | 41 +++++++++++++++++ .../swiftrax/unsplit/keymaps/via/rules.mk | 1 + .../handwired/swiftrax/unsplit/readme.md | 13 ++++++ keyboards/handwired/swiftrax/unsplit/rules.mk | 23 ++++++++++ .../handwired/swiftrax/unsplit/unsplit.c | 1 + .../handwired/swiftrax/unsplit/unsplit.h | 35 +++++++++++++++ 9 files changed, 208 insertions(+) create mode 100644 keyboards/handwired/swiftrax/unsplit/config.h create mode 100644 keyboards/handwired/swiftrax/unsplit/info.json create mode 100644 keyboards/handwired/swiftrax/unsplit/keymaps/default/keymap.c create mode 100644 keyboards/handwired/swiftrax/unsplit/keymaps/via/keymap.c create mode 100644 keyboards/handwired/swiftrax/unsplit/keymaps/via/rules.mk create mode 100644 keyboards/handwired/swiftrax/unsplit/readme.md create mode 100644 keyboards/handwired/swiftrax/unsplit/rules.mk create mode 100644 keyboards/handwired/swiftrax/unsplit/unsplit.c create mode 100644 keyboards/handwired/swiftrax/unsplit/unsplit.h diff --git a/keyboards/handwired/swiftrax/unsplit/config.h b/keyboards/handwired/swiftrax/unsplit/config.h new file mode 100644 index 0000000000..95fdab280e --- /dev/null +++ b/keyboards/handwired/swiftrax/unsplit/config.h @@ -0,0 +1,45 @@ +/* +Copyright 2020 Swiftrax + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 0x04D8 +#define PRODUCT_ID 0xEAB1 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Swiftrax +#define PRODUCT UnSplit + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { B6, D7, B5, B4 } +#define MATRIX_COL_PINS { D1, D2, D3, D5, D4, D6, C6, C7, F6, F5, F4, F1 } + +/* 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 diff --git a/keyboards/handwired/swiftrax/unsplit/info.json b/keyboards/handwired/swiftrax/unsplit/info.json new file mode 100644 index 0000000000..4dd3b58e89 --- /dev/null +++ b/keyboards/handwired/swiftrax/unsplit/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "UnSplit", + "url": "github.com/swiftrax", + "maintainer": "swiftrax", + "width": 17, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"x":3, "y":0.25}, {"x":13, "y":0.25}, {"x":2, "y":0.5}, {"x":4, "y":0.5}, {"x":12, "y":0.5}, {"x":14, "y":0.5}, {"x":5, "y":0.625}, {"x":11, "y":0.625}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":3, "y":1.25}, {"x":13, "y":1.25}, {"x":2, "y":1.5}, {"x":4, "y":1.5}, {"x":12, "y":1.5}, {"x":14, "y":1.5}, {"x":5, "y":1.625}, {"x":11, "y":1.625}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":3, "y":2.25}, {"x":13, "y":2.25}, {"x":2, "y":2.5}, {"x":4, "y":2.5}, {"x":12, "y":2.5}, {"x":14, "y":2.5}, {"x":5, "y":2.625}, {"x":11, "y":2.625}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":15, "y":3}, {"x":16, "y":3}, {"x":2.5, "y":3.5}, {"x":13.5, "y":3.5}, {"x":3.5, "y":3.5}, {"x":12.5, "y":3.5}, {"x":4.5, "y":3.75}, {"x":11.5, "y":3.75}, {"x":5.5, "y":4}, {"x":10.5, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/unsplit/keymaps/default/keymap.c b/keyboards/handwired/swiftrax/unsplit/keymaps/default/keymap.c new file mode 100644 index 0000000000..3430353b83 --- /dev/null +++ b/keyboards/handwired/swiftrax/unsplit/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +/* +Copyright 2020 Swiftrax + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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_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_RSFT, + KC_LCTL,KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RGUI,KC_RALT), +[1] = LAYOUT( + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______, _______,_______,_______,_______), +[2] = LAYOUT( + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______, _______,_______,_______,_______), +}; diff --git a/keyboards/handwired/swiftrax/unsplit/keymaps/via/keymap.c b/keyboards/handwired/swiftrax/unsplit/keymaps/via/keymap.c new file mode 100644 index 0000000000..94c3157094 --- /dev/null +++ b/keyboards/handwired/swiftrax/unsplit/keymaps/via/keymap.c @@ -0,0 +1,41 @@ +/* +Copyright 2020 Swiftrax + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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_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_RSFT, + KC_LCTL,KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RGUI,KC_RALT), +[1] = LAYOUT( + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______, _______,_______,_______,_______), +[2] = LAYOUT( + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______, _______,_______,_______,_______), +[3] = LAYOUT( + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______, _______,_______,_______,_______), +}; diff --git a/keyboards/handwired/swiftrax/unsplit/keymaps/via/rules.mk b/keyboards/handwired/swiftrax/unsplit/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/handwired/swiftrax/unsplit/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/unsplit/readme.md b/keyboards/handwired/swiftrax/unsplit/readme.md new file mode 100644 index 0000000000..8c88b54a4a --- /dev/null +++ b/keyboards/handwired/swiftrax/unsplit/readme.md @@ -0,0 +1,13 @@ +# UnSplit + +A 44 key fixed split keyboard + +* Keyboard Maintainer: Swiftrax +* Hardware Supported: UnSplit +* Hardware Availability: https://github.com/swiftrax/unsplit + +Make example for this keyboard (after setting up your build environment): + + make handwired/swiftrax/unpslit: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/swiftrax/unsplit/rules.mk b/keyboards/handwired/swiftrax/unsplit/rules.mk new file mode 100644 index 0000000000..dc796be5ee --- /dev/null +++ b/keyboards/handwired/swiftrax/unsplit/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# 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 = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = no # Rotary Encoder \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/unsplit/unsplit.c b/keyboards/handwired/swiftrax/unsplit/unsplit.c new file mode 100644 index 0000000000..41d548c098 --- /dev/null +++ b/keyboards/handwired/swiftrax/unsplit/unsplit.c @@ -0,0 +1 @@ +#include "unsplit.h" diff --git a/keyboards/handwired/swiftrax/unsplit/unsplit.h b/keyboards/handwired/swiftrax/unsplit/unsplit.h new file mode 100644 index 0000000000..79109edb7b --- /dev/null +++ b/keyboards/handwired/swiftrax/unsplit/unsplit.h @@ -0,0 +1,35 @@ +/* +Copyright 2020 Swiftrax + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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" + +// readability +#define XXX KC_NO + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K011, K012, K013, K014, K015, K016, \ + K100, K101, K102, K103, K104, K105, K111, K112, K113, K114, K115, K116, \ + K200, K201, K202, K203, K204, K205, K211, K212, K213, K214, K215, K216, \ + K402, K403, K404, K405, K411, K412, K413, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K011, K012, K013, K014, K015, K016 }, \ + { K100, K101, K102, K103, K104, K105, K111, K112, K113, K114, K115, K116 }, \ + { K200, K201, K202, K203, K204, K205, K211, K212, K213, K214, K215, K216 }, \ + { XXX, XXX, K402, K403, K404, K405, K411, K412, K413, K414, XXX, XXX } \ +} From 64572b5c4bbbda84ba8c8122d354613800f2653d Mon Sep 17 00:00:00 2001 From: Luis Godinez Date: Thu, 19 Nov 2020 11:30:52 -0800 Subject: [PATCH 103/114] Add Nines by Ungodly Design (#10931) Co-authored-by: Ryan Co-authored-by: Erovia Co-authored-by: Joel Challis --- keyboards/ungodly/nines/config.h | 51 +++++++++++++++++++ keyboards/ungodly/nines/info.json | 22 ++++++++ .../ungodly/nines/keymaps/default/keymap.c | 32 ++++++++++++ keyboards/ungodly/nines/keymaps/via/keymap.c | 44 ++++++++++++++++ keyboards/ungodly/nines/keymaps/via/rules.mk | 1 + keyboards/ungodly/nines/nines.c | 32 ++++++++++++ keyboards/ungodly/nines/nines.h | 37 ++++++++++++++ keyboards/ungodly/nines/readme.md | 20 ++++++++ keyboards/ungodly/nines/rules.mk | 23 +++++++++ 9 files changed, 262 insertions(+) create mode 100644 keyboards/ungodly/nines/config.h create mode 100644 keyboards/ungodly/nines/info.json create mode 100644 keyboards/ungodly/nines/keymaps/default/keymap.c create mode 100644 keyboards/ungodly/nines/keymaps/via/keymap.c create mode 100644 keyboards/ungodly/nines/keymaps/via/rules.mk create mode 100644 keyboards/ungodly/nines/nines.c create mode 100644 keyboards/ungodly/nines/nines.h create mode 100644 keyboards/ungodly/nines/readme.md create mode 100644 keyboards/ungodly/nines/rules.mk diff --git a/keyboards/ungodly/nines/config.h b/keyboards/ungodly/nines/config.h new file mode 100644 index 0000000000..a2f874bda9 --- /dev/null +++ b/keyboards/ungodly/nines/config.h @@ -0,0 +1,51 @@ +/* Copyright 2020 Ungodly Design + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 0x5544 // "UD" = Ungodly Design +#define PRODUCT_ID 0x544E // "TN" = The Nines +#define DEVICE_VER 0x9999 +#define MANUFACTURER Ungodly Design +#define PRODUCT The Nines + +/* 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 + +/* Rotary Encoder Assignments */ +#define ENCODERS_PAD_A { C6, E6 } +#define ENCODERS_PAD_B { D7, B4 } + +#define ENCODER_RESOLUTION 2 + +/* 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/ungodly/nines/info.json b/keyboards/ungodly/nines/info.json new file mode 100644 index 0000000000..4a3c542441 --- /dev/null +++ b/keyboards/ungodly/nines/info.json @@ -0,0 +1,22 @@ +{ + "keyboard_name": "The Nines", + "url": "https://www.qlavier.com/", + "maintainer": "Ungodly Design", + "width": 3, + "height": 3, + "layouts": { + "LAYOUT_ortho_3x3": { + "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/ungodly/nines/keymaps/default/keymap.c b/keyboards/ungodly/nines/keymaps/default/keymap.c new file mode 100644 index 0000000000..2100f4b801 --- /dev/null +++ b/keyboards/ungodly/nines/keymaps/default/keymap.c @@ -0,0 +1,32 @@ +/* Copyright 2020 Ungodly Design + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_MPLY, KC_HOME, KC_MUTE, + MO(1), KC_UP, KC_END, + KC_LEFT, KC_DOWN, KC_RGHT +), + +[1] = LAYOUT_ortho_3x3( + RESET, _______, KC_STOP, + _______, KC_HOME, _______, + KC_MPRV, KC_END , KC_MNXT +) + +}; diff --git a/keyboards/ungodly/nines/keymaps/via/keymap.c b/keyboards/ungodly/nines/keymaps/via/keymap.c new file mode 100644 index 0000000000..e0567ff0f1 --- /dev/null +++ b/keyboards/ungodly/nines/keymaps/via/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2020 Ungodly Design + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_MPLY, KC_HOME, KC_MUTE, + MO(1), KC_UP, KC_END, + KC_LEFT, KC_DOWN, KC_RGHT +), + +[1] = LAYOUT_ortho_3x3( + RESET, _______, KC_STOP, + _______, KC_HOME, _______, + KC_MPRV, KC_END , KC_MNXT +), + +[2] = LAYOUT_ortho_3x3( + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ +), + +[3] = LAYOUT_ortho_3x3( + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ +) + +}; diff --git a/keyboards/ungodly/nines/keymaps/via/rules.mk b/keyboards/ungodly/nines/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/ungodly/nines/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/ungodly/nines/nines.c b/keyboards/ungodly/nines/nines.c new file mode 100644 index 0000000000..3b29b268d7 --- /dev/null +++ b/keyboards/ungodly/nines/nines.c @@ -0,0 +1,32 @@ +/* Copyright 2020 Ungodly Design + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "nines.h" + +__attribute__((weak)) void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* Left encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { /* Right encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} diff --git a/keyboards/ungodly/nines/nines.h b/keyboards/ungodly/nines/nines.h new file mode 100644 index 0000000000..f67615ecf9 --- /dev/null +++ b/keyboards/ungodly/nines/nines.h @@ -0,0 +1,37 @@ +/* Copyright 2020 Ungodly Design + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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/ungodly/nines/readme.md b/keyboards/ungodly/nines/readme.md new file mode 100644 index 0000000000..21b2628bec --- /dev/null +++ b/keyboards/ungodly/nines/readme.md @@ -0,0 +1,20 @@ +# Nines + +A 9 key (3x3) macropad with rotary encoder support. +Made by Ungodly Design for Qlavier. + +![Nines](https://i.imgur.com/zNnmPV9.jpg) + +|Reset Bootloader| | +|---|---| +|Use tweezers to short the two pins to the left of the pro-micro.|![Nines](https://i.imgur.com/ifTZ6Xw.pngl)| + +* Keyboard Maintainer: [Luis Godinez](https://github.com/luis-Godinez) +* Hardware Supported: The Nines PCB +* Hardware Availability: [Qlavier](https://www.qlavier.com/shop/) + +Make example for this keyboard (after setting up your build environment): + + make ungodly/nines: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/ungodly/nines/rules.mk b/keyboards/ungodly/nines/rules.mk new file mode 100644 index 0000000000..c8cbaf06bf --- /dev/null +++ b/keyboards/ungodly/nines/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes # Rotary encoder support From 9454f9809928602f0fbff262dd21e2c56c06e67d Mon Sep 17 00:00:00 2001 From: X-Bows Tech <41098278+XBowsTech@users.noreply.github.com> Date: Fri, 20 Nov 2020 03:32:57 +0800 Subject: [PATCH 104/114] [Keyboard]Add X-Bows Nature Keyboard (#10869) Co-authored-by: Drashna Jaelre Co-authored-by: Erovia Co-authored-by: Ryan --- keyboards/xbows/nature/config.h | 64 ++++++++ keyboards/xbows/nature/info.json | 105 ++++++++++++ .../xbows/nature/keymaps/default/keymap.c | 49 ++++++ keyboards/xbows/nature/nature.c | 155 ++++++++++++++++++ keyboards/xbows/nature/nature.h | 33 ++++ keyboards/xbows/nature/readme.md | 27 +++ keyboards/xbows/nature/rules.mk | 23 +++ 7 files changed, 456 insertions(+) create mode 100644 keyboards/xbows/nature/config.h create mode 100644 keyboards/xbows/nature/info.json create mode 100644 keyboards/xbows/nature/keymaps/default/keymap.c create mode 100644 keyboards/xbows/nature/nature.c create mode 100644 keyboards/xbows/nature/nature.h create mode 100644 keyboards/xbows/nature/readme.md create mode 100644 keyboards/xbows/nature/rules.mk diff --git a/keyboards/xbows/nature/config.h b/keyboards/xbows/nature/config.h new file mode 100644 index 0000000000..84b8a2af3e --- /dev/null +++ b/keyboards/xbows/nature/config.h @@ -0,0 +1,64 @@ +/* Copyright 2020 Shulin Huang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 0xFEED +#define PRODUCT_ID 0x1226 +#define DEVICE_VER 0x0001 +#define MANUFACTURER X-BOWS +#define PRODUCT NATURE + +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 +#define MATRIX_ROW_PINS { F7, F6, F5, F4, F1, F0 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6 } +#define DIODE_DIRECTION COL2ROW + +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_LED_PROCESS_LIMIT 18 +# define RGB_MATRIX_LED_FLUSH_LIMIT 16 +# define DEBOUNCE 3 +# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_MATRIX_KEYPRESSES +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 +# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define DISABLE_RGB_MATRIX_BAND_SAT +# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# 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 +# define DISABLE_RGB_MATRIX_DIGITAL_RAIN + +# define DRIVER_ADDR_1 0b1110100 +# define DRIVER_ADDR_2 0b1110110 +# define DRIVER_ADDR_3 0b1110101 +# define DRIVER_COUNT 3 +# define DRIVER_1_LED_TOTAL 36 +# define DRIVER_2_LED_TOTAL 36 +# define DRIVER_3_LED_TOTAL 15 +# define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL + DRIVER_3_LED_TOTAL) +#endif diff --git a/keyboards/xbows/nature/info.json b/keyboards/xbows/nature/info.json new file mode 100644 index 0000000000..a9d4c4c7b7 --- /dev/null +++ b/keyboards/xbows/nature/info.json @@ -0,0 +1,105 @@ +{ + "keyboard_name": "NATURE", + "url": "", + "maintainer": "xbows-qmk", + "width": 18, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":1.25, "y":0}, + {"label":"F2", "x":2.25, "y":0}, + {"label":"F3", "x":3.25, "y":0}, + {"label":"F4", "x":4.25, "y":0}, + {"label":"F5", "x":5.5, "y":0}, + {"label":"F6", "x":6.5, "y":0}, + {"label":"F7", "x":7.5, "y":0}, + {"label":"F8", "x":8.5, "y":0}, + {"label":"F9", "x":9.75, "y":0}, + {"label":"F10", "x":10.75, "y":0}, + {"label":"F11", "x":11.75, "y":0}, + {"label":"F12", "x":12.75, "y":0}, + {"label":"Delete", "x":14, "y":0, "w":2}, + {"label":"Print Screen", "x":16, "y":0, "w":2}, + + {"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":9, "y":1.5}, + {"label":"&", "x":10, "y":1.5}, + {"label":"*", "x":11, "y":1.5}, + {"label":"(", "x":12, "y":1.5}, + {"label":")", "x":13, "y":1.5}, + {"label":"_", "x":14, "y":1.5}, + {"label":"+", "x":15, "y":1.5}, + {"label":"Backspace", "x":16, "y":1.5, "w":2}, + + {"label":"Tab", "x":0, "y":2.5}, + {"label":"Q", "x":1, "y":2.5}, + {"label":"W", "x":2, "y":2.5}, + {"label":"E", "x":3, "y":2.5}, + {"label":"R", "x":4, "y":2.5}, + {"label":"T", "x":5, "y":2.5}, + {"label":"Y", "x":9, "y":2.5}, + {"label":"U", "x":10, "y":2.5}, + {"label":"I", "x":11, "y":2.5}, + {"label":"O", "x":12, "y":2.5}, + {"label":"P", "x":13, "y":2.5}, + {"label":"{", "x":14, "y":2.5}, + {"label":"}", "x":15, "y":2.5}, + {"label":"|", "x":16, "y":2.5}, + {"label":"Page Up", "x":17, "y":2.5}, + + {"label":"Caps Lock", "x":0, "y":3.5}, + {"label":"A", "x":1, "y":3.5}, + {"label":"S", "x":2, "y":3.5}, + {"label":"D", "x":3, "y":3.5}, + {"label":"F", "x":4, "y":3.5}, + {"label":"G", "x":5, "y":3.5}, + {"label":"Backspace", "x":6, "y":3.5, "w":3}, + {"label":"H", "x":9, "y":3.5}, + {"label":"J", "x":10, "y":3.5}, + {"label":"K", "x":11, "y":3.5}, + {"label":"L", "x":12, "y":3.5}, + {"label":":", "x":13, "y":3.5}, + {"label":"\"", "x":14, "y":3.5}, + {"label":"Enter", "x":15, "y":3.5, "w":2}, + {"label":"Page Down", "x":17, "y":3.5}, + + {"label":"Shift", "x":0, "y":4.5}, + {"label":"Z", "x":1, "y":4.5}, + {"label":"X", "x":2, "y":4.5}, + {"label":"C", "x":3, "y":4.5}, + {"label":"V", "x":4, "y":4.5}, + {"label":"B", "x":5, "y":4.5}, + {"label":"Enter", "x":6, "y":4.5, "w":3}, + {"label":"N", "x":9, "y":4.5}, + {"label":"M", "x":10, "y":4.5}, + {"label":"<", "x":11, "y":4.5}, + {"label":">", "x":12, "y":4.5}, + {"label":"?", "x":13, "y":4.5}, + {"label":"Shift", "x":14, "y":4.5}, + {"label":"Up", "x":16, "y":4.5}, + + {"label":"Ctrl", "x":0, "y":5.5}, + {"label":"Win", "x":1, "y":5.5}, + {"label":"Alt", "x":2, "y":5.5, "w":2}, + {"label":"Space", "x":4, "y":5.5, "w":2}, + {"label":"Ctrl", "x":6, "y":5.5, "w":1.5}, + {"label":"Shift", "x":7.5, "y":5.5, "w":1.5}, + {"label":"Space", "x":9, "y":5.5, "w":2}, + {"label":"Alt", "x":11, "y":5.5, "w":2}, + {"label":"Fn", "x":13, "y":5.5}, + {"label":"Ctrl", "x":14, "y":5.5}, + {"label":"Left", "x":15, "y":5.5}, + {"label":"Down", "x":16, "y":5.5}, + {"label":"Right", "x":17, "y":5.5} + + ] + } + } +} diff --git a/keyboards/xbows/nature/keymaps/default/keymap.c b/keyboards/xbows/nature/keymaps/default/keymap.c new file mode 100644 index 0000000000..b707311fa2 --- /dev/null +++ b/keyboards/xbows/nature/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2020 Shulin Huang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 VANILLA: (Base Layer) Default Layer + * + * |---------------------------------------------------------------------------------------------------------------------------------| + * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete | Prtsc | + * |---------------------------------------------------------------------------------------------------------------------------------| + * | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | + * |---------------------------------------------------------------------------------------------------------------------------------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | [ | ] | \ | PgUp | + * |---------------------------------------------------------------------------------------------------------------------------------| + * | Ctl | A | S | D | F | G | Bksp | H | J | K | L | ; | '" | Enter | PgDn | + * |---------------------------------------------------------------------------------------------------------------------------------| + * |Shift| Z | X | C | V | B | Enter | N | M | , | . | /? | Shift| | Up | + * |---------------------------------------------------------------------------------------------------------------------------------| + * |Ctrl | GUI | Alter | Space | Ctrl | Shift | Space | Alter | FN | Ctrl | Lft | Dn | Rig | + * |---------------------------------------------------------------------------------------------------------------------------------| + */ + [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_DEL, KC_PSCR, + 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_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_BSPC, 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_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LCTL, KC_LSFT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + [1] = LAYOUT( + RESET, NK_TOGG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, + AG_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NLCK, + KC_TRNS, KC_TRNS, KC_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_TRNS, KC_TRNS, KC_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, UC_M_WI, UC_M_MA, UC_M_LN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, GUI_OFF, GUI_ON, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPD, KC_VOLD, RGB_SPI) +}; diff --git a/keyboards/xbows/nature/nature.c b/keyboards/xbows/nature/nature.c new file mode 100644 index 0000000000..64b1c0dd6f --- /dev/null +++ b/keyboards/xbows/nature/nature.c @@ -0,0 +1,155 @@ +/* Copyright 2020 Shulin Huang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "nature.h" + #ifdef RGB_MATRIX_ENABLE + const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + + {0, C3_3, C2_3, C1_3}, // L01 + {0, C3_4, C2_4, C1_4}, // L02 + {0, C3_5, C2_5, C1_5}, // L03 + {0, C3_6, C2_6, C1_6}, // L04 + {0, C3_7, C2_7, C1_7}, // L05 + {0, C3_8, C2_8, C1_8}, // L06 + {1, C3_3, C2_3, C1_3}, // L07 + {1, C3_4, C2_4, C1_4}, // L08 + {1, C3_5, C2_5, C1_5}, // L09 + {1, C3_6, C2_6, C1_6}, // L10 + {1, C3_7, C2_7, C1_7}, // L11 + {1, C3_8, C2_8, C1_8}, // L12 + {2, C3_3, C2_3, C1_3}, // L13 + {2, C3_4, C2_4, C1_4}, // L14 + {2, C3_5, C2_5, C1_5}, // L15 + + {0, C4_1, C5_1, C6_1}, // L16 + {0, C4_2, C5_2, C6_2}, // L17 + {0, C4_3, C5_3, C6_3}, // L18 + {0, C4_6, C5_6, C6_6}, // L19 + {0, C4_7, C5_7, C6_7}, // L20 + {0, C4_8, C5_8, C6_8}, // L21 + {1, C4_1, C5_1, C6_1}, // L87 + {1, C4_2, C5_2, C6_2}, // L22 + {1, C4_3, C5_3, C6_3}, // L23 + {1, C4_6, C5_6, C6_6}, // L24 + {1, C4_7, C5_7, C6_7}, // L25 + {1, C4_8, C5_8, C6_8}, // L26 + {2, C4_1, C5_1, C6_1}, // L27 + {2, C4_2, C5_2, C6_2}, // L28 + {2, C4_3, C5_3, C6_3}, // L29 + + {0, C7_1, C8_1, C9_1}, // L30 + {0, C7_2, C8_2, C9_2}, // L31 + {0, C7_3, C8_3, C9_3}, // L32 + {0, C7_4, C8_4, C9_4}, // L33 + {0, C7_5, C8_5, C9_5}, // L34 + {0, C7_6, C8_6, C9_6}, // L35 + {2, C4_8, C5_8, C6_8}, // L44 + {1, C7_1, C8_1, C9_1}, // L36 + {1, C7_2, C8_2, C9_2}, // L37 + {1, C7_3, C8_3, C9_3}, // L38 + {1, C7_4, C8_4, C9_4}, // L39 + {1, C7_5, C8_5, C9_5}, // L40 + {1, C7_6, C8_6, C9_6}, // L41 + {2, C4_6, C5_6, C6_6}, // L42 + {2, C4_7, C5_7, C6_7}, // L43 + + + {0, C3_11, C2_11, C1_11}, // L45 + {0, C3_12, C2_12, C1_12}, // L46 + {0, C3_13, C2_13, C1_13}, // L47 + {0, C3_14, C2_14, C1_14}, // L48 + {0, C3_15, C2_15, C1_15}, // L49 + {0, C3_16, C2_16, C1_16}, // L50 + {1, C7_9, C8_9, C9_9}, // L51 + {1, C3_11, C2_11, C1_11}, // L52 + {1, C3_12, C2_12, C1_12}, // L53 + {1, C3_13, C2_13, C1_13}, // L54 + {1, C3_14, C2_14, C1_14}, // L55 + {1, C3_15, C2_15, C1_15}, // L56 + {1, C3_16, C2_16, C1_16}, // L57 + {2, C7_4, C8_4, C9_4}, // L58 + {2, C7_5, C8_5, C9_5}, // L59 + + {0, C4_9, C5_9, C6_9}, // L60 + {0, C4_10, C5_10, C6_10}, // L61 + {0, C4_11, C5_11, C6_11}, // L62 + {0, C4_14, C5_14, C6_14}, // L63 + {0, C4_15, C5_15, C6_15}, // L64 + {0, C4_16, C5_16, C6_16}, // L65 + {1, C7_10, C8_10, C9_10}, // L66 + {1, C4_9, C5_9, C6_9}, // L67 + {1, C4_10, C5_10, C6_10}, // L68 + {1, C4_11, C5_11, C6_11}, // L69 + {1, C4_14, C5_14, C6_14}, // L70 + {1, C4_15, C5_15, C6_15}, // L71 + {1, C4_16, C5_16, C6_16}, // L72 + {2, C7_6, C8_6, C9_6}, // L73 + + {0, C7_9, C8_9, C9_9}, // L74 + {0, C7_10, C8_10, C9_10}, // L75 + {0, C7_11, C8_11, C9_11}, // L76 + {0, C7_12, C8_12, C9_12}, // L77 + {0, C7_13, C8_13, C9_13}, // L78 + {0, C7_14, C8_14, C9_14}, // L79 + {1, C7_11, C8_11, C9_11}, // L80 + {1, C7_12, C8_12, C9_12}, // L81 + {1, C7_13, C8_13, C9_13}, // L82 + {1, C7_14, C8_14, C9_14}, // L83 + {2, C3_6, C2_6, C1_6}, // L84 + {2, C3_7, C2_7, C1_7}, // L85 + {2, C3_8, C2_8, C1_8}, // L86 + }; + + led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, + { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, + { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 }, + { 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59 }, + { 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, NO_LED }, + { 74, 75, 76, NO_LED, 77, 78, 79, 80, NO_LED, 81, 82, 83, 84, 85, 86 } + }, { + {0,0}, {16,0}, {30,0}, {43,0}, {56,0}, {72,0}, {85,0}, {99,0}, {112,0}, {128,0}, {141,0}, {154,0}, {167,0}, {190,0}, {216,0}, + {0,13}, {16,13}, {32,12}, {49,14}, {66,16}, {82,20}, {92,26}, {102,20}, {118,16}, {134,14}, {150,12}, {167,13}, {184,13}, {197,13}, {216,13}, + {0,26}, {15,26}, {31,23}, {47,24}, {63,28}, {78,30}, {224,26}, {105,30}, {120,28}, {136,24}, {152,23}, {168,26}, {184,26}, {197,26}, {210,26}, + {0,37}, {15,37}, {30,33}, {45,35}, {60,37}, {75,40}, {92,43}, {108,40}, {124,37}, {138,35}, {153,33}, {168,37}, {184,37}, {203,37}, {224,37}, + {0,48}, {14,48}, {29,44}, {43,46}, {57,48}, {72,50}, {92,53}, {112,50}, {126,48}, {141,46}, {155,44}, {169,48}, {184,48}, {210,48}, + {0,58}, {14,58}, {34,58}, {61,61}, {83,64}, {100,64},{122,61}, {149,58}, {170,58}, {184,58}, {197,58}, {210,58}, {224,58} + }, { + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 + } }; + +#endif + + +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(); +} + + __attribute__ ((weak)) void rgb_matrix_indicators_user(void) { + if (host_keyboard_led_state().caps_lock) { + rgb_matrix_set_color(45, 0xFF, 0x00, 0x00); + } +} diff --git a/keyboards/xbows/nature/nature.h b/keyboards/xbows/nature/nature.h new file mode 100644 index 0000000000..02e1af5205 --- /dev/null +++ b/keyboards/xbows/nature/nature.h @@ -0,0 +1,33 @@ +/* Copyright 2020 Shulin Huang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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, \ + K100, K101, K102, K103, K104, K105, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K201, K202, K203, K204, K205, K207, K208, K209, K210, K211, K212, K213, K214, K206, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, \ + K500, K501, K502, K504, K505, K506, K507, K509, K510, K511, K512, K513, K514 \ +) \ + { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, KC_NO,K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, K201, 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, K312, K313, K314 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO}, \ + { K500, K501, K502, KC_NO,K504, K505, K506, K507, KC_NO,K509, K510, K511, K512, K513, K514 } \ +} diff --git a/keyboards/xbows/nature/readme.md b/keyboards/xbows/nature/readme.md new file mode 100644 index 0000000000..18db496d39 --- /dev/null +++ b/keyboards/xbows/nature/readme.md @@ -0,0 +1,27 @@ +# NATURE +![NATURE](https://cdn.shopify.com/s/files/1/0014/7623/1237/files/xbows_1_720x_99574cc7-a547-4c1d-b847-482ec282f45b_540x.png) + +Nature, A 86 Keys Ergonomic Mechanical Keyboard with RGB backlight. + +If you spend your work days in front of a computer, you have likely felt some discomfort after a long day of typing. While spending less time on our computers would be the ideal remedy for this problem, that is not a realistic solution for most people. X-Bows was designed to limit the stress on your hands and wrists while also providing a productive and stylish typing experience. + + +X-Bows was designed with three criteria in mind: +* Enhancing the comfort and ergonomics of the keyboard +* Limiting the learning curve for our new layout +* Creating an attractive design + + +* Keyboard Maintainer: X-BOWS +* Hardware Supported: X-BOWS Nature +* Hardware Availability: [X-BOWS](https://x-bows.com/) + +Make example for this keyboard (after setting up your build environment): + + make xbows/nature:default + +Flashing example for this keyboard: + + make xbows/nature:default:flash + +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/xbows/nature/rules.mk b/keyboards/xbows/nature/rules.mk new file mode 100644 index 0000000000..62359d9aa5 --- /dev/null +++ b/keyboards/xbows/nature/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = IS31FL3731 From 628d4a91b905bad049d267c133a59c8b24f9acbf Mon Sep 17 00:00:00 2001 From: Matthew Dias Date: Thu, 19 Nov 2020 16:04:55 -0600 Subject: [PATCH 105/114] Add JNAO Via keymap (#9917) * Add JNAO Via keymap * Enable more layouts for via * Apply suggestions from code review * Remove extra layer * Add license --- keyboards/jnao/config.h | 1 + keyboards/jnao/keymaps/via/keymap.c | 145 ++++++++++++++++++++++++++++ keyboards/jnao/keymaps/via/rules.mk | 1 + 3 files changed, 147 insertions(+) create mode 100644 keyboards/jnao/keymaps/via/keymap.c create mode 100644 keyboards/jnao/keymaps/via/rules.mk diff --git a/keyboards/jnao/config.h b/keyboards/jnao/config.h index f14aa4bb14..1890f32d83 100644 --- a/keyboards/jnao/config.h +++ b/keyboards/jnao/config.h @@ -50,3 +50,4 @@ along with this program. If not, see . #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE + diff --git a/keyboards/jnao/keymaps/via/keymap.c b/keyboards/jnao/keymaps/via/keymap.c new file mode 100644 index 0000000000..00305db81d --- /dev/null +++ b/keyboards/jnao/keymaps/via/keymap.c @@ -0,0 +1,145 @@ + /* Copyright 2020 Matthew Dias + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum jnao_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, +}; + +// Defines for task manager and such +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Caps | A | S | D | F | G | H | J | K | L | ; | Enter| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | ` | GUI | ALT |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_5x12( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_BSPC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, + KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | Mute | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | |Lower | Bksp |Raise | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_5x12( + 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_ESC, 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_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_MUTE, _______, KC_PIPE, + _______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | 4 | 5 | 6 | + | F5 | F6 | - | = | [ | ] |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |Enter | 7 | 8 | 9 | - | F11 | F12 |ISO # |ISO / | Mute | | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | , | 0 | . |Lower | Bksp |Raise | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_5x12( + 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, KC_4, KC_5, KC_6, KC_PLUS, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + KC_ENT, KC_7, KC_8, KC_9, KC_MINS, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_MUTE, _______, KC_BSLS, + _______, KC_COMM, KC_0, KC_DOT, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | ESC | F1 | F2 | F3 |ALTF4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Taskmg| | | | | | | | | | |caltde| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | |RESET | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_5x12( + KC_ESC, KC_F1, KC_F2, KC_F3, LALT(KC_F4), KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + TSKMGR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CALTDEL, + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET +) +}; + +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; + 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; + } + return true; +}; diff --git a/keyboards/jnao/keymaps/via/rules.mk b/keyboards/jnao/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/jnao/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes From ccb15c2d2923903a925d253eec66fd4356ceea85 Mon Sep 17 00:00:00 2001 From: Wilba Date: Fri, 20 Nov 2020 20:42:34 +1100 Subject: [PATCH 106/114] [Keyboard] Added wilba.tech WT60-H1 (#10879) * Added WT60-H1 * Update keyboards/wilba_tech/wt60_h1/info.json * Update keyboards/wilba_tech/wt60_h1/keymaps/default/keymap.c * Update keyboards/wilba_tech/wt60_h1/keymaps/default/keymap.c * Update keyboards/wilba_tech/wt60_h1/keymaps/default/keymap.c * Update keyboards/wilba_tech/wt60_h1/keymaps/default/keymap.c * Update keyboards/wilba_tech/wt60_h1/rules.mk * Update keyboards/wilba_tech/wt60_h1/wt60_h1.h --- keyboards/wilba_tech/wt60_h1/config.h | 55 +++++++++++++++++++ keyboards/wilba_tech/wt60_h1/info.json | 12 ++++ .../wt60_h1/keymaps/default/keymap.c | 52 ++++++++++++++++++ .../wilba_tech/wt60_h1/keymaps/via/keymap.c | 1 + .../wilba_tech/wt60_h1/keymaps/via/rules.mk | 1 + keyboards/wilba_tech/wt60_h1/readme.md | 17 ++++++ keyboards/wilba_tech/wt60_h1/rules.mk | 24 ++++++++ keyboards/wilba_tech/wt60_h1/wt60_h1.c | 17 ++++++ keyboards/wilba_tech/wt60_h1/wt60_h1.h | 36 ++++++++++++ 9 files changed, 215 insertions(+) create mode 100644 keyboards/wilba_tech/wt60_h1/config.h create mode 100644 keyboards/wilba_tech/wt60_h1/info.json create mode 100644 keyboards/wilba_tech/wt60_h1/keymaps/default/keymap.c create mode 100644 keyboards/wilba_tech/wt60_h1/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/wt60_h1/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/wt60_h1/readme.md create mode 100644 keyboards/wilba_tech/wt60_h1/rules.mk create mode 100644 keyboards/wilba_tech/wt60_h1/wt60_h1.c create mode 100644 keyboards/wilba_tech/wt60_h1/wt60_h1.h diff --git a/keyboards/wilba_tech/wt60_h1/config.h b/keyboards/wilba_tech/wt60_h1/config.h new file mode 100644 index 0000000000..005ad42c71 --- /dev/null +++ b/keyboards/wilba_tech/wt60_h1/config.h @@ -0,0 +1,55 @@ +/* Copyright 2020 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 0x0024 // PCB #36 +#define DEVICE_VER 0x0001 +#define MANUFACTURER wilba.tech +#define PRODUCT wilba.tech WT60-H1 + +/* 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) + * +*/ +#define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } +#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6 } // D4, B7, B0 +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#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/wilba_tech/wt60_h1/info.json b/keyboards/wilba_tech/wt60_h1/info.json new file mode 100644 index 0000000000..d179d9e135 --- /dev/null +++ b/keyboards/wilba_tech/wt60_h1/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "wilba.tech WT60-H1", + "url": "https://wilba.tech", + "maintainer": "Wilba", + "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}] + } + } +} diff --git a/keyboards/wilba_tech/wt60_h1/keymaps/default/keymap.c b/keyboards/wilba_tech/wt60_h1/keymaps/default/keymap.c new file mode 100644 index 0000000000..e701e417f5 --- /dev/null +++ b/keyboards/wilba_tech/wt60_h1/keymaps/default/keymap.c @@ -0,0 +1,52 @@ +/* Copyright 2020 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 . + */ +// Default layout for WT60-H1 +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = 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_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_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(1), + MO(1), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL), + + // Fn1 Layer + [1] = 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_INS, KC_DEL, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn2 Layer + [2] = LAYOUT_60_tsangan_hhkb( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_60_tsangan_hhkb( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/wt60_h1/keymaps/via/keymap.c b/keyboards/wilba_tech/wt60_h1/keymaps/via/keymap.c new file mode 100644 index 0000000000..1f9d213f05 --- /dev/null +++ b/keyboards/wilba_tech/wt60_h1/keymaps/via/keymap.c @@ -0,0 +1 @@ +#include "../default/keymap.c" \ No newline at end of file diff --git a/keyboards/wilba_tech/wt60_h1/keymaps/via/rules.mk b/keyboards/wilba_tech/wt60_h1/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/wilba_tech/wt60_h1/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt60_h1/readme.md b/keyboards/wilba_tech/wt60_h1/readme.md new file mode 100644 index 0000000000..6c6c65c679 --- /dev/null +++ b/keyboards/wilba_tech/wt60_h1/readme.md @@ -0,0 +1,17 @@ +# wilba.tech WT60-H1 + +WT60-H1 is a keyboard PCB supporting 60% layout and daughterboard USB-C. [More info at wilba.tech](https://wilba.tech/) + +* Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +* Hardware Supported: wilba.tech WT60-H1 +* Hardware Availability: [wilba.tech](https://wilba.tech/) + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/wt60_h1:default + +Flashing example for this keyboard: + + make wilba_tech/wt60_h1:default:flash + +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/wt60_h1/rules.mk b/keyboards/wilba_tech/wt60_h1/rules.mk new file mode 100644 index 0000000000..7e56f6e1b4 --- /dev/null +++ b/keyboards/wilba_tech/wt60_h1/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = 60_tsangan_hhkb diff --git a/keyboards/wilba_tech/wt60_h1/wt60_h1.c b/keyboards/wilba_tech/wt60_h1/wt60_h1.c new file mode 100644 index 0000000000..5370394e15 --- /dev/null +++ b/keyboards/wilba_tech/wt60_h1/wt60_h1.c @@ -0,0 +1,17 @@ +/* Copyright 2020 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 "wt60_h1.h" diff --git a/keyboards/wilba_tech/wt60_h1/wt60_h1.h b/keyboards/wilba_tech/wt60_h1/wt60_h1.h new file mode 100644 index 0000000000..89b90e7afc --- /dev/null +++ b/keyboards/wilba_tech/wt60_h1/wt60_h1.h @@ -0,0 +1,36 @@ +/* Copyright 2020 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 + +// This is equivalent to LAYOUT_all +#define LAYOUT_60_tsangan_hhkb( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K213, \ + 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, K406, K411, K412, K413 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ + { 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, ____, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \ + { K400, K401, K402, ____, ____, ____, K406, ____, ____, ____, ____, K411, K412, K413 } \ +} From 4368611bfd87a544689ed10bb4450a39314bf1a1 Mon Sep 17 00:00:00 2001 From: jonathan Date: Sun, 22 Nov 2020 05:36:55 +1030 Subject: [PATCH 107/114] Add layout_all to xd96 (#10913) Co-authored-by: Ryan --- keyboards/xd96/info.json | 114 +++++++++++++++++++++++++ keyboards/xd96/keymaps/uuupah/keymap.c | 71 +++++++++++++++ keyboards/xd96/rules.mk | 10 +-- keyboards/xd96/xd96.h | 16 ++++ 4 files changed, 204 insertions(+), 7 deletions(-) create mode 100644 keyboards/xd96/keymaps/uuupah/keymap.c diff --git a/keyboards/xd96/info.json b/keyboards/xd96/info.json index 2d678414c8..22de066095 100644 --- a/keyboards/xd96/info.json +++ b/keyboards/xd96/info.json @@ -232,6 +232,120 @@ {"label":".", "x":17, "y":5}, {"label":"Enter", "x":18, "y":4, "h":2} ] + }, + "LAYOUT_all": { + "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}, + {"label":"Backspace", "x":14, "y":1}, + {"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}, + + + {"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}, + {"label":"Enter", "x":13.75, "y":3, "w":1.25}, + {"label":"4", "x":15, "y":3}, + {"label":"5", "x":16, "y":3}, + {"label":"6", "x":17, "y":3}, + {"label":"+", "x":18, "y":3}, + + {"label":"Shift", "x":0, "y":4, "w":1.25}, + {"label":"Shift", "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}, + + {"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":5} + ] } } } diff --git a/keyboards/xd96/keymaps/uuupah/keymap.c b/keyboards/xd96/keymaps/uuupah/keymap.c new file mode 100644 index 0000000000..a3a3da91db --- /dev/null +++ b/keyboards/xd96/keymaps/uuupah/keymap.c @@ -0,0 +1,71 @@ +/* Copyright 2020 Jonathan Souter + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 LT_ENT2 LT(2,KC_ENT) + +#ifdef RGBLIGHT_ENABLE +void matrix_init_user() { + rgblight_disable(); +} +#endif + +enum custom_keycodes { + ZEROZER, +}; + +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_CALC, KC_PSCR, 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_PMNS, KC_PSLS, + 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, KC_PAST, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, _______, LT_ENT2, KC_P4, KC_P5, KC_P6, KC_PPLS, + 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), KC_P1, KC_P2, KC_P3, KC_EQL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_P0, ZEROZER, KC_PDOT, KC_PENT + ), + + [1] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RESET, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_MPLY, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, KC_PSCR, _______, _______, _______, _______, _______, + _______, KC_MPRV, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, _______, _______, _______, _______, _______, + _______, _______, KC_VOLD, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case ZEROZER: + if (record->event.pressed) { + SEND_STRING("00"); + } else { + } + break; + } + return true; +} diff --git a/keyboards/xd96/rules.mk b/keyboards/xd96/rules.mk index 3ede910c3e..8d34a1f822 100644 --- a/keyboards/xd96/rules.mk +++ b/keyboards/xd96/rules.mk @@ -23,14 +23,10 @@ COMMAND_ENABLE = no # Commands for debug and configuration 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 +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output LTO_ENABLE = yes # custom matrix setup diff --git a/keyboards/xd96/xd96.h b/keyboards/xd96/xd96.h index 04c2cc46e2..bb855da5b4 100644 --- a/keyboards/xd96/xd96.h +++ b/keyboards/xd96/xd96.h @@ -57,3 +57,19 @@ { K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516, K517, K518, K619 }, \ { K601, K602, K603, ____, ____, K607, K115, ____, K612, ____, K611, K612, K614, K615, K616, K617, K618, ____ } \ } + +#define LAYOUT_all( \ + K101, K102, K103, K104, 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, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K316, K317, K318, K319, \ + K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, K415, K416, K417, K418, K419, \ + K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516, K517, K518, K519, \ + K601, K602, K603, K607, K611, K612, K614, K615, K616, K617, K618, K619 \ +) { \ + { K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K116, K117, K118, K119 }, \ + { K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, K217, K218, K219 }, \ + { K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K316, K317, K318, K319 }, \ + { K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, K415, K416, K417, K418, K419 }, \ + { K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516, K517, K518, K519 }, \ + { K601, K602, K603, K215, ____, K607, K115, ____, K612, K215, K611, ____, K614, K615, K616, K617, K618, K619 } \ +} From 23222625c201cd960a5b4a99ee52e74d4c13bba9 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 21 Nov 2020 19:11:24 +0000 Subject: [PATCH 108/114] Refactor to use led config - Part 5 (#10975) * Refactor to use led config * Refactor to use led config * Refactor to use led config --- keyboards/al1/al1.c | 24 --------- keyboards/al1/al1.h | 5 -- keyboards/al1/config.h | 5 ++ keyboards/amj40/amj40.c | 29 ----------- keyboards/amj40/config.h | 3 ++ keyboards/doro67/multi/config.h | 3 ++ keyboards/doro67/multi/multi.c | 34 ------------- keyboards/doro67/regular/config.h | 3 ++ keyboards/doro67/regular/regular.c | 31 ------------ keyboards/doro67/rgb/config.h | 3 ++ keyboards/doro67/rgb/rgb.c | 37 -------------- keyboards/espectro/config.h | 5 ++ keyboards/espectro/espectro.c | 61 +---------------------- keyboards/evil80/config.h | 9 ++-- keyboards/evil80/evil80.c | 46 ----------------- keyboards/fc660c/config.h | 3 ++ keyboards/fc660c/fc660c.c | 27 ---------- keyboards/gh60/revc/config.h | 3 ++ keyboards/gh60/revc/revc.c | 26 ---------- keyboards/gh60/revc/revc.h | 20 ++++---- keyboards/gh60/satan/config.h | 3 ++ keyboards/gh60/satan/satan.c | 23 --------- keyboards/kinesis/stapelberg/config.h | 7 ++- keyboards/kinesis/stapelberg/stapelberg.c | 60 ---------------------- keyboards/noxary/260/260.c | 45 ----------------- keyboards/noxary/260/config.h | 3 ++ keyboards/playkbtw/ca66/ca66.c | 11 ---- keyboards/playkbtw/ca66/config.h | 2 + keyboards/playkbtw/pk60/config.h | 3 ++ keyboards/playkbtw/pk60/pk60.c | 34 ------------- keyboards/redscarf_iiplus/verc/config.h | 7 ++- keyboards/redscarf_iiplus/verc/verc.c | 35 ------------- keyboards/sentraq/s65_plus/config.h | 3 ++ keyboards/sentraq/s65_plus/s65_plus.c | 23 --------- keyboards/tada68/config.h | 3 ++ keyboards/tada68/tada68.c | 30 ----------- keyboards/toad/config.h | 4 ++ keyboards/toad/toad.c | 17 ------- keyboards/westfoxtrot/aanzee/aanzee.c | 38 -------------- keyboards/westfoxtrot/aanzee/config.h | 3 ++ keyboards/xmmx/config.h | 4 ++ keyboards/xmmx/xmmx.c | 17 ------- 42 files changed, 81 insertions(+), 671 deletions(-) diff --git a/keyboards/al1/al1.c b/keyboards/al1/al1.c index e50a6373b4..460a7620cf 100644 --- a/keyboards/al1/al1.c +++ b/keyboards/al1/al1.c @@ -14,27 +14,3 @@ * along with this program. If not, see . */ #include "al1.h" - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - CONFIG_LED_IO; - print_dec(usb_led); - if (usb_led & (1<. /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +#define LED_NUM_LOCK_PIN D0 +#define LED_CAPS_LOCK_PIN B7 +#define LED_SCROLL_LOCK_PIN D1 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN B6 #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/amj40/amj40.c b/keyboards/amj40/amj40.c index 5a23769991..20742c3252 100755 --- a/keyboards/amj40/amj40.c +++ b/keyboards/amj40/amj40.c @@ -1,30 +1 @@ #include "amj40.h" -#include "led.h" - -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 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 - DDRB |= (1<<2); -} - -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1<. #define MATRIX_COL_PINS { F1, F0, E6, C7, C6, B0, D4, B1, B7, B5, B4, D7} #define UNUSED_PINS +#define LED_CAPS_LOCK_PIN B2 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN B6 /* COL2ROW or ROW2COL */ diff --git a/keyboards/doro67/multi/config.h b/keyboards/doro67/multi/config.h index d76e7affff..83a9220386 100644 --- a/keyboards/doro67/multi/config.h +++ b/keyboards/doro67/multi/config.h @@ -29,5 +29,8 @@ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN E6 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN B7 #define BACKLIGHT_LEVELS 7 diff --git a/keyboards/doro67/multi/multi.c b/keyboards/doro67/multi/multi.c index 14e3359c1a..3ab1f53653 100644 --- a/keyboards/doro67/multi/multi.c +++ b/keyboards/doro67/multi/multi.c @@ -14,37 +14,3 @@ * along with this program. If not, see . */ #include "multi.h" - -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 - - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(E6); - } else { - writePinHigh(E6); - } - - led_set_user(usb_led); -} diff --git a/keyboards/doro67/regular/config.h b/keyboards/doro67/regular/config.h index 4cfe2487d3..85a0c5038b 100644 --- a/keyboards/doro67/regular/config.h +++ b/keyboards/doro67/regular/config.h @@ -28,3 +28,6 @@ #define MATRIX_COL_PINS { B0, B1, B2, B3, D4, D6, D7, B4, B5, B6, C6, C7, F5, F6, F7 } #define DIODE_DIRECTION COL2ROW + +#define LED_CAPS_LOCK_PIN E6 +#define LED_PIN_ON_STATE 0 diff --git a/keyboards/doro67/regular/regular.c b/keyboards/doro67/regular/regular.c index 719ceea6fe..c9b0a25b59 100644 --- a/keyboards/doro67/regular/regular.c +++ b/keyboards/doro67/regular/regular.c @@ -14,34 +14,3 @@ * along with this program. If not, see . */ #include "regular.h" - -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 - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(E6); - } else { - writePinHigh(E6); - } - led_set_user(usb_led); -} diff --git a/keyboards/doro67/rgb/config.h b/keyboards/doro67/rgb/config.h index 90fefa1232..349b9f5cd8 100644 --- a/keyboards/doro67/rgb/config.h +++ b/keyboards/doro67/rgb/config.h @@ -48,6 +48,9 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN E6 +#define LED_PIN_ON_STATE 0 + // The pin connected to the data pin of the LEDs #define RGB_DI_PIN B7 // The number of LEDs connected diff --git a/keyboards/doro67/rgb/rgb.c b/keyboards/doro67/rgb/rgb.c index e8c9ac6321..794c037dd6 100644 --- a/keyboards/doro67/rgb/rgb.c +++ b/keyboards/doro67/rgb/rgb.c @@ -16,43 +16,6 @@ #include "rgb.h" #include "rgb_matrix_types.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 - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(E6); - } else { - writePinHigh(E6); - } - led_set_user(usb_led); -} - led_config_t g_led_config = { { { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, diff --git a/keyboards/espectro/config.h b/keyboards/espectro/config.h index 2736c1d880..b344c641e5 100755 --- a/keyboards/espectro/config.h +++ b/keyboards/espectro/config.h @@ -38,6 +38,11 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define LED_NUM_LOCK_PIN B0 +#define LED_CAPS_LOCK_PIN B2 +#define LED_SCROLL_LOCK_PIN B1 +#define LED_PIN_ON_STATE 0 + /* number of backlight levels */ #define BACKLIGHT_PIN B6 #define BACKLIGHT_LEVELS 5 diff --git a/keyboards/espectro/espectro.c b/keyboards/espectro/espectro.c index 13030cdd41..64494c49c1 100755 --- a/keyboards/espectro/espectro.c +++ b/keyboards/espectro/espectro.c @@ -14,63 +14,4 @@ * along with this program. If not, see . */ - -#include QMK_KEYBOARD_H -#include "quantum.h" - - -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_NUM_LOCK)) { - DDRB |= (1 << 0); PORTB &= ~(1 << 0); - } else { - DDRB &= ~(1 << 0); PORTB &= ~(1 << 0); - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 2); PORTB &= ~(1 << 2); - } else { - DDRB &= ~(1 << 2); PORTB &= ~(1 << 2); - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRB |= (1 << 1); PORTB &= ~(1 << 1); - } else { - DDRB &= ~(1 << 1); PORTB &= ~(1 << 1); - } - - if (usb_led & (1 << USB_LED_COMPOSE)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_KANA)) { - - } else { - - } - -} - +#include "espectro.h" diff --git a/keyboards/evil80/config.h b/keyboards/evil80/config.h index ae507c74f9..0f0e24529a 100644 --- a/keyboards/evil80/config.h +++ b/keyboards/evil80/config.h @@ -19,16 +19,17 @@ #define MATRIX_COL_PINS { B2, D0, D1, D2, D3, D5, D4, D6, D7, B4, B1, C6, C7, E6, F6, F7 } #define UNUSED_PINS -#define BACKLIGHT_PIN B5 -#define BACKLIGHT_BREATHING - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST -/* number of backlight levels */ +#define LED_CAPS_LOCK_PIN B6 +#define LED_SCROLL_LOCK_PIN B7 + +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ diff --git a/keyboards/evil80/evil80.c b/keyboards/evil80/evil80.c index d4653d049b..471580fd80 100644 --- a/keyboards/evil80/evil80.c +++ b/keyboards/evil80/evil80.c @@ -1,47 +1 @@ #include "evil80.h" -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - led_init_ports(); - 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_init_ports(void) { - DDRB |= (1<<6) | (1<<7); // OUT -} - -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1<. /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST +#define LED_CAPS_LOCK_PIN B6 +#define LED_PIN_ON_STATE 0 + /* number of backlight levels */ // #define BACKLIGHT_LEVELS 1 diff --git a/keyboards/fc660c/fc660c.c b/keyboards/fc660c/fc660c.c index da6ba9e744..592697cb88 100644 --- a/keyboards/fc660c/fc660c.c +++ b/keyboards/fc660c/fc660c.c @@ -21,36 +21,9 @@ along with this program. If not, see . #endif void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - #ifdef ACTUATION_DEPTH_ADJUSTMENT adjust_actuation_point(ACTUATION_DEPTH_ADJUSTMENT); #endif 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) { - if (usb_led & (1<. /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST +#define LED_CAPS_LOCK_PIN B2 +#define LED_PIN_ON_STATE 0 + /* number of backlight levels */ #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/gh60/revc/revc.c b/keyboards/gh60/revc/revc.c index e06739d2ba..47dd5410f0 100644 --- a/keyboards/gh60/revc/revc.c +++ b/keyboards/gh60/revc/revc.c @@ -1,27 +1 @@ #include "revc.h" - - -extern inline void gh60_caps_led_on(void); -extern inline void gh60_poker_leds_on(void); -extern inline void gh60_fn_led_on(void); -extern inline void gh60_esc_led_on(void); -extern inline void gh60_wasd_leds_on(void); - -extern inline void gh60_caps_led_off(void); -extern inline void gh60_poker_leds_off(void); -extern inline void gh60_fn_led_off(void); -extern inline void gh60_esc_led_off(void); -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 - - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - gh60_caps_led_on(); - } else { - gh60_caps_led_off(); - } - - led_set_user(usb_led); -} diff --git a/keyboards/gh60/revc/revc.h b/keyboards/gh60/revc/revc.h index 450c59020c..a94322ad72 100644 --- a/keyboards/gh60/revc/revc.h +++ b/keyboards/gh60/revc/revc.h @@ -12,17 +12,17 @@ * B2 Capslock LED * B0 not connected */ -inline void gh60_caps_led_on(void) { setPinOutput(B2); writePinLow(B2); } -inline void gh60_poker_leds_on(void) { setPinOutput(F4); writePinLow(F4); } -inline void gh60_fn_led_on(void) { setPinOutput(F5); writePinLow(F5); } -inline void gh60_esc_led_on(void) { setPinOutput(F6); writePinLow(F6); } -inline void gh60_wasd_leds_on(void) { setPinOutput(F7); writePinLow(F7); } +static inline void gh60_caps_led_on(void) { setPinOutput(B2); writePinLow(B2); } +static inline void gh60_poker_leds_on(void) { setPinOutput(F4); writePinLow(F4); } +static inline void gh60_fn_led_on(void) { setPinOutput(F5); writePinLow(F5); } +static inline void gh60_esc_led_on(void) { setPinOutput(F6); writePinLow(F6); } +static inline void gh60_wasd_leds_on(void) { setPinOutput(F7); writePinLow(F7); } -inline void gh60_caps_led_off(void) { setPinInput(B2); } -inline void gh60_poker_leds_off(void) { setPinInput(F4); } -inline void gh60_fn_led_off(void) { setPinInput(F5); } -inline void gh60_esc_led_off(void) { setPinInput(F6); } -inline void gh60_wasd_leds_off(void) { setPinInput(F7); } +static inline void gh60_caps_led_off(void) { setPinInput(B2); } +static inline void gh60_poker_leds_off(void) { setPinInput(F4); } +static inline void gh60_fn_led_off(void) { setPinInput(F5); } +static inline void gh60_esc_led_off(void) { setPinInput(F6); } +static inline void gh60_wasd_leds_off(void) { setPinInput(F7); } /* GH60 keymap definition macro * K2C, K31 and K3C are extra keys for ISO diff --git a/keyboards/gh60/satan/config.h b/keyboards/gh60/satan/config.h index 8c172314a8..ac343782e4 100644 --- a/keyboards/gh60/satan/config.h +++ b/keyboards/gh60/satan/config.h @@ -37,6 +37,9 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3 } #define UNUSED_PINS +#define LED_NUM_LOCK_PIN B2 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN B6 /* COL2ROW or ROW2COL */ diff --git a/keyboards/gh60/satan/satan.c b/keyboards/gh60/satan/satan.c index 8542a57c43..cd65084455 100644 --- a/keyboards/gh60/satan/satan.c +++ b/keyboards/gh60/satan/satan.c @@ -1,24 +1 @@ #include "satan.h" - -void matrix_init_kb(void) { - matrix_init_user(); - led_init_ports(); -}; - -void matrix_scan_kb(void) { - matrix_scan_user(); -}; - -void led_init_ports(void) { - setPinOutput(B2); -} - -void led_set_kb(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - // Turn Caps Lock LED on - writePinLow(B2); - } else { - // Turn Caps Lock LED off - writePinHigh(B2); - } -} diff --git a/keyboards/kinesis/stapelberg/config.h b/keyboards/kinesis/stapelberg/config.h index 992480195f..5037baebd3 100644 --- a/keyboards/kinesis/stapelberg/config.h +++ b/keyboards/kinesis/stapelberg/config.h @@ -27,7 +27,12 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW - + +#define LED_NUM_LOCK_PIN F2 +#define LED_CAPS_LOCK_PIN F3 +#define LED_SCROLL_LOCK_PIN F1 +#define LED_COMPOSE_PIN F0 +#define LED_PIN_ON_STATE 0 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/kinesis/stapelberg/stapelberg.c b/keyboards/kinesis/stapelberg/stapelberg.c index af407ac4fc..a69679eef9 100644 --- a/keyboards/kinesis/stapelberg/stapelberg.c +++ b/keyboards/kinesis/stapelberg/stapelberg.c @@ -1,61 +1 @@ #include "stapelberg.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - // * Set our LED pins as output - DDRF |= (1<<0); // Keypad LED - DDRF |= (1<<1); // ScrLock LED - DDRF |= (1<<2); // NumLock LED - DDRF |= (1<<3); // CapsLock LED - - 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_init_ports() { - // * Set our LED pins as output - DDRF |= (1<<0); // Keypad LED - DDRF |= (1<<1); // ScrLock LED - DDRF |= (1<<2); // NumLock LED - DDRF |= (1<<3); // CapsLock LED -} - -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1<. */ #include "260.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(B1); - 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(B1); - } else { - writePinHigh(B1); - } - - led_set_user(usb_led); -} \ No newline at end of file diff --git a/keyboards/noxary/260/config.h b/keyboards/noxary/260/config.h index 379dbbf78d..9876d09f48 100644 --- a/keyboards/noxary/260/config.h +++ b/keyboards/noxary/260/config.h @@ -48,6 +48,9 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN B1 +#define LED_PIN_ON_STATE 0 + /* * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. */ diff --git a/keyboards/playkbtw/ca66/ca66.c b/keyboards/playkbtw/ca66/ca66.c index 43a648eca0..91f4826f99 100644 --- a/keyboards/playkbtw/ca66/ca66.c +++ b/keyboards/playkbtw/ca66/ca66.c @@ -1,12 +1 @@ #include "ca66.h" - -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(D1); - } else { - writePinLow(D1); - } - - led_set_user(usb_led); -} diff --git a/keyboards/playkbtw/ca66/config.h b/keyboards/playkbtw/ca66/config.h index ff68cdac9e..4e2d040727 100644 --- a/keyboards/playkbtw/ca66/config.h +++ b/keyboards/playkbtw/ca66/config.h @@ -22,6 +22,8 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN D1 + /* number of backlight levels */ #define BACKLIGHT_PIN F0 diff --git a/keyboards/playkbtw/pk60/config.h b/keyboards/playkbtw/pk60/config.h index 93e29951e9..f4709697c8 100644 --- a/keyboards/playkbtw/pk60/config.h +++ b/keyboards/playkbtw/pk60/config.h @@ -23,6 +23,9 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN F4 +#define LED_PIN_ON_STATE 0 + /* number of backlight levels */ #define BACKLIGHT_PIN B7 #ifdef BACKLIGHT_PIN diff --git a/keyboards/playkbtw/pk60/pk60.c b/keyboards/playkbtw/pk60/pk60.c index a9da0ff229..909230def2 100644 --- a/keyboards/playkbtw/pk60/pk60.c +++ b/keyboards/playkbtw/pk60/pk60.c @@ -1,35 +1 @@ #include "pk60.h" -#include "led.h" - -void matrix_init_kb (void) { - - matrix_init_user(); - led_init_ports(); - -} - -void matrix_scan_kb(void) { - - matrix_scan_user(); - -}; - -void led_init_ports(void) { - // Set capslock LED pin as pinout - DDRF |= (1 << 4); - PORTF |= (1 << 4); - -} - -void led_set_kb(uint8_t usb_led) { - - if (usb_led & (1<. /* 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 LED_NUM_LOCK_PIN E6 +#define LED_CAPS_LOCK_PIN C7 +#define LED_PIN_ON_STATE 0 #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING diff --git a/keyboards/redscarf_iiplus/verc/verc.c b/keyboards/redscarf_iiplus/verc/verc.c index 9dfc260679..a235cdd533 100755 --- a/keyboards/redscarf_iiplus/verc/verc.c +++ b/keyboards/redscarf_iiplus/verc/verc.c @@ -14,38 +14,3 @@ * 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/sentraq/s65_plus/config.h b/keyboards/sentraq/s65_plus/config.h index 51aacfc196..f1f3512c6a 100644 --- a/keyboards/sentraq/s65_plus/config.h +++ b/keyboards/sentraq/s65_plus/config.h @@ -20,6 +20,9 @@ #define MATRIX_COL_PINS { F6, F5, F4, F1, F0, E6, B0, B1, D5, B2, B3, D0, D1, D2, D4, D6, D7, F7 } #define UNUSED_PINS +#define LED_CAPS_LOCK_PIN B7 +#define LED_PIN_ON_STATE 0 + /* number of backlight levels */ #define BACKLIGHT_PIN B7 #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/sentraq/s65_plus/s65_plus.c b/keyboards/sentraq/s65_plus/s65_plus.c index 3eaaa37174..7b20ee0696 100644 --- a/keyboards/sentraq/s65_plus/s65_plus.c +++ b/keyboards/sentraq/s65_plus/s65_plus.c @@ -1,24 +1 @@ #include "s65_plus.h" -#include "led.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(); -}; - -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1<. /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE +#define LED_CAPS_LOCK_PIN B2 +#define LED_PIN_ON_STATE 0 + /* Backlight configuration */ #define BACKLIGHT_PIN B6 #define BACKLIGHT_BREATHING diff --git a/keyboards/tada68/tada68.c b/keyboards/tada68/tada68.c index e4fab98101..34534de747 100755 --- a/keyboards/tada68/tada68.c +++ b/keyboards/tada68/tada68.c @@ -1,31 +1 @@ #include "tada68.h" -#include "led.h" - -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 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 - DDRB |= (1<<2); -} - -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1<. - */ #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 (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - - // Turn capslock on - writePinLow(B2); - } else { - - // Turn capslock off - writePinHigh(B2); - } - - led_set_user(usb_led); -} diff --git a/keyboards/westfoxtrot/aanzee/config.h b/keyboards/westfoxtrot/aanzee/config.h index 69fc613879..73db816f65 100644 --- a/keyboards/westfoxtrot/aanzee/config.h +++ b/keyboards/westfoxtrot/aanzee/config.h @@ -40,6 +40,9 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN B2 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN B7 #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 5 diff --git a/keyboards/xmmx/config.h b/keyboards/xmmx/config.h index bee047bf05..5f9c305d1a 100644 --- a/keyboards/xmmx/config.h +++ b/keyboards/xmmx/config.h @@ -23,6 +23,10 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN B6 +#define LED_SCROLL_LOCK_PIN B5 +#define LED_PIN_ON_STATE 0 + /* number of backlight levels */ #ifdef BACKLIGHT_PIN diff --git a/keyboards/xmmx/xmmx.c b/keyboards/xmmx/xmmx.c index 4d410e90a0..399ae4eb44 100644 --- a/keyboards/xmmx/xmmx.c +++ b/keyboards/xmmx/xmmx.c @@ -1,18 +1 @@ #include "xmmx.h" - -void led_set_user(uint8_t usb_led) { - - //LED1 - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 6); PORTB &= ~(1 << 6); - } else { - DDRB &= ~(1 << 6); PORTB &= ~(1 << 6); - } - - //LED2 - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRB |= (1 << 5); PORTB &= ~(1 << 5); - } else { - DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); - } -} From 95fd2ce81a394d972d922b7be34a99752aed9e31 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 21 Nov 2020 19:11:50 +0000 Subject: [PATCH 109/114] Refactor to use led config - Part 4 (#10967) * Refactor to use led config * Refactor to use led_update_kb --- keyboards/clueboard/17/17.c | 10 ---- keyboards/clueboard/2x1800/2018/2018.c | 41 ---------------- keyboards/clueboard/2x1800/2018/config.h | 4 ++ keyboards/clueboard/60/config.h | 4 +- keyboards/clueboard/60/led.c | 12 ----- keyboards/clueboard/66/rev1/config.h | 2 + keyboards/clueboard/66/rev1/rev1.c | 16 ------ keyboards/clueboard/66/rev2/config.h | 4 +- keyboards/clueboard/66/rev2/rev2.c | 30 ------------ keyboards/clueboard/66/rev3/config.h | 4 +- keyboards/clueboard/66/rev3/rev3.c | 30 ------------ keyboards/clueboard/66/rev4/rev4.c | 49 +++++++------------ .../clueboard/66_hotswap/prototype/config.h | 2 + .../66_hotswap/prototype/prototype.c | 30 ------------ keyboards/clueboard/card/card.c | 28 +---------- 15 files changed, 36 insertions(+), 230 deletions(-) diff --git a/keyboards/clueboard/17/17.c b/keyboards/clueboard/17/17.c index 9e8ca644ec..44b55a323b 100644 --- a/keyboards/clueboard/17/17.c +++ b/keyboards/clueboard/17/17.c @@ -2,16 +2,6 @@ int pwm_level; -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - matrix_init_user(); -}; - -void led_set_kb(uint8_t usb_led) { - print("led_set\n"); -} - void backlight_init_ports(void) { // Set C7 to output DDRC |= (1<<7); diff --git a/keyboards/clueboard/2x1800/2018/2018.c b/keyboards/clueboard/2x1800/2018/2018.c index 1745309ff2..dee0c01b5b 100644 --- a/keyboards/clueboard/2x1800/2018/2018.c +++ b/keyboards/clueboard/2x1800/2018/2018.c @@ -14,44 +14,3 @@ * along with this program. If not, see . */ #include "2018.h" - -void matrix_init_kb(void) { - // Set our LED pins as output - DDRB |= (1<<4); // Numlock - DDRB |= (1<<5); // Capslock - DDRB |= (1<<6); // Scroll Lock - - // Run the keymap level init - 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) { - // Toggle numlock as needed - if (usb_led & (1<. #define C4_AUDIO #define AUDIO_CLICKY +#define LED_NUM_LOCK_PIN B4 +#define LED_CAPS_LOCK_PIN B5 +#define LED_SCROLL_LOCK_PIN B6 + /* number of backlight levels */ // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING diff --git a/keyboards/clueboard/60/config.h b/keyboards/clueboard/60/config.h index f0e157ff14..3f54d0a9da 100644 --- a/keyboards/clueboard/60/config.h +++ b/keyboards/clueboard/60/config.h @@ -121,6 +121,8 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Backlight configuration +#define LED_CAPS_LOCK_PIN B7 + +/* Backlight configuration */ #define BACKLIGHT_LEVELS 1 diff --git a/keyboards/clueboard/60/led.c b/keyboards/clueboard/60/led.c index 91a2c537dc..20756f1e7a 100644 --- a/keyboards/clueboard/60/led.c +++ b/keyboards/clueboard/60/led.c @@ -16,7 +16,6 @@ */ #include "hal.h" -#include "led.h" #include "printf.h" #ifdef BACKLIGHT_ENABLE @@ -40,14 +39,3 @@ void backlight_set(uint8_t level) { } } #endif - -void led_set_kb(uint8_t usb_led) { - printf("led_set_kb(%d)\n", usb_led); - if (usb_led & (1< -#include "backlight.h" #include "print.h" -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 matrix_scan_kb(void) { - matrix_scan_user(); -} - void backlight_init_ports(void) { print("init_backlight_pin()\n"); // Set our LED pins as output @@ -41,19 +27,3 @@ void backlight_set(uint8_t level) { PORTD &= ~(1<<4); // Arrows } } - -void led_init_ports() { - // * Set our LED pins as output - DDRB |= (1<<4); -} - -void led_set_kb(uint8_t usb_led) { - DDRB |= (1<<4); - if (usb_led & (1< -#include "backlight.h" #include "print.h" -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 matrix_scan_kb(void) { - matrix_scan_user(); -} - void backlight_init_ports(void) { print("init_backlight_pin()\n"); // Set our LED pins as output @@ -41,19 +27,3 @@ void backlight_set(uint8_t level) { PORTD &= ~(1<<4); // Arrows } } - -void led_init_ports() { - // * Set our LED pins as output - DDRB |= (1<<4); -} - -void led_set_kb(uint8_t usb_led) { - DDRB |= (1<<4); - if (usb_led & (1< -#include "backlight.h" #include "print.h" -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 matrix_scan_kb(void) { - matrix_scan_user(); -} - void backlight_init_ports(void) { print("init_backlight_pin()\n"); // Set our LED pins as output @@ -41,19 +27,3 @@ void backlight_set(uint8_t level) { PORTD &= ~(1<<1); // Arrows } } - -void led_init_ports() { - // * Set our LED pins as output - DDRB |= (1<<4); -} - -void led_set_kb(uint8_t usb_led) { - DDRB |= (1<<4); - if (usb_led & (1< Date: Sat, 21 Nov 2020 11:48:13 -0800 Subject: [PATCH 110/114] Rebase develop after a master push (#10812) * rebase develop after a master push * limit this to qmk/qmk_firmware * change to a merge strategy * GITHUB_TOKEN isn't needed * check for .locked in develop * break up into more steps --- .github/workflows/develop_update.yml | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/develop_update.yml diff --git a/.github/workflows/develop_update.yml b/.github/workflows/develop_update.yml new file mode 100644 index 0000000000..101d235e04 --- /dev/null +++ b/.github/workflows/develop_update.yml @@ -0,0 +1,32 @@ +name: Update develop after master merge + +on: + push: + branches: + - master + + +jobs: + develop_update: + runs-on: ubuntu-latest + + if: github.repository == 'qmk/qmk_firmware' + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Checkout develop + run: | + git fetch origin master develop + git checkout develop + + - name: Check if branch locked + run: | + test -e .locked || exit 1 + + - name: Update develop from master + run: | + git merge origin/master + git push origin develop From 44d1b2e717db0387e7138cc24fc5cc15ba8c90f2 Mon Sep 17 00:00:00 2001 From: Zach White Date: Sat, 21 Nov 2020 12:06:33 -0800 Subject: [PATCH 111/114] push the API data for develop as well (#10852) --- .github/workflows/develop_api.yml | 42 +++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/develop_api.yml diff --git a/.github/workflows/develop_api.yml b/.github/workflows/develop_api.yml new file mode 100644 index 0000000000..53a5b452f8 --- /dev/null +++ b/.github/workflows/develop_api.yml @@ -0,0 +1,42 @@ +name: Update Develop API Data + +on: + push: + branches: + - develop + paths: + - 'keyboards/**' + - 'layouts/community/**' + +jobs: + api_data: + runs-on: ubuntu-latest + container: qmkfm/base_container + + # protect against those who work in their fork on develop + if: github.repository == 'qmk/qmk_firmware' + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 1 + persist-credentials: false + + - name: Generate API Data + run: qmk generate-api + + - name: Install rsync + run: | + apt-get update && apt-get install -y rsync + + - name: Upload API Data + uses: JamesIves/github-pages-deploy-action@3.7.1 + with: + ACCESS_TOKEN: ${{ secrets.API_TOKEN_GITHUB }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: main + FOLDER: api_data/v1 + CLEAN: true + GIT_CONFIG_EMAIL: hello@qmk.fm + REPOSITORY_NAME: qmk/qmk_keyboards_devel + TARGET_FOLDER: v1 From a952bf2d31ec379ec5e5bbf9b1d1b2673ebbacad Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Sun, 22 Nov 2020 08:42:58 +0100 Subject: [PATCH 112/114] [Keyboard] Added Vagrant-10 keyboard (#10048) * Initial commit for Vagrant-10 * Initial commit for Vagrant-10 * customized layout * Fully working QMK config with default keymap * Update info.json * Update info.json * Update readme.md * prep * fixed pull request issues * Update keyboards/vagrant_10/keymaps/default/keymap.c * Update keyboards/vagrant_10/keymaps/default/keymap.c * Update keyboards/vagrant_10/vagrant_10.h * Update keyboards/vagrant_10/vagrant_10.h * Update keyboards/vagrant_10/config.h * Update keyboards/vagrant_10/config.h * Update keyboards/vagrant_10/rules.mk * Update keyboards/vagrant_10/readme.md * Update keyboards/vagrant_10/config.h * Update keyboards/vagrant_10/info.json * Update keyboards/vagrant_10/info.json * Update keyboards/vagrant_10/vagrant_10.h * Update keyboards/vagrant_10/keymaps/default/keymap.c * Update keyboards/vagrant_10/config.h * Update keyboards/vagrant_10/config.h * Update keyboards/vagrant_10/readme.md * Update keyboards/vagrant_10/config.h * License header * License header * License header * License header. * Update keyboards/vagrant_10/config.h * Update keyboards/vagrant_10/config.h * Update keyboards/vagrant_10/config.h * Update keyboards/vagrant_10/config.h * Update keyboards/vagrant_10/vagrant_10.h --- keyboards/vagrant_10/config.h | 55 +++++++++++++++++ keyboards/vagrant_10/info.json | 12 ++++ keyboards/vagrant_10/keymaps/default/keymap.c | 59 +++++++++++++++++++ keyboards/vagrant_10/readme.md | 19 ++++++ keyboards/vagrant_10/rules.mk | 22 +++++++ keyboards/vagrant_10/vagrant_10.c | 25 ++++++++ keyboards/vagrant_10/vagrant_10.h | 39 ++++++++++++ 7 files changed, 231 insertions(+) create mode 100755 keyboards/vagrant_10/config.h create mode 100644 keyboards/vagrant_10/info.json create mode 100755 keyboards/vagrant_10/keymaps/default/keymap.c create mode 100644 keyboards/vagrant_10/readme.md create mode 100755 keyboards/vagrant_10/rules.mk create mode 100755 keyboards/vagrant_10/vagrant_10.c create mode 100755 keyboards/vagrant_10/vagrant_10.h diff --git a/keyboards/vagrant_10/config.h b/keyboards/vagrant_10/config.h new file mode 100755 index 0000000000..2771df7895 --- /dev/null +++ b/keyboards/vagrant_10/config.h @@ -0,0 +1,55 @@ + +/** +MIT License + +Copyright (c) 2020 Shanduur & QMK Firmware + +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. +*/ + +#pragma once +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x534C +#define PRODUCT_ID 0x5E99 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Shanduur +#define PRODUCT Vagrant 10 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 3 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F7, B1, B3, B2 } +#define MATRIX_COL_PINS { F4, F6, F5 } +#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 diff --git a/keyboards/vagrant_10/info.json b/keyboards/vagrant_10/info.json new file mode 100644 index 0000000000..badf84a7b8 --- /dev/null +++ b/keyboards/vagrant_10/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Vagrant-10", + "url": "https://github.com/Sho-Keebs/Vagrant-10", + "maintainer": "Shanduur", + "width": 3, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"x":1, "y":0, "w":2}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}] + } + } +} diff --git a/keyboards/vagrant_10/keymaps/default/keymap.c b/keyboards/vagrant_10/keymaps/default/keymap.c new file mode 100755 index 0000000000..4864ce6e79 --- /dev/null +++ b/keyboards/vagrant_10/keymaps/default/keymap.c @@ -0,0 +1,59 @@ +/** +MIT License + +Copyright (c) 2020 Shanduur & QMK Firmware + +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. +*/ + +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + HOME, + MODS, + MODS2, + OTHER +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [HOME] = LAYOUT( + KC_P0, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, + LT(1, KC_P1), LT(2, KC_P2), LT(3, KC_P3)), + + [MODS] = LAYOUT( + KC_MUTE, + KC_MPLY, KC_NO, KC_VOLU, + KC_MPRV, KC_MNXT, KC_VOLD, + KC_TRNS, KC_NO, KC_NO), + + [MODS2] = LAYOUT( + KC_F13, + KC_F14, KC_F15, KC_F16, + KC_F19, KC_F18, KC_F17, + KC_NO, KC_TRNS, KC_NO), + + [OTHER] = LAYOUT( + RESET, + KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_TRNS), +}; diff --git a/keyboards/vagrant_10/readme.md b/keyboards/vagrant_10/readme.md new file mode 100644 index 0000000000..5972dfec09 --- /dev/null +++ b/keyboards/vagrant_10/readme.md @@ -0,0 +1,19 @@ +# Vagrant 10 + +![Vagrant 10](https://raw.githubusercontent.com/Sho-Keebs/Vagrant-10/master/doc/vag.jpg) + +This is (yet another) simple and small macropad. + +* Keyboard Maintainer: [Shanduur](https://github.com/Shanduur) +* Hardware Supported: Vagrant-10 PCB, Arduino Pro Micro +* Hardware Availability: Groupbuys, Pro Micro can be found on [Aliexpress](https://www.aliexpress.com/wholesale?SearchText=arduino+pro+micro) + +Make example for this keyboard (after setting up your build environment): + + make vagrant_10:default + +Flashing example for this keyboard: + + make vagrant_10:default:flash + +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/vagrant_10/rules.mk b/keyboards/vagrant_10/rules.mk new file mode 100755 index 0000000000..e4ffb10d04 --- /dev/null +++ b/keyboards/vagrant_10/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/vagrant_10/vagrant_10.c b/keyboards/vagrant_10/vagrant_10.c new file mode 100755 index 0000000000..6c577b92c2 --- /dev/null +++ b/keyboards/vagrant_10/vagrant_10.c @@ -0,0 +1,25 @@ +/** +MIT License + +Copyright (c) 2020 Shanduur & QMK Firmware + +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. +*/ + +#include "vagrant_10.h" diff --git a/keyboards/vagrant_10/vagrant_10.h b/keyboards/vagrant_10/vagrant_10.h new file mode 100755 index 0000000000..1cd4d1b777 --- /dev/null +++ b/keyboards/vagrant_10/vagrant_10.h @@ -0,0 +1,39 @@ +/** +MIT License + +Copyright (c) 2020 Shanduur & QMK Firmware + +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. +*/ + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K002, \ + K100, K101, K102, \ + K200, K201, K202, \ + K300, K301, K302 \ +) { \ + { KC_NO, KC_NO, K002 }, \ + { K100, K101, K102 }, \ + { K200, K201, K202 }, \ + { K300, K301, K302 } \ +} From ca9edc5fe392d0349e77c26b745cbef2f85b160e Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 22 Nov 2020 15:50:14 +0000 Subject: [PATCH 113/114] Fix failed develop updates within CI (#11001) * Fix inverted logic * skip locked instead of fail --- .github/workflows/develop_update.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/develop_update.yml b/.github/workflows/develop_update.yml index 101d235e04..635cf81e0c 100644 --- a/.github/workflows/develop_update.yml +++ b/.github/workflows/develop_update.yml @@ -23,10 +23,13 @@ jobs: git checkout develop - name: Check if branch locked - run: | - test -e .locked || exit 1 + id: check_locked + uses: andstor/file-existence-action@v1 + with: + files: ".locked" - name: Update develop from master + if: steps.check_locked.outputs.files_exists == 'false' run: | git merge origin/master git push origin develop From c731628946c71faa56491c89ed59f95ab8e60d97 Mon Sep 17 00:00:00 2001 From: Zach White Date: Sun, 22 Nov 2020 08:00:10 -0800 Subject: [PATCH 114/114] identify the qmk-bot --- .github/workflows/develop_update.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/develop_update.yml b/.github/workflows/develop_update.yml index 635cf81e0c..285720fefe 100644 --- a/.github/workflows/develop_update.yml +++ b/.github/workflows/develop_update.yml @@ -31,5 +31,7 @@ jobs: - name: Update develop from master if: steps.check_locked.outputs.files_exists == 'false' run: | + git config --global user.name "QMK Bot" + git config --global user.email "hello@qmk.fm" git merge origin/master git push origin develop