diff options
55 files changed, 1890 insertions, 18 deletions
diff --git a/docs/contributing.md b/docs/contributing.md index 7c365b418..c4d5057a0 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -85,7 +85,7 @@ Limited experimentation on the devices I have available shows that 7 is high eno Documentation is one of the easiest ways to get started contributing to QMK. Finding places where the documentation is wrong or incomplete and fixing those is easy! We also very badly need someone to edit our documentation, so if you have editing skills but aren't sure where or how to jump in please [reach out for help](#where-can-i-go-for-help)! -You'll find all our documentation in the `qmk_firmware/docs` directory, or if you'd rather use a web based workflow you can click "Suggest An Edit" at the top of each page on http://docs.qmk.fm/. +You'll find all our documentation in the `qmk_firmware/docs` directory, or if you'd rather use a web based workflow you can click the "Edit this page" link at the bottom of each page on https://docs.qmk.fm/. When providing code examples in your documentation, try to observe naming conventions used elsewhere in the docs. For example, standardizing enums as `my_layers` or `my_keycodes` for consistency: diff --git a/docs/index.html b/docs/index.html index 8d03c6ede..9b33cd263 100644 --- a/docs/index.html +++ b/docs/index.html @@ -82,9 +82,9 @@ .replace('raw.githubusercontent.com', 'github.com') .replace(/\/master/, '/blob/master') } else { - url = 'https://github.com/qmk/qmk_firmware/blob/master/docs/' + vm.route.file + url = 'https://github.com/qmk/qmk_firmware/edit/master/docs/' + vm.route.file } - var editHtml = '[:memo: Edit Document](' + url + ')\n' + var editHtml = ':pencil2: [Edit this page](' + url + ')\n' return html + '\n\n----\n\n' + editHtml diff --git a/keyboards/atreus62/keymaps/d4mation/keymap.c b/keyboards/atreus62/keymaps/d4mation/keymap.c new file mode 100644 index 000000000..63b9d6142 --- /dev/null +++ b/keyboards/atreus62/keymaps/d4mation/keymap.c @@ -0,0 +1,196 @@ +#include QMK_KEYBOARD_H +#include "d4mation.h" + +enum layer_names { + _DVR, + _QWR, + _LOWER, + _RAISE, + _NUM, + _ADJUST +}; + +enum keymap_custom_keycodes { + LOWER = NEW_SAFE_RANGE, + RAISE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Default/Dvorak layer + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | / | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | ' | , | . | P | Y | | F | G | C | R | L | = | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | O | E | U | I |,------.,------.| D | H | T | N | S | - | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * |Shift | ; | Q | J | K | X ||Super ||Enter || B | M | W | V | Z | \ | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * | NUM | Alt | Home | End |Lower | Bksp |`------'`------'|Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------' `-----------------------------------------' + */ + + [_DVR] = LAYOUT( + _GRAVE_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLSH, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_EQL, + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + TD(SHIFT_CAPS), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_BSLS, + TG(_NUM), KC_RALT, KC_HOME, KC_END, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + + /* Qwerty layer, more "standard" for other people who may need to use my keyboard or for games where using Qwerty is just easier + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G |,------.,------.| H | J | K | L | ; | ' | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * |Shift | Z | X | C | V | B ||Super ||Enter || N | M | , | . | / | = | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * | NUM | Alt | Home | End |Lower | Bksp |`------'`------'|Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------' `-----------------------------------------' + */ + + [_QWR] = LAYOUT( + _GRAVE_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + TD(SHIFT_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_EQL, + TG(_NUM), KC_RALT, KC_HOME, KC_END, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + + /* "Lower" layer + * ,-----------------------------------------. ,-----------------------------------------. + * | F11 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | |SLEEP | | | | | SCRGB| | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | |,------.,------.| | | | { | } | | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * | | | | | | || || || | Mute | VolD | VolU | | | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * | | |PageUp|PgDown| | Del |`------'`------'| Ins | | | | | | + * `-----------------------------------------' `-----------------------------------------' + */ + + [_LOWER] = LAYOUT( + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, + _______, _______, _______, _______, SLEEP, _______, _______, _______, SCRGB, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, + _______, _______, KC_PGUP, KC_PGDN, _______, KC_DEL, _______, _______, KC_INS, _______, _______, _______, _______, _______ + ), + + /* "Raise" layer + * ,-----------------------------------------. ,-----------------------------------------. + * | F11 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | |<?php>| ?> | | | |ZALGO | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Shrug|Lenny |Magic |Disfac| |,------.,------.| | | | [ | ] | | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * | | Ameno| Tflip| Tput | | || || || | Prev | Play | Next | | | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * | | |PageUp|PgDown| | Del |`------'`------'| Ins | | | | | | + * `-----------------------------------------' `-----------------------------------------' + */ + + [_RAISE] = LAYOUT( + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, + _______, _______, PHPOPEN, PHPCLSE, _______, _______, ZALGO, _______, _______, _______, _______, _______, + _______, SHRUG, LENNY, MAGIC, DISFACE, _______, _______, _______, _______, KC_LBRC, KC_RBRC,_______, + _______, AMENO, TFLIP, TPUT, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, + _______, _______, KC_PGUP, KC_PGDN, _______, KC_DEL, _______, _______, KC_INS, _______, _______, _______, _______, _______ + ), + + /* "Numpad" layer + * ,-----------------------------------------. ,-----------------------------------------. + * | | | / | * | - | | | | | / | * | - | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | 7 | 8 | 9 | + | | | | 7 | 8 | 9 | + | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | 4 | 5 | 6 | + | |,------.,------.| | 4 | 5 | 6 | + | | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * | | 1 | 2 | 3 | Enter| || || || | 1 | 2 | 3 | Enter| | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * | | 0 | 0 | . | Enter| |`------'`------'| | 0 | 0 | . | Enter| | + * `-----------------------------------------' `-----------------------------------------' + */ + + [_NUM] = LAYOUT( + _______, _______, KC_PSLS, KC_PAST, KC_PMNS, _______, _______, _______, KC_PSLS, KC_PAST, KC_PMNS, _______, + _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, _______, + _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, + _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, + _______, KC_KP_0, KC_KP_0, KC_PDOT, KC_PENT, _______, _______, _______, _______, KC_KP_0, KC_KP_0, KC_PDOT, KC_PENT, _______ + ), + + /* "Adjust" layer, only active if both "Lower" and "Raise" are active at the same time + * All unused keys are blanked out for this layer + * ,-----------------------------------------. ,-----------------------------------------. + * | NO | NO | NO | NO | NO | NO | | NO | NO | NO | NO | NO | NO | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | NO |RESET | NO | NO | NO | NO | | NO | NO | NO | NO | NO | NO | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | NO | NO | NO |UC WIN|UC OSX| NO |,------.,------.| NO |Dvorak|Qwerty| NO | NO | NO | + * |------+------+------+------+------+------|| Swap || ||------+------+------+------+------+------| + * | NO | NO | NO | NO | NO | NO || to || Swap || NO | NO | NO | NO | NO | NO | + * |------+------+------+------+------+------|| Ctrl || Back ||------+------+------+------+------+------| + * | NO | NO | NO | NO | | NO |`------'`------'| NO | | NO | NO | NO | NO | + * `-----------------------------------------' `-----------------------------------------' + */ + + [_ADJUST] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, UC_M_WI, UC_M_OS, XXXXXXX, XXXXXXX, DF(_DVR),DF(_QWR),XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, CG_SWAP, CG_NORM, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + +}; + +/* Runs just one time when the keyboard initializes. */ +void eeconfig_init_keymap( void ) { + set_unicode_input_mode( UC_OSX ); +}; + +bool process_record_keymap( uint16_t keycode, keyrecord_t *record ) { + + switch ( keycode ) { + + case LOWER: + + if ( record->event.pressed ) { + layer_on( _LOWER ); + update_tri_layer( _LOWER, _RAISE, _ADJUST ); + } + else { + layer_off( _LOWER ); + update_tri_layer( _LOWER, _RAISE, _ADJUST ); + } + + return false; + break; + + case RAISE : + + if ( record->event.pressed ) { + layer_on( _RAISE ); + update_tri_layer( _LOWER, _RAISE, _ADJUST ); + } + else { + layer_off( _RAISE ); + update_tri_layer( _LOWER, _RAISE, _ADJUST ); + } + + return false; + break; + + } + + return true; + +};
\ No newline at end of file diff --git a/keyboards/atreus62/keymaps/d4mation/readme.md b/keyboards/atreus62/keymaps/d4mation/readme.md new file mode 100644 index 000000000..5642e8e43 --- /dev/null +++ b/keyboards/atreus62/keymaps/d4mation/readme.md @@ -0,0 +1,40 @@ +# d4mation's keymap for the Atreus62 + +This is a bit of a work in-progress, but for the most part I like what I have done here. + +I switched to Dvorak some time ago and software-based support in most OS's for Dvorak isn't very great, so this keymap by default is set to Dvorak. + +## Table of Contents + +* [Layers](#layers) + - [Base layer](#base) + - [Num](#num) + - [Lower](#lower) + - [Raise](#raise) + - [Adjust](#adjust) + +# Layers + +## Base + +* By default, this layer is Dvorak. But using the Adjust layer you can switch to Qwerty +* Double-tapping Shift enables and disables Caps Lock +* Quickly tapping the Grave accent key will output a Grave Accent, but holding it for 200ms will output the ESC key instead + +## Num + +This layer gets toggled off and on to place a numpad on both the left and right sides of the keyboard. + +## Lower + +This layer holds some handy shortcuts that I use often, like the screen grab shortcut and sleep shortcut in OS X. + +It also has quick access to {} as they are inaccessible in the base layer + +## Raise + +Aside from quick access to [] and Play/Pause/Next/Previous, this layer is mostly just goofy things I decided to program into the keyboard because I could. There's a bunch of [kaomoji](https://en.wikipedia.org/wiki/Emoticon#Japanese_style_(kaomoji))/"unicode smileys" and I added a toggle switch to enable a [Zalgo Text](https://zalgo.org/) mode. + +## Adjust + +This layer is a "here be dragons" layer. It can only be accessed by holding down the keys for Lower and Raise at the same time. I added exclusively keys that drastically transformed the keyboard's layout or function on this layer. The ability to switch to Qwerty is on this layer, a way to switch CTRL and CMD back and forth is on this layer, and a hotkey to enter bootloader mode also exists. diff --git a/keyboards/atreus62/keymaps/d4mation/rules.mk b/keyboards/atreus62/keymaps/d4mation/rules.mk new file mode 100644 index 000000000..517f2700e --- /dev/null +++ b/keyboards/atreus62/keymaps/d4mation/rules.mk @@ -0,0 +1,2 @@ +UNICODE_ENABLE = yes +TAP_DANCE_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/clueboard/60/config.h b/keyboards/clueboard/60/config.h index aa544c70b..f0e157ff1 100644 --- a/keyboards/clueboard/60/config.h +++ b/keyboards/clueboard/60/config.h @@ -47,7 +47,7 @@ * */ #define MATRIX_ROW_PINS { B0, B1, B2, A15, A10 } -#define MATRIX_COL_PINS { A2, A3, A6, B14, B15, A8, A9, A7, B3, B4, C14, C15, C13, B5, B6 } +#define MATRIX_COL_PINS { A2, A3, A6, B14, B15, A8, A9, A7, B3, B4, C15, C14, C13, B5, B6 } #define UNUSED_PINS { A0, A1, A9, B7, B8, B9, B10, B11, B12, B13 } #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/crkbd/keymaps/kidbrazil/README.md b/keyboards/crkbd/keymaps/kidbrazil/README.md new file mode 100644 index 000000000..28414860c --- /dev/null +++ b/keyboards/crkbd/keymaps/kidbrazil/README.md @@ -0,0 +1,52 @@ +# KidBrazil's custom CRKBD Layout + +![Crkbd](https://user-images.githubusercontent.com/736191/40575636-6fba63a4-6123-11e8-9ca0-3f990f1f9f4c.jpg) + +This is a simple layout that I use for both programming and gaming. It is very +closely based on the original CRKBD layout with some modifications to the +position of CTRL and SHIFT. + +## Layers +This keymap includes a total of 4 Layers: +- QWERTY +- NUMBERS +- SYMBOLS +- GAMING +- WEAPONS + +The first three layers are pretty self explanatory and follow closely the +default keymap for this keyboard. The magic really starts to happen with the +gaming layer. + +### Gaming Layer +The gaming layer can be toggled on/off from the SYMBOLS layer. Once on the +gaming layer it will stay there until you toggle it off again. The gaming layer +includes normal WASD and most of the keys FPS games use on the left hand. On the +right hand we have F1-F12 and a few other special keys for games that require +it. + +### Weapon +The weapon layer is a momentary layer that can only be reached from the gaming +layer. This layer preserves the left hand almost unchanged, except for when the +layer is activated the top row becomes NUM 1 - 6 for wepon selection. The right +hand is KC_TRNS the whole way so basically it is still the gaming layer. + +## Custom Font +This keymap includes a custom font for my LooseTransistor logo. It is fine if +you want to use it I certainly don't mind but if you want your own, just replace +the glcdfont file here and you should be fine. + +Alternatively you could remove the font config line from the config.h file so it +will use the default QMK one. + +## OLED +This Keymap is setup to use the newer OLED API. Some work has been done to +customize this with showing layer and USB information. I also tried my best to +get a dormant / sleep state going but it is hit or miss and often only works on +the master hand. + +### TODO +- Fix OLED and Backlight so they turn off when the computer sleeps, currently + only the left hand does that and the LEDs still stay on. +- Wait for Spit_common to be implemented in CRKBD and revisit the special color + layers and animations diff --git a/keyboards/crkbd/keymaps/kidbrazil/config.h b/keyboards/crkbd/keymaps/kidbrazil/config.h new file mode 100644 index 000000000..dd3f1a030 --- /dev/null +++ b/keyboards/crkbd/keymaps/kidbrazil/config.h @@ -0,0 +1,100 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako <wakojun@gmail.com> +Copyright 2015 Jack Humbert +Copyright 2019 Lucas Moreira + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +//#define SSD1306OLED + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 150 +#undef PRODUCT +#define PRODUCT CRKBD Loose Transistor Ed. + +#ifdef RGBLIGHT_ENABLE + //#undef RGBLED_NUM + //#define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_KNIGHT + //#define RGBLED_NUM 27 + #define RGBLIGHT_LIMIT_VAL 120 + #define RGBLIGHT_HUE_STEP 10 + #define RGBLIGHT_SAT_STEP 17 + #define RGBLIGHT_VAL_STEP 17 +#endif + +#ifdef RGB_MATRIX_ENABLE +//# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +// # 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_FRAMEBUFFER_EFFECTS +// # 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 RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. +# define RGB_MATRIX_HUE_STEP 8 +# define RGB_MATRIX_SAT_STEP 8 +# define RGB_MATRIX_VAL_STEP 8 +# define RGB_MATRIX_SPD_STEP 10 + +/* Disable the animations you don't want/need. You will need to disable a good number of these * + * because they take up a lot of space. Disable until you can successfully compile your firmware. */ +# define DISABLE_RGB_MATRIX_ALPHAS_MODS +# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +// # define DISABLE_RGB_MATRIX_BREATHING +# define DISABLE_RGB_MATRIX_CYCLE_ALL +# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN +# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define DISABLE_RGB_MATRIX_DUAL_BEACON +# define DISABLE_RGB_MATRIX_RAINBOW_BEACON +# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define DISABLE_RGB_MATRIX_RAINDROPS +# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define DISABLE_RGB_MATRIX_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 +#endif +#define OLED_FONT_H "keyboards/crkbd/keymaps/kidbrazil/glcdfont.c" +#define OLED_DISABLE_TIMEOUT diff --git a/keyboards/crkbd/keymaps/kidbrazil/glcdfont.c b/keyboards/crkbd/keymaps/kidbrazil/glcdfont.c new file mode 100644 index 000000000..a67c32924 --- /dev/null +++ b/keyboards/crkbd/keymaps/kidbrazil/glcdfont.c @@ -0,0 +1,243 @@ +// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. +// See gfxfont.h for newer custom bitmap font info. + +#ifndef FONT5X7_H +#define FONT5X7_H + +#ifdef __AVR__ + #include <avr/io.h> + #include <avr/pgmspace.h> +#elif defined(ESP8266) + #include <pgmspace.h> +#else + #define PROGMEM +#endif + +// Standard ASCII 5x7 font +const unsigned char font[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, + 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, + 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, + 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, + 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, + 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, + 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, + 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, + 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, + 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, + 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, + 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, + 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, + 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, + 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, + 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, + 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, + 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, + 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, + 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, + 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, + 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, + 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, + 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, + 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, + 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, + 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, + 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, + 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, + 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, + 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, + 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, + 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, + 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, + 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, + 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, + 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, + 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, + 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, + 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, + 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, + 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, + 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, + 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, + 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, + 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, + 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, + 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, + 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, + 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, + 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, + 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, + 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, + 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, + 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, + 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, + 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, + 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, + 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, + 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, + 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, + 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, + 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, + 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, + 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, + 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, + 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, + 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, + 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, + 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, + 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, + 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, + 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, + 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, + 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, + 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, + 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, + 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, + 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, + 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, + 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, + 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, + 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, + 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, + 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, + 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, + 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, + 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, + 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, + 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, + 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, + 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, + 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, + 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, + 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, + 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, + 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0x00, + 0xFC, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, + 0x02, 0xF9, 0x01, 0x01, 0x05, 0x09, + 0x11, 0x22, 0x06, 0xFE, 0xFE, 0xFE, + 0xFE, 0xFE, 0xFE, 0xFE, 0x46, 0x46, + 0x44, 0x44, 0x45, 0x44, 0x29, 0x28, + 0x2A, 0x28, 0x11, 0x13, 0x05, 0x07, + 0x05, 0x07, 0x05, 0x07, 0x05, 0x07, + 0xE5, 0xE7, 0xE5, 0x07, 0x05, 0x07, + 0x05, 0x07, 0x05, 0x07, 0x05, 0x07, + 0x85, 0xC7, 0xE5, 0xE7, 0xE5, 0xE7, + 0xE5, 0xE7, 0xE5, 0xC7, 0x85, 0x07, + 0x85, 0xC7, 0xE5, 0xE7, 0xE5, 0xE7, + 0xE5, 0xE7, 0xE5, 0xC7, 0x85, 0x07, + 0x85, 0xC7, 0xE5, 0xE7, 0xE5, 0xE7, + 0xE5, 0xE7, 0xE5, 0xE7, 0xE5, 0x07, + 0xE5, 0xE7, 0xE5, 0xE7, 0xE5, 0xE7, + 0xE5, 0xE7, 0xE5, 0xE7, 0xE5, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, + 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, + 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, + 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, + 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, + 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, + 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, + 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xE3, 0xC1, 0xC1, 0x00, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0x00, 0xFF, 0x00, 0x00, 0x80, 0x00, + 0x1C, 0x3E, 0x7F, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0x14, 0x14, 0x14, + 0x14, 0x14, 0x08, 0x08, 0x00, 0x00, + 0xFF, 0xFF, 0xFF, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, + 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0xBE, + 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, + 0xFF, 0xFF, 0xFF, 0xFF, 0x81, 0xBD, + 0x81, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, + 0x8F, 0x9F, 0x9C, 0x9C, 0x9C, 0x9C, + 0x9C, 0x9C, 0x9C, 0xFC, 0xF8, 0x00, + 0xFF, 0xFF, 0xFF, 0x9C, 0x9C, 0x9C, + 0x9C, 0x9C, 0x9C, 0x80, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, + 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, + 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, + 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, + 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, + 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, + 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, + 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x03, 0x07, 0x0F, + 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x00, + 0x1F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, + 0x20, 0x47, 0x48, 0x50, 0x40, 0x41, + 0x42, 0x24, 0x30, 0x3F, 0x3F, 0x3F, + 0x3F, 0x3F, 0x3F, 0x3F, 0x31, 0x31, + 0x11, 0x51, 0x11, 0x11, 0x4A, 0x0A, + 0x2A, 0x0A, 0x44, 0x64, 0x50, 0x70, + 0x50, 0x70, 0x50, 0x70, 0x50, 0x70, + 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, + 0x53, 0x73, 0x53, 0x73, 0x53, 0x70, + 0x50, 0x71, 0x53, 0x73, 0x53, 0x73, + 0x53, 0x73, 0x53, 0x71, 0x50, 0x70, + 0x50, 0x71, 0x53, 0x73, 0x53, 0x73, + 0x53, 0x73, 0x53, 0x71, 0x50, 0x70, + 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, + 0x53, 0x73, 0x53, 0x73, 0x51, 0x70, + 0x53, 0x73, 0x53, 0x73, 0x53, 0x73, + 0x53, 0x73, 0x53, 0x73, 0x53, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; +#endif // FONT5X7_H diff --git a/keyboards/crkbd/keymaps/kidbrazil/keymap.c b/keyboards/crkbd/keymaps/kidbrazil/keymap.c new file mode 100644 index 000000000..1086cce3a --- /dev/null +++ b/keyboards/crkbd/keymaps/kidbrazil/keymap.c @@ -0,0 +1,214 @@ +#include QMK_KEYBOARD_H + +// [Init Variables] ----------------------------------------------------------// +extern uint8_t is_master; +// Oled timer similar to Drashna's +static uint32_t oled_timer = 0; +// Boolean to store +bool eeprom_oled_enabled = false; + +// [CRKBD layers Init] -------------------------------------------------------// +enum crkbd_layers { + _QWERTY, + _NUM, + _SYM, + _GAME, + _WEAPON +}; + +// [Keymaps] -----------------------------------------------------------------// +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_BSPC, + LSFT_T(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_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + LGUI_T(KC_PGUP), MO(_NUM), KC_SPC, KC_ENT, MO(_SYM), LALT_T(KC_PGDN) + ), + + [_NUM] = 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, + LSFT_T(KC_TAB), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F12, KC_NO, + KC_LCTL, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_PGUP, KC_PGDN, KC_HOME, KC_END, KC_F11, KC_NO, + LGUI_T(KC_PGUP), KC_TRNS, KC_SPC, KC_ENT, KC_TRNS, LALT_T(KC_PGDN) + ), + + [_SYM] = LAYOUT( + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + LSFT_T(KC_TAB), RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV, + KC_LCTL, RGB_VAD, RGB_RMOD, RGB_HUD, RGB_SAD, TG(_GAME), KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD, + LGUI_T(KC_PGUP), KC_TRNS, KC_SPC, KC_ENT, KC_TRNS, LALT_T(KC_PGDN) + ), + + [_GAME] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_F7, KC_F8, KC_F9, KC_F10, KC_NO, KC_NO, + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_TRNS, KC_PGUP, KC_PGDN, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TAB, MO(_WEAPON), KC_SPC, KC_ENT, KC_TRNS, KC_NO + ), + + [_WEAPON] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_6, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_7, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TAB, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +//int RGB_current_mode; + +// [Process User Input] ------------------------------------------------------// +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // Use process_record_keymap to reset timer on keypress + if (record->event.pressed) { + #ifdef OLED_DRIVER_ENABLE + oled_timer = timer_read32(); + #endif + // Restore LEDs if they are enabled in eeprom + rgb_matrix_enable_noeeprom(); + } + return true; +} + +// [OLED Configuration] ------------------------------------------------------// +#ifdef OLED_DRIVER_ENABLE + +// Init Oled and Rotate.... +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!has_usb()) + return OLED_ROTATION_180; // flips the display 180 to see it from my side + return rotation; +} + +// Read logo from font file +const char *read_logo(void); + +// {OLED helpers} -----------------------------------------------// + +// Render Blank Space +void render_space(void) { + oled_write_ln_P(PSTR(" "), false); +} + +// Render separator lines for oled display +void render_separator(void) { + switch (get_highest_layer(layer_state)){ + case _GAME: + case _WEAPON: + oled_write_ln_P(PSTR("===================="), false); + break; + default: + oled_write_ln_P(PSTR("++++++++++++++++++++"), false); + } +} + +// Render current layer state +void render_layer_state(void){ + // If you want to change the display of OLED, you need to change here + switch (get_highest_layer(layer_state)){ + case _QWERTY: + oled_write_ln_P(PSTR("| MODE | QWRTY ]"), false); + break; + case _NUM: + oled_write_ln_P(PSTR("| MODE | NUMBERS ]"), false); + break; + case _SYM: + oled_write_ln_P(PSTR("| MODE | SYMBOLS ]"), false); + break; + case _GAME: + oled_write_ln_P(PSTR("| G A M E ]"), false); + break; + case _WEAPON: + oled_write_ln_P(PSTR("| W E A P O N ]"), false); + break; + default: + oled_write_ln_P(PSTR("| MODE | UNDEF ]"), false); + } +} + +// Render USB State +void render_usb_state(void) { + switch (USB_DeviceState) { + case DEVICE_STATE_Unattached: + oled_write_ln_P(PSTR("| USB | FREE ]"), false); + break; + case DEVICE_STATE_Suspended: + oled_write_ln_P(PSTR("| USB | SLEEP ]"), false); + break; + case DEVICE_STATE_Configured: + oled_write_ln_P(PSTR("| USB | READY ]"), false); + break; + case DEVICE_STATE_Powered: + oled_write_ln_P(PSTR("| USB | PWRD ]"), false); + break; + case DEVICE_STATE_Default: + oled_write_ln_P(PSTR("| USB | DFLT ]"), false); + break; + case DEVICE_STATE_Addressed: + oled_write_ln_P(PSTR("| USB | ADDRS ]"), false); + break; + default: + oled_write_ln_P(PSTR("| USB | INVALID ]"), false); + } +} + +// Render Logo +void render_logo(void) { + oled_write(read_logo(), false); +} + +// Master OLED Screen (Left Hand ) +void render_master_oled(void) { + // Switch display based on Layer + switch (get_highest_layer(layer_state)){ + case _GAME: + render_separator(); + render_layer_state(); + render_separator(); + render_separator(); + break; + case _WEAPON: + render_separator(); + render_separator(); + render_layer_state(); + render_separator(); + break; + default: + render_separator(); + render_layer_state(); + render_separator(); + render_usb_state(); + } +} + +// lave OLED scren (Right Hand) +void render_slave_oled(void) { + render_logo(); +} + +// {OLED Task} -----------------------------------------------// +void oled_task_user(void) { + // Drashna style timeout for LED and OLED Roughly 8mins + if (timer_elapsed32(oled_timer) > 480000) { + oled_off(); + rgb_matrix_disable_noeeprom(); + return; + } + else { + oled_on(); + } + // Show logo when USB dormant + switch (USB_DeviceState) { + case DEVICE_STATE_Unattached: + case DEVICE_STATE_Powered: + case DEVICE_STATE_Suspended: + render_logo(); + break; + default: + if (is_master) { + render_master_oled(); + } else { + render_slave_oled(); + } + } +} +#endif diff --git a/keyboards/crkbd/keymaps/kidbrazil/kidbrazil.json b/keyboards/crkbd/keymaps/kidbrazil/kidbrazil.json new file mode 100644 index 000000000..dd9895cce --- /dev/null +++ b/keyboards/crkbd/keymaps/kidbrazil/kidbrazil.json @@ -0,0 +1 @@ +{"keyboard":"crkbd/rev1","keymap":"kidbrazil","layout":"LAYOUT","layers":[["KC_ESC","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_Y","KC_U","KC_I","KC_O","KC_P","KC_BSPC","LCTL_T(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","LGUI_T(KC_PGUP)","MO(1)","KC_SPC","KC_ENT","MO(2)","LALT_T(KC_PGDN)"],["KC_ESC","KC_1","KC_2","KC_3","KC_4","KC_5","KC_6","KC_7","KC_8","KC_9","KC_0","KC_DEL","LCTL_T(KC_TAB)","KC_F1","KC_F2","KC_F3","KC_F4","KC_F5","KC_LEFT","KC_UP","KC_DOWN","KC_RGHT","KC_F12","KC_NO","KC_LSFT","KC_F6","KC_F7","KC_F8","KC_F9","KC_F10","KC_PGUP","KC_PGDN","KC_HOME","KC_END","KC_F11","KC_NO","LGUI_T(KC_PGUP)","KC_TRNS","KC_SPC","KC_ENT","KC_TRNS","LALT_T(KC_PGDN)"],["KC_ESC","KC_EXLM","KC_AT","KC_HASH","KC_DLR","KC_PERC","KC_CIRC","KC_AMPR","KC_ASTR","KC_LPRN","KC_RPRN","KC_BSPC","LCTL_T(KC_TAB)","RGB_TOG","RGB_MOD","RGB_HUI","RGB_SAI","RGB_VAI","KC_MINS","KC_EQL","KC_LCBR","KC_RCBR","KC_PIPE","KC_GRV","KC_LSFT","RGB_VAD","RGB_RMOD","RGB_HUD","RGB_SAD","TG(3)","KC_UNDS","KC_PLUS","KC_LBRC","KC_RBRC","KC_BSLS","KC_TILD","LGUI_T(KC_PGUP)","KC_TRNS","KC_SPC","KC_ENT","KC_TRNS","LALT_T(KC_PGDN)"],["KC_ESC","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_F1","KC_F2","KC_F3","KC_F4","KC_F5","KC_F6","KC_LSFT","KC_A","KC_S","KC_D","KC_F","KC_G","KC_F7","KC_F8","KC_F9","KC_F10","KC_NO","KC_NO","KC_LCTL","KC_Z","KC_X","KC_C","KC_V","KC_TRNS","KC_PGUP","KC_PGDN","KC_NO","KC_NO","KC_NO","KC_NO","KC_TAB","MO(4)","KC_SPC","KC_ENT","KC_TRNS","KC_NO"],["KC_ESC","KC_1","KC_2","KC_3","KC_4","KC_5","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_LSFT","KC_A","KC_S","KC_D","KC_F","KC_6","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_LCTL","KC_Z","KC_X","KC_C","KC_V","KC_7","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TAB","KC_TRNS","KC_SPC","KC_TRNS","KC_TRNS","KC_TRNS"]],"author":"","notes":""}
\ No newline at end of file diff --git a/keyboards/crkbd/keymaps/kidbrazil/logo_reader.c b/keyboards/crkbd/keymaps/kidbrazil/logo_reader.c new file mode 100644 index 000000000..1bc1503a6 --- /dev/null +++ b/keyboards/crkbd/keymaps/kidbrazil/logo_reader.c @@ -0,0 +1,11 @@ +#include "crkbd.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/crkbd/keymaps/kidbrazil/rules.mk b/keyboards/crkbd/keymaps/kidbrazil/rules.mk new file mode 100644 index 000000000..ad03b86bf --- /dev/null +++ b/keyboards/crkbd/keymaps/kidbrazil/rules.mk @@ -0,0 +1,17 @@ +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +MOUSEKEY_ENABLE = no +RGBLIGHT_ENABLE = no +RGB_MATRIX_ENABLE = WS2812 +OLED_DRIVER_ENABLE = yes + +# If you want to change the display of OLED, you need to change here +SRC += ./keyboards/crkbd/keymaps/kidbrazil/logo_reader.c \ + #./lib/rgb_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/fluorite/readme.md b/keyboards/fluorite/readme.md index 959b2443f..d55252c94 100644 --- a/keyboards/fluorite/readme.md +++ b/keyboards/fluorite/readme.md @@ -6,7 +6,7 @@ Fluorite is a chaotic keyboard consisting of staggered rows, staggered columns, and ortholinear. -* Keyboard Maintainer: [mahuyu ihotsuno](https://github.com/ihotsuno) [@ihotsuno](https://twitter.com/ihotsuno) +* Keyboard Maintainer: [mafuyu ihotsuno](https://github.com/ihotsuno) [@ihotsuno](https://twitter.com/ihotsuno) * Hardware Supported: fluorite CXL PCB, ProMicro * Hardware Availability: [ten key](https://tenkey.connpass.com/), [booth.pm](https://ihotsuno.booth.pm/) diff --git a/keyboards/gray_studio/think65/solder/info.json b/keyboards/gray_studio/think65/solder/info.json index 0be504253..cc87af41b 100644 --- a/keyboards/gray_studio/think65/solder/info.json +++ b/keyboards/gray_studio/think65/solder/info.json @@ -77,7 +77,77 @@ {"label":"K4F (E6,F6)", "x":15, "y":4} ] }, - + "LAYOUT_65_iso_badge": { + "key_count": 66, + "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":"K0F", "x":15, "y":0}, + {"label":"K10", "x":0, "y":1, "w":1.5}, + {"label":"K12", "x":1.5, "y":1}, + {"label":"K13", "x":2.5, "y":1}, + {"label":"K14", "x":3.5, "y":1}, + {"label":"K15", "x":4.5, "y":1}, + {"label":"K16", "x":5.5, "y":1}, + {"label":"K17", "x":6.5, "y":1}, + {"label":"K18", "x":7.5, "y":1}, + {"label":"K19", "x":8.5, "y":1}, + {"label":"K1A", "x":9.5, "y":1}, + {"label":"K1B", "x":10.5, "y":1}, + {"label":"K1C", "x":11.5, "y":1}, + {"label":"K1D", "x":12.5, "y":1}, + {"label":"K1F", "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":"K1E", "x":12.75, "y":2}, + {"label":"K2D", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"K30", "x":0, "y":3, "w":1.25}, + {"label":"K31", "x":1.25, "y":3}, + {"label":"K32", "x":2.25, "y":3}, + {"label":"K33", "x":3.25, "y":3}, + {"label":"K34", "x":4.25, "y":3}, + {"label":"K35", "x":5.25, "y":3}, + {"label":"K36", "x":6.25, "y":3}, + {"label":"K37", "x":7.25, "y":3}, + {"label":"K38", "x":8.25, "y":3}, + {"label":"K39", "x":9.25, "y":3}, + {"label":"K3A", "x":10.25, "y":3}, + {"label":"K3B", "x":11.25, "y":3}, + {"label":"K3D", "x":12.25, "y":3, "w":1.75}, + {"label":"K3E", "x":14, "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":"K4A", "x":10, "y":4, "w":1.25}, + {"label":"K4B", "x":11.25, "y":4, "w":1.25}, + {"label":"K4D", "x":13, "y":4}, + {"label":"K4E", "x":14, "y":4}, + {"label":"K4F", "x":15, "y":4} + ] + }, "LAYOUT_all": { "key_count": 69, "layout": [ @@ -154,4 +224,4 @@ } } ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" -}
\ No newline at end of file +} diff --git a/keyboards/gray_studio/think65/solder/keymaps/rys/keymap.c b/keyboards/gray_studio/think65/solder/keymaps/rys/keymap.c new file mode 100644 index 000000000..658798ed6 --- /dev/null +++ b/keyboards/gray_studio/think65/solder/keymaps/rys/keymap.c @@ -0,0 +1,271 @@ +/* Copyright 2019 Rys Sommefeldt + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +/* + * LED ranges + * ┌─────────────┬─────────────┬───────────────────────────────────────────┐ + * │ 00 01 02 03 │ 04 05 06 07 │ 08 09 10 11 12 13 14 15 16 17 18 19 20 21 │ + * │ escape │ badge │ underglow │ + * └─────────────┴─────────────┴───────────────────────────────────────────┘ + */ + +// Define the LED ranges start, end +#define THINK65_LED_RANGE_OFF 0, 0 +#define THINK65_LED_RANGE_ESC 0, 4 +#define THINK65_LED_RANGE_BADGE 4, 8 +#define THINK65_LED_RANGE_UNDERGLOW 8, 22 +#define THINK65_LED_RANGE_ALL 0, 22 + +// Turn the LEDs off by setting HSV to 0, 0, 0 +#define THINK65_LEDS_OFF 0, 0, 0 + +// There are 3 ranges, so we can store all combinations in 2^3 values +// Define all of them to make it easier to write the cycling code +#define THINK65_LED_STATE_OFF 0x0 // 0b00000000 +#define THINK65_LED_STATE_ESC 0x1 // 0b00000001 +#define THINK65_LED_STATE_BADGE 0x2 // 0b00000010 +#define THINK65_LED_STATE_UNDERGLOW 0x4 // 0b00000100 +#define THINK65_LED_STATE_ESC_AND_BADGE 0x3 // 0b00000011 +#define THINK65_LED_STATE_ESC_AND_UNDERGLOW 0x5 // 0b00000101 +#define THINK65_LED_STATE_BADGE_AND_UNDERGLOW 0x6 // 0b00000110 +#define THINK65_LED_STATE_ON 0x7 // 0b00000111 + +// Define each LED range as a bit flag +#define THINK65_LED_ESC_RANGE_BIT 0 +#define THINK65_LED_BADGE_RANGE_BIT 1 +#define THINK65_LED_UNDERGLOW_RANGE_BIT 2 + +// Setup some keycodes to control cycling and range toggling +enum rys_keycodes { + CYC_LED = SAFE_RANGE, + TOG_ESC, + TOG_BDG, + TOG_UGL +}; + +// setup the user EEPROM space we need +typedef union { + uint8_t raw; + struct { + uint8_t current_led_state:8; + }; +} user_config_t; + +user_config_t user_config; + +// toggle one of the range flag bits +void toggle_led_state(unsigned int led_range) { + if (led_range >= THINK65_LED_ESC_RANGE_BIT && led_range <= THINK65_LED_UNDERGLOW_RANGE_BIT) { + user_config.current_led_state ^= 1 << led_range; + } +} + +// set one of the range flag bits +void set_led_state(unsigned int led_range) { + if (led_range >= THINK65_LED_ESC_RANGE_BIT && led_range <= THINK65_LED_UNDERGLOW_RANGE_BIT) { + user_config.current_led_state |= 1 << led_range; + } +} + +// clear one of the range flag bits +void clear_led_state(unsigned int led_range) { + if (led_range >= THINK65_LED_ESC_RANGE_BIT && led_range <= THINK65_LED_UNDERGLOW_RANGE_BIT) { + user_config.current_led_state &= ~(1 << led_range); + } +} + +// cycle LED states: Off -> Esc -> Badge -> Underglow -> Esc+Badge -> Esc+Underglow -> Badge+Underglow -> All +void cycle_led_state(void) { + switch(user_config.current_led_state) { + case THINK65_LED_STATE_OFF: + user_config.current_led_state = THINK65_LED_STATE_ESC; + break; + case THINK65_LED_STATE_ESC: + user_config.current_led_state = THINK65_LED_STATE_BADGE; + break; + case THINK65_LED_STATE_BADGE: + user_config.current_led_state = THINK65_LED_STATE_UNDERGLOW; + break; + case THINK65_LED_STATE_UNDERGLOW: + user_config.current_led_state = THINK65_LED_STATE_ESC_AND_BADGE; + break; + case THINK65_LED_STATE_ESC_AND_BADGE: + user_config.current_led_state = THINK65_LED_STATE_ESC_AND_UNDERGLOW; + break; + case THINK65_LED_STATE_ESC_AND_UNDERGLOW: + user_config.current_led_state = THINK65_LED_STATE_BADGE_AND_UNDERGLOW; + break; + case THINK65_LED_STATE_BADGE_AND_UNDERGLOW: + user_config.current_led_state = THINK65_LED_STATE_ON; + break; + case THINK65_LED_STATE_ON: + user_config.current_led_state = THINK65_LED_STATE_OFF; + break; + default: + break; + } +} + +void apply_led_state(void) { + uint8_t h = rgblight_get_hue(); + uint8_t s = rgblight_get_sat(); + uint8_t v = rgblight_get_val(); + + // Set the RGB ranges based on the current state + switch(user_config.current_led_state) { + case THINK65_LED_STATE_OFF: + rgblight_sethsv_range(THINK65_LEDS_OFF, THINK65_LED_RANGE_ALL); + break; + case THINK65_LED_STATE_ESC: + rgblight_sethsv_range(h, s, v, THINK65_LED_RANGE_ESC); + rgblight_sethsv_range(THINK65_LEDS_OFF, THINK65_LED_RANGE_BADGE); + rgblight_sethsv_range(THINK65_LEDS_OFF, THINK65_LED_RANGE_UNDERGLOW); + break; + case THINK65_LED_STATE_BADGE: + rgblight_sethsv_range(THINK65_LEDS_OFF, THINK65_LED_RANGE_ESC); + rgblight_sethsv_range(h, s, v, THINK65_LED_RANGE_BADGE); + rgblight_sethsv_range(THINK65_LEDS_OFF, THINK65_LED_RANGE_UNDERGLOW); + break; + case THINK65_LED_STATE_UNDERGLOW: + rgblight_sethsv_range(THINK65_LEDS_OFF, THINK65_LED_RANGE_ESC); + rgblight_sethsv_range(THINK65_LEDS_OFF, THINK65_LED_RANGE_BADGE); + rgblight_sethsv_range(h, s, v, THINK65_LED_RANGE_UNDERGLOW); + break; + case THINK65_LED_STATE_ESC_AND_BADGE: + rgblight_sethsv_range(h, s, v, THINK65_LED_RANGE_ESC); + rgblight_sethsv_range(h, s, v, THINK65_LED_RANGE_BADGE); + rgblight_sethsv_range(THINK65_LEDS_OFF, THINK65_LED_RANGE_UNDERGLOW); + break; + case THINK65_LED_STATE_ESC_AND_UNDERGLOW: + rgblight_sethsv_range(h, s, v, THINK65_LED_RANGE_ESC); + rgblight_sethsv_range(THINK65_LEDS_OFF, THINK65_LED_RANGE_BADGE); + rgblight_sethsv_range(h, s, v, THINK65_LED_RANGE_UNDERGLOW); + break; + case THINK65_LED_STATE_BADGE_AND_UNDERGLOW: + rgblight_sethsv_range(THINK65_LEDS_OFF, THINK65_LED_RANGE_ESC); + rgblight_sethsv_range(h, s, v, THINK65_LED_RANGE_BADGE); + rgblight_sethsv_range(h, s, v, THINK65_LED_RANGE_UNDERGLOW); + break; + case THINK65_LED_STATE_ON: + rgblight_sethsv_range(h, s, v, THINK65_LED_RANGE_ALL); + break; + default: + break; + } +} + +void keyboard_post_init_user(void) { + user_config.raw = eeconfig_read_user(); + + if (user_config.current_led_state >= THINK65_LED_STATE_OFF && user_config.current_led_state <= THINK65_LED_STATE_ON) { + // If the current state read from user EEPROM is valid, apply it + apply_led_state(); + } else { + // Setup a new default state of off + user_config.current_led_state = THINK65_LED_STATE_OFF; + apply_led_state(); + eeconfig_update_user(user_config.raw); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case CYC_LED: + if (record->event.pressed) { + cycle_led_state(); + apply_led_state(); + eeconfig_update_user(user_config.raw); + } + break; + case TOG_ESC: + if (record->event.pressed) { + toggle_led_state(THINK65_LED_ESC_RANGE_BIT); + apply_led_state(); + eeconfig_update_user(user_config.raw); + } + break; + case TOG_BDG: + if (record->event.pressed) { + toggle_led_state(THINK65_LED_BADGE_RANGE_BIT); + apply_led_state(); + eeconfig_update_user(user_config.raw); + } + break; + case TOG_UGL: + if (record->event.pressed) { + toggle_led_state(THINK65_LED_UNDERGLOW_RANGE_BIT); + apply_led_state(); + eeconfig_update_user(user_config.raw); + } + break; + case KC_CAPS: + if (!record->event.pressed) { + // connect capslock LED control to the badge LEDs + host_keyboard_led_state().caps_lock ? set_led_state(THINK65_LED_BADGE_RANGE_BIT) : clear_led_state(THINK65_LED_BADGE_RANGE_BIT); + apply_led_state(); + eeconfig_update_user(user_config.raw); + } + break; + default: + break; + } + return true; +} + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_65_iso_badge( + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ ` │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ Ent├───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┤ │ + * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ ↑ │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │Ctrl│LAlt│GUI │ Spaaaaaaace │RAlt│ L1 │ │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_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_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_65_iso_badge( + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │RST│ F1│ F2│ F3│ F4│ F5│ F6│ F7│ F8│ F9│F10│F11│F12│ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ TOG │PLN│MOD│HU+│HU-│SA+│SA-│VA+│VA-│ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┤ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │CYC│ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ESC│BDG│UGL│ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + 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, _______, _______, + RGB_TOG, RGB_M_P, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CYC_LED, + _______, _______, _______, _______, _______, _______, TOG_ESC, TOG_BDG, TOG_UGL + ), + +}; diff --git a/keyboards/gray_studio/think65/solder/keymaps/rys/readme.md b/keyboards/gray_studio/think65/solder/keymaps/rys/readme.md new file mode 100644 index 000000000..ed73e3064 --- /dev/null +++ b/keyboards/gray_studio/think65/solder/keymaps/rys/readme.md @@ -0,0 +1,11 @@ +# Personal keymap for the Think 6.5 with compatible soldered PCB + +The layout is UK ISO with some small personal tweaks. + +The LED cycling code is based on code posted to the Gray Studio Discord by `MudkipMao` on Nov 22nd 2019. Thanks! + +## LED cycling + +This map saves and restores your current active LED group choice to user EEPROM and restores it on keyboard init, which you can cycle through all combinations of, or toggle individually. + +The cycle is `Off -> Esc -> Badge -> Underglow -> Esc+Badge -> Esc+Underglow -> Badge+Underglow -> All`. Look at the keymap for the controls on layer 1. diff --git a/keyboards/gray_studio/think65/solder/solder.h b/keyboards/gray_studio/think65/solder/solder.h index b77cc578b..19ee55125 100644 --- a/keyboards/gray_studio/think65/solder/solder.h +++ b/keyboards/gray_studio/think65/solder/solder.h @@ -45,5 +45,19 @@ { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, KC_NO, K4D, K4E, K4F }, \ } +#define LAYOUT_65_iso_badge( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0F, \ + K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K1E, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ + K40, K41, K43, K46, K4A, K4B, K4D, K4E, K4F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO, K0F }, \ + { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, KC_NO }, \ + { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, KC_NO, K4D, K4E, K4F }, \ +} + // generated by KBFirmware JSON to QMK Parser -// https://noroadsleft.github.io/kbf_qmk_converter/
\ No newline at end of file +// https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/pico/rev1/rev1.c b/keyboards/pico/65keys/65keys.c index e69de29bb..e69de29bb 100644 --- a/keyboards/pico/rev1/rev1.c +++ b/keyboards/pico/65keys/65keys.c diff --git a/keyboards/pico/rev1/rev1.h b/keyboards/pico/65keys/65keys.h index 61e32efd2..61e32efd2 100644 --- a/keyboards/pico/rev1/rev1.h +++ b/keyboards/pico/65keys/65keys.h diff --git a/keyboards/pico/rev1/config.h b/keyboards/pico/65keys/config.h index ab2202525..ab2202525 100644 --- a/keyboards/pico/rev1/config.h +++ b/keyboards/pico/65keys/config.h diff --git a/keyboards/pico/info.json b/keyboards/pico/65keys/info.json index c5c9c8a85..c5c9c8a85 100644 --- a/keyboards/pico/info.json +++ b/keyboards/pico/65keys/info.json diff --git a/keyboards/pico/keymaps/default/config.h b/keyboards/pico/65keys/keymaps/default/config.h index 5cbe7609a..5cbe7609a 100644 --- a/keyboards/pico/keymaps/default/config.h +++ b/keyboards/pico/65keys/keymaps/default/config.h diff --git a/keyboards/pico/keymaps/default/keymap.c b/keyboards/pico/65keys/keymaps/default/keymap.c index 17076f20c..17076f20c 100644 --- a/keyboards/pico/keymaps/default/keymap.c +++ b/keyboards/pico/65keys/keymaps/default/keymap.c diff --git a/keyboards/pico/keymaps/default/readme.md b/keyboards/pico/65keys/keymaps/default/readme.md index 9f8fa53eb..9f8fa53eb 100644 --- a/keyboards/pico/keymaps/default/readme.md +++ b/keyboards/pico/65keys/keymaps/default/readme.md diff --git a/keyboards/pico/keymaps/jis/config.h b/keyboards/pico/65keys/keymaps/jis/config.h index 5cbe7609a..5cbe7609a 100644 --- a/keyboards/pico/keymaps/jis/config.h +++ b/keyboards/pico/65keys/keymaps/jis/config.h diff --git a/keyboards/pico/keymaps/jis/keymap.c b/keyboards/pico/65keys/keymaps/jis/keymap.c index a3d260661..a3d260661 100644 --- a/keyboards/pico/keymaps/jis/keymap.c +++ b/keyboards/pico/65keys/keymaps/jis/keymap.c diff --git a/keyboards/pico/keymaps/jis/readme.md b/keyboards/pico/65keys/keymaps/jis/readme.md index 49d2aa7b7..49d2aa7b7 100644 --- a/keyboards/pico/keymaps/jis/readme.md +++ b/keyboards/pico/65keys/keymaps/jis/readme.md diff --git a/keyboards/pico/rev1/rules.mk b/keyboards/pico/65keys/rules.mk index e69de29bb..e69de29bb 100644 --- a/keyboards/pico/rev1/rules.mk +++ b/keyboards/pico/65keys/rules.mk diff --git a/keyboards/pico/70keys/70keys.c b/keyboards/pico/70keys/70keys.c new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/keyboards/pico/70keys/70keys.c diff --git a/keyboards/pico/70keys/70keys.h b/keyboards/pico/70keys/70keys.h new file mode 100644 index 000000000..67f7161ca --- /dev/null +++ b/keyboards/pico/70keys/70keys.h @@ -0,0 +1,24 @@ +#pragma once + +#include "pico.h" +#include "quantum.h" + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ +) \ +{ \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R00, R01, R02, R03, R04, R05, R06 }, \ + { R10, R11, R12, R13, R14, R15, R16 }, \ + { R20, R21, R22, R23, R24, R25, R26 }, \ + { R30, R31, R32, R33, R34, R35, R36 }, \ + { R40, R41, R42, R43, R44, R45, R46 } \ +} diff --git a/keyboards/pico/70keys/config.h b/keyboards/pico/70keys/config.h new file mode 100644 index 000000000..4e5ba0db4 --- /dev/null +++ b/keyboards/pico/70keys/config.h @@ -0,0 +1,91 @@ +/* Copyright 2019 Kumao Kobo <kumaokobo@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 <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x9692 +#define DEVICE_VER 0x0101 +#define MANUFACTURER Kumao Kobo +#define PRODUCT Pico Keyboard +#define DESCRIPTION Split row staggered 5x7 keyboard (using kailh mid-height) + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5} //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D0 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#undef RGBLED_NUM +#define RGBLED_NUM 14 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 diff --git a/keyboards/pico/70keys/info.json b/keyboards/pico/70keys/info.json new file mode 100644 index 000000000..4c87ab369 --- /dev/null +++ b/keyboards/pico/70keys/info.json @@ -0,0 +1,81 @@ +{ + "keyboard_name": "Pico Keyboard", + "url": "https://github.com/kumaokobo/pico-keyboard/", + "maintainer": "Kumao Kobo", + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"~", "x":1, "y":0}, + {"label":"1", "x":2, "y":0}, + {"label":"2", "x":3, "y":0}, + {"label":"3", "x":4, "y":0}, + {"label":"4", "x":5, "y":0}, + {"label":"5", "x":6, "y":0}, + {"label":"6", "x":9, "y":0}, + {"label":"7", "x":10, "y":0}, + {"label":"8", "x":11, "y":0}, + {"label":"9", "x":12, "y":0}, + {"label":"0", "x":13, "y":0}, + {"label":"-", "x":14, "y":0}, + {"label":"\u2190", "x":15, "y":0}, + {"label":"Tab", "x":0.25, "y":1}, + {"label":"Tab", "x":1.25, "y":1}, + {"label":"Q", "x":2.25, "y":1}, + {"label":"W", "x":3.25, "y":1}, + {"label":"E", "x":4.25, "y":1}, + {"label":"R", "x":5.25, "y":1}, + {"label":"T", "x":6.25, "y":1}, + {"label":"Y", "x":9.25, "y":1}, + {"label":"U", "x":10.25, "y":1}, + {"label":"I", "x":11.25, "y":1}, + {"label":"O", "x":12.25, "y":1}, + {"label":"P", "x":13.25, "y":1}, + {"label":"[", "x":14.25, "y":1}, + {"label":"]", "x":15.25, "y":1}, + {"label":"Ctrl", "x":0.5, "y":2}, + {"label":"Ctrl", "x":1.5, "y":2}, + {"label":"A", "x":2.5, "y":2}, + {"label":"S", "x":3.5, "y":2}, + {"label":"D", "x":4.5, "y":2}, + {"label":"F", "x":5.5, "y":2}, + {"label":"G", "x":6.5, "y":2}, + {"label":"H", "x":9.5, "y":2}, + {"label":"J", "x":10.5, "y":2}, + {"label":"K", "x":11.5, "y":2}, + {"label":"L", "x":12.5, "y":2}, + {"label":";", "x":13.5, "y":2}, + {"label":"'", "x":14.5, "y":2}, + {"label":"Enter", "x":15.5, "y":2}, + {"label":"Shift", "x":0.75, "y":3}, + {"label":"Shift", "x":1.75, "y":3}, + {"label":"Z", "x":2.75, "y":3}, + {"label":"X", "x":3.75, "y":3}, + {"label":"C", "x":4.75, "y":3}, + {"label":"V", "x":5.75, "y":3}, + {"label":"B", "x":6.75, "y":3}, + {"label":"N", "x":9.75, "y":3}, + {"label":"M", "x":10.75, "y":3}, + {"label":",", "x":11.75, "y":3}, + {"label":".", "x":12.75, "y":3}, + {"label":"/", "x":13.75, "y":3}, + {"label":"\u2191", "x":14.75, "y":3}, + {"label":"Shift", "x":15.75, "y":3}, + {"label":"Alt", "x":1, "y":4}, + {"label":"Alt", "x":2, "y":4}, + {"label":"Enter", "x":3, "y":4}, + {"label":"Del", "x":4, "y":4}, + {"label":"GUI", "x":5, "y":4}, + {"label":"LANG2", "x":6, "y":4}, + {"label":"Space", "x":7, "y":4}, + {"label":"Space", "x":10, "y":4}, + {"label":"LANG1", "x":11, "y":4}, + {"label":"GUI", "x":12, "y":4}, + {"label":"Del", "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/pico/70keys/keymaps/default/keymap.c b/keyboards/pico/70keys/keymaps/default/keymap.c new file mode 100644 index 000000000..9b9ae30da --- /dev/null +++ b/keyboards/pico/70keys/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +#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 _QWERTY 0 +#define _SYMB 1 + +// Shortcut to make keymap more readable +#define SYM_L MO(_SYMB) +#define KC_ALES LALT_T(KC_ESC) +#define KC_L1SYM LT(_SYMB, KC_LANG1) +#define KC_L2SYM LT(_SYMB, KC_LANG2) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + KC_ESC ,KC_GRV ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS ,KC_BSPC , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB ,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_LCTL ,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_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_UP ,KC_RSFT , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + KC_ALES ,KC_ALES ,KC_ENT ,KC_DEL ,KC_LGUI ,KC_L2SYM,KC_SPC , KC_SPC ,KC_L1SYM,KC_RGUI ,KC_DEL ,KC_LEFT ,KC_DOWN ,KC_RGHT + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_SYMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,_______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , KC_LPRN ,KC_RPRN ,KC_PIPE ,KC_ASTR ,KC_TILD ,KC_JYEN ,KC_BSLS , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , KC_LBRC ,KC_RBRC ,KC_DOT ,KC_SLSH ,KC_GRV ,KC_MINS ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┬────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , KC_LCBR ,KC_RCBR ,_______ ,_______ ,_______ ,KC_CIRC ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,KC_LT ,KC_UNDS ,KC_GT + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ) + +}; diff --git a/keyboards/pico/70keys/keymaps/default/readme.md b/keyboards/pico/70keys/keymaps/default/readme.md new file mode 100644 index 000000000..0b9a978d7 --- /dev/null +++ b/keyboards/pico/70keys/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default keymap for Pico Keyboard 70 keys + +![Pico Layout Image](https://raw.githubusercontent.com/kumaokobo/pico-keyboard/master/img/pico-layout-70keys.png) diff --git a/keyboards/pico/70keys/keymaps/jis/keymap.c b/keyboards/pico/70keys/keymaps/jis/keymap.c new file mode 100644 index 000000000..73109245e --- /dev/null +++ b/keyboards/pico/70keys/keymaps/jis/keymap.c @@ -0,0 +1,47 @@ +#include QMK_KEYBOARD_H +#include"keymap_jp.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 _QWERTY 0 +#define _SYMB 1 + +// Shortcut to make keymap more readable +#define SYM_L MO(_SYMB) +#define KC_ALES LALT_T(KC_ESC) +#define KC_L1SYM LT(_SYMB, KC_LANG1) +#define KC_L2SYM LT(_SYMB, KC_LANG2) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + KC_GRV ,KC_ESC ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS ,KC_BSPC , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB ,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_CIRC , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LCTL ,KC_LCTL ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,JP_COLN ,KC_ENT , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┬────────┤ + KC_LSFT ,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_RSFT , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + KC_ALES ,KC_ALES ,KC_ENT ,KC_DEL ,KC_LGUI ,KC_L2SYM,KC_SPC , KC_SPC ,KC_L1SYM,KC_RGUI ,KC_DEL ,KC_LEFT ,KC_DOWN ,KC_RGHT + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_SYMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,_______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , KC_LPRN ,KC_RPRN ,KC_PIPE ,JP_YEN ,JP_TILD ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , KC_LBRC ,KC_RBRC ,KC_DOT ,KC_SLSH ,JP_GRV ,KC_MINS ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┬────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , KC_LCBR ,KC_RCBR ,_______ ,_______ ,_______ ,JP_UNDS ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,KC_LT ,_______ ,KC_GT + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ) + +}; diff --git a/keyboards/pico/70keys/keymaps/jis/readme.md b/keyboards/pico/70keys/keymaps/jis/readme.md new file mode 100644 index 000000000..dda39dfb8 --- /dev/null +++ b/keyboards/pico/70keys/keymaps/jis/readme.md @@ -0,0 +1,3 @@ +# The JIS-like keymap for Pico Keyboard 70 keys + +![Pico JIS like Layout Image](https://raw.githubusercontent.com/kumaokobo/pico-keyboard/master/img/pico-jis-like-layout-70keys.png) diff --git a/keyboards/pico/70keys/rules.mk b/keyboards/pico/70keys/rules.mk new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/keyboards/pico/70keys/rules.mk diff --git a/keyboards/pico/pico.h b/keyboards/pico/pico.h index 246ed8755..72024efd8 100644 --- a/keyboards/pico/pico.h +++ b/keyboards/pico/pico.h @@ -16,8 +16,11 @@ #pragma once -#ifdef KEYBOARD_pico_rev1 - #include "rev1.h" +#ifdef KEYBOARD_pico_65keys + #include "65keys.h" +#endif +#ifdef KEYBOARD_pico_70keys + #include "70keys.h" #endif #include "quantum.h" diff --git a/keyboards/pico/readme.md b/keyboards/pico/readme.md index 26bbf1da2..891bb174f 100644 --- a/keyboards/pico/readme.md +++ b/keyboards/pico/readme.md @@ -1,9 +1,5 @@ # Pico keyboard -<p align="center"> - <img src="https://raw.githubusercontent.com/kumaokobo/pico-keyboard/master/img/pico-keyboard.jpg" alt="Pico Keyboard rev1.0" width="600"/> -</p> - A split keyboard kit designed for small hands. Pico adopted the footprint for [Kailh Mid-Height](http://www.kailh.com/en/Products/Ks/KHS/) smaller than Cherry MX compatible switches. @@ -12,6 +8,17 @@ Pico adopted the footprint for [Kailh Mid-Height](http://www.kailh.com/en/Produc Make example for this keyboard (after setting up your build environment): - make pico/rev1:default + make pico/65keys:default + +## 65 keys +<p align="center"> + <img src="https://raw.githubusercontent.com/kumaokobo/pico-keyboard/master/img/pico-keyboard.jpg" alt="Pico Keyboard 65 keys" width="600"/> +</p> + +## 70 keys +<p align="center"> + <img src="https://raw.githubusercontent.com/kumaokobo/pico-keyboard/master/img/pico-keyboard2.jpg" alt="Pico Keyboard 70 keys" width="600"/> +</p> + 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/pico/rules.mk b/keyboards/pico/rules.mk index fc6ad1e7e..0e044b676 100644 --- a/keyboards/pico/rules.mk +++ b/keyboards/pico/rules.mk @@ -33,4 +33,4 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SPLIT_KEYBOARD = yes -DEFAULT_FOLDER = pico/rev1 +DEFAULT_FOLDER = pico/65keys diff --git a/layouts/community/60_ansi_split_bs_rshift/yanfali/keymap.c b/layouts/community/60_ansi_split_bs_rshift/yanfali/keymap.c index 73d6789c1..5e5d16390 100644 --- a/layouts/community/60_ansi_split_bs_rshift/yanfali/keymap.c +++ b/layouts/community/60_ansi_split_bs_rshift/yanfali/keymap.c @@ -13,7 +13,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ LCTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_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(YFL), \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RGUI, KC_RALT, MO(FN), KC_RCTL), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPACE, KC_RGUI, KC_RALT, MO(FN), KC_RCTL), [FN] = LAYOUT_60_ansi_split_bs_rshift( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, \ @@ -15,7 +15,7 @@ This is a keyboard firmware based on the [tmk\_keyboard firmware](https://github The docs are powered by [Docsify](https://docsify.js.org/) and hosted on [GitHub](/docs/). They are also viewable offline; see [Previewing the Documentation](https://docs.qmk.fm/#/contributing?id=previewing-the-documentation) for more details. -You can request changes by making a fork and opening a [pull request](https://github.com/qmk/qmk_firmware/pulls), or by clicking the "Edit Document" link at the bottom of any page. +You can request changes by making a fork and opening a [pull request](https://github.com/qmk/qmk_firmware/pulls), or by clicking the "Edit this page" link at the bottom of any page. ## Supported Keyboards diff --git a/users/d4mation/config.h b/users/d4mation/config.h new file mode 100644 index 000000000..3140a036f --- /dev/null +++ b/users/d4mation/config.h @@ -0,0 +1 @@ +#define FORCE_NKRO
\ No newline at end of file diff --git a/users/d4mation/d4mation.c b/users/d4mation/d4mation.c new file mode 100644 index 000000000..5aa58a9f0 --- /dev/null +++ b/users/d4mation/d4mation.c @@ -0,0 +1,37 @@ +#include "d4mation.h" + +__attribute__ ((weak)) +bool process_record_keymap( uint16_t keycode, keyrecord_t *record ) { + /* If you want macros specific to your keymap, you need to define this function in your keymap */ + return true; +} + +__attribute__ ((weak)) +void matrix_init_keymap() { + /* If you want a matrix init specific to your keymap, you need to define this function in your keymap */ +} + +__attribute__ ((weak)) +void matrix_scan_keymap() { + /* If you want a matrix scan specific to your keymap, you need to define this function in your keymap */ +} + +__attribute__((weak)) +void eeconfig_init_keymap( void ) {} + +/* process_record_user() is called in macros.c */ + +void matrix_init_user( void ) { + matrix_init_keymap(); +} + +void matrix_scan_user( void ) { + matrix_scan_keymap(); +} + +void eeconfig_init_user( void ) { + + eeconfig_init_keymap(); + keyboard_init(); + +}
\ No newline at end of file diff --git a/users/d4mation/d4mation.h b/users/d4mation/d4mation.h new file mode 100644 index 000000000..94c63526d --- /dev/null +++ b/users/d4mation/d4mation.h @@ -0,0 +1,17 @@ +#pragma once + +#include "quantum.h" + +#ifdef UNICODE_ENABLE +#include "macros.h" +#endif + +#ifdef TAP_DANCE_ENABLE +#include "tap-dance.h" +#endif + +bool process_record_keymap( uint16_t keycode, keyrecord_t *record ); + +void matrix_init_keymap( void ); + +void matrix_scan_keymap( void );
\ No newline at end of file diff --git a/users/d4mation/macros.c b/users/d4mation/macros.c new file mode 100644 index 000000000..3c115d7ea --- /dev/null +++ b/users/d4mation/macros.c @@ -0,0 +1,160 @@ +#include "d4mation.h" +#include "tap-hold.h" +#include "zalgo.h" +#include "macros.h" + +bool zalgo_enabled = false; + +bool process_record_user( uint16_t keycode, keyrecord_t *record ) { + + switch ( keycode ) { + + case _GRAVE_ESC: + + /* Send ` on Tap, Esc on Hold */ + tap_or_hold( record, KC_GRAVE, KC_ESC ); + + return false; + break; + + case PHPOPEN: + + if ( record->event.pressed ) { + + tap_code16( S( KC_COMMA ) ); + tap_code16( S( KC_SLASH ) ); + + tap_code( KC_P ); + tap_code( KC_H ); + tap_code( KC_P ); + + } + + return false; + break; + + case PHPCLSE: + + if ( record->event.pressed ) { + tap_code16( S( KC_SLASH ) ); + tap_code16( S( KC_DOT ) ); + } + + return false; + break; + + #ifdef UNICODE_ENABLE + + case AMENO: /* ༼ つ ◕_◕ ༽つ */ + + if ( record->event.pressed ) { + + send_unicode_hex_string( "0F3C 0020 3064 0020 25D5 005F 25D5 0020 0F3D 3064" ); + + } + + return false; + break; + + case MAGIC: /* (∩ ͡° ͜ʖ ͡°)⊃━☆゚. * */ + + if ( record->event.pressed ) { + + send_unicode_hex_string( "0028 2229 0020 0361 00B0 0020 035C 0296 0020 0361 00B0 0029 2283 2501 2606 FF9F 002E 0020 002A" ); + + } + + return false; + break; + + case LENNY: /* ( ͡° ͜ʖ ͡°) */ + + if ( record->event.pressed ) { + + send_unicode_hex_string( "0028 0020 0361 00B0 0020 035C 0296 0020 0361 00b0 0029" ); + + } + + return false; + break; + + case DISFACE: /* ಠ_ಠ */ + + if ( record->event.pressed ) { + send_unicode_hex_string( "0CA0 005F 0CA0" ); + } + + return false; + break; + + case TFLIP: /* (╯°□°)╯ ︵ ┻━┻ */ + + if ( record->event.pressed ) { + + send_unicode_hex_string( "0028 256F 00b0 25A1 00B0 0029 256F FE35 253B 2501 253B" ); + + } + + return false; + break; + + case TPUT: /* ┬──┬ ノ( ゜-゜ノ) */ + + if ( record->event.pressed ) { + + send_unicode_hex_string( "252C 2500 2500 252C 0020 30CE 0028 0020 309C 002D 309C 30CE 0029" ); + + } + + return false; + break; + + case SHRUG: /* ¯\_(ツ)_/¯ */ + + if ( record->event.pressed ) { + + send_unicode_hex_string( "00AF 005C 005F 0028 30C4 0029 005F 002F 00AF" ); + + } + + return false; + break; + + case ZALGO: /* Toggles Zalgo Text mode */ + + if ( record->event.pressed ) { + zalgo_enabled = ! zalgo_enabled; + } + + return false; + break; + + #endif + + default: + + #ifdef UNICODE_ENABLE + + if ( zalgo_enabled ) { + + if ( keycode < KC_A || ( keycode > KC_0 && keycode < KC_MINUS ) || keycode > KC_SLASH ) { + process_record_keymap( keycode, record ); + return true; + } + + if ( record->event.pressed ) { + zalgo_text( keycode ); + } + + return false; + } + + #endif + + break; + } + + process_record_keymap( keycode, record ); + return true; + +};
\ No newline at end of file diff --git a/users/d4mation/macros.h b/users/d4mation/macros.h new file mode 100644 index 000000000..e69d30dec --- /dev/null +++ b/users/d4mation/macros.h @@ -0,0 +1,23 @@ +#pragma once + +#include "quantum.h" +#include "tap-hold.h" +#include "zalgo.h" + +#define SCRGB LCTL( LSFT( LGUI( KC_4 ) ) ) /* Mac Screen Area Grab shortcut (Puts into Clipboard) */ +#define SLEEP LALT( LGUI( KC_SYSTEM_POWER ) ) /* Instant sleep on Mac, rather than having to hold down the button */ + +enum custom_keycodes { + _GRAVE_ESC = SAFE_RANGE, /* Prefixed with underscore to prevent conflicts */ + PHPOPEN, /* <?php */ + PHPCLSE, /* ?> */ + AMENO, + MAGIC, + LENNY, + DISFACE, + TFLIP, + TPUT, + SHRUG, + ZALGO, + NEW_SAFE_RANGE +};
\ No newline at end of file diff --git a/users/d4mation/rules.mk b/users/d4mation/rules.mk new file mode 100644 index 000000000..3d65a2242 --- /dev/null +++ b/users/d4mation/rules.mk @@ -0,0 +1,15 @@ +SRC += d4mation.c \ + tap-hold.c \ + macros.c + +BOOTMAGIC_ENABLE = no +LTO_ENABLE = yes +MOUSEKEY_ENABLE = no + +ifeq ($(strip $(UNICODE_ENABLE)), yes) + SRC += zalgo.c +endif + +ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) + SRC += tap-dance.c +endif
\ No newline at end of file diff --git a/users/d4mation/tap-dance.c b/users/d4mation/tap-dance.c new file mode 100644 index 000000000..46f2274f5 --- /dev/null +++ b/users/d4mation/tap-dance.c @@ -0,0 +1,6 @@ +#include "tap-dance.h" + +qk_tap_dance_action_t tap_dance_actions[] = { + /* Tap once/hold for Shift, tap twice for Caps Lock */ + [SHIFT_CAPS] = ACTION_TAP_DANCE_DOUBLE( KC_LSHIFT, KC_CAPS ) +};
\ No newline at end of file diff --git a/users/d4mation/tap-dance.h b/users/d4mation/tap-dance.h new file mode 100644 index 000000000..0087c4a6e --- /dev/null +++ b/users/d4mation/tap-dance.h @@ -0,0 +1,7 @@ +#pragma once + +#include "quantum.h" + +enum tap_dance { + SHIFT_CAPS = 0 +};
\ No newline at end of file diff --git a/users/d4mation/tap-hold.c b/users/d4mation/tap-hold.c new file mode 100644 index 000000000..0c5119f99 --- /dev/null +++ b/users/d4mation/tap-hold.c @@ -0,0 +1,28 @@ +#include "tap-hold.h" + +#ifndef TAP_HOLD_TIME +#define TAP_HOLD_TIME 200 +#endif + +uint16_t tap_hold_timer; + +void tap_or_hold( keyrecord_t *record, uint16_t tap, uint16_t hold ) { + + if ( record->event.pressed ) { + tap_hold_timer = timer_read(); + } else { + + if ( tap_hold_timer && + timer_elapsed( tap_hold_timer ) > TAP_HOLD_TIME ) { + /* Held down then released */ + tap_code( hold ); + } else { + /* Quickly Tapped */ + tap_code( tap ); + } + + tap_hold_timer = 0; + + } + +}
\ No newline at end of file diff --git a/users/d4mation/tap-hold.h b/users/d4mation/tap-hold.h new file mode 100644 index 000000000..52dc0830f --- /dev/null +++ b/users/d4mation/tap-hold.h @@ -0,0 +1,5 @@ +#pragma once + +#include "quantum.h" + +void tap_or_hold( keyrecord_t *record, uint16_t tap, uint16_t hold );
\ No newline at end of file diff --git a/users/d4mation/zalgo.c b/users/d4mation/zalgo.c new file mode 100644 index 000000000..3a1688e05 --- /dev/null +++ b/users/d4mation/zalgo.c @@ -0,0 +1,21 @@ +#include "zalgo.h" + +void zalgo_text( uint16_t keycode ) { + + tap_code( keycode ); + + int number = ( rand() % ( 8 + 1 - 2 ) ) + 2; + unsigned int index; + + unicode_input_start(); + + for ( index = 0; index < number; index++ ) { + + uint16_t hex = ( rand() % ( 0x036F + 1 - 0x0300 ) ) + 0x0300; + register_hex( hex ); + + } + + unicode_input_finish(); + +}
\ No newline at end of file diff --git a/users/d4mation/zalgo.h b/users/d4mation/zalgo.h new file mode 100644 index 000000000..f59fc035b --- /dev/null +++ b/users/d4mation/zalgo.h @@ -0,0 +1,5 @@ +#pragma once + +#include "quantum.h" + +void zalgo_text( uint16_t keycode );
\ No newline at end of file |