From 2dcd67ce1a40075c895a28ce6f6e7a5f634ee376 Mon Sep 17 00:00:00 2001 From: Signynt <67801159+Signynt@users.noreply.github.com> Date: Wed, 3 Mar 2021 22:32:22 +0100 Subject: [Keymap] sigma-squared (#11694) --- keyboards/bm40hsrgb/keymaps/signynt/config.h | 80 +++++++++ keyboards/bm40hsrgb/keymaps/signynt/keymap.c | 241 ++++++++++++++++++++++++++ keyboards/bm40hsrgb/keymaps/signynt/readme.md | 117 +++++++++++++ keyboards/bm40hsrgb/keymaps/signynt/rules.mk | 7 + 4 files changed, 445 insertions(+) create mode 100644 keyboards/bm40hsrgb/keymaps/signynt/config.h create mode 100644 keyboards/bm40hsrgb/keymaps/signynt/keymap.c create mode 100644 keyboards/bm40hsrgb/keymaps/signynt/readme.md create mode 100644 keyboards/bm40hsrgb/keymaps/signynt/rules.mk (limited to 'keyboards/bm40hsrgb/keymaps/signynt') diff --git a/keyboards/bm40hsrgb/keymaps/signynt/config.h b/keyboards/bm40hsrgb/keymaps/signynt/config.h new file mode 100644 index 0000000000..9fcddca2cb --- /dev/null +++ b/keyboards/bm40hsrgb/keymaps/signynt/config.h @@ -0,0 +1,80 @@ +// qmk flash -kb bm40hsrgb -km signynt + +/* Copyright 2021 Vincenzo Mitchell Barroso + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define RGBLIGHT_LAYERS +#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF +#define RGBLIGHT_ANIMATIONS + +//#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS +#define RGBLIGHT_LIMIT_VAL 10 + +//bootmagic +#define BOOTMAGIC_KEY_SALT KC_V +#define BOOTMAGIC_KEY_EEPROM_CLEAR KC_Q + +#ifdef RGB_MATRIX_ENABLE + +#define TAPPING_TERM 200 + +//-------------------------------------------------------------------------------------------------------- + +//disable broken animations +#define DISABLE_RGB_MATRIX_ALPHAS_MODS +#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define DISABLE_RGB_MATRIX_BREATHING +#define DISABLE_RGB_MATRIX_BAND_SAT +#define DISABLE_RGB_MATRIX_BAND_VAL +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define DISABLE_RGB_MATRIX_CYCLE_ALL +#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN +#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +//#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +//#define DISABLE_RGB_MATRIX_DUAL_BEACON +#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL +//#define DISABLE_RGB_MATRIX_RAINBOW_BEACON +//#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS +//#define DISABLE_RGB_MATRIX_RAINDROPS +#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // DO NOT ENABLE +//#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 + +#undef RGB_MATRIX_STARTUP_MODE + +#define RGBLIGHT_HUE_STEP 20 + +#endif diff --git a/keyboards/bm40hsrgb/keymaps/signynt/keymap.c b/keyboards/bm40hsrgb/keymaps/signynt/keymap.c new file mode 100644 index 0000000000..b04f7ffb7c --- /dev/null +++ b/keyboards/bm40hsrgb/keymaps/signynt/keymap.c @@ -0,0 +1,241 @@ +// qmk flash -kb bm40hsrgb -km signynt + +/* Copyright 2021 Vincenzo Mitchell Barroso + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +// non-KC_ keycodes +#define KC_RST RESET +#define KC_TOG RGB_TOG +#define KC_MOD RGB_MOD +#define KC_HUI RGB_HUI +#define KC_SAI RGB_SAI +#define KC_VAI RGB_VAI + +//define layers +enum layers {BASE, MEDR, NAVR, NSSL, NSL, FUNL, GAME, SECGAME}; + +enum custom_keycodes { + CMD_TAB = SAFE_RANGE, +}; + +//cmd tab + +bool is_cmd_tab_active = false; +uint16_t cmd_tab_timer = 0; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case CMD_TAB: + if (record->event.pressed) { + if (!is_cmd_tab_active) { + is_cmd_tab_active = true; + register_code(KC_LCTL); + } + cmd_tab_timer = timer_read(); + register_code(KC_TAB); + } else { + unregister_code(KC_TAB); + } + break; + } + return true; +} + +void matrix_scan_user(void) { + if (is_cmd_tab_active) { + if (timer_elapsed(cmd_tab_timer) > 500) { + unregister_code(KC_LCTL); + is_cmd_tab_active = false; + } + } +} + +//layer led colors + +void rgb_matrix_indicators_user(void) { + +//game indicators + +if(IS_LAYER_ON(GAME)) { + rgb_matrix_set_color(11, 0, 40, 50); +} + +if(IS_LAYER_ON(SECGAME)) { + rgb_matrix_set_color(11, 50, 0, 0); +} + +//layer indicators + +if(IS_LAYER_ON(NAVR)) { + rgb_matrix_set_color(40, 0, 40, 50); + + rgb_matrix_set_color(19, 0, 40, 50); + rgb_matrix_set_color(20, 0, 40, 50); + rgb_matrix_set_color(21, 0, 40, 50); + rgb_matrix_set_color(22, 0, 40, 50); +} + +if(IS_LAYER_ON(MEDR)) { + rgb_matrix_set_color(39, 50, 10, 20); + + rgb_matrix_set_color(19, 50, 10, 20); + + rgb_matrix_set_color(22, 50, 10, 20); + + rgb_matrix_set_color(42, 50, 10, 20); +} + +if(IS_LAYER_ON(FUNL)) { + rgb_matrix_set_color(43, 50, 0, 0); + + rgb_matrix_set_color(1, 50, 0, 0); + rgb_matrix_set_color(2, 50, 0, 0); + rgb_matrix_set_color(3, 50, 0, 0); + rgb_matrix_set_color(4, 50, 0, 0); + + rgb_matrix_set_color(13, 50, 0, 0); + rgb_matrix_set_color(14, 50, 0, 0); + rgb_matrix_set_color(15, 50, 0, 0); + rgb_matrix_set_color(16, 50, 0, 0); + + rgb_matrix_set_color(25, 50, 0, 0); + rgb_matrix_set_color(26, 50, 0, 0); + rgb_matrix_set_color(27, 50, 0, 0); + rgb_matrix_set_color(28, 50, 0, 0); +} + +if(IS_LAYER_ON(NSL)) { + rgb_matrix_set_color(42, 10, 0, 50); + + rgb_matrix_set_color(2, 10, 0, 50); + rgb_matrix_set_color(3, 10, 0, 50); + rgb_matrix_set_color(4, 10, 0, 50); + + rgb_matrix_set_color(14, 10, 0, 50); + rgb_matrix_set_color(15, 10, 0, 50); + rgb_matrix_set_color(16, 10, 0, 50); + + rgb_matrix_set_color(26, 10, 0, 50); + rgb_matrix_set_color(27, 10, 0, 50); + rgb_matrix_set_color(28, 10, 0, 50); + + rgb_matrix_set_color(38, 10, 0, 50); + rgb_matrix_set_color(39, 10, 0, 50); + rgb_matrix_set_color(40, 10, 0, 50); +} + +if(IS_LAYER_ON(NSSL)) { + rgb_matrix_set_color(41, 0, 50, 1.9); + + rgb_matrix_set_color(1, 0, 50, 1.9); + rgb_matrix_set_color(2, 0, 50, 1.9); + rgb_matrix_set_color(3, 0, 50, 1.9); + rgb_matrix_set_color(4, 0, 50, 1.9); + rgb_matrix_set_color(5, 0, 50, 1.9); + + rgb_matrix_set_color(13, 0, 50, 1.9); + rgb_matrix_set_color(14, 0, 50, 1.9); + rgb_matrix_set_color(15, 0, 50, 1.9); + rgb_matrix_set_color(16, 0, 50, 1.9); + rgb_matrix_set_color(17, 0, 50, 1.9); + + rgb_matrix_set_color(25, 0, 50, 1.9); + rgb_matrix_set_color(26, 0, 50, 1.9); + rgb_matrix_set_color(27, 0, 50, 1.9); + rgb_matrix_set_color(28, 0, 50, 1.9); + rgb_matrix_set_color(29, 0, 50, 1.9); + +} + +//capslock leds + +if (host_keyboard_leds() & (1<