diff --git a/keyboards/razer/blackwidow_2019/blackwidow_2019.c b/keyboards/razer/blackwidow_2019/blackwidow_2019.c new file mode 100644 index 000000000000..af60c07b1cea --- /dev/null +++ b/keyboards/razer/blackwidow_2019/blackwidow_2019.c @@ -0,0 +1,165 @@ +// Copyright 2026 AeroModes +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "quantum.h" + +#ifdef RGB_MATRIX_ENABLE +const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { +/* Driver + * | R G B */ + {0, SW2_CS1, SW1_CS1, SW3_CS1}, // KC_ESC + {0, SW2_CS2, SW1_CS2, SW3_CS2}, // KC_F1 + {0, SW2_CS3, SW1_CS3, SW3_CS3}, // KC_F2 + {0, SW2_CS4, SW1_CS4, SW3_CS4}, // KC_F3 + {0, SW2_CS5, SW1_CS5, SW3_CS5}, // KC_F4 + {0, SW2_CS6, SW1_CS6, SW3_CS6}, // KC_F5 + {0, SW2_CS7, SW1_CS7, SW3_CS7}, // KC_F6 + {0, SW2_CS8, SW1_CS8, SW3_CS8}, // KC_F7 + {0, SW2_CS9, SW1_CS9, SW3_CS9}, // KC_F8 + {0, SW2_CS10, SW1_CS10, SW3_CS10}, // KC_F9 + {0, SW2_CS11, SW1_CS11, SW3_CS11}, // KC_F10 + {0, SW2_CS12, SW1_CS12, SW3_CS12}, // KC_F11 + {0, SW2_CS13, SW1_CS13, SW3_CS13}, // KC_F12 + {0, SW2_CS14, SW1_CS14, SW3_CS14}, // KC_PSCR + {0, SW2_CS15, SW1_CS15, SW3_CS15}, // KC_SCRL + {1, SW2_CS3, SW1_CS3, SW3_CS3}, // KC_PAUS + {0, SW5_CS1, SW4_CS1, SW6_CS1}, // KC_GRV + {0, SW5_CS2, SW4_CS2, SW6_CS2}, // KC_1 + {0, SW5_CS3, SW4_CS3, SW6_CS3}, // KC_2 + {0, SW5_CS4, SW4_CS4, SW6_CS4}, // KC_3 + {0, SW5_CS5, SW4_CS5, SW6_CS5}, // KC_4 + {0, SW5_CS6, SW4_CS6, SW6_CS6}, // KC_5 + {0, SW5_CS7, SW4_CS7, SW6_CS7}, // KC_6 + {0, SW5_CS8, SW4_CS8, SW6_CS8}, // KC_7 + {0, SW5_CS9, SW4_CS9, SW6_CS9}, // KC_8 + {0, SW5_CS10, SW4_CS10, SW6_CS10}, // KC_9 + {0, SW5_CS11, SW4_CS11, SW6_CS11}, // KC_0 + {0, SW5_CS12, SW4_CS12, SW6_CS12}, // KC_MINS + {0, SW5_CS13, SW4_CS13, SW6_CS13}, // KC_EQL + {0, SW5_CS15, SW4_CS15, SW6_CS15}, // KC_BSPC + {1, SW2_CS4, SW1_CS4, SW3_CS4}, // KC_INS + {1, SW2_CS5, SW1_CS5, SW3_CS5}, // KC_HOME + {1, SW2_CS6, SW1_CS6, SW3_CS6}, // KC_PGUP + {1, SW2_CS7, SW1_CS7, SW3_CS7}, // KC_NUM + {1, SW2_CS8, SW1_CS8, SW3_CS8}, // KC_PSLS + {1, SW2_CS9, SW1_CS9, SW3_CS9}, // KC_PAST + {1, SW2_CS10, SW1_CS10, SW3_CS10}, // KC_PMNS + {0, SW8_CS1, SW7_CS1, SW9_CS1}, // KC_TAB + {0, SW8_CS2, SW7_CS2, SW9_CS2}, // KC_Q + {0, SW8_CS3, SW7_CS3, SW9_CS3}, // KC_W + {0, SW8_CS4, SW7_CS4, SW9_CS4}, // KC_E + {0, SW8_CS5, SW7_CS5, SW9_CS5}, // KC_R + {0, SW8_CS6, SW7_CS6, SW9_CS6}, // KC_T + {0, SW8_CS7, SW7_CS7, SW9_CS7}, // KC_Y + {0, SW8_CS8, SW7_CS8, SW9_CS8}, // KC_U + {0, SW8_CS9, SW7_CS9, SW9_CS9}, // KC_I + {0, SW8_CS10, SW7_CS10, SW9_CS10}, // KC_O + {0, SW8_CS11, SW7_CS11, SW9_CS11}, // KC_P + {0, SW8_CS12, SW7_CS12, SW9_CS12}, // KC_LBRC + {0, SW8_CS13, SW7_CS13, SW9_CS13}, // KC_RBRC + {0, SW8_CS14, SW7_CS14, SW9_CS14}, // KC_BSLS + {1, SW2_CS11, SW1_CS11, SW3_CS11}, // KC_DEL + {1, SW2_CS12, SW1_CS12, SW3_CS12}, // KC_END + {1, SW2_CS13, SW1_CS13, SW3_CS13}, // KC_PGDN + {1, SW2_CS14, SW1_CS14, SW3_CS14}, // KC_P7 + {1, SW2_CS15, SW1_CS15, SW3_CS15}, // KC_P8 + {1, SW11_CS3, SW10_CS3, SW12_CS3}, // KC_P9 + {1, SW5_CS4, SW4_CS4, SW6_CS4}, // KC_PPLS + {0, SW11_CS1, SW10_CS1, SW12_CS1}, // KC_CAPS + {0, SW11_CS2, SW10_CS2, SW12_CS2}, // KC_A + {0, SW11_CS3, SW10_CS3, SW12_CS3}, // KC_S + {0, SW11_CS4, SW10_CS4, SW12_CS4}, // KC_D + {0, SW11_CS5, SW10_CS5, SW12_CS5}, // KC_F + {0, SW11_CS6, SW10_CS6, SW12_CS6}, // KC_G + {0, SW11_CS7, SW10_CS7, SW12_CS7}, // KC_H + {0, SW11_CS8, SW10_CS8, SW12_CS8}, // KC_J + {0, SW11_CS9, SW10_CS9, SW12_CS9}, // KC_K + {0, SW11_CS10, SW10_CS10, SW12_CS10}, // KC_L + {0, SW11_CS11, SW10_CS11, SW12_CS11}, // KC_SCLN + {0, SW11_CS12, SW10_CS12, SW12_CS12}, // KC_QUOT + {0, SW11_CS14, SW10_CS14, SW12_CS14}, // KC_ENT + {1, SW5_CS9, SW4_CS9, SW6_CS9}, // KC_P4 + {1, SW5_CS7, SW4_CS7, SW6_CS7}, // KC_P5 + {1, SW5_CS5, SW4_CS5, SW6_CS5}, // KC_P6 + {0, SW11_CS16, SW10_CS16, SW12_CS16}, // KC_LSFT + {1, SW8_CS15, SW7_CS15, SW9_CS15}, // KC_Z + {1, SW8_CS14, SW7_CS14, SW9_CS14}, // KC_X + {1, SW8_CS13, SW7_CS13, SW9_CS13}, // KC_C + {1, SW8_CS12, SW7_CS12, SW9_CS12}, // KC_V + {1, SW8_CS11, SW7_CS11, SW9_CS11}, // KC_B + {1, SW8_CS10, SW7_CS10, SW9_CS10}, // KC_N + {1, SW8_CS9, SW7_CS9, SW9_CS9}, // KC_M + {1, SW8_CS8, SW7_CS8, SW9_CS8}, // KC_COMM + {1, SW8_CS7, SW7_CS7, SW9_CS7}, // KC_DOT + {1, SW8_CS6, SW7_CS6, SW9_CS6}, // KC_SLSH + {1, SW8_CS4, SW7_CS4, SW9_CS4}, // KC_RSFT + {1, SW5_CS16, SW4_CS16, SW6_CS16}, // KC_UP + {1, SW5_CS10, SW4_CS10, SW6_CS10}, // KC_P1 + {1, SW5_CS8, SW4_CS8, SW6_CS8}, // KC_P2 + {1, SW5_CS6, SW4_CS6, SW6_CS6}, // KC_P3 + {1, SW5_CS3, SW4_CS3, SW6_CS3}, // KC_PENT + {1, SW11_CS15, SW10_CS15, SW12_CS15}, // KC_LCTL + {1, SW11_CS14, SW10_CS14, SW12_CS14}, // KC_LGUI + {1, SW11_CS13, SW10_CS13, SW12_CS13}, // KC_LALT + {1, SW11_CS11, SW10_CS11, SW12_CS11}, // KC_SPC + {1, SW11_CS8, SW10_CS8, SW12_CS8}, // KC_RALT + {1, SW11_CS6, SW10_CS6, SW12_CS6}, // MO(_FN) + {1, SW11_CS5, SW10_CS5, SW12_CS5}, // KC_APP + {1, SW11_CS4, SW10_CS4, SW12_CS4}, // KC_RCTL + {1, SW8_CS3, SW7_CS3, SW9_CS3}, // KC_LEFT + {1, SW8_CS2, SW7_CS2, SW9_CS2}, // KC_DOWN + {1, SW8_CS1, SW7_CS1, SW9_CS1}, // KC_RGHT + {1, SW5_CS1, SW4_CS1, SW6_CS1}, // KC_P0 + {1, SW5_CS2, SW4_CS2, SW6_CS2}, // KC_PDOT + {1, SW5_CS11, SW4_CS11, SW6_CS11}, // Game + {1, SW5_CS12, SW4_CS12, SW6_CS12}, // Macro + {1, SW5_CS13, SW4_CS13, SW6_CS13}, // Scroll + {1, SW5_CS14, SW4_CS14, SW6_CS14}, // Num + {1, SW5_CS15, SW4_CS15, SW6_CS15}, // Caps + {1, SW11_CS7, SW10_CS7, SW12_CS7}, // Logo +}; + +# define LED_IDX_GAME (RGB_MATRIX_LED_COUNT - 6) +# define LED_IDX_MACRO (RGB_MATRIX_LED_COUNT - 5) +# define LED_IDX_SCROLL (RGB_MATRIX_LED_COUNT - 4) +# define LED_IDX_NUM (RGB_MATRIX_LED_COUNT - 3) +# define LED_IDX_CAPS (RGB_MATRIX_LED_COUNT - 2) + +static void set_indicator(uint8_t index, bool on, uint8_t led_min, uint8_t led_max) { + RGB_MATRIX_INDICATOR_SET_COLOR(index, on ? 255 : 0, on ? 255 : 0, on ? 255 : 0); +} + +# ifdef DYNAMIC_MACRO_ENABLE +static bool macro_recording = false; + +bool dynamic_macro_record_start_kb(int8_t direction) { + if (!dynamic_macro_record_start_user(direction)) return false; + macro_recording = true; + return true; +} + +bool dynamic_macro_record_end_kb(int8_t direction) { + if (!dynamic_macro_record_end_user(direction)) return false; + macro_recording = false; + return true; +} +# endif + +bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { + if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) { + return false; + } + bool macro_on = false; +# ifdef DYNAMIC_MACRO_ENABLE + macro_on = macro_recording; +# endif + led_t led_state = host_keyboard_led_state(); + // Game = GUI lock, Macro = Dynamic macro recording + set_indicator(LED_IDX_GAME, keymap_config.no_gui, led_min, led_max); + set_indicator(LED_IDX_MACRO, macro_on, led_min, led_max); + set_indicator(LED_IDX_SCROLL, led_state.scroll_lock, led_min, led_max); + set_indicator(LED_IDX_NUM, led_state.num_lock, led_min, led_max); + set_indicator(LED_IDX_CAPS, led_state.caps_lock, led_min, led_max); + return true; +} +#endif diff --git a/keyboards/razer/blackwidow_2019/board.h b/keyboards/razer/blackwidow_2019/board.h new file mode 100644 index 000000000000..257d143664e8 --- /dev/null +++ b/keyboards/razer/blackwidow_2019/board.h @@ -0,0 +1,9 @@ +// Copyright 2026 AeroModes +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include_next + +#undef STM32_HSECLK +#define STM32_HSECLK 12000000U diff --git a/keyboards/razer/blackwidow_2019/config.h b/keyboards/razer/blackwidow_2019/config.h new file mode 100644 index 000000000000..7fca614c02e7 --- /dev/null +++ b/keyboards/razer/blackwidow_2019/config.h @@ -0,0 +1,14 @@ +// Copyright 2026 AeroModes +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND +#define IS31FL3733_I2C_ADDRESS_2 IS31FL3733_I2C_ADDRESS_VCC_VCC +#define IS31FL3733_SDB_PIN C13 + +#define IS31FL3733_SW_PULLUP IS31FL3733_PUR_32K_OHM +#define IS31FL3733_CS_PULLDOWN IS31FL3733_PDR_32K_OHM + +#define I2C1_CLOCK_SPEED 400000 +#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 diff --git a/keyboards/razer/blackwidow_2019/halconf.h b/keyboards/razer/blackwidow_2019/halconf.h new file mode 100644 index 000000000000..6028e4d092a2 --- /dev/null +++ b/keyboards/razer/blackwidow_2019/halconf.h @@ -0,0 +1,8 @@ +// Copyright 2026 AeroModes +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define HAL_USE_I2C TRUE + +#include_next diff --git a/keyboards/razer/blackwidow_2019/keyboard.json b/keyboards/razer/blackwidow_2019/keyboard.json new file mode 100644 index 000000000000..475669d67229 --- /dev/null +++ b/keyboards/razer/blackwidow_2019/keyboard.json @@ -0,0 +1,307 @@ +{ + "manufacturer": "Razer", + "keyboard_name": "Razer BlackWidow 2019 (QMK)", + "maintainer": "AeroModes", + "bootloader": "stm32-dfu", + "diode_direction": "ROW2COL", + "features": { + "bootmagic": true, + "dynamic_macro": true, + "extrakey": true, + "nkro": true, + "rgb_matrix": true + }, + "host": { + "default": { + "nkro": true + } + }, + "matrix_pins": { + "cols": ["B0", "B1", "B10", "B11", "B12", "B13", "B14", "B15"], + "rows": ["C6", "C7", "C8", "C9", "A8", "A9", "A10", "A15", "C10", "C11", "C12", "D2", "B3", "B4", "B5", "B8"] + }, + "processor": "STM32L151", + "rgb_matrix": { + "animations": { + "alphas_mods": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_sat": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "band_val": true, + "breathing": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "cycle_up_down": true, + "digital_rain": true, + "dual_beacon": true, + "flower_blooming": true, + "gradient_left_right": true, + "gradient_up_down": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "jellybean_raindrops": true, + "multisplash": true, + "pixel_flow": true, + "pixel_fractal": true, + "pixel_rain": true, + "rainbow_beacon": true, + "rainbow_moving_chevron": true, + "rainbow_pinwheels": true, + "raindrops": true, + "riverflow": true, + "solid_multisplash": true, + "solid_reactive": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_multinexus": true, + "solid_reactive_multiwide": true, + "solid_reactive_nexus": true, + "solid_reactive_simple": true, + "solid_reactive_wide": true, + "solid_splash": true, + "splash": true, + "starlight": true, + "starlight_dual_hue": true, + "starlight_dual_sat": true, + "starlight_smooth": true, + "typing_heatmap": true + }, + "driver": "is31fl3733", + "layout": [ + {"matrix": [0, 0], "x": 5, "y": 5, "flags": 1}, + {"matrix": [3, 0], "x": 25, "y": 5, "flags": 1}, + {"matrix": [4, 0], "x": 35, "y": 5, "flags": 1}, + {"matrix": [5, 0], "x": 45, "y": 5, "flags": 1}, + {"matrix": [6, 0], "x": 55, "y": 5, "flags": 1}, + {"matrix": [7, 0], "x": 70, "y": 5, "flags": 1}, + {"matrix": [8, 0], "x": 80, "y": 5, "flags": 1}, + {"matrix": [9, 0], "x": 90, "y": 5, "flags": 1}, + {"matrix": [10, 0], "x": 100, "y": 5, "flags": 1}, + {"matrix": [11, 0], "x": 114, "y": 5, "flags": 1}, + {"matrix": [12, 0], "x": 124, "y": 5, "flags": 1}, + {"matrix": [13, 0], "x": 134, "y": 5, "flags": 1}, + {"matrix": [14, 0], "x": 144, "y": 5, "flags": 1}, + {"matrix": [15, 0], "x": 157, "y": 5, "flags": 1}, + {"matrix": [2, 0], "x": 167, "y": 5, "flags": 1}, + {"matrix": [15, 6], "x": 177, "y": 5, "flags": 1}, + {"matrix": [1, 0], "x": 5, "y": 20, "flags": 1}, + {"matrix": [1, 1], "x": 15, "y": 20, "flags": 1}, + {"matrix": [3, 1], "x": 25, "y": 20, "flags": 1}, + {"matrix": [4, 1], "x": 35, "y": 20, "flags": 1}, + {"matrix": [5, 1], "x": 45, "y": 20, "flags": 1}, + {"matrix": [6, 1], "x": 55, "y": 20, "flags": 1}, + {"matrix": [7, 1], "x": 65, "y": 20, "flags": 1}, + {"matrix": [8, 1], "x": 75, "y": 20, "flags": 1}, + {"matrix": [9, 1], "x": 85, "y": 20, "flags": 1}, + {"matrix": [10, 1], "x": 95, "y": 20, "flags": 1}, + {"matrix": [11, 1], "x": 105, "y": 20, "flags": 1}, + {"matrix": [12, 1], "x": 114, "y": 20, "flags": 1}, + {"matrix": [13, 1], "x": 124, "y": 20, "flags": 1}, + {"matrix": [14, 5], "x": 139, "y": 20, "flags": 1}, + {"matrix": [15, 1], "x": 157, "y": 20, "flags": 1}, + {"matrix": [2, 7], "x": 167, "y": 20, "flags": 1}, + {"matrix": [15, 7], "x": 177, "y": 20, "flags": 1}, + {"matrix": [14, 7], "x": 189, "y": 20, "flags": 1}, + {"matrix": [13, 7], "x": 199, "y": 20, "flags": 1}, + {"matrix": [3, 7], "x": 209, "y": 20, "flags": 1}, + {"matrix": [12, 7], "x": 219, "y": 20, "flags": 1}, + {"matrix": [1, 2], "x": 7, "y": 30, "flags": 1}, + {"matrix": [2, 2], "x": 20, "y": 30, "flags": 1}, + {"matrix": [3, 2], "x": 30, "y": 30, "flags": 1}, + {"matrix": [4, 2], "x": 40, "y": 30, "flags": 1}, + {"matrix": [5, 2], "x": 50, "y": 30, "flags": 1}, + {"matrix": [6, 2], "x": 60, "y": 30, "flags": 1}, + {"matrix": [7, 2], "x": 70, "y": 30, "flags": 1}, + {"matrix": [8, 2], "x": 80, "y": 30, "flags": 1}, + {"matrix": [9, 2], "x": 90, "y": 30, "flags": 1}, + {"matrix": [10, 2], "x": 100, "y": 30, "flags": 1}, + {"matrix": [11, 2], "x": 110, "y": 30, "flags": 1}, + {"matrix": [12, 2], "x": 119, "y": 30, "flags": 1}, + {"matrix": [13, 2], "x": 129, "y": 30, "flags": 1}, + {"matrix": [14, 2], "x": 142, "y": 30, "flags": 1}, + {"matrix": [15, 2], "x": 157, "y": 30, "flags": 1}, + {"matrix": [2, 6], "x": 167, "y": 30, "flags": 1}, + {"matrix": [15, 4], "x": 177, "y": 30, "flags": 1}, + {"matrix": [14, 6], "x": 189, "y": 30, "flags": 1}, + {"matrix": [13, 6], "x": 199, "y": 30, "flags": 1}, + {"matrix": [3, 6], "x": 209, "y": 30, "flags": 1}, + {"matrix": [12, 6], "x": 219, "y": 34, "flags": 1}, + {"matrix": [1, 3], "x": 9, "y": 39, "flags": 1}, + {"matrix": [2, 3], "x": 22, "y": 39, "flags": 1}, + {"matrix": [3, 3], "x": 32, "y": 39, "flags": 1}, + {"matrix": [4, 3], "x": 42, "y": 39, "flags": 1}, + {"matrix": [5, 3], "x": 52, "y": 39, "flags": 1}, + {"matrix": [6, 3], "x": 62, "y": 39, "flags": 1}, + {"matrix": [7, 3], "x": 72, "y": 39, "flags": 1}, + {"matrix": [8, 3], "x": 82, "y": 39, "flags": 1}, + {"matrix": [9, 3], "x": 92, "y": 39, "flags": 1}, + {"matrix": [10, 3], "x": 102, "y": 39, "flags": 1}, + {"matrix": [11, 3], "x": 112, "y": 39, "flags": 1}, + {"matrix": [12, 3], "x": 122, "y": 39, "flags": 1}, + {"matrix": [14, 3], "x": 138, "y": 39, "flags": 1}, + {"matrix": [10, 7], "x": 189, "y": 39, "flags": 1}, + {"matrix": [9, 7], "x": 199, "y": 39, "flags": 1}, + {"matrix": [8, 7], "x": 209, "y": 39, "flags": 1}, + {"matrix": [1, 4], "x": 11, "y": 49, "flags": 4}, + {"matrix": [3, 4], "x": 27, "y": 49, "flags": 1}, + {"matrix": [4, 4], "x": 37, "y": 49, "flags": 1}, + {"matrix": [4, 5], "x": 47, "y": 49, "flags": 1}, + {"matrix": [6, 4], "x": 57, "y": 49, "flags": 1}, + {"matrix": [7, 4], "x": 67, "y": 49, "flags": 1}, + {"matrix": [7, 5], "x": 77, "y": 49, "flags": 1}, + {"matrix": [9, 4], "x": 87, "y": 49, "flags": 1}, + {"matrix": [10, 4], "x": 97, "y": 49, "flags": 1}, + {"matrix": [11, 4], "x": 107, "y": 49, "flags": 1}, + {"matrix": [12, 4], "x": 117, "y": 49, "flags": 1}, + {"matrix": [14, 4], "x": 136, "y": 49, "flags": 4}, + {"matrix": [2, 1], "x": 167, "y": 49, "flags": 1}, + {"matrix": [10, 6], "x": 189, "y": 49, "flags": 1}, + {"matrix": [9, 6], "x": 199, "y": 49, "flags": 1}, + {"matrix": [8, 6], "x": 209, "y": 49, "flags": 1}, + {"matrix": [7, 6], "x": 219, "y": 54, "flags": 1}, + {"matrix": [1, 5], "x": 7, "y": 59, "flags": 4}, + {"matrix": [2, 5], "x": 20, "y": 59, "flags": 4}, + {"matrix": [3, 5], "x": 32, "y": 59, "flags": 4}, + {"matrix": [6, 5], "x": 70, "y": 59, "flags": 1}, + {"matrix": [10, 5], "x": 107, "y": 59, "flags": 4}, + {"matrix": [11, 5], "x": 119, "y": 59, "flags": 4}, + {"matrix": [12, 5], "x": 129, "y": 59, "flags": 1}, + {"matrix": [13, 5], "x": 142, "y": 59, "flags": 4}, + {"matrix": [15, 3], "x": 157, "y": 59, "flags": 1}, + {"matrix": [6, 6], "x": 167, "y": 59, "flags": 1}, + {"matrix": [15, 5], "x": 177, "y": 59, "flags": 1}, + {"matrix": [11, 6], "x": 194, "y": 59, "flags": 1}, + {"matrix": [11, 7], "x": 209, "y": 59, "flags": 1}, + {"x": 186, "y": 0, "flags": 8}, + {"x": 195, "y": 0, "flags": 8}, + {"x": 204, "y": 0, "flags": 8}, + {"x": 213, "y": 0, "flags": 8}, + {"x": 222, "y": 0, "flags": 8}, + {"x": 112, "y": 64, "flags": 2} + ], + "sleep": true + }, + "url": "https://mysupport.razer.com/app/answers/detail/a_id/3644", + "usb": { + "device_version": "1.0.0", + "pid": "0x0241", + "vid": "0xFEED" + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [3, 0], "x": 2, "y": 0}, + {"matrix": [4, 0], "x": 3, "y": 0}, + {"matrix": [5, 0], "x": 4, "y": 0}, + {"matrix": [6, 0], "x": 5, "y": 0}, + {"matrix": [7, 0], "x": 6.5, "y": 0}, + {"matrix": [8, 0], "x": 7.5, "y": 0}, + {"matrix": [9, 0], "x": 8.5, "y": 0}, + {"matrix": [10, 0], "x": 9.5, "y": 0}, + {"matrix": [11, 0], "x": 11, "y": 0}, + {"matrix": [12, 0], "x": 12, "y": 0}, + {"matrix": [13, 0], "x": 13, "y": 0}, + {"matrix": [14, 0], "x": 14, "y": 0}, + {"matrix": [15, 0], "x": 15.25, "y": 0}, + {"matrix": [2, 0], "x": 16.25, "y": 0}, + {"matrix": [15, 6], "x": 17.25, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1.5}, + {"matrix": [1, 1], "x": 1, "y": 1.5}, + {"matrix": [3, 1], "x": 2, "y": 1.5}, + {"matrix": [4, 1], "x": 3, "y": 1.5}, + {"matrix": [5, 1], "x": 4, "y": 1.5}, + {"matrix": [6, 1], "x": 5, "y": 1.5}, + {"matrix": [7, 1], "x": 6, "y": 1.5}, + {"matrix": [8, 1], "x": 7, "y": 1.5}, + {"matrix": [9, 1], "x": 8, "y": 1.5}, + {"matrix": [10, 1], "x": 9, "y": 1.5}, + {"matrix": [11, 1], "x": 10, "y": 1.5}, + {"matrix": [12, 1], "x": 11, "y": 1.5}, + {"matrix": [13, 1], "x": 12, "y": 1.5}, + {"matrix": [14, 5], "x": 13, "y": 1.5, "w": 2}, + {"matrix": [15, 1], "x": 15.25, "y": 1.5}, + {"matrix": [2, 7], "x": 16.25, "y": 1.5}, + {"matrix": [15, 7], "x": 17.25, "y": 1.5}, + {"matrix": [14, 7], "x": 18.5, "y": 1.5}, + {"matrix": [13, 7], "x": 19.5, "y": 1.5}, + {"matrix": [3, 7], "x": 20.5, "y": 1.5}, + {"matrix": [12, 7], "x": 21.5, "y": 1.5}, + {"matrix": [1, 2], "x": 0, "y": 2.5, "w": 1.5}, + {"matrix": [2, 2], "x": 1.5, "y": 2.5}, + {"matrix": [3, 2], "x": 2.5, "y": 2.5}, + {"matrix": [4, 2], "x": 3.5, "y": 2.5}, + {"matrix": [5, 2], "x": 4.5, "y": 2.5}, + {"matrix": [6, 2], "x": 5.5, "y": 2.5}, + {"matrix": [7, 2], "x": 6.5, "y": 2.5}, + {"matrix": [8, 2], "x": 7.5, "y": 2.5}, + {"matrix": [9, 2], "x": 8.5, "y": 2.5}, + {"matrix": [10, 2], "x": 9.5, "y": 2.5}, + {"matrix": [11, 2], "x": 10.5, "y": 2.5}, + {"matrix": [12, 2], "x": 11.5, "y": 2.5}, + {"matrix": [13, 2], "x": 12.5, "y": 2.5}, + {"matrix": [14, 2], "x": 13.5, "y": 2.5, "w": 1.5}, + {"matrix": [15, 2], "x": 15.25, "y": 2.5}, + {"matrix": [2, 6], "x": 16.25, "y": 2.5}, + {"matrix": [15, 4], "x": 17.25, "y": 2.5}, + {"matrix": [14, 6], "x": 18.5, "y": 2.5}, + {"matrix": [13, 6], "x": 19.5, "y": 2.5}, + {"matrix": [3, 6], "x": 20.5, "y": 2.5}, + {"matrix": [12, 6], "x": 21.5, "y": 2.5, "h": 2}, + {"matrix": [1, 3], "x": 0, "y": 3.5, "w": 1.75}, + {"matrix": [2, 3], "x": 1.75, "y": 3.5}, + {"matrix": [3, 3], "x": 2.75, "y": 3.5}, + {"matrix": [4, 3], "x": 3.75, "y": 3.5}, + {"matrix": [5, 3], "x": 4.75, "y": 3.5}, + {"matrix": [6, 3], "x": 5.75, "y": 3.5}, + {"matrix": [7, 3], "x": 6.75, "y": 3.5}, + {"matrix": [8, 3], "x": 7.75, "y": 3.5}, + {"matrix": [9, 3], "x": 8.75, "y": 3.5}, + {"matrix": [10, 3], "x": 9.75, "y": 3.5}, + {"matrix": [11, 3], "x": 10.75, "y": 3.5}, + {"matrix": [12, 3], "x": 11.75, "y": 3.5}, + {"matrix": [14, 3], "x": 12.75, "y": 3.5, "w": 2.25}, + {"matrix": [10, 7], "x": 18.5, "y": 3.5}, + {"matrix": [9, 7], "x": 19.5, "y": 3.5}, + {"matrix": [8, 7], "x": 20.5, "y": 3.5}, + {"matrix": [1, 4], "x": 0, "y": 4.5, "w": 2.25}, + {"matrix": [3, 4], "x": 2.25, "y": 4.5}, + {"matrix": [4, 4], "x": 3.25, "y": 4.5}, + {"matrix": [4, 5], "x": 4.25, "y": 4.5}, + {"matrix": [6, 4], "x": 5.25, "y": 4.5}, + {"matrix": [7, 4], "x": 6.25, "y": 4.5}, + {"matrix": [7, 5], "x": 7.25, "y": 4.5}, + {"matrix": [9, 4], "x": 8.25, "y": 4.5}, + {"matrix": [10, 4], "x": 9.25, "y": 4.5}, + {"matrix": [11, 4], "x": 10.25, "y": 4.5}, + {"matrix": [12, 4], "x": 11.25, "y": 4.5}, + {"matrix": [14, 4], "x": 12.25, "y": 4.5, "w": 2.75}, + {"matrix": [2, 1], "x": 16.25, "y": 4.5}, + {"matrix": [10, 6], "x": 18.5, "y": 4.5}, + {"matrix": [9, 6], "x": 19.5, "y": 4.5}, + {"matrix": [8, 6], "x": 20.5, "y": 4.5}, + {"matrix": [7, 6], "x": 21.5, "y": 4.5, "h": 2}, + {"matrix": [1, 5], "x": 0, "y": 5.5, "w": 1.5}, + {"matrix": [2, 5], "x": 1.5, "y": 5.5}, + {"matrix": [3, 5], "x": 2.5, "y": 5.5, "w": 1.5}, + {"matrix": [6, 5], "x": 4, "y": 5.5, "w": 6}, + {"matrix": [10, 5], "x": 10, "y": 5.5, "w": 1.5}, + {"matrix": [11, 5], "x": 11.5, "y": 5.5}, + {"matrix": [12, 5], "x": 12.5, "y": 5.5}, + {"matrix": [13, 5], "x": 13.5, "y": 5.5, "w": 1.5}, + {"matrix": [15, 3], "x": 15.25, "y": 5.5}, + {"matrix": [6, 6], "x": 16.25, "y": 5.5}, + {"matrix": [15, 5], "x": 17.25, "y": 5.5}, + {"matrix": [11, 6], "x": 18.5, "y": 5.5, "w": 2}, + {"matrix": [11, 7], "x": 20.5, "y": 5.5} + ] + } + } +} diff --git a/keyboards/razer/blackwidow_2019/keymaps/default/keymap.c b/keyboards/razer/blackwidow_2019/keymaps/default/keymap.c new file mode 100644 index 000000000000..f27d44259b15 --- /dev/null +++ b/keyboards/razer/blackwidow_2019/keymaps/default/keymap.c @@ -0,0 +1,25 @@ +// Copyright 2026 AeroModes +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +enum layers { _BASE, _FN }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, + KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_P1, KC_P2, KC_P3, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + [_FN] = LAYOUT( + _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_MPRV, KC_MPLY, KC_MNXT, DM_PLY1, DM_REC1, GU_TOGG, RM_VALD, RM_VALU, _______, _______, KC_SLEP, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RM_NEXT, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/razer/blackwidow_2019/mcuconf.h b/keyboards/razer/blackwidow_2019/mcuconf.h new file mode 100644 index 000000000000..0e4d089c1055 --- /dev/null +++ b/keyboards/razer/blackwidow_2019/mcuconf.h @@ -0,0 +1,14 @@ +// Copyright 2026 AeroModes +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include_next + +/* 12 MHz HSE x8 = 96 MHz VCO -> /3 = 32 MHz SYSCLK, VCO/2 = 48 MHz USB. */ +#undef STM32_PLLMUL_VALUE +#define STM32_PLLMUL_VALUE 8 + +/* IS31FL3733 LED drivers on I2C1 (SCL PB6, SDA PB7). */ +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/razer/blackwidow_2019/readme.md b/keyboards/razer/blackwidow_2019/readme.md new file mode 100644 index 000000000000..6f3737548730 --- /dev/null +++ b/keyboards/razer/blackwidow_2019/readme.md @@ -0,0 +1,49 @@ +# Razer BlackWidow 2019 + +![Razer BlackWidow +2019](https://assets.razerzone.com/eeimages/support/products/1501/1501-blackwidow2019.png) + +Full-size ANSI mechanical keyboard. Powered by an STM32L151RCT6 with dual +IS31FL3733 per-key RGB. + +- Keyboard Maintainer: [AeroModes](https://github.com/aeromodes) +- Hardware Supported: Razer BlackWidow 2019 +- Hardware Availability: [Razer](https://www.razer.com/) + +Make example for this keyboard (after setting up your build environment): + +```sh +make razer/blackwidow_2019:default +``` + +Flashing example for this keyboard: + +```sh +make razer/blackwidow_2019:default:flash +``` + +Note that this keyboard does not support QMK's flashing procedures with its +stock firmware. The [razer-qmk](https://github.com/aeromodes/razer-qmk) project +has instructions and setup to allow QMK firmware installation. + +See the [build environment setup](https://docs.qmk.fm/newbs_getting_started) +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). + +## Keymap + +The default keymap follows the stock Fn legends, except: + +- `Fn`+`F8`/`F9`: Respectively play and record a [dynamic + macro](https://docs.qmk.fm/features/dynamic_macros) instead of Razer's + assign-to-key macro system. +- `Fn`+`Menu`: Cycle to the next [RGB matrix + effect](https://docs.qmk.fm/features/rgb_matrix#rgb-matrix-effects). With the + stock firmware, this would be the on-keyboard profile switch. However, this + keymap only has one layer (+ Fn), so this is the most appropriate remapping. + +## Bootloader + +Enter the bootloader by holding down the Escape key and plugging in the +keyboard.