diff options
Diffstat (limited to 'keyboards/crkbd/keymaps')
21 files changed, 967 insertions, 27 deletions
diff --git a/keyboards/crkbd/keymaps/bcat/config.h b/keyboards/crkbd/keymaps/bcat/config.h new file mode 100644 index 0000000000..fd5fce5421 --- /dev/null +++ b/keyboards/crkbd/keymaps/bcat/config.h @@ -0,0 +1,6 @@ +#pragma once + +#define EE_HANDS + +/* Limit max RGB LED current to avoid tripping controller fuse. */ +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 diff --git a/keyboards/crkbd/keymaps/bcat/keymap.c b/keyboards/crkbd/keymaps/bcat/keymap.c new file mode 100644 index 0000000000..c9df7a1e31 --- /dev/null +++ b/keyboards/crkbd/keymaps/bcat/keymap.c @@ -0,0 +1,51 @@ +#include QMK_KEYBOARD_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_CESC LCTL_T(KC_ESC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Default layer: http://www.keyboard-layout-editor.com/#/gists/08d9827d916662a9414f48805aa895a5 */ + [LAYER_DEFAULT] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KY_CESC, 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_LALT, LY_LWR, KC_SPC, KC_ENT, LY_RSE, KC_RGUI + ), + + /* Lower layer: http://www.keyboard-layout-editor.com/#/gists/c3fba5eaa2cd70fdfbdbc0f9e34d3bc0 */ + [LAYER_LOWER] = LAYOUT( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS, KC_DEL, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, + _______, _______, _______, _______, _______, KC_APP, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, _______, _______, _______, _______, _______ + ), + + /* Raise layer: http://www.keyboard-layout-editor.com/#/gists/08b44355d4ca85d294bad9e2821f91d7 */ + [LAYER_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_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11, _______, + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_F12, _______, + _______, _______, _______, _______, _______, _______ + ), + + /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/77e7572e077b36a23eb2086017e16fee */ + [LAYER_ADJUST] = LAYOUT( + KC_CAPS, _______, 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_user(layer_state_t state) { + return update_tri_layer_state(state, LAYER_LOWER, LAYER_RAISE, LAYER_ADJUST); +} diff --git a/keyboards/crkbd/keymaps/bcat/readme.md b/keyboards/crkbd/keymaps/bcat/readme.md new file mode 100644 index 0000000000..e378f64cdd --- /dev/null +++ b/keyboards/crkbd/keymaps/bcat/readme.md @@ -0,0 +1,30 @@ +# bcat's Corne layout + +This split ergo layout mirrors +[my Lily58 layout](https://github.com/qmk/qmk_firmware/tree/master/keyboards/lily58/keymaps/bcat) +with the number row removed and RGB controls added. See that layout's docs for +more details on the principles that went into the layout. + +## Default layer + +![Default layer layout](https://i.imgur.com/s1LDlSQ.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/08d9827d916662a9414f48805aa895a5)) + +## Lower layer + +![Lower layer layout](https://i.imgur.com/v4DjXM6.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/c3fba5eaa2cd70fdfbdbc0f9e34d3bc0)) + +## Raise layer + +![Raise layer layout](https://i.imgur.com/Wr6Ptyy.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/08b44355d4ca85d294bad9e2821f91d7)) + +## Adjust layer + +![Adjust layer layout](https://i.imgur.com/9OtGLCT.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/77e7572e077b36a23eb2086017e16fee)) diff --git a/keyboards/crkbd/keymaps/bcat/rules.mk b/keyboards/crkbd/keymaps/bcat/rules.mk new file mode 100644 index 0000000000..cd3418dab8 --- /dev/null +++ b/keyboards/crkbd/keymaps/bcat/rules.mk @@ -0,0 +1,3 @@ +BOOTLOADER = atmel-dfu # Elite-C + +RGB_MATRIX_ENABLE = WS2812 # per-key RGB and underglow diff --git a/keyboards/crkbd/keymaps/curry/config.h b/keyboards/crkbd/keymaps/curry/config.h new file mode 100644 index 0000000000..a7c4ed7403 --- /dev/null +++ b/keyboards/crkbd/keymaps/curry/config.h @@ -0,0 +1,15 @@ +#pragma once + +#define EE_HANDS +#define USE_SERIAL_PD2 + +#define OLED_DISABLE_TIMEOUT +#define TAPPING_TERM_PER_KEY + +#if defined(RGB_MATRIX_ENABLE) +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +# define RGB_MATRIX_HUE_STEP 8 +# define RGB_MATRIX_SAT_STEP 8 +# define RGB_MATRIX_VAL_STEP 5 +# define RGB_MATRIX_SPD_STEP 10 +#endif diff --git a/keyboards/crkbd/keymaps/curry/keymap.c b/keyboards/crkbd/keymaps/curry/keymap.c new file mode 100644 index 0000000000..1ad628c920 --- /dev/null +++ b/keyboards/crkbd/keymaps/curry/keymap.c @@ -0,0 +1,68 @@ +#include "curry.h" + +#define LAYOUT_crkbd_base( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ + ) \ + LAYOUT_wrapper( \ + KC_TAB, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ + MT_ESC, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \ + OS_LSFT, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, OS_RSFT, \ + KC_LEAD,OS_LALT, SP_LWER, ET_RAIS, KC_BSPC, KC_RGUI \ + ) +#define LAYOUT_crkbd_base_wrapper(...) LAYOUT_crkbd_base(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_crkbd_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + + [_COLEMAK] = LAYOUT_crkbd_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DVORAK] = LAYOUT_crkbd_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), + + [_WORKMAN] = LAYOUT_crkbd_base_wrapper( + _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, + _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, + _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ + ), + + [_MODS] = LAYOUT_wrapper( + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + KC_LSFT, ___________________BLANK___________________, ___________________BLANK___________________, KC_RSFT, + _______, _______, _______, _______, _______, _______ + ), + + [_LOWER] = LAYOUT_wrapper( + KC_F11, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F12, + KC_GRV, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE, + _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT_wrapper( \ + _______, _________________RAISE_L1__________________, _________________RAISE_R1__________________, _______, + _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, + _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT_wrapper( \ + KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RST, + VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, + MG_NKRO, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, RGB_IDL, + _______, _______, _______, _______, TG_MODS, _______ + ) +}; diff --git a/keyboards/crkbd/keymaps/curry/rules.mk b/keyboards/crkbd/keymaps/curry/rules.mk new file mode 100644 index 0000000000..7d35d5f0f9 --- /dev/null +++ b/keyboards/crkbd/keymaps/curry/rules.mk @@ -0,0 +1,16 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = no +CONSOLE_ENABLE = no +COMMAND_ENABLE = no + +RGBLIGHT_ENABLE = no +RGB_MATRIX_ENABLE = WS2812 + +OLED_DRIVER_ENABLE = yes + +BOOTLOADER = atmel-dfu +SPLIT_TRANSPORT = mirror diff --git a/keyboards/crkbd/keymaps/dsanchezseco/config.h b/keyboards/crkbd/keymaps/dsanchezseco/config.h index 14efb7d4ec..033173defb 100644 --- a/keyboards/crkbd/keymaps/dsanchezseco/config.h +++ b/keyboards/crkbd/keymaps/dsanchezseco/config.h @@ -36,6 +36,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //disable effects #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_CYCLE_LEFT_RIGHT // Static gradient left to right speed controls how much gradient changes #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 diff --git a/keyboards/crkbd/keymaps/hvp/keymap.c b/keyboards/crkbd/keymaps/hvp/keymap.c index b66c360e18..9e1cd5f01c 100644 --- a/keyboards/crkbd/keymaps/hvp/keymap.c +++ b/keyboards/crkbd/keymaps/hvp/keymap.c @@ -25,56 +25,56 @@ enum custom_keycodes { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT( \ + [_QWERTY] = LAYOUT( //,-----------------------------------------. ,-----------------------------------------. - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_BSPC,\ + LT(_ADJUST,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_BSPC, //|------+------+------+------+------+------| |------+------+------+------+------+------| - LT(_ADJUST, KC_ESC), KC_A, KC_S, KC_D, LT(_RAISE,KC_F), MT(MOD_LCTL,KC_G), KC_H, KC_J, KC_K, KC_L,TD(TD1),TD(TD2),\ + LSFT_T(KC_ESC), KC_A, KC_S, KC_D, LT(3,KC_F), KC_G, KC_H, KC_J, KC_K, KC_L,TD(TD1),TD(TD2), //|------+------+------+------+------+------| |------+------+------+------+------+------| - KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM,KC_DOT,TD(TD3),KC_SFTENT,\ + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM,KC_DOT,TD(TD3),KC_SFTENT, //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - KC_LGUI, LOWER,MT(MOD_LSFT, KC_SPC), LT(_RAISE,KC_ENT), RAISE,KC_LALT \ + KC_LGUI, LT(1,KC_SPC),MT(MOD_LSFT, KC_SPC), MT(MOD_LSFT,KC_ENT), LT(2,KC_SPC),KC_LALT //`--------------------' `--------------------' ), - [_RAISE] = LAYOUT( \ + [_RAISE] = LAYOUT( //,-----------------------------------------. ,-----------------------------------------. - 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_BSPC, //|------+------+------+------+------+------| |------+------+------+------+------+------| - KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT,KC_NO, KC_DEL,\ + KC_DEL, _______, _______, _______, _______, _______, _______,KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, //|------+------+------+------+------+------| |------+------+------+------+------+------| - KC_LCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_NO, KC_NO,\ + KC_LCTL, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - KC_LGUI, LOWER,MT(MOD_LSFT, KC_SPC), LT(_RAISE,KC_ENT), RAISE,KC_LALT \ + _______, _______, _______, _______, _______, _______ //`--------------------' `--------------------' ), - [_LOWER] = LAYOUT( \ + [_LOWER] = LAYOUT( //,-----------------------------------------. ,-----------------------------------------. - KC_TAB,KC_EXLM,KC_AT,KC_HASH,KC_DLR,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_BSPC,\ + KC_TAB,KC_EXLM,KC_AT,KC_HASH,KC_DLR,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_BSPC, //|------+------+------+------+------+------| |------+------+------+------+------+------| - KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MINS,KC_EQL,KC_LCBR,KC_RCBR,KC_PIPE,KC_GRV,\ + KC_DEL, _______, _______, _______, _______, _______, _______,KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSLS, //|------+------+------+------+------+------| |------+------+------+------+------+------| - KC_LCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UNDS,KC_PLUS,KC_LBRC,KC_RBRC,KC_BSLS,KC_TILD,\ + KC_LCTL, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_TILD, //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - KC_LGUI, LOWER,MT(MOD_LSFT, KC_SPC), LT(_RAISE,KC_ENT), RAISE,KC_LALT \ + _______, _______, _______, _______, _______, _______ //`--------------------' `--------------------' ), - [_ADJUST] = LAYOUT( \ + [_ADJUST] = LAYOUT( //,-----------------------------------------. ,-----------------------------------------. - KC_F1,KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,\ + _______,KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, //|------+------+------+------+------+------| |------+------+------+------+------+------| - KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\ + KC_F1,_______,_______,D_NAVI,_______,_______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, //|------+------+------+------+------+------| |------+------+------+------+------+------| - RESET,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_MPLY, KC_MNXT, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,\ + RESET,KC_PSCR,_______,_______,_______,_______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - KC_LGUI, LOWER,MT(MOD_LSFT, KC_SPC), LT(_RAISE,KC_ENT), RAISE,KC_LALT \ + _______, KC_VOLD,KC_MPLY, KC_MNXT, KC_VOLU,_______ //`--------------------' `--------------------' ) }; -int RGB_current_mode; +int RGB_current_mode; // Setting ADJUST layer RGB back to default void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { diff --git a/keyboards/crkbd/keymaps/hvp/readme.md b/keyboards/crkbd/keymaps/hvp/readme.md index 33bb83b83f..3ccdc12193 100644 --- a/keyboards/crkbd/keymaps/hvp/readme.md +++ b/keyboards/crkbd/keymaps/hvp/readme.md @@ -1,5 +1,10 @@ -Keymap to be used with Eurkey for easy access to swedish characters on first layer. +Keyboard: Corne Keyboard (CRKBD) +Keys: A split keyboard with 3x6 vertically staggered keys and 3 thumb keys. +Layout: Swedish characters on main layer using tapdance. Built for eurkey keyboard layout. +Flash instructions: Flash using avrdude, will req the hvp user space to compile. -Links: +> make crkbd:hvp:avrdude -- https://eurkey.steffen.bruentjen.eu/
\ No newline at end of file +Links: +Github - https://github.com/qmk/qmk_firmware/tree/master/keyboards/crkbd +Eurkey layout - https://eurkey.steffen.bruentjen.eu/ diff --git a/keyboards/crkbd/keymaps/hvp/rules.mk b/keyboards/crkbd/keymaps/hvp/rules.mk index a651e528cf..03859ab633 100644 --- a/keyboards/crkbd/keymaps/hvp/rules.mk +++ b/keyboards/crkbd/keymaps/hvp/rules.mk @@ -10,5 +10,5 @@ SRC += ./lib/glcdfont.c \ # ./lib/timelogger.c \ TAP_DANCE_ENABLE = yes -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +EXTRAKEY_ENABLE = yes # Audio control and System control # LOCAL_GLCDFONT = yes
\ No newline at end of file diff --git a/keyboards/crkbd/keymaps/kidbrazil/README.md b/keyboards/crkbd/keymaps/kidbrazil/README.md new file mode 100644 index 0000000000..a7995a4f65 --- /dev/null +++ b/keyboards/crkbd/keymaps/kidbrazil/README.md @@ -0,0 +1,63 @@ +# KidBrazil's custom CRKBD Layout + +![Loose Transistor Crkbd](https://user-images.githubusercontent.com/4823043/71268460-0862c000-231b-11ea-8f32-2fe8da4d348a.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. + +## OLED & RGB Matrix timeout +This keymap will set a automated timeout system for the OLED screen and the RGB +matrix. After 3 minutes or so the LED screen will display the logo on both +halves and 5 minutes after that both the LED and the Matrix will be switched +off. + +Once a user hits the keys again, the LED matrix will turn back on unless the +user has disabled it via RGB_TOG. + +## Flashing +To flash this on your CRKBD simply use the `make crkbd:kidbrazil:flash` +command. + +### TODO +- 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 0000000000..dd3f1a0307 --- /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 0000000000..a67c329242 --- /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 0000000000..44142d4f2f --- /dev/null +++ b/keyboards/crkbd/keymaps/kidbrazil/keymap.c @@ -0,0 +1,248 @@ +#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 LED state +bool user_led_enabled = true; +// Boolean to store the master LED clear so it only runs once. +bool master_oled_cleared = 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 + ) +}; + +// [Post Init] --------------------------------------------------------------// +void keyboard_post_init_user(void) { + // Set RGB to known state + rgb_matrix_enable_noeeprom(); + rgb_matrix_set_color_all(RGB_GREEN); + user_led_enabled = true; + +} +// [Process User Input] ------------------------------------------------------// +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case RGB_TOG: + if (record->event.pressed) { + // Toggle matrix on key press + user_led_enabled ? rgb_matrix_disable_noeeprom() : rgb_matrix_enable_noeeprom(); + } else { + // Flip User_led_enabled variable on key release + user_led_enabled = !user_led_enabled; + } + return false; // Skip all further processing of this key + default: + // Use process_record_keymap to reset timer on all other keypresses + if (record->event.pressed) { + #ifdef OLED_DRIVER_ENABLE + oled_timer = timer_read32(); + #endif + // Restore LEDs if they are enabled by user + if (user_led_enabled) { + 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(); + } +} + +// Slave OLED scren (Right Hand) +void render_slave_oled(void) { + render_logo(); +} + +// {OLED Task} -----------------------------------------------// +void oled_task_user(void) { + if (timer_elapsed32(oled_timer) > 80000 && timer_elapsed32(oled_timer) < 479999) { + // Render logo on both halves before full timeout + if (is_master && !master_oled_cleared) { + // Clear master OLED once so the logo renders properly + oled_clear(); + master_oled_cleared = true; + } + render_logo(); + return; + } + // Drashna style timeout for LED and OLED Roughly 8mins + else if (timer_elapsed32(oled_timer) > 480000) { + oled_off(); + rgb_matrix_disable_noeeprom(); + return; + } + else { + oled_on(); + // Reset OLED Clear flag + master_oled_cleared = false; + // 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 0000000000..dd9895cce9 --- /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 0000000000..1bc1503a60 --- /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 0000000000..ad03b86bfc --- /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/crkbd/keymaps/manna-harbour_miryoku/config.h b/keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h new file mode 100644 index 0000000000..e2fe1824da --- /dev/null +++ b/keyboards/crkbd/keymaps/manna-harbour_miryoku/config.h @@ -0,0 +1,18 @@ +// generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- + +#pragma once + +#define EE_HANDS + +#ifdef RGB_MATRIX_ENABLE +#define RGB_MATRIX_KEYPRESSES // reacts to keypresses +#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define 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 +#endif + +#define SSD1306OLED // old oled driver diff --git a/keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c b/keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c index 56d4de25ac..f5be6844f8 100644 --- a/keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c +++ b/keyboards/crkbd/keymaps/manna-harbour_miryoku/keymap.c @@ -1,5 +1,4 @@ - -// generated from users/manna-harbour_miryoku/miryoku.org +// generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- #define LAYOUT_miryoku( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, \ @@ -15,3 +14,41 @@ KC_NO, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, KC_ ) #include "manna-harbour_miryoku.c" + + +#ifdef SSD1306OLED + +#include "ssd1306.h" + +void matrix_init_user(void) { + iota_gfx_init(!has_usb()); // turns on the display +} + +// When add source files to SRC in rules.mk, you can use functions. +const char *read_logo(void); + +void matrix_scan_user(void) { + iota_gfx_task(); +} + +void matrix_render_user(struct CharacterMatrix *matrix) { + if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) { + 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 diff --git a/keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk b/keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk new file mode 100644 index 0000000000..c4fb15f342 --- /dev/null +++ b/keyboards/crkbd/keymaps/manna-harbour_miryoku/rules.mk @@ -0,0 +1,7 @@ +# generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- + +RGB_MATRIX_ENABLE = WS2812 + +# old oled driver +SRC += ./lib/glcdfont.c \ + ./lib/logo_reader.c |